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
5b91b8d0bb2047448e9115e143400e9a12c4cc98
5a90cbdba7170bdfb3f49f1094f90e8de1c9f430
/java/basic/src/main/java/basic/SimpleDateFormateSafeTest.java
4d917b5d02952b6470a7c87bfbbf03029650b020
[]
no_license
dimu/fortnight
df717aecab02e1dcd70713e89bbefc92dc74aa43
42912977bd1940143ac030541730c827045ae696
refs/heads/master
2023-08-03T23:37:53.696563
2023-03-22T03:45:55
2023-03-22T03:45:55
191,578,687
0
0
null
2023-07-22T08:11:16
2019-06-12T13:40:50
Java
UTF-8
Java
false
false
142
java
package basic; public class SimpleDateFormateSafeTest { public static void main(String[] args) { Thread thread1 = new Thread(); } }
[ "wenxiang0705@qq.com" ]
wenxiang0705@qq.com
c6f9793a70b9e58c81dda1821e56827adf46548f
dec6bd85db1d028edbbd3bd18fe0ca628eda012e
/netbeans-projects/SistemaInventario/src/view/chamada/ListenerChamada.java
08106e5996828ef79b601d555ffbda05b00e65e6
[]
no_license
MatheusGrenfell/java-projects
21b961697e2c0c6a79389c96b588e142c3f70634
93c7bfa2e4f73a232ffde2d38f30a27f2a816061
refs/heads/master
2022-12-29T12:55:00.014296
2020-10-16T00:54:30
2020-10-16T00:54:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package view.chamada; import model.Chamada; public interface ListenerChamada { public void exibeChamada(Chamada chamada); }
[ "caiohobus@gmail.com" ]
caiohobus@gmail.com
8630293fb4fd41cbbaf23b978165bf76c59dc52a
ee3db8c34dc91d6e8add03d603b3de412de96f5a
/edex/gov.noaa.nws.ncep.edex.plugin.intlsigmet/src/gov/noaa/nws/ncep/edex/plugin/intlsigmet/decoder/IntlSigmetSeparator.java
a1fac87813971aad1a2f43b20dc520388cb7f0d8
[]
no_license
Unidata/awips2-ncep
a9aa3a26d83e901cbfaac75416ce586fc56b77d7
0abdb2cf11fcc3b9daf482f282c0491484ea312c
refs/heads/unidata_18.2.1
2023-07-24T03:53:47.775210
2022-07-12T14:56:56
2022-07-12T14:56:56
34,419,331
2
5
null
2023-03-06T22:22:27
2015-04-22T22:26:52
Java
UTF-8
Java
false
false
4,269
java
/** * IntlsigmetSeparator * * This class sets the raw data to an Arraylist, records, of * String based on a uniquely identified separator. * * HISTORY * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 06/2009 113 L. Lin Initial creation * 07/2009 113 L. Lin Migration to TO11 * </pre> * * This code has been developed by the SIB for use in the AWIPS2 system. * @author L. Lin * @version 1.0 */ package gov.noaa.nws.ncep.edex.plugin.intlsigmet.decoder; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.NoSuchElementException; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.raytheon.edex.esb.Headers; import com.raytheon.edex.plugin.AbstractRecordSeparator; import com.raytheon.uf.common.util.StringUtil; public class IntlSigmetSeparator extends AbstractRecordSeparator { private final Log logger = LogFactory.getLog(getClass()); /** Regex used for separate the bulletins */ private static final String BULLSEPARATOR = "([0-9]{3})( )*\\x0d\\x0d\\x0a([A-Z]{4}[0-9]{2}) ([A-Z]{4}) ([0-9]{6})( [A-Z]{3})?\\x0d\\x0d\\x0a"; /** Regex matcher */ private Matcher matcher; /** Pattern object for regex search */ private Pattern pattern; /** List of records contained in file */ private List<String> records; private Iterator<String> iterator = null; /** * Constructor. * */ public IntlSigmetSeparator() { records = new ArrayList<String>(); } public static IntlSigmetSeparator separate(byte[] data, Headers headers) { IntlSigmetSeparator ds = new IntlSigmetSeparator(); ds.setData(data, headers); return ds; } public void setData(byte[] data, Headers headers) { doSeparate(new String(data)); iterator = records.iterator(); } /* * (non-Javadoc) * * @see com.raytheon.edex.plugin.IRecordSeparator#hasNext() */ public boolean hasNext() { if (iterator == null) { return false; } else { return iterator.hasNext(); } } /** * Get record */ public byte[] next() { try { String temp = iterator.next(); if (StringUtil.isEmptyString(temp)) { return (byte[]) null; } else { return temp.getBytes(); } } catch (NoSuchElementException e) { return (byte[]) null; } } /** * @param message * separate bulletins */ private void doSeparate(String message) { /* Regex used for separate the bulletins */ try { pattern = Pattern.compile(BULLSEPARATOR); matcher = pattern.matcher(message); /* * Set number of bulletins to records only if the bulletin separator * is not the same. At the point, only separators are stored in * "records" */ while (matcher.find()) { if (!records.contains(matcher.group())) { records.add(matcher.group()); } } /* * Append the raw data file to the records. */ for (int i = 0; i < records.size(); i++) { if (i < records.size() - 1) { records.set( i, "\n" + message.substring( message.indexOf(records.get(i)), message.indexOf(records.get(i + 1)))); } else { records.set( i, "\n" + message.substring(message.indexOf(records .get(i)))); } } } catch (Exception e) { logger.warn("No valid records found!", e); } return; } }
[ "Shawn.Hooper@noaa.gov" ]
Shawn.Hooper@noaa.gov
8fb2c9f94ccf5939deaa3db2724348c2ace33114
9da2a3149b5668c02841191640b8c60e2597a8cf
/diy-maindir/diy-api/src/main/java/com/cn/iboot/diy/api/trans/domain/TransLog.java
5778bb2f571fe28bbae18cabb5357fd5f28b0189
[]
no_license
wang-shun/wecard-maindir
e1ff253978d37a54ad2dcc68c7e720678dccc439
438070cfb10f8a466d016858ea62c340cf4b2a46
refs/heads/master
2022-07-17T07:37:11.638365
2019-05-04T07:48:05
2019-05-04T07:48:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,080
java
package com.cn.iboot.diy.api.trans.domain; import com.cn.iboot.diy.api.base.domain.BaseEntity; public class TransLog extends BaseEntity { private static final long serialVersionUID = 6794606147580829368L; private String txnPrimaryKey; private String settleDate; private String orgTxnPrimaryKey; private String dmsRelatedKey; private String orgDmsRelatedKey; private String transId; private long transSt; private String termCode; private String shopCode; private String mchntCode; private String insCode; private String respCode; private String priAcctNo; private String cardNo; private String userName; private String productCode; private String transAmt; private String orgTransAmt; private String transCurrCd; private String cardAttr; private String transChnl; private String transFee; private String transFeeType; private String tfrInAcctNo; private String tfrOutAcctNo; private String additionalInfo; private String referenceNo;// 交易参考号 private String mchntName;// 商户名称 private String shopName;// 门店名称 private String transTime;// 交易时间 private String personName;//用户名 private String chnlName;//渠道名称 private String invoiceStat; private String tableNum; private String positCode; private String transType; private String transStat; private String startTransTime; // 交易开始时间 private String endTransTime; // 交易结束时间 private String queryType; //查询记录(当天或者历史) public String getTxnPrimaryKey() { return txnPrimaryKey; } public void setTxnPrimaryKey(String txnPrimaryKey) { this.txnPrimaryKey = txnPrimaryKey; } public String getSettleDate() { return settleDate; } public void setSettleDate(String settleDate) { this.settleDate = settleDate; } public String getOrgTxnPrimaryKey() { return orgTxnPrimaryKey; } public void setOrgTxnPrimaryKey(String orgTxnPrimaryKey) { this.orgTxnPrimaryKey = orgTxnPrimaryKey; } public String getDmsRelatedKey() { return dmsRelatedKey; } public void setDmsRelatedKey(String dmsRelatedKey) { this.dmsRelatedKey = dmsRelatedKey; } public String getOrgDmsRelatedKey() { return orgDmsRelatedKey; } public void setOrgDmsRelatedKey(String orgDmsRelatedKey) { this.orgDmsRelatedKey = orgDmsRelatedKey; } public String getTransId() { return transId; } public void setTransId(String transId) { this.transId = transId; } public long getTransSt() { return transSt; } public void setTransSt(long transSt) { this.transSt = transSt; } public String getTermCode() { return termCode; } public void setTermCode(String termCode) { this.termCode = termCode; } public String getShopCode() { return shopCode; } public void setShopCode(String shopCode) { this.shopCode = shopCode; } public String getMchntCode() { return mchntCode; } public void setMchntCode(String mchntCode) { this.mchntCode = mchntCode; } public String getInsCode() { return insCode; } public void setInsCode(String insCode) { this.insCode = insCode; } public String getRespCode() { return respCode; } public void setRespCode(String respCode) { this.respCode = respCode; } public String getPriAcctNo() { return priAcctNo; } public void setPriAcctNo(String priAcctNo) { this.priAcctNo = priAcctNo; } public String getCardNo() { return cardNo; } public void setCardNo(String cardNo) { this.cardNo = cardNo; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getProductCode() { return productCode; } public void setProductCode(String productCode) { this.productCode = productCode; } public String getTransAmt() { return transAmt; } public void setTransAmt(String transAmt) { this.transAmt = transAmt; } public String getOrgTransAmt() { return orgTransAmt; } public void setOrgTransAmt(String orgTransAmt) { this.orgTransAmt = orgTransAmt; } public String getTransCurrCd() { return transCurrCd; } public void setTransCurrCd(String transCurrCd) { this.transCurrCd = transCurrCd; } public String getCardAttr() { return cardAttr; } public void setCardAttr(String cardAttr) { this.cardAttr = cardAttr; } public String getTransChnl() { return transChnl; } public void setTransChnl(String transChnl) { this.transChnl = transChnl; } public String getTransFee() { return transFee; } public void setTransFee(String transFee) { this.transFee = transFee; } public String getTransFeeType() { return transFeeType; } public void setTransFeeType(String transFeeType) { this.transFeeType = transFeeType; } public String getTfrInAcctNo() { return tfrInAcctNo; } public void setTfrInAcctNo(String tfrInAcctNo) { this.tfrInAcctNo = tfrInAcctNo; } public String getTfrOutAcctNo() { return tfrOutAcctNo; } public void setTfrOutAcctNo(String tfrOutAcctNo) { this.tfrOutAcctNo = tfrOutAcctNo; } public String getAdditionalInfo() { return additionalInfo; } public void setAdditionalInfo(String additionalInfo) { this.additionalInfo = additionalInfo; } public String getReferenceNo() { return referenceNo; } public void setReferenceNo(String referenceNo) { this.referenceNo = referenceNo; } public String getMchntName() { return mchntName; } public void setMchntName(String mchntName) { this.mchntName = mchntName; } public String getShopName() { return shopName; } public void setShopName(String shopName) { this.shopName = shopName; } public String getTransTime() { return transTime; } public void setTransTime(String transTime) { this.transTime = transTime; } public String getPersonName() { return personName; } public void setPersonName(String personName) { this.personName = personName; } public String getChnlName() { return chnlName; } public void setChnlName(String chnlName) { this.chnlName = chnlName; } public String getInvoiceStat() { return invoiceStat; } public void setInvoiceStat(String invoiceStat) { this.invoiceStat = invoiceStat; } public String getTableNum() { return tableNum; } public void setTableNum(String tableNum) { this.tableNum = tableNum; } public String getPositCode() { return positCode; } public void setPositCode(String positCode) { this.positCode = positCode; } public String getTransType() { return transType; } public void setTransType(String transType) { this.transType = transType; } public String getStartTransTime() { return startTransTime; } public void setStartTransTime(String startTransTime) { this.startTransTime = startTransTime; } public String getEndTransTime() { return endTransTime; } public void setEndTransTime(String endTransTime) { this.endTransTime = endTransTime; } public String getQueryType() { return queryType; } public void setQueryType(String queryType) { this.queryType = queryType; } public String getTransStat() { return transStat; } public void setTransStat(String transStat) { this.transStat = transStat; } }
[ "zhu_qiuyou@ebeijia.com" ]
zhu_qiuyou@ebeijia.com
e8d541e02f98f8aa0e31f36e70df0bd2d9e24271
78841e01ae9e24fc7d5a06fcc3eef36d5191d607
/src/help/pay/lingdian/test/wzf/WXScancode.java
16c8c59247712b83ee267d22202342fc6bf7dfc6
[]
no_license
zzwazj/jjc
4e37d9147272dc7eb5fc378c0262a3ba1c350cc1
d969e64e41c7f2156ce2dd2ecfe3d6584d0765a7
refs/heads/master
2020-03-22T08:41:16.812177
2018-07-05T06:16:11
2018-07-05T06:16:11
139,783,890
2
3
null
null
null
null
UTF-8
Java
false
false
2,727
java
package help.pay.lingdian.test.wzf; import help.pay.lingdian.Config.MerConfig; import help.pay.lingdian.Utils.SignUtil; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * 微信扫码支付(正扫) 商家在平台下订单生成二维码 -》消费者扫描支付 * 调用交易 210110-机构统一下单 * @author Administrator * */ public class WXScancode { private static final String TxCode="210110";//210110-机构统一下单 private static final String ProductId="0601";//产品类型:0601-微信扫码 public static void main(String[] args) { try{ Map<String,String> map = new HashMap<String,String>(); map.put("Version", "2.0"); //版本号 map.put("SignMethod",MerConfig.SIGNMETHOD); //签名类型 map.put("TxCode",TxCode); //交易编码 map.put("MerNo",MerConfig.MERNO); //商户号-测试环境统一商户号 //map.put("PayChannel",""); //指定渠道 map.put("ProductId",ProductId);//产品类型:0601-微信扫码 map.put("TxSN",new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()));//商户交易流水号(唯一) map.put("Amount","100");//金额:单位:分 map.put("PdtName","面包");//商品名称 map.put("Remark","测试");//备注 map.put("StoreId","01");//门店号 map.put("TerminalId","001");//终端号 map.put("NotifyUrl",MerConfig.NOTIFYURL);//异步通知URL // 设置签名 MerConfig.setSignature(map); //报文明文 String plain = SignUtil.getURLParam(map,MerConfig.URL_PARAM_CONNECT_FLAG, true, null); System.out.println("请求原始报文:"+plain); //测试地址 String msg = MerConfig.sendMsg(MerConfig.REQURL, map); if (null == msg) { System.out.println("报文发送失败或应答消息为空"); } else { Map<String,String> resMap = SignUtil.parseResponse(msg,MerConfig.base64Keys,MerConfig.URL_PARAM_CONNECT_FLAG,MerConfig.CHARSET); System.out.println("URLDecoder处理后返回数据:"+SignUtil.getURLParam(resMap,MerConfig.URL_PARAM_CONNECT_FLAG, true, null)); if (MerConfig.verifySign(resMap)){ System.out.println("签名验证结果成功"); if ("00000".equalsIgnoreCase(resMap.get("RspCod")) || "1".equalsIgnoreCase(resMap.get("Status"))){ //请求成功进行处理 String ImgUrl=resMap.get("ImgUrl"); String CodeUrl=resMap.get("CodeUrl"); System.out.println("二维码图片地址:"+ImgUrl+"_____CodeUrl::"+CodeUrl); } else { //请求失败进行处理 } } else { System.out.println("签名验证结果失败"); } } } catch (Exception e){ e.printStackTrace(); } } }
[ "1375052454@qq.com" ]
1375052454@qq.com
a0f71d09894b8f136ff0ca5e7a13c747013d2b1d
104cda8eafe0617e2a5fa1e2b9f242d78370521b
/aliyun-java-sdk-fnf/src/main/java/com/aliyuncs/fnf/model/v20190315/StartExecutionRequest.java
860a377da72b601dfe38d9072719dad8bd8a3e8d
[ "Apache-2.0" ]
permissive
SanthosheG/aliyun-openapi-java-sdk
89f9b245c1bcdff8dac0866c36ff9a261aa40684
38a910b1a7f4bdb1b0dd29601a1450efb1220f79
refs/heads/master
2020-07-24T00:00:59.491294
2019-09-09T23:00:27
2019-09-11T04:29:56
207,744,099
2
0
NOASSERTION
2019-09-11T06:55:58
2019-09-11T06:55:58
null
UTF-8
Java
false
false
2,051
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.fnf.model.v20190315; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; /** * @author auto create * @version */ public class StartExecutionRequest extends RpcAcsRequest<StartExecutionResponse> { public StartExecutionRequest() { super("fnf", "2019-03-15", "StartExecution", "fnf"); setMethod(MethodType.POST); } private String input; private String executionName; private String requestId; private String flowName; public String getInput() { return this.input; } public void setInput(String input) { this.input = input; if(input != null){ putBodyParameter("Input", input); } } public String getExecutionName() { return this.executionName; } public void setExecutionName(String executionName) { this.executionName = executionName; if(executionName != null){ putBodyParameter("ExecutionName", executionName); } } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; if(requestId != null){ putQueryParameter("RequestId", requestId); } } public String getFlowName() { return this.flowName; } public void setFlowName(String flowName) { this.flowName = flowName; if(flowName != null){ putBodyParameter("FlowName", flowName); } } @Override public Class<StartExecutionResponse> getResponseClass() { return StartExecutionResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3d8cb542ab3dd54a8e6a693b57ff5b82718b2d47
0479bb44204aa75f39bd36051429e9fea9cdba5f
/txconsole-extension/txconsole-extension-exchange-properties/src/main/java/net/txconsole/extension/exchange/properties/PropertiesTxFileExchangeConfig.java
5a6aafc5576eabdda2574b2e78845780f4a0aadd
[]
no_license
dcoraboeuf/txconsole
d307dbfb3b3452fb432dbda8129e608a0044d58f
928c9ee808380c051f90f06f48ca6d456d9f0b3d
refs/heads/master
2020-04-05T23:21:13.944677
2013-10-16T12:30:33
2013-10-16T12:30:33
12,644,900
1
0
null
2013-10-02T17:41:40
2013-09-06T13:38:27
Java
UTF-8
Java
false
false
215
java
package net.txconsole.extension.exchange.properties; import lombok.Data; @Data public class PropertiesTxFileExchangeConfig { // TODO Escape service configuration private final String placeholder = ""; }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
04c360e761d54da6dd2a8abec8d9e50e0b2da1d5
fe64069926e88201b1976522be6689e0ceec5c25
/6-1. DI + AOP/DITest/src/main/java/di9/ChinaTire.java
4f248ef9cebae2686c1f3725a05b19fa4e85a3bc
[]
no_license
huisam/WebStudy
14ef606fa7eccebd83debb286f48f36e99f2c30d
3a9ccf18445dac9e4fa2c87b31c4732015126b46
refs/heads/master
2022-12-22T22:11:33.341705
2020-07-06T11:51:23
2020-07-06T11:51:23
185,299,077
0
0
null
2022-12-16T09:58:24
2019-05-07T01:39:37
Java
UTF-8
Java
false
false
173
java
package di9; import org.springframework.stereotype.Component; @Component class ChinaTire implements Tire { public String getName() { return "중국산 타이어"; } }
[ "huisam@naver.com" ]
huisam@naver.com
4faff0d576be815835a1425e22330f00f6fbfb70
c096a03908fdc45f29574578b87662e20c1f12d4
/com/src/main/java/lip/com/google/android/gms/internal/af.java
acd289cd3577c26af70ab38476307bd1e61ac4c2
[]
no_license
aboaldrdaaa2/Myappt
3762d0572b3f0fb2fbb3eb8f04cb64c6506c2401
38f88b7924c987ee9762894a7a5b4f8feb92bfff
refs/heads/master
2020-03-30T23:55:13.551721
2018-10-05T13:41:24
2018-10-05T13:41:24
151,718,350
0
0
null
null
null
null
UTF-8
Java
false
false
938
java
package lip.com.google.android.gms.internal; import android.content.Context; import com.google.android.gms.internal.ae.a; import org.json.JSONObject; public class af implements ae { private final ex lN; public af(Context context, ev evVar) { this.lN = ex.a(context, new al(), false, false, null, evVar); } public void a(final a aVar) { this.lN.cb().a(new ey.a() { public void a(ex exVar) { aVar.aE(); } }); } public void a(String str, bc bcVar) { this.lN.cb().a(str, bcVar); } public void a(String str, JSONObject jSONObject) { this.lN.a(str, jSONObject); } public void d(String str) { this.lN.loadUrl(str); } public void e(String str) { this.lN.cb().a(str, null); } public void pause() { eo.a(this.lN); } public void resume() { eo.b(this.lN); } }
[ "aboaldrdaaa2@gmail.com" ]
aboaldrdaaa2@gmail.com
32ae3c42872211fa790f9495ce7c5032fac4786d
ffcb017ac021479328a0ac9d76384ca56a008c67
/src/class3/boj9205/Boj9205_tk.java
88ed8e8978ba22c1bd83379f1318690d13adbaca
[]
no_license
girawhale/Algo_study
5b051777f4a5a97ed315ee214bf489c50e573d28
bf307a665465427cfe33b0b2bb247be6737190c5
refs/heads/master
2023-02-17T14:16:44.867001
2021-01-18T08:22:12
2021-01-18T08:22:12
290,190,583
4
3
null
null
null
null
UTF-8
Java
false
false
1,122
java
package class3.boj9205; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Boj9205_tk { static class Point { int y, x, idx; public Point(int y, int x, int idx) { this.y = y; this.x = x; this.idx = idx; } } static Point[] map; static boolean[] visited; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int tc = sc.nextInt(); for(int t = 1; t <= tc; t++) { int n = sc.nextInt(); map = new Point[n + 2]; visited = new boolean[n + 2]; for(int i = 0; i < n + 2; i++) map[i] = new Point(sc.nextInt(), sc.nextInt(), i); System.out.println(bfs(map[0])); } } public static String bfs(Point start) { Queue<Point> q = new LinkedList<>(); q.add(start); visited[start.idx] = true; while(!q.isEmpty()) { Point cur = q.poll(); if(cur.idx == map[map.length - 1].idx) return "happy"; for(int i = 0; i < map.length; i++) { if(visited[i] || (Math.abs(cur.y - map[i].y) + Math.abs(cur.x - map[i].x)) > 1000) continue; visited[i] = true; q.add(map[i]); } } return "sad"; } }
[ "ltk3934@daum.net" ]
ltk3934@daum.net
2c3cf67942985443101e3c71ac348eb0b6fcfc6e
61a59c80b812879ac3f7e389507e558f512158a2
/src/test/java/com/inetpsa/pct01/pmtapplication/config/elasticsearch/IndexReinitializer.java
387d51653d36fe489d81fb4a3f4fb23ce519d356
[]
no_license
e517487/jhipsterSampleApplication
d81b8139b87463b1ae724ca4c8a776db4509ad83
36c17a0c141971fa8051eca2669b11aa154364f7
refs/heads/master
2020-03-19T11:13:38.199172
2018-06-07T07:41:36
2018-06-07T07:41:36
136,440,656
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package com.inetpsa.pct01.pmtapplication.config.elasticsearch; import static java.lang.System.currentTimeMillis; import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.elasticsearch.core.ElasticsearchTemplate; import org.springframework.stereotype.Component; @Component public class IndexReinitializer { private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private ElasticsearchTemplate elasticsearchTemplate; @PostConstruct public void resetIndex() { long t = currentTimeMillis(); elasticsearchTemplate.deleteIndex("_all"); t = currentTimeMillis() - t; logger.debug("Elasticsearch indexes reset in {} ms", t); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
895121b75139c7464dc9da00772fdee9b68a4712
cac282178e5e105f42ae5f1deaca88f292e90f83
/dice-server/system/src/main/java/com/bihell/dice/system/mapper/AuthGroupMapper.java
5d9901617f0cb07e46a87828348bbdf7ce3bad26
[ "MIT" ]
permissive
leoleelwl/Dice
86305b63be8e7f6bbd3db01e4409243a3193ad51
0f0650b07f5abd39002fabe59f8f414f73090f2d
refs/heads/master
2023-08-15T06:48:31.374001
2021-09-27T03:38:24
2021-09-27T03:38:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.bihell.dice.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.bihell.dice.system.entity.AuthGroup; import com.bihell.dice.system.param.QueryParam; import java.util.List; /** * * @author bihell * @since 2017/7/12 21:34 */ public interface AuthGroupMapper extends BaseMapper<AuthGroup> { /** * @param param * @return */ List<AuthGroup> queryByParam(QueryParam param); }
[ "tpxcer@outlook.com" ]
tpxcer@outlook.com
59b4d464af6812ef853ee9020d065e58815bf23b
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14475-3-7-SPEA2-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/WikiCreationJob_ESTest_scaffolding.java
e843420e15df4ffca34b7f890abe75fd9a95a6bb
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
464
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Jan 18 23:11:57 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class WikiCreationJob_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
48153945118c73b869248357ce100ae68e2914b7
d73e0c36cc2000fc2bd58ce1ee71d3d829860b1f
/yue-library-base/src/main/java/ai/yue/library/base/validation/annotation/PlateNumberValidator.java
58afaae36cddfd9d27b347bf53c3755af32f2d81
[ "Apache-2.0" ]
permissive
lurker8/yue-library
1818656d815eb97c319c61281b2ab2a505644365
db8d3fe5c7186c8ec708e65b9c194f80b95ad66d
refs/heads/master
2020-07-11T00:36:23.551606
2019-08-23T03:22:40
2019-08-23T03:22:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
804
java
package ai.yue.library.base.validation.annotation; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import ai.yue.library.base.util.StringUtils; import cn.hutool.core.lang.Validator; /** * @author 孙金川 * @since 2019年5月8日 */ public class PlateNumberValidator implements ConstraintValidator<PlateNumber, String> { private boolean notNull; @Override public void initialize(PlateNumber constraintAnnotation) { this.notNull = constraintAnnotation.notNull(); } @Override public boolean isValid(String value, ConstraintValidatorContext context) { if (StringUtils.isNotBlank(value)) { return Validator.isPlateNumber(value); } if (notNull) { return false; } return true; } }
[ "yl-yue@qq.com" ]
yl-yue@qq.com
416d6d4438932dcb148651a4aa985809915552da
587ee60160601549d4849f82fa8e733e2619b7c6
/phonesafe/src/com/itheima/activitys/locationcall.java
8714f3b0a93368f70cf060a38bf4fbf43ef4d4ea
[]
no_license
liuyuan1993/daydemo
35329de72d672d56e04883c639c5aac40a10f159
98df870e6afc1e2237b81e8afbed36181968fbe0
refs/heads/master
2021-05-04T01:51:32.135315
2016-10-17T04:15:22
2016-10-17T04:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,089
java
package com.itheima.activitys; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.RelativeLayout; import com.example.phonesafe.R; import com.itheima.services.rockettosat; import com.itheima.ui.onOffImageButton; import com.itheima.utils.ServicesNum; import com.itheima.utils.smsbackuptool; import com.itheima.utils.smsbackuptool.callBackUp; public class locationcall extends Activity { private RelativeLayout rl_locationcall; private RelativeLayout rl_sms_backup; private RelativeLayout rl_sms_resore; private onOffImageButton ib_rocket; private ProgressDialog pd; private RelativeLayout rl_app_lock; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.locationcall); rl_app_lock = (RelativeLayout) findViewById(R.id.rl_app_lock); rl_app_lock.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent applockIntent = new Intent(getApplicationContext(), applock.class); startActivity(applockIntent); } }); ib_rocket = (onOffImageButton) findViewById(R.id.ib_rocket); ib_rocket.setFlag(ServicesNum.getServicesNum(this, "com.itheima.services.rockettosat")); ib_rocket.setOnClickListener(new rocketOnClickListener()); rl_sms_resore = (RelativeLayout) findViewById(R.id.rl_sms_restor); rl_sms_resore.setOnClickListener(new restoreOnClickListener()); rl_sms_backup = (RelativeLayout) findViewById(R.id.rl_sms_backup); rl_sms_backup.setOnClickListener(new backupOnCilckListener()); rl_locationcall = (RelativeLayout) findViewById(R.id.rl_locationcall); rl_locationcall.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent(locationcall.this, wherecall.class); startActivity(intent); } }); } private class rocketOnClickListener implements View.OnClickListener { @Override public void onClick(View v) { // TODO Auto-generated method stub ib_rocket.changeFlag(); Intent intent = new Intent(locationcall.this, rockettosat.class); boolean flag = ib_rocket.getFlag(); if (flag) { startService(intent); } else { stopService(intent); } } } private class restoreOnClickListener implements View.OnClickListener { @Override public void onClick(View v) { // TODO Auto-generated method stub pd = new ProgressDialog(locationcall.this); pd.setTitle("Loadding"); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pd.show(); new Thread() { public void run() { smsbackuptool.setSmsInfo(locationcall.this, new callBackUp() { @Override public void setMaxProgress(int max) { // TODO Auto-generated method stub pd.setMax(max); } @Override public void setCurrentProgress(int progress) { // TODO Auto-generated method stub pd.setProgress(progress); } }); pd.dismiss(); }; }.start(); } } private class backupOnCilckListener implements View.OnClickListener { @Override public void onClick(View v) { // TODO Auto-generated method stub pd = new ProgressDialog(locationcall.this); pd.setTitle("Loadding"); pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL); pd.show(); new Thread() { public void run() { smsbackuptool.getSmsInfos(locationcall.this, new callBackUp() { @Override public void setMaxProgress(int max) { // TODO Auto-generated method stub pd.setMax(max); } @Override public void setCurrentProgress(int progress) { // TODO Auto-generated method stub pd.setProgress(progress); } }); pd.dismiss(); }; }.start(); } } }
[ "18366108542@163.com" ]
18366108542@163.com
9adcf6caa7dbcf59f68e47b6f41e79bdfd31c971
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/shardingjdbc--sharding-jdbc/97500144737a083ec411847030d9f10944077a96/after/RoutingResult.java
19b01cad4147fab6759603fd9af9f040954a9638
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,057
java
/* * Copyright 1999-2015 dangdang.com. * <p> * 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. * </p> */ package com.dangdang.ddframe.rdb.sharding.routing.type; import lombok.Getter; /** *  路由结果. * * @author zhangliang */ @Getter public class RoutingResult { private final TableUnits tableUnits = new TableUnits(); /** * 判断是否为单库表路由. * * @return 是否为单库表路由 */ public final boolean isSingleRouting() { return 1 == tableUnits.getTableUnits().size(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
f9b1f9d6e3b2a04b1ee781d6601bc4b830a89e02
e8c848896822835d33a338404122d90b65c94db0
/src/org/ojalgo/random/Geometric.java
c0cf294b570a6e882a6af5994049c7972cc020eb
[ "MIT" ]
permissive
thibaultleouay/ojAlgo
c9d912154897da74ef758ed1f192fd9511dee25e
dfbfe362e09130c49a438e4de55af80326bc2ffc
refs/heads/master
2021-01-24T19:36:41.840640
2016-09-20T21:20:58
2016-09-20T21:20:58
68,753,908
0
0
null
2016-09-20T21:13:31
2016-09-20T21:13:30
null
UTF-8
Java
false
false
2,304
java
/* * Copyright 1997-2016 Optimatika (www.optimatika.se) * * 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 org.ojalgo.random; import static org.ojalgo.constant.PrimitiveMath.*; import org.ojalgo.function.PrimitiveFunction; /** * The number of required trials until an event with probability aProbability occurs has a geometric * distribution. * * @author apete */ public class Geometric extends AbstractDiscrete { private static final long serialVersionUID = 1324905651790774444L; private final double myProbability; public Geometric() { this(HALF); } public Geometric(final double aProbability) { super(); myProbability = aProbability; } public double getExpected() { return ONE / myProbability; } public double getProbability(final int aVal) { return myProbability * PrimitiveFunction.POW.invoke(ONE - myProbability, aVal - ONE); } @Override public double getVariance() { return (ONE - myProbability) / (myProbability * myProbability); } @Override protected double generate() { int retVal = 1; while ((this.random().nextDouble() + myProbability) <= ONE) { retVal++; } return retVal; } }
[ "apete@optimatika.se" ]
apete@optimatika.se
45d51b8bc0a2c786bff95abb3d832d68df1643e9
e0ce65ca68416abe67d41f340e13d7d7dcec8e0f
/src/main/java/org/trypticon/luceneupgrader/lucene3/internal/lucene/analysis/LowerCaseTokenizer.java
e26035e5e9b8129e0934f114ea94b36d91d8c791
[ "Apache-2.0" ]
permissive
arandomgal/lucene-one-stop-index-upgrader
943264c22e6cadfef13116f41766f7d5fb2d3a7c
4c8b35dcda9e57f0507de48d8519e9c31cb8efb6
refs/heads/main
2023-06-07T04:18:20.805332
2021-07-05T22:28:46
2021-07-05T22:28:46
383,277,257
0
0
null
null
null
null
UTF-8
Java
false
false
1,929
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.trypticon.luceneupgrader.lucene3.internal.lucene.analysis; import java.io.Reader; import org.trypticon.luceneupgrader.lucene3.internal.lucene.util.AttributeSource; import org.trypticon.luceneupgrader.lucene3.internal.lucene.util.Version; public final class LowerCaseTokenizer extends LetterTokenizer { public LowerCaseTokenizer(Version matchVersion, Reader in) { super(matchVersion, in); } public LowerCaseTokenizer(Version matchVersion, AttributeSource source, Reader in) { super(matchVersion, source, in); } public LowerCaseTokenizer(Version matchVersion, AttributeFactory factory, Reader in) { super(matchVersion, factory, in); } @Deprecated public LowerCaseTokenizer(Reader in) { super(Version.LUCENE_30, in); } @Deprecated public LowerCaseTokenizer(AttributeSource source, Reader in) { super(Version.LUCENE_30, source, in); } @Deprecated public LowerCaseTokenizer(AttributeFactory factory, Reader in) { super(Version.LUCENE_30, factory, in); } @Override protected int normalize(int c) { return Character.toLowerCase(c); } }
[ "ying.andrews@gmail.com" ]
ying.andrews@gmail.com
5158de9b83f2b6104c96f611e5f93b0dc71fbbe1
3eca6278418d9eef7f5f850b23714a8356ef525f
/tumi/CobranzaEJB/ejbModule/pe/com/tumi/cobranza/planilla/dao/impl/EfectuadoConceptoDaoIbatis.java
c9089a1455934a2f65edd4854f45535492e854ae
[]
no_license
cdelosrios88/tumiws-bizarq
2728235b3f3239f12f14b586bb6349e2f9b8cf4f
7b32fa5765a4384b8d219c5f95327b2e14dd07ac
refs/heads/master
2021-01-23T22:53:21.052873
2014-07-05T05:19:58
2014-07-05T05:19:58
32,641,875
0
0
null
null
null
null
UTF-8
Java
false
false
4,087
java
package pe.com.tumi.cobranza.planilla.dao.impl; import java.util.HashMap; import java.util.List; import pe.com.tumi.framework.negocio.exception.DAOException; import pe.com.tumi.framework.negocio.persistencia.dao.impl.TumiDaoIbatis; import pe.com.tumi.cobranza.planilla.dao.EfectuadoConceptoDao; import pe.com.tumi.cobranza.planilla.dao.EfectuadoDao; import pe.com.tumi.cobranza.planilla.domain.Efectuado; import pe.com.tumi.cobranza.planilla.domain.EfectuadoConcepto; public class EfectuadoConceptoDaoIbatis extends TumiDaoIbatis implements EfectuadoConceptoDao{ public List<EfectuadoConcepto> getListaPorEfectuado(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".getListaPorEfectuado", o); }catch(Exception e) { throw new DAOException (e); } return lista; } /** CREADO 06/08/2013 * SE OBTINIE EFECTUADOCONCEPTO POR PK DE EFECTUADO Y EXPEDIENTE * **/ public List<EfectuadoConcepto> getListaPorEfectuadoYExpediente(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".getListaPorEfectuadoYExpediente", o); }catch(Exception e) { throw new DAOException (e); } return lista; } /** * AUTOR Y FECHA CREACION: JCHAVEZ / 14-09-2013 * OBTENER EFECTUADOCONCEPTO POR PK DE EFECTUADO Y (EXPEDIENTE O CUENTACONCEPTO) Y TIPOCONCEPTOGRAL * @param o * @return * @throws DAOException */ public List<EfectuadoConcepto> getListaPorEfectuadoPKEnvioConcepto(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".getListaPorEfectuadoPKEnvioConcepto", o); }catch(Exception e) { throw new DAOException (e); } return lista; } public EfectuadoConcepto grabar(EfectuadoConcepto o) throws DAOException { EfectuadoConcepto dto = null; try{ getSqlMapClientTemplate().insert(getNameSpace() + ".grabar",o); }catch(Exception e) { throw new DAOException(e); } return dto; } public EfectuadoConcepto grabarSub(EfectuadoConcepto o) throws DAOException { EfectuadoConcepto dto = null; try{ getSqlMapClientTemplate().insert(getNameSpace() + ".grabarSub",o); }catch(Exception e) { throw new DAOException(e); } return dto; } public EfectuadoConcepto modificar(EfectuadoConcepto o) throws DAOException { EfectuadoConcepto dto = null; try { getSqlMapClientTemplate().update(getNameSpace()+ ".modificar",o); dto = o; }catch(Exception e) { throw new DAOException(e); } return dto; } public List<EfectuadoConcepto> montoExpedientePrestamo(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".montoExpedientePrestamo", o); }catch(Exception e) { throw new DAOException (e); } return lista; } public List<EfectuadoConcepto> montoExpedienteInteres(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".montoExpedienteInteres", o); }catch(Exception e) { throw new DAOException (e); } return lista; } public List<EfectuadoConcepto> montoCuentaPorPagar(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".montoCuentaPorPagar", o); }catch(Exception e) { throw new DAOException (e); } return lista; } public List<EfectuadoConcepto> prestamoInteres(Object o) throws DAOException{ List<EfectuadoConcepto> lista = null; try{ lista = (List) getSqlMapClientTemplate().queryForList(getNameSpace() + ".prestamoInteres", o); }catch(Exception e) { throw new DAOException (e); } return lista; } }
[ "cdelosrios@bizarq.com@b3a863b4-f5f8-5366-a268-df30542ed8c1" ]
cdelosrios@bizarq.com@b3a863b4-f5f8-5366-a268-df30542ed8c1
deb395445b7aae100767f278381ba07d4bfc7b96
0dcd633de13f79941bb3f67e2b72a856ff944011
/MyBatisGenerator插件的使用/src/main/java/org/lint/DAO/EcsWeixinConfigMapper.java
76a3b35fa70d966b7ede8d7d2074db509597dd32
[]
no_license
lintsGitHub/StudyMyBatisExample
07666f4a94c05cfb9e92af790d9eefff25e50ced
d160472cc481e3843183647086e9e956643f9c9e
refs/heads/master
2020-04-05T02:12:51.335275
2019-02-17T06:14:46
2019-02-17T06:14:46
156,468,204
0
0
null
null
null
null
UTF-8
Java
false
false
1,211
java
package org.lint.DAO; import java.util.List; import org.lint.Entity.EcsWeixinConfig; public interface EcsWeixinConfigMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table ecs_weixin_config * * @mbg.generated */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table ecs_weixin_config * * @mbg.generated */ int insert(EcsWeixinConfig record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table ecs_weixin_config * * @mbg.generated */ EcsWeixinConfig selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table ecs_weixin_config * * @mbg.generated */ List<EcsWeixinConfig> selectAll(); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table ecs_weixin_config * * @mbg.generated */ int updateByPrimaryKey(EcsWeixinConfig record); }
[ "2145604059@qq.com" ]
2145604059@qq.com
fdad0610c684ffe24ef034d270d8a2066644bfdf
1487551bcc450de91af8a592d05341d6f72951d1
/src/test/java/com/corneliouzbett/utraffic/web/rest/AccountResourceIntTest.java
0f9c8ce5b9fce36f24b9e7a3b7934be45cd41042
[]
no_license
corneliouzbett/U-traffic-cops
56c70fdf1787de27419e19e5052696a83abdd75d
956afc366fc5bb6daecdcb5f5707e5a35eda7512
refs/heads/master
2020-03-28T04:00:15.391966
2018-11-29T05:45:41
2018-11-29T05:45:41
147,688,580
1
0
null
2018-11-29T05:45:42
2018-09-06T14:44:22
Java
UTF-8
Java
false
false
5,086
java
package com.corneliouzbett.utraffic.web.rest; import com.corneliouzbett.utraffic.UtrafficApp; import com.corneliouzbett.utraffic.domain.Authority; import com.corneliouzbett.utraffic.domain.User; import com.corneliouzbett.utraffic.repository.UserRepository; import com.corneliouzbett.utraffic.security.AuthoritiesConstants; import com.corneliouzbett.utraffic.service.UserService; import com.corneliouzbett.utraffic.web.rest.errors.ExceptionTranslator; import org.apache.commons.lang3.RandomStringUtils; import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.user; import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.util.HashSet; import java.util.Set; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.context.WebApplicationContext; /** * Test class for the AccountResource REST controller. * * @see AccountResource */ @RunWith(SpringRunner.class) @SpringBootTest(classes = UtrafficApp.class) public class AccountResourceIntTest{ @Autowired private UserRepository userRepository; @Autowired private ExceptionTranslator exceptionTranslator; @Autowired private UserService userService; private MockMvc restUserMockMvc; @Autowired private WebApplicationContext context; @Before public void setup() { MockitoAnnotations.initMocks(this); AccountResource accountUserMockResource = new AccountResource(userService); this.restUserMockMvc = MockMvcBuilders.standaloneSetup(accountUserMockResource) .setControllerAdvice(exceptionTranslator) .build(); } @Test public void testNonAuthenticatedUser() throws Exception { restUserMockMvc.perform(get("/api/authenticate") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().string("")); } @Test public void testAuthenticatedUser() throws Exception { restUserMockMvc.perform(get("/api/authenticate") .with(request -> { request.setRemoteUser("test"); return request; }) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().string("test")); } @Test @Transactional public void testGetExistingAccount() throws Exception { Set<Authority> authorities = new HashSet<>(); Authority authority = new Authority(); authority.setName(AuthoritiesConstants.ADMIN); authorities.add(authority); User user = new User(); user.setId(RandomStringUtils.randomAlphanumeric(50)); user.setLogin("test"); user.setFirstName("john"); user.setLastName("doe"); user.setEmail("john.doe@jhipster.com"); user.setImageUrl("http://placehold.it/50x50"); user.setLangKey("en"); user.setAuthorities(authorities); userRepository.save(user); // create security-aware mockMvc restUserMockMvc = MockMvcBuilders .webAppContextSetup(context) .apply(springSecurity()) .build(); restUserMockMvc.perform(get("/api/account") .with(user(user.getLogin()).roles("ADMIN")) .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.login").value("test")) .andExpect(jsonPath("$.firstName").value("john")) .andExpect(jsonPath("$.lastName").value("doe")) .andExpect(jsonPath("$.email").value("john.doe@jhipster.com")) .andExpect(jsonPath("$.imageUrl").value("http://placehold.it/50x50")) .andExpect(jsonPath("$.langKey").value("en")) .andExpect(jsonPath("$.authorities").value(AuthoritiesConstants.ADMIN)); } @Test public void testGetUnknownAccount() throws Exception { restUserMockMvc.perform(get("/api/account") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isInternalServerError()); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5d4cc44012c76a33af86190fe8c6c7f6fc83c87a
392e624ea2d6886bf8e37167ebbda0387e7e4a9a
/uxcrm-ofbiz/generated-entity-service/src/main/java/org/apache/ofbiz/accounting/fixedasset/service/base/AccommodationMapTypeBaseService.java
e85e9adcdabb5fa0cf35fdb03bfcdd5a93e8e3ba
[ "Apache-2.0" ]
permissive
yuri0x7c1/uxcrm
11eee75f3a9cffaea4e97dedc8bc46d8d92bee58
1a0bf4649bee0a3a62e486a9d6de26f1d25d540f
refs/heads/master
2018-10-30T07:29:54.123270
2018-08-26T18:25:35
2018-08-26T18:25:35
104,251,350
0
0
null
null
null
null
UTF-8
Java
false
false
4,435
java
package org.apache.ofbiz.accounting.fixedasset.service.base; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import org.apache.ofbiz.common.ExecuteFindService.In; import org.apache.ofbiz.common.ExecuteFindService.Out; import org.apache.ofbiz.common.ExecuteFindService; import java.util.Arrays; import java.util.ArrayList; import java.util.List; import java.util.Collections; import org.apache.commons.collections4.CollectionUtils; import java.util.Optional; import org.apache.ofbiz.entity.GenericEntityException; import org.apache.ofbiz.entity.condition.EntityConditionList; import org.apache.ofbiz.entity.condition.EntityExpr; import org.apache.ofbiz.entity.condition.EntityOperator; import com.github.yuri0x7c1.uxcrm.util.OfbizUtil; import org.apache.ofbiz.accounting.fixedasset.AccommodationMapType; import org.springframework.beans.factory.annotation.Autowired; import org.apache.ofbiz.accounting.fixedasset.AccommodationMap; @Slf4j @Component @SuppressWarnings("unchecked") public class AccommodationMapTypeBaseService { protected ExecuteFindService executeFindService; @Autowired public AccommodationMapTypeBaseService(ExecuteFindService executeFindService) { this.executeFindService = executeFindService; } /** * Count AccommodationMapTypes */ public Integer count(EntityConditionList conditions) { In in = new In(); in.setEntityName(AccommodationMapType.NAME); if (conditions == null) { in.setNoConditionFind(OfbizUtil.Y); } else { in.setEntityConditionList(conditions); } Out out = executeFindService.runSync(in); return out.getListSize(); } /** * Find AccommodationMapTypes */ public List<AccommodationMapType> find(Integer start, Integer number, List<String> orderBy, EntityConditionList conditions) { List<AccommodationMapType> entityList = Collections.emptyList(); In in = new In(); in.setEntityName(AccommodationMapType.NAME); if (start == null) { start = OfbizUtil.DEFAULT_FIND_START; } if (number == null) { number = OfbizUtil.DEFAULT_FIND_NUMBER; } in.setOrderByList(orderBy); if (conditions == null) { in.setNoConditionFind(OfbizUtil.Y); } else { in.setEntityConditionList(conditions); } Out out = executeFindService.runSync(in); try { if (out.getListIt() != null) { entityList = AccommodationMapType.fromValues(out.getListIt() .getPartialList(start, number)); out.getListIt().close(); } } catch (GenericEntityException e) { log.error(e.getMessage(), e); } return entityList; } /** * Find one AccommodationMapType */ public Optional<AccommodationMapType> findOne(Object accommodationMapTypeId) { List<AccommodationMapType> entityList = null; In in = new In(); in.setEntityName(AccommodationMapType.NAME); in.setEntityConditionList(new EntityConditionList<>(Arrays .asList(new EntityExpr("accommodationMapTypeId", EntityOperator.EQUALS, accommodationMapTypeId)), EntityOperator.AND)); Out out = executeFindService.runSync(in); try { if (out.getListIt() != null) { entityList = AccommodationMapType.fromValues(out.getListIt() .getCompleteList()); out.getListIt().close(); } } catch (GenericEntityException e) { log.error(e.getMessage(), e); } if (CollectionUtils.isNotEmpty(entityList)) { return Optional.of(entityList.get(0)); } return Optional.empty(); } /** * Get accommodation maps */ public List<AccommodationMap> getAccommodationMaps( AccommodationMapType accommodationMapType, Integer start, Integer number, List<String> orderBy) { List<AccommodationMap> entityList = Collections.emptyList(); In in = new In(); in.setEntityName(AccommodationMap.NAME); if (start == null) { start = OfbizUtil.DEFAULT_FIND_START; } if (number == null) { number = OfbizUtil.DEFAULT_FIND_NUMBER; } in.setOrderByList(orderBy); in.setEntityConditionList(new EntityConditionList<>(Arrays .asList(new EntityExpr("accommodationMapTypeId", EntityOperator.EQUALS, accommodationMapType .getAccommodationMapTypeId())), EntityOperator.AND)); Out out = executeFindService.runSync(in); try { if (out.getListIt() != null) { entityList = AccommodationMap.fromValues(out.getListIt() .getPartialList(start, number)); out.getListIt().close(); } } catch (GenericEntityException e) { log.error(e.getMessage(), e); } return entityList; } }
[ "yuri0x7c1@gmail.com" ]
yuri0x7c1@gmail.com
6ee4baf4bcc3a572d2df46da98158b7998256caa
ebfa108ed06a1a5aeb9ac6e75f05447a07adcf07
/src/pattern/structural/adapter/TestAdapter.java
baa6917b13bfc36231b7db5f884605402d9325df
[]
no_license
vishalsinha21/core-java-practice
05809166677d0daaec4a179d5b7ca51409043a3b
1e8c21dbc4aae45b40e424288cb0ea194d961767
refs/heads/master
2023-05-24T07:20:20.740673
2023-05-19T08:57:37
2023-05-19T08:57:37
85,199,242
0
0
null
2023-05-19T08:51:20
2017-03-16T13:30:40
Java
UTF-8
Java
false
false
467
java
package pattern.structural.adapter; public class TestAdapter { public static void main(String[] args) { Duck duck = new TurkeyAdapter(); duck.fly(); duck.quack(); Turkey turkey = new DuckAdapter(); turkey.fly(); turkey.gobble(); int i = 5; printInt(i); } public static void printInt(int i) { System.out.println("printing:: " + i); } }
[ "vishal.sinha21@gmail.com" ]
vishal.sinha21@gmail.com
119f4c5f836c9dbb79cd6d9ba9530706f66f43d8
a0cd546101594e679544d24f92ae8fcc17013142
/refactorit-core/src/test/misc/jacks/jls/expressions/array-creation-expressions/T1510it11.java
93525fc0291fdd5845de366cc508365ea4f1ec49
[]
no_license
svn2github/RefactorIT
f65198bb64f6c11e20d35ace5f9563d781b7fe5c
4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c
refs/heads/master
2021-01-10T03:09:28.310366
2008-09-18T10:17:56
2008-09-18T10:17:56
47,540,746
0
1
null
null
null
null
UTF-8
Java
false
false
142
java
public class T1510it11 { public static void main(String[] args) { int[][] iaa = new int[][] { 1 }; } }
[ "l950637@285b47d1-db48-0410-a9c5-fb61d244d46c" ]
l950637@285b47d1-db48-0410-a9c5-fb61d244d46c
159084f348a93978a4f56df63cb7769db52ad1a6
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/contract/app/ContractInvoiceReportFilterUIHandler.java
5b71d74578b49bed11c0a9fe3ec5a8f93b96b757
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
568
java
/** * output package name */ package com.kingdee.eas.fdc.contract.app; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.batchHandler.RequestContext; import com.kingdee.eas.framework.batchHandler.ResponseContext; /** * output class name */ public class ContractInvoiceReportFilterUIHandler extends AbstractContractInvoiceReportFilterUIHandler { protected void _handleInit(RequestContext request,ResponseContext response, Context context) throws Exception { super._handleInit(request,response,context); } }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
e97803b780d1361a62f8196cb3663b13fec3b1dc
22b9c697e549de334ac354dfc1d14223eff99121
/PaaS-SaaS_UIAccelerator/UIAcceleratorExtended/OSCProxyClient/src/com/oracle/ptsdemo/oscproxyclient/types/DeleteOpportunityLeadResponse.java
6e324bf0b0ccb3b9d81e1103984c692093224055
[ "BSD-3-Clause" ]
permissive
digideskio/oracle-cloud
50e0d24e937b3afc991ad9cb418aa2bb263a4372
80420e9516290e5d5bfd6c0fa2eaacbc11762ec7
refs/heads/master
2021-01-22T13:57:21.947497
2016-05-13T06:26:16
2016-05-13T06:26:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
860
java
package com.oracle.ptsdemo.oscproxyclient.types; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "deleteOpportunityLeadResponse") public class DeleteOpportunityLeadResponse { }
[ "shailendrapradhan@Shailendras-MacBook-Pro.local" ]
shailendrapradhan@Shailendras-MacBook-Pro.local
3ca485ce06ac6f47b8cae5e5244760f1e20e0aa0
d4f57e86855411799460b56c6577108ba2a893c4
/code/android/ETCB/app/src/main/java/club/crabglory/www/etcb/frags/chat/ChatGroupFragment.java
33923c421c49e4fe7e577664ddb15dba39f85686
[]
no_license
kevin-leak/ETBC
c2fab7bf267cadea9c8b8d3c45364f114e098194
46c4700df4187b860fbf8a998dd84f77fcc78ac3
refs/heads/master
2022-11-23T11:22:55.352239
2020-07-22T02:36:02
2020-07-22T02:36:02
200,263,256
2
2
null
null
null
null
UTF-8
Java
false
false
978
java
package club.crabglory.www.etcb.frags.chat; import android.view.View; import java.util.List; import club.crabglory.www.data.model.db.Group; import club.crabglory.www.data.model.db.GroupMember; import club.crabglory.www.etcb.R; import club.crabglory.www.factory.contract.ChatContract; public class ChatGroupFragment extends ChatFragment<Group> implements ChatContract.GroupView { @Override protected int getHeaderLayoutId() { return R.layout.hello; } @Override protected void initWidgets(View root) { super.initWidgets(root); } @Override public void onInit(Group group) { } @Override public void showAdminOption(boolean isAdmin) { } @Override public void onInitGroupMembers(List<GroupMember> members, long moreCount) { } /** * 初始化presenter,要求子类必须实现 */ @Override protected ChatContract.Presenter initPresent() { return null; } }
[ "956572845@qq.com" ]
956572845@qq.com
9bc4a25c212e534c25b2e2cc9684ed0a7ce3be16
17c30fed606a8b1c8f07f3befbef6ccc78288299
/P9_8_0_0/src/main/java/android/test/suitebuilder/AssignableFrom.java
1d1d1e11fe05773d306ead10ff27058010844026
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
367
java
package android.test.suitebuilder; import com.android.internal.util.Predicate; class AssignableFrom implements Predicate<TestMethod> { private final Class root; AssignableFrom(Class root) { this.root = root; } public boolean apply(TestMethod testMethod) { return this.root.isAssignableFrom(testMethod.getEnclosingClass()); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
54ed59bbc55e9177a725732d81961bf597ab67d7
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project258/src/test/java/org/gradle/test/performance/largejavamultiproject/project258/p1290/Test25811.java
e217474750f86f080271f57bfedd560bcb289777
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package org.gradle.test.performance.largejavamultiproject.project258.p1290; import org.junit.Test; import static org.junit.Assert.*; public class Test25811 { Production25811 objectUnderTest = new Production25811(); @Test public void testProperty0() { Production25808 value = new Production25808(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production25809 value = new Production25809(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production25810 value = new Production25810(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
19d149d9b00fef6f96d550cdeb41c05182754381
5ef0b4d230dc5243225d149efb44cdcdd2ffea9d
/trunk/play/src20110826r2/play/view/BranchViewPLAY.java
e713aec05c628d26aacdfce1ed7338dfb7384b85
[]
no_license
kai-zhu/the-teaching-machine-and-webwriter
3d3b3dfdecd61e0fb2146b44c42d6467489fd94f
67adf8f41bb475108c285eb0894906cb0878849c
refs/heads/master
2021-01-16T20:47:55.620437
2016-05-23T12:38:03
2016-05-23T12:38:12
61,149,759
1
0
null
2016-06-14T19:22:57
2016-06-14T19:22:57
null
UTF-8
Java
false
false
697
java
package play.view; import higraph.view.BranchView; import java.awt.Color; import java.awt.Stroke; import java.awt.geom.GeneralPath; import play.model.EdgePLAY; import play.model.EdgePayloadPLAY; import play.model.NodePLAY; import play.model.NodePayloadPLAY; import play.model.SubGraphPLAY; import play.model.WholeGraphPLAY; public class BranchViewPLAY extends BranchView<NodePayloadPLAY, EdgePayloadPLAY, WholeGraphPLAY, SubGraphPLAY, NodePLAY, EdgePLAY> { protected BranchViewPLAY(ViewFactoryPLAY vf, SubGraphViewPLAY view, NodeViewPLAY nv, Color c, Stroke s, GeneralPath p) { super(vf, view, nv, c, s, p); // TODO Auto-generated constructor stub } }
[ "theodore.norvell@gmail.com" ]
theodore.norvell@gmail.com
ad9f3bc5ab2ca9478a23fa1ce20e2e6b6a42c982
03538910e48d45f62b2ea4df02a29ba0b0f849e9
/src/main/java/com/everis/salamanca/service/util/RandomUtil.java
b92fb869a681d6b257c2a03c0af2658c49274e71
[]
no_license
thorpette/inssMonoliticInstaller
39aefcf2c6b2e6e770e32cf7e52255ba9dd9ad32
5d80558e42658e57cbc43d607195cacd017259d3
refs/heads/master
2022-12-24T15:58:04.535787
2019-11-18T09:12:37
2019-11-18T09:12:37
221,879,568
0
0
null
2022-12-16T04:41:51
2019-11-15T08:31:19
Java
UTF-8
Java
false
false
1,230
java
package com.everis.salamanca.service.util; import org.apache.commons.lang3.RandomStringUtils; import java.security.SecureRandom; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private static final SecureRandom SECURE_RANDOM; static { SECURE_RANDOM = new SecureRandom(); SECURE_RANDOM.nextBytes(new byte[64]); } private RandomUtil() { } private static String generateRandomAlphanumericString() { return RandomStringUtils.random(DEF_COUNT, 0, 0, true, true, null, SECURE_RANDOM); } /** * Generate a password. * * @return the generated password. */ public static String generatePassword() { return generateRandomAlphanumericString(); } /** * Generate an activation key. * * @return the generated activation key. */ public static String generateActivationKey() { return generateRandomAlphanumericString(); } /** * Generate a reset key. * * @return the generated reset key. */ public static String generateResetKey() { return generateRandomAlphanumericString(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
19e4ed8216aefdb029217af64e0d943bf7d242ff
94be114d4f9824ff29b0a3be7114f6f4bf66e187
/src/net/opengis/www/gml/_3_2/impl/LinearRingTypeImpl.java
12c8b4590312704d728478ace1a8cbe84e666e19
[]
no_license
CSTARS/uicds
590b120eb3dcc24a2b73986bd32018e919c4af6a
b4095b7a33cc8af6e8a1b40ab8e83fc280d2d31a
refs/heads/master
2016-09-11T12:58:01.097476
2013-05-09T22:42:38
2013-05-09T22:42:38
9,942,515
0
1
null
null
null
null
UTF-8
Java
false
false
4,081
java
/* * XML Type: LinearRingType * Namespace: http://www.opengis.net/gml/3.2 * Java type: net.opengis.www.gml._3_2.LinearRingType * * Automatically generated - do not modify. */ package net.opengis.www.gml._3_2.impl; /** * An XML LinearRingType(@http://www.opengis.net/gml/3.2). * * This is a complex type. */ public class LinearRingTypeImpl extends net.opengis.www.gml._3_2.impl.AbstractRingTypeImpl implements net.opengis.www.gml._3_2.LinearRingType { public LinearRingTypeImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName POS$0 = new javax.xml.namespace.QName("http://www.opengis.net/gml/3.2", "pos"); /** * Gets array of all "pos" elements */ public net.opengis.www.gml._3_2.DirectPositionType[] getPosArray() { synchronized (monitor()) { check_orphaned(); java.util.List targetList = new java.util.ArrayList(); get_store().find_all_element_users(POS$0, targetList); net.opengis.www.gml._3_2.DirectPositionType[] result = new net.opengis.www.gml._3_2.DirectPositionType[targetList.size()]; targetList.toArray(result); return result; } } /** * Gets ith "pos" element */ public net.opengis.www.gml._3_2.DirectPositionType getPosArray(int i) { synchronized (monitor()) { check_orphaned(); net.opengis.www.gml._3_2.DirectPositionType target = null; target = (net.opengis.www.gml._3_2.DirectPositionType)get_store().find_element_user(POS$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } return target; } } /** * Returns number of "pos" element */ public int sizeOfPosArray() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(POS$0); } } /** * Sets array of all "pos" element */ public void setPosArray(net.opengis.www.gml._3_2.DirectPositionType[] posArray) { synchronized (monitor()) { check_orphaned(); arraySetterHelper(posArray, POS$0); } } /** * Sets ith "pos" element */ public void setPosArray(int i, net.opengis.www.gml._3_2.DirectPositionType pos) { synchronized (monitor()) { check_orphaned(); net.opengis.www.gml._3_2.DirectPositionType target = null; target = (net.opengis.www.gml._3_2.DirectPositionType)get_store().find_element_user(POS$0, i); if (target == null) { throw new IndexOutOfBoundsException(); } target.set(pos); } } /** * Inserts and returns a new empty value (as xml) as the ith "pos" element */ public net.opengis.www.gml._3_2.DirectPositionType insertNewPos(int i) { synchronized (monitor()) { check_orphaned(); net.opengis.www.gml._3_2.DirectPositionType target = null; target = (net.opengis.www.gml._3_2.DirectPositionType)get_store().insert_element_user(POS$0, i); return target; } } /** * Appends and returns a new empty value (as xml) as the last "pos" element */ public net.opengis.www.gml._3_2.DirectPositionType addNewPos() { synchronized (monitor()) { check_orphaned(); net.opengis.www.gml._3_2.DirectPositionType target = null; target = (net.opengis.www.gml._3_2.DirectPositionType)get_store().add_element_user(POS$0); return target; } } /** * Removes the ith "pos" element */ public void removePos(int i) { synchronized (monitor()) { check_orphaned(); get_store().remove_element(POS$0, i); } } }
[ "jrmerz@gmail.com" ]
jrmerz@gmail.com
64328935eb43b827aafa751fc6fbd6e8274bdad0
313fde4adb3d77bb35c873bbfeecb3dce39a553b
/app/src/main/java/com/qgyyzs/globalcosmetics/utils/IndexBar/helper/IIndexBarDataHelper.java
1f1db19d61246d1c9e7153fd55636a2f37620070
[]
no_license
wangbo666/hzp
b41d37b63a90b7f83bb560b42dea8506619ce44a
ce75f47e36946c57d0ffd0a884f834e62be8bc15
refs/heads/master
2021-03-12T04:53:19.598350
2020-03-13T08:16:49
2020-03-13T08:16:49
246,590,994
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
package com.qgyyzs.globalcosmetics.utils.IndexBar.helper; import com.qgyyzs.globalcosmetics.utils.IndexBar.bean.BaseIndexPinyinBean; import java.util.List; /** * 介绍:IndexBar 的 数据相关帮助类 * 1 将汉语转成拼音 * 2 填充indexTag * 3 排序源数据源 * 4 根据排序后的源数据源->indexBar的数据源 * 作者:zhangxutong * 邮箱:mcxtzhang@163.com * 主页:http://blog.csdn.net/zxt0601 * 时间: 2016/11/28. */ public interface IIndexBarDataHelper { //汉语-》拼音 IIndexBarDataHelper convert(List<? extends BaseIndexPinyinBean> data); //拼音->tag IIndexBarDataHelper fillInexTag(List<? extends BaseIndexPinyinBean> data); //对源数据进行排序(RecyclerView) IIndexBarDataHelper sortSourceDatas(List<? extends BaseIndexPinyinBean> datas); //对IndexBar的数据源进行排序(右侧栏),在 sortSourceDatas 方法后调用 IIndexBarDataHelper getSortedIndexDatas(List<? extends BaseIndexPinyinBean> sourceDatas, List<String> datas); }
[ "1052291325@qq.com" ]
1052291325@qq.com
c6b0e79b977fe117bcd1f9d2713304514f92081f
7474fb283980452a24e3a961f9ea21edf2abb5e3
/ecps-ssm/src/main/java/com/ecps/ssm/controller/OrderController.java
ff5c3c648af022f65a7bc1396f5f691208284d7c
[]
no_license
liudongdong0909/ecps
e6ce717c15833cbd3162cbdab2ea201856af6edc
1bed34bc8b80cbe37476b54057748d175a3c4a27
refs/heads/master
2020-03-18T19:40:18.231633
2018-05-28T13:48:04
2018-05-28T13:48:04
58,317,499
0
0
null
null
null
null
UTF-8
Java
false
false
2,078
java
package com.ecps.ssm.controller; import com.ecps.ssm.common.EasyUIResult; import com.ecps.ssm.pojo.TbOrder; import com.ecps.ssm.service.OrderService; import com.github.pagehelper.PageInfo; import com.wordnik.swagger.annotations.Api; import com.wordnik.swagger.annotations.ApiImplicitParam; import com.wordnik.swagger.annotations.ApiImplicitParams; import com.wordnik.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** * 订单管理controller * * @author IT_donggua * @version V1.0 * @create 2017-02-17 下午 02:34 */ @RestController @RequestMapping("order") @Api(value = "order", description = "订单管理") public class OrderController { private Logger logger = LoggerFactory.getLogger(OrderController.class); @Autowired private OrderService orderService; @RequestMapping(value = "list", method = RequestMethod.GET) @ApiOperation(value = "订单列表查询", notes = "返回分页结果", httpMethod = "GET", produces = "application/json") @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "起始页", dataType = "int", defaultValue = "1", required = true, paramType = "query"), @ApiImplicitParam(name = "rows", value = "每页显示数目", dataType = "int", defaultValue = "10", required = true, paramType = "query") }) public EasyUIResult queryOrderList(@RequestParam(value = "page",defaultValue= "1") Integer page, @RequestParam(value = "rows", defaultValue = "10")Integer rows){ TbOrder order = new TbOrder(); PageInfo<TbOrder> pageInfo = orderService.queryPageListByWhere(order, page, rows); return new EasyUIResult(pageInfo.getTotal(), pageInfo.getList()); } }
[ "liudongdong0909@yeah.net" ]
liudongdong0909@yeah.net
558228be30f9eb5f1906408b211aade9de8742b6
629160464391e49b3af137e5f25d493ef1bffb95
/src/com/jetcms/cms/dao/main/impl/UserHighRoleDaoImpl.java
a57eccee515aa8246d362d43ebabfd999f03d39c
[]
no_license
barrycom/jeecm
4cdbc7948da7c2421715c712bc4e2cb37ba7da16
240cca20f012af1f6bb6fbc3d579eef6833013bc
refs/heads/master
2021-07-05T22:09:11.715696
2017-09-29T03:16:47
2017-09-29T03:16:47
104,954,760
0
2
null
null
null
null
UTF-8
Java
false
false
1,365
java
package com.jetcms.cms.dao.main.impl; import com.jetcms.cms.dao.main.ContentTypeDao; import com.jetcms.cms.dao.main.UserHighRoleDao; import com.jetcms.cms.entity.main.ContentRecord; import com.jetcms.cms.entity.main.ContentType; import com.jetcms.cms.entity.main.UserHighRole; import com.jetcms.common.hibernate4.Finder; import com.jetcms.common.hibernate4.HibernateBaseDao; import com.jetcms.core.entity.CmsRole; import org.springframework.stereotype.Repository; import java.util.List; /** * Created by Administrator on 2017-9-28. */ @Repository public class UserHighRoleDaoImpl extends HibernateBaseDao<UserHighRole, Integer> implements UserHighRoleDao { @Override protected Class<UserHighRole> getEntityClass() { return UserHighRole.class; } public UserHighRole save(UserHighRole bean) { getSession().save(bean); return bean; } @Override public UserHighRole findById(Integer id) { get(id); UserHighRole entity = get(id); return entity; } @Override public List<UserHighRole> getListByHighRole(Integer highRole) { String hql=" select bean from UserHighRole bean where bean.highRole=:highRole"; Finder f=Finder.create(hql).setParam("highRole", highRole); f.setCacheable(true); List<UserHighRole>list=find(f); return list; } }
[ "whlitiger_yp@163.com" ]
whlitiger_yp@163.com
8b1bc63191fb0296375ef06dcbd2a9c3d6347386
59d56ad52a7e016883b56b73761104a17833a453
/src/main/java/com/whatever/NewsService/ObjectFactory.java
f97bfd67a6df8ceee460bdf8c546e46dd63ea24c
[]
no_license
zapho/cxf-client-quarkus
3c330a3a5f370cce21c5cd1477ffbe274d1bba59
6e147d44b9ea9cc455d52f0efe234ef787b336c4
refs/heads/master
2023-01-22T03:33:27.579072
2020-12-08T14:55:27
2020-12-08T14:55:27
319,641,033
0
0
null
null
null
null
UTF-8
Java
false
false
3,939
java
package com.whatever.NewsService; import javax.xml.bind.annotation.XmlRegistry; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the com.whatever.NewsService package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.whatever.NewsService * */ public ObjectFactory() { } /** * Create an instance of {@link SearchNewsByProductIdResponse } * */ public SearchNewsByProductIdResponse createSearchNewsByProductIdResponse() { return new SearchNewsByProductIdResponse(); } /** * Create an instance of {@link ArrayOfNews } * */ public ArrayOfNews createArrayOfNews() { return new ArrayOfNews(); } /** * Create an instance of {@link SearchNewsByMoleculeId } * */ public SearchNewsByMoleculeId createSearchNewsByMoleculeId() { return new SearchNewsByMoleculeId(); } /** * Create an instance of {@link SearchNewsResponse } * */ public SearchNewsResponse createSearchNewsResponse() { return new SearchNewsResponse(); } /** * Create an instance of {@link SearchNewsById } * */ public SearchNewsById createSearchNewsById() { return new SearchNewsById(); } /** * Create an instance of {@link SearchNewsByIdResponse } * */ public SearchNewsByIdResponse createSearchNewsByIdResponse() { return new SearchNewsByIdResponse(); } /** * Create an instance of {@link News } * */ public News createNews() { return new News(); } /** * Create an instance of {@link SearchNewsByMoleculeIdResponse } * */ public SearchNewsByMoleculeIdResponse createSearchNewsByMoleculeIdResponse() { return new SearchNewsByMoleculeIdResponse(); } /** * Create an instance of {@link SearchNewsByProductId } * */ public SearchNewsByProductId createSearchNewsByProductId() { return new SearchNewsByProductId(); } /** * Create an instance of {@link SearchNews } * */ public SearchNews createSearchNews() { return new SearchNews(); } /** * Create an instance of {@link ArrayOfInt } * */ public ArrayOfInt createArrayOfInt() { return new ArrayOfInt(); } /** * Create an instance of {@link ArrayOfProfile } * */ public ArrayOfProfile createArrayOfProfile() { return new ArrayOfProfile(); } /** * Create an instance of {@link NewsContent } * */ public NewsContent createNewsContent() { return new NewsContent(); } /** * Create an instance of {@link NewCategory } * */ public NewCategory createNewCategory() { return new NewCategory(); } /** * Create an instance of {@link ArrayOfNewCategory } * */ public ArrayOfNewCategory createArrayOfNewCategory() { return new ArrayOfNewCategory(); } /** * Create an instance of {@link NewsLink } * */ public NewsLink createNewsLink() { return new NewsLink(); } /** * Create an instance of {@link ArrayOfNewsLink } * */ public ArrayOfNewsLink createArrayOfNewsLink() { return new ArrayOfNewsLink(); } }
[ "fabrice.aupert@dedalus-group.com" ]
fabrice.aupert@dedalus-group.com
9942b8e570540e3a7c744d3493b6933c2f79181d
24bc4990e9d0bef6a42a6f86dc783785b10dbd42
/content/public/android/java/src/org/chromium/content_public/browser/StylusWritingHandler.java
5ddca0f77e2c5f0f2dce0d53fb1bcd17592c2fa9
[ "BSD-3-Clause" ]
permissive
nwjs/chromium.src
7736ce86a9a0b810449a3b80a4af15de9ef9115d
454f26d09b2f6204c096b47f778705eab1e3ba46
refs/heads/nw75
2023-08-31T08:01:39.796085
2023-04-19T17:25:53
2023-04-19T17:25:53
50,512,158
161
201
BSD-3-Clause
2023-05-08T03:19:09
2016-01-27T14:17:03
null
UTF-8
Java
false
false
3,469
java
// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.content_public.browser; import android.content.Context; import android.graphics.Point; import android.graphics.Rect; import android.view.MotionEvent; import android.view.View; import android.view.inputmethod.EditorInfo; /** * Interface that provides Stylus handwriting to text input functionality in HTML edit fields. This * is implemented by a corresponding Stylus writing class that would handle the events and messages * in this interface outside of //content (i.e. //components/stylus_handwriting) and these are * called from the current WebContents related classes in //content. */ public interface StylusWritingHandler { /** * @return true if soft keyboard can be shown during stylus writing. */ boolean canShowSoftKeyboard(); /** * Requests to start stylus writing for input field in web page. * * @return true if writing can be started or if started successfully, false if writing cannot * be started. */ boolean requestStartStylusWriting(StylusWritingImeCallback imeCallback); /** * Update current input state parameters to stylus writing system. * @param text the input text * @param selectionStart the input selection start offset * @param selectionEnd the input selection end offset */ default void updateInputState(String text, int selectionStart, int selectionEnd) {} /** * Notify focused node has changed in web page. * * @param editableBounds the Editable element bounds Rect in pix * @param isEditable is true if focused node is of editable type. * @param currentView the {@link View} in which the focused node changed. */ default void onFocusedNodeChanged(Rect editableBounds, boolean isEditable, View currentView) {} /** * Handle touch events if needed for stylus writing. * * @param event {@link MotionEvent} to be handled. * @param currentView the {@link View} which is receiving the events. * @return true if event is consumed by stylus writing system. */ default boolean handleTouchEvent(MotionEvent event, View currentView) { return false; } /** * Handle hover events for Direct writing. * * @param event {@link MotionEvent} to be handled. * @param currentView the {@link View} which is receiving the events. */ default void handleHoverEvent(MotionEvent event, View currentView) {} /** * Update the editor attributes corresponding to current input. * * @param editorInfo {@link EditorInfo} object */ default void updateEditorInfo(EditorInfo editorInfo) {} /** * Notify the view is detached from window. * * @param context the current context */ default void onDetachedFromWindow(Context context) {} /** * Notify current view focus has changed * * @param hasFocus whether view gained or lost focus */ default void onFocusChanged(boolean hasFocus) {} /** * This message is sent when the stylus writable element has been focused. * @param focusedEditBounds the input field bounds in view * @param cursorPosition the input cursor Position point in pix */ void onEditElementFocusedForStylusWriting(Rect focusedEditBounds, Point cursorPosition); }
[ "roger@nwjs.io" ]
roger@nwjs.io
d0ab5a2fb754b78220443ce8cd6732479bf791f0
d3fa8ded9d393ba9b03388ba7f05fc559cf31d1e
/Codes/server/web/impl/src/main/java/uyun/bat/web/impl/common/service/ext/AuthFilter.java
1031a0887251d318ea94d26623d1aa27b7991732
[]
no_license
lengxu/YouYun
e20c4d8f553ccb245e96de177a67f776666e986f
b0ad8fd0b0e70dd2445cecb9ae7b00f7e0a20815
refs/heads/master
2020-09-13T22:30:49.642980
2017-11-27T03:13:34
2017-11-27T03:13:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,147
java
package uyun.bat.web.impl.common.service.ext; import uyun.bat.web.api.common.error.RESTError; import uyun.bat.web.impl.common.entity.TenantConstants; import uyun.bat.web.impl.common.service.ServiceManager; import javax.annotation.Priority; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.core.Cookie; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * ContainerRequestFilter-->ClientRequestFilter-->Readerinterceptor--> * Writerinterceptor * * @Priority(2000)-->@Priority(1000) * @Priority(Priorities.HEADER_DECORATOR) */ @Priority(1000) public class AuthFilter implements ContainerRequestFilter { public void filter(ContainerRequestContext requestContext) throws IOException { // TODO 权限验证 boolean unAuthorized = true; Map<String, Cookie> cookieMap = requestContext.getCookies(); if (cookieMap != null) { Cookie token = cookieMap.get(TenantConstants.COOKIE_TOKEN); if (token != null) { Map<String, Object> userInfo = ServiceManager.getInstance().getUserService().verify(token.getValue()); //测试使用 /*Map<String, Object> userInfo = new HashMap<String,Object>(); userInfo.put("tenantId", "ba1c5f3233384ce5abda4b61d95d39f4"); userInfo.put("userId", "ba1c5f3233384ce5abda4b61d95d39f4");*/ if (userInfo != null && userInfo.size() > 0){ unAuthorized = false; requestContext.getHeaders().add(TenantConstants.COOKIE_TENANT_ID, (String)userInfo.get("tenantId")); requestContext.getHeaders().add(TenantConstants.COOKIE_USERID, (String)userInfo.get("userId")); } } } //测试使用 //unAuthorized=false; if (unAuthorized) { // TODO 暂缺规范错误 RESTError respContent = new RESTError(Response.Status.UNAUTHORIZED.getStatusCode() + "", Response.Status.UNAUTHORIZED.getReasonPhrase()); Response response = Response.ok(respContent).status(Response.Status.UNAUTHORIZED) .type(MediaType.APPLICATION_JSON).build(); requestContext.abortWith(response); } } }
[ "smartbrandnew@163.com" ]
smartbrandnew@163.com
02569bcd079da556424534a4a50d2107cf543545
35348f6624d46a1941ea7e286af37bb794bee5b7
/Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/space/DBTraceDelegatingManager.java
9753435af0235e18b73a62881fa96806fc932106
[ "Apache-2.0", "GPL-1.0-or-later", "GPL-3.0-only", "LicenseRef-scancode-public-domain", "LGPL-2.1-only", "LicenseRef-scancode-unknown-license-reference" ]
permissive
StarCrossPortal/ghidracraft
7af6257c63a2bb7684e4c2ad763a6ada23297fa3
a960e81ff6144ec8834e187f5097dfcf64758e18
refs/heads/master
2023-08-23T20:17:26.250961
2021-10-22T00:53:49
2021-10-22T00:53:49
359,644,138
80
19
Apache-2.0
2021-10-20T03:59:55
2021-04-20T01:14:29
Java
UTF-8
Java
false
false
7,093
java
/* ### * IP: GHIDRA * * 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 ghidra.trace.database.space; import java.util.*; import java.util.concurrent.locks.Lock; import java.util.function.*; import generic.NestedIterator; import ghidra.program.model.address.*; import ghidra.util.LockHold; public interface DBTraceDelegatingManager<M> { interface ExcFunction<T, R, E extends Throwable> { R apply(T t) throws E; } interface ExcConsumer<T, E extends Throwable> { void accept(T t) throws E; } interface ExcSupplier<T, E extends Throwable> { T get() throws E; } interface ExcPredicate<T, E extends Throwable> { boolean test(T t) throws E; } default void checkIsInMemory(AddressSpace space) { if (!space.isMemorySpace()) { throw new IllegalArgumentException("Address must be in memory"); } } default <T, E extends Throwable> T delegateWrite(AddressSpace space, ExcFunction<M, T, E> func) throws E { checkIsInMemory(space); try (LockHold hold = LockHold.lock(writeLock())) { M m = getForSpace(space, true); return func.apply(m); } } default <E extends Throwable> void delegateWriteV(AddressSpace space, ExcConsumer<M, E> func) throws E { checkIsInMemory(space); try (LockHold hold = LockHold.lock(writeLock())) { M m = getForSpace(space, true); func.accept(m); } } default int delegateWriteI(AddressSpace space, ToIntFunction<M> func) { checkIsInMemory(space); try (LockHold hold = LockHold.lock(writeLock())) { M m = getForSpace(space, true); return func.applyAsInt(m); } } default <E extends Throwable> void delegateWriteAll(Iterable<M> spaces, ExcConsumer<M, E> func) throws E { try (LockHold hold = LockHold.lock(writeLock())) { for (M m : spaces) { func.accept(m); } } } default <T, E extends Throwable> T delegateRead(AddressSpace space, ExcFunction<M, T, E> func) throws E { return delegateRead(space, func, (T) null); } default <T, E extends Throwable> T delegateRead(AddressSpace space, ExcFunction<M, T, E> func, T ifNull) throws E { checkIsInMemory(space); try (LockHold hold = LockHold.lock(readLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull; } return func.apply(m); } } default <T, E extends Throwable> T delegateReadOr(AddressSpace space, ExcFunction<M, T, E> func, ExcSupplier<T, E> ifNull) throws E { checkIsInMemory(space); try (LockHold hold = LockHold.lock(readLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull.get(); } return func.apply(m); } } default int delegateReadI(AddressSpace space, ToIntFunction<M> func, int ifNull) { checkIsInMemory(space); try (LockHold hold = LockHold.lock(readLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull; } return func.applyAsInt(m); } } default int delegateReadI(AddressSpace space, ToIntFunction<M> func, IntSupplier ifNull) { checkIsInMemory(space); try (LockHold hold = LockHold.lock(readLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull.getAsInt(); } return func.applyAsInt(m); } } default boolean delegateReadB(AddressSpace space, Predicate<M> func, boolean ifNull) { checkIsInMemory(space); try (LockHold hold = LockHold.lock(readLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull; } return func.test(m); } } default <E extends Throwable> void delegateDeleteV(AddressSpace space, ExcConsumer<M, E> func) throws E { checkIsInMemory(space); try (LockHold hold = LockHold.lock(writeLock())) { M m = getForSpace(space, false); if (m == null) { return; } func.accept(m); } } default boolean delegateDeleteB(AddressSpace space, Predicate<M> func, boolean ifNull) { checkIsInMemory(space); try (LockHold hold = LockHold.lock(writeLock())) { M m = getForSpace(space, false); if (m == null) { return ifNull; } return func.test(m); } } default <T> T delegateFirst(Iterable<M> spaces, Function<M, T> func) { try (LockHold hold = LockHold.lock(readLock())) { for (M m : spaces) { T t = func.apply(m); if (t != null) { return t; } } return null; } } /** * Compose a collection, lazily, from collections returned by delegates * * @param spaces the delegates * @param func a collection getter for each delegate * @return the lazy catenated collection */ default <T> Collection<T> delegateCollection(Iterable<M> spaces, Function<M, Collection<T>> func) { return new AbstractCollection<>() { @Override public Iterator<T> iterator() { return NestedIterator.start(spaces.iterator(), func.andThen(Iterable::iterator)); } @Override public int size() { try (LockHold hold = LockHold.lock(readLock())) { int sum = 0; for (M m : spaces) { sum += func.apply(m).size(); } return sum; } } public boolean isEmpty() { try (LockHold hold = LockHold.lock(readLock())) { for (M m : spaces) { if (!func.apply(m).isEmpty()) { return false; } } return true; } } }; } /** * Compose a set, immediately, from collections returned by delegates * * @param spaces the delegates * @param func a collection (usually a set) getter for each delegate * @return the unioned results */ default <T> HashSet<T> delegateHashSet(Iterable<M> spaces, Function<M, Collection<T>> func) { try (LockHold hold = LockHold.lock(readLock())) { HashSet<T> result = new HashSet<>(); for (M m : spaces) { result.addAll(func.apply(m)); } return result; } } /** * Compose an address set, immediately, from address sets returned by delegates * * @param spaces the delegates * @param func an address set getter for each delegate * @return the unioned results */ default <E extends Throwable> AddressSetView delegateAddressSet( Iterable<M> spaces, ExcFunction<M, AddressSetView, E> func) throws E { try (LockHold hold = LockHold.lock(readLock())) { AddressSet result = new AddressSet(); for (M m : spaces) { result.add(func.apply(m)); } return result; } } default <E extends Throwable> boolean delegateAny(Iterable<M> spaces, ExcPredicate<M, E> func) throws E { try (LockHold hold = LockHold.lock(readLock())) { for (M m : spaces) { if (func.test(m)) { return true; } } return false; } } Lock readLock(); Lock writeLock(); M getForSpace(AddressSpace space, boolean createIfAbsent); }
[ "46821332+nsadeveloper789@users.noreply.github.com" ]
46821332+nsadeveloper789@users.noreply.github.com
279b007fadb0da812c83a4c28ef2e95a3edaba7a
00aca547db8e8c19053308612f18afa0db31d99b
/lanxum/SMSB_20140527_2014_MAY17/src/com/ttsoft/bjtax/smsb/gdzys/cx/web/SycxAction.java
c0990ab9da1dadb465089efe5bb0cc68ff3d60d1
[]
no_license
jun33199/Study
6809c178b894d5e42a73f2f6dd964f6bed862b2a
cd8b1709716907448a3269264be8ebd455ed5298
refs/heads/master
2021-01-01T19:10:34.768352
2015-12-25T08:13:47
2015-12-25T08:13:47
25,185,940
2
1
null
null
null
null
GB18030
Java
false
false
7,710
java
package com.ttsoft.bjtax.smsb.gdzys.cx.web; import java.io.IOException; import java.io.PrintWriter; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import com.ttsoft.bjtax.sfgl.common.action.SmsbAction; import com.ttsoft.bjtax.smsb.constant.CodeConstant; import com.ttsoft.bjtax.smsb.model.client.swdwmodel; import com.ttsoft.bjtax.smsb.proxy.ZhsbProxy; import com.ttsoft.framework.exception.BaseException; import com.ttsoft.framework.exception.ExceptionUtil; import com.ttsoft.framework.util.VOPackage; public class SycxAction extends SmsbAction{ /** * 公共的前置处理方法,每次进入页面都会被调用<BR> * 设置页面显示时使用的导航信息和标题 * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param httpServletRequest The HTTP request we are processing * @param response The HTTP response we are creating */ protected void initialRequest(ActionMapping mapping, ActionForm actionForm, HttpServletRequest httpServletRequest, HttpServletResponse response) { super.initialRequest(mapping, actionForm, httpServletRequest, response); httpServletRequest.setAttribute(CodeConstant.SMSB_HEADER_POSITION, "<font color=\"#A4B9C6\">耕地资源占用税系统</font>&gt;<font color=\"#7C9AAB\">税源查询 </font>"); httpServletRequest.setAttribute(CodeConstant.SMSB_HEADER_TITLE, "税源查询"); httpServletRequest.setAttribute(CodeConstant.SMSB_HEADER_HELP, "help/smsb/zhsb/zhsb-000.htm"); } /*------------------------------------------------------------------------------------------------------------------------------*/ /** * <1>查询页面展示 * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param httpServletRequest The HTTP request we are processing * @param response The HTTP response we are creating * @return * @throws BaseException */ public ActionForward doShow( ActionMapping actionMapping, ActionForm actionFormForm, HttpServletRequest request, HttpServletResponse response) throws BaseException { SycxForm sycxForm = (SycxForm) actionFormForm; //数据处理-查询分局信息 sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_DQJSLIST,request); //如果分局列表只有一条还应该取得默认税务所列表 List fjList = sycxForm.getFjlist(); if(fjList.size()==1) { sycxForm.setFjdm(((swdwmodel)fjList.get(0)).getSwdwid()); sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_CXDQJSLIST,request); } //JSP取来流程控制 request.setAttribute("sycxForm", sycxForm); return actionMapping.findForward("Show"); } /** * <2>查询可以展示的税务所列表 * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param httpServletRequest The HTTP request we are processing * @param response The HTTP response we are creating * @return * @throws BaseException */ public ActionForward doQuerysws( ActionMapping actionMapping, ActionForm actionFormForm, HttpServletRequest request, HttpServletResponse response) throws BaseException { SycxForm sycxForm = (SycxForm) actionFormForm; //数据处理-查询税务所信息 sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_CXDQJSLIST,request); //添加回送xml response.setContentType("text/xml;charset=GB2312"); response.setHeader("Cache-Control", "no-cache"); PrintWriter responseOut = null; try { responseOut = response.getWriter(); } catch (IOException e) { e.printStackTrace(); } //税务所列表 List swsList = sycxForm.getSwslist(); responseOut.write("<?xml version='1.0' encoding='GB2312' ?>"); responseOut.write("<mb>"); for (int i = 0; i < swsList.size(); i++) { swdwmodel v = (swdwmodel) swsList.get(i); responseOut.write("<swsid>" + v.getSwdwid() + "</swsid>"); responseOut.write("<swsmc>" + v.getSwdwmc() + "</swsmc>"); } responseOut.write("</mb>"); responseOut.close(); return null; } /** * <3>查询信息列表 * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param httpServletRequest The HTTP request we are processing * @param response The HTTP response we are creating * @return * @throws BaseException */ public ActionForward doQueryinf( ActionMapping actionMapping, ActionForm actionFormForm, HttpServletRequest request, HttpServletResponse response) throws BaseException { SycxForm sycxForm = (SycxForm) actionFormForm; //获取分局 sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_DQJSLIST,request); //如果分局列表只有一条 或者已有原条件还应该取得默认税务所列表 List fjList = sycxForm.getFjlist(); if(fjList.size()==1 || (sycxForm.getFjdm()!=null && !"".equals(sycxForm.getFjdm()))) { if(fjList.size()==1) { sycxForm.setFjdm(((swdwmodel)fjList.get(0)).getSwdwid()); } sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_CXDQJSLIST,request); } //数据处理-查询信息列表 sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_QUERYACTION,request); //JSP取来流程控制 request.setAttribute("sycxForm", sycxForm); return actionMapping.findForward("QueryList"); } /** * <4>查询信息详情 * @param mapping The ActionMapping used to select this instance * @param actionForm The optional ActionForm bean for this request (if any) * @param httpServletRequest The HTTP request we are processing * @param response The HTTP response we are creating * @return * @throws BaseException */ public ActionForward doQueryinfxx( ActionMapping actionMapping, ActionForm actionFormForm, HttpServletRequest request, HttpServletResponse response) throws BaseException { SycxForm sycxForm = (SycxForm) actionFormForm; //数据处理-查询税务所信息 sycxForm = sendVO(sycxForm ,CodeConstant.SMSB_QUERYA_DETATILACTION,request); //JSP取来流程控制 request.setAttribute("sycxForm", sycxForm); return actionMapping.findForward("QueryDetail"); } /*-----------------------------------------功能处理函数----------------------------------------------------------*/ /** * 发送逻辑处理函数 * @param data * @return * @throws BaseException */ private SycxForm sendVO(Object data ,int actionName ,HttpServletRequest request) throws BaseException { //封装数据信息 VOPackage vo = new VOPackage(); vo.setData(data); vo.setUserData(this.getUserData(request)); vo.setAction(actionName); vo.setProcessor("com.ttsoft.bjtax.smsb.gdzys.cx.processor.SycxProcessor"); //传输要处理数据 try { return (SycxForm)ZhsbProxy.getInstance().process(vo); } catch (Exception e) { e.printStackTrace(); throw ExceptionUtil.getBaseException(e, "数据处理异常"); } } }
[ "junzhang@weizhu.dev" ]
junzhang@weizhu.dev
7029f3b0439ec9dadd83139894f0f55aeb4005e0
1302a788aa73d8da772c6431b083ddd76eef937f
/WORKING_DIRECTORY/hardware/bsp/intel/peripheral/libupm/examples/java/MMA7455Sample.java
98532e3b1bfb9082f07e3caa98a6f3fe600e5267
[ "MIT" ]
permissive
rockduan/androidN-android-7.1.1_r28
b3c1bcb734225aa7813ab70639af60c06d658bf6
10bab435cd61ffa2e93a20c082624954c757999d
refs/heads/master
2021-01-23T03:54:32.510867
2017-03-30T07:17:08
2017-03-30T07:17:08
86,135,431
2
1
null
null
null
null
UTF-8
Java
false
false
1,769
java
/* * Author: Stefan Andritoiu <stefan.andritoiu@intel.com> * Copyright (c) 2015 Intel Corporation. * * 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. */ //NOT TESTED!!! public class MMA7455Sample { static { try { System.loadLibrary("javaupm_mma7455"); } catch (UnsatisfiedLinkError e) { System.err.println("error in loading native library"); System.exit(-1); } } public static void main(String[] args) throws InterruptedException { // ! [Interesting] upm_mma7455.MMA7455 sensor = new upm_mma7455.MMA7455(0); short[] val; while (true) { val = sensor.readData(); System.out.println("Accelerometer X: " + val[0] + ", Y: " + val[1] + ", Z: " + val[2]); Thread.sleep(1000); } // ! [Interesting] } }
[ "duanliangsilence@gmail.com" ]
duanliangsilence@gmail.com
2a05493474e61760e660a4068fe8ee4dda5d93a4
99e44fc1db97c67c7ae8bde1c76d4612636a2319
/app/src/main/java/com/android/gallery3d/app/Wallpaper.java
55ed4979297f06733295291f390dec9593979cea
[ "MIT" ]
permissive
wossoneri/AOSPGallery4AS
add7c34b2901e3650d9b8518a02dd5953ba48cef
0be2c89f87e3d5bd0071036fe89d0a1d0d9db6df
refs/heads/master
2022-03-21T04:42:57.965745
2022-02-23T08:44:51
2022-02-23T08:44:51
113,425,141
3
2
MIT
2022-02-23T08:44:52
2017-12-07T08:45:41
Java
UTF-8
Java
false
false
5,888
java
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.gallery3d.app; import android.annotation.TargetApi; import android.app.Activity; import android.app.WallpaperManager; import android.content.ActivityNotFoundException; import android.content.Intent; import android.graphics.Point; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.view.Display; import com.android.libs.gallerycommon.common.ApiHelper; import com.android.gallery3d.filtershow.crop.CropActivity; import com.android.gallery3d.filtershow.crop.CropExtras; import java.lang.IllegalArgumentException; /** * Wallpaper picker for the gallery application. This just redirects to the * standard pick action. */ public class Wallpaper extends Activity { @SuppressWarnings("unused") private static final String TAG = "Wallpaper"; private static final String IMAGE_TYPE = "image/*"; private static final String KEY_STATE = "activity-state"; private static final String KEY_PICKED_ITEM = "picked-item"; private static final int STATE_INIT = 0; private static final int STATE_PHOTO_PICKED = 1; private int mState = STATE_INIT; private Uri mPickedItem; @Override protected void onCreate(Bundle bundle) { super.onCreate(bundle); if (bundle != null) { mState = bundle.getInt(KEY_STATE); mPickedItem = (Uri) bundle.getParcelable(KEY_PICKED_ITEM); } } @Override protected void onSaveInstanceState(Bundle saveState) { saveState.putInt(KEY_STATE, mState); if (mPickedItem != null) { saveState.putParcelable(KEY_PICKED_ITEM, mPickedItem); } } @SuppressWarnings("deprecation") @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) private Point getDefaultDisplaySize(Point size) { Display d = getWindowManager().getDefaultDisplay(); if (Build.VERSION.SDK_INT >= ApiHelper.VERSION_CODES.HONEYCOMB_MR2) { d.getSize(size); } else { size.set(d.getWidth(), d.getHeight()); } return size; } @SuppressWarnings("fallthrough") @Override protected void onResume() { super.onResume(); Intent intent = getIntent(); switch (mState) { case STATE_INIT: { mPickedItem = intent.getData(); if (mPickedItem == null) { Intent request = new Intent(Intent.ACTION_GET_CONTENT) .setClass(this, DialogPicker.class) .setType(IMAGE_TYPE); startActivityForResult(request, STATE_PHOTO_PICKED); return; } mState = STATE_PHOTO_PICKED; // fall-through } case STATE_PHOTO_PICKED: { Intent cropAndSetWallpaperIntent; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { WallpaperManager wpm = WallpaperManager.getInstance(getApplicationContext()); try { cropAndSetWallpaperIntent = wpm.getCropAndSetWallpaperIntent(mPickedItem); startActivity(cropAndSetWallpaperIntent); finish(); return; } catch (ActivityNotFoundException anfe) { // ignored; fallthru to existing crop activity } catch (IllegalArgumentException iae) { // ignored; fallthru to existing crop activity } } int width = getWallpaperDesiredMinimumWidth(); int height = getWallpaperDesiredMinimumHeight(); Point size = getDefaultDisplaySize(new Point()); float spotlightX = (float) size.x / width; float spotlightY = (float) size.y / height; cropAndSetWallpaperIntent = new Intent(CropActivity.CROP_ACTION) .setClass(this, CropActivity.class) .setDataAndType(mPickedItem, IMAGE_TYPE) .addFlags(Intent.FLAG_ACTIVITY_FORWARD_RESULT) .putExtra(CropExtras.KEY_OUTPUT_X, width) .putExtra(CropExtras.KEY_OUTPUT_Y, height) .putExtra(CropExtras.KEY_ASPECT_X, width) .putExtra(CropExtras.KEY_ASPECT_Y, height) .putExtra(CropExtras.KEY_SPOTLIGHT_X, spotlightX) .putExtra(CropExtras.KEY_SPOTLIGHT_Y, spotlightY) .putExtra(CropExtras.KEY_SCALE, true) .putExtra(CropExtras.KEY_SCALE_UP_IF_NEEDED, true) .putExtra(CropExtras.KEY_SET_AS_WALLPAPER, true); startActivity(cropAndSetWallpaperIntent); finish(); } } } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { setResult(resultCode); finish(); return; } mState = requestCode; if (mState == STATE_PHOTO_PICKED) { mPickedItem = data.getData(); } // onResume() would be called next } }
[ "siyolatte@gmail.com" ]
siyolatte@gmail.com
e758532990d9dd61feacf21fc2a80dc5b3a975fb
0943c01b59f4d8bbab045d83adae0b015e935cba
/bpm1000/src/main/java/com/guider/health/bp/view/bp/BPDeviceConnectAndMessure.java
41b9a34798a0fa0dd3d7365176d1ae6bc5ec5e54
[ "Apache-2.0" ]
permissive
18271261642/RingmiiHX
c31c4609e6d126d12107c5f6aabaf4959659f308
3f1f840a1727cdf3ee39bc1b8d8aca4d2c3ebfcb
refs/heads/master
2021-06-28T10:28:58.649906
2020-08-16T02:27:28
2020-08-16T02:27:28
230,220,762
0
1
null
null
null
null
UTF-8
Java
false
false
4,243
java
package com.guider.health.bp.view.bp; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.Button; import android.widget.TextView; import com.guider.health.bluetooth.core.BleBluetooth; import com.guider.health.bp.R; import com.guider.health.bp.presenter.BPServiceManager; import com.guider.health.bp.view.BPFragment; import com.guider.health.common.core.Config; import com.guider.health.common.device.DeviceInit; import com.guider.health.common.utils.SkipClick; import ble.BleClient; /** * Created by haix on 2019/6/10. */ public class BPDeviceConnectAndMessure extends BPFragment { private View view; Handler handler = new Handler(); @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.bp_connect_and_meassure, container, false); return view; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); _mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); BleBluetooth.getInstance().openBluetooth(); setHomeEvent(view.findViewById(R.id.home), Config.HOME_DEVICE); ((TextView) view.findViewById(R.id.title)).setText(R.string.shebeiceliang); view.findViewById(R.id.back).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { BPServiceManager.getInstance().stopDeviceConnect(); pop(); } }); view.findViewById(R.id.skip).setVisibility(View.VISIBLE); view.findViewById(R.id.skip).setOnClickListener(new SkipClick(this , DeviceInit.DEV_BP)); //开始测量 BleClient.init(_mActivity); BPServiceManager.getInstance().startMeasure(); handler = new Handler(); startFailTime(); } @Override public void onDestroyView() { super.onDestroyView(); handler.removeMessages(0); } @Override public void startUploadData() { } @Override public void connectAndMessureIsOK() { handler.removeMessages(0); _mActivity.runOnUiThread(new Runnable() { @Override public void run() { showDialog(R.layout.bp_dialog); baseHandler.postDelayed(new Runnable() { @Override public void run() { hideDialog(); startWithPop(new BPMeasureResult()); } }, 2000); } }); } @Override public void connectNotSuccess() { handler.removeMessages(0); _mActivity.runOnUiThread(new Runnable() { @Override public void run() { changeUi2Fail(); } }); } private void changeUi2Fail() { handler.removeMessages(0); ((TextView) view.findViewById(R.id.bp_reminder)).setText(R.string.lianjieshibai); //view.findViewById(R.id.bp_cancel).setVisibility(View.GONE); final Button bt = view.findViewById(R.id.bp_re); bt.setVisibility(View.VISIBLE); bt.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { ((TextView) view.findViewById(R.id.bp_reminder)).setText(R.string.celiangzhong); //view.findViewById(R.id.bp_cancel).setVisibility(View.VISIBLE); bt.setVisibility(View.INVISIBLE); BPServiceManager.getInstance().startMeasure(); startFailTime(); } }); } void startFailTime() { handler.postDelayed(new Runnable() { @Override public void run() { // 到这里就说明55秒都没有连接成功 ,要重新连接 changeUi2Fail(); } }, 1000 * 90); } }
[ "runningmaggot@163.com" ]
runningmaggot@163.com
d4018c3495c32d4914351b4d62d3b405ffb2c138
bcd4762b1961dfa3cdebe8d24ab20760eb1a9732
/phloc-bootstrap2/src/main/java/com/phloc/bootstrap2/BootstrapLabel.java
5ec5aa20c76cec6241271a7dac367d313750bcbe
[]
no_license
phlocbg/phloc-webbasics
4d7d773f7d8fc90349432982e647d66aa2b322b8
c1a4c5ffab91c89abf27e080601b509061e9cf47
refs/heads/master
2023-07-20T01:39:32.772637
2023-07-14T16:23:00
2023-07-14T16:23:00
41,255,519
0
0
null
2022-12-06T00:05:48
2015-08-23T15:42:00
Java
UTF-8
Java
false
false
1,487
java
/** * Copyright (C) 2006-2014 phloc systems * http://www.phloc.com * office[at]phloc[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.phloc.bootstrap2; import javax.annotation.Nonnull; import com.phloc.html.hc.html.HCButton; /** * Represents a Bootstrap label * * @author Philip Helger */ public class BootstrapLabel extends HCButton { private EBootstrapLabelType m_eType = EBootstrapLabelType.DEFAULT; private void _init () { addClass (CBootstrapCSS.LABEL); } public BootstrapLabel () { super (); _init (); } @Nonnull public EBootstrapLabelType getLabelType () { return m_eType; } @Nonnull public BootstrapLabel setType (@Nonnull final EBootstrapLabelType eType) { if (eType == null) throw new NullPointerException ("type"); removeClass (m_eType); m_eType = eType; addClass (m_eType); return this; } }
[ "ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726" ]
ph@phloc.com@224af017-8982-1a56-601f-39e8d6e75726
117bc9a09cf4f20da641ec71b6e170b60411f548
5407585b7749d94f5a882eee6f7129afc6f79720
/dm-code/dm-ui/src/main/java/org/finra/dm/ui/controller/DmUiControllerAdvice.java
d33850a9c37b37a9a146e238fc83fc04f46b66b7
[ "Apache-2.0" ]
permissive
walw/herd
67144b0192178050118f5572c5aa271e1525e14f
e236f8f4787e62d5ebf5e1a55eda696d75c5d3cf
refs/heads/master
2021-01-14T14:16:23.163693
2015-10-08T14:23:54
2015-10-08T14:23:54
43,558,552
0
1
null
2015-10-02T14:50:59
2015-10-02T14:50:59
null
UTF-8
Java
false
false
3,940
java
/* * Copyright 2015 herd contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.finra.dm.ui.controller; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.util.HtmlUtils; import org.finra.dm.ui.constants.UiConstants; /** * A general form controller advice that can be used to handle UI controller exceptions. */ @ControllerAdvice("org.finra.dm.ui.controller") // Only handle UI exceptions and not REST exceptions in a different base package. public class DmUiControllerAdvice { private static final Logger LOGGER = Logger.getLogger(DmUiControllerAdvice.class); /** * Handle all user exceptions by returning to a general error page while displaying the exception message to the user. A "message" model is returned. * * @param ex the exception being handled. * * @return the model and view to the error page. */ @ExceptionHandler(UserException.class) public ModelAndView handleUserException(UserException ex) { // Nothing to log here since these are messages meant for the user to see. return getDisplayErrorMessageModelAndView(ex.getMessage()); } @ExceptionHandler(AccessDeniedException.class) public void handleAccessDeniedException(AccessDeniedException accessDeniedException, HttpServletResponse response) throws IOException { // This forces the status to be send at the Servlet level, which triggers in the web-container's (ie. Tomcat) default behavior response.sendError(HttpStatus.FORBIDDEN.value()); } /** * Handle all other controller exceptions by returning to a general error page with a general message. The exception message isn't displayed to the user for * security reasons. A "message" model is returned. * * @param ex the exception being handled. * * @return the model and view to the error page. */ @ExceptionHandler(Exception.class) public ModelAndView handleException(Exception ex) { LOGGER.error("An error occurred in a UI controller.", ex); return getDisplayErrorModelAndView(); } /** * Gets a "displayError" model and view with no model present. * * @return the model and view. */ public static ModelAndView getDisplayErrorModelAndView() { return getDisplayErrorMessageModelAndView(null); } /** * Gets a "displayErrorMessage" model and view. * * @param message An optional error message to include in the model. If null, it won't be included in the model. The message will be automatically HTML * escaped. * * @return the model and view. */ public static ModelAndView getDisplayErrorMessageModelAndView(String message) { String viewName = UiConstants.DISPLAY_ERROR_MESSAGE_PAGE; if (message == null) { return new ModelAndView(viewName); } else { return new ModelAndView(viewName, UiConstants.MODEL_KEY_MESSAGE, HtmlUtils.htmlEscape(message)); } } }
[ "mchao47@gmail.com" ]
mchao47@gmail.com
92d5503371cb84347198014a32d77752e820608c
c33ed30cf351450e27904705a2fdf694a86ac287
/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app208/RequestObject.java
470ce0daa91f800eb7b814184bd9f07efa314fd5
[ "Apache-2.0" ]
permissive
springdoc/springdoc-openapi
fb627bd976a1f464914402bdee00b492f6194a49
d4f99ac9036a00ade542c3ebb1ce7780a171d7d8
refs/heads/main
2023-08-20T22:07:34.367597
2023-08-16T18:43:24
2023-08-16T18:43:24
196,475,719
2,866
503
Apache-2.0
2023-09-11T19:37:09
2019-07-11T23:08:20
Java
UTF-8
Java
false
false
348
java
package test.org.springdoc.api.v30.app208; /** * @author bnasslahsen */ public class RequestObject { private String id; private String name; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "badr.nasslahsen@gmail.com" ]
badr.nasslahsen@gmail.com
cc2cf100e08fd2eb81ff8b71a0429a20e3d2237a
22e506ee8e3620ee039e50de447def1e1b9a8fb3
/java_src/p000a/p001a/p002a/C0049m.java
a2909d1922f4719f3ad020548997aa552f14879b
[]
no_license
Qiangong2/GraffitiAllianceSource
477152471c02aa2382814719021ce22d762b1d87
5a32de16987709c4e38594823cbfdf1bd37119c5
refs/heads/master
2023-07-04T23:09:23.004755
2021-08-11T18:10:17
2021-08-11T18:10:17
395,075,728
0
0
null
null
null
null
UTF-8
Java
false
false
1,450
java
package p000a.p001a.p002a; import java.io.ByteArrayOutputStream; import java.io.UnsupportedEncodingException; import p000a.p001a.p002a.p004b.AbstractC0019h; import p000a.p001a.p002a.p004b.AbstractC0021j; import p000a.p001a.p002a.p004b.C0011b; import p000a.p001a.p002a.p006d.C0034a; /* renamed from: a.a.a.m */ /* compiled from: TSerializer */ public class C0049m { /* renamed from: a */ private final ByteArrayOutputStream f138a; /* renamed from: b */ private final C0034a f139b; /* renamed from: c */ private AbstractC0019h f140c; public C0049m() { this(new C0011b.C0012a()); } public C0049m(AbstractC0021j jVar) { this.f138a = new ByteArrayOutputStream(); this.f139b = new C0034a(this.f138a); this.f140c = jVar.mo55a(this.f139b); } /* renamed from: a */ public byte[] mo116a(AbstractC0033d dVar) throws C0046j { this.f138a.reset(); dVar.mo76b(this.f140c); return this.f138a.toByteArray(); } /* renamed from: a */ public String mo115a(AbstractC0033d dVar, String str) throws C0046j { try { return new String(mo116a(dVar), str); } catch (UnsupportedEncodingException e) { throw new C0046j("JVM DOES NOT SUPPORT ENCODING: " + str); } } /* renamed from: b */ public String mo117b(AbstractC0033d dVar) throws C0046j { return new String(mo116a(dVar)); } }
[ "sassafrass@fasizzle.com" ]
sassafrass@fasizzle.com
10e394672c447b46698476dd48941f040db430aa
838bafea637f952bcec9430a0e7d67fd34bd4591
/org/jfree/chart/axis/AxisLocation.java
7929fbf16447454383bc361a2fa972c090f091d2
[ "MIT" ]
permissive
ivanshen/Who-Are-You-Really
df6fd40e37f8ab16f9133844cebd6b2545cc56a6
25e5bebe691d7c33fe34515a0c99570b03746a77
refs/heads/master
2021-01-10T10:27:32.536878
2015-11-18T17:27:25
2015-11-18T17:27:25
46,398,399
0
0
null
null
null
null
UTF-8
Java
false
false
2,386
java
package org.jfree.chart.axis; import java.io.ObjectStreamException; import java.io.Serializable; import org.jfree.chart.util.ParamChecks; public final class AxisLocation implements Serializable { public static final AxisLocation BOTTOM_OR_LEFT; public static final AxisLocation BOTTOM_OR_RIGHT; public static final AxisLocation TOP_OR_LEFT; public static final AxisLocation TOP_OR_RIGHT; private static final long serialVersionUID = -3276922179323563410L; private String name; static { TOP_OR_LEFT = new AxisLocation("AxisLocation.TOP_OR_LEFT"); TOP_OR_RIGHT = new AxisLocation("AxisLocation.TOP_OR_RIGHT"); BOTTOM_OR_LEFT = new AxisLocation("AxisLocation.BOTTOM_OR_LEFT"); BOTTOM_OR_RIGHT = new AxisLocation("AxisLocation.BOTTOM_OR_RIGHT"); } private AxisLocation(String name) { this.name = name; } public AxisLocation getOpposite() { return getOpposite(this); } public String toString() { return this.name; } public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof AxisLocation)) { return false; } if (this.name.equals(((AxisLocation) obj).toString())) { return true; } return false; } public int hashCode() { return this.name.hashCode() + 415; } public static AxisLocation getOpposite(AxisLocation location) { ParamChecks.nullNotPermitted(location, "location"); if (location == TOP_OR_LEFT) { return BOTTOM_OR_RIGHT; } if (location == TOP_OR_RIGHT) { return BOTTOM_OR_LEFT; } if (location == BOTTOM_OR_LEFT) { return TOP_OR_RIGHT; } if (location == BOTTOM_OR_RIGHT) { return TOP_OR_LEFT; } throw new IllegalStateException("AxisLocation not recognised."); } private Object readResolve() throws ObjectStreamException { if (equals(TOP_OR_RIGHT)) { return TOP_OR_RIGHT; } if (equals(BOTTOM_OR_RIGHT)) { return BOTTOM_OR_RIGHT; } if (equals(TOP_OR_LEFT)) { return TOP_OR_LEFT; } if (equals(BOTTOM_OR_LEFT)) { return BOTTOM_OR_LEFT; } return null; } }
[ "iwshen11@gmail.com" ]
iwshen11@gmail.com
5d621fa15683bbe96c004170e5475f9f371a3d36
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator3605.java
2dd3e69fd9d0a97d26cff5de03032e4bbfa0172a
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator3605 { public int execute(int temperatureDifference3605, boolean boilerStatus3605) { //sync _bfpnGUbFEeqXnfGWlV3605, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
2bc54e1dc8bb355f534e86a5fd5eb10b3d91f480
0a618dff85e1ddfdcd63bdb4c92fd6a7b35d7625
/QL_Cafe/src/Interface/Print.java
4a7eb33468062d87a14deb4a34148d5be19d7458
[]
no_license
dinhdeveloper/CAFFEE_MYSQL
62ac493c93f04cb55dc9dd8dcdae2d0f086e44a0
bbc85bf97cdfe5de5cef15b9453bab547e3d7ea9
refs/heads/master
2020-04-15T17:35:58.995333
2019-01-24T16:08:01
2019-01-24T16:08:01
164,877,930
1
0
null
null
null
null
UTF-8
Java
false
false
1,776
java
package Interface; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.print.PageFormat; import java.awt.print.Paper; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; public class Print { public static boolean printCard(final String bill) { final PrinterJob job = PrinterJob.getPrinterJob(); Printable contentToPrint = new Printable() { @Override public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { Graphics2D g2d = (Graphics2D) graphics; g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); g2d.setFont(new Font("Monospaced", Font.BOLD, 10)); String[] billz = bill.split(";"); int y = 15; // draw each String in a separate line for (int i = 0; i < billz.length; i++) { graphics.drawString(billz[i], 5, y); y = y + 15; } if (pageIndex > 0) { return NO_SUCH_PAGE; } // Only one page return PAGE_EXISTS; } }; PageFormat pageFormat = new PageFormat(); pageFormat.setOrientation(PageFormat.PORTRAIT); Paper pPaper = pageFormat.getPaper(); pPaper.setImageableArea(0, 0, pPaper.getWidth(), pPaper.getHeight() - 2); pageFormat.setPaper(pPaper); job.setPrintable(contentToPrint, pageFormat); try { job.print(); } catch (PrinterException e) { System.err.println(e.getMessage()); } return true; } }
[ "dinhtrancntt@gmail.com" ]
dinhtrancntt@gmail.com
c8006c340931248686ec3621f2a9dc1ad7f56022
458a0bf27af0cf8fb47730f5b2133852fc06cabf
/ABC/src/com/bdqn/servlet/Staffsevlet.java
439a32ee832372548c6114f0a50329943c26779c
[]
no_license
ren-chao/Kaoshi
abef380a29c8ac4b3d9a4a9349d2fc762b81ee0b
cc24656f61dc883ae81d55c9e311febebb3b46a5
refs/heads/master
2023-04-13T09:02:09.085082
2021-04-28T03:48:05
2021-04-28T03:48:05
362,295,175
0
0
null
null
null
null
GB18030
Java
false
false
4,091
java
package com.bdqn.servlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.bdqn.dao.Abservlet; import com.bdqn.dao.StaffDao; import com.bdqn.daoimpl.StaffDaoImpl; import com.bdqn.entity.Power; import com.bdqn.entity.Rank; import com.bdqn.entity.Role; import com.bdqn.entity.Section; import com.bdqn.entity.Staff; import com.bdqn.entity.UserId; import com.bdqn.entity.layui; import util.PrintUtil; @WebServlet(value="/sta") public class Staffsevlet extends Abservlet{ private StaffDao st=new StaffDaoImpl(); public void seleStaff(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Staff> seleStaff = st.seleStaff(); layui<Staff> lay=new layui<Staff>(); lay.setCode(0); lay.setData(seleStaff); lay.setMsg(""); lay.setCount(seleStaff.size()); PrintUtil.write(lay, response); } public void seleLeft(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Power> selePower = st.selePower(); System.out.println(selePower); request.getSession().setAttribute("zhi", selePower); response.sendRedirect("index.jsp"); } public void chaniu1(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setAttribute("chazhi", st.chaniu1(2)); request.getRequestDispatcher("userlist.jsp").forward(request, response); } //添加 public void useradd(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String loginname = request.getParameter("loginname"); int type1 = Integer.parseInt(request.getParameter("type1")); int type2 = Integer.parseInt(request.getParameter("type2")); int type3 = Integer.parseInt(request.getParameter("type3")); PrintUtil.write(st.useradd(loginname, type1,type2,type3), response); } //查询角色 public void seleRole(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Role> seleRole = st.seleRole(); PrintUtil.write(seleRole, response); } //查询职责 public void seleRank(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Rank> seleRank = st.seleRank(); PrintUtil.write(seleRank, response); } //查询部门 public void seleSection(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { List<Section> seleSection = st.seleSection(); PrintUtil.write(seleSection, response); } //删除用户 public void deleUser(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("userid"); int deleUser = st.deleUser(Integer.parseInt(id)); PrintUtil.write(deleUser,response); } //查询当前用户的id public void seleuser(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("userid"); PrintUtil.write(st.seleuser(Integer.parseInt(id)), response); } //修改用户 public void updaUser(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String loginname = request.getParameter("loginname"); String id = request.getParameter("id"); int type1 = Integer.parseInt(request.getParameter("type1")); int type2 = Integer.parseInt(request.getParameter("type2")); int type3 = Integer.parseInt(request.getParameter("type3")); UserId us=new UserId(); us.setId(Integer.parseInt(id)); us.setName(loginname); us.setRoleid(type1); us.setRankid(type2); us.setSectionid(type3); PrintUtil.write(st.updaUser(us), response); } }
[ "goodMorning_pro@at.bdqn.com" ]
goodMorning_pro@at.bdqn.com
534bbbcf92695ca3a7237b0c7838e73129479876
d561fab22864cec1301393d38d627726671db0b2
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/UncheckedWarningsInsideIncorporationPhase.java
51eb5129a1f34fb4dd22a9d076ff919bb115d956
[ "Apache-2.0" ]
permissive
Vedenin/intellij-community
724dcd8b3e7c026936eed895cf964bb80574689a
74a89fa7083dedc6455a16e10cf779d191d79633
refs/heads/master
2021-01-25T00:47:43.514138
2017-03-27T15:48:36
2017-03-27T15:54:02
86,361,176
1
1
null
2017-03-27T16:54:23
2017-03-27T16:54:23
null
UTF-8
Java
false
false
728
java
abstract class Group { public Group() { } public <T extends Category> T get(Key<T> key) { return getCategory<error descr="'getCategory(Key<R>)' in 'Group' cannot be applied to '(Key<T>)'">(key)</error>; } public abstract <R extends Category<R>> R getCategory(Key<R> key); public <T extends Category> T get1(Key<T> key) { return getCategory1(key); } public abstract <R extends Category> R getCategory1(Key<R> key); } interface Category<Tc extends Category> { } class Key<Tk extends Category> { } class Test { static <T extends B> T get(T b) { return create(b); } public static <K extends A<?, ?>> K create(K a) { return a; } } class A<T, U> {} class B<R> extends A<Object, R> {}
[ "anna.kozlova@jetbrains.com" ]
anna.kozlova@jetbrains.com
c8d6c765835d128d215ec22a808d22c57ed5e7a3
d00520866b6c91e7fce100ab3a32fbe9a5411ab8
/FppAssignment/src/fourth_assignment5/Person.java
eeabee2359ad24ee3fad1375ffa0c59b7a9cdc02
[]
no_license
rajeev66053/FPP
65a3823d0894c9a80010eed80ada1de288aa5627
47cb5a4c79b72c94fdb7fe138124a8eb1f3c40eb
refs/heads/master
2023-04-11T07:46:01.046259
2021-04-19T01:38:17
2021-04-19T01:38:17
359,294,999
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package fourth_assignment5; public class Person implements Cloneable { String name; Computer computer; public Person(String name, Computer computer) { super(); this.name = name; this.computer = computer; } protected Object clone() throws CloneNotSupportedException { Person clone = (Person) super.clone(); return clone; } @Override public String toString() { return "Person [Name=" + name + ", Computer=" + computer + "]"; } }
[ "rajeevthapaliya@gmail.com" ]
rajeevthapaliya@gmail.com
db502cd4b0a877f5647867b08f038b784a7a11de
cdd8cf6479e519ff18c71ccba529c0875e49169a
/src/main/java/top/dianmu/ccompiler/learn/day52/BottomUpParser/LRStateMachine.java
5ee7278c09e6a2edb06e3ac640b8c8fb0050cab4
[]
no_license
hungry-game/CCompiler_for_learn
af3611bd636978d72df3e09399f144f1ac482c84
3f1d3c48dd229ce1eb265ae0d3c8f2051051418b
refs/heads/master
2022-05-26T18:33:01.230199
2020-05-02T12:57:33
2020-05-02T12:57:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,383
java
package top.dianmu.ccompiler.learn.day52.BottomUpParser; import top.dianmu.ccompiler.learn.day52.Compiler.SymbolDefine; import java.util.HashMap; public class LRStateMachine { enum STATE_MACHINE_ACTION { error, r1, r2, r3, s1, s2, s3, s4, state_2, state_3, state_5, accept } private HashMap<Integer, HashMap<Integer,STATE_MACHINE_ACTION >> stateMachine = new HashMap<Integer, HashMap<Integer,STATE_MACHINE_ACTION >>(); public LRStateMachine() { HashMap<Integer, STATE_MACHINE_ACTION> row0 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row0.put(SymbolDefine.NUM_OR_ID, STATE_MACHINE_ACTION.s1); row0.put(SymbolDefine.EXPR, STATE_MACHINE_ACTION.state_2); row0.put(SymbolDefine.TERM, STATE_MACHINE_ACTION.state_3); stateMachine.put(0, row0); HashMap<Integer, STATE_MACHINE_ACTION> row1 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row1.put(SymbolDefine.EOI, STATE_MACHINE_ACTION.r3); row1.put(SymbolDefine.PLUS, STATE_MACHINE_ACTION.r3); stateMachine.put(1, row1); HashMap<Integer, STATE_MACHINE_ACTION> row2 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row2.put(SymbolDefine.EOI, STATE_MACHINE_ACTION.accept); row2.put(SymbolDefine.PLUS, STATE_MACHINE_ACTION.s4); stateMachine.put(2, row2); HashMap<Integer, STATE_MACHINE_ACTION> row3 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row3.put(SymbolDefine.EOI, STATE_MACHINE_ACTION.r2); row3.put(SymbolDefine.PLUS, STATE_MACHINE_ACTION.r2); stateMachine.put(3, row3); HashMap<Integer, STATE_MACHINE_ACTION> row4 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row4.put(SymbolDefine.NUM_OR_ID, STATE_MACHINE_ACTION.s1); row4.put(SymbolDefine.TERM, STATE_MACHINE_ACTION.state_5); stateMachine.put(4, row4); HashMap<Integer, STATE_MACHINE_ACTION> row5 = new HashMap<Integer, STATE_MACHINE_ACTION>(); row5.put(SymbolDefine.EOI, STATE_MACHINE_ACTION.r1); row5.put(SymbolDefine.PLUS, STATE_MACHINE_ACTION.r1); stateMachine.put(5, row5); } public STATE_MACHINE_ACTION getAction(int tos, int symbol) { if (stateMachine.get(tos).get(symbol) == null) { return STATE_MACHINE_ACTION.error; } return stateMachine.get(tos).get(symbol); } }
[ "2673077461@qq.com" ]
2673077461@qq.com
1433f449965c772cd1b44c55767c6c8e0d1d86e7
9b01ffa3db998c4bca312fd28aa977f370c212e4
/app/src/streamC/java/com/loki/singlemoduleapp/stub/SampleClass5621.java
026585181afdf081bb1428b64490811ab8db29e7
[]
no_license
SergiiGrechukha/SingleModuleApp
932488a197cb0936785caf0e73f592ceaa842f46
b7fefea9f83fd55dbbb96b506c931cc530a4818a
refs/heads/master
2022-05-13T17:15:21.445747
2017-07-30T09:55:36
2017-07-30T09:56:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package com.loki.singlemoduleapp.stub; public class SampleClass5621 { private SampleClass5622 sampleClass; public SampleClass5621(){ sampleClass = new SampleClass5622(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
66a3504a8045785615cc4db24e1f61a2fc97a8dd
9254e7279570ac8ef687c416a79bb472146e9b35
/alikafka-20190916/src/main/java/com/aliyun/alikafka20190916/models/TagResourcesResponse.java
7c6aed2927bd27e3de4ef0ba4456ca8856a77536
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.alikafka20190916.models; import com.aliyun.tea.*; public class TagResourcesResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public TagResourcesResponseBody body; public static TagResourcesResponse build(java.util.Map<String, ?> map) throws Exception { TagResourcesResponse self = new TagResourcesResponse(); return TeaModel.build(map, self); } public TagResourcesResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public TagResourcesResponse setBody(TagResourcesResponseBody body) { this.body = body; return this; } public TagResourcesResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
95599a385a8c58d3fccb0c51505117492301ba7f
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes2.dex_source_from_JADX/com/facebook/feed/environment/HasMutationControllerManager.java
f266b9b1cfd0bfb3911df9bb9224e145d92a1894
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
163
java
package com.facebook.feed.environment; import com.facebook.multirow.api.AnyEnvironment; public interface HasMutationControllerManager extends AnyEnvironment { }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
74b8b2bd64dc3d4364ffcee7076cd26b5547ac71
5160a134705e27eb2d1d2ab80655779479828317
/commons/common-utils/src/main/java/com/danbro/dto/FrontCourseDetailInfoChapterDto.java
f23a9ade076fb920f3aafc6e0f778a22a23cd239
[]
no_license
Danbro007/danbro-edu
c3062fe71e4165731c4a9166a88af87062df3348
4b1af208e54df946d0d811c38603703069075575
refs/heads/main
2023-02-25T19:29:32.925882
2021-01-25T12:41:00
2021-01-25T12:41:00
321,248,859
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.danbro.dto; import lombok.Data; import java.util.List; /** * @Classname FrontCourseDetailInfoChapterDto * @Description TODO * @Date 2021/1/7 14:22 * @Author Danrbo */ @Data public class FrontCourseDetailInfoChapterDto { private String chapterTitle; private String chapterId; /** * 小节列表 */ private List<FrontCourseDetailInfoVideoDto> videoList; }
[ "710170342@qq.com" ]
710170342@qq.com
c2a05fd1877727088a9dc229bb24aa70dd6e4a73
17e37ca416a82f4081f01df86941ca6e5ae4c914
/core-projects/nhm-language-definition/src/main/java/uk/org/cse/nhm/language/definition/XPolicy.java
198b02c9c4fcc85eaf0747ddc0ae4cf8d34d3964
[]
no_license
decc/national-household-model-core-components
d0c8e08c9d23da4c6812df9e07b69eadf7fa16a4
31b72cdb3ddaf834a3ba57954d42f531004786b9
refs/heads/master
2020-05-26T00:33:53.193176
2017-08-29T14:23:05
2017-08-29T14:23:05
57,210,476
0
1
null
2017-04-04T13:45:41
2016-04-27T12:08:08
Java
UTF-8
Java
false
false
1,301
java
package uk.org.cse.nhm.language.definition; import java.util.ArrayList; import java.util.List; import javax.validation.constraints.Size; import uk.org.cse.nhm.language.adapt.impl.Prop; import uk.org.cse.nhm.language.definition.Category.CategoryType; import uk.org.cse.nhm.language.definition.two.actions.XApplyHookAction; import uk.org.cse.nhm.language.definition.two.hooks.XDateHook; import com.larkery.jasb.bind.Bind; import com.larkery.jasb.bind.BindRemainingArguments; @Doc("A policy is an organisational element, which collects together a set of related targets and cases.") @Bind("policy") @Obsolete( reason = XDateHook.SCHEDULING_OBSOLESCENCE, inFavourOf = {XDateHook.class, XApplyHookAction.class} ) @Category(CategoryType.OBSOLETE) @TopLevel public class XPolicy extends XScenarioElement { public static final class P { public static final String ACTIONS = "actions"; } private List<XPolicyAction> actions = new ArrayList<XPolicyAction>(); @Prop(P.ACTIONS) @Doc("A sequence of things to do in this scenario.") @BindRemainingArguments @Size(min = 1, message = "policy must include at least one target or case") public List<XPolicyAction> getActions() { return actions; } public void setActions(final List<XPolicyAction> actions) { this.actions = actions; } }
[ "richard.tiffin@akoolla.com" ]
richard.tiffin@akoolla.com
5ee48db5fcf7a390a75858608f493d12747effb2
4a3ab0ac1d106330c556b80bd012d6648455993f
/kettle-ext/src/main/java/org/flhy/ext/trans/steps/TableInput.java
82299b5e88e2b10a2d03b2e3bc8645f9d9112141
[]
no_license
Maxcj/KettleWeb
2e490e87103d14a069be4f1cf037d11423503d38
75be8f65584fe0880df6f6d637c72bcb1a66c4cd
refs/heads/master
2022-12-21T06:56:34.756989
2022-02-05T03:03:57
2022-02-05T03:03:57
192,645,149
13
10
null
2022-12-16T02:43:00
2019-06-19T02:36:43
JavaScript
UTF-8
Java
false
false
2,826
java
package org.flhy.ext.trans.steps; import java.util.List; import org.flhy.ext.core.PropsUI; import org.flhy.ext.trans.step.AbstractStep; import org.flhy.ext.utils.StringEscapeHelper; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.trans.step.StepMetaInterface; import org.pentaho.di.trans.step.errorhandling.StreamInterface; import org.pentaho.di.trans.steps.tableinput.TableInputMeta; import org.pentaho.metastore.api.IMetaStore; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.mxgraph.model.mxCell; import com.mxgraph.util.mxUtils; @Component("TableInput") @Scope("prototype") public class TableInput extends AbstractStep { @Override public void decode(StepMetaInterface stepMetaInterface, mxCell cell, List<DatabaseMeta> databases, IMetaStore metaStore) throws Exception { TableInputMeta tableInputMeta = (TableInputMeta) stepMetaInterface; String con = cell.getAttribute( "connection" ); tableInputMeta.setDatabaseMeta(DatabaseMeta.findDatabase( databases, con )); tableInputMeta.setSQL(StringEscapeHelper.decode(cell.getAttribute( "sql" ))); tableInputMeta.setRowLimit(cell.getAttribute("limit")); tableInputMeta.setExecuteEachInputRow("Y".equalsIgnoreCase(cell.getAttribute( "execute_each_row" ))); tableInputMeta.setVariableReplacementActive("Y".equalsIgnoreCase(cell.getAttribute( "variables_active" ))); tableInputMeta.setLazyConversionActive("Y".equalsIgnoreCase(cell.getAttribute( "lazy_conversion_active" ))); String lookupFromStepname = cell.getAttribute("lookup"); StreamInterface infoStream = tableInputMeta.getStepIOMeta().getInfoStreams().get(0); infoStream.setSubject(lookupFromStepname); } @Override public Element encode(StepMetaInterface stepMetaInterface) throws Exception { TableInputMeta tableInputMeta = (TableInputMeta) stepMetaInterface; Document doc = mxUtils.createDocument(); Element e = doc.createElement(PropsUI.TRANS_STEP_NAME); e.setAttribute("connection", tableInputMeta.getDatabaseMeta() == null ? "" : tableInputMeta.getDatabaseMeta().getName()); e.setAttribute("sql", StringEscapeHelper.encode(tableInputMeta.getSQL())); e.setAttribute("limit", tableInputMeta.getRowLimit()); e.setAttribute("execute_each_row", tableInputMeta.isExecuteEachInputRow() ? "Y" : "N"); e.setAttribute("variables_active", tableInputMeta.isVariableReplacementActive() ? "Y" : "N"); e.setAttribute("lazy_conversion_active", tableInputMeta.isLazyConversionActive() ? "Y" : "N"); StreamInterface infoStream = tableInputMeta.getStepIOMeta().getInfoStreams().get( 0 ); e.setAttribute("lookup", infoStream.getStepname()); return e; } }
[ "903283542@qq.com" ]
903283542@qq.com
838702d61054acc0243b56dc6c6ef61320b0836d
6305f25ace1a7854b3fda0c7ef45169262a85393
/wap-customer/src/main/java/com/mall/controller/item/IndexController.java
b39e14085dc3f5edab02280e04011f7ff6aa23c4
[]
no_license
18435753200/company_sqw
118dc4da41fec51abdc37b60d739063bc748f104
f28f68dbdcef128debf860f3da8f24bd9784bd4d
refs/heads/master
2022-12-25T07:40:02.825797
2018-08-10T10:25:31
2018-08-10T10:25:31
142,100,894
0
2
null
2022-12-16T02:28:04
2018-07-24T03:44:53
Java
UTF-8
Java
false
false
6,197
java
package com.mall.controller.item; import java.io.File; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; //import com.mall.cms.customer.api.CustomerCmsService; //import com.mall.cms.dto.CustomerAppIndexDto; import com.mall.controller.base.BaseController; import com.mall.service.CmsService; import com.mall.utils.Constants; import com.mall.utils.CookieUtil; import com.mall.utils.StringUtil; import com.mall.wap.proxy.RemoteServiceSingleton; import freemarker.core._RegexBuiltins.matchesBI; /** * 首页相关 * @author yuanxiayang * */ @Controller @RequestMapping("/index") public class IndexController extends BaseController { private static final Logger logger = Logger.getLogger(IndexController.class); public static final String INDEX = "item/index"; public static final String CREATE_INDEX_SUCCESS = "item/create_index_success"; public static final String CREATE_TOPIC_SUCCESS = "item/create_topic_success"; /** * 模板路径 */ @Value("${static.templateDir}") private String templateDir; /** * 首页静态文件路径 */ @Value("${static.indexDir}") private String indexDir; /** * 预览文件静态文件路径 */ @Value("${static.preIndexDir}") private String preIndexDir; /** * 专题页静态文件路径 */ @Value("${static.topicDir}") public String topicDir; @Autowired CmsService cmsService; /** * 生成首页静态页面 * @param request * @param response * @param model * @return * @throws Exception */ // @RequestMapping("/index.html") // public String autoCreateStaticIndex(HttpServletRequest request,HttpServletResponse response,Model model) throws Exception{ // //确认首页是否存在 // String dirPath = request.getSession().getServletContext().getRealPath(indexDir); // File path = new File(dirPath+"/index.html"); // if(path.isFile()){ // logger.info("---------------exist index.html "); // return "index/index.html"; // } // logger.info("---------------create index start"); // if(cmsService.createIndex(request)){ // logger.info("---------------create index success"); // } // return "index/index.html"; // // } /** * 生成专题静态页面 * @param request * @param response * @param model * @return * @throws Exception */ // @RequestMapping("/topic.html") // public String autoCreateStaticTopic(HttpServletRequest request,HttpServletResponse response,Model model,String topicUrl,String channel) throws Exception{ // if(null != channel){ // //电信用户注册,保存cookie // saveCookie(channel,request,response); // } // //获取topicUrl,截取字符串 // int indexOf = topicUrl.indexOf(topicDir); // //切割字符串获取topic名称 // String topicName = topicUrl.substring(indexOf+topicDir.length()+1); // //获取topicId // int indexOf2 = topicName.indexOf("."); // long topicId = Long.parseLong(topicName.substring(5, indexOf2)); // //确认首页是否存在 // String dirPath = request.getSession().getServletContext().getRealPath(topicDir); // File path = new File(dirPath+"/"+topicName); // if(path.isFile()){ // logger.info("---------------exist topic.html,topicId="+topicId); // return "topic/"+topicName; // } // logger.info("---------------create topic start"); // //获取topicid // //int indexOf2 = topicName.indexOf("topic"); // if(cmsService.createTopic(request,topicId)){ // logger.info("---------------create topic success:topic"+topicId); // } // return "topic/"+topicName; // // } //保存cookie private void saveCookie(String channel,HttpServletRequest request,HttpServletResponse response) { logger.info("channel="+channel); CookieUtil.setCookie(response, "channel", channel, Constants.OUT_TIME_COOKIE); } /** * 生成首页静态页面,提供给cms * @param request * @param response * @param model * @return * @throws Exception */ // @RequestMapping("/createStaticIndex") // public String createStaticIndex(HttpServletRequest request,HttpServletResponse response,Model model) throws Exception{ // //确认首页是否存在 // logger.info("---------------create index start"); // if(cmsService.createIndex(request)){ // logger.info("---------------create index success"); // } // return "index/index.html"; // } /** * 生成专题静态页面,提供给cms * @param request * @param response * @param model * @return * @throws Exception */ // @RequestMapping("/createStaticTopic") // public String createStaticTopic(HttpServletRequest request,HttpServletResponse response,Model model,Long topicId) throws Exception{ // logger.info("---------------create topic start"); // if(cmsService.createTopic(request,topicId)){ // logger.info("---------------create topic success:topic"+topicId); // } // return CREATE_TOPIC_SUCCESS; // // } /** * 处理首页分页,分页加载更多数据 * @return * @throws Exception */ // @RequestMapping("/indexPage") // public String indexPage(HttpServletRequest request,HttpServletResponse response,Model model,Integer pageNum) throws Exception{ // // //获取数据 // CustomerCmsService cmsServiceApi = RemoteServiceSingleton.getInstance().getCmsServiceApi(); // CustomerAppIndexDto appCustomerIndex = cmsServiceApi.getAppCustomerIndex(pageNum); // // model.addAttribute("contentList", appCustomerIndex.getIndexContent().get("contentList")); // model.addAttribute("picUrl1", picUrl1); // // return "index/indexPage"; // } /** * to * @param request * @param response * @param model * @return */ @RequestMapping("/toStaticIndex") public String toStaticIndex(HttpServletRequest request,HttpServletResponse response,Model model){ return "html/index.html"; //return INDEX; } }
[ "2581890372@163.com" ]
2581890372@163.com
795bc24cc6a10204dee7e466b7b4a006a456dba2
a614d870b1bc6afdaf267c74dd121d01473f8bcc
/smart4j-oss-api/src/main/java/com/v5ent/xoss/util/RequestHeadUtil.java
24c6ccb25b51678b2664304bf0e9a4a9818bdee2
[]
no_license
Mignet/smart4j
7d8aa3c551e1dd0a3569d761925f71a601ef3764
a5af2143ae80bf87e4c7e1812b8d5618b6c57cc7
refs/heads/master
2020-03-17T21:01:36.884382
2018-07-16T07:26:10
2018-07-16T07:26:10
133,939,711
1
0
null
null
null
null
UTF-8
Java
false
false
2,895
java
package com.v5ent.xoss.util; import java.io.IOException; import java.io.PrintWriter; import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import com.alibaba.fastjson.JSONObject; import com.v5ent.xoss.api.AppRequestHead; import com.v5ent.xoss.api.OpenRequestHead; public class RequestHeadUtil { private static final Logger LOGGER = Logger.getLogger(RequestHeadUtil.class); /** * HTTP请求参数转化 * @param request * @return */ public static HashMap<String, String> getRequestParams(HttpServletRequest request) { @SuppressWarnings("unchecked") Map<String, String[]> srcParamMap = request.getParameterMap(); HashMap<String, String> destParamMap = new HashMap<String, String>(); for (String obj : srcParamMap.keySet()) { String[] values = srcParamMap.get(obj); if (values != null && values.length > 0) { destParamMap.put(obj, values[0]); } else { destParamMap.put(obj, null); } } return destParamMap; } /** * 转化成APP请求头 * @param request * @return */ public static AppRequestHead convertToAppRequestHead(HttpServletRequest request){ AppRequestHead head = new AppRequestHead(); head.setOrgNumber(request.getParameter("orgNumber")); head.setAppKind(request.getParameter("appKind")); head.setAppClient(request.getParameter("appClient")); head.setAppVersion(request.getParameter("appVersion")); head.setSign(request.getParameter("sign")); head.setTimestamp(request.getParameter("timestamp")); head.setToken(request.getParameter("token")); head.setV(request.getParameter("v")); return head; } /** * 转化成第三方请求头 * @param request * @return */ public static OpenRequestHead convertToOpenRequestHead(HttpServletRequest request){ OpenRequestHead head = new OpenRequestHead(); head.setOrgNumber(request.getParameter("orgNumber")); head.setOrgKey(request.getParameter("orgKey")); head.setTimestamp(request.getParameter("timestamp")); head.setSign(request.getParameter("sign")); return head; } /** * 调用response输出相关的内容 * @param response * @param obj */ public static void responseOutWithJson(HttpServletResponse response,Object obj) { //将实体对象转换为JSON Object转换 String ret = JSONObject.toJSONString(obj); response.setCharacterEncoding("UTF-8"); response.setContentType("application/json; charset=utf-8"); PrintWriter out = null; try { out = response.getWriter(); out.append(ret); LOGGER.debug("调用response输出:"+ret+"\n"); } catch (IOException e) { LOGGER.info("调用response输出:"+ret+"错误",e); } finally { if (out != null) { out.close(); } } } }
[ "MignetWee@gmail.com" ]
MignetWee@gmail.com
c25b4b1147b188aac20ddc171561c155c6fcb72e
34b713d69bae7d83bb431b8d9152ae7708109e74
/core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/offer/domain/OfferTargetCriteriaXrefImpl.java
93def6a8d7a8d4cb1586407b76ef499f7178d42a
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sinotopia/BroadleafCommerce
d367a22af589b51cc16e2ad094f98ec612df1577
502ff293d2a8d58ba50a640ed03c2847cb6369f6
refs/heads/BroadleafCommerce-4.0.x
2021-01-23T14:14:45.029362
2019-07-26T14:18:05
2019-07-26T14:18:05
93,246,635
0
0
null
2017-06-03T12:27:13
2017-06-03T12:27:13
null
UTF-8
Java
false
false
5,579
java
/* * #%L * BroadleafCommerce Framework * %% * Copyright (C) 2009 - 2013 Broadleaf Commerce * %% * 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. * #L% */ package org.broadleafcommerce.core.offer.domain; import org.broadleafcommerce.common.extensibility.jpa.clone.ClonePolicy; import org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyTransform; import org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyTransformMember; import org.broadleafcommerce.common.extensibility.jpa.copy.DirectCopyTransformTypes; import org.broadleafcommerce.common.presentation.AdminPresentation; import org.broadleafcommerce.common.presentation.AdminPresentationClass; import org.broadleafcommerce.common.presentation.PopulateToOneFieldsEnum; import org.broadleafcommerce.common.rule.QuantityBasedRule; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.hibernate.annotations.GenericGenerator; import org.hibernate.annotations.Parameter; import org.hibernate.annotations.Polymorphism; import org.hibernate.annotations.PolymorphismType; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Inheritance; import javax.persistence.InheritanceType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Inheritance(strategy = InheritanceType.JOINED) @Table(name = "BLC_TAR_CRIT_OFFER_XREF") @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blOffers") @AdminPresentationClass(excludeFromPolymorphism = false, populateToOneFields = PopulateToOneFieldsEnum.TRUE) @DirectCopyTransform({ @DirectCopyTransformMember(templateTokens = DirectCopyTransformTypes.SANDBOX, skipOverlaps=true), @DirectCopyTransformMember(templateTokens = DirectCopyTransformTypes.MULTITENANT_CATALOG) }) public class OfferTargetCriteriaXrefImpl implements OfferTargetCriteriaXref, QuantityBasedRule { /** The Constant serialVersionUID. */ private static final long serialVersionUID = 1L; public OfferTargetCriteriaXrefImpl(Offer offer, OfferItemCriteria offerItemCriteria) { this.offer = offer; this.offerItemCriteria = offerItemCriteria; } public OfferTargetCriteriaXrefImpl() { //do nothing - default constructor for Hibernate contract } @Id @GeneratedValue(generator= "OfferTarCritId") @GenericGenerator( name="OfferTarCritId", strategy="org.broadleafcommerce.common.persistence.IdOverrideTableGenerator", parameters = { @Parameter(name="segment_value", value="OfferTargetCriteriaXrefImpl"), @Parameter(name="entity_name", value="org.broadleafcommerce.core.offer.domain.OfferTargetCriteriaXrefImpl") } ) @Column(name = "OFFER_TAR_CRIT_ID") protected Long id; //for the basic collection join entity - don't pre-instantiate the reference (i.e. don't do myField = new MyFieldImpl()) @ManyToOne(targetEntity = OfferImpl.class, optional=false, cascade = CascadeType.REFRESH) @JoinColumn(name = "OFFER_ID") @AdminPresentation(excluded = true) protected Offer offer; //for the basic collection join entity - don't pre-instantiate the reference (i.e. don't do myField = new MyFieldImpl()) @ManyToOne(targetEntity = OfferItemCriteriaImpl.class, cascade = CascadeType.ALL) @JoinColumn(name = "OFFER_ITEM_CRITERIA_ID") @ClonePolicy protected OfferItemCriteria offerItemCriteria; @Override public Long getId() { return id; } @Override public void setId(Long id) { this.id = id; } @Override public Offer getOffer() { return offer; } @Override public void setOffer(Offer offer) { this.offer = offer; } @Override public OfferItemCriteria getOfferItemCriteria() { return offerItemCriteria; } @Override public void setOfferItemCriteria(OfferItemCriteria offerItemCriteria) { this.offerItemCriteria = offerItemCriteria; } @Override public Integer getQuantity() { createEntityInstance(); return offerItemCriteria.getQuantity(); } @Override public void setQuantity(Integer quantity) { createEntityInstance(); offerItemCriteria.setQuantity(quantity); } @Override public String getMatchRule() { createEntityInstance(); return offerItemCriteria.getMatchRule(); } @Override public void setMatchRule(String matchRule) { createEntityInstance(); offerItemCriteria.setMatchRule(matchRule); } protected void createEntityInstance() { if (offerItemCriteria == null) { offerItemCriteria = new OfferItemCriteriaImpl(); } } }
[ "sinosie7en@gmail.com" ]
sinosie7en@gmail.com
871ffc136f206d1a2935f0b3abc9f2d5b019e453
ed865190ed878874174df0493b4268fccb636a29
/PuridiomCommon/src/com/tsa/puridiom/xrefcombo/tasks/XrefComboRetrieveFromCatalogItem.java
fae1cafd8da7f68c622a79e519e026f307cdf5bb
[]
no_license
zach-hu/srr_java8
6841936eda9fdcc2e8185b85b4a524b509ea4b1b
9b6096ba76e54da3fe7eba70989978edb5a33d8e
refs/heads/master
2021-01-10T00:57:42.107554
2015-11-06T14:12:56
2015-11-06T14:12:56
45,641,885
0
0
null
null
null
null
UTF-8
Java
false
false
1,705
java
/** * */ package com.tsa.puridiom.xrefcombo.tasks; import java.util.List; import java.util.Map; import org.hibernate.Hibernate; import org.hibernate.type.Type; import com.tsa.puridiom.common.utility.HiltonUtility; import com.tsagate.foundation.database.DBSession; import com.tsagate.foundation.processengine.Status; import com.tsagate.foundation.processengine.Task; import com.tsagate.foundation.utility.Log; /** * @author Richard */ public class XrefComboRetrieveFromCatalogItem extends Task { /* * (non-Javadoc) * * @see com.tsagate.puridiom.process.ITask#executeTask(java.lang.Object) */ public Object executeTask(Object object) throws Exception { Map incomingRequest = (Map) object; Object result = null; try { DBSession dbs = (DBSession) incomingRequest.get("dbsession"); String wareHouse = HiltonUtility.ckNull((String) incomingRequest.get("warehouse")); String itemNumber = HiltonUtility.ckNull((String) incomingRequest.get("CatalogItem_itemNumber")); if (!HiltonUtility.isEmpty(wareHouse) && !HiltonUtility.isEmpty(itemNumber)) { String queryString = "from XrefCombo xrefCombo where xrefCombo.xrefType = 'MXPW' AND xrefCombo.code1 = ? AND xrefCombo.code2 = ? "; List resultList = dbs.query(queryString, new Object[] { wareHouse, itemNumber }, new Type[] { Hibernate.STRING, Hibernate.STRING }); if (resultList != null && resultList.size() > 0) { result = resultList.get(0); } } this.setStatus(Status.SUCCEEDED); } catch (Exception e) { this.setStatus(Status.FAILED); Log.error(this, "XrefComboRetrieveFromCatalogItem error " + e.getMessage()); e.printStackTrace(); throw e; } return result; } }
[ "brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466" ]
brickerz@9227675a-84a3-4efe-bc6c-d7b3a3cf6466
617ab2079bf00f263a2ec3fbc8ad09315657887e
6a9dbe75a1d72279bd6f7c2c19d84c83cc7f43b6
/src/main/java/com/academy/lesson05/InheritanceDemo.java
6acd4a166b3618db9684954056fedb9dbfef0e07
[]
no_license
Oleg-Afanasiev/qa-ja-11-maven
5686364262c85278b5ed35e47c0aa72ee9acab9a
24f2c8cc378594f3ee4649a9b3e77c2db224800a
refs/heads/master
2023-06-02T01:39:37.098692
2021-06-19T09:18:01
2021-06-19T09:18:01
376,252,318
0
0
null
null
null
null
UTF-8
Java
false
false
1,032
java
package com.academy.lesson05; import com.academy.lesson04.Person; public class InheritanceDemo { public static void main(String[] args) { QA qaMember = new QA("Sidor", "Sidorov", 3); // qaMember.setExperience(3); System.out.println(qaMember.getFirstName()); System.out.println(qaMember.getLastName()); System.out.println(qaMember.getExperience()); System.out.println("---profile---"); System.out.println(qaMember.profile()); System.out.println("---toString---"); System.out.println(qaMember); // System.out.println(qaMember.profile()); Dancer dancer = new Dancer("Ivan", "Ivanov", "Rumba"); // dancer.setFirstName("Ivan"); // dancer.setLastName("Ivanov"); // dancer.setDanceStyle("Rumba"); dancer.dance(); Person person = new Person(); // person.firstName = "Ivan"; Empty empty = new Empty(); System.out.println(empty); System.out.println(empty.toString()); } }
[ "oleg.kh81@gmail.com" ]
oleg.kh81@gmail.com
56d730994356987873dc9b45bcf8b0bc1e2e5cce
ae2906fa1a2ec0750bed9ac28696871f5838dc91
/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderRequest.java
62d71853768b01e2e8fbeb0480cb97869d91a131
[ "Apache-2.0" ]
permissive
theghost5800/cf-java-client
ca8e2c0073fa1b8fd0441177d93d713ab3856f55
07a34c646a2f982e9405a49db2122ef461462af0
refs/heads/master
2022-11-15T08:17:10.162327
2019-10-29T15:48:42
2019-10-29T15:48:42
219,698,354
0
0
Apache-2.0
2019-11-05T08:48:37
2019-11-05T08:48:36
null
UTF-8
Java
false
false
1,063
java
/* * Copyright 2013-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.cloudfoundry.uaa.identityproviders; import com.fasterxml.jackson.annotation.JsonIgnore; import org.cloudfoundry.uaa.IdentityZoned; import org.immutables.value.Value; /** * The request payload for the get identity provider */ @Value.Immutable abstract class _GetIdentityProviderRequest implements IdentityZoned { /** * The identity provider id */ @JsonIgnore abstract String getIdentityProviderId(); }
[ "bhale@pivotal.io" ]
bhale@pivotal.io
043c04e3049dd79fc7642c6b7ae0c1b7bc7f24ea
b7da9fe29c0e5ddda93fce98b562335d43cae4a6
/app/src/main/java/com/xxx/ency/model/bean/PostReaportDeatil.java
4ab21c24866879cb70fee8988a4a0c17ca1b4d13
[]
no_license
xtfgq/officefood
8250acdb1446177fd2cafb4f6c6c21e82bd172d9
c41f6f51340088f4bfd4369d554d504ae50ec169
refs/heads/master
2020-05-21T03:35:18.509800
2019-06-27T06:15:53
2019-06-27T06:15:53
185,892,301
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
package com.xxx.ency.model.bean; public class PostReaportDeatil { // { // "userId": "42", // "type": "1", // "grainStoreRoomId": "1", // "createDate": "2019-02-09" // // } String userId; String type; String grainStoreRoomId; String createDate; String jobId; String step; public String getGrainStoreRoomId() { return grainStoreRoomId; } public String getJobId() { return jobId; } public void setJobId(String jobId) { this.jobId = jobId; } public String getStep() { return step; } public void setStep(String step) { this.step = step; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getGrainStoreRoomId(String roomId) { return grainStoreRoomId; } public void setGrainStoreRoomId(String grainStoreRoomId) { this.grainStoreRoomId = grainStoreRoomId; } public String getCreateDate() { return createDate; } public void setCreateDate(String createDate) { this.createDate = createDate; } }
[ "gq820125@163.com" ]
gq820125@163.com
f66d296c693443af1e184a9ebb2905010f09db96
fa74b3a4406ada1d7c04a0c54b18ea4d11b98b74
/java/programmers/src/level1/SearchKimInSeoul.java
7d1ba5a2a53758c956b4ccdf2f5809b75b576bcc
[]
no_license
ysgo/Algorithm
3801ac4c86dfc88abece93c1d4a71db3dad2dc9b
7f0bd529dbba9aff488923df2482326f0aae6083
refs/heads/master
2021-06-22T03:04:53.135951
2021-02-12T13:56:13
2021-02-12T13:56:13
189,864,490
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
package level1; import java.util.Arrays; public class SearchKimInSeoul { public static void main(String[] args) { Solution solution = new Solution(); String [] seoul = {"Jane", "Kim"}; System.out.println(solution.solution(seoul)); } } /* * String형 배열 seoul의 element중 Kim의 위치 x를 찾아, * 김서방은 x에 있다는 String을 반환하는 함수, solution을 완성하세요. * seoul에 Kim은 오직 한 번만 나타나며 잘못된 값이 입력되는 경우는 없습니다. 제한 사항 seoul은 길이 1 이상, 1000 이하인 배열입니다. seoul의 원소는 길이 1 이상, 20 이하인 문자열입니다. Kim은 반드시 seoul 안에 포함되어 있습니다. 입출력 예 seoul return [Jane, Kim] 김서방은 1에 있다 */ class Solution { public String solution(String[] seoul) { /*String answer = ""; for(int i=0; i<seoul.length; i++) { if(seoul[i].equals("Kim")) answer="김서방은 " + i + "에 있다"; } return answer; // 시간 평균 17~18ms*/ int x = Arrays.asList(seoul).indexOf("Kim"); return "김서방은 " + x + "에 있다"; } }
[ "wjion8428@gmail.com" ]
wjion8428@gmail.com
3f107a28ec93c13555c499d24bb805536423b3a9
e694a0823c3c915f65a8a25e104866ed916b9193
/src/Concept/KMP.java
01fbac678f1d92dbd13f092469d980d731cb1f2f
[]
no_license
chd830/Algorithm
2f1f61b8af94bfe02d4b9953ca52d2ebe1963c9f
1bfe2cce65d993ab91a705b518e573875359c384
refs/heads/master
2022-08-18T04:23:06.435408
2022-08-05T03:44:25
2022-08-05T03:44:25
214,943,907
2
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
package Concept; import java.util.Scanner; public class KMP { //부분문자열을 찾는 알고리즘 //접두사와 접미사 개념 활용. 반복되는 연산 생략 //파이테이블: 길이별 접두사==접미사의 최대길이 저장 static int[] getPi(String pattern) { int[] pi = new int[pattern.length()]; int j = 0; for(int i = 1; i < pattern.length(); i++) { while (j > 0 && pattern.charAt(i) != pattern.charAt(j)) { j = pi[j - 1]; } if (pattern.charAt(i) == pattern.charAt(j)) { pi[i] = ++j; } } return pi; } static void KMP(String pattern, String origin) { int[] pi = getPi(pattern); int j = 0; for(int i = 0; i < origin.length(); i++) { //일단 처리 while(j > 0 && origin.charAt(i) != pattern.charAt(j)) { j = pi[j-1]; } //맞는 경우 if(origin.charAt(i) == pattern.charAt(j)) { if(j == pattern.length()-1) { System.out.println("result: "+(i-pattern.length()+1)); j = pi[j]; } //맞았지만 패턴이 끝나지 않았을 경우 else { j++; } } System.out.println(i+" "+j); } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); KMP(sc.next(), sc.next()); // KMP("ABCDABCDABEE", "ABCDABE"); } }
[ "chd830@naver.com" ]
chd830@naver.com
93c77ea2fd0dce3bf70daf2bfd6bac981584aefd
32cd70512c7a661aeefee440586339211fbc9efd
/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/transform/DocumentFilterJsonUnmarshaller.java
37cdefd0f10547f692d49e915d16302e00c4aac2
[ "Apache-2.0" ]
permissive
twigkit/aws-sdk-java
7409d949ce0b0fbd061e787a5b39a93db7247d3d
0b8dd8cf5e52ad7ae57acd2ce7a584fd83a998be
refs/heads/master
2020-04-03T16:40:16.625651
2018-05-04T12:05:14
2018-05-04T12:05:14
60,255,938
0
1
Apache-2.0
2018-05-04T12:48:26
2016-06-02T10:40:53
Java
UTF-8
Java
false
false
3,094
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights * Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.simplesystemsmanagement.model.transform; import java.util.Map; import java.util.Map.Entry; import java.math.*; import java.nio.ByteBuffer; import com.amazonaws.services.simplesystemsmanagement.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * DocumentFilter JSON Unmarshaller */ public class DocumentFilterJsonUnmarshaller implements Unmarshaller<DocumentFilter, JsonUnmarshallerContext> { public DocumentFilter unmarshall(JsonUnmarshallerContext context) throws Exception { DocumentFilter documentFilter = new DocumentFilter(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) return null; while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("key", targetDepth)) { context.nextToken(); documentFilter.setKey(context.getUnmarshaller(String.class) .unmarshall(context)); } if (context.testExpression("value", targetDepth)) { context.nextToken(); documentFilter.setValue(context.getUnmarshaller( String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals( currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return documentFilter; } private static DocumentFilterJsonUnmarshaller instance; public static DocumentFilterJsonUnmarshaller getInstance() { if (instance == null) instance = new DocumentFilterJsonUnmarshaller(); return instance; } }
[ "aws@amazon.com" ]
aws@amazon.com
bd6456c8e01b6ab3cbf5f64ea847c5996813261d
ce87a6f851e3a021665e3050515309251252fb83
/ranch-editor/src/main/java/org/lpw/ranch/editor/element/ElementService.java
b2d1654be9ea7388030af39e366ad398604d71ed
[ "MIT", "Apache-2.0" ]
permissive
narci2010/ranch
394bfca97b43c191a8c78ea56cdb82802e9d5039
d7758c96629e07d160542b3980e985aa505fd094
refs/heads/master
2020-03-19T04:14:51.299141
2018-05-29T02:07:56
2018-05-29T02:07:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,979
java
package org.lpw.ranch.editor.element; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; /** * @author lpw */ public interface ElementService { /** * 元素信息是否存在验证器Bean名称。 */ String VALIDATOR_EXISTS = ElementModel.NAME + ".validator.exists"; /** * 编辑器是否匹配验证器Bean名称。 */ String VALIDATOR_EDITOR = ElementModel.NAME + ".validator.editor"; /** * 修改时间是否匹配验证器Bean名称。 */ String VALIDATOR_MODIFY = ElementModel.NAME + ".validator.modify"; /** * 检索元素集。 * * @param editor 编辑器ID值。 * @param parent 父元素ID值。 * @param recursive 是否递归获取子元素集。 * @return 元素集。 */ JSONArray query(String editor, String parent, boolean recursive); /** * 查找元素信息。 * * @param id ID值。 * @return 元素信息,不存在则返回null。 */ ElementModel findById(String id); /** * 保存元素信息。 * * @param element 元素信息。 * @return 元素信息。 */ JSONObject save(ElementModel element); /** * 排序。 * * @param editor 编辑器ID值。 * @param parent 父元素ID值。 * @param ids 元素ID集。 * @param modifies 修改时间集。 * @return 修改数据集。 */ JSONArray sort(String editor, String parent, String[] ids, String[] modifies); /** * 删除元素。 * * @param id ID值。 */ void delete(String id); /** * 批量操作。 * * @param parameters 参数集。 * @return 操作结果集。 */ JSONArray batch(String parameters); /** * 复制。 * * @param source 源编辑器ID值。 * @param target 目标编辑器ID值。 */ void copy(String source, String target); }
[ "heisedebaise@hotmail.com" ]
heisedebaise@hotmail.com
b2982fa1aa41e185992da65b4a1df2b078738273
a13ab684732add3bf5c8b1040b558d1340e065af
/java6-src/javax/imageio/stream/MemoryCacheImageOutputStream.java
035e59dfbcd6b57e72594746e596ff3e53beac6b
[]
no_license
Alivop/java-source-code
554e199a79876343a9922e13ccccae234e9ac722
f91d660c0d1a1b486d003bb446dc7c792aafd830
refs/heads/master
2020-03-30T07:21:13.937364
2018-10-25T01:49:39
2018-10-25T01:51:38
150,934,150
5
2
null
null
null
null
UTF-8
Java
false
false
5,098
java
/* * %W% %E% * * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.imageio.stream; import java.io.IOException; import java.io.OutputStream; /** * An implementation of <code>ImageOutputStream</code> that writes its * output to a regular <code>OutputStream</code>. A memory buffer is * used to cache at least the data between the discard position and * the current write position. The only constructor takes an * <code>OutputStream</code>, so this class may not be used for * read/modify/write operations. Reading can occur only on parts of * the stream that have already been written to the cache and not * yet flushed. * * @version 0.5 */ public class MemoryCacheImageOutputStream extends ImageOutputStreamImpl { private OutputStream stream; private MemoryCache cache = new MemoryCache(); /** * Constructs a <code>MemoryCacheImageOutputStream</code> that will write * to a given <code>OutputStream</code>. * * @param stream an <code>OutputStream</code> to write to. * * @exception IllegalArgumentException if <code>stream</code> is * <code>null</code>. */ public MemoryCacheImageOutputStream(OutputStream stream) { if (stream == null) { throw new IllegalArgumentException("stream == null!"); } this.stream = stream; } public int read() throws IOException { checkClosed(); bitOffset = 0; int val = cache.read(streamPos); if (val != -1) { ++streamPos; } return val; } public int read(byte[] b, int off, int len) throws IOException { checkClosed(); if (b == null) { throw new NullPointerException("b == null!"); } // Fix 4467608: read([B,I,I) works incorrectly if len<=0 if (off < 0 || len < 0 || off + len > b.length || off + len < 0) { throw new IndexOutOfBoundsException ("off < 0 || len < 0 || off+len > b.length || off+len < 0!"); } bitOffset = 0; if (len == 0) { return 0; } // check if we're already at/past EOF i.e. // no more bytes left to read from cache long bytesLeftInCache = cache.getLength() - streamPos; if (bytesLeftInCache <= 0) { return -1; // EOF } // guaranteed by now that bytesLeftInCache > 0 && len > 0 // and so the rest of the error checking is done by cache.read() // NOTE that alot of error checking is duplicated len = (int)Math.min(bytesLeftInCache, (long)len); cache.read(b, off, len, streamPos); streamPos += len; return len; } public void write(int b) throws IOException { flushBits(); // this will call checkClosed() for us cache.write(b, streamPos); ++streamPos; } public void write(byte[] b, int off, int len) throws IOException { flushBits(); // this will call checkClosed() for us cache.write(b, off, len, streamPos); streamPos += len; } public long length() { try { checkClosed(); return cache.getLength(); } catch (IOException e) { return -1L; } } /** * Returns <code>true</code> since this * <code>ImageOutputStream</code> caches data in order to allow * seeking backwards. * * @return <code>true</code>. * * @see #isCachedMemory * @see #isCachedFile */ public boolean isCached() { return true; } /** * Returns <code>false</code> since this * <code>ImageOutputStream</code> does not maintain a file cache. * * @return <code>false</code>. * * @see #isCached * @see #isCachedMemory */ public boolean isCachedFile() { return false; } /** * Returns <code>true</code> since this * <code>ImageOutputStream</code> maintains a main memory cache. * * @return <code>true</code>. * * @see #isCached * @see #isCachedFile */ public boolean isCachedMemory() { return true; } /** * Closes this <code>MemoryCacheImageOutputStream</code>. All * pending data is flushed to the output, and the cache * is released. The destination <code>OutputStream</code> * is not closed. */ public void close() throws IOException { long length = cache.getLength(); seek(length); flushBefore(length); super.close(); cache.reset(); cache = null; stream = null; } public void flushBefore(long pos) throws IOException { long oFlushedPos = flushedPos; super.flushBefore(pos); // this will call checkClosed() for us long flushBytes = flushedPos - oFlushedPos; cache.writeToStream(stream, oFlushedPos, flushBytes); cache.disposeBefore(flushedPos); stream.flush(); } }
[ "liulp@zjhjb.com" ]
liulp@zjhjb.com
cc20e439a0a733c4fec65027017fa9179826da5d
1bff47a5e5f2c5800a64b9e3c809cdf4e51815e5
/smt-cloudformation-objects/src/main/java/shiver/me/timbers/aws/guardduty/FilterResource.java
ec46b30ee6f3c1a1c1b5b3fe62ec398bb146e640
[ "Apache-2.0" ]
permissive
shiver-me-timbers/smt-cloudformation-parent
d773863ce52c5de154d909498a7546e0da545556
e2600814428a92ff8ea5977408ccc6a8f511a561
refs/heads/master
2021-06-09T09:13:17.335583
2020-06-19T08:24:16
2020-06-19T08:24:16
149,845,802
4
0
Apache-2.0
2021-04-26T16:53:04
2018-09-22T04:39:40
Java
UTF-8
Java
false
false
4,635
java
package shiver.me.timbers.aws.guardduty; import java.util.List; import java.util.Map; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import shiver.me.timbers.aws.CreationPolicy; import shiver.me.timbers.aws.DeletionPolicy; import shiver.me.timbers.aws.HasCondition; import shiver.me.timbers.aws.HasDependsOn; import shiver.me.timbers.aws.Resource; import shiver.me.timbers.aws.UpdatePolicy; /** * FilterResource * <p> * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-filter.html * */ @JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonPropertyOrder({ "Type", "Properties" }) public class FilterResource extends Resource implements HasCondition<FilterResource> , HasDependsOn<FilterResource> { @JsonProperty("Type") private java.lang.String type = "AWS::GuardDuty::Filter"; /** * Filter * <p> * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-filter.html * */ @JsonProperty("Properties") @JsonPropertyDescription("http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-filter.html") private Filter properties; /** * No args constructor for use in serialization * */ public FilterResource() { } /** * * @param name */ public FilterResource(java.lang.String name) { super(name); } @JsonIgnore public java.lang.String getType() { return type; } @JsonIgnore public void setType(java.lang.String type) { this.type = type; } public FilterResource withType(java.lang.String type) { this.type = type; return this; } /** * Filter * <p> * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-filter.html * */ @JsonIgnore public Filter getProperties() { return properties; } /** * Filter * <p> * http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-guardduty-filter.html * */ @JsonIgnore public void setProperties(Filter properties) { this.properties = properties; } public FilterResource withProperties(Filter properties) { this.properties = properties; return this; } @Override public FilterResource withCondition(java.lang.String condition) { super.withCondition(condition); return this; } @Override public FilterResource withCreationPolicy(CreationPolicy creationPolicy) { super.withCreationPolicy(creationPolicy); return this; } @Override public FilterResource withUpdatePolicy(UpdatePolicy updatePolicy) { super.withUpdatePolicy(updatePolicy); return this; } @Override public FilterResource withDeletionPolicy(DeletionPolicy deletionPolicy) { super.withDeletionPolicy(deletionPolicy); return this; } @Override public FilterResource withDependsOn(List<java.lang.String> dependsOn) { super.withDependsOn(dependsOn); return this; } @Override public FilterResource withMetadata(Map<String, Object> metadata) { super.withMetadata(metadata); return this; } @Override public FilterResource withName(java.lang.String name) { super.withName(name); return this; } @Override public java.lang.String toString() { return new ToStringBuilder(this).appendSuper(super.toString()).append("type", type).append("properties", properties).toString(); } @Override public int hashCode() { return new HashCodeBuilder().appendSuper(super.hashCode()).append(type).append(properties).toHashCode(); } @Override public boolean equals(java.lang.Object other) { if (other == this) { return true; } if ((other instanceof FilterResource) == false) { return false; } FilterResource rhs = ((FilterResource) other); return new EqualsBuilder().appendSuper(super.equals(other)).append(type, rhs.type).append(properties, rhs.properties).isEquals(); } }
[ "karl.bennett.smt@gmail.com" ]
karl.bennett.smt@gmail.com
288c87be538234d2df6eaa22af56ada7dd3b9000
6c0d4f3828966746d72471b2131f68a05b4036bf
/src/product/epon/com/topvision/ems/epon/onu/domain/OnuOnOffRecord.java
3a32928de938a36cb7c42c0768b2b074eeed09a7
[]
no_license
kevinXiao2016/topvision-server
b5b97de7436edcae94ad2648bce8a34759f7cf0b
b5934149c50f22661162ac2b8903b61a50bc63e9
refs/heads/master
2020-04-12T00:54:33.351152
2018-12-18T02:16:14
2018-12-18T02:16:14
162,215,931
0
1
null
null
null
null
UTF-8
Java
false
false
3,787
java
package com.topvision.ems.epon.onu.domain; import java.io.Serializable; import java.sql.Timestamp; import com.topvision.framework.common.DateUtils; import com.topvision.framework.dao.mybatis.AliasesSuperType; /** * 上下线历史记录domain * * @author w1992wishes * @created @2017年6月14日-下午3:36:32 * */ public class OnuOnOffRecord implements Serializable, AliasesSuperType { private static final long serialVersionUID = 6953506126895580791L; private Long onuId; private Long onuIndex; private Long entityId; private Timestamp onTime; private Timestamp offTime; private String onTimeString; private String offTimeString; private Short offReason;// 下线原因,有0,1,2,3,4,5等值分别对应不同的原因 private Timestamp collectTime; private String collectTimeString; private String onOffRecordByteList;//onu上下线单条记录对应的字节(从设备获取到的是多条记录混合一起的字节) public Long getOnuId() { return onuId; } public Long getOnuIndex() { return onuIndex; } public Long getEntityId() { return entityId; } public Timestamp getOnTime() { return onTime; } public Timestamp getOffTime() { return offTime; } public Short getOffReason() { return offReason; } public Timestamp getCollectTime() { return collectTime; } public void setOnuId(Long onuId) { this.onuId = onuId; } public void setOnuIndex(Long onuIndex) { this.onuIndex = onuIndex; } public void setEntityId(Long entityId) { this.entityId = entityId; } public void setOnTime(Timestamp onTime) { this.onTime = onTime; } public void setOffTime(Timestamp offTime) { this.offTime = offTime; } public void setOffReason(Short offReason) { this.offReason = offReason; } public void setCollectTime(Timestamp collectTime) { collectTimeString = DateUtils.format(collectTime); this.collectTime = collectTime; } public String getOnTimeString() { this.onTimeString = this.onTime == null ? "--" : DateUtils.format(onTime.getTime()); return onTimeString; } public String getOffTimeString() { this.offTimeString = this.offTime == null ? "--" : DateUtils.format(offTime.getTime()); return offTimeString; } public String getCollectTimeString() { return collectTimeString; } public void setOnTimeString(String onTimeString) { this.onTimeString = onTimeString; } public void setOffTimeString(String offTimeString) { this.offTimeString = offTimeString; } public void setCollectTimeString(String collectTimeString) { this.collectTimeString = collectTimeString; } public String getOnOffRecordByteList() { return onOffRecordByteList; } public void setOnOffRecordByteList(String onOffRecordByteList) { this.onOffRecordByteList = onOffRecordByteList; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("OnuOnOffRecord [entityId="); builder.append(entityId); builder.append(", onuId="); builder.append(onuId); builder.append(", onuIndex="); builder.append(onuIndex); builder.append(", onTime="); builder.append(onTime); builder.append(", offTime="); builder.append(offTime); builder.append(", offReason="); builder.append(offReason); builder.append(", collectTime="); builder.append(collectTime); builder.append("]"); return builder.toString(); } }
[ "785554043@qq.com" ]
785554043@qq.com
3d4599c13b9cd55538ab737464a054a01244d446
e99f78a1d7d244a8def43ca73d570f3a1b0c435f
/FirstMVCProject/src/com/gontuseries/hellocontroller/IsValidHobby.java
ac5e92e99a4e6d10a4e88535e9ca3c71e86cc458
[]
no_license
BBK-PiJ-2015-10/Ongoing
5e153280a7772b1ec6ad5df02ec2cf8115ec272d
3a6099079c5413d864c8b3ec435f14660d6fad5e
refs/heads/master
2021-01-13T11:59:36.191993
2017-06-29T18:35:31
2017-06-29T18:35:31
77,915,552
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package com.gontuseries.hellocontroller; import java.lang.annotation.Documented; import java.lang.annotation.Target; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.ElementType; import javax.validation.Constraint; import javax.validation.Payload; @Documented @Constraint(validatedBy = HobbyValidator.class) @Target( {ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface IsValidHobby { String listOfValidHobbies() default "Dancing|Painting"; String message() default "Please provide a valid hobby value " + "choose among: Swimming,Running,Open Source,German,Dutch"; Class<?>[] groups() default {}; Class<? extends Payload>[] payload() default {}; }
[ "yasserpo@hotmail.com" ]
yasserpo@hotmail.com
344d131437116d7580080280f4f79554ec520850
b286254d4f0c269d6b1bdd5736405abd93df0884
/1.semester/Eaa/chap09/networkv3/NewsFeed.java
c680db6b490c212fb224073bd1a5b5783030cbe8
[]
no_license
joandrsn/workspaces
ceb1882a565ccb43467f6bcb2b870fc547a05cae
ffb67ab0ee6799eea8acc844f8a7a1d11ddd7acc
refs/heads/master
2021-05-27T16:16:20.532479
2013-11-22T09:27:56
2013-11-22T09:27:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,236
java
package chap09.networkv3; import java.util.ArrayList; /** * The NewsFeed class stores news posts for the news feed in a * social network application (like FaceBook or Google+). * * Display of the posts is currently simulated by printing the * details to the terminal. (Later, this should display in a browser.) * * This version does not save the data to disk, and it does not * provide any search or ordering functions. * * @author Michael Kölling and David J. Barnes * @version 0.2 */ public class NewsFeed { private ArrayList<Post> posts; /** * Construct an empty news feed. */ public NewsFeed() { posts = new ArrayList<Post>(); } /** * Add a post to the news feed. * * @param post The post to be added. */ public void addPost(Post post) { posts.add(post); } /** * Show the news feed. Currently: print the news feed details * to the terminal. (To do: replace this later with display * in web browser.) */ public void show() { // display all posts for(Post post : posts) { post.display(); System.out.println(); // empty line between posts } } }
[ "mmedum@gmail.com" ]
mmedum@gmail.com
c7c9ff35a9edd12a2556ba860fa20376661a716c
5e57520287d4fe212e3d83f911df47167d83a287
/AsteriskSafletDesigner.diagram/src/com/safi/workshop/view/factories/WrapLabel8ViewFactory.java
0fdc8652b015c2003cde9c20553cfebea4e62e6b
[]
no_license
acastroy/safiserver-all
dc2f0dfedbf994d7a4f7803907cea836530c9cec
039be68c5d4f7e65fd53f4a836eac39b3d349230
refs/heads/master
2020-03-31T19:38:06.020158
2010-10-30T10:16:45
2010-10-30T10:16:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
package com.safi.workshop.view.factories; import java.util.ArrayList; import java.util.List; import org.eclipse.gmf.runtime.diagram.ui.view.factories.BasicNodeViewFactory; import org.eclipse.gmf.runtime.notation.View; /** * @generated */ public class WrapLabel8ViewFactory extends BasicNodeViewFactory { /** * @generated */ @Override protected List createStyles(View view) { List styles = new ArrayList(); return styles; } }
[ "steamedcotton@254595da-98a2-11de-83f8-39e71e4dc75d" ]
steamedcotton@254595da-98a2-11de-83f8-39e71e4dc75d
b21f8ab06084c4d4bef3ed77c58f973fd67f4920
96670d2b28a3fb75d2f8258f31fc23d370af8a03
/reverse_engineered/sources/com/github/mikephil/charting/charts/C3204f.java
14a8ed00109adf7be1766fbefccddb606440b22f
[]
no_license
P79N6A/speedx
81a25b63e4f98948e7de2e4254390cab5612dcbd
800b6158c7494b03f5c477a8cf2234139889578b
refs/heads/master
2020-05-30T18:43:52.613448
2019-06-02T07:57:10
2019-06-02T08:15:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,352
java
package com.github.mikephil.charting.charts; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.RectF; import android.util.AttributeSet; import com.avos.avoscloud.AVException; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.components.YAxis.AxisDependency; import com.github.mikephil.charting.data.C3242p; import com.github.mikephil.charting.p089e.p090b.C3245j; import com.github.mikephil.charting.p127f.C3265n; import com.github.mikephil.charting.p127f.C3268s; import com.github.mikephil.charting.p127f.C3271v; import com.github.mikephil.charting.p181d.C3217i; import com.github.mikephil.charting.p183g.C3283i; /* compiled from: RadarChart */ /* renamed from: com.github.mikephil.charting.charts.f */ public class C3204f extends C3203e<C3242p> { /* renamed from: a */ protected C3271v f13886a; /* renamed from: b */ protected C3268s f13887b; /* renamed from: e */ private float f13888e = 2.5f; /* renamed from: f */ private float f13889f = 1.5f; /* renamed from: g */ private int f13890g = Color.rgb(AVException.INVALID_FILE_NAME, AVException.INVALID_FILE_NAME, AVException.INVALID_FILE_NAME); /* renamed from: h */ private int f13891h = Color.rgb(AVException.INVALID_FILE_NAME, AVException.INVALID_FILE_NAME, AVException.INVALID_FILE_NAME); /* renamed from: i */ private int f13892i = 150; /* renamed from: j */ private boolean f13893j = true; /* renamed from: k */ private int f13894k = 0; /* renamed from: l */ private YAxis f13895l; public C3204f(Context context) { super(context); } public C3204f(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public C3204f(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } /* renamed from: a */ protected void mo3898a() { super.mo3898a(); this.f13895l = new YAxis(AxisDependency.LEFT); this.f13888e = C3283i.m15928a(1.5f); this.f13889f = C3283i.m15928a(0.75f); this.O = new C3265n(this, this.R, this.Q); this.f13886a = new C3271v(this.Q, this.f13895l, this); this.f13887b = new C3268s(this.Q, this.H, this); this.P = new C3217i(this); } /* renamed from: b */ protected void mo3899b() { super.mo3899b(); this.f13895l.m15399a(((C3242p) this.C).m15574a(AxisDependency.LEFT), ((C3242p) this.C).m15581b(AxisDependency.LEFT)); this.H.a(0.0f, (float) ((C3245j) ((C3242p) this.C).m15598l()).mo3938F()); } /* renamed from: h */ public void mo3905h() { if (this.C != null) { mo3899b(); this.f13886a.mo3340a(this.f13895l.t, this.f13895l.s, this.f13895l.m15391H()); this.f13887b.mo3340a(this.H.t, this.H.s, false); if (!(this.K == null || this.K.m15352c())) { this.N.m15758a(this.C); } m15331j(); } } protected void onDraw(Canvas canvas) { super.onDraw(canvas); if (this.C != null) { if (this.H.A()) { this.f13887b.mo3340a(this.H.t, this.H.s, false); } this.f13887b.mo4004a(canvas); if (this.f13893j) { this.O.mo3998c(canvas); } if (this.f13895l.A() && this.f13895l.o()) { this.f13886a.mo4017e(canvas); } this.O.mo3995a(canvas); if (w()) { this.O.mo3996a(canvas, this.S); } if (this.f13895l.A() && !this.f13895l.o()) { this.f13886a.mo4017e(canvas); } this.f13886a.mo4011a(canvas); this.O.mo3997b(canvas); this.N.m15755a(canvas); b(canvas); c(canvas); } } public float getFactor() { RectF k = this.Q.m15874k(); return Math.min(k.width() / 2.0f, k.height() / 2.0f) / this.f13895l.u; } public float getSliceAngle() { return 360.0f / ((float) ((C3245j) ((C3242p) this.C).m15598l()).mo3938F()); } /* renamed from: a */ public int mo3897a(float f) { float c = C3283i.m15948c(f - getRotationAngle()); float sliceAngle = getSliceAngle(); int F = ((C3245j) ((C3242p) this.C).m15598l()).mo3938F(); for (int i = 0; i < F; i++) { if ((((float) (i + 1)) * sliceAngle) - (sliceAngle / 2.0f) > c) { return i; } } return 0; } public YAxis getYAxis() { return this.f13895l; } public void setWebLineWidth(float f) { this.f13888e = C3283i.m15928a(f); } public float getWebLineWidth() { return this.f13888e; } public void setWebLineWidthInner(float f) { this.f13889f = C3283i.m15928a(f); } public float getWebLineWidthInner() { return this.f13889f; } public void setWebAlpha(int i) { this.f13892i = i; } public int getWebAlpha() { return this.f13892i; } public void setWebColor(int i) { this.f13890g = i; } public int getWebColor() { return this.f13890g; } public void setWebColorInner(int i) { this.f13891h = i; } public int getWebColorInner() { return this.f13891h; } public void setDrawWeb(boolean z) { this.f13893j = z; } public void setSkipWebLineCount(int i) { this.f13894k = Math.max(0, i); } public int getSkipWebLineCount() { return this.f13894k; } protected float getRequiredLegendOffset() { return this.N.m15754a().getTextSize() * 4.0f; } protected float getRequiredBaseOffset() { if (this.H.A() && this.H.h()) { return (float) this.H.f13938D; } return C3283i.m15928a(10.0f); } public float getRadius() { RectF k = this.Q.m15874k(); return Math.min(k.width() / 2.0f, k.height() / 2.0f); } public float getYChartMax() { return this.f13895l.s; } public float getYChartMin() { return this.f13895l.t; } public float getYRange() { return this.f13895l.u; } }
[ "Gith1974" ]
Gith1974
6fad805606d84ec1b751b8ebd50138aa0f5b0ab3
83f4a71aee31911a73a2bb858e1669fe9ff9d87a
/redis-distributed-lock-core/src/main/java/com/snowalker/lock/DistributedLock.java
1b104a74873a648e0291b2c925afc956dbdf3304
[ "Apache-2.0" ]
permissive
TaXueWWL/redis-distributed-lock
10761f7d69a22827343281fc8ec7ccdca2accc8f
adeff499fda7b63c752b408648a2dff40d066728
refs/heads/master
2023-06-24T15:19:27.453800
2022-03-29T09:02:03
2022-03-29T09:02:03
140,507,748
328
133
Apache-2.0
2023-06-14T22:32:46
2018-07-11T01:53:31
Java
UTF-8
Java
false
false
348
java
package com.snowalker.lock; /** * @author snowalker * @date 2018-7-9 * @desc Redis分布式锁接口声明 */ public interface DistributedLock { /** * 加锁 * @param lockName * @return */ boolean lock(String lockName); /** * 解锁 * @param lockName */ boolean release(String lockName); }
[ "1210812591@qq.com" ]
1210812591@qq.com
fcb0b32edce8362e14ba4105885c7c44c45f5536
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_4bd03ccd104f97dd95389d3b57ed02dd230b8b12/OperationSummary/2_4bd03ccd104f97dd95389d3b57ed02dd230b8b12_OperationSummary_s.java
42938dae9e294042eea20b37a8e4d1fbb77ee55c
[]
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
7,953
java
/* * Copyright (c) 2010, Regents of the University of California * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the University of California, Berkeley * nor the names of its contributors may be used to endorse or promote * products derived from this software without specific prior written * permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ package radlab.rain.scoreboard; import java.util.LinkedList; import org.json.JSONException; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import radlab.rain.RainConfig; import radlab.rain.operation.OperationExecution; import de.tum.in.dss.psquare.PSquared; public class OperationSummary { private static Logger logger = LoggerFactory.getLogger(OperationSummary.class); // Information recorded about one operation type private long opsSuccessful = 0; private long opsFailed = 0; private long actionsSuccessful = 0; private long opsAsync = 0; private long opsSync = 0; private long minResponseTime = Long.MAX_VALUE; private long maxResponseTime = Long.MIN_VALUE; private long totalResponseTime = 0; private long opsFailedRtimeThreshold = 0; // Sample the response times so that we can give a "reasonable" // estimate of the 90th and 99th percentiles. private IMetricSampler responseTimeSampler; // Percentile estimation based on the P-square algorithm private PSquared rtime99th = new PSquared(0.99f); private PSquared rtime95th = new PSquared(0.95f); private PSquared rtime90th = new PSquared(0.90f); private PSquared rtime50th = new PSquared(0.50f); public OperationSummary(IMetricSampler strategy) { responseTimeSampler = strategy; } void resetSamples() { responseTimeSampler.reset(); } void processResult(OperationExecution result) { if (result.failed) { opsFailed++; } else { // Result successful opsSuccessful++; actionsSuccessful += result.actionsPerformed; // Count operations if (result.async) { opsAsync++; } else { opsSync++; } // Update response time sample long responseTime = result.getExecutionTime(); responseTimeSampler.accept(responseTime); totalResponseTime += responseTime; if (responseTime > RainConfig.rtime_T) opsFailedRtimeThreshold++; // Update response time percentile estimations rtime99th.accept(responseTime); rtime95th.accept(responseTime); rtime90th.accept(responseTime); rtime50th.accept(responseTime); // Update max and min response time maxResponseTime = Math.max(maxResponseTime, responseTime); minResponseTime = Math.min(minResponseTime, responseTime); } } JSONObject getStatistics(double runDuration) throws JSONException { // Total operations executed long totalOperations = opsSuccessful + opsFailed; double effectiveLoadOperations = 0; double effectiveLoadRequests = 0; double averageRTime = 0; // Calculations (per second) if (runDuration > 0) { effectiveLoadOperations = (double) opsSuccessful / toSeconds(runDuration); effectiveLoadRequests = (double) actionsSuccessful / toSeconds(runDuration); } else { logger.warn("run duration <= 0"); } if (opsSuccessful > 0) { averageRTime = (double) totalResponseTime / (double) opsSuccessful; } else { logger.warn("total ops successfull <= 0"); } // Results JSONObject operation = new JSONObject(); operation.put("ops_successful", opsSuccessful); operation.put("ops_failed", opsFailed); operation.put("ops_seen", totalOperations); operation.put("actions_successful", actionsSuccessful); operation.put("ops_async", opsAsync); operation.put("ops_sync", opsSync); operation.put("effective_load_ops", effectiveLoadOperations); operation.put("effective_load_req", effectiveLoadRequests); operation.put("rtime_total", totalResponseTime); operation.put("rtime_average", nNaN(averageRTime)); operation.put("rtime_max", maxResponseTime); operation.put("rtime_min", minResponseTime); operation.put("rtime_50th", nNaN(rtime50th.getPValue())); operation.put("rtime_90th", nNaN(rtime90th.getPValue())); operation.put("rtime_95th", nNaN(rtime95th.getPValue())); operation.put("rtime_99th", nNaN(rtime99th.getPValue())); operation.put("rtime_thr_failed", opsFailedRtimeThreshold); operation.put("sampler_samples_collected", responseTimeSampler.getSamplesCollected()); operation.put("sampler_samples_seen", responseTimeSampler.getSamplesSeen()); operation.put("sampler_rtime_50th", nNaN(responseTimeSampler.getNthPercentile(50))); operation.put("sampler_rtime_90th", nNaN(responseTimeSampler.getNthPercentile(90))); operation.put("sampler_rtime_95th", nNaN(responseTimeSampler.getNthPercentile(95))); operation.put("sampler_rtime_99th", nNaN(responseTimeSampler.getNthPercentile(99))); operation.put("sampler_rtime_mean", nNaN(responseTimeSampler.getSampleMean())); operation.put("sampler_rtime_stdev", nNaN(responseTimeSampler.getSampleStandardDeviation())); operation.put("sampelr_rtime_tvalue", nNaN(responseTimeSampler.getTvalue(averageRTime))); return operation; } private double nNaN(double val) { if (Double.isNaN(val)) return 0; else if (Double.isInfinite(val)) return 0; return val; } private final double toSeconds(double timestamp) { return timestamp / 1000d; } private IMetricSampler getResponseTimeSampler() { return responseTimeSampler; } public void merge(OperationSummary from) { opsSuccessful += from.opsSuccessful; opsFailed += from.opsFailed; actionsSuccessful += from.actionsSuccessful; opsAsync += from.opsAsync; opsSync += from.opsSync; minResponseTime = Math.min(minResponseTime, from.minResponseTime); maxResponseTime = Math.max(maxResponseTime, from.maxResponseTime); totalResponseTime += from.totalResponseTime; opsFailedRtimeThreshold += from.opsFailedRtimeThreshold; // TODO: How to combine two separate percentiles? rtime99th.accept(from.rtime99th.getPValue()); rtime95th.accept(from.rtime95th.getPValue()); rtime90th.accept(from.rtime90th.getPValue()); rtime50th.accept(from.rtime50th.getPValue()); // Accept all response time samples LinkedList<Long> rhsRawSamples = from.getResponseTimeSampler().getRawSamples(); for (Long obs : rhsRawSamples) responseTimeSampler.accept(obs); } public long getOpsSuccessful() { return opsSuccessful; } public long getOpsFailed() { return opsFailed; } public long getTotalResponseTime() { return totalResponseTime; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4c9b4ac09b0db1d93f6c226af24a919eb333d08a
cbad3334a18b0877925b891f2e52496b0095740c
/第12章 几种剪裁与测试/Sample12_1/src/com/bn/Sample12_1/LoadUtil.java
fc255096eb6019ff4cef576836dfc6c9f0fe8b55
[]
no_license
tangyong3g/openGl20Games
73e05de4add4e326e6f2082e555d37c091bd2614
f1b06bb64a210b82ca4fbbff98e23f1290f42762
refs/heads/master
2021-01-17T04:48:34.641523
2019-12-07T02:06:39
2019-12-07T02:06:39
11,811,001
13
7
null
null
null
null
GB18030
Java
false
false
6,697
java
package com.bn.Sample12_1; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import android.content.res.Resources; import android.util.Log; public class LoadUtil { //求两个向量的叉积 public static float[] getCrossProduct(float x1,float y1,float z1,float x2,float y2,float z2) { //求出两个矢量叉积矢量在XYZ轴的分量ABC float A=y1*z2-y2*z1; float B=z1*x2-z2*x1; float C=x1*y2-x2*y1; return new float[]{A,B,C}; } //向量规格化 public static float[] vectorNormal(float[] vector) { //求向量的模 float module=(float)Math.sqrt(vector[0]*vector[0]+vector[1]*vector[1]+vector[2]*vector[2]); return new float[]{vector[0]/module,vector[1]/module,vector[2]/module}; } //从obj文件中加载携带顶点信息的物体,并自动计算每个顶点的平均法向量 public static LoadedObjectVertexNormal loadFromFileVertexOnly(String fname, Resources r,MySurfaceView mv) { //加载后物体的引用 LoadedObjectVertexNormal lo=null; //原始顶点坐标列表--直接从obj文件中加载 ArrayList<Float> alv=new ArrayList<Float>(); //顶点组装面索引列表--根据面的信息从文件中加载 ArrayList<Integer> alFaceIndex=new ArrayList<Integer>(); //结果顶点坐标列表--按面组织好 ArrayList<Float> alvResult=new ArrayList<Float>(); //平均前各个索引对应的点的法向量集合Map //此HashMap的key为点的索引, value为点所在的各个面的法向量的集合 HashMap<Integer,HashSet<Normal>> hmn=new HashMap<Integer,HashSet<Normal>>(); try { InputStream in=r.getAssets().open(fname); InputStreamReader isr=new InputStreamReader(in); BufferedReader br=new BufferedReader(isr); String temps=null; //扫面文件,根据行类型的不同执行不同的处理逻辑 while((temps=br.readLine())!=null) { //用空格分割行中的各个组成部分 String[] tempsa=temps.split("[ ]+"); if(tempsa[0].trim().equals("v")) {//此行为顶点坐标 //若为顶点坐标行则提取出此顶点的XYZ坐标添加到原始顶点坐标列表中 alv.add(Float.parseFloat(tempsa[1])); alv.add(Float.parseFloat(tempsa[2])); alv.add(Float.parseFloat(tempsa[3])); } else if(tempsa[0].trim().equals("f")) {//此行为三角形面 /* *若为三角形面行则根据 组成面的顶点的索引从原始顶点坐标列表中 *提取相应的顶点坐标值添加到结果顶点坐标列表中,同时根据三个 *顶点的坐标计算出此面的法向量并添加到平均前各个索引对应的点 *的法向量集合组成的Map中 */ int[] index=new int[3];//三个顶点索引值的数组 //计算第0个顶点的索引,并获取此顶点的XYZ三个坐标 index[0]=Integer.parseInt(tempsa[1].split("/")[0])-1; float x0=alv.get(3*index[0]); float y0=alv.get(3*index[0]+1); float z0=alv.get(3*index[0]+2); alvResult.add(x0); alvResult.add(y0); alvResult.add(z0); //计算第1个顶点的索引,并获取此顶点的XYZ三个坐标 index[1]=Integer.parseInt(tempsa[2].split("/")[0])-1; float x1=alv.get(3*index[1]); float y1=alv.get(3*index[1]+1); float z1=alv.get(3*index[1]+2); alvResult.add(x1); alvResult.add(y1); alvResult.add(z1); //计算第2个顶点的索引,并获取此顶点的XYZ三个坐标 index[2]=Integer.parseInt(tempsa[3].split("/")[0])-1; float x2=alv.get(3*index[2]); float y2=alv.get(3*index[2]+1); float z2=alv.get(3*index[2]+2); alvResult.add(x2); alvResult.add(y2); alvResult.add(z2); //记录此面的顶点索引 alFaceIndex.add(index[0]); alFaceIndex.add(index[1]); alFaceIndex.add(index[2]); //通过三角形面两个边向量0-1,0-2求叉积得到此面的法向量 //求0号点到1号点的向量 float vxa=x1-x0; float vya=y1-y0; float vza=z1-z0; //求0号点到2号点的向量 float vxb=x2-x0; float vyb=y2-y0; float vzb=z2-z0; //通过求两个向量的叉积计算法向量 float[] vNormal=vectorNormal(getCrossProduct ( vxa,vya,vza,vxb,vyb,vzb )); for(int tempInxex:index) {//记录每个索引点的法向量到平均前各个索引对应的点的法向量集合组成的Map中 //获取当前索引对应点的法向量集合 HashSet<Normal> hsn=hmn.get(tempInxex); if(hsn==null) {//若集合不存在则创建 hsn=new HashSet<Normal>(); } //将此点的法向量添加到集合中 //由于Normal类重写了equals方法,因此同样的法向量不会重复出现在此点 //对应的法向量集合中 hsn.add(new Normal(vNormal[0],vNormal[1],vNormal[2])); //将集合放进HsahMap中 hmn.put(tempInxex, hsn); } } } //生成顶点数组 int size=alvResult.size(); float[] vXYZ=new float[size]; for(int i=0;i<size;i++) { vXYZ[i]=alvResult.get(i); } //生成法向量数组 float[] nXYZ=new float[alFaceIndex.size()*3]; int c=0; for(Integer i:alFaceIndex) { //根据当前点的索引从Map中取出一个法向量的集合 HashSet<Normal> hsn=hmn.get(i); //求出平均法向量 float[] tn=Normal.getAverage(hsn); //将计算出的平均法向量存放到法向量数组中 nXYZ[c++]=tn[0]; nXYZ[c++]=tn[1]; nXYZ[c++]=tn[2]; } //创建3D物体对象 lo=new LoadedObjectVertexNormal(mv,vXYZ,nXYZ); } catch(Exception e) { Log.d("load error", "load error"); e.printStackTrace(); } return lo; } }
[ "ty_sany@163.com" ]
ty_sany@163.com
1c5bcb37e48171534faa3def39801a3c0f1a0dac
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
/src/main/java/com/alipay/api/response/AlipayTradeBuyerCreditConfirmResponse.java
ac282fe5acc76260910aa026e264d46fb9fe70e7
[ "Apache-2.0" ]
permissive
WindLee05-17/alipay-sdk-java-all
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
19ccb203268316b346ead9c36ff8aa5f1eac6c77
refs/heads/master
2022-11-30T18:42:42.077288
2020-08-17T05:57:47
2020-08-17T05:57:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,107
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.trade.buyer.credit.confirm response. * * @author auto create * @since 1.0, 2020-07-10 19:39:50 */ public class AlipayTradeBuyerCreditConfirmResponse extends AlipayResponse { private static final long serialVersionUID = 3573555579924375521L; /** * 标识买家授信额度的来源 */ @ApiField("buyer_credit_source") private String buyerCreditSource; /** * 本次授信拆分的买家主体userId */ @ApiField("buyer_user_id") private String buyerUserId; /** * 标识本次授信拆分的业务场景,具体的值由支付宝定义 */ @ApiField("credit_scene") private String creditScene; /** * 卖家授信拆分给买家的额度 单位为元,精确到小数点后两位,取值范围[0.01,100000000] */ @ApiField("grant_credit_quota") private String grantCreditQuota; /** * 本次授信拆分的操作明细单号,每一次授信申请或者关闭会生成唯一个单号 */ @ApiField("grant_operation_no") private String grantOperationNo; /** * 标识本次授信拆分的状态 INIT: 申请中 SUCCESS:已确认 CLOSE: 已撤销 */ @ApiField("grant_status") private String grantStatus; /** * 标识商家授信额度的来源,具体的值由支付宝定义 */ @ApiField("merchant_credit_source") private String merchantCreditSource; /** * 商家授权开通账期的卖家userid */ @ApiField("merchant_user_id") private String merchantUserId; public void setBuyerCreditSource(String buyerCreditSource) { this.buyerCreditSource = buyerCreditSource; } public String getBuyerCreditSource( ) { return this.buyerCreditSource; } public void setBuyerUserId(String buyerUserId) { this.buyerUserId = buyerUserId; } public String getBuyerUserId( ) { return this.buyerUserId; } public void setCreditScene(String creditScene) { this.creditScene = creditScene; } public String getCreditScene( ) { return this.creditScene; } public void setGrantCreditQuota(String grantCreditQuota) { this.grantCreditQuota = grantCreditQuota; } public String getGrantCreditQuota( ) { return this.grantCreditQuota; } public void setGrantOperationNo(String grantOperationNo) { this.grantOperationNo = grantOperationNo; } public String getGrantOperationNo( ) { return this.grantOperationNo; } public void setGrantStatus(String grantStatus) { this.grantStatus = grantStatus; } public String getGrantStatus( ) { return this.grantStatus; } public void setMerchantCreditSource(String merchantCreditSource) { this.merchantCreditSource = merchantCreditSource; } public String getMerchantCreditSource( ) { return this.merchantCreditSource; } public void setMerchantUserId(String merchantUserId) { this.merchantUserId = merchantUserId; } public String getMerchantUserId( ) { return this.merchantUserId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
285c12a59584bc91210bd2c09f81e68b82e233f7
c8818b6d960ee028993c323b3ec14f9a6ff99019
/mes/src/main/java/com/hnu/mes/service/Menu1Service.java
daa5e455b049a267db639abf5c24a448d8becc74
[]
no_license
zhouweixin/myprojects
f2e44d6081acd38b7119b61128da77124ac2b2ce
bf2ffe22c48f5c02ff3794c67d81b8082091471c
refs/heads/master
2020-03-18T06:00:38.154440
2018-06-10T14:16:51
2018-06-10T14:16:51
134,372,424
3
4
null
null
null
null
UTF-8
Java
false
false
4,757
java
package com.hnu.mes.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Example; import org.springframework.data.domain.ExampleMatcher; import org.springframework.data.domain.ExampleMatcher.GenericPropertyMatchers; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort.Direction; import org.springframework.stereotype.Service; import com.hnu.mes.domain.Menu1; import com.hnu.mes.exception.EnumException; import com.hnu.mes.exception.MesException; import com.hnu.mes.repository.Menu1Repository; import org.springframework.transaction.annotation.Transactional; /** * * @author zhouweixin * */ @Service public class Menu1Service { // 注入 @Autowired private Menu1Repository menu1Repository; /** * 新增 * * @param menu1 * @return */ public Menu1 save(Menu1 menu1) { return menu1Repository.save(menu1); } /** * 删除 * * @param code */ public void delete(Integer code) { menu1Repository.delete(code); } /** * 查询 * * @param code * @return */ public Menu1 findOne(Integer code) { return menu1Repository.findOne(code); } /** * 通过编码更新名称和路径 * @param name * @param path * @param code */ @Transactional public void updateNameAndPathByCode(String name, String path, Integer code){ menu1Repository.updateNameAndPathByCode(name, path, code); } /** * 查询所有 * * @return */ public List<Menu1> findAll() { return menu1Repository.findAll(); } /** * 通过分页查询所有 * * @param page * 当前页 * @param size * 每页的记录数 * @param sortFieldName * 排序的字段名 * @param asc * 增序还是减序 * @return * @throws Exception */ public Page<Menu1> getMenu1ByPage(Integer page, Integer size, String sortFieldName, Integer asc) { // 判断字段名是否存在 try { Menu1.class.getDeclaredField(sortFieldName); } catch (Exception e) { throw new MesException(EnumException.SORT_FIELD); } Sort sort = null; if (asc == 0) { sort = new Sort(Direction.DESC, sortFieldName); } else { sort = new Sort(Direction.ASC, sortFieldName); } Pageable pageable = new PageRequest(page, size, sort); return menu1Repository.findAll(pageable); } /** * 通过名称模糊查询 * * @param name * 名称 * @param page * 当前页 * @param size * 每页的记录数 * @param sortFieldName * 排序的字段名 * @param asc * 增序或减序 * @return */ public Page<Menu1> findAllByLikeNameByPage(String name, Integer page, Integer size, String sortFieldName, Integer asc) { try { Menu1.class.getDeclaredField(sortFieldName); } catch (Exception e) { // 排序的字段名不存在 throw new MesException(EnumException.SORT_FIELD); } Sort sort = null; if (asc == 0) { sort = new Sort(Direction.DESC, sortFieldName); } else { sort = new Sort(Direction.ASC, sortFieldName); } // 分页 Pageable pageable = new PageRequest(page, size, sort); // 只匹配name,其它属性全都忽略 ExampleMatcher matcher = ExampleMatcher.matching().withMatcher("name", GenericPropertyMatchers.contains()) .withIgnorePaths("code", "info"); Menu1 menu1 = new Menu1(); menu1.setName(name); // 创建实例 Example<Menu1> example = Example.of(menu1, matcher); // 查询 return menu1Repository.findAll(example, pageable); } /** * 查询最大编码 * * @return */ public Integer findMaxCode() { return menu1Repository.findMaxCode(); } /** * 查询最大排序 * @return */ public Integer findMaxRank() { return menu1Repository.findMaxRank(); } }
[ "1216840597@qq.com" ]
1216840597@qq.com
9719d77625b225f732c427508891939098ebbb8e
478cf5d065526a8ecba4983f0b1a4d118177dd60
/src/com/tuziilm/searcher/mvc/AdScreenRuleController.java
6926c165e30d650ef2d20280556034d300ab003e
[]
no_license
tuziilm/searcher
cb5990f3fbbe9070fd074231f2790d4ef9888d32
db1e4b4fba2c1002c948bbaf1f9a881b333200a0
refs/heads/master
2016-09-03T07:07:34.878524
2016-03-07T09:19:08
2016-03-07T09:19:08
41,537,482
0
0
null
null
null
null
GB18030
Java
false
false
4,262
java
package com.tuziilm.searcher.mvc; import com.tuziilm.searcher.common.Paginator; import com.tuziilm.searcher.common.Query; import com.tuziilm.searcher.common.RemarkStatusForm; import com.tuziilm.searcher.common.SdkType; import com.tuziilm.searcher.domain.AdScreenPageRuleForExtend; import com.tuziilm.searcher.domain.AdScreenRule; import com.tuziilm.searcher.domain.InnerAdScreenPageRule; import com.tuziilm.searcher.service.AdScreenRuleService; import org.hibernate.validator.constraints.NotBlank; import org.hibernate.validator.constraints.NotEmpty; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.ObjectError; import org.springframework.web.bind.annotation.RequestMapping; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @Controller @RequestMapping("/ad_screen/rule") public class AdScreenRuleController extends CRUDController<AdScreenRule, AdScreenRuleService, AdScreenRuleController.Form, Query.NameQuery>{ public AdScreenRuleController() { super("ad_screen/rule"); } @Resource public void setAdScreenRuleService(AdScreenRuleService adScreenRuleService){ this.service=adScreenRuleService; } @Override protected boolean preList(int page, Paginator paginator, Query.NameQuery query, Model model) { paginator.setNeedTotal(true); return super.preList(page, paginator, query, model); } @Override protected void postCreate(Model model) { model.addAttribute("sdkTypeMap", SdkType.map); super.postCreate(model); } @Override protected void postModify(int id, AdScreenRule obj, Model model) { model.addAttribute("sdkTypeMap", SdkType.map); super.postModify(id, obj, model); } @Override public void innerSave(Form form, BindingResult errors, Model model, HttpServletRequest request, HttpServletResponse response) { AdScreenRule adScreenRule=form.toObj(); try{ service.saveOrUpdate(adScreenRule); } catch (Exception e) { errors.addError(new ObjectError("ex", e.getMessage())); } } public static class Form extends RemarkStatusForm<AdScreenRule> { @NotBlank(message = "名称不能为空") private String name; @NotBlank(message = "包名不能为空") private String pkgName; @NotEmpty(message = "页面规则不能为空") private AdScreenPageRuleForExtend[] pageRules; private InnerAdScreenPageRule[] innerPageRules; @Override public AdScreenRule newObj() { return new AdScreenRule(); } @Override public void populateObj(AdScreenRule adScreenRule) { adScreenRule.setName(name); adScreenRule.setPkgName(pkgName); adScreenRule.setPageRulesObject(pageRules); } public AdScreenPageRuleForExtend[] getPageRulesObject() { return pageRules; } public void setPageRulesObject(AdScreenPageRuleForExtend[] pageRules) { this.pageRules = pageRules; } public String getPageRules() { return AdScreenPageRuleForExtend.toJsonWithNoException(pageRules); } public void setPageRules(String pageRulesJson) { this.pageRules = AdScreenPageRuleForExtend.nullOnExceptionValueOf(pageRulesJson, AdScreenPageRuleForExtend[].class); if(pageRules==null || pageRules.length<1){ return; } innerPageRules = new InnerAdScreenPageRule[pageRules.length]; for(int i=0;i<pageRules.length;i++){ innerPageRules[i]=new InnerAdScreenPageRule(pageRules[i]); } } public InnerAdScreenPageRule[] getInnerPageRulesObject() { return innerPageRules; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPkgName() { return pkgName; } public void setPkgName(String pkgName) { this.pkgName = pkgName; } } }
[ "tuxw19900512@126.com" ]
tuxw19900512@126.com
bbe1cafc4ab8a3f404411f027530291df7f3ca76
219cbfd2b09c8989afbdcdd4198b77dd93799b1e
/develop/server/clientProject/client/src/main/java/com/home/client/tool/generate/HSceneRequestMaker.java
bee5aafa0bfdd9db5f98c4597add4996ae0f3d3a
[ "Apache-2.0" ]
permissive
shineTeam7/tank
2c9d6e1f01ebe6803731b520ce84eea52c593d2b
1d37e93474bc00ca3923be08d0742849c73f1049
refs/heads/master
2022-12-02T01:35:12.116350
2020-08-17T12:09:01
2020-08-17T12:09:01
288,139,019
2
1
null
null
null
null
UTF-8
Java
false
false
407
java
package com.home.client.tool.generate; import com.home.client.constlist.generate.HSceneRequestType; import com.home.shine.tool.CreateDataFunc; import com.home.shine.tool.DataMaker; /** (generated by shine) */ public class HSceneRequestMaker extends DataMaker { public HSceneRequestMaker() { offSet=HSceneRequestType.off; list=new CreateDataFunc[HSceneRequestType.count-offSet]; } }
[ "359944951@qq.com" ]
359944951@qq.com
92b7160462d6a2b802838f7d29ea70acd6a5bc42
fb475de230475bc6c8cb16243f2f584cd34e7b1d
/src/main/java/org/kwong/bishe/common/util/SHA1.java
28149772b10219ed44709f7ec707b73defaf4a79
[]
no_license
AlexanderKwong/bishe
0e840022bf036b5f6d69f95528bb191d0b68a0bf
4d1490d511ad16a8a02788d44972a5e171832fe2
refs/heads/master
2021-01-13T00:49:08.820083
2016-03-29T12:05:51
2016-03-29T12:05:51
54,706,431
0
2
null
2016-03-25T15:50:53
2016-03-25T08:43:18
Java
UTF-8
Java
false
false
6,315
java
package org.kwong.bishe.common.util; /** * @author */ public class SHA1 { private final int[] abcde = { 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 }; // 摘要数据存储数组 private int[] digestInt = new int[5]; // 计算过程中的临时数据存储数组 private int[] tmpData = new int[80]; // 计算sha-1摘要 private int process_input_bytes(byte[] bytedata) { // 初试化常量 System.arraycopy(abcde, 0, digestInt, 0, abcde.length); // 格式化输入字节数组,补10及长度数据 byte[] newbyte = byteArrayFormatData(bytedata); // 获取数据摘要计算的数据单元个数 int MCount = newbyte.length / 64; // 循环对每个数据单元进行摘要计算 for (int pos = 0; pos < MCount; pos++) { // 将每个单元的数据转换成16个整型数据,并保存到tmpData的前16个数组元素中 for (int j = 0; j < 16; j++) { tmpData[j] = byteArrayToInt(newbyte, (pos * 64) + (j * 4)); } // 摘要计算函数 encrypt(); } return 20; } // 格式化输入字节数组格式 private byte[] byteArrayFormatData(byte[] bytedata) { // 补0数量 int zeros = 0; // 补位后总位数 int size = 0; // 原始数据长度 int n = bytedata.length; // 模64后的剩余位数 int m = n % 64; // 计算添加0的个数以及添加10后的总长度 if (m < 56) { zeros = 55 - m; size = n - m + 64; } else if (m == 56) { zeros = 63; size = n + 8 + 64; } else { zeros = 63 - m + 56; size = (n + 64) - m + 64; } // 补位后生成的新数组内容 byte[] newbyte = new byte[size]; // 复制数组的前面部分 System.arraycopy(bytedata, 0, newbyte, 0, n); // 获得数组Append数据元素的位置 int l = n; // 补1操作 newbyte[l++] = (byte) 0x80; // 补0操作 for (int i = 0; i < zeros; i++) { newbyte[l++] = (byte) 0x00; } // 计算数据长度,补数据长度位共8字节,长整型 long N = (long) n * 8; byte h8 = (byte) (N & 0xFF); byte h7 = (byte) ((N >> 8) & 0xFF); byte h6 = (byte) ((N >> 16) & 0xFF); byte h5 = (byte) ((N >> 24) & 0xFF); byte h4 = (byte) ((N >> 32) & 0xFF); byte h3 = (byte) ((N >> 40) & 0xFF); byte h2 = (byte) ((N >> 48) & 0xFF); byte h1 = (byte) (N >> 56); newbyte[l++] = h1; newbyte[l++] = h2; newbyte[l++] = h3; newbyte[l++] = h4; newbyte[l++] = h5; newbyte[l++] = h6; newbyte[l++] = h7; newbyte[l++] = h8; return newbyte; } private int f1(int x, int y, int z) { return (x & y) | (~x & z); } private int f2(int x, int y, int z) { return x ^ y ^ z; } private int f3(int x, int y, int z) { return (x & y) | (x & z) | (y & z); } private int f4(int x, int y) { return (x << y) | x >>> (32 - y); } // 单元摘要计算函数 private void encrypt() { for (int i = 16; i <= 79; i++) { tmpData[i] = f4(tmpData[i - 3] ^ tmpData[i - 8] ^ tmpData[i - 14] ^ tmpData[i - 16], 1); } int[] tmpabcde = new int[5]; for (int i1 = 0; i1 < tmpabcde.length; i1++) { tmpabcde[i1] = digestInt[i1]; } for (int j = 0; j <= 19; j++) { int tmp = f4(tmpabcde[0], 5) + f1(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4] + tmpData[j] + 0x5a827999; tmpabcde[4] = tmpabcde[3]; tmpabcde[3] = tmpabcde[2]; tmpabcde[2] = f4(tmpabcde[1], 30); tmpabcde[1] = tmpabcde[0]; tmpabcde[0] = tmp; } for (int k = 20; k <= 39; k++) { int tmp = f4(tmpabcde[0], 5) + f2(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4] + tmpData[k] + 0x6ed9eba1; tmpabcde[4] = tmpabcde[3]; tmpabcde[3] = tmpabcde[2]; tmpabcde[2] = f4(tmpabcde[1], 30); tmpabcde[1] = tmpabcde[0]; tmpabcde[0] = tmp; } for (int l = 40; l <= 59; l++) { int tmp = f4(tmpabcde[0], 5) + f3(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4] + tmpData[l] + 0x8f1bbcdc; tmpabcde[4] = tmpabcde[3]; tmpabcde[3] = tmpabcde[2]; tmpabcde[2] = f4(tmpabcde[1], 30); tmpabcde[1] = tmpabcde[0]; tmpabcde[0] = tmp; } for (int m = 60; m <= 79; m++) { int tmp = f4(tmpabcde[0], 5) + f2(tmpabcde[1], tmpabcde[2], tmpabcde[3]) + tmpabcde[4] + tmpData[m] + 0xca62c1d6; tmpabcde[4] = tmpabcde[3]; tmpabcde[3] = tmpabcde[2]; tmpabcde[2] = f4(tmpabcde[1], 30); tmpabcde[1] = tmpabcde[0]; tmpabcde[0] = tmp; } for (int i2 = 0; i2 < tmpabcde.length; i2++) { digestInt[i2] = digestInt[i2] + tmpabcde[i2]; } for (int n = 0; n < tmpData.length; n++) { tmpData[n] = 0; } } // 4字节数组转换为整数 private int byteArrayToInt(byte[] bytedata, int i) { return ((bytedata[i] & 0xff) << 24) | ((bytedata[i + 1] & 0xff) << 16) | ((bytedata[i + 2] & 0xff) << 8) | (bytedata[i + 3] & 0xff); } // 整数转换为4字节数组 private void intToByteArray(int intValue, byte[] byteData, int i) { byteData[i] = (byte) (intValue >>> 24); byteData[i + 1] = (byte) (intValue >>> 16); byteData[i + 2] = (byte) (intValue >>> 8); byteData[i + 3] = (byte) intValue; } // 将字节转换为十六进制字符串 private static String byteToHexString(byte ib) { char[] Digit = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; char[] ob = new char[2]; ob[0] = Digit[(ib >>> 4) & 0X0F]; ob[1] = Digit[ib & 0X0F]; String s = new String(ob); return s; } // 将字节数组转换为十六进制字符串 private static String byteArrayToHexString(byte[] bytearray) { String strDigest = ""; for (int i = 0; i < bytearray.length; i++) { strDigest += byteToHexString(bytearray[i]); } return strDigest; } // 计算sha-1摘要,返回相应的字节数组 public byte[] getDigestOfBytes(byte[] byteData) { process_input_bytes(byteData); byte[] digest = new byte[20]; for (int i = 0; i < digestInt.length; i++) { intToByteArray(digestInt[i], digest, i * 4); } return digest; } // 计算sha-1摘要,返回相应的十六进制字符串 public String getDigestOfString(byte[] byteData) { return byteArrayToHexString(getDigestOfBytes(byteData)); } public static void main(String[] args) { String data = "123456"; LoggerUtil.info(data); String digest = new SHA1().getDigestOfString(data.getBytes()); LoggerUtil.info(digest); // LoggerUtil.info( ToMD5.convertSHA1(data).toUpperCase()); } }
[ "601828006@qq.com" ]
601828006@qq.com
3bd65bc788c1b5b187463a830458db777be9e480
3b5337924127d729725cc61485d3206440fce90a
/src/main/java/testing/annotations/DataSets.java
74560cc41c134fa965586c77cb9cbc7ed7a9c647
[]
no_license
prathapSEDT/javaRestAPI
5f4871eda5ed6eb04ff615d1be876a2c52ad0bb7
5d88af296a8200534ec435070886bc20f15c23fa
refs/heads/master
2023-02-27T14:46:45.928006
2021-02-01T15:21:59
2021-02-01T15:21:59
334,992,594
0
0
null
null
null
null
UTF-8
Java
false
false
390
java
package testing.annotations; import org.testng.annotations.DataProvider; public class DataSets { @DataProvider(name = "devCredentials") public Object[][] getTestData(){ Object[][] arr=new Object[2][2]; //0 arr[0][0]="User01"; arr[0][1]="Pass1234"; //1 arr[1][0]="User02"; arr[1][1]="Pass1234"; return arr; } }
[ "prathap.ufttest@gmail.com" ]
prathap.ufttest@gmail.com
42d0ff3af9096ac2aa515697f9cb3c8bce62e399
072d2dfada38fc3b0f5c32214a934c111af0e47f
/demo-sample/src/main/java/com/mic/xsample/adapter/BaseMenuAdapter.java
c3e1381d71af575b2d42e128ed3f257ff4cefe50
[]
no_license
lpjhblpj/FimicsPlayer
33e908fdc7a9aa0c288bc40a14eb98a3717043d9
455071e616282b07872943b4eec70f21ee8fb909
refs/heads/master
2020-03-25T07:03:30.372718
2019-02-17T15:18:40
2019-02-17T15:18:40
143,539,150
0
0
null
null
null
null
UTF-8
Java
false
false
727
java
package com.mic.xsample.adapter; import android.view.View; import android.view.ViewGroup; /** * Created by hcDarren on 2017/7/23. * 筛选菜单的 Adapter */ public abstract class BaseMenuAdapter { // 获取总共有多少条 public abstract int getCount(); // 获取当前的TabView public abstract View getTabView(int position, ViewGroup parent); // 获取当前的菜单内容 public abstract View getMenuView(int position,ViewGroup parent); /** * 菜单打开 * @param tabView */ public void menuOpen(View tabView) { } /** * 菜单关闭 * @param tabView */ public void menuClose(View tabView) { } }
[ "lpjhblpj@sina.com" ]
lpjhblpj@sina.com
ad6966749925c5bf67d1887c89fc945fe5e534d8
ac8d46f4a4207298f715a67eccf0d3c9b252123b
/samples/src/main/java/tk/zielony/carbonsamples/widget/BottomBarActivity.java
79b00e5cde4f6485221cff06418daf7d2e5946fe
[ "Apache-2.0" ]
permissive
MasterAlpha/Carbon
e7956345e1fad7c046f9246acb26cd29c64d8788
9bdb1357c73ec2d82bba17240cc578c73b528e19
refs/heads/master
2021-01-19T00:28:32.881082
2017-03-29T21:57:13
2017-03-29T21:57:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
package tk.zielony.carbonsamples.widget; import tk.zielony.carbonsamples.SamplesActivity; import android.os.Bundle; import carbon.widget.BottomBar; import tk.zielony.carbonsamples.R; /** * Created by Marcin on 2016-03-17. */ public class BottomBarActivity extends SamplesActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bottombar); BottomBar bottomBar = (BottomBar) findViewById(R.id.bottomBar); bottomBar.setMenu(R.menu.menu_navigation); } }
[ "niewartotupisac@gmail.com" ]
niewartotupisac@gmail.com
5af5a6b3a8e7c30bc25879d4ac698c91f705df4f
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/89/org/apache/commons/math/linear/decomposition/EigenDecompositionImpl_getDeterminant_351.java
f3700c674af54d13ee70f4ef7867b3618750b97a
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,265
java
org apach common math linear decomposit calcul eigen decomposit strong symmetr strong matrix eigen decomposit matrix set matric time matric support strong symmetr strong matric comput real real eigenvalu realeigenvalu impli matrix return link getd diagon imaginari valu return link imag eigenvalu getimageigenvalu link imag eigenvalu getimageigenvalu call link real matrix realmatrix argument implement upper part matrix part diagon access eigenvalu comput matrix decompos eigenvector comput requir link eigenvector geteigenvector link getv link getvt link solver getsolv method call implement base inderjit singh dhillon thesi href http www utexa user inderjit paper thesi pdf algorithm symmetr tridiagon eigenvalu eigenvector problem beresford parlett osni marqu paper href http www netlib org lapack lawnspdf lawn155 pdf implement dqd algorithm posit case lapack routin dlarr dlasq2 dlazq3 dlazq4 dlasq5 dlasq6 author beresford parlett univers california berkelei usa fortran version author jim demmel univers california berkelei usa fortran version author inderjit dhillon univers texa austin usa fortran version author osni marqu lbnl nersc usa fortran version author christof voemel univers california berkelei usa fortran version version revis date eigen decomposit impl eigendecompositionimpl eigen decomposit eigendecomposit return determin matrix determin matrix determin getdetermin determin lambda real eigenvalu realeigenvalu determin lambda determin
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
2ef2e6efa91bfb1fcb59859d0aa2d16b423b6301
ef4759349c18275d5b1e648ed86e1a8a3732cd18
/module-msg/src/main/java/com/benwunet/msg/section/group/adapter/SharedFilesAdapter.java
120a43d6415102fc3c0649d0440e43f6318a9114
[ "Apache-2.0" ]
permissive
subenli115/ebc
b889fb8d233ffd077d2331721e3b0e91e8136ea6
affa42277d8a24b637d6f4c3adc4aec331ee87e7
refs/heads/master
2023-01-31T10:07:47.472109
2020-12-14T11:25:24
2020-12-14T11:25:24
304,847,248
0
0
null
null
null
null
UTF-8
Java
false
false
1,565
java
package com.benwunet.msg.section.group.adapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import com.benwunet.msg.R; import com.hyphenate.chat.EMMucSharedFile; import com.hyphenate.easeui.adapter.EaseBaseRecyclerViewAdapter; import com.hyphenate.util.TextFormater; import java.util.Date; public class SharedFilesAdapter extends EaseBaseRecyclerViewAdapter<EMMucSharedFile> { @Override public ViewHolder getViewHolder(ViewGroup parent, int viewType) { return new MyViewHolder(LayoutInflater.from(mContext).inflate(R.layout.demo_layout_item_shared_file_row, parent, false)); } private class MyViewHolder extends ViewHolder<EMMucSharedFile> { private TextView tvFileName; private TextView tvFileSize; private TextView tvUpdateTime; public MyViewHolder(@NonNull View itemView) { super(itemView); } @Override public void initView(View itemView) { tvFileName = findViewById(R.id.tv_file_name); tvFileSize = findViewById(R.id.tv_file_size); tvUpdateTime = findViewById(R.id.tv_update_time); } @Override public void setData(EMMucSharedFile item, int position) { tvFileName.setText(item.getFileName()); tvFileSize.setText(TextFormater.getDataSize(item.getFileSize())); tvUpdateTime.setText(new Date(item.getFileUpdateTime()).toString()); } } }
[ "66225303" ]
66225303
11d830e6c338b90a8a56d6215b738b49b3abb27f
5a9cab8d0be9bfc2ca538b5a207e022892279edb
/etl/src/main/java/com/cezarykluczynski/stapi/etl/food/creation/processor/FoodProcessor.java
c265ecc943d56a891d3df3f507934d10897275a1
[ "MIT" ]
permissive
mklucz/stapi
c27dffed3e82a8482d657876d072f6b24748c4bb
b929f8334253f16e349a7d303ff6f758df52dbce
refs/heads/master
2020-03-07T14:30:45.304073
2018-03-11T15:12:22
2018-03-11T15:12:22
127,528,344
0
0
MIT
2018-03-31T12:04:49
2018-03-31T12:02:42
Groovy
UTF-8
Java
false
false
703
java
package com.cezarykluczynski.stapi.etl.food.creation.processor; import com.cezarykluczynski.stapi.etl.page.common.processor.PageHeaderProcessor; import com.cezarykluczynski.stapi.model.food.entity.Food; import com.cezarykluczynski.stapi.sources.mediawiki.dto.PageHeader; import com.google.common.collect.Lists; import org.springframework.batch.item.support.CompositeItemProcessor; import org.springframework.stereotype.Service; @Service public class FoodProcessor extends CompositeItemProcessor<PageHeader, Food> { public FoodProcessor(PageHeaderProcessor pageHeaderProcessor, FoodPageProcessor foodPageProcessor) { setDelegates(Lists.newArrayList(pageHeaderProcessor, foodPageProcessor)); } }
[ "cezary.kluczynski@gmail.com" ]
cezary.kluczynski@gmail.com
ae102c538befb40e87d57651594471d2db95dd11
ca0e9689023cc9998c7f24b9e0532261fd976e0e
/src/com/tencent/mm/protocal/b/als.java
2c3067549ecec215a78190433ceca6b677be0103
[]
no_license
honeyflyfish/com.tencent.mm
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
ce6e605ff98164359a7073ab9a62a3f3101b8c34
refs/heads/master
2020-03-28T15:42:52.284117
2016-07-19T16:33:30
2016-07-19T16:33:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,233
java
package com.tencent.mm.protocal.b; import a.a.a.b; import java.util.LinkedList; public final class als extends adm { public String hRp; public int hjV; public int hjW; public String hql; public String hqm; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (a.a.a.c.a)paramVarArgs[0]; if (hLQ == null) { throw new b("Not all required fields were included: BaseResponse"); } if (hLQ != null) { paramVarArgs.bN(1, hLQ.kS()); hLQ.a(paramVarArgs); } paramVarArgs.bM(2, hjV); paramVarArgs.bM(3, hjW); if (hRp != null) { paramVarArgs.U(4, hRp); } if (hql != null) { paramVarArgs.U(5, hql); } if (hqm != null) { paramVarArgs.U(6, hqm); } return 0; } if (paramInt == 1) { if (hLQ == null) { break label548; } } label548: for (paramInt = a.a.a.a.bJ(1, hLQ.kS()) + 0;; paramInt = 0) { int i = paramInt + a.a.a.a.bI(2, hjV) + a.a.a.a.bI(3, hjW); paramInt = i; if (hRp != null) { paramInt = i + a.a.a.b.b.a.T(4, hRp); } i = paramInt; if (hql != null) { i = paramInt + a.a.a.b.b.a.T(5, hql); } paramInt = i; if (hqm != null) { paramInt = i + a.a.a.b.b.a.T(6, hqm); } return paramInt; if (paramInt == 2) { paramVarArgs = new a.a.a.a.a((byte[])paramVarArgs[0], hfZ); for (paramInt = adm.a(paramVarArgs); paramInt > 0; paramInt = adm.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.aVo(); } } if (hLQ != null) { break; } throw new b("Not all required fields were included: BaseResponse"); } if (paramInt == 3) { Object localObject1 = (a.a.a.a.a)paramVarArgs[0]; als localals = (als)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; case 1: paramVarArgs = ((a.a.a.a.a)localObject1).pL(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new ck(); localObject2 = new a.a.a.a.a((byte[])localObject2, hfZ); for (boolean bool = true; bool; bool = ((ck)localObject1).a((a.a.a.a.a)localObject2, (com.tencent.mm.al.a)localObject1, adm.a((a.a.a.a.a)localObject2))) {} hLQ = ((ck)localObject1); paramInt += 1; } case 2: hjV = jMD.aVp(); return 0; case 3: hjW = jMD.aVp(); return 0; case 4: hRp = jMD.readString(); return 0; case 5: hql = jMD.readString(); return 0; } hqm = jMD.readString(); return 0; } return -1; } } } /* Location: * Qualified Name: com.tencent.mm.protocal.b.als * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
c687c87b7b9fe879c15c2150655cdb624625225c
610c710ce76b653a9ed65bf2e911cd42d3b877c6
/backend/src/main/java/edu/cad/documentelements/areas/k3/K3ExamWorkArea.java
cea5c5e04bce58f9e323b163e4f53c28f420c9d4
[]
no_license
buhaiovos/documentation2
a9c61268218e385f04531ae790eee87f0d6b28fe
b67e540233154d80cb76386a98f64ceb92f6fb4b
refs/heads/master
2023-04-28T00:20:26.008031
2021-06-24T13:57:19
2021-06-24T13:57:19
141,030,701
0
0
null
2023-04-26T10:56:17
2018-07-15T13:45:52
Java
UTF-8
Java
false
false
4,319
java
package edu.cad.documentelements.areas.k3; import edu.cad.documentelements.k3columns.AbstractOtherLoadColumn; import edu.cad.domain.ObjectOfWork; import edu.cad.domain.QualificationLevel; import edu.cad.entities.AcademicGroup; import edu.cad.entities.OtherLoad; import edu.cad.entities.OtherLoadInfo; import edu.cad.entities.WorkingPlan; import edu.cad.study.workingplan.WorkingPlanService; import org.apache.poi.ss.usermodel.Row; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.ToIntFunction; import static edu.cad.domain.OtherLoadType.EXAM_COMMISSION_DIPLOMA; import static edu.cad.domain.QualificationLevel.*; import static java.util.stream.Collectors.toList; @SuppressWarnings("Duplicates") public class K3ExamWorkArea extends K3OtherStudyLoadArea { private static final String BACHELORS_DEFENCE = "#k3(O)exManDefBach"; private static final String PROF_MASTERS_DEFENCE = "#k3(O)exManDefProfMas"; private static final String SCI_MASTERS_DEFENCE = "#k3(O)exManDefSciMas"; private WorkingPlanService workingPlanService; public K3ExamWorkArea(Map<Integer, List<AbstractOtherLoadColumn>> semesterNumToColumns) { super(semesterNumToColumns); acceptableTokens.add(BACHELORS_DEFENCE); acceptableTokens.add(PROF_MASTERS_DEFENCE); acceptableTokens.add(SCI_MASTERS_DEFENCE); } @Override protected void fill() { fillRow(tokenToRow.get(BACHELORS_DEFENCE), BACHELOR); fillRow(tokenToRow.get(PROF_MASTERS_DEFENCE), PROF_MASTER); fillRow(tokenToRow.get(SCI_MASTERS_DEFENCE), SCI_MASTER); } private void fillRow(Row row, QualificationLevel qualificationLevel) { OtherLoadInfo otherLoadInfo = getOtherLoadInfo(qualificationLevel); semesterNumToColumns.get(otherLoadInfo.getSemester()) .forEach(column -> column.fill(row, otherLoadInfo)); otherLoadInfoDao.save(otherLoadInfo); } private OtherLoadInfo getOtherLoadInfo(QualificationLevel qualificationLevel) { List<AcademicGroup> groups = getMatchingGroups(qualificationLevel); OtherLoad otherLoad = getOrCreateLoadHeader(qualificationLevel); return getOrCreateLoadInfo(qualificationLevel, groups, otherLoad); } private List<AcademicGroup> getMatchingGroups(QualificationLevel qualificationLevel) { ToIntFunction<AcademicGroup> studentsNumExtractor = sourceOfFinancing.studentNumberGetter(); return workingPlanService.getAll().stream() .filter(workingPlan -> Objects.nonNull(workingPlan.getStateCertification())) .map(WorkingPlan::getGroups) .flatMap(Set::stream) .filter(group -> group.getQualification().getId() == qualificationLevel.getDbId() && studentsNumExtractor.applyAsInt(group) > 0) .collect(toList()); } private OtherLoad getOrCreateLoadHeader(QualificationLevel qualificationLevel) { ObjectOfWork objectOfWork = qualificationLevel.getObjectOfWork(); return otherLoadDao.findByLoadTypeAndObjectOfWork(EXAM_COMMISSION_DIPLOMA, objectOfWork) .orElseGet(() -> createAndSaveOtherLoad(EXAM_COMMISSION_DIPLOMA, objectOfWork)); } private OtherLoadInfo getOrCreateLoadInfo(QualificationLevel qualificationLevel, List<AcademicGroup> groups, OtherLoad otherLoad) { final int semester = getSemesterForQualification(qualificationLevel); OtherLoadInfo info = otherLoadInfoDao.findByLoadHeaderAndSemesterAndEducationFormAndSourceOfFinancing( otherLoad, semester, educationForm, sourceOfFinancing ).orElseGet(() -> createAndSaveNewOtherLoadInfo(semester, groups, "ІПСА", -1, otherLoad)); info.setGroups(groups); // in case record in db exists but groups were updated return info; } private int getSemesterForQualification(QualificationLevel qualificationLevel) { return switch (qualificationLevel) { case BACHELOR, SCI_MASTER, MASTER -> 2; case SPECIALIST, PROF_MASTER -> 1; default -> throw new UnsupportedOperationException(qualificationLevel.name() + " is not supported"); }; } }
[ "oleksandr.buhaiov@gmail.com" ]
oleksandr.buhaiov@gmail.com
cd95ae596342ededfa7d31708ce7fc8074769d78
87bb954f36d60c05f72422ce46a5f2a208bf44e8
/emulator/src/vidhrdw/congo.java
4152b289e7d81bff10f7a986e2e3ca3da12d4201
[]
no_license
luxiaoming/arcadeflex029
b1b5a31497981771be811c15765eab173a4cdf8f
7ace5a0e72a0dc84e30d1e220ba08cbeeb709a62
refs/heads/master
2021-05-05T01:26:37.868452
2013-05-28T14:14:54
2013-05-28T14:14:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,302
java
/* This file is part of Arcadeflex. Arcadeflex 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. Arcadeflex 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 Arcadeflex. If not, see <http://www.gnu.org/licenses/>. */ /* * ported to v0.28 * ported to v0.27 * * * */ package vidhrdw; import static arcadeflex.libc.*; import static arcadeflex.osdepend.*; import static mame.common.*; import static mame.commonH.*; import static mame.driverH.*; import static mame.mame.*; import static mame.osdependH.*; import static vidhrdw.generic.*; public class congo { public static CharPtr congo_background_position = new CharPtr(); public static CharPtr congo_background_enable = new CharPtr(); static osd_bitmap backgroundbitmap; /*************************************************************************** Start the video hardware emulation. ***************************************************************************/ public static VhStartPtr congo_vh_start = new VhStartPtr() { public int handler() { int offs; int sx, sy; osd_bitmap prebitmap; if (generic_vh_start.handler() != 0) return 1; /* large bitmap for the precalculated background */ if ((backgroundbitmap = osd_create_bitmap(512, 2303+32)) == null) { generic_vh_stop.handler(); return 1; } /* create a temporary bitmap to prepare the background before converting it */ if ((prebitmap = osd_create_bitmap(4096, 256)) == null) { osd_free_bitmap(backgroundbitmap); backgroundbitmap = null; generic_vh_stop.handler(); return 1; } /* prepare the background */ for (offs = 0;offs < 0x4000;offs++) { sx = 8 * (511 - offs / 32); sy = 8 * (offs % 32); drawgfx(prebitmap, Machine.gfx[2], Machine.memory_region[2][offs] + 256 * (Machine.memory_region[2][0x4000 + offs] & 3), Machine.memory_region[2][0x4000 + offs] >> 4, 0, 0, sx, sy, null, TRANSPARENCY_NONE, 0); } /* the background is stored as a rectangle, but is drawn by the hardware skewed: */ /* go right two pixels, then up one pixel. Doing the conversion at run time would */ /* be extremely expensive, so we do it now. To save memory, we squash the image */ /* horizontally (doing line shifts at run time is much less expensive than doing */ /* column shifts) */ for (offs = -510;offs < 4096;offs += 2) { sy = (2302-510/2) - offs/2; for (sx = 0;sx < 512;sx += 2) { if (offs + sx < 0 || offs + sx >= 4096) { backgroundbitmap.line[sy][sx] = Machine.pens[0]; backgroundbitmap.line[sy][sx+1] = Machine.pens[0]; } else { backgroundbitmap.line[sy][sx] = prebitmap.line[sx/2][offs + sx]; backgroundbitmap.line[sy][sx+1] = prebitmap.line[sx/2][offs + sx+1]; } } } osd_free_bitmap(prebitmap); prebitmap = null; /* free the graphics ROMs, they are no longer needed */ Machine.memory_region[2] = null; return 0; } }; /*************************************************************************** Stop the video hardware emulation. ***************************************************************************/ public static VhStopPtr congo_vh_stop = new VhStopPtr() { public void handler() { osd_free_bitmap(backgroundbitmap); backgroundbitmap = null; generic_vh_stop.handler(); } }; /*************************************************************************** Draw the game screen in the given osd_bitmap. Do NOT call osd_update_display() from this function, it will be called by the main emulation engine. ***************************************************************************/ static int sprpri[] = new int[0x100]; /* this really should not be more * than 0x1e, but I did not want to check * for 0xff which is set when sprite is off * -V- */ public static VhUpdatePtr congo_vh_screenrefresh = new VhUpdatePtr() { public void handler(osd_bitmap bitmap) { int offs, i; /* copy the background */ if (congo_background_enable.read() != 0) { int skew, scroll; rectangle clip = new rectangle(); clip.min_x = Machine.drv.visible_area.min_x; clip.max_x = Machine.drv.visible_area.max_x; scroll = 1023+63 - (congo_background_position.read(0) + 256*congo_background_position.read(1)); skew = 128; for (i = 0;i < 256-2*8;i++) { clip.min_y = i; clip.max_y = i; copybitmap(bitmap, backgroundbitmap, 0, 0, skew, -scroll, clip, TRANSPARENCY_NONE, 0); skew -= 2; } } else osd_clearbitmap(bitmap); /* Draw the sprites. Note that it is important to draw them exactly in this */ /* order, to have the correct priorities. */ /* Sprites actually start at 0xff * [0xc031], it seems to be static tho'*/ /* The number of active sprites is stored at 0xc032 */ for (offs = 0x1e * 0x20 ;offs >= 0x00 ;offs -= 0x20) sprpri[ spriteram.read(offs+1) ] = offs; for (i=0x1e ; i>=0; i--) { offs = sprpri[i]; if (spriteram.read(offs+2) != 0xff) { drawgfx(bitmap, Machine.gfx[1], spriteram.read(offs+2+1)& 0x7f, spriteram.read(offs+2+2), spriteram.read(offs+2+1) & 0x80, spriteram.read(offs+2+2) & 0x80, spriteram.read(offs+2) - 16, ((spriteram.read(offs+2+3) + 16) & 0xff) - 31, Machine.drv.visible_area, TRANSPARENCY_PEN, 0); } } /* draw the frontmost playfield. They are characters, but draw them as sprites */ for (offs = 0;offs < videoram_size[0];offs++) { int sx,sy; sx = 8 * (31 - offs / 32); sy = 8 * (offs % 32); if (videoram.read(offs) != 0x60) /* don't draw spaces */ drawgfx(bitmap, Machine.gfx[0], videoram.read(offs), colorram.read(offs), 0, 0, sx, sy, Machine.drv.visible_area, TRANSPARENCY_PEN, 0); } } }; }
[ "giorgosmrls@gmail.com" ]
giorgosmrls@gmail.com
70a5548262a3c7f16377f266a43fa311db0c6d9b
c7746fbbfdcb16524580a9c631d0b787692216a1
/dds-bindings/src/main/java/org/openfmb/model/dds/rti/solar/SolarCapabilityModuleDataReader.java
b4a5021c6771de0674a437cd026a4486a1cfae86
[ "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
gec/openfmb-sgip
ebc49e87425b8d5fd955b66326526da6b4568006
34bea83fa873cd32fbaa3d34f910460c89ae935c
refs/heads/master
2021-01-10T11:20:27.341369
2015-09-30T16:14:58
2015-09-30T16:14:58
43,443,258
3
0
null
null
null
null
UTF-8
Java
false
false
6,009
java
/* WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY. This file was generated from .idl using "rtiddsgen". The rtiddsgen tool is part of the RTI Connext distribution. For more information, type 'rtiddsgen -help' at a command shell or consult the RTI Connext manual. */ package org.openfmb.model.dds.rti.solar; import com.rti.dds.infrastructure.InstanceHandle_t; import com.rti.dds.subscription.DataReaderImpl; import com.rti.dds.subscription.DataReaderListener; import com.rti.dds.subscription.ReadCondition; import com.rti.dds.subscription.SampleInfo; import com.rti.dds.subscription.SampleInfoSeq; import com.rti.dds.topic.TypeSupportImpl; // =========================================================================== /** * A reader for the SolarCapabilityModule user type. */ public class SolarCapabilityModuleDataReader extends DataReaderImpl { // ----------------------------------------------------------------------- // Public Methods // ----------------------------------------------------------------------- public void read(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states) { read_untyped(received_data, info_seq, max_samples, sample_states, view_states, instance_states); } public void take(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, int sample_states, int view_states, int instance_states) { take_untyped(received_data, info_seq, max_samples, sample_states, view_states, instance_states); } public void read_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition condition) { read_w_condition_untyped(received_data, info_seq, max_samples, condition); } public void take_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, ReadCondition condition) { take_w_condition_untyped(received_data, info_seq, max_samples, condition); } public void read_next_sample(SolarCapabilityModule received_data, SampleInfo sample_info) { read_next_sample_untyped(received_data, sample_info); } public void take_next_sample(SolarCapabilityModule received_data, SampleInfo sample_info) { take_next_sample_untyped(received_data, sample_info); } public void read_instance(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states) { read_instance_untyped(received_data, info_seq, max_samples, a_handle, sample_states, view_states, instance_states); } public void take_instance(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states) { take_instance_untyped(received_data, info_seq, max_samples, a_handle, sample_states, view_states, instance_states); } public void read_instance_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition condition) { read_instance_w_condition_untyped(received_data, info_seq, max_samples, a_handle, condition); } public void take_instance_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition condition) { take_instance_w_condition_untyped(received_data, info_seq, max_samples, a_handle, condition); } public void read_next_instance(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states) { read_next_instance_untyped(received_data, info_seq, max_samples, a_handle, sample_states, view_states, instance_states); } public void take_next_instance(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, int sample_states, int view_states, int instance_states) { take_next_instance_untyped(received_data, info_seq, max_samples, a_handle, sample_states, view_states, instance_states); } public void read_next_instance_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition condition) { read_next_instance_w_condition_untyped(received_data, info_seq, max_samples, a_handle, condition); } public void take_next_instance_w_condition(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq, int max_samples, InstanceHandle_t a_handle, ReadCondition condition) { take_next_instance_w_condition_untyped(received_data, info_seq, max_samples, a_handle, condition); } public void return_loan(SolarCapabilityModuleSeq received_data, SampleInfoSeq info_seq) { return_loan_untyped(received_data, info_seq); } public void get_key_value(SolarCapabilityModule key_holder, InstanceHandle_t handle){ get_key_value_untyped(key_holder, handle); } public InstanceHandle_t lookup_instance(SolarCapabilityModule key_holder) { return lookup_instance_untyped(key_holder); } // ----------------------------------------------------------------------- // Package Methods // ----------------------------------------------------------------------- // --- Constructors: ----------------------------------------------------- /*package*/ SolarCapabilityModuleDataReader (long native_reader, DataReaderListener listener, int mask, TypeSupportImpl data_type) { super(native_reader, listener, mask, data_type); } }
[ "devans@greenenergycorp.com" ]
devans@greenenergycorp.com
f3d058fd6b7fa07f36581984dbe7f8d1fa108900
267ccb51333f528a50f2f8720fe989437596fd2b
/oncecloud-docker-api/src/main/java/com/github/dockerjava/jaxrs/RemoveContainerCmdExec.java
d2ff1b8375f4618121697fe2647e2d524a2c9dc5
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
XJW163/OnceCloud
55e393175b3073f94c074b2458b7cc25d7683081
7400154f41021704cd7eedec88489916b6d9eefb
refs/heads/master
2021-05-30T05:28:44.261493
2015-12-22T12:07:43
2015-12-22T12:07:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package com.github.dockerjava.jaxrs; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.dockerjava.api.command.RemoveContainerCmd; public class RemoveContainerCmdExec extends AbstrDockerCmdExec<RemoveContainerCmd, Void> implements RemoveContainerCmd.Exec { private static final Logger LOGGER = LoggerFactory.getLogger(RemoveContainerCmdExec.class); public RemoveContainerCmdExec(WebTarget baseResource) { super(baseResource); } @Override protected Void execute(RemoveContainerCmd command) { WebTarget webResource = getBaseResource().path("/containers/" + command.getContainerId()) .queryParam("v", command.hasRemoveVolumesEnabled() ? "1" : "0") .queryParam("force", command.hasForceEnabled() ? "1" : "0"); LOGGER.trace("DELETE: {}", webResource); webResource.request().accept(MediaType.APPLICATION_JSON).delete().close(); return null; } }
[ "guzychina@163.com" ]
guzychina@163.com
d7e6f11c1d25fc0a6be33456ba2a561030546d88
6c0d4f3828966746d72471b2131f68a05b4036bf
/src/java/framework/com/topvision/framework/web/dhtmlx/DefaultDhtmlxHandler.java
64b6728d8491bb546c98da991295325a8d3a7e80
[]
no_license
kevinXiao2016/topvision-server
b5b97de7436edcae94ad2648bce8a34759f7cf0b
b5934149c50f22661162ac2b8903b61a50bc63e9
refs/heads/master
2020-04-12T00:54:33.351152
2018-12-18T02:16:14
2018-12-18T02:16:14
162,215,931
0
1
null
null
null
null
UTF-8
Java
false
false
1,861
java
/** * */ package com.topvision.framework.web.dhtmlx; import java.util.HashMap; import java.util.List; import java.util.Map; import org.dom4j.Element; import com.topvision.framework.domain.TreeEntity; /** * @author niejun * */ public abstract class DefaultDhtmlxHandler implements DhtmlxHandler { private List<? extends TreeEntity> data = null; public DefaultDhtmlxHandler() { } /** * * @param list */ public DefaultDhtmlxHandler(List<? extends TreeEntity> list) { setData(list); } @Override public abstract Element buildElement(Object obj); public List<? extends TreeEntity> getData() { return data; } @Override public void handle(Element root) { if (data == null) { return; } Map<String, Element> map = new HashMap<String, Element>(); map.put("", root); map.put("0", root); map.put("-1", root); int size = data.size(); for (int i = 0; i < size; i++) { Object obj = data.get(i); if (obj instanceof TreeEntity) { TreeEntity entity = (TreeEntity) obj; Element cElement = buildElement(obj); if (cElement == null) { continue; } map.put(entity.getId(), cElement); Element pElement = map.get(entity.getParentId()); if (pElement == null) { root.add(cElement); } else { pElement.add(cElement); } } else { throw new DhtmlxTreeException(obj.getClass() + " is not TreeEntity."); } } map.clear(); map = null; } public void setData(List<? extends TreeEntity> data) { this.data = data; } }
[ "785554043@qq.com" ]
785554043@qq.com
2fab9afb62f391e7de4cee8feabce5664d28c1e8
67d1fd9f1e7ac96b36783cad1ee8b4b2a0f63dd8
/第十一模块/模块一/code/edu-user-boot/edu-user-boot-impl/src/main/java/com/lagou/edu/user/remote/VerificationCodeRemoteServiceImpl.java
a84cf8af6fc7edb3437727d15f2c6a303938135f
[]
no_license
codeChengWenY/one_homework
a789f1afb8f511d2f2c6ead64ff8f51e36230634
efa654d87d37a28935ba46cf685c2382b31619fe
refs/heads/master
2023-08-23T22:39:26.373016
2021-10-19T09:19:23
2021-10-19T09:19:23
373,065,200
0
1
null
null
null
null
UTF-8
Java
false
false
2,029
java
package com.lagou.edu.user.remote; import com.lagou.edu.user.api.remote.VerificationCodeRemoteService; import com.lagou.edu.user.exception.ExpireCodeRuntimeException; import com.lagou.edu.user.exception.IncorrectCodeRuntimteException; import com.lagou.edu.user.service.IPhoneVerificationCodeService; import edu.response.ResponseDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/user/vfcode") public class VerificationCodeRemoteServiceImpl implements VerificationCodeRemoteService { @Autowired private IPhoneVerificationCodeService verificationCodeService; @RequestMapping(value = "/sendCode") public ResponseDTO sendCode(String telephone) { ResponseDTO responseDTO = null; try { boolean res = verificationCodeService.save(telephone); responseDTO = ResponseDTO.success("发送成功"); }catch (Exception e){ e.printStackTrace(); responseDTO = ResponseDTO.ofError(e.getMessage()); } return responseDTO; } @RequestMapping(value = "/checkCode") /* 验证码不正确,设置状态码为203 验证码过期,设置状态码为204 */ public ResponseDTO checkCode(String telephone, String code) { ResponseDTO responseDTO = null; try { boolean checkCode = verificationCodeService.checkCode(telephone, code); responseDTO = ResponseDTO.success("验证成功"); }catch (IncorrectCodeRuntimteException e){ responseDTO = ResponseDTO.response(203,e.getMessage(),null); }catch (ExpireCodeRuntimeException e){ responseDTO = ResponseDTO.response(204,e.getMessage(),null); }catch (Exception e){ e.printStackTrace(); responseDTO = ResponseDTO.ofError(e.getMessage()); } return responseDTO; } }
[ "1042732167@qq.com" ]
1042732167@qq.com
cac5ab224092b96c350fbc5c927e8bf4011a07d6
a3bd3b51694c78649560a40f91241fda62865b18
/src/test/java/com/alibaba/druid/bvt/sql/mysql/param/MySqlParameterizedOutputVisitorTest_23.java
1c9501151f3c5b1cff199faa56c527d98216ebc2
[ "Apache-2.0" ]
permissive
kerry8899/druid
e96d7ccbd03353e47a97bea8388d46b2fe173f61
a7cd07aac11c49d4d7d3e1312c97b6513efd2daa
refs/heads/master
2021-01-23T02:00:33.500852
2019-03-29T10:14:34
2019-03-29T10:14:34
85,957,671
0
0
null
2017-03-23T14:14:01
2017-03-23T14:14:01
null
UTF-8
Java
false
false
2,328
java
package com.alibaba.druid.bvt.sql.mysql.param; import com.alibaba.druid.sql.SQLUtils; import com.alibaba.druid.sql.ast.SQLStatement; import com.alibaba.druid.sql.parser.SQLParserUtils; import com.alibaba.druid.sql.parser.SQLStatementParser; import com.alibaba.druid.sql.visitor.ParameterizedOutputVisitorUtils; import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor; import com.alibaba.druid.util.JdbcConstants; import junit.framework.TestCase; import java.util.ArrayList; import java.util.List; /** * Created by wenshao on 16/8/23. */ public class MySqlParameterizedOutputVisitorTest_23 extends TestCase { public void test_for_parameterize() throws Exception { final String dbType = JdbcConstants.MYSQL; String sql = "select `wmc_xxx_s`.fid from `wmc_xxx_s_0479` as `wmc_xxx_s` where `wmc_xxx_s`.fid = 3"; String psql = ParameterizedOutputVisitorUtils.parameterize(sql, dbType); assertEquals("SELECT `wmc_xxx_s`.fid\n" + "FROM wmc_xxx_s `wmc_xxx_s`\n" + "WHERE `wmc_xxx_s`.fid = ?", psql); SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(psql, dbType); List<SQLStatement> stmtList = parser.parseStatementList(); StringBuilder out = new StringBuilder(); SQLASTOutputVisitor visitor = SQLUtils.createOutputVisitor(out, JdbcConstants.MYSQL); List<Object> parameters = new ArrayList<Object>(); visitor.setParameterized(true); visitor.setParameterizedMergeInList(true); visitor.setParameters(parameters); visitor.setExportTables(true); /*visitor.setPrettyFormat(false);*/ SQLStatement stmt = stmtList.get(0); stmt.accept(visitor); // System.out.println(parameters); assertEquals(0, parameters.size()); StringBuilder buf = new StringBuilder(); SQLASTOutputVisitor visitor1 = SQLUtils.createOutputVisitor(buf, dbType); visitor1.addTableMapping("wmc_xxx_s", "wmc_xxx_s_0479"); visitor1.setParameters(visitor.getParameters()); stmt.accept(visitor1); assertEquals("SELECT `wmc_xxx_s`.fid\n" + "FROM wmc_xxx_s_0479 `wmc_xxx_s`\n" + "WHERE `wmc_xxx_s`.fid = ?", buf.toString()); } }
[ "372822716@qq.com" ]
372822716@qq.com