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
2d399153d202933506027cf49240e9a9a594e9bd
bac458021ad0f74f3d5798cc911e218105490dc1
/juzss_crm1/src/com/juzss/crm/domain/LinkMan.java
8eb3e48c6a84b5bb92228399f8ad0c641ead06c5
[]
no_license
sushaoqi/juzssCrm
43a6a47da99e966654b28fe328e07a2e0a65602e
4d6384fd9695e2223a0d8dd36e60085df00dde8a
refs/heads/master
2020-03-21T07:25:06.403531
2018-06-22T08:59:40
2018-06-22T08:59:40
138,276,570
0
0
null
null
null
null
UTF-8
Java
false
false
2,167
java
package com.juzss.crm.domain; public class LinkMan { private Long lkm_id; private String lkm_name; private String lkm_gender; private String lkm_phone; private String lkm_mobile; private String lkm_email; private String lkm_qq; private String lkm_position; private String lkm_memo; private String lkm_hobby; /* * 联系人的客户对象 * */ private Customer customer; public Long getLkm_id() { return lkm_id; } public void setLkm_id(Long lkm_id) { this.lkm_id = lkm_id; } public String getLkm_name() { return lkm_name; } public void setLkm_name(String lkm_name) { this.lkm_name = lkm_name; } public String getLkm_gender() { return lkm_gender; } public void setLkm_gender(String lkm_gender) { this.lkm_gender = lkm_gender; } public String getLkm_phone() { return lkm_phone; } public void setLkm_phone(String lkm_phone) { this.lkm_phone = lkm_phone; } public String getLkm_mobile() { return lkm_mobile; } public void setLkm_mobile(String lkm_mobile) { this.lkm_mobile = lkm_mobile; } public String getLkm_email() { return lkm_email; } public void setLkm_email(String lkm_email) { this.lkm_email = lkm_email; } public String getLkm_qq() { return lkm_qq; } public void setLkm_qq(String lkm_qq) { this.lkm_qq = lkm_qq; } public String getLkm_position() { return lkm_position; } public void setLkm_position(String lkm_position) { this.lkm_position = lkm_position; } public String getLkm_memo() { return lkm_memo; } public void setLkm_memo(String lkm_memo) { this.lkm_memo = lkm_memo; } public String getLkm_hobby() { return lkm_hobby; } public void setLkm_hobby(String lkm_hobby) { this.lkm_hobby = lkm_hobby; } public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } }
[ "2257346739@qq.com" ]
2257346739@qq.com
abdca77fc47c52561b9b8aac7f5efbbdf64c22af
65725bb55ad8a917c7319328a9a425d7c1c27f8e
/src/main/java/edu/jhu/pacaya/nlp/data/Sentence.java
c85d3cbedde719be9fb37c462ba8fc74fdedaecc
[ "Apache-2.0" ]
permissive
mgormley/pacaya
0a00c67dfbcc6630aced23221534e614c7482faa
786294cbac7cc65dbc32210c10acc32ed0c69233
refs/heads/master
2021-01-17T10:20:23.283440
2017-07-06T13:08:51
2017-07-06T13:08:51
21,098,765
44
10
null
null
null
null
UTF-8
Java
false
false
525
java
package edu.jhu.pacaya.nlp.data; import edu.jhu.prim.bimap.IntObjectBimap; public class Sentence extends LabelSequence<String> { private static final long serialVersionUID = 1L; protected Sentence(IntObjectBimap<String> alphabet) { super(alphabet); } public Sentence(IntObjectBimap<String> alphabet, Iterable<String> labels) { super(alphabet, labels); } public Sentence(IntObjectBimap<String> alphabet, int[] labelIds) { super(alphabet, labelIds); } }
[ "mrg@cs.jhu.edu" ]
mrg@cs.jhu.edu
d8bf2a69af8f3e9d6ed250db81b8b587251f355c
c53eff0794037b9dde61cfe31d972f6d07799338
/Mage.Sets/src/mage/cards/a/AssassinsBlade.java
88c4ebf61daef09141f0e6161f4d35141ec0aa0c
[]
no_license
theelk801/mage
0cd1c942c54e204db03a7e1603c4250c58a65f9f
9a59d801200f327d9f01b4086d0e979d263c095d
refs/heads/master
2022-11-11T13:02:45.533594
2018-04-24T12:35:37
2018-04-24T12:35:37
98,135,127
3
0
null
2018-04-24T12:35:38
2017-07-24T00:54:07
Java
UTF-8
Java
false
false
3,790
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.cards.a; import java.util.UUID; import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility; import mage.abilities.condition.common.AttackedThisStepCondition; import mage.abilities.effects.common.DestroyTargetEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.PhaseStep; import mage.constants.TurnPhase; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.Predicates; import mage.filter.predicate.mageobject.ColorPredicate; import mage.filter.predicate.permanent.AttackingPredicate; import mage.target.common.TargetCreaturePermanent; import mage.watchers.common.PlayerAttackedStepWatcher; /** * * @author TheElk801 */ public class AssassinsBlade extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("nonblack attacking creature"); static { filter.add(Predicates.not(new ColorPredicate(ObjectColor.BLACK))); filter.add(new AttackingPredicate()); } public AssassinsBlade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{B}"); // Cast Assassin's Blade only during the declare attackers step and only if you've been attacked this step. Ability ability = new CastOnlyDuringPhaseStepSourceAbility( TurnPhase.COMBAT, PhaseStep.DECLARE_ATTACKERS, AttackedThisStepCondition.instance, "Cast {this} only during the declare attackers step and only if you've been attacked this step." ); ability.addWatcher(new PlayerAttackedStepWatcher()); this.addAbility(ability); // Destroy target nonblack attacking creature. this.getSpellAbility().addEffect(new DestroyTargetEffect()); this.getSpellAbility().addTarget(new TargetCreaturePermanent(filter)); } public AssassinsBlade(final AssassinsBlade card) { super(card); } @Override public AssassinsBlade copy() { return new AssassinsBlade(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
1eb517da6cc926957aed891e9ddcde63eb87252e
97386b00aa112044a46b55db632c6be1195ed79d
/src/main/java/com/adpf/modules/utils/ScheduleUtils.java
d9e838a3d72bfe25911fab196cdc4ffb4671652a
[]
no_license
mayongcan/adpf
8f1a036c05afdb8978730eebaa5860b5bc56219e
69d3be034e4270501f56da5a3ac3a82825c4aac9
refs/heads/master
2022-07-09T21:57:35.733201
2020-01-20T07:04:48
2020-01-20T07:04:48
255,856,674
0
0
null
2022-06-29T18:04:31
2020-04-15T08:43:22
Java
UTF-8
Java
false
false
5,160
java
package com.adpf.modules.utils; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import com.adpf.modules.crowd.entity.DmpCrowdInfo; import com.adpf.modules.crowd.entity.DmpCrowdNumberInfo; import com.adpf.modules.crowd.repository.DmpCrowdInfoRepository; import com.adpf.modules.crowd.repository.DmpCrowdNumberInfoRepository; import com.adpf.qtn.service.QtnTakeNumberInfoService; import com.adpf.qtn.service.QtnWindowInfoService; import com.gimplatform.core.utils.BeanUtils; @Component public class ScheduleUtils { protected static final Logger logger = LogManager.getLogger(ScheduleUtils.class); @Autowired private DmpCrowdInfoRepository dmpCrowdInfoRepository; @Autowired private DmpCrowdNumberInfoRepository dmpCrowdNumberInfoRepository; @Autowired private QtnTakeNumberInfoService qtnTakeNumberInfoService; @Autowired private QtnWindowInfoService qtnWindowInfoService; /** * 每30分钟定时检查没有上传的人群 */ //@Scheduled(cron="0 0/30 * * * ?") public void scheduledAddCrowdNumberInfo() { System.out.println("------------------------------------------定时任务开始:"); try { Map<String,Object> params = new HashMap<String,Object>(); params.put("isJoin", "0"); //查出所有没上传的人群 List<Map<String,Object>> list =dmpCrowdInfoRepository.getNotJoinList(new DmpCrowdInfo(), params); List<DmpCrowdNumberInfo> numberlist = new ArrayList<>(); for(Map<String,Object>map:list) { DmpCrowdInfo info =(DmpCrowdInfo) BeanUtils.mapToBean(map, DmpCrowdInfo.class); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = formatter.parse(formatter.format(map.get("createDate"))); info.setCreateDate(date); // File file =new File("E:\\work_space\\project\\adpf\\"+info.getTxtPath()); File file =new File("/Users/zzd/Work/ProjectRun/Resources/"+info.getTxtPath()); DmpCrowdNumberInfo numberInfo =new DmpCrowdNumberInfo(); numberInfo.setCrowdId(info.getCrowdId()); if(file.exists()) { //读取每个文件 BufferedReader bis = new BufferedReader(new InputStreamReader(new FileInputStream(file))); String sb=""; while((sb=bis.readLine())!=null){ //手机号 11位 if("1".equals(info.getTxtType()) && sb.trim().length() == 11) { numberInfo.setNumber(sb.trim()); } //IDFA和IMEI 15位 else if("3".equals(info.getTxtType()) || "5".equals(info.getTxtType())) { if(sb.trim().length() ==15) { numberInfo.setNumber(sb.trim()); } } //md5加密都是 32位 else if("2".equals(info.getTxtType())||"4".equals(info.getTxtType())||"6".equals(info.getTxtType())) { if(sb.trim().length() == 32) { numberInfo.setNumber(sb.trim()); } } if(numberInfo.getNumber() != null && !"".equals(numberInfo.getNumber())) { numberlist.add(numberInfo); } } dmpCrowdNumberInfoRepository.save(numberlist); DmpCrowdInfo newInfo = new DmpCrowdInfo(); newInfo.setCrowdId(info.getCrowdId()); newInfo.setIsJoin("1"); newInfo.setStatus("2"); String length = ""; if(file.length() < 1024) { length = file.length() + " B"; }else { double len =(double)file.length()/1024/100; length = String.valueOf(len).substring(0, String.valueOf(len).indexOf(".")+3) + " KB"; } newInfo.setTxtSize(length); newInfo.setTxtSum((long) numberlist.size()); BeanUtils.mergeBean(newInfo, info); dmpCrowdInfoRepository.save(info); }else { logger.error("文件不存在"); } } System.out.println("------------------------------------------定时任务结束:"); } catch (FileNotFoundException e) { e.printStackTrace(); }catch(Exception e) { logger.error(e.getStackTrace(), e); } } /** *每天0点,将取号系统每个营业厅的取号改为0000 */ //@Scheduled(cron="0 0 0 * * ?") public void scheduledChangeNumber() { try { System.out.println("-----------取号系统定时任务开始:"); //将每个营业厅的取号改成000 qtnTakeNumberInfoService.changeNumber(); //将每个窗口的当前状态改为默认,当前号码改为空 qtnWindowInfoService.changeWindowStatusAndNumber(); //将redis中的所有营业厅的取码队列清空 qtnTakeNumberInfoService.initRedis(); System.out.println("-----------取号系统定时任务开始"); }catch(Exception e) { logger.error(e.getMessage(),e); } } }
[ "1571638094@qq.com" ]
1571638094@qq.com
d97a59ed4eb23e5b2b9d298b214e7bd75338f8f9
70f91957d10020fd61d1e05abe9bb2ee22e6b37a
/src/main/java/com/prb/erp/domain/api/ApiContractInfoResultVO.java
f675145e35453108dbc895115fd0df2123a9d46a
[]
no_license
deepstudyDev/prb_erp_api
a4e00c93eaf69ebc2b8a36f47856270d729fac81
42895ef14382f1c693e0b667052fef5f3e7d396f
refs/heads/master
2020-04-12T19:15:17.805284
2019-03-20T00:16:33
2019-03-20T00:16:33
161,093,008
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package com.prb.erp.domain.api; import java.util.List; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor public class ApiContractInfoResultVO { String custCd; private List<ApiMemberChildVO> child; private String resultCode; private String resultMsg; }
[ "admin@ideepstudy.com" ]
admin@ideepstudy.com
4ab4ddf47cadd3e094803083acd2a79c98f5c020
03bcf39c35b6f0ada8701b85298db27b5c40b1d0
/src/xt/java/com/blnz/xsl/tr/ForEachAction.java
42bd0774c441455c605451123792977c30c0941a
[ "MIT" ]
permissive
blnz/xt
72ec72b0fb980d5fc24649ffa58fd1ca8eaa507c
8db763a4c00ac180716098c878bd1717b408197c
refs/heads/master
2021-01-17T13:49:27.000858
2016-08-01T15:34:27
2016-08-01T15:34:27
998,935
0
1
null
null
null
null
UTF-8
Java
false
false
616
java
// $Id: ForEachAction.java 99 2005-02-28 21:37:53Z blindsey $ package com.blnz.xsl.tr; import com.blnz.xsl.om.*; import com.blnz.xsl.expr.NodeSetExpr; /** * <xsl:for-each */ class ForEachAction implements Action { private NodeSetExpr expr; private Action action; ForEachAction(NodeSetExpr expr, Action action) { this.expr = expr; this.action = action; } public void invoke(ProcessContext context, Node sourceNode, Result result) throws XSLException { context.invoke(expr.eval(sourceNode, context), action, result); } }
[ "bill@blnz.com" ]
bill@blnz.com
294118dcab4744073f6a840cda3533468332c5a4
676f1d1ee1bd5e7153b85d83381e9c529745e59f
/test/org/traccar/protocol/MegastekProtocolDecoderTest.java
9bb705f17312ba0c62fb8896a9c6bb5d89312ec7
[ "Apache-2.0" ]
permissive
alisol911/traccar
3fa78dda01effce08657b31e8103a51912338aaa
2841fc55a7b2f865f92d69a5bcf5897130ea4201
refs/heads/master
2021-03-30T22:23:23.808054
2018-03-10T12:22:54
2018-03-10T12:22:54
124,652,272
0
0
Apache-2.0
2018-03-10T12:10:10
2018-03-10T12:10:10
null
UTF-8
Java
false
false
5,693
java
package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; public class MegastekProtocolDecoderTest extends ProtocolTest { @Test public void testDecode() throws Exception { MegastekProtocolDecoder decoder = new MegastekProtocolDecoder(new MegastekProtocol()); verifyNull(decoder, text( "0112$MGV002,,GVT900-3,S,010114,000003,,,,,,00,00,00,,0.000,0.00,,0.0,,,,,,0000,0000,14,10,0, , ,,1-0,0,Low Ext Vol;!")); verifyPosition(decoder, text( "0170$MGV002,354550056642321,GVT900-3,S,011017,090208,A,1635.8484,N,10446.6095,E,00,09,00,0.91,16.980,257.73,177.6,0.0,457,01,0741,00C0,21,0000,0000,20,10,0, , ,,1-1,54,Dist;!")); verifyNull(decoder, text( "0140$MGV002,354550056642321,GVT900-3,S,300917,071731,V,,,,,00,00,00,99.9,0.000,0.00,,0.0,457,01,0741,00CD,,0000,0000,20,10,0, , ,,1-1,94,PW ON;!")); verifyPosition(decoder, text( "$MGV002,869152024446923,,S,290816,200627,V,5056.21059,N,00439.25034,E,00,00,00,99.9,,,-25.1,,206,01,0BBB,4418,28,,,,,,,,,01,093,Timer;")); verifyPosition(decoder, text( "$MGV002,869152024446923,869152024446923,S,240816,151631,A,5053.83335,N,00424.05702,E,00,10,00,0.88,2.645,76.09,22.7,,206,01,07D1,6600,28,,,,,,,,,01,100,Timer;!")); verifyPosition(decoder, text( "STX,013950007137061,$GPRMC,191959.000,A,5203.09602,N,00830.77057,E,5.73,255.27,240716,,,A*62,L,Belt Up,imei:013950007137061,0/5,,Battery=52%,,1,262,03,0084,B20E;FD")); verifyPosition(decoder, text( "STX,865067021328417,$GPRMC,064721.000,A,4241.2793,N,02321.9762,E,6.74,346.90,300316,,,1*CA,F,Nil-Alarms,imei:865067021328417,9,559.8,Battery=82%,0,284,03,047E,2B5F;99")); verifyNull(decoder, text( "0147$MGV002,354550050292669,GVT900,S,141215,031804,A,,S,,E,00,04,00,5.17,0.000,193.05,117.1,0.0,510,10,041B,0A5E,,0000,0000,22,12,0, , ,,1-1,98,Timer;!")); verifyNull(decoder, text( "0137$MGV002,354550050292669,GVT900,R,141215,031804,A,,S,,E,00,03,00,3.67,0.000,0.00,117.1,0.0,510,10,,,,0000,0000,22,12,0, , ,,1-1,98,PW ON;!")); verifyPosition(decoder, text( "0125$MGV002,860719020193193,DeviceName,R,240214,104742,A,2238.20471,N,11401.97967,E,00,03,00,1.20,0.462,356.23,137.9,1.5,460,07,262C,0F54,25,0000,0000,0,0,0,28.5,28.3,,,100,Timer;")); verifyPosition(decoder, text( "$MGV002,860719020193193,DeviceName,R,240214,104742,A,2238.20471,N,11401.97967,E,00,03,00,1.20,0.462,356.23,137.9,1.5,460,07,262C,0F54,25,0000,0000,0,0,0,28.5,28.3,,,100,Timer;!"), position("2014-02-24 10:47:42.000", true, 22.63675, 114.03299)); verifyPosition(decoder, text( "STX2010101801 j$GPRMC,101053.000,A,2232.7607,N,11404.7669,E,0.00,,231110,,,A*7F,460,00,2795,0E6A,14,94,1000,0000,91,Timer;1D")); verifyPosition(decoder, text( "STX,861001005215757,$GPRMC,180118.000,A,4241.330116,N,2321.931251,E,0.00,182.19,130915,,E,A,F,Nil-Alarms,imei:861001005215757,8,577.0,Battery=38%,0,284,03,03E8,3139;7A")); verifyPosition(decoder, text( "STX,865067020439090,$GPRMC,171013.000,A,5919.1411,N,01804.1681,E,0.000,294.41,140815,,,A")); verifyPosition(decoder, text( "$MGV002,013777007536434,,R,010114,000057,V,0000.0000,N,00000.0000,E,00,00,00,99.9,0.000,0.00,0.0,80.263,510,89,2342,030B,,0000,0000,200,96,0, , ,,,,Timer;!")); verifyPosition(decoder, text( "STX,GerAL22,$GPRMC,174752.000,A,3637.060059,S,6416.2354,W,0.00,0.00,030812,,,A*55,F,,imei:861785000249353,05,180.6,Battery=100%,,1,722,310,0FA6,39D0;8F")); verifyPosition(decoder, text( "STX,GerAL22,$GPRMC,000051.000,A,3637.079590,S,6416.2148,W,1.72,332.98,010109,,,A*52,L,,imei:861785000249353,03,275.3,Battery=68%,,1,722,07,0515,1413;41")); verifyPosition(decoder, text( "STX,,$GPRMC,001339.000,A,4710.85395,N,02733.58209,E,1.65,238.00,010109,,,A*67,L,Help,imei:013227009737796,0/8,137.1,Battery=100%,,0,226,01,2B9B,BBBF;8D")); verifyPosition(decoder, text( "STX,102110830074542,$GPRMC,114229.000,A,2238.2024,N,11401.9619,E,0.00,0.00,310811,,,A*64,F,LowBattery,imei:012207005553885,03,113.1,Battery=24%,,1,460,01,2531,647E;57")); verifyPosition(decoder, text( "STX863070014949464 $GPRMC,215942.290,A,4200.1831,N,02128.5904,E,003.1,079.8,090813,,,A*6E,294,02,0064,0F3D,18,17,0000,000000,0000,0.00,0.02,0.00,Store;D8")); verifyPosition(decoder, text( "STX123456 $GPRMC,063709.000,A,2238.1998,N,11401.9670,E,0.00,,250313,,,A*7F,460,01,2531,647E,11,87,1000,001001,0000,0.00,0.02,0.00,Timer;4A")); verifyPosition(decoder, text( "STX260475 $GPRMC,104032.001,A,4022.1119,N,01811.4081,E,000.0,000.0,060913,,,A*67,222,01,815A,D455,11,99,0000,0001,0,Timer;")); verifyPosition(decoder, text( "LOGSTX,123456789012345,$GPRMC,225419.000,A,3841.82201,N,09494.73357,W,12.46,135.33,270914,,,A*47,F,,imei:123456789012345,0/6,,Battery=100%,,0,,,5856,78A3;24")); verifyPosition(decoder, text( "LOGSTX,123456789012345,$GPRMC,230551.000,A,3841.81956,N,09494.45403,W,0.00,0.00,270914,,,A*7C,L,,imei:123456789012345,0/7,269.7,Battery=100%,,0,,,5856,78A3;83")); verifyPosition(decoder, text( "LOGSTX,123456789012345,$GPRMC,230739.000,A,3841.81895,N,09494.12409,W,0.00,0.00,270914,,,A*70,L,,imei:123456789012345,0/7,269.7,Battery=100%,,0,,,5856,78A3;78")); } }
[ "anton.tananaev@gmail.com" ]
anton.tananaev@gmail.com
5f6ca3a1ca1795e07d1c8717388ee5b7db14bba1
f08256664e46e5ac1466f5c67dadce9e19b4e173
/sources/com/google/android/gms/common/api/internal/C9762m.java
36938d16ab7fb1b7482c7e5ac6a40f8f75e500cb
[]
no_license
IOIIIO/DisneyPlusSource
5f981420df36bfbc3313756ffc7872d84246488d
658947960bd71c0582324f045a400ae6c3147cc3
refs/heads/master
2020-09-30T22:33:43.011489
2019-12-11T22:27:58
2019-12-11T22:27:58
227,382,471
6
3
null
null
null
null
UTF-8
Java
false
false
146
java
package com.google.android.gms.common.api.internal; /* renamed from: com.google.android.gms.common.api.internal.m */ public interface C9762m { }
[ "101110@vivaldi.net" ]
101110@vivaldi.net
9493909f450850bdee379e17ceea9d0e87f0c6af
20c6398b414a6f0764d21c846c6231316ff66834
/quickorder/testsrc/com/capgemini/quickorder/services/impl/DefaultQuickOrderServiceUnitTest.java
a84259d203a582f8bd0d619222813710e4b95e39
[]
no_license
vamshivushakola/b2b_assets_5.7
472d2597f75f685772bf2e23e14b8c1c9ff5fc05
722493b8fbd1dcbc8109b0fd71787669ab67fd49
refs/heads/master
2020-03-27T06:53:31.961017
2016-07-21T14:00:39
2016-07-21T14:00:39
63,874,082
0
0
null
null
null
null
UTF-8
Java
false
false
1,733
java
package com.capgemini.quickorder.services.impl; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.core.model.product.ProductModel; import java.util.Collections; import java.util.List; import org.junit.Before; import org.junit.Test; import com.capgemini.quickorder.strategies.QuickOrderSearchStrategy; /** * Created by tbrison on 13/06/2014. */ @UnitTest public class DefaultQuickOrderServiceUnitTest { private DefaultQuickOrderService quickOrderService; private QuickOrderSearchStrategy quickOrderSearchStrategy; private ProductModel productModel; private final static String REFERENCE_QUERY = "fo"; private final static String REFERENCE = "foo"; private final static String CODE_QUERY = "ba"; private final static String CODE = "bar"; private final static int NUMBER_RESULTS = 4; @Before public void setUp() { quickOrderService = new DefaultQuickOrderService(); quickOrderSearchStrategy = mock(QuickOrderSearchStrategy.class); quickOrderService.setQuickOrderSearchStrategy(quickOrderSearchStrategy); productModel = new ProductModel(); productModel.setCode(CODE); //productModel.setReference(REFERENCE); } @Test public void testFindByCode() { when(quickOrderSearchStrategy.findProductsForQuery(CODE_QUERY, NUMBER_RESULTS)).thenReturn( Collections.singletonList(productModel)); final List<ProductModel> result = quickOrderService.findProductsForQuery(CODE_QUERY, NUMBER_RESULTS); assertEquals("We should find one product", 1, result.size()); assertEquals("Product should equal the mock returned", productModel, result.get(0)); } }
[ "vamshi.vushakola@gmail.com" ]
vamshi.vushakola@gmail.com
398aa198bbb770aafc764bd99cde720aa5157487
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE400_Resource_Exhaustion/s01/CWE400_Resource_Exhaustion__database_for_loop_53c.java
4173f5cf62d165d76dc1f0e405df32ae3c2b729d
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
1,490
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE400_Resource_Exhaustion__database_for_loop_53c.java Label Definition File: CWE400_Resource_Exhaustion.label.xml Template File: sources-sinks-53c.tmpl.java */ /* * @description * CWE: 400 Resource Exhaustion * BadSource: database Read count from a database * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: for_loop * GoodSink: Validate count before using it as the loop variant in a for loop * BadSink : Use count as the loop variant in a for loop * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ package testcases.CWE400_Resource_Exhaustion.s01; import testcasesupport.*; import javax.servlet.http.*; public class CWE400_Resource_Exhaustion__database_for_loop_53c { public void badSink(int count ) throws Throwable { (new CWE400_Resource_Exhaustion__database_for_loop_53d()).badSink(count ); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(int count ) throws Throwable { (new CWE400_Resource_Exhaustion__database_for_loop_53d()).goodG2BSink(count ); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(int count ) throws Throwable { (new CWE400_Resource_Exhaustion__database_for_loop_53d()).goodB2GSink(count ); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
f4bdd70cbd9ad492e7a5ebffa83f6f73d3cff8a2
f5398748ea435d203248eb208850a1d36939e3a8
/Plugins/Instantiation/de.uni_hildesheim.sse.vil.templatelang.tests/src/test/de/uni_hildesheim/sse/vil/templatelang/XmlExecutionTests.java
b39591a837f0169ecde9a74704da442560f35589
[ "Apache-2.0" ]
permissive
SSEHUB/EASyProducer
20b5a01019485428b642bf3c702665a257e75d1b
eebe4da8f957361aa7ebd4eee6fff500a63ba6cd
refs/heads/master
2023-06-25T22:40:15.997438
2023-06-22T08:54:00
2023-06-22T08:54:00
16,176,406
12
2
null
null
null
null
UTF-8
Java
false
false
6,468
java
/* * Copyright 2009-2017 University of Hildesheim, Software Systems Engineering * * 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 test.de.uni_hildesheim.sse.vil.templatelang; import java.io.File; import java.io.IOException; import java.util.Map; import org.junit.Assert; import org.junit.Test; import net.ssehub.easy.basics.io.FileUtils; import net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactFactory; import net.ssehub.easy.instantiation.core.model.artifactModel.IArtifact; import net.ssehub.easy.instantiation.core.model.common.VilException; import net.ssehub.easy.instantiation.core.model.templateModel.Template; import net.ssehub.easy.instantiation.core.model.vilTypes.configuration.Configuration; /** * Implements XML artifact tests in the xml folder. * * @author Holger Eichelberger */ public class XmlExecutionTests extends AbstractExecutionTest { /** * Represents the directory containing the tests. */ private static final File DIR = new File(TESTDATA_DIR, "xml"); @Override protected File getTestFolder() { return DIR; } /** * Creates a file object relative to {@link #DIR} (not a file). * * @param name the name of the file (excluding ".trc") * @return the file */ private final File createInputFile(String name) { return new File(getTestFolder(), name + ".in"); } /** * Tests XML elements creation with content. * * @throws IOException should not occur * @throws VilException should not occur */ @Test public void testElementContents() throws IOException, VilException { assertXml("elementContents"); } /** * Tests XML comment creation. * * @throws IOException should not occur * @throws VilException should not occur */ @Test public void testCommentContents() throws IOException, VilException { assertXml("commentContents"); } /** * Tests XML comment handling from existing XML file. * * @throws IOException should not occur * @throws VilException should not occur */ @Test public void testCommentContents2() throws IOException, VilException { final String name = "commentContents2"; assertXml(name, createInputFile(name)); } /** * Asserts a VTL execution for XML file artifacts. Expecting "main" as main VTL def, no input file and no IVML * configuration. * * @param name the name of the VTL file * @param expectedExceptions expected exception ids * @throws IOException in case of any I/O related problem * @throws VilException in case of VIL execution problems */ private void assertXml(String name, int... expectedExceptions) throws IOException, VilException { assertXml(name, null, null, expectedExceptions); } /** * Asserts a VTL execution for XML file artifacts. Expecting "main" as main VTL def, no input file and no IVML * configuration. * * @param name the name of the VTL file * @param inputFile an optional XML input file to be used as target artifact, may be <b>null</b> for none, will * be copied to a temporary file * @param expectedExceptions expected exception ids * @throws IOException in case of any I/O related problem * @throws VilException in case of VIL execution problems */ private void assertXml(String name, File inputFile, int... expectedExceptions) throws IOException, VilException { assertXml(name, null, inputFile, expectedExceptions); } /** * Asserts a VTL execution for XML file artifacts. Expecting "main" as main VTL def. * * @param name the name of the VTL file * @param cfg the IVML configuration (may be <b>null</b>) * @param inputFile an optional XML input file to be used as target artifact, may be <b>null</b> for none, will * be copied to a temporary file * @param expectedExceptions expected exception ids * @throws IOException in case of any I/O related problem * @throws VilException in case of VIL execution problems */ private void assertXml(String name, Configuration cfg, File inputFile, int... expectedExceptions) throws IOException, VilException { File f = new File(System.getProperty("java.io.tempdir"), name + ".xml"); f.delete(); if (null != inputFile) { Assert.assertTrue("Specified input file " + inputFile.getAbsolutePath() + " does not exist", inputFile.exists()); // not part of test, must exist anyway FileUtils.copyFile(f, inputFile); } IArtifact target = ArtifactFactory.createFileSystemArtifact(f); Map<String, Object> param = createParameterMap(cfg, target); EqualitySetup<Template> setup = new EqualitySetup<Template>(createFile(name), name, null, createTraceFile(name), param); setup.setStartElement("main"); assertEqual(setup, expectedExceptions); target.store(); // else done implicitly by calling VTL String produced = file2String(f); Assert.assertTrue(null != produced); String expected = file2String(new File(getTestFolder(), name + ".xml")); Assert.assertTrue(null != expected); expected = expected.trim(); produced = produced.trim(); boolean eq = checkEqualsAndPrint(expected, produced); if (!eq) { Assert.assertEquals(expected, produced); } // file2String file descriptor may not have been cleaned up yet, sleep/gc try { Thread.sleep(100); } catch (InterruptedException e) { } System.gc(); f.delete(); } }
[ "eichelberger@sse.uni-hildesheim.de" ]
eichelberger@sse.uni-hildesheim.de
87ff5b469b2fb0f223b9cb6da4f86d0b702f1033
d69ce52f1998e83fd2447102f001e7598a71e91c
/src/main/java/com/dt/service/impl/VedioModuleServiceImpl.java
3f7173dd09cda7981dbf34eadab007f2a6b39539
[]
no_license
NDCFL/KoreanTV
276f836bd1b79e16561e1bf4a271be69e01f0629
0c206867a956ee56c0139c02c35d4df4de78c316
refs/heads/master
2020-03-21T08:06:27.891485
2018-08-17T05:34:40
2018-08-17T05:34:40
138,320,812
1
0
null
null
null
null
UTF-8
Java
false
false
1,786
java
package com.dt.service.impl; import com.dt.common.PageQuery; import com.dt.common.StatusQuery; import com.dt.dao.VedioModuleDAO; import com.dt.service.VedioModuleService; import com.dt.vo.Select2Vo; import com.dt.vo.VedioModuleVo; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service public class VedioModuleServiceImpl implements VedioModuleService{ @Resource private VedioModuleDAO vedioModuleDAO; @Override public void save(VedioModuleVo vedioModuleVo) { vedioModuleDAO.save(vedioModuleVo); } @Override public void remove(VedioModuleVo vedioModuleVo) { vedioModuleDAO.remove(vedioModuleVo); } @Override public void removeById(Long id) { vedioModuleDAO.removeById(id); } @Override public void update(VedioModuleVo vedioModuleVo) { vedioModuleDAO.update(vedioModuleVo); } @Override public void updateStatus(StatusQuery statusQuery) { vedioModuleDAO.updateStatus(statusQuery); } @Override public VedioModuleVo getById(Long id) { return vedioModuleDAO.getById(id); } @Override public List<VedioModuleVo> listAll() { return vedioModuleDAO.listAll(); } @Override public List<VedioModuleVo> listPage(PageQuery pageQuery) { return vedioModuleDAO.listPage(pageQuery); } @Override public long count(PageQuery pageQuery) { return vedioModuleDAO.count(pageQuery); } @Override public List<Select2Vo> getModuleList() { return vedioModuleDAO.getModuleList(); } @Override public List<VedioModuleVo> getList() { return vedioModuleDAO.getList(); } }
[ "275300091@qq.com" ]
275300091@qq.com
d05816142c3e8892c80cc8a68d801d7cb1544813
a63d907ad63ba6705420a6fb2788196d1bd3763c
/src/dataflow/unified-computing/udf/udf-core/src/main/java/com/tencent/bk/base/dataflow/udf/generators/HiveUdtfForPyGenerator.java
860d019bdb103a76ac08dd43c585a2eb60891947
[ "MIT" ]
permissive
Tencent/bk-base
a38461072811667dc2880a13a5232004fe771a4b
6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2
refs/heads/master
2022-07-30T04:24:53.370661
2022-04-02T10:30:55
2022-04-02T10:30:55
381,257,882
101
51
NOASSERTION
2022-04-02T10:30:56
2021-06-29T06:10:01
Python
UTF-8
Java
false
false
5,401
java
/* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * -------------------------------------------------------------------- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial * portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT * LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.tencent.bk.base.dataflow.udf.generators; import com.google.common.base.CaseFormat; import com.tencent.bk.base.dataflow.udf.common.FunctionContext; import com.tencent.bk.base.dataflow.udf.common.FunctionInfo; import com.tencent.bk.base.dataflow.udf.util.UdfUtils; import com.tencent.bk.base.dataflow.udf.template.HivePyUdtfTemplate; import java.text.MessageFormat; import java.util.stream.Collectors; import java.util.stream.IntStream; public class HiveUdtfForPyGenerator implements FunctionGenerator { @Override public void generate(FunctionInfo functionInfo) { FunctionContext context = createFunctionContext(functionInfo); String code = new HivePyUdtfTemplate().generateFuncCode(context); String className = getClassName(functionInfo.getUserFuncFileName()); String javaFile = String.format("%s/src/main/java", System.getProperty("user.dir")) + "/" + MessageFormat.format("{0}.{1}", UdfUtils.HIVE_UDF_DIRECTORY, className).replace(".", "/") + ".java"; UdfUtils.createUdfFile(javaFile, code); } private FunctionContext createFunctionContext(FunctionInfo functionInfo) { FunctionContext.Builder builder = FunctionContext.builder(); builder.setUdfClassName(getClassName(functionInfo.getUserFuncFileName())); builder.setReturnType( functionInfo.getOutputTypes() .stream() .collect(Collectors.joining(", "))); // set input params builder.setInputParams( IntStream.range(0, functionInfo.getInputTypes().size()) .mapToObj(i -> MessageFormat.format("{0} {1}", functionInfo.getInputTypes().get(i), "args" + i)) .collect(Collectors.joining(", "))); builder.setUserFuncFileName(functionInfo.getUserFuncFileName()); builder.setTypeParameters( IntStream.range(0, functionInfo.getInputTypes().size()) .mapToObj(i -> { switch (functionInfo.getInputTypes().get(i).replace("java.lang.", "")) { case "String": return MessageFormat.format("args[{0}].toString()", i); case "Integer": return MessageFormat.format("Integer.valueOf(args[{0}].toString())", i); case "Long": return MessageFormat.format("Long.valueOf(args[{0}].toString())", i); case "Float": return MessageFormat.format("Float.valueOf(args[{0}].toString())", i); case "Double": return MessageFormat.format("Double.valueOf(args[{0}].toString())", i); default: throw new RuntimeException( "Not support input parameter " + functionInfo.getInputTypes().get(i)); } }).collect(Collectors.joining(", "))); // get return data types builder.setReturnDataTypes(functionInfo.getOutputTypes().stream().collect(Collectors.joining(", "))); builder.setFunctionName(functionInfo.getName()); builder.setJepPath(functionInfo.getJepPath()); builder.pythonScriptPath(functionInfo.getPythonScriptPath()); builder.setCpythonPackages(functionInfo.getCpythonPackages()); return builder.create(); } /** * format java class name * * @param name eg. test_udf * @return eg. FlinkPyTestUdf */ private String getClassName(String name) { String standardizedName = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, name); return "HivePy" + standardizedName; } }
[ "terrencehan@tencent.com" ]
terrencehan@tencent.com
2a3430cccd8bd5dc493239b8ed7c8c0eb92bf9f9
38603de3344cefc19120be43ad1d4b692db7f385
/dhlk_light_plat/dhlk_web/src/main/java/com/dhlk/web/light/service/fbk/LedServiceFbk.java
e25d5c582c4ce069fc636711c29e8b28698f7a7f
[]
no_license
957001352/TestProject
7a5398f4d21db89fc84f05c43a00b18ecf9d24f3
efcb62f9067c3d1cceb979e4db69c77a0862eaff
refs/heads/master
2023-01-21T19:17:50.529648
2020-12-03T03:05:24
2020-12-03T03:05:24
295,264,060
0
0
null
null
null
null
UTF-8
Java
false
false
4,072
java
package com.dhlk.web.light.service.fbk; import com.dhlk.domain.Result; import com.dhlk.entity.light.*; import com.dhlk.enums.ResultEnum; import com.dhlk.utils.ResultUtils; import com.dhlk.web.light.service.LedService; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestBody; import java.util.List; /** * @Description * @Author lpsong * @Date 2020/6/4 */ @Service public class LedServiceFbk implements LedService { @Override public Result save(Led led) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result flashingLed(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result delete(String id) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findList(String sn, String areaId,String switchId) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result savePower(List<LedPower> list) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result saveOnlineList(List<LedOnline> list) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result saveOnline(LedOnline ledOnline) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result savePeopleList(String json) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result saveSwitchBoundLed(Switch swich) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result setLedBrightness(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findAreasByLed() { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result openOrCloseLed(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result ledRestart(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result switchRestart(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findLedFault(String ledSn) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result<Object> findExportList(String ledSn) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findListByTenantId(Integer tenantId) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result update(Led led) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result updateLocation(List<Led> leds) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findLedParamInfos(InfoBox<String> infoBox) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findLedRecord(String sn, String commond, String sendResult, String backResult, String startTime, String endTime, Integer pageNum, Integer pageSize) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result notAddLed() { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result brightnessShow() { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result syncLedBrightness(String brightness) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result findLedsByArea(String areaId) { return ResultUtils.error(ResultEnum.NETWORK_ERR); } @Override public Result refreshParam(InfoBox<String> infoBox) { return ResultUtils.success(); } @Override public Result showIconSize() { return ResultUtils.error(ResultEnum.NETWORK_ERR); } }
[ "gchen@dhlk-tech.com" ]
gchen@dhlk-tech.com
7c09d71089ff7f4e2ab1a0f60acf8be29920f074
a1d65f521eeab9809f312a713891149e9fba9ce7
/quickstart-consul/src/test/java/org/quickstart/consul/ecwid/ConsulRawClientTest.java
fa956f8dadf3ed4f3de03a666859def8b4922d6b
[ "Apache-2.0" ]
permissive
youngzil/quickstart-register
018eeed12d5605eb209ac88778b34db877d19726
ea94ec77576226aa91f8a48d3c54be1eacf753e4
refs/heads/master
2022-12-22T10:03:01.169140
2022-08-25T14:41:16
2022-08-25T14:41:16
140,261,423
0
0
Apache-2.0
2022-12-16T10:04:38
2018-07-09T09:17:49
CSS
UTF-8
Java
false
false
2,532
java
package org.quickstart.consul.ecwid; import com.ecwid.consul.v1.ConsulRawClient; import com.ecwid.consul.v1.QueryParams; import org.apache.http.client.HttpClient; import org.apache.http.client.ResponseHandler; import org.apache.http.client.methods.HttpUriRequest; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; public class ConsulRawClientTest { private static final String ENDPOINT = "/any/endpoint"; private static final QueryParams EMPTY_QUERY_PARAMS = QueryParams.Builder.builder().build(); private static final String HOST = "host"; private static final int PORT = 8888; private static final String PATH = "path"; private static final String EXPECTED_AGENT_ADDRESS_NO_PATH = "http://" + HOST + ":"+ PORT + ENDPOINT; private static final String EXPECTED_AGENT_ADDRESS = "http://" + HOST + ":"+ PORT + "/" + PATH + ENDPOINT; @Test public void verifyDefaultUrl() throws Exception { // Given HttpClient httpClient = mock(HttpClient.class); ConsulRawClient client = ConsulRawClient.Builder.builder() .setHttpClient(httpClient) .setHost(HOST) .setPort(PORT) .build(); // When client.makeGetRequest(ENDPOINT, EMPTY_QUERY_PARAMS); // Then ArgumentCaptor<HttpUriRequest> calledUri = ArgumentCaptor.forClass(HttpUriRequest.class); verify(httpClient).execute(calledUri.capture(), any(ResponseHandler.class)); assertEquals(EXPECTED_AGENT_ADDRESS_NO_PATH, calledUri.getValue().getURI().toString()); } @Test public void verifyUrlWithPath() throws Exception { // Given HttpClient httpClient = mock(HttpClient.class); ConsulRawClient client = ConsulRawClient.Builder.builder() .setHttpClient(httpClient) .setHost(HOST) .setPort(PORT) .setPath(PATH) .build(); // When client.makeGetRequest(ENDPOINT, EMPTY_QUERY_PARAMS); // Then ArgumentCaptor<HttpUriRequest> calledUri = ArgumentCaptor.forClass(HttpUriRequest.class); verify(httpClient).execute(calledUri.capture(), any(ResponseHandler.class)); assertEquals(EXPECTED_AGENT_ADDRESS, calledUri.getValue().getURI().toString()); } }
[ "youngzil@163.com" ]
youngzil@163.com
20f17b72f25e4d7a6b9bac9c9974b658be02c8a7
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/permission/AclEntry.java
b325f29ba83e7a8d885ba6e0980c0e20b0ebbd84
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
456
java
package org.apache.hadoop.fs.permission; import java.util.ArrayList; import java.util.Collection; import java.util.List; import com.google.common.base.Objects; import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.util.StringUtils; @InterfaceAudience.Public @InterfaceStability.Evolving public class AclEntry
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
35987d904060d8bd33fc250d1bff82d61a9214e8
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.6.2/dso-statistics-tests/src/test/java/com/tctest/statistics/AbstractStatisticsTransparentTestBase.java
27a04bd28884f4ba5bf5cc4dad03388cb64bd667
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
2,214
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright * notice. All rights reserved. */ package com.tctest.statistics; import com.tc.properties.TCPropertiesConsts; import com.tc.properties.TCPropertiesImpl; import com.tc.statistics.beans.StatisticsGatewayMBean; import com.tc.statistics.beans.StatisticsMBeanNames; import com.tc.test.JMXUtils; import com.tctest.TransparentTestBase; import java.io.IOException; import java.util.ArrayList; import javax.management.MBeanServerConnection; import javax.management.MBeanServerInvocationHandler; import javax.management.remote.JMXConnector; public abstract class AbstractStatisticsTransparentTestBase extends TransparentTestBase { @Override protected void setExtraJvmArgs(final ArrayList jvmArgs) { // REST interface is disabled out the box now (see DEV-6875) TCPropertiesImpl.getProperties().setProperty(TCPropertiesConsts.CVT_REST_INTERFACE_ENABLED, "true"); System.setProperty(TCPropertiesImpl.tcSysProp(TCPropertiesConsts.CVT_REST_INTERFACE_ENABLED), "true"); jvmArgs.add("-D" + TCPropertiesImpl.tcSysProp(TCPropertiesConsts.CVT_REST_INTERFACE_ENABLED) + "=true"); } protected void waitForAllNodesToConnectToGateway(final int nodeCount) throws IOException, InterruptedException { final JMXConnector jmxc = JMXUtils.getJMXConnector("localhost", getAdminPort()); final MBeanServerConnection mbsc = jmxc.getMBeanServerConnection(); final StatisticsGatewayMBean stat_gateway = (StatisticsGatewayMBean) MBeanServerInvocationHandler .newProxyInstance(mbsc, StatisticsMBeanNames.STATISTICS_GATEWAY, StatisticsGatewayMBean.class, false); waitForAllNodesToConnectToGateway(stat_gateway, nodeCount); } protected void waitForAllNodesToConnectToGateway(final StatisticsGatewayMBean statGateway, final int nodeCount) throws InterruptedException { int currentNodeCount; Thread.sleep(2000); while ((currentNodeCount = statGateway.getConnectedAgentChannelIDs().length) < nodeCount) { Thread.sleep(500); System.out.println("Currently " + currentNodeCount + " nodes connected to gateway, waiting for " + nodeCount); } } }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
ff3d945b37de82f0170f9d17841b3e0d6a0f2e85
878582c5ba85098a7f5813563fac21aef600a54c
/src/main/java/net/linaris/Practice/handlers/games/GameType.java
bcdbc1e97789967ffa612630e7f401d8124fae18
[]
no_license
jordanbonaldi/Linaris-Practice
d468b922b4626523d6a6dc149fdbedb7d5acea74
f8996d65b6c2261af02c173943b3bb54dcc841c4
refs/heads/master
2020-04-13T00:14:31.112110
2018-12-22T20:39:51
2018-12-22T20:39:51
162,841,341
0
0
null
null
null
null
UTF-8
Java
false
false
3,105
java
package net.linaris.Practice.handlers.games; import org.bukkit.inventory.*; import net.linaris.Practice.database.redis.orm.*; import net.linaris.Practice.handlers.kits.*; import net.linaris.Practice.handlers.maps.Map; import redis.clients.jedis.*; import java.util.*; public class GameType { private final int id; private final String name; private final boolean ranked; private final boolean buildable; private List<Map> availablesMaps; private ItemStack display; private DefaultBuild defaultBuild; private ItemStack[] armor; private LinkedHashMap<Integer, BuildItem> items; private final Class<? extends GameTypeListener> listener; public GameType(final int id, final String name, final boolean ranked, final boolean buildable, final Class<? extends GameTypeListener> listener) { this.id = id; this.name = name; this.ranked = ranked; this.buildable = buildable; this.availablesMaps = new ArrayList<Map>(); this.armor = new ItemStack[4]; this.items = new LinkedHashMap<Integer, BuildItem>(); this.listener = listener; } public Tuple[] getTop(final int number) { final Nest<?> nest = new Nest<Object>("game_stats"); nest.setPool(RedisHelper.getPool()); nest.cat("sorted_by_elo"); nest.cat(this.id); final Set<Tuple> tuples = nest.zrevrangewith(0, 4); final Tuple[] scores = new Tuple[5]; int i = 0; for (final Tuple tuple : tuples) { scores[i] = tuple; ++i; } return scores; } public void setDefaultBuild(final DefaultBuild defaultBuild) { this.defaultBuild = defaultBuild; for (final BuildItem item : defaultBuild.getItems()) { this.registerBuildItem(item); } } private void registerBuildItem(final BuildItem type) { if (type == null) { return; } this.items.put(type.getId(), type); } public BuildItem getItem(final int id) { return this.items.get(id); } public int getId() { return this.id; } public String getName() { return this.name; } public boolean isRanked() { return this.ranked; } public boolean isBuildable() { return this.buildable; } public List<Map> getAvailablesMaps() { return this.availablesMaps; } public ItemStack getDisplay() { return this.display; } public void setDisplay(final ItemStack display) { this.display = display; } public DefaultBuild getDefaultBuild() { return this.defaultBuild; } public ItemStack[] getArmor() { return this.armor; } public void setArmor(final ItemStack[] armor) { this.armor = armor; } public LinkedHashMap<Integer, BuildItem> getItems() { return this.items; } public Class<? extends GameTypeListener> getListener() { return this.listener; } }
[ "30388371+jordanbonaldi@users.noreply.github.com" ]
30388371+jordanbonaldi@users.noreply.github.com
bc55b38990f70b07a7f4556f19c9ba2378d0eb12
96e93c27444f8c33754afe435829dcaeda5dfecf
/deeplearning4j-examples/src/main/java/org/deeplearning4j/example/lfw/LFWExample.java
1f9975d8bf6e450a9bd4491ad81b5b5ec45944ea
[]
no_license
sipims/java-deeplearning
4b488c05a9d27f9f27d798bdba8c935c5140e2e6
0f1c69ff99080d9472dce94c9c2c090af2291090
refs/heads/master
2021-01-23T23:38:40.438138
2014-06-09T14:55:41
2014-06-09T14:55:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,067
java
package org.deeplearning4j.example.lfw; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.util.ArrayList; import java.util.List; import org.deeplearning4j.datasets.DataSet; import org.deeplearning4j.datasets.iterator.DataSetIterator; import org.deeplearning4j.datasets.iterator.impl.LFWDataSetIterator; import org.deeplearning4j.dbn.DBN; import org.deeplearning4j.eval.Evaluation; import org.deeplearning4j.rbm.RBM; import org.deeplearning4j.util.ImageLoader; import org.deeplearning4j.util.MatrixUtil; import org.jblas.DoubleMatrix; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class LFWExample { private static Logger log = LoggerFactory.getLogger(LFWExample.class); /** * @param args */ public static void main(String[] args) throws Exception { //batches of 10, 60000 examples total DataSetIterator iter = new LFWDataSetIterator(10,10000,56,56); //784 input (number of columns in mnist, 10 labels (0-9), no regularization DBN dbn = new DBN.Builder().withHiddenUnits(RBM.HiddenUnit.RECTIFIED).withVisibleUnits(RBM.VisibleUnit.GAUSSIAN) .hiddenLayerSizes(new int[]{500, 400, 250}) .numberOfInputs(iter.inputColumns()).numberOfOutPuts(iter.totalOutcomes()) .build(); while(iter.hasNext()) { DataSet next = iter.next(); dbn.pretrain(next.getFirst(), 1, 1e-3, 10000); } iter.reset(); while(iter.hasNext()) { DataSet next = iter.next(); dbn.setInput(next.getFirst()); dbn.finetune(next.getSecond(), 1e-3, 10000); } BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("mnist-dbn.bin")); dbn.write(bos); bos.flush(); bos.close(); log.info("Saved dbn"); iter.reset(); Evaluation eval = new Evaluation(); while(iter.hasNext()) { DataSet next = iter.next(); DoubleMatrix predict = dbn.output(next.getFirst()); DoubleMatrix labels = next.getSecond(); eval.eval(labels, predict); } log.info("Prediction f scores and accuracy"); log.info(eval.stats()); } }
[ "agibson@clevercloudcomputing.com" ]
agibson@clevercloudcomputing.com
7f2f9d1385b653858312f4f5d64c57160d09bdbe
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes5/com/facebook/react/views/progressbar/ReactProgressBarViewManager.java
38368d20d8634a394de11dd72b8ce63b54d0b296
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,430
java
package com.facebook.react.views.progressbar; import com.facebook.react.bridge.JSApplicationIllegalArgumentException; import com.facebook.react.uimanager.BaseViewManager; import com.facebook.react.uimanager.ReactProp; import com.facebook.react.uimanager.ThemedReactContext; import javax.annotation.Nullable; public class ReactProgressBarViewManager extends BaseViewManager<ProgressBarContainerView, ProgressBarShadowNode> { static final String DEFAULT_STYLE = "Large"; static final String PROP_INDETERMINATE = "indeterminate"; static final String PROP_PROGRESS = "progress"; static final String PROP_STYLE = "styleAttr"; static final String REACT_CLASS = "AndroidProgressBar"; public static String getStaticName() { return "AndroidProgressBar"; } public static Class<ProgressBarShadowNode> getStaticShadowNodeClass() { return ProgressBarShadowNode.class; } static int getStyleFromString(@Nullable String paramString) { if (paramString == null) { throw new JSApplicationIllegalArgumentException("ProgressBar needs to have a style, null received"); } if (paramString.equals("Horizontal")) { return 16842872; } if (paramString.equals("Small")) { return 16842873; } if (paramString.equals("Large")) { return 16842874; } if (paramString.equals("Inverse")) { return 16843399; } if (paramString.equals("SmallInverse")) { return 16843400; } if (paramString.equals("LargeInverse")) { return 16843401; } throw new JSApplicationIllegalArgumentException("Unknown ProgressBar style: " + paramString); } public ProgressBarShadowNode createShadowNodeInstance() { return new ProgressBarShadowNode(); } protected ProgressBarContainerView createViewInstance(ThemedReactContext paramThemedReactContext) { return new ProgressBarContainerView(paramThemedReactContext); } public String getName() { return getStaticName(); } public Class<ProgressBarShadowNode> getShadowNodeClass() { return getStaticShadowNodeClass(); } protected void onAfterUpdateTransaction(ProgressBarContainerView paramProgressBarContainerView) { paramProgressBarContainerView.apply(); } @ReactProp(customType="Color", name="color") public void setColor(ProgressBarContainerView paramProgressBarContainerView, @Nullable Integer paramInteger) { paramProgressBarContainerView.setColor(paramInteger); } @ReactProp(name="indeterminate") public void setIndeterminate(ProgressBarContainerView paramProgressBarContainerView, boolean paramBoolean) { paramProgressBarContainerView.setIndeterminate(paramBoolean); } @ReactProp(name="progress") public void setProgress(ProgressBarContainerView paramProgressBarContainerView, double paramDouble) { paramProgressBarContainerView.setProgress(paramDouble); } @ReactProp(name="styleAttr") public void setStyle(ProgressBarContainerView paramProgressBarContainerView, @Nullable String paramString) { paramProgressBarContainerView.setStyle(paramString); } public void updateExtraData(ProgressBarContainerView paramProgressBarContainerView, Object paramObject) {} } /* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\com\facebook\react\views\progressbar\ReactProgressBarViewManager.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
735d51abcf11e9e0836cf1f97f6dff1981b6b0a6
09810fc60b0d6e68df6bfa49652be078e5bfefd9
/module4/07_springdata_repository/cms/src/main/java/cg/wbd/grandemonstration/AppConfig.java
200274f020e0ec9180d358bdd2a7ca857eed638e
[]
no_license
C0920G1-NguyenQuangHoaiLinh/C0920G1-NguyenQuangHoaiLinh
18323fe752648daa7acaad0aa567c16d5ca30804
21f2061dc0e5df53dfdec73381b3b65a5e81e841
refs/heads/master
2023-03-29T21:22:50.560687
2021-04-07T04:43:15
2021-04-07T04:43:15
297,220,239
0
2
null
null
null
null
UTF-8
Java
false
false
2,386
java
package cg.wbd.grandemonstration; import cg.wbd.grandemonstration.service.CustomerService; import cg.wbd.grandemonstration.service.impl.SimpleCustomerServiceImpl; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; import org.thymeleaf.TemplateEngine; import org.thymeleaf.spring4.SpringTemplateEngine; import org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver; import org.thymeleaf.spring4.view.ThymeleafViewResolver; import org.thymeleaf.templatemode.TemplateMode; import org.thymeleaf.templateresolver.ITemplateResolver; @Configuration @EnableWebMvc @ComponentScan("cg.wbd.grandemonstration") public class AppConfig extends WebMvcConfigurerAdapter implements ApplicationContextAware { private ApplicationContext appContext; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { appContext = applicationContext; } @Bean public ViewResolver viewResolver() { ThymeleafViewResolver viewResolver = new ThymeleafViewResolver(); viewResolver.setTemplateEngine(templateEngine()); return viewResolver; } @Bean public TemplateEngine templateEngine() { TemplateEngine templateEngine = new SpringTemplateEngine(); templateEngine.setTemplateResolver(templateResolver()); return templateEngine; } @Bean public ITemplateResolver templateResolver() { SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); templateResolver.setApplicationContext(appContext); templateResolver.setPrefix("/WEB-INF/templates/"); templateResolver.setSuffix(".html"); templateResolver.setTemplateMode(TemplateMode.HTML); return templateResolver; } @Bean public CustomerService customerService() { return new SimpleCustomerServiceImpl(); } }
[ "you@example.com" ]
you@example.com
f1b999f5a1789dc61e48367181c02df72841929a
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a078/A078034Test.java
c09f6d8b57179c91f40df009091c6652f9dddff7
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a078; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A078034Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
62ba2966bcf26f078888b7637eba828c677801ad
8f322f02a54dd5e012f901874a4e34c5a70f5775
/src/main/java/PTUCharacterCreator/Abilities/Shell_Armor.java
542bd19335758b2805bc62c0bafe5ad705ddbf86
[]
no_license
BMorgan460/PTUCharacterCreator
3514a4040eb264dec69aee90d95614cb83cb53d8
e55f159587f2cb8d6d7b456e706f910ba5707b14
refs/heads/main
2023-05-05T08:26:04.277356
2021-05-13T22:11:25
2021-05-13T22:11:25
348,419,608
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package PTUCharacterCreator.Abilities; import PTUCharacterCreator.Ability; public class Shell_Armor extends Ability { { name = "Shell Armor"; freq = "Static"; effect = "Trigger: \nEffect: The user is immune to Critical Hits, they are instead normal hits. Defensive."; } public Shell_Armor(){} }
[ "alaskablake460@gmail.com" ]
alaskablake460@gmail.com
b351a28b4181a559b4a2eaddb599436ac2c720c7
75edf9c7d5d1e666135ab0d797a292f9781790b6
/sld_preview/release/pagecompile/ish/cartridges/sld_005fpreview/default_/previewsummary/inc/PreviewSummaryParameterGroup_jsp.java
65127a4a6d7766b1f2455b3cfd7e25b163154c8e
[]
no_license
arthurAddamsSiebert/cartridges
7808f484de6b06c98c59be49f816164dba21366e
cc1141019a601f76ad15727af442718f1f6bb6cb
refs/heads/master
2020-06-11T08:58:02.419907
2019-06-26T12:16:31
2019-06-26T12:16:31
193,898,014
0
1
null
2019-11-02T23:33:49
2019-06-26T12:15:29
Java
UTF-8
Java
false
false
6,391
java
/* * Generated by the Jasper component of Apache Tomcat * Version: JspCServletContext/1.0 * Generated at: 2019-02-13 15:29:26 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package ish.cartridges.sld_005fpreview.default_.previewsummary.inc; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import java.util.*; import java.io.*; import com.intershop.beehive.core.internal.template.*; import com.intershop.beehive.core.internal.template.isml.*; import com.intershop.beehive.core.capi.log.*; import com.intershop.beehive.core.capi.resource.*; import com.intershop.beehive.core.capi.util.UUIDMgr; import com.intershop.beehive.core.capi.util.XMLHelper; import com.intershop.beehive.foundation.util.*; import com.intershop.beehive.core.internal.url.*; import com.intershop.beehive.core.internal.resource.*; import com.intershop.beehive.core.internal.wsrp.*; import com.intershop.beehive.core.capi.pipeline.PipelineDictionary; import com.intershop.beehive.core.capi.naming.NamingMgr; import com.intershop.beehive.core.capi.pagecache.PageCacheMgr; import com.intershop.beehive.core.capi.request.SessionMgr; import com.intershop.beehive.core.internal.request.SessionMgrImpl; import com.intershop.beehive.core.pipelet.PipelineConstants; import com.intershop.component.preview.capi.context.PreviewContextBO; import com.intershop.component.preview.capi.configuration.PreviewConfigurationAttribute; import java.util.Vector; public final class PreviewSummaryParameterGroup_jsp extends com.intershop.beehive.core.internal.template.AbstractTemplate implements org.apache.jasper.runtime.JspSourceDependent { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private javax.el.ExpressionFactory _el_expressionfactory; private org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public void _jspInit() { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html;charset=utf-8"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 0, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; boolean _boolean_result=false; TemplateExecutionConfig context = getTemplateExecutionConfig(); createTemplatePageConfig(context.getServletRequest()); printHeader(out); out.write("\n\n\n\n"); setEncodingType("text/html"); String templateToLoad = null; String group = (String)getPipelineDictionary().get("group"); PreviewContextBO previewContext = (PreviewContextBO)getPipelineDictionary().get("previewContext"); if ((previewContext != null) && (group != null) && !group.isEmpty()) { templateToLoad = "previewsummary/" + group + ".isml"; getPipelineDictionary().put("templateToLoad", templateToLoad); Vector<PreviewConfigurationAttribute> groupSummaryParameters = new Vector<PreviewConfigurationAttribute>(); for (PreviewConfigurationAttribute<?> summaryParameter : previewContext.getPreviewConfigurationAttributes()) { if (group.equals(summaryParameter.getGroup())) { groupSummaryParameters.add(summaryParameter); } } getPipelineDictionary().put("groupSummaryParameters", groupSummaryParameters); } out.write("<div class=\"sfe-preview-summary-parameter-group-"); {String value = null;try{value=context.getFormattedValue(getObject("group"),null,null);}catch(Exception e){value=null;Logger.error(this,"ISPRINT has an invalid expression. Returning empty string. Line: {29}",e);}if (value==null) value="";value = encodeString(value);out.write(value);} out.write('"'); out.write('>'); _boolean_result=false;try {_boolean_result=((Boolean)(((((Boolean) (disableErrorMessages().isDefined(getObject("templateToLoad")))).booleanValue() && ((Boolean) existsTemplate(context.getFormattedValue(getObject("templateToLoad"),null))).booleanValue()) ? Boolean.TRUE : Boolean.FALSE))).booleanValue();} catch (Exception e) {Logger.debug(this,"Boolean expression in line {} could not be evaluated. False returned. Consider using the 'isDefined' ISML function.",30,e);}if (_boolean_result) { {out.flush();processLocalIncludeByServer((com.intershop.beehive.core.capi.request.ServletResponse)response,context.getFormattedValue(getObject("templateToLoad"),null), null, "31");} } else { {out.flush();processLocalIncludeByServer((com.intershop.beehive.core.capi.request.ServletResponse)response,"previewsummary/SimplePreviewSummaryParameterGroup.isml", null, "33");} } out.write("</div>"); printFooter(out); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { out.clearBuffer(); } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "root@Inteshoppa1v11.yyrtatjsacuefh5ihlz5gkzqpd.ax.internal.cloudapp.net" ]
root@Inteshoppa1v11.yyrtatjsacuefh5ihlz5gkzqpd.ax.internal.cloudapp.net
f5ade9f4b303c6c2d78a6fcc2e7534672b213dd5
54caccfce4e4441d12afbd51a572badb9cb19cc0
/admin-api/src/main/java/com/workstore/admin/modules/common/error/GlobalExceptionHandler.java
3d41e34c4c1ec479882230f773d089abca6925fb
[]
no_license
Angelhack-WorkStore/workstore-server
1f75038d1e0a80e3cfd6e68ff29a28b93908571e
8b0df742e742e7ca0cdf19641600febeba016be2
refs/heads/master
2022-11-17T04:06:49.852128
2020-07-19T13:10:53
2020-07-19T13:10:53
279,281,923
0
0
null
null
null
null
UTF-8
Java
false
false
2,545
java
package com.workstore.admin.modules.common.error; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.AccessDeniedException; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import com.workstore.admin.modules.common.exception.BusinessException; import lombok.extern.slf4j.Slf4j; @Slf4j @RestControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(MethodArgumentNotValidException.class) protected ResponseEntity<ErrorResponse> handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { log.error("handleMethodArgumentNotValidException", e); final ErrorResponse response = ErrorResponse.of(ErrorCode.INVALID_INPUT, e.getBindingResult()); return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST); } @ExceptionHandler(HttpRequestMethodNotSupportedException.class) protected ResponseEntity<ErrorResponse> handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) { log.error("handleHttpRequestMethodNotSupportedException", e); final ErrorResponse response = ErrorResponse.of(ErrorCode.METHOD_NOT_ALLOWED); return new ResponseEntity<>(response, HttpStatus.METHOD_NOT_ALLOWED); } @ExceptionHandler(AccessDeniedException.class) protected ResponseEntity<ErrorResponse> handleAccessDeniedException(AccessDeniedException e) { log.error("handleAccessDeniedException", e); final ErrorResponse response = ErrorResponse.of(ErrorCode.UN_AUTHORIZED); return new ResponseEntity<>(response, HttpStatus.valueOf(ErrorCode.UN_AUTHORIZED.getStatus())); } @ExceptionHandler(BusinessException.class) protected ResponseEntity<ErrorResponse> handleBusinessException(final BusinessException e) { log.error("handleBusinessException", e); final ErrorCode errorCode = e.getErrorCode(); final ErrorResponse response = ErrorResponse.of(errorCode); return new ResponseEntity<>(response, HttpStatus.valueOf(errorCode.getStatus())); } @ExceptionHandler(Exception.class) protected ResponseEntity<ErrorResponse> handleException(Exception e) { log.error("handleInternalServerErrorException", e); final ErrorResponse response = ErrorResponse.of(ErrorCode.INTERNAL_SERVER_ERROR); return new ResponseEntity<>(response, HttpStatus.INTERNAL_SERVER_ERROR); } }
[ "msolo021015@naver.com" ]
msolo021015@naver.com
7e32147066bc1bef7930960d83cdcd2332004f57
8ead5ff8d527e4b4d98cd54e9b84f50ea824f2be
/cj.lns.common.sos.service.model/src/cj/lns/common/sos/service/model/SosPlugin.java
ed946478ebb239b3637ab6b64e0bb02a7d7e2612
[]
no_license
911Steven/cj.lns.sos
9976efcf28418094e315324a4ce145c56bb57478
af82a5e7555b99780a9606b5e848861ce1ae5503
refs/heads/master
2020-07-05T16:22:11.341767
2018-10-12T02:13:41
2018-10-12T02:13:41
202,696,541
1
0
null
2019-08-16T09:10:35
2019-08-16T09:10:35
null
UTF-8
Java
false
false
3,014
java
package cj.lns.common.sos.service.model; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQuery; import javax.persistence.Table; /** * The persistent class for the sos_plugin database table. * */ @Entity @Table(name="sos_plugin") @NamedQuery(name="SosPlugin.findAll", query="SELECT s FROM SosPlugin s") public class SosPlugin implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private String assemblyGuid; private String assemblyCompany; private String assemblyCopyright; private String assemblyDescription; private String assemblyDeveloperHome; private String assemblyIcon; private byte[] assemblyIconBytes; private String assemblyProduct; private String assemblyTitle; private String assemblyVersion; private String dependencyPlugin; public SosPlugin() { } public String getAssemblyGuid() { return this.assemblyGuid; } public void setAssemblyGuid(String assemblyGuid) { this.assemblyGuid = assemblyGuid; } public String getAssemblyCompany() { return this.assemblyCompany; } public void setAssemblyCompany(String assemblyCompany) { this.assemblyCompany = assemblyCompany; } public String getAssemblyCopyright() { return this.assemblyCopyright; } public void setAssemblyCopyright(String assemblyCopyright) { this.assemblyCopyright = assemblyCopyright; } public String getAssemblyDescription() { return this.assemblyDescription; } public void setAssemblyDescription(String assemblyDescription) { this.assemblyDescription = assemblyDescription; } public String getAssemblyDeveloperHome() { return this.assemblyDeveloperHome; } public void setAssemblyDeveloperHome(String assemblyDeveloperHome) { this.assemblyDeveloperHome = assemblyDeveloperHome; } public String getAssemblyIcon() { return this.assemblyIcon; } public void setAssemblyIcon(String assemblyIcon) { this.assemblyIcon = assemblyIcon; } public byte[] getAssemblyIconBytes() { return this.assemblyIconBytes; } public void setAssemblyIconBytes(byte[] assemblyIconBytes) { this.assemblyIconBytes = assemblyIconBytes; } public String getAssemblyProduct() { return this.assemblyProduct; } public void setAssemblyProduct(String assemblyProduct) { this.assemblyProduct = assemblyProduct; } public String getAssemblyTitle() { return this.assemblyTitle; } public void setAssemblyTitle(String assemblyTitle) { this.assemblyTitle = assemblyTitle; } public String getAssemblyVersion() { return this.assemblyVersion; } public void setAssemblyVersion(String assemblyVersion) { this.assemblyVersion = assemblyVersion; } public String getDependencyPlugin() { return this.dependencyPlugin; } public void setDependencyPlugin(String dependencyPlugin) { this.dependencyPlugin = dependencyPlugin; } }
[ "carocean.jofers@icloud.com" ]
carocean.jofers@icloud.com
039529c63c154484181e47bd2e90a032e76861a1
15428946f5e99b7eab2e9db7eb92227dff72dbf6
/Android/app/src/main/java/io/github/project_travel_mate/utilities/TimezoneListViewActivity.java
947eba7e1e1209be58f9bbd55f7c5744cad0e88a
[ "MIT" ]
permissive
smtrz/Travel-Mate
3fd6124d0ba6dea375639f47825499bd67270367
bec6f8e12e5d0e7d3ba7f664c6498cb22265a66b
refs/heads/master
2020-08-22T22:14:29.664866
2019-10-21T05:17:28
2019-10-21T05:17:28
216,486,179
5
0
MIT
2019-10-21T05:41:05
2019-10-21T05:41:05
null
UTF-8
Java
false
false
4,232
java
package io.github.project_travel_mate.utilities; import android.annotation.SuppressLint; import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; import android.widget.EditText; import java.util.ArrayList; import java.util.Collections; import java.util.Locale; import java.util.TimeZone; import java.util.concurrent.TimeUnit; import butterknife.BindView; import io.github.project_travel_mate.R; import objects.ZoneName; public class TimezoneListViewActivity extends Activity implements TextWatcher { @BindView(R.id.listView) RecyclerView mListview; @BindView(R.id.timezoneSearch) EditText mTimezoneSearch; CurrencyConverterAdapter mAdaptorListView; public static ArrayList<ZoneName> timezone_names; private Context mContext; private static final String mTAG = "TimezoneListViewAct"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_timezone_listview); timezone_names = new ArrayList<>(); mListview = findViewById(R.id.listView); mTimezoneSearch = findViewById(R.id.timezoneSearch); mContext = this; addTimezones(); mTimezoneSearch.addTextChangedListener(this); } /** * Add timezones as well as the country codes <br> * The country codes will be used by com.github.blongho:world-country-data to get the flag of the country * */ public void addTimezones() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { String[] locales = Locale.getISOCountries(); for (String countryCode : locales) { for (String id : android.icu.util.TimeZone.getAvailableIDs(countryCode)) { final String zone = displayTimeZone(TimeZone.getTimeZone(id)); if (!zone.equalsIgnoreCase("GMT (GMT0:00)")) { // Add timezone to result map timezone_names.add(new ZoneName(zone, countryCode)); } } } } else { for (String id : java.util.TimeZone.getAvailableIDs()) { final String zone = displayTimeZone(TimeZone.getTimeZone(id)); if (!zone.equalsIgnoreCase("GMT (GMT0:00)")) { // Add timezone to result map timezone_names.add(new ZoneName(zone, id)); } } } Collections.sort(timezone_names, (n1, n2) -> n1.shortName.compareTo(n2.shortName)); mAdaptorListView = new CurrencyConverterAdapter(TimezoneListViewActivity.this, timezone_names); RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(mContext.getApplicationContext()); mListview.setLayoutManager(mLayoutManager); mListview.setAdapter(mAdaptorListView); } /** * @param tz - timexome to be displayed * @return - formatted timezone value */ @SuppressLint ("DefaultLocale") private static String displayTimeZone(TimeZone tz) { long hours = TimeUnit.MILLISECONDS.toHours(tz.getRawOffset()); long minutes = TimeUnit.MILLISECONDS.toMinutes(tz.getRawOffset()) - TimeUnit.HOURS.toMinutes(hours); // avoid -4:-30 issue minutes = Math.abs(minutes); String result; if (hours > 0) { result = tz.getID() + " " + String.format("(GMT+%d:%02d)", hours, minutes); } else { result = tz.getID() + " " + String.format("(GMT%d:%02d)", hours, minutes); } return result; } @Override public void beforeTextChanged(CharSequence searchItem, int start, int count, int after) { } @Override public void onTextChanged(CharSequence searchItem, int start, int before, int count) { TimezoneListViewActivity.this.mAdaptorListView.getFilter().filter(searchItem); } @Override public void afterTextChanged(Editable s) { } }
[ "swati4star@gmail.com" ]
swati4star@gmail.com
857ab1559c268e49f219c4842e28305513c654c2
026598bd70eb84a59c337a40352f70b2d8bf2853
/security-openid-connect-multi-tenancy/src/main/java/org/acme/quickstart/oidc/HomeResource.java
0d36b94cb3f3f35c6189d890c36cf63e6049523c
[ "Apache-2.0" ]
permissive
canidae/quarkus-quickstarts
3bd9085a78a1e45a53cdc6109a494dff5ffaccf5
5e5746a29c94407af54003fbaa0c65ebc506805b
refs/heads/master
2023-01-13T15:32:38.316374
2020-11-19T15:38:50
2020-11-19T15:38:50
297,953,460
1
0
Apache-2.0
2020-11-19T14:52:24
2020-09-23T11:51:26
Java
UTF-8
Java
false
false
1,123
java
package org.acme.quickstart.oidc; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import org.eclipse.microprofile.jwt.JsonWebToken; import io.quarkus.oidc.IdToken; @Path("/{tenant}") public class HomeResource { /** * Injection point for the ID Token issued by the OpenID Connect Provider */ @Inject @IdToken JsonWebToken idToken; /** * Returns the tokens available to the application. This endpoint exists only for demonstration purposes, you should not * expose these tokens in a real application. * * @return the landing page HTML */ @GET public String getHome() { StringBuilder response = new StringBuilder().append("<html>") .append("<body>"); response.append("<h2>Welcome, ").append(this.idToken.getClaim("email").toString()).append("</h2>\n"); response.append("<h3>You are accessing the application within tenant <b>").append(idToken.getIssuer()).append(" boundaries</b></h3>"); return response.append("</body>").append("</html>").toString(); } }
[ "pigor.craveiro@gmail.com" ]
pigor.craveiro@gmail.com
8e7505e1d84565c193ee36c14c544795e7bd25ac
5b635e148dce79d2efe8909596ad4ee2f8b92818
/appng-core/src/test/java/org/appng/core/controller/RepositoryWatcherTest.java
ea5640536f3797b6e7a3255318e84c9efe877e44
[ "Apache-2.0" ]
permissive
liuy2004/appng
057fff68cd44f0814b0a8464670645640fc46670
ff78552da2d0828399c629b186990d5a64f9ef21
refs/heads/master
2021-04-18T19:06:57.837914
2018-02-28T10:02:26
2018-02-28T10:02:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,289
java
/* * Copyright 2011-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.appng.core.controller; import java.io.File; import java.net.URL; import java.util.Arrays; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import org.apache.commons.io.FileUtils; import org.apache.commons.io.FilenameUtils; import org.junit.Assert; import org.junit.Test; import com.google.common.util.concurrent.ThreadFactoryBuilder; import net.sf.ehcache.Cache; import net.sf.ehcache.CacheManager; import net.sf.ehcache.Element; import net.sf.ehcache.config.Configuration; import net.sf.ehcache.event.RegisteredEventListeners; import net.sf.ehcache.store.MemoryStoreEvictionPolicy; public class RepositoryWatcherTest { @Test(timeout = 20000) public void test() throws Exception { ClassLoader classLoader = RepositoryWatcherTest.class.getClassLoader(); URL url = classLoader.getResource("repository/manager/www"); String rootDir = FilenameUtils.normalize(new File(url.toURI()).getPath(), true); String urlrewrite = classLoader.getResource("conf/urlrewrite.xml").getFile(); RepositoryWatcher repositoryWatcher = new RepositoryWatcher(); Cache ehcache = new Cache("testcache", 1000, MemoryStoreEvictionPolicy.LRU, false, null, false, 1000, 1000, false, 60, new RegisteredEventListeners(null)); Configuration configuration = new Configuration(); configuration.setName(getClass().getSimpleName() + "cache"); ehcache.setCacheManager(new CacheManager(configuration)); ehcache.initialise(); String fehlerJsp = "/de/fehler.jsp"; String testJsp = "/de/test.jsp"; String keyFehlerJsp = "GET" + fehlerJsp; String keyTestJsp = "GET" + testJsp; ehcache.put(new Element(keyFehlerJsp, "a value")); ehcache.put(new Element(keyTestJsp, "a value")); ehcache.put(new Element("GET/de/error", "a value")); ehcache.put(new Element("GET/de/fault", "a value")); Assert.assertEquals(4, ehcache.getSize()); repositoryWatcher.init(ehcache, rootDir, new File(urlrewrite), RepositoryWatcher.DEFAULT_RULE_SUFFIX, Arrays.asList("de")); ThreadFactory tf = new ThreadFactoryBuilder().setNameFormat("repositoryWatcher").setDaemon(true).build(); ExecutorService executor = Executors.newSingleThreadExecutor(tf); executor.execute(repositoryWatcher); FileUtils.touch(new File(rootDir, fehlerJsp)); FileUtils.touch(new File(rootDir, testJsp)); while (ehcache.getSize() != 0) { Thread.sleep(100); } Assert.assertNull(ehcache.get(keyFehlerJsp)); Assert.assertNull(ehcache.get(keyTestJsp)); Assert.assertNull(ehcache.get("GET/de/error")); Assert.assertNull(ehcache.get("GET/de/fault")); Assert.assertEquals(0, ehcache.getSize()); } }
[ "matthias.mueller@appng.org" ]
matthias.mueller@appng.org
e830c3c3d5a3fc97357e2d78dfc568b9015d9f79
d3656e60e9216c4208c87ff3f3dda5f707a53596
/src/main/com/topcoder/farm/shared/net/connection/remoting/MessageProcessor.java
f87a7043d5adf7f4ed96509b4b3753026ee051c9
[]
no_license
appirio-tech/arena-farm-shared
0e7f8bc53a69d6f49d732e3762e5683186fa101d
a54394dd1befe36216058cadaa51dd52446fb128
refs/heads/master
2023-08-09T17:39:55.441383
2014-12-16T21:03:24
2014-12-16T21:03:24
29,212,026
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
/* * MessageProcessor * * Created 07/25/2006 */ package com.topcoder.farm.shared.net.connection.remoting; import com.topcoder.farm.shared.net.connection.api.Connection; /** * @author Diego Belfer (mural) * @version $Id$ */ public interface MessageProcessor { public boolean processMessage(Connection connection, Object message); public void connectionLost(Connection connection); }
[ "FireIce@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9" ]
FireIce@cb5b18d2-80dd-4a81-9b1c-945e1ee644f9
3288fe19ff1e556e07c9323bd85c2dfd486953fd
cba17f0648f97d99f098efbb53efab8d3805cc87
/src/main/java/com/themodernway/nativetools/client/resting/NRestingResponse.java
14e9fe5add9bcb2a142a89c92eeab2697ef8fa2c
[ "Apache-2.0" ]
permissive
themodernway/themodernway-nativetools
20698f8494b63dd2349a2880de5be2b90a1a241a
59eb97f503b5e139f54deb8af999ebbff8d2e067
refs/heads/master
2021-01-21T05:20:29.379396
2017-10-29T21:34:38
2017-10-29T21:34:38
83,173,302
0
0
null
null
null
null
UTF-8
Java
false
false
3,107
java
/* Copyright (c) 2017, The Modern Way. 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. 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.themodernway.nativetools.client.resting; import com.themodernway.nativetools.client.NObject; import com.themodernway.nativetools.client.NUtils; import com.themodernway.nativetools.client.NValue; import com.themodernway.nativetools.client.util.Client; public final class NRestingResponse implements IRestingResponse { private NObject m_json; private final int m_code; private final long m_time; private final String m_body; private final boolean m_good; private final NMethod m_type; private final NRestingHeaders m_head; private final IRestingRequest m_requ; public NRestingResponse(final int code, final String body, final NRestingHeaders head, final NMethod type, final IRestingRequest requ, final long time) { m_code = code; m_body = body; m_head = head; m_type = type; m_requ = requ; m_time = time; m_good = ((code >= 200) && (code < 300)); } @Override public final int code() { return m_code; } @Override public final String body() { return m_body; } @Override public final NObject json() { if (null == m_json) { if (good()) { final String body = body(); if (null != body) { try { final NValue<?> parsed = NUtils.JSON.parse(body); if (null != parsed) { m_json = parsed.asNObject(); } } catch (final Exception e) { Client.get().error("NResponse.json()", e); } } } } return m_json; } @Override public final NRestingHeaders headers() { return m_head; } @Override public final NMethod method() { return m_type; } @Override public final IRestingRequest request() { return m_requ; } @Override public final boolean good() { return m_good; } @Override public final long time() { return m_time; } @Override public final String reason() { return headers().get(WWW_AUTHENTICATE); } }
[ "deanjones@gmail.com" ]
deanjones@gmail.com
b34e4500fb1e8bc109c99f218ec192cece95a803
e9adf9227baee96486bb61bfc78fca99660a6bfc
/cat-home/src/main/java/com/dianping/cat/report/task/heartbeat/HeartbeatGraphCreator.java
d186db625da216c9a25dfa6564e63af9da640ea7
[]
no_license
lietou/insight
b1cacc2902c755982a71ea4659311a75ed4acb86
4757005689201327eed6e5dd62740a88e84658f0
refs/heads/master
2021-01-22T12:17:01.291886
2013-04-20T01:38:29
2013-04-20T01:38:29
8,964,847
1
0
null
null
null
null
UTF-8
Java
false
false
5,221
java
/** * */ package com.dianping.cat.report.task.heartbeat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import com.dianping.cat.consumer.heartbeat.model.entity.Disk; import com.dianping.cat.consumer.heartbeat.model.entity.HeartbeatReport; import com.dianping.cat.consumer.heartbeat.model.entity.Period; import com.dianping.cat.home.dal.report.Graph; import com.dianping.cat.report.task.TaskHelper; import com.dianping.cat.report.task.spi.GraphCreator; import com.dianping.cat.report.task.spi.GraphLine; public class HeartbeatGraphCreator implements GraphCreator<HeartbeatReport> { private void cacheHeartbeatColumn(Map<String, GraphLine> detailCache, int minute, Number value, String key) { GraphLine detailLine = detailCache.get(key); if (detailLine == null) { detailLine = new GraphLine(); detailLine.minuteNumbers = new double[60]; detailCache.put(key, detailLine); } detailLine.minuteNumbers[minute] = value.doubleValue(); } @Override public List<Graph> splitReportToGraphs(Date reportPeriod, String domainName, String reportName, HeartbeatReport heartbeatReport) { Set<String> ips = heartbeatReport.getIps(); List<Graph> graphs = new ArrayList<Graph>(ips.size()); for (String ip : ips) { Graph graph = new Graph(); graph.setIp(ip); graph.setDomain(domainName); graph.setName(reportName); graph.setPeriod(reportPeriod); graph.setType(3); com.dianping.cat.consumer.heartbeat.model.entity.Machine machine = heartbeatReport.getMachines().get(ip); if (machine == null) { continue; } List<Period> periods = machine.getPeriods(); Map<String, GraphLine> detailCache = new TreeMap<String, GraphLine>(); for (Period period : periods) { int minute = period.getMinute(); String key = "CatMessageSize"; Number value = period.getCatMessageSize(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "CatMessageOverflow"; value = period.getCatMessageOverflow(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "CatMessageProduced"; value = period.getCatMessageProduced(); cacheHeartbeatColumn(detailCache, minute, value, key); List<Disk> disks = period.getDisks(); for (Disk d : disks) { key = "Disk " + d.getPath(); value = d.getFree(); cacheHeartbeatColumn(detailCache, minute, value, key); } key = "MemoryFree"; value = period.getMemoryFree(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "HeapUsage"; value = period.getHeapUsage(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "NoneHeapUsage"; value = period.getNoneHeapUsage(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "SystemLoadAverage"; value = period.getSystemLoadAverage(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "OldGcCount"; value = period.getOldGcCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "NewGcCount"; value = period.getNewGcCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "PigeonStartedThread"; value = period.getPigeonThreadCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "CatThreadCount"; value = period.getCatThreadCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "TotalStartedThread"; value = period.getTotalStartedCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "DaemonThread"; value = period.getDaemonCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "ActiveThread"; value = period.getThreadCount(); cacheHeartbeatColumn(detailCache, minute, value, key); key = "HttpThread"; value = period.getHttpThreadCount(); cacheHeartbeatColumn(detailCache, minute, value, key); } for (Entry<String, GraphLine> entry : detailCache.entrySet()) { GraphLine line = entry.getValue(); double[] numbers = line.minuteNumbers; double minValue = numbers[0]; double maxValue = minValue; double sum = minValue; double sum2 = sum * sum; for (int i = 1; i < numbers.length; i++) { double n = numbers[i]; if (n > maxValue) { maxValue = n; } if (n < minValue) { minValue = n; } sum += n; sum2 += n * n; } line.min = minValue; line.max = maxValue; line.sum = sum; line.sum2 = sum2; } StringBuilder sb = new StringBuilder(64 * detailCache.size()); for (Entry<String, GraphLine> entry : detailCache.entrySet()) { GraphLine value = entry.getValue(); sb.append(entry.getKey()); sb.append('\t'); sb.append(value.min); sb.append('\t'); sb.append(value.max); sb.append('\t'); sb.append(value.sum); sb.append('\t'); sb.append(value.sum2); sb.append('\t'); sb.append(TaskHelper.join(value.minuteNumbers, ',')); sb.append('\n'); } graph.setDetailContent(sb.toString()); graph.setCreationDate(new Date()); graphs.add(graph); } return graphs; } }
[ "qmwu2000@gmail.com" ]
qmwu2000@gmail.com
ffa3d2988528f6f41153c306000c72507a1dfc83
9d265892d49e97e98078f7cdba620acd33f69dd9
/深圳/zhcx/src/com/ye/task/BaoBiaoTask.java
5bf8152d97430aad0fb5dee37c285ccee4560bb5
[]
no_license
gxlioper/collections
70d11d5f3e6c999d40fc9f92b1fc26e6d78bf15d
2458b9e260edd91d564b063072801905e0377a00
refs/heads/master
2023-06-21T22:17:49.069471
2021-08-10T15:43:51
2021-08-10T15:43:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
690
java
package com.ye.task; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import com.ye.dc.bus.BiaoBaoBus; import com.ye.from.bus.BaoBiaoFromBus; @Component public class BaoBiaoTask { @Autowired private BaoBiaoFromBus baoBiaoFromBus; @Autowired private BiaoBaoBus baoBiaoBus; //@Scheduled(cron="0 0 11,14,16,20 ? * MON-FRI" ) //@Scheduled(cron="*/10 * * * * *" ) //@Scheduled(cron="*/10 * * * * *" ) @Scheduled(cron="0 0/40 9-18 ? * MON-FRI" ) public void task() { baoBiaoFromBus.saveToDb(); baoBiaoBus.savetTOBaoBiaoFormLog(); } }
[ "1039288191@qq.com" ]
1039288191@qq.com
dc9504f2b346d7468175d19d3426bebd50067fdb
3a951158c1c5cf6ef80d8f2ae4c92e1cd4798ffe
/javacooksrc Folder/javacook/language/ConsRecurs.java
da130b9e1401a9ead1ab8dd05026cc9f282aeae3
[ "BSD-2-Clause", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-oreilly-notice" ]
permissive
golddusty/javacookbook
dba71e59e525790a58073980966d4dce40da6cd1
48d9e75e9a53513be62c4ff31040a872f5e3fc91
refs/heads/master
2020-06-04T05:52:42.340850
2017-06-27T15:16:09
2017-06-27T15:16:09
191,895,188
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
/** What happens when two constructors call each other? * Can you get an infinite loop out of the process? */ public class ConsRecurs { public ConsRecurs(int i) { this(i*1.0); } public ConsRecurs(double d) { this((int)d); } public static void main(String[] a) { System.out.println("About to construct..."); new ConsRecurs(Math.PI); System.out.println("Hey, I'm still alive!"); } }
[ "booktech@oreilly.com" ]
booktech@oreilly.com
a6c27f19da41a067187c9d3cbfda05fd0593429f
176ff23723df0bbf555a4cfc3dec5264f60b82f1
/src/main/java/com/company/inheritance/doubleDispatch/MyFriends.java
29b44ac4e52fc449657354ec33d28c68686338d6
[]
no_license
doyoung0205/live-study
6c8df1c2989793f72f6466eb195ca5517932a37d
d8f8a8eba4d30636152ee8491ecab7a9bf3910e1
refs/heads/main
2023-03-26T23:30:14.853907
2021-03-14T06:51:51
2021-03-14T06:51:51
323,946,499
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package com.company.inheritance.doubleDispatch; import java.util.Arrays; import java.util.List; public class MyFriends { public static void main(String[] args) { // 모든 친구들 List<Friend> univFriends = getFiends(); List<SNS> snsGroup = getSnsGroup(); for (Friend friend : univFriends) { for (SNS sns : snsGroup) { friend.writeLetter(sns); } } } private static List<SNS> getSnsGroup() { return Arrays.asList( new Facebook(), new Twitter() ); } private static List<Friend> getFiends() { return Arrays.asList( new CompFriend("ILL", "010-1111-1111", "computer"), new CompFriend("LEE", "010-2222-2222", "Electronics"), new UnivFriend("SAM", "010-3333-3333", "computer"), new UnivFriend("SA", "010-4444-4444", "Electronics") ); } }
[ "doyoung0205@naver.com" ]
doyoung0205@naver.com
983fdb3127a94e059d9c137141e42ec71e477039
0b49bd89b25984ebb79fa6004003175af174616b
/src/main/java/com/example/tutorialthymeleaf/service/post/PersonalAdminService.java
28ccc80d5231a45c33ebc932572498edeecf40c0
[]
no_license
Iegor-Funtusov/tutorial-thymeleaf
f654b6aff9877ca9cb2bb0d3739a10585e0c96c3
f6c2cb9a2ccaf49b3546df302f97c9c13919ebbb
refs/heads/master
2023-06-29T23:23:15.845096
2021-08-06T16:54:27
2021-08-06T16:54:27
327,091,632
0
0
null
null
null
null
UTF-8
Java
false
false
390
java
package com.example.tutorialthymeleaf.service.post; import com.example.tutorialthymeleaf.persistence.entity.user.Personal; import com.example.tutorialthymeleaf.service.CrudService; /** * @author Iehor Funtusov, created 03/01/2021 - 8:30 AM */ public interface PersonalAdminService extends CrudService<Personal> { void lockAccount(Integer id); void unlockAccount(Integer id); }
[ "funtushan@gmail.com" ]
funtushan@gmail.com
2518c6ed24d0c85d2b090c517e7bad733c1c407c
8870fa16fe6f0fe3e791c1463c5ee83c46f86839
/mmoarpg/mmoarpg-game/src/data/com/wanniu/game/poes/IllusionPO.java
849f9ea30f39ba5c54cec04a34c7581e5ad5c908
[]
no_license
daxingyou/yxj
94535532ea4722493ac0342c18d575e764da9fbb
91fb9a5f8da9e5e772e04b3102fe68fe0db5e280
refs/heads/master
2022-01-08T10:22:48.477835
2018-04-11T03:18:37
2018-04-11T03:18:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
package com.wanniu.game.poes; import java.util.Collection; import java.util.HashMap; import java.util.Map; /** * 幻境存储对象 * * @author Yangzz */ public class IllusionPO { /** 今日获得的经验 */ public int todayExp; /** 今日获得的修为 */ public int todayClassExp; /** 今日获得的银两 */ public int todayGold; public Map<Integer, Integer> boxs; public Map<String, Integer> items; public boolean hasBoxData() { return boxs != null && !boxs.isEmpty(); } public boolean hasItemData() { return items != null && !items.isEmpty(); } public void resetBoxData() { if (boxs != null) { boxs.clear(); } } public void resetItemData() { if (items != null) { items.clear(); } } public void putBox(int lv, int count) { if (boxs == null) { boxs = new HashMap<>(); } Integer cur = boxs.get(lv); if (cur == null) { boxs.put(lv, count); } else { boxs.put(lv, count + cur); } } public void putItem(String code,int count) { if (items == null) { items = new HashMap<>(); } Integer cur = items.get(code); if (cur == null) { items.put(code, count); } else { items.put(code, count + cur); } } public int calTotalItemNum(String code) { if(items == null || items.isEmpty()) { return 0; } Integer c = items.get(code); return c == null ? 0 : c; } public int calTotalNum() { if (boxs == null || boxs.isEmpty()) { return 0; } int total = 0; Collection<Integer> cols = boxs.values(); for (Integer i : cols) { total += i; } return total; } public IllusionPO() { } }
[ "lkjx3031274@163.com" ]
lkjx3031274@163.com
8aaf393193b7ab387652b716bff5e6453b13e144
c6ea0f73f66741b07fe05b89f239e4fdf734be91
/src/main/java/io/vertx/lang/php/PhpVerticleFactory.java
1d9e56554f7831c1bb50f846267b61ac50551fa8
[ "MIT" ]
permissive
alwinmark/vertx-php
cf4ecb61478245a393375574ffddb5fe38c73e7f
6021d8dc07d0488fa64f69accd6eef2d70354a5e
refs/heads/master
2020-05-18T07:24:20.305549
2013-08-23T19:13:07
2013-08-23T19:13:07
12,294,736
3
1
null
null
null
null
UTF-8
Java
false
false
6,821
java
/* * Copyright 2013 the original author or authors. * * Licensed under the MIT License (the "License"); you may not use this * file except in compliance with the License. You may obtain a copy of * the License at * * http://opensource.org/licenses/MIT * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.vertx.lang.php; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; import org.vertx.java.core.VertxException; import org.vertx.java.core.logging.Logger; import org.vertx.java.platform.Verticle; import org.vertx.java.platform.VerticleFactory; import com.caucho.quercus.Location; import com.caucho.quercus.QuercusContext; import com.caucho.quercus.QuercusDieException; import com.caucho.quercus.QuercusEngine; import com.caucho.quercus.QuercusException; import com.caucho.quercus.QuercusExitException; import com.caucho.quercus.env.Env; /** * A PHP verticle factory. * * The PHP implementation is run on the Java-based Quercus PHP engine. * * @author Jordan Halterman */ public class PhpVerticleFactory implements VerticleFactory { private ClassLoader cl; public static org.vertx.java.core.Vertx vertx; public static org.vertx.java.platform.Container container; /** * Initializes the factory. */ @Override public void init(org.vertx.java.core.Vertx vertx, org.vertx.java.platform.Container container, ClassLoader cl) { this.cl = cl; PhpVerticleFactory.vertx = vertx; PhpVerticleFactory.container = container; } /** * Creates a verticle instance. */ @Override public Verticle createVerticle(String main) throws Exception { return new PhpVerticle(findScript(main)); } /** * Finds the full path to a PHP script. */ private String findScript(String script) { try { File scriptFile = new File(cl.getResource(script).toURI()); if (scriptFile.exists()) { return scriptFile.toPath().toString(); } } catch (URISyntaxException ignored) {} return null; } /** * Reports an exception in the verticle. */ @Override public void reportException(Logger logger, Throwable t) { // A Quercus language exception. if (t instanceof QuercusException) { Env env = Env.getCurrent(); Location location = env.getLocation(); logger.error("\nAn exception occured in a PHP verticle."); // TODO: This stack trace should show only PHP related called, not // Java calls. Currently it only shows the trace of Java code execution. // logger.error(env.getStackTraceAsString(t, env.getLocation()) + "\n"); String className = location.getClassName(); String funcName = location.getFunctionName(); if (funcName != null && funcName != "NULL" && !funcName.startsWith("__quercus_")) { if (className != "NULL" && funcName != "NULL" && !funcName.startsWith("__quercus_")) { logger.error(String.format("%s in %s on line %d in %s::%s()", t.getMessage(), location.getFileName(), location.getLineNumber(), className, funcName)); } else { logger.error(String.format("%s in %s on line %d in %s()", t.getMessage(), location.getFileName(), location.getLineNumber(), funcName)); } } else { logger.error(String.format("%s in %s on line %d", t.getMessage(), location.getFileName(), location.getLineNumber())); } } else { t.printStackTrace(); } } /** * Closes the verticle. */ @Override public void close() { } /** * A PHP Verticle that runs PHP scripts via Quercus. */ private class PhpVerticle extends Verticle { /** * The path to the verticle PHP script. */ private final String script; /** * A Quercus script engine instance. */ QuercusEngine engine; PhpVerticle(String script) { this.script = script; } /** * Starts the verticle. */ @Override public void start() { engine = new QuercusEngine(); QuercusContext context = engine.getQuercus(); // Setting PHP's error_reporting to 0 makes Quercus give us more // interesting exception messages and thus better error reporting. context.setIni("error_reporting", "0"); // Make vertx-php classes available in the PHP code context. // Note that for now we only make available classes which should // be instantiated outside the context of the internal Vert.x // library. However, once default constructors have been supplied // for the various wrapper classes, we should expose as many classes // as possible for extensibility's sake. context.addJavaClass("Vertx", io.vertx.lang.php.Vertx.class); context.addJavaClass("Vertx\\Http\\HttpServer", io.vertx.lang.php.http.HttpServer.class); context.addJavaClass("Vertx\\Http\\HttpClient", io.vertx.lang.php.http.HttpClient.class); context.addJavaClass("Vertx\\Http\\RouteMatcher", io.vertx.lang.php.http.RouteMatcher.class); context.addJavaClass("Vertx\\Net\\NetServer", io.vertx.lang.php.net.NetServer.class); context.addJavaClass("Vertx\\Net\\NetClient", io.vertx.lang.php.net.NetClient.class); context.addJavaClass("Vertx\\Net\\NetSocket", io.vertx.lang.php.net.NetSocket.class); context.addJavaClass("Vertx\\Buffer", io.vertx.lang.php.buffer.Buffer.class); context.addJavaClass("Vertx\\Logger", org.vertx.java.core.logging.Logger.class); context.addJavaClass("Vertx\\Pump", io.vertx.lang.php.streams.Pump.class); context.addJavaClass("Vertx\\ParseTools\\RecordParser", io.vertx.lang.php.parsetools.RecordParser.class); // Add PHP test helpers. context.addJavaClass("Vertx\\Test\\TestRunner", io.vertx.lang.php.testtools.PhpTestRunner.class); context.addJavaClass("Vertx\\Test\\PhpTestCase", io.vertx.lang.php.testtools.PhpTestCase.class); // Evaluate a single line script which includes the verticle // script. This ensures that exceptions can be accurately logged // because Quercus will record actual file names rather than a // generic "eval" name. try { engine.execute(String.format("<?php require '%s'; ?>", script)); } catch (QuercusDieException e) { // The interpreter died, do nothing. } catch (QuercusExitException e) { // The interpreter exiting cleanly, do nothing. } catch (IOException e) { throw new VertxException(e); } } } }
[ "jordan.halterman@gmail.com" ]
jordan.halterman@gmail.com
2183e220fa763f19cc9c8bc26b0a0d47eec0d2bd
c33f3e7928d3b228e367da5b48d8a63f9c82e6e5
/org.jbehave.eclipse/src/org/jbehave/eclipse/editor/story/completion/StepTemplateProposal.java
19904e68f84ca6b962bce43f187c7484ab48ad1b
[]
no_license
jbehave/jbehave-eclipse
c9a1c068d6184f8fa98124fc9706984da14a4c08
eda3a28524a033d08700dcd366ae5a28f9aec10a
refs/heads/master
2021-07-06T21:20:31.120797
2018-12-12T15:08:49
2021-01-29T17:04:41
5,203,003
10
9
null
2021-06-07T16:42:24
2012-07-27T09:53:12
Java
UTF-8
Java
false
false
2,476
java
package org.jbehave.eclipse.editor.story.completion; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4; import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5; import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6; import org.eclipse.jface.text.templates.Template; import org.eclipse.jface.text.templates.TemplateContext; import org.eclipse.jface.text.templates.TemplateProposal; import org.eclipse.jface.viewers.StyledString; import org.eclipse.swt.graphics.Image; import org.jbehave.eclipse.editor.step.LocalizedStepSupport; import org.jbehave.eclipse.editor.step.WeightedStep; public class StepTemplateProposal extends TemplateProposal implements ICompletionProposalExtension4, ICompletionProposalExtension5, ICompletionProposalExtension6, StepCompletionProposalMixin.Trait { private final LocalizedStepSupport jbehaveProject; private final String complete; private final String label; private final WeightedStep weightedStep; public StepTemplateProposal( LocalizedStepSupport jbehaveProject, // Template template, TemplateContext context, IRegion region, String complete, String label, WeightedStep weightedStep) { super(template, context, region, null, 0); this.jbehaveProject = jbehaveProject; this.complete = complete; this.label = label; this.weightedStep = weightedStep; } public LocalizedStepSupport getLocalizedStepSupport() { return jbehaveProject; } public boolean isAutoInsertable() { return false; } public String getDisplayString() { // by default it is <name> - <description> return getStyledDisplayString().getString(); } public WeightedStep getWeightedStep() { return weightedStep; } public String getComplete() { return complete; } public String getLabel() { return label; } public StyledString getStyledDisplayString() { return StepCompletionProposalMixin.createStyledString(this); } public Image getImage() { return StepCompletionProposalMixin.getImage(this); } public Object getAdditionalProposalInfo(IProgressMonitor monitor) { return StepCompletionProposalMixin.getAdditionalHTML(this); } }
[ "mauro.talevi@aquilonia.org" ]
mauro.talevi@aquilonia.org
b2a55d501f30670dd1a9033bc0a943a913466e97
0bff2461c2aad72050b4a356778c558db5c3ac3b
/AIDL/AIDL Demo/src/main/java/jp/sinya/test/aidldemo/Book.java
df7b9714b0d957a05fb9ab6686160b6fa9b663c0
[ "Apache-2.0" ]
permissive
KoizumiSinya/DemoProject
e189de2a80b2fde7702c51fa715d072053fe3169
01aae447bdc02b38b73b2af085e3e28e662764be
refs/heads/master
2021-06-08T05:03:22.975363
2021-06-01T09:39:08
2021-06-01T09:39:08
168,299,197
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package jp.sinya.test.aidldemo; import android.os.Parcel; import android.os.Parcelable; /** * @author KoizumiSinya * @date 2016/12/05. 13:52 * @editor * @date */ public class Book implements Parcelable { public int bookId; public String bookName; @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeInt(bookId); parcel.writeString(bookName); } public static final Parcelable.Creator<Book> CREATOR = new Creator<Book>() { @Override public Book createFromParcel(Parcel parcel) { return new Book(parcel); } @Override public Book[] newArray(int i) { return new Book[i]; } }; private Book(Parcel in) { bookId = in.readInt(); bookName = in.readString(); } Parcelable Book; }
[ "haoqqjy@163.com" ]
haoqqjy@163.com
f0586219c6b75f5375a1c58f2db6c7ce35ec7af8
2f416f38f7d1569f7e54718a452345b9dc874824
/forcastio/src/main/java/ch/rasc/forcastio/model/FioDataBlock.java
3e42283960061cffdbd4f425673f404a0df2dc7f
[]
no_license
takuya152005/playground
975908c98c4c30f257fbf618b096b9f98607f6ce
1593ad6cce47566f41cd774b88ec0e40ccc0dff5
refs/heads/master
2021-01-18T09:27:17.226578
2015-01-18T14:01:31
2015-01-18T14:01:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
package ch.rasc.forcastio.model; import java.util.List; import ch.rasc.forcastio.converter.FioIconDeserializer; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; /** * A data block object represents the various weather phenomena occurring over a period of * time. * * Ideally, the minutely data block will contain data for the next hour, the hourly data * block for the next two days, and the daily data block for the next week; however, if we * are lacking data for a given time period, the data point sequence may contain gaps or * terminate early. Furthermore, if no data points for a time period are known, then the * data block will be omitted from the response in its entirety. */ @SuppressWarnings("unused") @JsonIgnoreProperties(ignoreUnknown = true) public class FioDataBlock { private String summary; @JsonDeserialize(using = FioIconDeserializer.class) private FioIcon icon; private List<FioDataPoint> data; /** * A human-readable text summary of this data block. */ public String getSummary() { return summary; } /** * A machine-readable text summary of this data block */ public FioIcon getIcon() { return icon; } /** * An array of data point objects, ordered by time, which together describe the * weather conditions at the requested location over time. */ public List<FioDataPoint> getData() { return data; } private void setSummary(String summary) { this.summary = summary; } private void setIcon(FioIcon icon) { this.icon = icon; } private void setData(List<FioDataPoint> data) { this.data = data; } @Override public String toString() { return "FioDataBlock [summary=" + summary + ", icon=" + icon + ", data=" + data + "]"; } }
[ "ralphschaer@gmail.com" ]
ralphschaer@gmail.com
6ae608d344728d2fb9311a8f519ba591db5c8ec7
4b0cdc84fe1330eb1ad602669c2735ce995139d3
/webfx-stack-orm-expression/src/main/java/dev/webfx/stack/orm/expression/terms/function/java/StringAgg.java
ab972e613dfafea3cfbea92904a0feb0420d769d
[ "LicenseRef-scancode-free-unknown", "Apache-2.0" ]
permissive
webfx-project/webfx-stack
8f991a1552336dcad4a05883429ebe2c38aca2d1
0deeffe2509dcc6b24b776cbf2635f8605643f6c
refs/heads/main
2023-08-17T00:13:43.321212
2023-08-14T16:33:40
2023-08-14T16:33:40
513,490,539
0
2
Apache-2.0
2023-08-31T10:13:59
2022-07-13T11:15:37
Java
UTF-8
Java
false
false
1,533
java
package dev.webfx.stack.orm.expression.terms.function.java; import dev.webfx.stack.orm.expression.Expression; import dev.webfx.stack.orm.expression.lci.DomainReader; import dev.webfx.stack.orm.expression.terms.ExpressionArray; import dev.webfx.extras.type.PrimType; import dev.webfx.platform.util.Strings; import dev.webfx.stack.orm.expression.terms.function.SqlAggregateFunction; /** * @author Bruno Salmon */ public final class StringAgg<T> extends SqlAggregateFunction<T> { public StringAgg() { super("string_agg", null, null, PrimType.STRING, true); } @Override public Object evaluateOnAggregates(T referrer, Object[] aggregates, Expression<T> operand, DomainReader<T> domainReader) { String delimiter = ","; Expression<T> stringOperand = operand; if (operand instanceof ExpressionArray) { ExpressionArray<T> array = (ExpressionArray<T>) operand; stringOperand = array.getExpressions()[0]; Expression<T> delimiterOperand = array.getExpressions()[1]; delimiter = Strings.toSafeString(delimiterOperand.evaluate(referrer, domainReader)); } StringBuilder sb = new StringBuilder(); for (Object aggregate : aggregates) { Object value = stringOperand.evaluate((T) aggregate, domainReader); if (value != null) { if (sb.length() > 0) sb.append(delimiter); sb.append(value); } } return sb.toString(); } }
[ "dev.salmonb@gmail.com" ]
dev.salmonb@gmail.com
803c7c4ba098d4ec39bbbd0b7abad3d19b55ef55
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/124/777/CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54c.java
3c3725c1f795c7aa26cd599856d00c3907ad38ef
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,636
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54c.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-54c.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_read_check_min * GoodSink: Read from array after verifying that data is at least 0 and less than array.length * BadSink : Read from array after verifying that data is at least 0 (but not verifying that data less than array.length) * Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package * * */ public class CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54c { public void badSink(int data ) throws Throwable { (new CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54d()).badSink(data ); } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(int data ) throws Throwable { (new CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54d()).goodG2BSink(data ); } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(int data ) throws Throwable { (new CWE129_Improper_Validation_of_Array_Index__connect_tcp_array_read_check_min_54d()).goodB2GSink(data ); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
b8136e64eba2db4a055ff1da8010ed6b54a1b9e8
cd3fce007e6d07d77994910981cdbd0cd561b364
/app/src/main/java/com/yxld/yxchuangxin/ui/activity/xiongmai/lib/sdk/struct/H264_DVR_TIME.java
183d34c653cf28cc238a711283cf8ce57b95508a
[]
no_license
sahujaunpuri/xinshequ
5d5d66f9b5c19ca106c285a2156d65fe2ceef397
6f8e7ab427786ed2ba7b1326320a8ac02918aac7
refs/heads/master
2020-04-10T07:19:46.124461
2018-12-04T09:34:51
2018-12-04T09:34:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package com.yxld.yxchuangxin.ui.activity.xiongmai.lib.sdk.struct; import java.io.Serializable; public class H264_DVR_TIME implements Serializable{ public int st_0_dwYear; // 年 public int st_1_dwMonth; // 月 public int st_2_dwDay; // 日 public int st_3_dwHour; // 时 public int st_4_dwMinute; // 分 public int st_5_dwSecond; // 秒 @Override public String toString() { return "H264_DVR_TIME [st_0_dwYear=" + st_0_dwYear + ", st_1_dwMonth=" + st_1_dwMonth + ", st_2_dwDay=" + st_2_dwDay + ", st_3_dwHour=" + st_3_dwHour + ", st_4_dwMinute=" + st_4_dwMinute + ", st_5_dwSecond=" + st_5_dwSecond + "]"; } }
[ "afjzwed@163.com" ]
afjzwed@163.com
12cdc11ee54346294798aadb0b75246a25ae6920
df134b422960de6fb179f36ca97ab574b0f1d69f
/net/minecraft/server/v1_16_R2/DataConverterSchemaV2100.java
fcc5cb4d4ca883327f5ee04fbb605914f2e088e0
[]
no_license
TheShermanTanker/NMS-1.16.3
bbbdb9417009be4987872717e761fb064468bbb2
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
refs/heads/master
2022-12-29T15:32:24.411347
2020-10-08T11:56:16
2020-10-08T11:56:16
302,324,687
0
1
null
null
null
null
UTF-8
Java
false
false
1,893
java
/* */ package net.minecraft.server.v1_16_R2; /* */ /* */ import com.mojang.datafixers.DSL; /* */ import com.mojang.datafixers.schemas.Schema; /* */ import com.mojang.datafixers.types.templates.TypeTemplate; /* */ import java.util.Map; /* */ import java.util.function.Supplier; /* */ /* */ /* */ /* */ /* */ public class DataConverterSchemaV2100 /* */ extends DataConverterSchemaNamed /* */ { /* */ public DataConverterSchemaV2100(int var0, Schema var1) { /* 16 */ super(var0, var1); /* */ } /* */ /* */ protected static void a(Schema var0, Map<String, Supplier<TypeTemplate>> var1, String var2) { /* 20 */ var0.register(var1, var2, () -> DataConverterSchemaV100.a(var0)); /* */ } /* */ /* */ /* */ public Map<String, Supplier<TypeTemplate>> registerEntities(Schema var0) { /* 25 */ Map<String, Supplier<TypeTemplate>> var1 = super.registerEntities(var0); /* 26 */ a(var0, var1, "minecraft:bee"); /* 27 */ a(var0, var1, "minecraft:bee_stinger"); /* 28 */ return var1; /* */ } /* */ /* */ /* */ public Map<String, Supplier<TypeTemplate>> registerBlockEntities(Schema var0) { /* 33 */ Map<String, Supplier<TypeTemplate>> var1 = super.registerBlockEntities(var0); /* */ /* 35 */ var0.register(var1, "minecraft:beehive", () -> DSL.optionalFields("Items", DSL.list(DataConverterTypes.ITEM_STACK.in(var0)), "Bees", DSL.list(DSL.optionalFields("EntityData", DataConverterTypes.ENTITY_TREE.in(var0))))); /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* 43 */ return var1; /* */ } /* */ } /* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\DataConverterSchemaV2100.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
a50bfb998582f85e1f1cbabda7818a3b2d2856be
e8a309fd11b09e6bc17943041dc4f5268c48e87b
/src/main/java/com/xvitcoder/springmvcangularjs/model/OrderStatus.java
7998e5c10f1faed24cf1dbccd52465e27599cf4a
[]
no_license
RIMS-team/NetCrackerProj_SA_v2
0edb9dd3a2a3bdf7a89ab009c30cb009152318ae
c8d4c685ff6f9a2f37f24cf106b6bb4036773bdd
refs/heads/master
2021-01-13T02:42:03.574222
2017-02-02T23:40:09
2017-02-02T23:40:09
77,183,978
0
0
null
null
null
null
UTF-8
Java
false
false
1,043
java
package com.xvitcoder.springmvcangularjs.model; /** * Created by dell on 24-Nov-16. */ public class OrderStatus { protected int id; protected String code; protected String name; //protected String attrTypeCode; == 'ORD_STATUS' public OrderStatus() { } public OrderStatus(int id, String code, String name) { this.id = id; this.code = code; this.name = name; } public void setId(int id) { this.id = id; } public int getId() { return id; } public void setCode(String code) { this.code = code; } public String getCode() { return code; } public void setName(String name) { this.name = name; } public String getName() { return name; } // public void setAttrTypeCode(String attrTypeCode) { // this.attrTypeCode = attrTypeCode; // } // // public String getAttrTypeCode() { // return attrTypeCode; // } public String toString() { return ""; } }
[ "a" ]
a
ec57bbdbcaaa34940c7f124ec86a7d40fb88f9db
1ed0e7930d6027aa893e1ecd4c5bba79484b7c95
/keiji/source/java/jp/maio/sdk/android/av.java
610ab00a58b0f3f181cec84c301cbec675f46522
[]
no_license
AnKoushinist/hikaru-bottakuri-slot
36f1821e355a76865057a81221ce2c6f873f04e5
7ed60c6d53086243002785538076478c82616802
refs/heads/master
2021-01-20T05:47:00.966573
2017-08-26T06:58:25
2017-08-26T06:58:25
101,468,394
0
1
null
null
null
null
UTF-8
Java
false
false
4,549
java
package jp.maio.sdk.android; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.Timer; import java.util.TimerTask; import org.cocos2dx.lib.BuildConfig; import org.cocos2dx.lib.GameControllerDelegate; public class av { private static av c = null; private static String d = (v.b() + "/WebApiManager/viewlog/viewlog.log"); private Timer a; private TimerTask b; private String e = "viewlog.log"; private ArrayList f = new ArrayList(); private boolean g = true; private av() { } public static synchronized av a(String str, int i) { av avVar; synchronized (av.class) { if (c == null) { c = new av(); c.b(str, i); } avVar = c; } return avVar; } private synchronized void a() { try { OutputStream fileOutputStream = new FileOutputStream(new File(d)); ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream); objectOutputStream.writeObject(this.f); objectOutputStream.close(); fileOutputStream.close(); } catch (Exception e) { e.printStackTrace(); } } private synchronized void a(int i) { Calendar instance = Calendar.getInstance(); instance.add(12, -i); Collection arrayList = new ArrayList(); for (int size = this.f.size() - 1; size >= 0; size--) { au auVar = (au) this.f.get(size); if (instance.getTime().after(auVar.e) && auVar.d.booleanValue()) { arrayList.add(auVar); } } if (!arrayList.isEmpty()) { this.f.removeAll(arrayList); } } private void a(String str) { this.b = new aw(this, str); } private synchronized ArrayList b() { ArrayList arrayList; ArrayList arrayList2 = new ArrayList(); try { InputStream fileInputStream = new FileInputStream(new File(d)); ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream); arrayList = (ArrayList) objectInputStream.readObject(); try { objectInputStream.close(); fileInputStream.close(); } catch (Exception e) { } } catch (Exception e2) { arrayList = arrayList2; } return arrayList; } private synchronized void b(String str, int i) { if (this.a == null) { File file = new File(d); if (!file.exists()) { try { file.getParentFile().mkdirs(); file.createNewFile(); } catch (Exception e) { } } c.c(str, i); } } private void c(String str, int i) { this.f = b(); this.a = new Timer(); a(str); if (i < 1) { i = 20; } this.a.schedule(this.b, 0, (long) (i * GameControllerDelegate.THUMBSTICK_LEFT_X)); } public synchronized void a(au auVar, int i) { this.g = false; boolean z; try { a(i); this.f.add(auVar); a(); z = "Add Log"; bc.a(z, BuildConfig.FLAVOR, null); this.g = z; } catch (Exception e) { z = e; this.g = z; } finally { this.g = true; } } public synchronized boolean a(Date date, String str) { boolean z; int size = this.f.size() - 1; while (size >= 0) { au auVar = (au) this.f.get(size); if (auVar.a.equals(str)) { z = !date.before(auVar.e); } else { size--; } } z = true; return z; } public synchronized int b(Date date, String str) { int i; i = 0; Iterator it = this.f.iterator(); while (it.hasNext()) { au auVar = (au) it.next(); int i2 = (auVar.a.equals(str) && !auVar.b.booleanValue() && date.before(auVar.e)) ? i + 1 : i; i = i2; } return i; } }
[ "09f713c@sigaint.org" ]
09f713c@sigaint.org
21296b0c4ca78106d5f3fd1e889fcbfc82765fa9
9c8f45203fe0eb9bc337ddc583daf716a67080e5
/public/transactions-jta/src/main/java/com/atomikos/datasource/pool/XPooledConnectionEventListener.java
338e178d6e27b40cbf494dc865271bd044abd43d
[]
no_license
ragnel/transactions-essentials
f26cb108c44c0db0c33f75b53837ed20032c31b5
909422b15000a44088ea09a6f112da9f9cd39c6b
refs/heads/master
2023-08-10T15:24:36.945005
2023-05-05T13:45:11
2023-05-05T13:45:11
136,076,751
0
0
null
2018-06-04T20:06:07
2018-06-04T20:06:07
null
UTF-8
Java
false
false
471
java
/** * Copyright (C) 2000-2023 Atomikos <info@atomikos.com> * * LICENSE CONDITIONS * * See http://www.atomikos.com/Main/WhichLicenseApplies for details. */ package com.atomikos.datasource.pool; public interface XPooledConnectionEventListener<ConnectionType> { /** * fired when a connection changed its state to terminated * @param connection */ void onXPooledConnectionTerminated(XPooledConnection<ConnectionType> connection); }
[ "guy@atomikos.com" ]
guy@atomikos.com
8afaf9aca50a4a0544e7375dcddc4e9fd28471e8
208ba847cec642cdf7b77cff26bdc4f30a97e795
/x/src/main/java/org.wp.x/ui/stats/models/VisitsModel.java
9aef205652a932575f991f8a56662ad808d7ee4e
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
4,770
java
package org.wp.x.ui.stats.models; import android.text.TextUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.wp.x.util.AppLog; import org.wp.x.util.StringUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class VisitsModel extends BaseStatsModel { private String mFields; // Holds a JSON Object private String mUnit; private String mDate; private String mBlogID; private List<VisitModel> mVisits; public VisitsModel(String blogID, JSONObject response) throws JSONException { this.setBlogID(blogID); this.setDate(response.getString("date")); this.setUnit(response.getString("unit")); this.setFields(response.getJSONArray("fields").toString()); JSONArray dataJSON; try { dataJSON = response.getJSONArray("data"); } catch (JSONException e) { AppLog.e(AppLog.T.STATS, this.getClass().getName() + " cannot convert the data field to a JSON array", e); dataJSON = new JSONArray(); } if (dataJSON == null || dataJSON.length() == 0) { mVisits = new ArrayList<>(0); } else { // Read the position/index of each field in the response HashMap<String, Integer> columnsMapping = new HashMap<>(6); final JSONArray fieldsJSON = getFieldsJSON(); if (fieldsJSON == null || fieldsJSON.length() == 0) { mVisits = new ArrayList<>(0); } else { try { for (int i = 0; i < fieldsJSON.length(); i++) { final String field = fieldsJSON.getString(i); columnsMapping.put(field, i); } } catch (JSONException e) { AppLog.e(AppLog.T.STATS, "Cannot read the parameter fields from the JSON response." + "Response: " + response.toString(), e); mVisits = new ArrayList<>(0); } } int viewsColumnIndex = columnsMapping.get("views"); int visitorsColumnIndex = columnsMapping.get("visitors"); int likesColumnIndex = columnsMapping.get("likes"); int commentsColumnIndex = columnsMapping.get("comments"); int periodColumnIndex = columnsMapping.get("period"); int numPoints = dataJSON.length(); mVisits = new ArrayList<>(numPoints); for (int i = 0; i < numPoints; i++) { try { JSONArray currentDayData = dataJSON.getJSONArray(i); VisitModel currentVisitModel = new VisitModel(); currentVisitModel.setBlogID(getBlogID()); currentVisitModel.setPeriod(currentDayData.getString(periodColumnIndex)); currentVisitModel.setViews(currentDayData.getInt(viewsColumnIndex)); currentVisitModel.setVisitors(currentDayData.getInt(visitorsColumnIndex)); currentVisitModel.setComments(currentDayData.getInt(commentsColumnIndex)); currentVisitModel.setLikes(currentDayData.getInt(likesColumnIndex)); mVisits.add(currentVisitModel); } catch (JSONException e) { AppLog.e(AppLog.T.STATS, "Cannot read the Visit item at index " + i + " Response: " + response.toString(), e); } } } } public List<VisitModel> getVisits() { return mVisits; } public String getBlogID() { return mBlogID; } private void setBlogID(String blogID) { this.mBlogID = blogID; } public String getDate() { return mDate; } private void setDate(String date) { this.mDate = date; } public String getUnit() { return mUnit; } private void setUnit(String unit) { this.mUnit = unit; } private JSONArray getFieldsJSON() { JSONArray jArray; try { String categories = StringUtils.unescapeHTML(this.getFields() != null ? this.getFields() : "[]"); if (TextUtils.isEmpty(categories)) { jArray = new JSONArray(); } else { jArray = new JSONArray(categories); } } catch (JSONException e) { AppLog.e(AppLog.T.STATS, this.getClass().getName() + " cannot convert the string to JSON", e); return null; } return jArray; } private void setFields(String fields) { this.mFields = fields; } private String getFields() { return mFields; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
a37893db5d07d7732180fd86d309b1321b0ed929
bfc7a4cda00a0b89d4b984c83976770b0523f7f5
/OA/JavaSource/com/icss/oa/addressbook/admin/writeexcel.java
1f730636a46b4a5335e0e5177ce83499fabb0088
[]
no_license
liveqmock/oa
100c4a554c99cabe0c3f9af7a1ab5629dcb697a6
0dfbb239210d4187e46a933661a031dba2711459
refs/heads/master
2021-01-18T05:02:00.704337
2015-03-03T06:47:30
2015-03-03T06:47:30
35,557,095
0
1
null
2015-05-13T15:26:06
2015-05-13T15:26:06
null
GB18030
Java
false
false
5,867
java
/* * Created on 2004-4-12 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package com.icss.oa.addressbook.admin; import java.sql.Connection; import java.util.Iterator; import java.util.List; import jxl.write.Label; import jxl.write.WritableCellFormat; import jxl.write.WritableFont; import jxl.write.WritableSheet; import jxl.write.WriteException; import jxl.write.biff.RowsExceededException; import com.icss.oa.addressbook.handler.AddressbookHandler; import com.icss.oa.addressbook.vo.AddressbookContentVO; import com.icss.oa.addressbook.vo.AddressbookFolderVO; /** * @author Administrator * * To change the template for this generated type comment go to Window - * Preferences - Java - Code Generation - Code and Comments */ public class writeexcel { private Connection conn; public String filepath = null; List chabfList = null; List chabcList = null; AddressbookFolderVO chabfvo = null; AddressbookContentVO chabcvo = null; Label l = null; WritableFont detFont; WritableCellFormat detFormat; WritableSheet sheet; WritableCellFormat titleFormat; int returncolumn; int returnrow; int changecolumn; int changerow; public writeexcel(Connection conn) { this.conn = conn; } public void setl(Label _l) { l = _l; } public void setdetFormat(WritableCellFormat _detFormat) { detFormat = _detFormat; } public void setsheet(WritableSheet _sheet) { sheet = _sheet; } public void settitleFormat(WritableCellFormat _titleFormat) { titleFormat = _titleFormat; } public Integer writeexcel(int column, int i, Integer haschildabf) throws RowsExceededException, WriteException { AddressbookHandler handler = new AddressbookHandler(conn); chabfList = handler.getchildList(haschildabf); Iterator chabfit = chabfList.iterator(); int j; //int i=row; for (j = i + 1; chabfit.hasNext(); j++) { chabfvo = (AddressbookFolderVO) chabfit.next(); if (("1").equals(chabfvo.getAbfFlag())) { //打印出所有分组信息 //System.out.println("+++++++has child abf+++++++"); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column, j, chabfvo.getAbfName(), detFormat); sheet.addCell(l); haschildabf = chabfvo.getAbfId(); //System.out.println("+++++++this is in the while abfolder column_j+++++++"+haschildabf+column+j); if (handler.hasChildinfo(haschildabf)) { System.out.println("+++++++there is still has childabf haschildabf+++++++" + haschildabf + column + j); writeexcel childwriteexcel = new writeexcel(conn); childwriteexcel.setsheet(sheet); childwriteexcel.setl(l); childwriteexcel.setdetFormat(detFormat); childwriteexcel.settitleFormat(titleFormat); haschildabf = childwriteexcel.writeexcel(column, j, haschildabf); column = childwriteexcel.getcolumn(); j = childwriteexcel.getrow() - 1; System.out.println("++++++out out out " + column + j + haschildabf); } } else { chabcList = handler.getdetailFileList(chabfvo.getAbfId()); System.out.println("+++++++there is childabc+++++++"); System.out.println("+++++++column_j+++++++" + column + j); Iterator chabcit = chabcList.iterator(); if (chabcit.hasNext()) { chabcvo = (AddressbookContentVO) chabcit.next(); System.out.println("+++++++this is in the while abcontent column_j+++++++" + chabcvo.getAddAbfcId() + column + j); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column, j, chabcvo.getAbcName(), detFormat); sheet.addCell(l); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column + 1, j, "(c)" + chabcvo.getAbcCellphone(), detFormat); sheet.addCell(l); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column + 1, j + 1, "(o)" + chabcvo.getAbcCompanytel(), detFormat); sheet.addCell(l); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column + 1, j + 2, "(f)" + chabcvo.getAbcFamilytel(), detFormat); sheet.addCell(l); if (j > 50) { j = 3; column = column + 2; writetitle(sheet, l, detFormat, titleFormat, column); } l = new Label(column + 1, j + 3, "(e)" + chabcvo.getAbcEmail(), detFormat); sheet.addCell(l); j = j + 3; //haschildabf=childabcvo.getAddAbfcId(); //System.out.println("+++++++there is childabc haschildabf+++++++"+haschildabf); } } } i = j; returncolumn = column; returnrow = i; System.out.println("+++++++there is outing while+++++++" + haschildabf + returncolumn + returnrow); return haschildabf; } public int getcolumn() { return returncolumn; } public int getrow() { return returnrow; } /*public int changcolumn(int _changecolumn) { changecolumn=_changecolumn+2; return changecolumn; } public int changrow(int _changerow) { changerow=_changerow; if(changerow>20){ changerow=3; } return returnrow; } */ public void writetitle(WritableSheet sheet, Label l, WritableCellFormat detFormat, WritableCellFormat titleFormat, int column) throws RowsExceededException, WriteException { l = new Label(column, 2, "姓名", titleFormat); sheet.addCell(l); l = new Label(column + 1, 2, "电话", titleFormat); sheet.addCell(l); } }
[ "peijn1026@gmail.com" ]
peijn1026@gmail.com
393a4d263c757e3ae4335839df2448a892c9ff69
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/hd/vaca/ds/HD_VACA_3003_ADataSet.java
5ad6757c72729842cd34cf5c614e8a122b639611
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
2,654
java
/*************************************************************************************************** * 파일명 : .java * 기능 : * 작성일자 : * 작성자 : 이태식 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.hd.vaca.ds; import java.sql.*; import java.util.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.hd.vaca.dm.*; import chosun.ciis.hd.vaca.rec.*; /** * */ public class HD_VACA_3003_ADataSet extends somo.framework.db.BaseDataSet implements java.io.Serializable{ public String errcode; public String errmsg; public HD_VACA_3003_ADataSet(){} public HD_VACA_3003_ADataSet(String errcode, String errmsg){ this.errcode = errcode; this.errmsg = errmsg; } public void setErrcode(String errcode){ this.errcode = errcode; } public void setErrmsg(String errmsg){ this.errmsg = errmsg; } public String getErrcode(){ return this.errcode; } public String getErrmsg(){ return this.errmsg; } public void getValues(CallableStatement cstmt) throws SQLException{ this.errcode = Util.checkString(cstmt.getString(1)); this.errmsg = Util.checkString(cstmt.getString(2)); } }/*---------------------------------------------------------------------------------------------------- Web Tier에서 DataSet 객체 관련 코드 작성시 사용하십시오. <% HD_VACA_3003_ADataSet ds = (HD_VACA_3003_ADataSet)request.getAttribute("ds"); %> Web Tier에서 Record 객체 관련 코드 작성시 사용하십시오. ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DataSet 객체의 <%= %> 작성시 사용하십시오. <%= ds.getErrcode()%> <%= ds.getErrmsg()%> ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 Record 객체의 <%= %> 작성시 사용하십시오. ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Wed Mar 16 11:06:12 KST 2016 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
dc9430d023a27a28890e11724a45352411618a12
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
/linkwee-oss/src/main/java/com/linkwee/activity/model/RedpacketCal.java
2ae7b0ac115de1f9699875d3b1f0cadaa7262382
[]
no_license
zhangjiayin/supermarket
f7715aa3fdd2bf202a29c8683bc9322b06429b63
6c37c7041b5e1e32152e80564e7ea4aff7128097
refs/heads/master
2020-06-10T16:57:09.556486
2018-10-30T07:03:15
2018-10-30T07:03:15
193,682,975
0
1
null
2019-06-25T10:03:03
2019-06-25T10:03:03
null
UTF-8
Java
false
false
3,220
java
package com.linkwee.activity.model; import java.io.Serializable; import java.util.Date; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; import com.fasterxml.jackson.annotation.JsonFormat; public class RedpacketCal implements Serializable{ private static final long serialVersionUID = -4141279311355008348L; @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") private Date calDate; // 日期 private Integer sendRedpacketlcsCounts; //发放红包的理财师人数 private Integer lcsSendRedpacketCounts; //理财师发放的红包数量 private Integer lcsSendRedpacketCustomerCounts; //理财师发放红包的客户数量 private Double lcsSendRedpacketAmount; //理财师发放红包金额 private Integer useRedpacketCustomerCounts; //使用红包的客户数量 private Integer redpacketUseCounts; //红包使用数量 private Double redpacketUseAmount; //红包使用金额 private Double redpacketYearAmount; //红包产生的年化投资金额 public Date getCalDate() { return calDate; } public void setCalDate(Date calDate) { this.calDate = calDate; } public Integer getSendRedpacketlcsCounts() { return sendRedpacketlcsCounts; } public void setSendRedpacketlcsCounts(Integer sendRedpacketlcsCounts) { this.sendRedpacketlcsCounts = sendRedpacketlcsCounts; } public Integer getLcsSendRedpacketCounts() { return lcsSendRedpacketCounts; } public void setLcsSendRedpacketCounts(Integer lcsSendRedpacketCounts) { this.lcsSendRedpacketCounts = lcsSendRedpacketCounts; } public Integer getLcsSendRedpacketCustomerCounts() { return lcsSendRedpacketCustomerCounts; } public void setLcsSendRedpacketCustomerCounts( Integer lcsSendRedpacketCustomerCounts) { this.lcsSendRedpacketCustomerCounts = lcsSendRedpacketCustomerCounts; } public Double getLcsSendRedpacketAmount() { return lcsSendRedpacketAmount; } public void setLcsSendRedpacketAmount(Double lcsSendRedpacketAmount) { this.lcsSendRedpacketAmount = lcsSendRedpacketAmount; } public Integer getUseRedpacketCustomerCounts() { return useRedpacketCustomerCounts; } public void setUseRedpacketCustomerCounts(Integer useRedpacketCustomerCounts) { this.useRedpacketCustomerCounts = useRedpacketCustomerCounts; } public Integer getRedpacketUseCounts() { return redpacketUseCounts; } public void setRedpacketUseCounts(Integer redpacketUseCounts) { this.redpacketUseCounts = redpacketUseCounts; } public Double getRedpacketUseAmount() { return redpacketUseAmount; } public void setRedpacketUseAmount(Double redpacketUseAmount) { this.redpacketUseAmount = redpacketUseAmount; } public Double getRedpacketYearAmount() { return redpacketYearAmount; } public void setRedpacketYearAmount(Double redpacketYearAmount) { this.redpacketYearAmount = redpacketYearAmount; } @Override public String toString() { return JSON.toJSONString(this, SerializerFeature.UseISO8601DateFormat); } }
[ "liqimoon@qq.com" ]
liqimoon@qq.com
761e2caa0316277fa75c1dd44243b053134341b1
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/65/org/apache/commons/lang/IllegalClassException_IllegalClassException_83.java
8b9f7e9d706f6153118f3389e76e4f901d23d8a9
[]
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
810
java
org apach common lang thrown object instanc unexpect type except supplement standard code illeg argument except illegalargumentexcept code provid semant rich descript problem code illeg class except illegalclassexcept code repres method take genericli type paramet object typic due implement accept specif type string except place code illeg argument except illegalargumentexcept code pre foo object obj obj string illeg class except illegalclassexcept string obj string pre author matthew hawthorn author gari gregori author stephen colebourn version illeg class except illegalclassexcept illeg argument except illegalargumentexcept instanti messag param messag except messag illeg class except illegalclassexcept string messag messag
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
740fb6d8bf17661c320152022513ecf232ef7925
4669ae0a9c105e8c5191de5ee4bd24816e920828
/Intent/app/src/main/java/multi/android/intent/exam/ExamSecondActivity.java
83b1179c1a043baa9a14d7468585533ae44b5e6e
[]
no_license
kim-svadoz/Android
505be6a1f05ed88f1a3211eff7fc7ea176dbefdf
04ab4c33dea7ed1b265799d786a21ac334a78c9c
refs/heads/master
2021-05-16T22:11:10.526115
2020-05-25T09:49:33
2020-05-25T09:49:33
250,490,272
0
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
package multi.android.intent.exam; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.TextView; import multi.android.intent.R; public class ExamSecondActivity extends AppCompatActivity { TextView txt; Button btn; CheckBox member_state; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.exam_secondview); txt = findViewById(R.id.exam_result_txt); btn = findViewById(R.id.exam_close); member_state = findViewById(R.id.member_state); final Intent intent = getIntent(); String name = intent.getStringExtra("name"); if(name==null){ User dto = intent.getParcelableExtra("dto"); txt.setText(dto.getName()+","+dto.getTelNum()); }else{ String tel = intent.getStringExtra("tel"); txt.setText("입력한 id: "+name+", 입력한 pass: "+tel); } btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { intent.putExtra("chkVal", member_state.isChecked()); setResult(RESULT_OK, intent); finish(); } }); } }
[ "dhkdghehfdl@gmail.com" ]
dhkdghehfdl@gmail.com
6ad0c42d29162d4749cf13b3d4a89a3b9bd11337
015fa633ea034d2be6aaa92aa3e1c663b38877e9
/src/main/java/generics/sozdanie_ekzempliarov_tipov/ClassAsFactory.java
efcc1c4d9a80f6957e5ea4fd5705341b427bb7eb
[]
no_license
programming-practices/java-core
b510a5104f417e670d74b94d62b6beff8d829b44
7680e92adc6bb9310ecc401b3768fc66b3ee66c2
refs/heads/main
2023-03-15T09:44:59.469839
2021-03-01T11:53:50
2021-03-01T11:53:50
303,077,639
1
0
null
null
null
null
UTF-8
Java
false
false
428
java
package generics.sozdanie_ekzempliarov_tipov; public class ClassAsFactory<T> { T x; public ClassAsFactory(Class<T> kind) { try { x = kind.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } }
[ "tsyupryk.roman@gmail.com" ]
tsyupryk.roman@gmail.com
b34f4451edb0981639ba78d1021448218c3233a4
028cbe18b4e5c347f664c592cbc7f56729b74060
/external/modules/bean-validator/hibernate-validator/5.0.0.Final/project/engine/src/main/java/org/hibernate/validator/constraints/br/CNPJ.java
716806a57aafdc7b11d5d1f7d967b33785f02026
[ "Apache-2.0" ]
permissive
dmatej/Glassfish-SVN-Patched
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
269e29ba90db6d9c38271f7acd2affcacf2416f1
refs/heads/master
2021-05-28T12:55:06.267463
2014-11-11T04:21:44
2014-11-11T04:21:44
23,610,469
1
0
null
null
null
null
UTF-8
Java
false
false
2,448
java
/* * JBoss, Home of Professional Open Source * Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * 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.hibernate.validator.constraints.br; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.validation.Constraint; import javax.validation.Payload; import javax.validation.ReportAsSingleViolation; import javax.validation.constraints.Pattern; import org.hibernate.validator.constraints.ModCheck; import org.hibernate.validator.constraints.ModCheck.List; import org.hibernate.validator.constraints.ModCheck.ModType; import static java.lang.annotation.ElementType.ANNOTATION_TYPE; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * Validates a CNPJ (Cadastro de Pessoa Jur\u00eddica - Brazilian corporate tax payer registry number). * * @author George Gastaldi */ @Pattern(regexp = "([0-9]{2}[.]?[0-9]{3}[.]?[0-9]{3}[/]?[0-9]{4}[-]?[0-9]{2})") @List({ @ModCheck(modType = ModType.MOD11, checkDigitPosition = 12, multiplier = 9, endIndex = 12), @ModCheck(modType = ModType.MOD11, checkDigitPosition = 13, multiplier = 9, endIndex = 13) }) @ReportAsSingleViolation @Documented @Constraint(validatedBy = { }) @Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER }) @Retention(RUNTIME) public @interface CNPJ { String message() default "{org.hibernate.validator.constraints.br.CNPJ.message}"; Class<?>[] groups() default { }; Class<? extends Payload>[] payload() default { }; }
[ "mtaube@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5" ]
mtaube@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
36b9c83f884a6a826979284528c42fe05d09170e
896cca57024190fc3fbb62f2bd0188fff24b24c8
/2.7.x/choicemaker-cm/choicemaker-modeling/com.wcohen.ss/src/main/java/com/wcohen/ss/api/StringWrapper.java
1cd0b16341cbaf4ebe206fb658e8fe4b4973f51e
[]
no_license
fgregg/cm
0d4f50f92fde2a0bed465f2bec8eb7f2fad8362c
c0ab489285938f14cdf0a6ed64bbda9ac4d04532
refs/heads/master
2021-01-10T11:27:00.663407
2015-08-11T19:35:00
2015-08-11T19:35:00
55,807,163
0
1
null
null
null
null
UTF-8
Java
false
false
536
java
package com.wcohen.ss.api; import java.io.Serializable; /** * Something that implements some of the functionality of Java's * string class, but which is a non-final class, and hence can also * cache additional information to facilitate later processing. */ public interface StringWrapper extends Serializable { /** Return the string that is wrapped. */ public String unwrap(); /** Return the i-th char of the wrapped string */ public char charAt(int i); /** Return the length of the wrapped string */ public int length(); }
[ "rick@rphall.com" ]
rick@rphall.com
46cccab6e486c0fc84ac7671377958f674e7e0a0
43d7c7a753cd929e3f40dedde42651210baf937f
/lib/rhino/src/org/mozilla/javascript/ast/SwitchStatement.java
7fd289fbf33b38002c197d930db67eaed562d1af
[ "MPL-2.0", "Apache-2.0", "MPL-1.1", "MIT", "BSD-3-Clause", "GPL-1.0-or-later", "CPL-1.0", "NPL-1.1" ]
permissive
pietrobraione/sushi-experiments-closure01
33b45c45c9385c39551ffb2b56fa2b040e373602
8f6321a23148cbff1e272cd8039dfece33373a39
refs/heads/master
2021-07-14T11:02:55.221688
2021-07-12T18:01:27
2021-07-12T18:01:27
71,781,378
1
0
Apache-2.0
2019-04-27T18:44:19
2016-10-24T11:17:52
Java
UTF-8
Java
false
false
4,475
java
/* -*- Mode: java; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mozilla.javascript.ast; import org.mozilla.javascript.Token; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Switch statement AST node type. * Node type is {@link Token#SWITCH}.<p> * * <pre><i>SwitchStatement</i> : * <b>switch</b> ( Expression ) CaseBlock * <i>CaseBlock</i> : * { [CaseClauses] } * { [CaseClauses] DefaultClause [CaseClauses] } * <i>CaseClauses</i> : * CaseClause * CaseClauses CaseClause * <i>CaseClause</i> : * <b>case</b> Expression : [StatementList] * <i>DefaultClause</i> : * <b>default</b> : [StatementList]</pre> */ public class SwitchStatement extends Jump { private static final List<SwitchCase> NO_CASES = Collections.unmodifiableList(new ArrayList<SwitchCase>()); private AstNode expression; private List<SwitchCase> cases; private int lp = -1; private int rp = -1; { type = Token.SWITCH; } public SwitchStatement() { } public SwitchStatement(int pos) { // can't call super (Jump) for historical reasons position = pos; } public SwitchStatement(int pos, int len) { position = pos; length = len; } /** * Returns the switch discriminant expression */ public AstNode getExpression() { return expression; } /** * Sets the switch discriminant expression, and sets its parent * to this node. * @throws IllegalArgumentException} if expression is {@code null} */ public void setExpression(AstNode expression) { assertNotNull(expression); this.expression = expression; expression.setParent(this); } /** * Returns case statement list. If there are no cases, * returns an immutable empty list. */ public List<SwitchCase> getCases() { return cases != null ? cases : NO_CASES; } /** * Sets case statement list, and sets the parent of each child * case to this node. * @param cases list, which may be {@code null} to remove all the cases */ public void setCases(List<SwitchCase> cases) { if (cases == null) { this.cases = null; } else { if (this.cases != null) this.cases.clear(); for (SwitchCase sc : cases) addCase(sc); } } /** * Adds a switch case statement to the end of the list. * @throws IllegalArgumentException} if switchCase is {@code null} */ public void addCase(SwitchCase switchCase) { assertNotNull(switchCase); if (cases == null) { cases = new ArrayList<SwitchCase>(); } cases.add(switchCase); switchCase.setParent(this); } /** * Returns left paren position, -1 if missing */ public int getLp() { return lp; } /** * Sets left paren position */ public void setLp(int lp) { this.lp = lp; } /** * Returns right paren position, -1 if missing */ public int getRp() { return rp; } /** * Sets right paren position */ public void setRp(int rp) { this.rp = rp; } /** * Sets both paren positions */ public void setParens(int lp, int rp) { this.lp = lp; this.rp = rp; } @Override public String toSource(int depth) { String pad = makeIndent(depth); StringBuilder sb = new StringBuilder(); sb.append(pad); sb.append("switch ("); sb.append(expression.toSource(0)); sb.append(") {\n"); for (SwitchCase sc : cases) { sb.append(sc.toSource(depth + 1)); } sb.append(pad); sb.append("}\n"); return sb.toString(); } /** * Visits this node, then the switch-expression, then the cases * in lexical order. */ @Override public void visit(NodeVisitor v) { if (v.visit(this)) { expression.visit(v); for (SwitchCase sc: getCases()) { sc.visit(v); } } } }
[ "pietro.braione@gmail.com" ]
pietro.braione@gmail.com
8174545444752271bf896db6dd9a0890ecce0312
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/accounting/server/command/CreateGlResourceTypeCommand.java
b092dd3a38e080cd334a26a5971e6cd2587ad01a
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
4,510
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // 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.echothree.control.user.accounting.server.command; import com.echothree.control.user.accounting.common.form.CreateGlResourceTypeForm; import com.echothree.model.control.accounting.server.control.AccountingControl; import com.echothree.model.control.party.common.PartyTypes; import com.echothree.model.control.security.common.SecurityRoleGroups; import com.echothree.model.control.security.common.SecurityRoles; import com.echothree.model.data.accounting.server.entity.GlResourceType; import com.echothree.model.data.user.common.pk.UserVisitPK; import com.echothree.util.common.message.ExecutionErrors; import com.echothree.util.common.validation.FieldDefinition; import com.echothree.util.common.validation.FieldType; import com.echothree.util.common.command.BaseResult; import com.echothree.util.server.control.BaseSimpleCommand; import com.echothree.util.server.control.CommandSecurityDefinition; import com.echothree.util.server.control.PartyTypeDefinition; import com.echothree.util.server.control.SecurityRoleDefinition; import com.echothree.util.server.persistence.Session; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CreateGlResourceTypeCommand extends BaseSimpleCommand<CreateGlResourceTypeForm> { private final static CommandSecurityDefinition COMMAND_SECURITY_DEFINITION; private final static List<FieldDefinition> FORM_FIELD_DEFINITIONS; static { COMMAND_SECURITY_DEFINITION = new CommandSecurityDefinition(Collections.unmodifiableList(Arrays.asList( new PartyTypeDefinition(PartyTypes.UTILITY.name(), null), new PartyTypeDefinition(PartyTypes.EMPLOYEE.name(), Collections.unmodifiableList(Arrays.asList( new SecurityRoleDefinition(SecurityRoleGroups.GlResourceType.name(), SecurityRoles.Create.name()) ))) ))); FORM_FIELD_DEFINITIONS = Collections.unmodifiableList(Arrays.asList( new FieldDefinition("GlResourceTypeName", FieldType.ENTITY_NAME, true, null, null), new FieldDefinition("IsDefault", FieldType.BOOLEAN, true, null, null), new FieldDefinition("SortOrder", FieldType.SIGNED_INTEGER, true, null, null), new FieldDefinition("Description", FieldType.STRING, false, 1L, 132L) )); } /** Creates a new instance of CreateGlResourceTypeCommand */ public CreateGlResourceTypeCommand(UserVisitPK userVisitPK, CreateGlResourceTypeForm form) { super(userVisitPK, form, COMMAND_SECURITY_DEFINITION, FORM_FIELD_DEFINITIONS, false); } @Override protected BaseResult execute() { var accountingControl = Session.getModelController(AccountingControl.class); String glResourceTypeName = form.getGlResourceTypeName(); GlResourceType glResourceType = accountingControl.getGlResourceTypeByName(glResourceTypeName); if(glResourceType == null) { var partyPK = getPartyPK(); var isDefault = Boolean.valueOf(form.getIsDefault()); var sortOrder = Integer.valueOf(form.getSortOrder()); var description = form.getDescription(); glResourceType = accountingControl.createGlResourceType(glResourceTypeName, isDefault, sortOrder, partyPK); if(description != null) { accountingControl.createGlResourceTypeDescription(glResourceType, getPreferredLanguage(), description, partyPK); } } else { addExecutionError(ExecutionErrors.DuplicateGlResourceTypeName.name(), glResourceTypeName); } return null; } }
[ "rich@echothree.com" ]
rich@echothree.com
15773d433b2a96fdbc4cbf47b713cdca490717de
1c2f9a6fbe73df6c663c7d08ceaffd5e202e55ff
/hanbit/src/main/java/com/hanbit/web/admin/AdminServiceImpl.java
7621119a26db5fc0aa17e8657bd870a93d7d6508
[]
no_license
HT-K/hanbit_sts_grade
962836400596d92070fab57af6ddb42ec8ed5b70
b77f6dc6a79ffe788a24bba250534b08b43cdac9
refs/heads/master
2021-01-19T22:20:46.429408
2016-04-26T06:57:09
2016-04-26T06:57:18
65,425,564
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.hanbit.web.admin; import java.util.List; import org.apache.ibatis.session.SqlSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hanbit.web.grade.GradeMemberDTO; import com.hanbit.web.mapper.AdminMapper; @Service public class AdminServiceImpl implements AdminService{ private static final Logger logger = LoggerFactory.getLogger(AdminService.class); private static AdminService instance = new AdminServiceImpl(); @Autowired SqlSession session; @Autowired AdminDTO admin; public static AdminService getInstance() { return instance; } @Override public List<GradeMemberDTO> getMemberList() { // TODO Auto-generated method stub return null; } @Override public int addScore(GradeMemberDTO bean) { // TODO Auto-generated method stub return 0; } @Override public AdminDTO getAdmin(AdminDTO param) { AdminDTO temp = new AdminDTO(); temp = null; if (temp != null) { System.out.println("어드민 서비스 : 관리자가 널이 아님"); return temp; } else { System.out.println("어드민 서비스 : 관리자가 널임"); return null; } } @Override public AdminDTO login(AdminDTO param) { logger.info("memberService : login() 진입 후 id = {}",param.getId()); AdminMapper mapper = session.getMapper(AdminMapper.class); admin = mapper.login(param); if (admin != null) { logger.info("memberService : login() 성공 후 id = {}",admin.getId()); return admin; } else { logger.info("memberService : login() 실패, 널 반환"); return null; } } }
[ "pakjkwan@gmail.com" ]
pakjkwan@gmail.com
ee525c24936fc1b4d42259cf77aac86cbb3ef995
8e6456c06378bf3e16aebcfeb3d93d4f2b236c14
/src/ch09/RegularEx1.java
f44d972708d42348f123dc9257d202ef73ac11a2
[]
no_license
ialsghi123/java-basic
ddb35b5260d75308473a990f90dd58faa14d710d
e9cd8041ae04c98e858f3d96e974abd3b3e8c8d9
refs/heads/master
2023-02-21T13:40:44.321147
2022-12-13T03:51:22
2022-12-13T03:51:22
326,334,429
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package ch09; import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegularEx1 { public static void main(String[] args) { String[] data = {"bat", "baby", "bonus", "cA", "ca", "co", "count", "date", "disc"}; Pattern p = Pattern.compile("c[a-z]*"); for (int i = 0; i < data.length; i++) { Matcher m = p.matcher(data[i]); if (m.matches()) { System.out.println(data[i] + ","); } } } }
[ "ialsghi123@naver.com" ]
ialsghi123@naver.com
22ac1e5c842c93b8f93bc21836a63473278b0413
5e317864cf0d952587457aab6945c7706ddf9055
/crm-reactive-microservice/src/main/java/com/example/crm/document/Address.java
108d3ce3388ee0fd1eaed693f997d75e5024d744
[ "MIT" ]
permissive
deepcloudlabs/dcl350-2020-oct-19
d3048da0d547978b147a496ab8e9026660513eae
eeef31f0fc0da1db8b6de3afba73e0b9caefa664
refs/heads/main
2022-12-30T10:38:33.675766
2020-10-23T21:30:43
2020-10-23T21:30:43
304,814,308
0
0
null
null
null
null
UTF-8
Java
false
false
958
java
package com.example.crm.document; public class Address { private String city; private String country; private String line; private String zipCode; private AddressType type; public Address() { } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getLine() { return line; } public void setLine(String line) { this.line = line; } public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; } public AddressType getType() { return type; } public void setType(AddressType type) { this.type = type; } @Override public String toString() { return "Address [city=" + city + ", country=" + country + ", line=" + line + ", zipCode=" + zipCode + ", type=" + type + "]"; } }
[ "deepcloudlabs@gmail.com" ]
deepcloudlabs@gmail.com
bf8edd94704171bcbb74952b832703afd3fbba0c
beba93c13d613d3e6ebbc1e7603085bc37538ae5
/ws_orgs/gs-rest-service-master/complete/src/main/java/hello/repo/UsersClass.java
2aa8681b6224ac67644069a33870a0b5cf785669
[]
no_license
reset1301/javaProgs
c0f40da2701f9312e8d8aa070e55bcd25b085142
92979172ad66e6b5034cb433a050d06b364118ab
refs/heads/master
2022-12-23T23:33:39.077421
2019-10-26T18:29:50
2019-10-26T18:29:50
144,703,812
0
0
null
2022-12-16T04:32:39
2018-08-14T10:14:20
Java
UTF-8
Java
false
false
2,369
java
package hello.repo; import hello.dao.Office; import hello.dao.Position; import hello.dao.UserDoc; import hello.dao.Users; import org.hibernate.Criteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; import javax.persistence.criteria.*; import javax.persistence.metamodel.EntityType; import javax.persistence.metamodel.Metamodel; import java.util.ArrayList; import java.util.List; @Service public class UsersClass { private EntityManager em; @Autowired public UsersClass(EntityManager em) { this.em = em; } public List<Users> getUserList(long officeId, String firstName, String lastName, String middleName, Long positionId, Long userdocId, Long citizenshipCode) { CriteriaBuilder criteriaBuilder = em.getCriteriaBuilder(); CriteriaQuery<Users> cq = criteriaBuilder.createQuery(Users.class); Root<Users> usersRoot = cq.from(Users.class); cq.select(usersRoot); List<Predicate> predicates = new ArrayList<>(); Predicate office = criteriaBuilder.equal(usersRoot.get("office").get("id"), officeId); predicates.add(office); if (firstName != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("firstName"), firstName)); } if (lastName != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("secondName"), lastName)); } if (middleName != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("middleName"), middleName)); } if (positionId != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("position").get("id"), positionId)); } if (userdocId != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("userDoc").get("id"), userdocId)); } if (citizenshipCode != null) { predicates.add(criteriaBuilder.equal(usersRoot.get("citizenshipCode"), citizenshipCode)); } cq.where(predicates.toArray(new Predicate[predicates.size()])); TypedQuery<Users> q = em.createQuery(cq); List<Users> users = q.getResultList(); return users; } }
[ "reset1301@mail.ru" ]
reset1301@mail.ru
c00f300914c6c37eb03448029d5e2dd67aaa259b
8b47ffed449ee4e68c0b00db98f49981a2dfbc44
/JavaBasic/ExerDemo/src/projectexer/TeamSchedule/domain/employee/Designer.java
7d3fde41dc3c5b564abd49e679bb33e0768e804b
[]
no_license
Sakai1zumi/JavaTestCode
122f88d502a23d9d36a727766fc454e5067d253b
446c31065b36395d272d3cac20aaf59c3dbd8838
refs/heads/master
2023-05-23T03:08:11.636020
2021-06-17T02:49:31
2021-06-17T02:49:31
325,172,004
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package projectexer.TeamSchedule.domain.employee; import projectexer.TeamSchedule.domain.equipment.Equipment; /** * @author TuHong * @create 2021-02-24 11:30 */ public class Designer extends Programmer{ private double bonus; public Designer() { } public Designer(int id, String name, int age, double salary, Equipment equipment, double bonus) { super(id, name, age, salary, equipment); this.bonus = bonus; } public double getBonus() { return bonus; } public void setBonus(double bonus) { this.bonus = bonus; } @Override public String toString() { return getDetails() + "\t设计师\t" + getStatus() + '\t' + getBonus() + "\t\t\t" + getEquipment().getDescription(); } public String getDetailsForTeam(){ return getBaseDetails() + "设计师\t" + getBonus(); } }
[ "izumi0527@126.com" ]
izumi0527@126.com
46735aa2b5749993bb72e8d44efb29639b433e33
eb686f6faa165e4e1388810fe8d48b1fcc76b4f7
/base_common/src/main/java/com/mding/chatfeng/base_common/components/model/DataFriendPush.java
3b3035c520e59bb00ca4a71d231ca4ee4ed798b3
[]
no_license
zllAndroid/ChatFengIM-master
1d77e87f74f156fd5415dd4fcf16cefc94f8751b
cf8a02b102a32fae8d703b92e6cfb0ed09c82e72
refs/heads/master
2020-06-05T01:34:22.281785
2019-06-20T10:09:22
2019-06-20T10:09:22
192,266,464
0
0
null
null
null
null
UTF-8
Java
false
false
3,552
java
package com.mding.chatfeng.base_common.components.model; import java.util.List; public class DataFriendPush { /** * code : 200 * msg : 成功 * method : addFriendPush * record : {"messageList":[{"userId":"49a4-9b2-68","friendUserId":"2644b163-b898-ba84-a7be-69cb62f214c7","remark":"dasd","nickName":"小强子","headImg":"http://doubleq.oss-cn-beijing.aliyuncs.com/logo/154113866221225.png"}]} * api_key : 20180903 * sign : FDEAFBDD6BB5C8D0F3787CC0285C143A * timestamp : 1542339695 */ private int code; private String msg; private String method; private RecordBean record; private String api_key; private String sign; private int timestamp; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } public RecordBean getRecord() { return record; } public void setRecord(RecordBean record) { this.record = record; } public String getApi_key() { return api_key; } public void setApi_key(String api_key) { this.api_key = api_key; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public int getTimestamp() { return timestamp; } public void setTimestamp(int timestamp) { this.timestamp = timestamp; } public static class RecordBean { private List<MessageListBean> messageList; public List<MessageListBean> getMessageList() { return messageList; } public void setMessageList(List<MessageListBean> messageList) { this.messageList = messageList; } public static class MessageListBean { /** * userId : 49a4-9b2-68 * friendUserId : 2644b163-b898-ba84-a7be-69cb62f214c7 * remark : dasd * nickName : 小强子 * headImg : http://doubleq.oss-cn-beijing.aliyuncs.com/logo/154113866221225.png */ private String userId; private String friendUserId; private String remark; private String nickName; private String headImg; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getFriendUserId() { return friendUserId; } public void setFriendUserId(String friendUserId) { this.friendUserId = friendUserId; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getNickName() { return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } public String getHeadImg() { return headImg; } public void setHeadImg(String headImg) { this.headImg = headImg; } } } }
[ "970705279@qq.com" ]
970705279@qq.com
9806299a51c11c329d08cd3600b2e685dc47ad0b
ee1244b10de45679f053293e366f192af307be74
/sources/org/telegram/tgnet/ConnectionsManager$AzureLoadTask.java
df4861d73b23c0b51b9d6f7ffb2ace571c12d8ce
[]
no_license
scarletstuff/Turbogram
a086e50b3f4d7036526075199616682a0d7c9c45
21b8862573953add9260f1eb586f0985d2c71e8e
refs/heads/master
2021-09-23T14:34:23.323880
2018-09-24T17:48:43
2018-09-24T17:48:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,722
java
package org.telegram.tgnet; import android.os.AsyncTask; import android.util.Base64; import com.google.android.exoplayer2.DefaultLoadControl; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import org.telegram.messenger.BuildVars; import org.telegram.messenger.FileLog; import org.telegram.messenger.UserConfig; import org.telegram.messenger.Utilities; class ConnectionsManager$AzureLoadTask extends AsyncTask<Void, Void, NativeByteBuffer> { private int currentAccount; public ConnectionsManager$AzureLoadTask(int instance) { this.currentAccount = instance; } protected NativeByteBuffer doInBackground(Void... voids) { Throwable e; Throwable th; ByteArrayOutputStream byteArrayOutputStream = null; InputStream httpConnectionStream = null; try { URL downloadUrl; if (ConnectionsManager.native_isTestBackend(this.currentAccount) != 0) { downloadUrl = new URL("https://software-download.microsoft.com/testv2/config.txt"); } else { downloadUrl = new URL("https://software-download.microsoft.com/prodv2/config.txt"); } URLConnection httpConnection = downloadUrl.openConnection(); httpConnection.addRequestProperty("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/602.1.38 (KHTML, like Gecko) Version/10.0 Mobile/14A5297c Safari/602.1"); httpConnection.addRequestProperty("Host", "tcdnb.azureedge.net"); httpConnection.setConnectTimeout(DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS); httpConnection.setReadTimeout(DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS); httpConnection.connect(); httpConnectionStream = httpConnection.getInputStream(); ByteArrayOutputStream outbuf = new ByteArrayOutputStream(); try { byte[] bytes; NativeByteBuffer buffer; byte[] data = new byte[32768]; while (!isCancelled()) { int read = httpConnectionStream.read(data); if (read > 0) { outbuf.write(data, 0, read); } else { if (read == -1) { } bytes = Base64.decode(outbuf.toByteArray(), 0); buffer = new NativeByteBuffer(bytes.length); buffer.writeBytes(bytes); if (httpConnectionStream != null) { try { httpConnectionStream.close(); } catch (Throwable e2) { FileLog.e(e2); } } if (outbuf != null) { try { outbuf.close(); } catch (Exception e3) { } } byteArrayOutputStream = outbuf; return buffer; } } bytes = Base64.decode(outbuf.toByteArray(), 0); buffer = new NativeByteBuffer(bytes.length); buffer.writeBytes(bytes); if (httpConnectionStream != null) { httpConnectionStream.close(); } if (outbuf != null) { outbuf.close(); } byteArrayOutputStream = outbuf; return buffer; } catch (Throwable th2) { th = th2; byteArrayOutputStream = outbuf; } } catch (Throwable th3) { e2 = th3; try { FileLog.e(e2); if (httpConnectionStream != null) { try { httpConnectionStream.close(); } catch (Throwable e22) { FileLog.e(e22); } } if (byteArrayOutputStream != null) { try { byteArrayOutputStream.close(); } catch (Exception e4) { } } return null; } catch (Throwable th4) { th = th4; if (httpConnectionStream != null) { try { httpConnectionStream.close(); } catch (Throwable e222) { FileLog.e(e222); } } if (byteArrayOutputStream != null) { try { byteArrayOutputStream.close(); } catch (Exception e5) { } } throw th; } } } protected void onPostExecute(final NativeByteBuffer result) { Utilities.stageQueue.postRunnable(new Runnable() { public void run() { if (result != null) { ConnectionsManager.native_applyDnsConfig(ConnectionsManager$AzureLoadTask.this.currentAccount, result.address, UserConfig.getInstance(ConnectionsManager$AzureLoadTask.this.currentAccount).getClientPhone()); } else if (BuildVars.LOGS_ENABLED) { FileLog.d("failed to get azure result"); } ConnectionsManager.access$302(null); } }); } }
[ "root@linuxhub.it" ]
root@linuxhub.it
619d7372ec68d3f62938efd13cfd85b01718ac7a
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/2251/digits_313d572e_000.java
5bceb4ad82cb842a2c410db6cfe10cd0b262f7ec
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,749
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_313d572e_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_313d572e_000 mainClass = new digits_313d572e_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj given = new IntObj (), digit10 = new IntObj (), digit9 = new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 = new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 = new IntObj (), digit2 = new IntObj (), digit1 = new IntObj (); output += (String.format ("\nEnter an interger > ")); given.value = scanner.nextInt (); if (given.value >= 1 && given.value < 10) { digit10.value = given.value % 10; output += (String.format ("\n%d\nThat's all, have a nice day!\n", digit10.value)); } if (given.value >= 10 && given.value < 100) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; output += (String.format ("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value)); } if (given.value >= 100 && given.value < 1000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; output += (String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value)); } if (given.value >= 1000 && given.value < 10000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, (given.value) / 1000)); } if (given.value >= 10000 && given.value < 100000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value)); } if (given.value >= 100000 && given.value < 1000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value)); } if (given.value >= 1000000 && given.value < 10000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value)); } if (given.value >= 10000000 && given.value < 100000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value)); } if (given.value >= 100000000 && given.value < 1000000000) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value)); } if (given.value >= 1000000000 && given.value < 10000000000L) { digit10.value = given.value % 10; digit9.value = (given.value / 10) % 10; digit8.value = (given.value / 100) % 10; digit7.value = (given.value / 1000) % 10; digit6.value = (given.value / 10000) % 10; digit5.value = (given.value / 100000) % 10; digit4.value = (given.value / 1000000) % 10; digit3.value = (given.value / 10000000) % 10; digit2.value = (given.value / 100000000) % 10; digit1.value = (given.value / 1000000000) % 10; output += (String.format ("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n", digit10.value, digit9.value, digit8.value, digit7.value, digit6.value, digit5.value, digit4.value, digit3.value, digit2.value, digit1.value)); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
8788129cdfe8e47534d8a242fa2146c33d0206dc
b5c485493f675bcc19dcadfecf9e775b7bb700ed
/jee-utility-client-controller/src/main/java/org/cyk/utility/client/controller/data/Form.java
31a485ae276fc21d7d6b105ebab2c8667dd625a0
[]
no_license
devlopper/org.cyk.utility
148a1aafccfc4af23a941585cae61229630b96ec
14ec3ba5cfe0fa14f0e2b1439ef0f728c52ec775
refs/heads/master
2023-03-05T23:45:40.165701
2021-04-03T16:34:06
2021-04-03T16:34:06
16,252,993
1
0
null
2022-10-12T20:09:48
2014-01-26T12:52:24
Java
UTF-8
Java
false
false
295
java
package org.cyk.utility.client.controller.data; import org.cyk.utility.client.controller.Objectable; public interface Form extends Objectable { String getTitle(); Form setTitle(String title); void submit(); /**/ String PROPERTY_TITLE = "title"; String METHOD_SUBMIT = "submit"; }
[ "kycdev@gmail.com" ]
kycdev@gmail.com
40092eee56182c88d967274017a5136d8f21ddc2
5c016d691b30435c37a11e6f90f2b27f78fd7c05
/src/main/java/org/ccframe/subsys/core/service/RoleMenuResRelService.java
3c14c1f1d1a05597db18b14bf81cf19fa38ee47c
[]
no_license
tbs005/BikeServer
4a38788763221dd2cc40380ec8a8e0ec1398b1e9
11ca6fbc67cd922e481781a5d757927f90cb4dff
refs/heads/master
2021-05-05T20:37:06.266744
2017-07-29T03:38:13
2017-07-29T03:38:13
100,594,741
2
0
null
2017-08-17T11:08:44
2017-08-17T11:08:44
null
UTF-8
Java
false
false
813
java
package org.ccframe.subsys.core.service; import org.ccframe.commons.base.BaseService; import org.ccframe.subsys.core.domain.entity.RoleMenuResRel; import org.ccframe.subsys.core.repository.RoleMenuResRelRepository; import org.springframework.stereotype.Service; @Service public class RoleMenuResRelService extends BaseService<RoleMenuResRel, Integer, RoleMenuResRelRepository> { // @Transactional(readOnly = true) // public List<RoleMenuResRel> findByRoleIdList(Collection<Integer> roleIdList) { // List<Criterion> orList = new ArrayList<Criterion>(); // for(Integer roleId: roleIdList){ // orList.add(Restrictions.eq(RoleMenuResRel.ROLE_ID, roleId)); // } // return this.getRepository().findAll(new Criteria<RoleMenuResRel>().add(Restrictions.or(orList.toArray(new Criterion[orList.size()])))); // } }
[ "1275563227@qq.com" ]
1275563227@qq.com
2d0f21f9ad71f381719e62f9c6a0c1984ecf2b5c
53f895ac58cb7c9e1e8976c235df9c4544e79d33
/26_Wrapper Classes/com/source/wrapperclass/M24.java
0e4dc0f96014bc27ab3348efd30b38a6506dc8d7
[]
no_license
alagurajan/CoreJava
c336356b45cdbcdc88311efbba8f57503e050b66
be5a8c2a60aac072f777d8b0320e4c94a1266cb3
refs/heads/master
2021-01-11T01:33:11.447570
2016-12-16T22:24:58
2016-12-16T22:24:58
70,690,915
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.source.wrapperclass; public class M24 { public static void main(String[] args) { char c1 = new Character('s'); char c2 = 's'; /****** Unboxing*******/ System.out.println("Done"); } }
[ "aalagurajan@gmail.com" ]
aalagurajan@gmail.com
a19e99a8625bf8f0ec2fd86a193a5c21ae2a0353
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/com/kantv/ui/androidupnpdemo/service/ClingUpnpService.java
e26a35dcd0bf376cfd405978b278a6a0bf3597c7
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
1,881
java
package com.kantv.ui.androidupnpdemo.service; import android.content.Intent; import android.os.IBinder; import org.fourthline.cling.UpnpService; import org.fourthline.cling.UpnpServiceConfiguration; import org.fourthline.cling.android.AndroidUpnpServiceImpl; import org.fourthline.cling.controlpoint.ControlPoint; import org.fourthline.cling.model.meta.LocalDevice; import org.fourthline.cling.registry.Registry; public class ClingUpnpService extends AndroidUpnpServiceImpl { private LocalDevice mLocalDevice = null; public class LocalBinder extends Binder { public LocalBinder() { super(); } public /* bridge */ /* synthetic */ UpnpService get() { return super.get(); } public /* bridge */ /* synthetic */ UpnpServiceConfiguration getConfiguration() { return super.getConfiguration(); } public /* bridge */ /* synthetic */ ControlPoint getControlPoint() { return super.getControlPoint(); } public /* bridge */ /* synthetic */ Registry getRegistry() { return super.getRegistry(); } public ClingUpnpService getService() { return ClingUpnpService.this; } } public void onCreate() { super.onCreate(); this.binder = new LocalBinder(); } public void onDestroy() { super.onDestroy(); } public IBinder onBind(Intent intent) { return this.binder; } public LocalDevice getLocalDevice() { return this.mLocalDevice; } public UpnpServiceConfiguration getConfiguration() { return this.upnpService.getConfiguration(); } public Registry getRegistry() { return this.upnpService.getRegistry(); } public ControlPoint getControlPoint() { return this.upnpService.getControlPoint(); } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
0b0d80a64a68b6c3aa760ca34b0c17a24988f9ac
0735d7bb62b6cfb538985a278b77917685de3526
/kotlin/reflect/jvm/internal/impl/resolve/calls/inference/CapturedType.java
cbd615c3deac6bcbc9ca40175eeb0b95960a1f37
[]
no_license
Denoah/personaltrackerround
e18ceaad910f1393f2dd9f21e9055148cda57837
b38493ccc7efff32c3de8fe61704e767e5ac62b7
refs/heads/master
2021-05-20T03:34:17.333532
2020-04-02T14:47:31
2020-04-02T14:51:01
252,166,069
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
5,110
java
package kotlin.reflect.jvm.internal.impl.resolve.calls.inference; import java.util.List; import kotlin.collections.CollectionsKt; import kotlin.jvm.internal.Intrinsics; import kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns; import kotlin.reflect.jvm.internal.impl.descriptors.annotations.Annotations; import kotlin.reflect.jvm.internal.impl.resolve.scopes.MemberScope; import kotlin.reflect.jvm.internal.impl.types.ErrorUtils; import kotlin.reflect.jvm.internal.impl.types.KotlinType; import kotlin.reflect.jvm.internal.impl.types.SimpleType; import kotlin.reflect.jvm.internal.impl.types.SubtypingRepresentatives; import kotlin.reflect.jvm.internal.impl.types.TypeProjection; import kotlin.reflect.jvm.internal.impl.types.Variance; import kotlin.reflect.jvm.internal.impl.types.checker.KotlinTypeRefiner; import kotlin.reflect.jvm.internal.impl.types.model.CapturedTypeMarker; import kotlin.reflect.jvm.internal.impl.types.typeUtil.TypeUtilsKt; public final class CapturedType extends SimpleType implements SubtypingRepresentatives, CapturedTypeMarker { private final Annotations annotations; private final CapturedTypeConstructor constructor; private final boolean isMarkedNullable; private final TypeProjection typeProjection; public CapturedType(TypeProjection paramTypeProjection, CapturedTypeConstructor paramCapturedTypeConstructor, boolean paramBoolean, Annotations paramAnnotations) { this.typeProjection = paramTypeProjection; this.constructor = paramCapturedTypeConstructor; this.isMarkedNullable = paramBoolean; this.annotations = paramAnnotations; } private final KotlinType representative(Variance paramVariance, KotlinType paramKotlinType) { if (this.typeProjection.getProjectionKind() == paramVariance) { paramKotlinType = this.typeProjection.getType(); } Intrinsics.checkExpressionValueIsNotNull(paramKotlinType, "if (typeProjection.proje…jection.type else default"); return paramKotlinType; } public Annotations getAnnotations() { return this.annotations; } public List<TypeProjection> getArguments() { return CollectionsKt.emptyList(); } public CapturedTypeConstructor getConstructor() { return this.constructor; } public MemberScope getMemberScope() { MemberScope localMemberScope = ErrorUtils.createErrorScope("No member resolution should be done on captured type, it used only during constraint system resolution", true); Intrinsics.checkExpressionValueIsNotNull(localMemberScope, "ErrorUtils.createErrorSc…solution\", true\n )"); return localMemberScope; } public KotlinType getSubTypeRepresentative() { Variance localVariance = Variance.OUT_VARIANCE; SimpleType localSimpleType = TypeUtilsKt.getBuiltIns(this).getNullableAnyType(); Intrinsics.checkExpressionValueIsNotNull(localSimpleType, "builtIns.nullableAnyType"); return representative(localVariance, (KotlinType)localSimpleType); } public KotlinType getSuperTypeRepresentative() { Variance localVariance = Variance.IN_VARIANCE; SimpleType localSimpleType = TypeUtilsKt.getBuiltIns(this).getNothingType(); Intrinsics.checkExpressionValueIsNotNull(localSimpleType, "builtIns.nothingType"); return representative(localVariance, (KotlinType)localSimpleType); } public boolean isMarkedNullable() { return this.isMarkedNullable; } public CapturedType makeNullableAsSpecified(boolean paramBoolean) { if (paramBoolean == isMarkedNullable()) { return this; } return new CapturedType(this.typeProjection, getConstructor(), paramBoolean, getAnnotations()); } public CapturedType refine(KotlinTypeRefiner paramKotlinTypeRefiner) { Intrinsics.checkParameterIsNotNull(paramKotlinTypeRefiner, "kotlinTypeRefiner"); paramKotlinTypeRefiner = this.typeProjection.refine(paramKotlinTypeRefiner); Intrinsics.checkExpressionValueIsNotNull(paramKotlinTypeRefiner, "typeProjection.refine(kotlinTypeRefiner)"); return new CapturedType(paramKotlinTypeRefiner, getConstructor(), isMarkedNullable(), getAnnotations()); } public CapturedType replaceAnnotations(Annotations paramAnnotations) { Intrinsics.checkParameterIsNotNull(paramAnnotations, "newAnnotations"); return new CapturedType(this.typeProjection, getConstructor(), isMarkedNullable(), paramAnnotations); } public boolean sameTypeConstructor(KotlinType paramKotlinType) { Intrinsics.checkParameterIsNotNull(paramKotlinType, "type"); boolean bool; if (getConstructor() == paramKotlinType.getConstructor()) { bool = true; } else { bool = false; } return bool; } public String toString() { StringBuilder localStringBuilder = new StringBuilder(); localStringBuilder.append("Captured("); localStringBuilder.append(this.typeProjection); localStringBuilder.append(')'); String str; if (isMarkedNullable()) { str = "?"; } else { str = ""; } localStringBuilder.append(str); return localStringBuilder.toString(); } }
[ "ivanov.a@i-teco.ru" ]
ivanov.a@i-teco.ru
783e19f7d481576b88387d5e89997b8fb63b4985
e8f171ddb3c8fb54fcecaff0a84648e76681f982
/community/logicaldoc/tags/logicaldoc-7.6.1/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/services/ZohoService.java
5b00dea8cdea3c014885b3c1b5756a66226e6302
[]
no_license
zhunengfei/logicaldoc
f12114ef72935e683af4b50f30a88fbd5df9bfde
9d432d29a9b43ebd2b13a1933a50add3f4784815
refs/heads/master
2021-01-20T01:05:48.499693
2017-01-13T16:24:16
2017-01-13T16:24:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,491
java
package com.logicaldoc.gui.frontend.client.services; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; import com.logicaldoc.gui.common.client.ServerException; import com.logicaldoc.gui.common.client.beans.GUIDocument; /** * The client side stub for the Zoho Service. * * @author Marco Meschieri - LogicalDOC * @since 7.5.2 */ @RemoteServiceRelativePath("zoho") public interface ZohoService extends RemoteService { public void saveAuthToken(String authToken) throws ServerException; public String loadAuthToken() throws ServerException; /** * Exports documents and folders into Zoho * * @param sid The session ID * @param targetPath the target path in Zoho (must be a folder) * @param folderIds Ids of the folders to be imported (all subfolders and * docs will be imported as well * @param docIds Ids of the documents to be imported * @return * @throws ServerException */ public boolean exportDocuments(String targetFolderId, long[] folderIds, long[] docIds) throws ServerException; /** * Exports documents and folders from Zoho into LogicalDOC * * @param sid The session ID * @param targetFolder ID of the root folder that will receive the imported * elements * @param folderCompositeIds array of the identifiers of the Zoho folder * each one is a tokenized string folder_name:folder_id * @param docIds Ids of the documents in Zoho to be imported * @return * @throws ServerException */ public int importDocuments(long targetFolder, String[] folderCompositeIds, String[] documentIds) throws ServerException; /** * Uploads a document to Zoho. * * @param docId ID of the document to upload * * @returns The resourceId of the uploaded document */ public String upload(long docId) throws ServerException; /** * Deletes a document in Zoho. * * @param docId ID of the document to delete */ public void delete(String resourceId) throws ServerException; /** * Performs the check-in of a Zoho's document into the LogicalDOC * repository. * * @param docId ID of the document to update * @param comment The comment left for the checkin * @param major If this is a major or minor release * * @return The checked-in document */ public GUIDocument checkin(long docId, String comment, boolean major) throws ServerException; }
[ "car031@bae09422-6297-422f-b3ee-419521344c47" ]
car031@bae09422-6297-422f-b3ee-419521344c47
473f83268754e8c7c7c6e0e51d67602598c5f7da
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Lang-5/org.apache.commons.lang3.LocaleUtils/BBC-F0-opt-40/14/org/apache/commons/lang3/LocaleUtils_ESTest_scaffolding.java
a2359abadbf7b07517938312be95cb182f1bd5a7
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,307
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 21 02:34:38 GMT 2021 */ package org.apache.commons.lang3; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class LocaleUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.LocaleUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LocaleUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.LocaleUtils", "org.apache.commons.lang3.LocaleUtils$SyncAvoid" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(LocaleUtils_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.lang3.LocaleUtils", "org.apache.commons.lang3.LocaleUtils$SyncAvoid" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
4926daeb616cd892afa1c125adffd38e69de2bf0
23de2c10f72a30ade795ac8d4d7923036c575de5
/src/com/google/android/gms/location/Geofence.java
9ec7daefd26bd8a16265f7b820947f07842899e3
[]
no_license
PARTHIBANMS/com.divmob.doodlebubble
a2c179ad9aa762668c69c0302bb17958e895148e
4718ee64c5edc9bcfc95861754ad9b876bd7fd5d
refs/heads/master
2020-06-04T22:30:50.560385
2014-07-17T10:39:23
2014-07-17T10:39:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,885
java
package com.google.android.gms.location; import android.os.SystemClock; import com.google.android.gms.internal.hj; public abstract interface Geofence { public static final int GEOFENCE_TRANSITION_DWELL = 4; public static final int GEOFENCE_TRANSITION_ENTER = 1; public static final int GEOFENCE_TRANSITION_EXIT = 2; public static final long NEVER_EXPIRE = -1L; public abstract String getRequestId(); public static final class Builder { private String Hh = null; private int KU = 0; private long KV = -9223372036854775808L; private short KW = -1; private double KX; private double KY; private float KZ; private int La = 0; private int Lb = -1; public Geofence build() { if (this.Hh == null) { throw new IllegalArgumentException("Request ID not set."); } if (this.KU == 0) { throw new IllegalArgumentException("Transitions types not set."); } if (((0x4 & this.KU) != 0) && (this.Lb < 0)) { throw new IllegalArgumentException("Non-negative loitering delay needs to be set when transition types include GEOFENCE_TRANSITION_DWELLING."); } if (this.KV == -9223372036854775808L) { throw new IllegalArgumentException("Expiration not set."); } if (this.KW == -1) { throw new IllegalArgumentException("Geofence region not set."); } if (this.La < 0) { throw new IllegalArgumentException("Notification responsiveness should be nonnegative."); } return new hj(this.Hh, this.KU, (short)1, this.KX, this.KY, this.KZ, this.KV, this.La, this.Lb); } public Builder setCircularRegion(double paramDouble1, double paramDouble2, float paramFloat) { this.KW = 1; this.KX = paramDouble1; this.KY = paramDouble2; this.KZ = paramFloat; return this; } public Builder setExpirationDuration(long paramLong) { if (paramLong < 0L) { this.KV = -1L; return this; } this.KV = (paramLong + SystemClock.elapsedRealtime()); return this; } public Builder setLoiteringDelay(int paramInt) { this.Lb = paramInt; return this; } public Builder setNotificationResponsiveness(int paramInt) { this.La = paramInt; return this; } public Builder setRequestId(String paramString) { this.Hh = paramString; return this; } public Builder setTransitionTypes(int paramInt) { this.KU = paramInt; return this; } } } /* Location: C:\Users\PARTHIBAN\Desktop\source\dex2jar-0.0.9.15\classes_dex2jar.jar * Qualified Name: com.google.android.gms.location.Geofence * JD-Core Version: 0.7.0.1 */
[ "bsauniv30@BSAs-iMac-93.local" ]
bsauniv30@BSAs-iMac-93.local
d81c4d7013539a8bae7e4beffda16dfdde1f1977
af7b8bbe77461e59f32ba746f4bb055620a5c110
/base/src/main/java/com/hz/yk/reflect/param/Demo.java
694d4d7081ddab2e09be2beda57fde1394cc0d7a
[]
no_license
ykdsg/MyJavaProject
3e51564a3fb57ab4ae043c9112e1936ccc179dd5
a7d88aee2f58698aed7d497c2cf6e23a605ebb59
refs/heads/master
2023-06-26T02:23:33.812330
2023-06-12T11:28:23
2023-06-12T11:28:23
1,435,034
4
6
null
2022-12-01T15:21:01
2011-03-03T13:30:03
Java
UTF-8
Java
false
false
176
java
package com.hz.yk.reflect.param; /** * Created by wuzheng.yk on 16/1/29. */ public class Demo { public void add(int a,int b){ System.out.println(a + b); } }
[ "17173as@163.com" ]
17173as@163.com
8671826232fb1157754a351b0f3e6466be072784
1dd4227092fb1ebca232518eb5de4eecd2aacaba
/spring-web/src/main/java/org/springframework/http/client/InterceptingAsyncClientHttpRequest.java
3242ae42203bd13128da11dc8e471f4eefa8b931
[ "Apache-2.0" ]
permissive
qsk1226/spring-framework
65b7dd129722af6d924e0e42cec7faa3e0aaf460
77899424e8ce2d37d7a2d21a1d38f4bae39b82d6
refs/heads/master
2023-03-16T16:02:45.578432
2021-03-07T05:07:27
2021-03-07T05:07:27
271,598,371
0
0
null
null
null
null
UTF-8
Java
false
false
3,736
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.http.client; import java.io.IOException; import java.net.URI; import java.util.Iterator; import java.util.List; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRequest; import org.springframework.util.Assert; import org.springframework.util.StreamUtils; import org.springframework.util.concurrent.ListenableFuture; /** * An {@link AsyncClientHttpRequest} wrapper that enriches it proceeds the actual * request execution with calling the registered interceptors. * * @author Jakub Narloch * @author Rossen Stoyanchev * @see InterceptingAsyncClientHttpRequestFactory * @deprecated as of Spring 5.0, with no direct replacement */ @Deprecated class InterceptingAsyncClientHttpRequest extends AbstractBufferingAsyncClientHttpRequest { private AsyncClientHttpRequestFactory requestFactory; private List<AsyncClientHttpRequestInterceptor> interceptors; private URI uri; private HttpMethod httpMethod; /** * Create new instance of {@link InterceptingAsyncClientHttpRequest}. * @param requestFactory the async request factory * @param interceptors the list of interceptors * @param uri the request URI * @param httpMethod the HTTP method */ public InterceptingAsyncClientHttpRequest(AsyncClientHttpRequestFactory requestFactory, List<AsyncClientHttpRequestInterceptor> interceptors, URI uri, HttpMethod httpMethod) { this.requestFactory = requestFactory; this.interceptors = interceptors; this.uri = uri; this.httpMethod = httpMethod; } @Override protected ListenableFuture<ClientHttpResponse> executeInternal(HttpHeaders headers, byte[] body) throws IOException { return new AsyncRequestExecution().executeAsync(this, body); } @Override public HttpMethod getMethod() { return this.httpMethod; } @Override public String getMethodValue() { return this.httpMethod.name(); } @Override public URI getURI() { return this.uri; } private class AsyncRequestExecution implements AsyncClientHttpRequestExecution { private Iterator<AsyncClientHttpRequestInterceptor> iterator; public AsyncRequestExecution() { this.iterator = interceptors.iterator(); } @Override public ListenableFuture<ClientHttpResponse> executeAsync(HttpRequest request, byte[] body) throws IOException { if (this.iterator.hasNext()) { AsyncClientHttpRequestInterceptor interceptor = this.iterator.next(); return interceptor.intercept(request, body, this); } else { URI uri = request.getURI(); HttpMethod method = request.getMethod(); HttpHeaders headers = request.getHeaders(); Assert.state(method != null, "No standard HTTP method"); AsyncClientHttpRequest delegate = requestFactory.createAsyncRequest(uri, method); delegate.getHeaders().putAll(headers); if (body.length > 0) { StreamUtils.copy(body, delegate.getBody()); } return delegate.executeAsync(); } } } }
[ "qinshengkei@taoche.com" ]
qinshengkei@taoche.com
a64124f769ce1d8989ce267cf8d159786f8ec1f4
baba7ae4f32f0e680f084effcd658890183e7710
/MutationFramework/muJava/muJavaMutantStructure/Persistence/TobiasSamples/Debug2/int_linearSearch(int,int)/ROR_7/Debug2.java
40a12a90e940f67f9e641c1e916f343f7d5310c4
[ "Apache-2.0" ]
permissive
TUBS-ISF/MutationAnalysisForDBC-FormaliSE21
75972c823c3c358494d2a2e9ec12e0a00e26d771
de825bc9e743db851f5ec1c5133dca3f04d20bad
refs/heads/main
2023-04-22T21:29:28.165271
2021-05-17T07:43:22
2021-05-17T07:43:22
368,096,901
0
0
null
null
null
null
UTF-8
Java
false
false
2,785
java
// This is a mutant program. // Author : ysma public class Debug2 { /*@ @ normal_behavior @ requires true; @ ensures \result>=0 ==> a[\result]==x; @*/ public static int linearSearch( int[] a, int x ) { int i = a.length - 1; /*@ loop_invariant !(\exists int q; q >= i+1 && q < a.length; a[q]==x) && i>=-1 && i<a.length; @ decreases i+1; @*/ while (false && a[i] != x) { i = i - 1; } return i; } /*@ @ normal_behavior @ requires A.length > 0; @ ensures (\forall int q; q >= 0 & q < A.length; A[\result]>=A[q]); @*/ public static int maxElement( int[] A ) { int i = 0; int j = 1; /*@ loop_invariant (\forall int q; q >= 0 && q < j; A[i]>=A[q]) && i>=0 && i<A.length && j>0 && j<=A.length; @ decreases A.length - j; @*/ while (j != A.length) { if (A[j] > A[i]) { i = j; } else { if (A[j] <= A[i]) { ; } } j = j + 1; } return i; } /*@ @ normal_behavior @ requires n >= 0 && n<6; @ ensures \result==Helper.factorial(n); @*/ public static int fac( int n ) { int f = 0; if (n == 0) { f = 1; } else { if (n == 1) { f = 1; } else { if (n >= 2) { int tmp = n - 1; f = n * Helper.factorial( tmp ); } } } return f; } /*@ @ normal_behavior @ requires A.length > 0 && (\forall int i; i>=0 & i<A.length; A[i] == 0 || A[i] == 1 || A[i] == 2); @ ensures (\forall int q; q >= 1 && q < \result.length; \result[q-1]<=\result[q]); @*/ public static int[] DutchFlag( int[] A ) { int wb = 0; int wt = 0; int bb = A.length; /*@ loop_invariant (\forall int i; i>=0 & i<A.length; A[i] == 0 || A[i] == 1 || A[i] == 2) && (\forall int q; q >= 0 && q < wb; A[q]==0) && (\forall int q; q >= wb && q < wt; A[q]==1) && (\forall int q; q >= bb && q < A.length; A[q]==2) && 0<=wb && wb<=wt && wt<=bb && bb<=A.length; @ decreases bb-wt; @*/ while (wt != bb) { if (A[wt] == 0) { int t = A[wt]; A[wt] = A[wb]; A[wb] = t; wt = wt + 1; wb = wb + 1; } else { if (A[wt] == 1) { wt = wt + 1; } else { if (A[wt] == 2) { int t = A[wt]; A[wt] = A[bb - 1]; A[bb - 1] = t; bb = bb - 1; } } } } return A; } }
[ "a.knueppel@tu-bs.de" ]
a.knueppel@tu-bs.de
93439c69189dcd7a24044099e1c8df4cf4003e9f
9d265892d49e97e98078f7cdba620acd33f69dd9
/gratewall/sjzx_query/src/com/gwssi/expression/config/ConfigurationFactory.java
f69998176178d78922437f4a5d7e89ca0791ec2f
[]
no_license
gxlioper/collections
70d11d5f3e6c999d40fc9f92b1fc26e6d78bf15d
2458b9e260edd91d564b063072801905e0377a00
refs/heads/master
2023-06-21T22:17:49.069471
2021-08-10T15:43:51
2021-08-10T15:43:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,370
java
package com.gwssi.expression.config; import com.gwssi.expression.core.lang.ExpressionException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ConfigurationFactory{ static final Logger logger = LoggerFactory.getLogger(ConfigurationFactory.class); static Set<String> configLocationSet = new HashSet<String>(); static Map<Object, Configuration> confMap = new HashMap<Object, Configuration>(); static final String defaultPath = "classpath:com/gwssi/common/rodimus/report/expr/config/expression-config.xml"; public static void addSingleConfigLocation(String configPath, boolean isSkipExists){ if ((configPath == null) || ("".equals(configPath))){ throw new IllegalArgumentException("配置文件路径为空"); } if ((isSkipExists) && (configLocationSet.contains(configPath))){ logger.info("没有应用配置,原因:已存在。配置路径:" + configPath); return; } configLocationSet.add(configPath); Configuration config = null; // if(defaultPath.equals(config)){ config = new Configuration(); // }else{ // config = new Configuration(confMap.get("default")); // } config.applyConfigPath(configPath); String configName = (String)config.get("config.name"); confMap.put(configName, config); logger.info("应用表达式配置:" + configName); } public static Configuration getConfiguration(Object configName){ Configuration config = (Configuration)confMap.get(configName); if (config == null){ throw new ExpressionException("请在程序或web.xml中配置表达式配置文件:" + configName); } return config; } public static String toLogString(){ Set<Object> localSet = confMap.keySet(); return String.valueOf(localSet); } public static void addConfigLocation(String configPath) throws Exception{ if ((configPath == null) || ("".equals(configPath))){ return; } String[] arrayOfString = configPath.split(";"); for (int i = 0; i < arrayOfString.length; i++) { String str = arrayOfString[i].trim(); if ("".equals(str)) continue; addSingleConfigLocation(str, true); } } // static{ // addSingleConfigLocation(defaultPath,true); // } }
[ "1039288191@qq.com" ]
1039288191@qq.com
24a61e374dbf16c148e90e4dd225ac28e1534f4c
5bfdd3e3e61e046a56f5e4714bd13e4bf0bf359d
/algorithm/src/boj/Regist7287.java
c49aefae6186eb74656d855af906499886d47cb6
[ "MIT" ]
permissive
Oraindrop/algorithm
e40b0c36a6728bc3f3599b7769d581cc3e59e9d8
7081464a4153c307c5ad6e92523b7d6f74fce332
refs/heads/master
2022-01-18T15:11:13.959202
2021-12-30T14:39:17
2021-12-30T14:39:17
146,498,419
0
1
null
null
null
null
UTF-8
Java
false
false
153
java
package boj; public class Regist7287 { public static void main(String[] args) { System.out.println("26"); System.out.println("chltmdals111"); } }
[ "chltmdals115@gmail.com" ]
chltmdals115@gmail.com
781ebbec2b3e2826a1f3aadf3289d7a8b887f3ef
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XRENDERING-481-10-17-Single_Objective_GGA-WeightedSum/org/xwiki/display/internal/ConfiguredDocumentDisplayer_ESTest_scaffolding.java
01c0b9df8af79a67ef208f970b4af0e0bbfb9f83
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
458
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Mar 31 17:24:14 UTC 2020 */ package org.xwiki.display.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class ConfiguredDocumentDisplayer_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2b1c9bffd3e24e6dee88ee9af11d016b8554b7b4
61c29b9954c0ae2ea7ea2ea3dfbdeb03a8f026a3
/src/main/java/flatstore/test/StorageTest.java
b2ae31bc1d502a3f19709418373ddd5fc9e73f65
[]
no_license
SWBForms/SWBSemEngine
8be53aa738baccd18383c705496dd3b0faee23f3
cdd8caddd2425e9434034da308823ff1433ff787
refs/heads/master
2020-06-12T19:23:01.127060
2016-12-06T19:39:03
2016-12-06T19:39:03
75,764,768
0
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package flatstore.test; import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.semanticwb.store.Graph; import org.semanticwb.store.flatstore.GraphImp; /** * * @author serch */ public class StorageTest { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException, InterruptedException { long time = System.currentTimeMillis(); Map params = new HashMap(); params.put("path", "/data/flatstore/"); // Graph tGraph = new GraphImp("SWBAdmin", params); // ((GraphImp)tGraph).createFromNT("/data/bench/SWBAdmin.nt"); Graph tGraph = new GraphImp("bench", params); ((GraphImp)tGraph).createFromNT("/data/bench/infoboxes-fixed.nt.gz","/data/bench/geocoordinates-fixed.nt.gz","/data/bench/homepages-fixed.nt.gz"); // Graph tGraph = new GraphImp("DBMS100M", params); // ((GraphImp)tGraph).createFromNT("/data/bench/dataset_100m.nt.gz"); System.out.println("time: "+(System.currentTimeMillis()-time)); tGraph.close(); } }
[ "softjei@gmail.com" ]
softjei@gmail.com
ea6fef9d38a502e8c3afe791658c504840284574
355c41b5bb8706ad1acb282b828ab50f2a58d1a2
/cn/jsprun/domain/Typeoptions.java
16d48f8ee0ad18791deb0c4c66292a08788c5c55
[]
no_license
goldbo/vcity
d7a424f00939ceafbb4f6d06ebfa608321a75c8a
645f6a5eb429d3974ef4afa4e3f00ab37f6d5643
refs/heads/master
2021-01-22T01:54:36.186223
2012-02-20T09:30:57
2012-02-20T09:30:57
3,134,179
2
0
null
null
null
null
UTF-8
Java
false
false
2,142
java
package cn.jsprun.domain; public class Typeoptions implements java.io.Serializable { private static final long serialVersionUID = 2707874118083150326L; private Short optionid; private Short classid; private Short displayorder; private String title; private String description; private String identifier; private String type; private String rules; public Typeoptions() { } public Typeoptions(Short classid, Short displayorder, String title, String description, String identifier, String type, String rules) { this.classid = classid; this.displayorder = displayorder; this.title = title; this.description = description; this.identifier = identifier; this.type = type; this.rules = rules; } public Short getOptionid() { return this.optionid; } public void setOptionid(Short optionid) { this.optionid = optionid; } public Short getClassid() { return this.classid; } public void setClassid(Short classid) { this.classid = classid; } public Short getDisplayorder() { return this.displayorder; } public void setDisplayorder(Short displayorder) { this.displayorder = displayorder; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } public String getIdentifier() { return this.identifier; } public void setIdentifier(String identifier) { this.identifier = identifier; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } public String getRules() { return this.rules; } public void setRules(String rules) { this.rules = rules; } }
[ "549668352@qq.com" ]
549668352@qq.com
83ccc07ab52c35b6bfb920da9a7460e60b1bdb44
f4dfe52bd506f1508637f23f1d9822c659891c12
/JAVA7/InvokeDynamic/src/main/java/org/mk/training/invoke/ThreadPoolMain.java
d0be48d413084b2288971a826354f058a662e87b
[]
no_license
siddhantaws/LowLatency
5b27b99b8fbe3a98029ca42f636b49d870a0b3bb
f245916fed8bfe5a038dc21098d813bf5accdb1e
refs/heads/master
2021-06-25T19:55:07.994337
2019-09-19T15:39:15
2019-09-19T15:39:15
152,133,438
0
0
null
2020-10-13T16:09:28
2018-10-08T19:17:54
Java
UTF-8
Java
false
false
1,811
java
package org.mk.training.invoke; import org.mk.training.invoke.ThreadPoolManager.CancelProxy; import java.lang.invoke.MethodHandle; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ScheduledFuture; public class ThreadPoolMain { private ThreadPoolManager manager; private void cancelUsingReflection(ScheduledFuture<?> hndl) { Method meth = manager.makeReflective(); try { System.out.println("With Reflection"); meth.invoke(hndl); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { e.printStackTrace(); } } private void cancelUsingProxy(ScheduledFuture<?> hndl) { CancelProxy proxy = manager.makeProxy(); System.out.println("With Proxy"); proxy.invoke(manager, hndl); } private void cancelUsingMH(ScheduledFuture<?> hndl) { MethodHandle mh = manager.makeMh(); try { System.out.println("With Method Handle"); mh.invokeExact(manager, hndl); } catch (Throwable e) { e.printStackTrace(); } } private void run() { BlockingQueue<WorkUnit<String>> lbq = new LinkedBlockingQueue<>(); manager = new ThreadPoolManager(lbq); final QueueReaderTask msgReader = new QueueReaderTask(100) { @Override public void doAction(String msg_) { if (msg_ != null) System.out.println("Msg recvd: " + msg_); } }; ScheduledFuture<?> hndl = manager.run(msgReader); cancelUsingMH(hndl); // cancelUsingProxy(hndl); // cancelUsingReflection(hndl); } public static void main(String[] args) { ThreadPoolMain main = new ThreadPoolMain(); main.run(); } }
[ "siddhantaws@gmail.com" ]
siddhantaws@gmail.com
402c5fafb810b594c3a46965238c25df6e1f85fc
0647772ae4eaa3b3b1734bdebced1cc3d9f47502
/app/src/main/java/com/sun/bingo/ui/activity/BingoDetailActivity.java
13f8e05cb3b1b1668c827dce2145250ab8af26f7
[]
no_license
Anomymouse/Bingo
981a3767aa8f7851199046df5fa06d4d7873710d
b49b2e9dc09e871156923754597900dee119cf68
refs/heads/master
2021-01-15T13:11:50.225413
2016-03-07T05:22:40
2016-03-07T05:22:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,712
java
package com.sun.bingo.ui.activity; import android.graphics.Bitmap; import android.os.Build; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.TextView; import com.sun.bingo.R; import com.sun.bingo.control.NavigateManager; import com.sun.bingo.entity.BingoEntity; import com.sun.bingo.framework.dialog.ToastTip; import butterknife.ButterKnife; import butterknife.Bind; import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; public class BingoDetailActivity extends BaseActivity { @Bind(R.id.toolbar) Toolbar toolbar; @Bind(R.id.webView) WebView webView; @Bind(R.id.smoothProgressBar) SmoothProgressBar smoothProgressBar; @Bind(R.id.tv_error_msg) TextView tvErrorMsg; private BingoEntity bingoEntity; private WebSettings settings; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bingo_detail); ButterKnife.bind(this); initToolBar(toolbar, true, "加载中..."); initData(); initView(); } private void initData() { bingoEntity = (BingoEntity) getIntent().getSerializableExtra("entity"); if (bingoEntity == null) { ToastTip.show("该作者提交的Bingo有问题"); } } private void initView() { settings = webView.getSettings(); // settings.setJavaScriptEnabled(true); //如果访问的页面中有Javascript,则WebView必须设置支持Javascript settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setSupportZoom(true); //支持缩放 settings.setBuiltInZoomControls(true); //支持手势缩放 settings.setDisplayZoomControls(false); //是否显示缩放按钮 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); //启动硬件加速 } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { settings.setLoadsImagesAutomatically(true); //支持自动加载图片 } else { settings.setLoadsImagesAutomatically(false); } settings.setUseWideViewPort(true); //将图片调整到适合WebView的大小 settings.setLoadWithOverviewMode(true); //自适应屏幕 settings.setDomStorageEnabled(true); settings.setAppCacheEnabled(true); settings.setSaveFormData(true); settings.setSupportMultipleWindows(true); settings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK); //优先使用缓存 webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY); //可使滚动条不占位 webView.setHorizontalScrollbarOverlay(true); webView.setHorizontalScrollBarEnabled(true); webView.requestFocus(); webView.loadUrl(bingoEntity.getWebsite()); webView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); smoothProgressBar.setVisibility(View.VISIBLE); } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); smoothProgressBar.setVisibility(View.GONE); if (!settings.getLoadsImagesAutomatically()) { settings.setLoadsImagesAutomatically(true); } } @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { super.onReceivedError(view, errorCode, description, failingUrl); smoothProgressBar.setVisibility(View.GONE); toolbar.setTitle("加载失败"); if (!TextUtils.isEmpty(description)) { tvErrorMsg.setVisibility(View.VISIBLE); tvErrorMsg.setText("errorCode: " + errorCode + "\ndescription: " + description); } } }); webView.setWebChromeClient(new WebChromeClient() { @Override public void onReceivedTitle(WebView view, String title) { super.onReceivedTitle(view, title); toolbar.setTitle(title); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_bingo_detail, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.item_open_by_explore: NavigateManager.gotoSystemExplore(this, bingoEntity.getWebsite()); return true; default: return super.onOptionsItemSelected(item); } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && webView.canGoBack()) { webView.goBack();//返回上一页面 return true; } return super.onKeyDown(keyCode, event); } }
[ "sfsheng0322@gmail.com" ]
sfsheng0322@gmail.com
f47132e10b77b240ce0f39ffb4a81ffa700f83fc
ddad0f5dc82be49494ad558c6990d88cbfce5d44
/spring/gdcp_spring_jdbc/src/main/java/cn/gdcp/test/JdbcTemplateCRUDTest.java
9e1853a4db7e432d45cd893a1024139c9823b590
[]
no_license
lcz-sys/javaProject
f234558fae4885d4a8f3a992a37e65193638bb0b
c4891a485b35ee378f51ebb03b94269ac7b1aca1
refs/heads/master
2023-04-10T05:42:24.725486
2021-04-17T07:25:24
2021-04-17T07:25:24
358,810,404
1
0
null
null
null
null
UTF-8
Java
false
false
2,462
java
package cn.gdcp.test; import cn.gdcp.config.SpringConfig; import cn.gdcp.domain.Account; import com.alibaba.druid.pool.DruidPooledResultSet; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.annotation.Resource; import java.sql.ResultSet; import java.util.List; @RunWith(SpringJUnit4ClassRunner.class) //@ContextConfiguration("classpath:applicationContext.xml") @ContextConfiguration(classes = {SpringConfig.class}) public class JdbcTemplateCRUDTest { @Resource(name = "jdbcTemplate") private JdbcTemplate jdbcTemplate; @Test public void test(){ String sql = "update account set balance = balance + 50000 where id = ?"; int count = jdbcTemplate.update(sql, 6); if(count>0){ System.out.println("修改成功"); }else{ System.out.println("修改失败"); } } @Test public void test2(){ String sql = "delete from account where balance < ?"; int count = jdbcTemplate.update(sql, 5000); if(count>0){ System.out.println("删除成功"); }else{ System.out.println("删除失败"); } } @Test public void test3(){ String sql = "insert into account values(null,?,?)"; int count = jdbcTemplate.update(sql, "libai",10000000); if(count>0){ System.out.println("插入成功"); }else{ System.out.println("插入失败"); } } @Test public void test4(){ String sql = "select * from account"; List<Account> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper<Account>(Account.class)); for(Account account:list){ System.out.println(account); } } @Test public void test5(){ String sql = "select * from account where id = ?"; Account account = jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<Account>(Account.class), 16); System.out.println(account); } @Test public void test6(){ String sql = "select count(*) from account"; Long count = jdbcTemplate.queryForObject(sql, Long.class); System.out.println(count); } }
[ "212065370@qq.com" ]
212065370@qq.com
59e5e78fbf8f6601364b2a823b73fefd382a6d75
bb66019e56bcd5b891798eb0981a54481486dc46
/NetBeansProjects/DR/src/java/ips/dwh/buffer/PasteFromBuffer.java
51d56467bc0b0b81ac01c6484511eae44cc9c36e
[]
no_license
povloid/projects_2008_2011
e85ea72b46d641f5a821ccd2c7ba224c87cccc77
9aceb06fd937d4796bf240cef6728151865cec4a
refs/heads/master
2020-12-04T03:25:35.921039
2014-11-02T08:43:01
2014-11-02T08:43:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,376
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package ips.dwh.buffer; import ips.dwh.config.Configs; import ips.dwh.datawork.DataWork; import java.io.File; import java.io.IOException; import java.sql.ResultSet; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author kopychenko */ public class PasteFromBuffer extends HttpServlet { /** * Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { ips.dwh.buffer.Buffer buffer = (Buffer) request.getSession().getAttribute("buffer"); String parent = request.getParameter("parent"); String toDirPath0 = null; if (parent.equals("root")) { toDirPath0 = ""; } else { toDirPath0 = "" + DataWork.getSectionPath(parent + ""); } String toDirPath = Configs.getDocRoot() + "/" +toDirPath0; // Перемещение документов for (int i : buffer.getSelectedBoxes()) { // Получаем данные по коробке DataWork.Result r = DataWork.getBox(request.getRemoteUser(), i + ""); ResultSet rs = r.getRs(); if (rs.next()) { String repFilePath = rs.getString("REP_FILE_PATH"); File file = new File(Configs.getDocRoot() + "/" + repFilePath); System.out.println(">>>" + file); File toDir = new File(toDirPath); System.out.println(">>>" + toDirPath); boolean success = file.renameTo(new File(toDir, file.getName())); if (success) { // Теперь в базе DataWork.movBoxToSection(i + "", parent); DataWork.addBoxEnd(i + "", toDirPath0 + "/" + i + "f"); System.out.println("Перемещен документ " + i + " в секцию " + parent); } } r.closeAll(); } buffer.getSelectedBoxes().clear(); System.out.println("Перемещения документов закончены"); // Перемещение секций for (int i : buffer.getSelectedSections()) { // Начать транзакцию в базе // Получить текущий путь к папке String dirPath = Configs.getDocRoot() + "/" + DataWork.getSectionPath(i + ""); System.out.println(">>>" + toDirPath); File dir = new File(dirPath); File toDir = new File(toDirPath); boolean success = dir.renameTo(new File(toDir, dir.getName())); // Теперь закончить транзакцию в базе // Теперь в базе if (success) { DataWork.movSectionToSection(i + "", parent); System.out.println("Перемещена секция " + i + " в секцию " + parent); } } buffer.getSelectedSections().clear(); System.out.println("Перемещения секций закончены"); response.sendRedirect(response.encodeRedirectURL("../DataWork2.jsp?op=update&parent=" + parent)); } catch (Exception ex) { Logger.getLogger(PasteFromBuffer.class.getName()).log(Level.SEVERE, null, ex); } } /** * Returns a short description of the servlet. * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; } }
[ "t34box@gmail.com" ]
t34box@gmail.com
9229aded670329939e2b3e74eed90befec19c140
db80a294090f9f57238a123723a1db256ec32de6
/XCL-Charts/src/org/xclcharts/chart/StackBarChart.java
125fe9d10d3c9ef1eff5bc96c5069675eef987aa
[ "Apache-2.0" ]
permissive
lsjwzh/XCL-Charts
44dd73397860954674a2dde0cbc21289515a588e
4c49abb6b4feb2a8016a4c7879115ce4d3e1a5c6
refs/heads/master
2020-12-26T04:05:28.796902
2014-12-25T15:54:56
2014-12-25T15:54:56
28,500,186
1
0
null
null
null
null
UTF-8
Java
false
false
7,638
java
/** * Copyright 2014 XCL-Charts * * 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. * * @Project XCL-Charts * @Description Android图表基类库 * @author XiongChuanLiang<br/>(xcl_168@aliyun.com) * @license http://www.apache.org/licenses/ Apache v2 License * @version 1.0 */ package org.xclcharts.chart; import java.util.List; import org.xclcharts.common.MathHelper; import org.xclcharts.renderer.XEnum; import org.xclcharts.renderer.bar.Bar; import org.xclcharts.renderer.bar.FlatBar; import android.graphics.Canvas; /** * @ClassName StackBarChart * @Description 堆叠图基类 * @author XiongChuanLiang<br/>(xcl_168@aliyun.com) * */ public class StackBarChart extends BarChart{ private FlatBar flatBar = null; private boolean mTotalLabelVisible = true; public StackBarChart() { if(null == flatBar)flatBar = new FlatBar(); } @Override public XEnum.ChartType getType() { return XEnum.ChartType.STACKBAR; } /** * 是否在柱形的最上方,显示汇总标签 * @param visible 是否显示 */ public void setTotalLabelVisible(boolean visible) { mTotalLabelVisible = visible; } @Override public Bar getBar() { return flatBar; } @Override protected boolean renderHorizontalBar(Canvas canvas) { if(null == categoryAxis.getDataSet()) return false; float axisScreenWidth = getPlotScreenWidth(); float axisDataRange = (float) dataAxis.getAxisRange(); float valueWidth = axisDataRange; //步长 float YSteps = getHorizontalYSteps(); int barHeight = (int) MathHelper.getInstance().round(mul(YSteps,0.5f),2); int cateSize = categoryAxis.getDataSet().size(); int dataSize = 0; //分类轴 for(int r=0;r < cateSize ;r++) { float currentX = plotArea.getLeft(); float currentY = sub(plotArea.getBottom() , mul((r+1) , YSteps)); double total = 0d; //得到数据源 List<BarData> chartDataSource = this.getDataSource(); if(null==chartDataSource||chartDataSource.size() == 0)continue; dataSize = chartDataSource.size(); for(int i=0;i<dataSize;i++) //轴上的每个标签各自所占的高度 { BarData bd = chartDataSource.get(i); if(null == bd.getDataSet()) continue ; flatBar.getBarPaint().setColor(bd.getColor()); if(bd.getDataSet().size() < r+1) continue; //参数值与最大值的比例 照搬到 y轴高度与矩形高度的比例上来 Double bv = bd.getDataSet().get(r); total = MathHelper.getInstance().add(total, bv); float valuePostion = 0.0f; if(i == 0 ) { double t = MathHelper.getInstance().sub( bv , dataAxis.getAxisMin() ); valuePostion = mul( axisScreenWidth,div(dtof(t),valueWidth) ); }else{ float t2 = div(dtof(bv) , valueWidth) ; valuePostion = mul( axisScreenWidth , t2); } //宽度 float topY = sub(currentY , barHeight/2); float rightX = add(currentX , valuePostion); float bottomY = add(currentY , barHeight/2); flatBar.renderBar(currentX ,topY,rightX,bottomY,canvas); //保存位置 saveBarRectFRecord(i,r,currentX + mMoveX, topY + mMoveY,rightX + mMoveX, bottomY+ mMoveY); //显示焦点框 drawFocusRect(canvas,i,r,currentX ,topY,rightX,bottomY); //柱形的当前值 flatBar.renderBarItemLabel(getFormatterItemLabel(bv), add(currentX , valuePostion/2), currentY , canvas); currentX = add(currentX,valuePostion); } //合计 if(mTotalLabelVisible) { double t = MathHelper.getInstance().sub(total , dataAxis.getAxisMin()); float totalPostion = mul(div(axisScreenWidth,axisDataRange),dtof(t)); flatBar.renderBarItemLabel(getFormatterItemLabel(total), add(plotArea.getLeft() , totalPostion), currentY, canvas); } } return true; } @Override protected boolean renderVerticalBar(Canvas canvas) { //得到分类轴数据集 List<String> dataSet = categoryAxis.getDataSet(); if(null == dataSet) return false; //得到数据源 List<BarData> chartDataSource = this.getDataSource(); if(null == chartDataSource) return false; float XSteps = getVerticalXSteps(dataSet.size() + 1 ); float axisScreenHeight = getAxisScreenHeight(); float axisDataHeight = (float) dataAxis.getAxisRange(); float barWidht = mul(XSteps,0.5f); float currentX = 0.0f,currentY = 0.0f; int dataSize = dataSet.size(); int sourceSize = 0; for(int r=0;r<dataSize;r++) //轴上的每个标签 { currentX = add(plotArea.getLeft() , mul( (r+1) , XSteps)); currentY = plotArea.getBottom() ; Double total = 0d; sourceSize = chartDataSource.size(); for(int i=0; i < sourceSize;i++) //各自所占的高度 { BarData bd = chartDataSource.get(i); if(null == bd.getDataSet()) continue ; flatBar.getBarPaint().setColor(bd.getColor()); if(bd.getDataSet().size() < r+1) continue; //参数值与最大值的比例 照搬到 y轴高度与矩形高度的比例上来 Double bv = bd.getDataSet().get(r); total = MathHelper.getInstance().add(total, bv); float valuePostion = 0.0f; if(i == 0 ) { double t = MathHelper.getInstance().sub( bv , dataAxis.getAxisMin() ); valuePostion = mul( axisScreenHeight,div( dtof(t),axisDataHeight) ); }else{ double t2 = MathHelper.getInstance().div(bv, axisDataHeight) ; valuePostion = mul( axisScreenHeight , dtof(t2)); } //柱形 float leftX = sub(currentX , barWidht/2); float topY = sub(currentY , valuePostion); float rightX = add(currentX , barWidht/2); flatBar.renderBar(leftX, topY, rightX, currentY, canvas); //保存位置 saveBarRectFRecord(i,r,leftX + mMoveX, topY + mMoveY,rightX + mMoveX, currentY + mMoveY); //显示焦点框 drawFocusRect(canvas,i,r,leftX, topY, rightX, currentY); //柱形的当前值 flatBar.renderBarItemLabel(getFormatterItemLabel(bv), currentX, sub(currentY , valuePostion/2), canvas); currentY = sub(currentY,valuePostion); } //合计 if(mTotalLabelVisible) { double per = MathHelper.getInstance().sub(total , dataAxis.getAxisMin()); float totalPostion = MathHelper.getInstance().mul(div(axisScreenHeight,axisDataHeight) , dtof(per)); flatBar.renderBarItemLabel(getFormatterItemLabel(total), currentX, sub(plotArea.getBottom() , totalPostion), canvas); } } return true; } }
[ "xcl_168@aliyun.com" ]
xcl_168@aliyun.com
f1cf7eab28b5cace48a6ee4f1c7347c16cdf7d28
8829010f5bb8de48e9022a2db8938dd8abece444
/src/main/java/net/codjo/gui/toolkit/path/LabelFilter.java
7d463c82373980a81d30a1ca20e35627c622f74f
[]
no_license
codjo-sandbox/codjo-gui-toolkit
9b6a956acfe1e632c90b4d611acddf1b2b5e4084
550360bda1b6dde4590d895db2441beabb6eb163
refs/heads/integration
2020-12-25T12:57:30.789989
2015-07-22T09:56:12
2015-07-22T09:56:12
2,827,034
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
1,059
java
/* * Team : AGF AM / OSI / SI / BO * * Copyright (c) 2001 AGF Asset Management. */ package net.codjo.gui.toolkit.path; import java.io.File; import javax.swing.filechooser.FileFilter; /** * Filtre les fichiers en fonction d'un libellé. * * @author $Author: gaudefr $ * @version 2.05-SNAPSHOT */ class LabelFilter extends FileFilter { private String fileType = "texte"; private String extension = "txt"; LabelFilter() {} LabelFilter(String fileTypeLabel, String extension) { this.fileType = fileTypeLabel; this.extension = extension; } public String getDescription() { return fileType + " (*." + extension + ")"; } public String getFirstAllowedExtension() { if (this.extension.indexOf(',') != -1) { return this.extension.substring(0, this.extension.indexOf(',')); } else { return this.extension; } } public boolean accept(File file) { return file.getName() != null && file.getName().indexOf(fileType) > -1; } }
[ "admin@codjo.net" ]
admin@codjo.net
ede40ec7565267c99ecb004b0ac6680d2e04bb00
54ee36062d824dd613dfe1f97dbdb02e795a2b19
/src/com/fordays/fdpay/user/_entity/_SysUser.java
3b039940b9b09433647fec1b942627423b2031f7
[]
no_license
teardemon/TPP
732104dcc29b659b5081bc5c4f61227641ffa043
cab24f4e5148bac6d699a7a767bb41005eea7e0f
refs/heads/master
2020-05-29T11:50:30.782652
2012-10-09T09:08:06
2012-10-09T09:08:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,539
java
package com.fordays.fdpay.user._entity; /** * SysUser generated by hbm2java */ public class _SysUser extends org.apache.struts.action.ActionForm implements Cloneable { private static final long serialVersionUID = 1L; // Fields protected long userId; protected String userName; protected String userNo; protected String userPassword; protected Long userStatus; protected Long userType; protected String userEmail; protected String serialNumber; protected java.util.Set sysLogs = new java.util.HashSet(0); protected java.util.Set draws = new java.util.HashSet(0); protected java.util.Set drawLogs = new java.util.HashSet(0); protected java.util.Set charges = new java.util.HashSet(0); // Constructors // Property accessors public long getUserId() { return this.userId; } public void setUserId(long userId) { this.userId = userId; } public String getUserName() { return this.userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserNo() { return this.userNo; } public void setUserNo(String userNo) { this.userNo = userNo; } public String getUserPassword() { return this.userPassword; } public void setUserPassword(String userPassword) { this.userPassword = userPassword; } public Long getUserStatus() { return this.userStatus; } public void setUserStatus(Long userStatus) { this.userStatus = userStatus; } public Long getUserType() { return this.userType; } public void setUserType(Long userType) { this.userType = userType; } public String getUserEmail() { return this.userEmail; } public void setUserEmail(String userEmail) { this.userEmail = userEmail; } public String getSerialNumber() { return this.serialNumber; } public void setSerialNumber(String serialNumber) { this.serialNumber = serialNumber; } public java.util.Set getSysLogs() { return this.sysLogs; } public void setSysLogs(java.util.Set sysLogs) { this.sysLogs = sysLogs; } public java.util.Set getDraws() { return this.draws; } public void setDraws(java.util.Set draws) { this.draws = draws; } public java.util.Set getDrawLogs() { return this.drawLogs; } public void setDrawLogs(java.util.Set drawLogs) { this.drawLogs = drawLogs; } public java.util.Set getCharges() { return this.charges; } public void setCharges(java.util.Set charges) { this.charges = charges; } // The following is extra code specified in the hbm.xml files public Object clone() { Object o = null; try { o = super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return o; } private String thisAction=""; public String getThisAction() { return thisAction; } public void setThisAction(String thisAction) { this.thisAction=thisAction; } private int index=0; public int getIndex() { return index; } public void setIndex(int index) { this.index=index; } // end of extra code specified in the hbm.xml files }
[ "yanrui@kurui.com" ]
yanrui@kurui.com
9d21556873523b7957c8d8944f0af8891f00b3e3
6d8dec172f4f1c6009507a5b74481eefc8d8904b
/yllibrary/src/main/java/com/ellen/ylbase/log/YlLogManager.java
d98c979f5d552003a8b81d9f9f15ef02b47636bf
[]
no_license
Ellen2018/YlLibrary
b0b7e88f07e1fbaf6cce160db72116c91dd61b3a
93ced9fa1e75bd4014a9bf37f5826284c1a41f87
refs/heads/master
2023-01-24T04:34:49.250069
2020-11-10T15:19:22
2020-11-10T15:19:22
309,941,875
0
0
null
null
null
null
UTF-8
Java
false
false
1,097
java
package com.ellen.ylbase.log; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class YlLogManager { private YlLogConfig ylLogConfig; private static YlLogManager instance; private List<YlLogPrinter> ylLogPrinterList = new ArrayList<>(); private YlLogManager(YlLogConfig ylLogConfig, YlLogPrinter[] printers) { this.ylLogConfig = ylLogConfig; ylLogPrinterList.addAll(Arrays.asList(printers)); } public static YlLogManager getInstance() { return instance; } public static void init(YlLogConfig config, YlLogPrinter... ylLogPrinters) { instance = new YlLogManager(config, ylLogPrinters); } public YlLogConfig getConfig() { return ylLogConfig; } public List<YlLogPrinter> getPrinters() { return ylLogPrinterList; } public void addPrinters(YlLogPrinter printer) { ylLogPrinterList.add(printer); } public void removePrinters(YlLogPrinter printer) { if (ylLogPrinterList != null) ylLogPrinterList.remove(printer); } }
[ "1961075191@qq.com" ]
1961075191@qq.com
aa7f468ff92e1023c4001ad96a5bfa3d151391c1
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Time/14/org/joda/time/format/PeriodFormatterBuilder_appendSecondsWithOptionalMillis_499.java
056370d443889c69ff2031b9c12b025c055b3b40
[]
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,073
java
org joda time format factori creat complex instanc period formatt periodformatt method call period format perform link period formatt periodformatt class provid factori method creat formatt link period format periodformat link iso period format isoperiodformat period formatt builder periodformatterbuild construct formatt print pars formatt built append specif field formatt instanc builder formatt print year month year month construct pre period formatt periodformatt year month yearsandmonth period formatt builder periodformatterbuild print printzeroalwai append year appendyear append suffix appendsuffix year year append separ appendsepar print rare printzerorarelylast append month appendmonth append suffix appendsuffix month month formatt toformatt pre period formatt builder periodformatterbuild mutabl thread safe formatt build thread safe immut author brian neill o'neil period format periodformat period formatt builder periodformatterbuild instruct printer emit combin second milli field support milli overflow second milli output period formatt builder periodformatterbuild period formatt builder periodformatterbuild append second option milli appendsecondswithoptionalmilli append field appendfield second option milli
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
da2e1ac1da70c60a3c422c581ccb314f197abedd
9ccb5d6beb61feb7d6772baf5079af7e91cf7b29
/src/main/java/org/quartz/core/JobExecutionContext.java
72ee2aae87f17fa1a06cfab50e9971afd153280a
[ "Apache-2.0" ]
permissive
knowm/Sundial
9fc91cdb21350b678e53f6cd270c159c30a7af67
042c483ef2bf638c83a7187e2a8e6216037ed846
refs/heads/develop
2023-08-27T21:40:08.914472
2021-09-10T15:31:38
2021-09-10T15:31:38
1,660,504
136
26
Apache-2.0
2022-12-13T12:03:05
2011-04-25T16:11:53
Java
UTF-8
Java
false
false
5,596
java
package org.quartz.core; import java.util.Date; import org.quartz.jobs.Job; import org.quartz.jobs.JobDataMap; import org.quartz.jobs.JobDetail; import org.quartz.listeners.JobListener; import org.quartz.listeners.TriggerListener; import org.quartz.triggers.Trigger; /** * A context bundle containing handles to various environment information, that is given to a <code> * {@link org.quartz.jobs.JobDetail}</code> instance as it is executed, and to a <code> * {@link Trigger}</code> instance after the execution completes. * * <p>The <code>JobDataMap</code> found on this object (via the <code>getMergedJobDataMap()</code> * method) serves as a convenience - it is a merge of the <code>JobDataMap</code> found on the * <code>JobDetail</code> and the one found on the <code>Trigger</code>, with the value in the * latter overriding any same-named values in the former. <i>It is thus considered a 'best practice' * that the execute code of a Job retrieve data from the JobDataMap found on this object</i> NOTE: * Do not expect value 'set' into this JobDataMap to somehow be set back onto a <code>StatefulJob * </code>'s own JobDataMap. * * <p><code>JobExecutionContext</code> s are also returned from the <code> * Scheduler.getCurrentlyExecutingJobs()</code> method. These are the same instances as those passed * into the jobs that are currently executing within the scheduler. The exception to this is when * your application is using Quartz remotely (i.e. via RMI) - in which case you get a clone of the * <code>JobExecutionContext</code>s, and their references to the <code>Scheduler</code> and <code> * Job</code> instances have been lost (a clone of the <code>JobDetail</code> is still available - * just not a handle to the job instance that is running). * * @see #getScheduler() * @see #getMergedJobDataMap() * @see #getJobDetail() * @see Job * @see Trigger * @see JobDataMap * @author James House */ public interface JobExecutionContext { /** Get a handle to the <code>Scheduler</code> instance that fired the <code>Job</code>. */ Scheduler getScheduler(); /** Get a handle to the <code>Trigger</code> instance that fired the <code>Job</code>. */ Trigger getTrigger(); /** * Get a handle to the <code>Calendar</code> referenced by the <code>Trigger</code> instance that * fired the <code>Job</code>. */ Calendar getCalendar(); /** * If the <code>Job</code> is being re-executed because of a 'recovery' situation, this method * will return <code>true</code>. */ boolean isRecovering(); int getRefireCount(); /** * Get the convenience <code>JobDataMap</code> of this execution context. * * <p>The <code>JobDataMap</code> found on this object serves as a convenience - it is a merge of * the <code>JobDataMap</code> found on the <code>JobDetail</code> and the one found on the <code> * Trigger</code>, with the value in the latter overriding any same-named values in the former. * <i>It is thus considered a 'best practice' that the execute code of a Job retrieve data from * the JobDataMap found on this object.</i> * * <p>NOTE: Do not expect value 'set' into this JobDataMap to somehow be set back onto a <code> * StatefulJob</code>'s own JobDataMap. * * <p>Attempts to change the contents of this map typically result in an <code> * IllegalStateException</code>. */ JobDataMap getMergedJobDataMap(); /** Get the <code>JobDetail</code> associated with the <code>Job</code>. */ JobDetail getJobDetail(); /** * Get the instance of the <code>Job</code> that was created for this execution. * * <p>Note: The Job instance is not available through remote scheduler interfaces. */ Job getJobInstance(); /** * The actual time the trigger fired. For instance the scheduled time may have been 10:00:00 but * the actual fire time may have been 10:00:03 if the scheduler was too busy. * * @return Returns the fireTime. * @see #getScheduledFireTime() */ Date getFireTime(); /** * The scheduled time the trigger fired for. For instance the scheduled time may have been * 10:00:00 but the actual fire time may have been 10:00:03 if the scheduler was too busy. * * @return Returns the scheduledFireTime. * @see #getFireTime() */ Date getScheduledFireTime(); Date getPreviousFireTime(); Date getNextFireTime(); /** * Returns the result (if any) that the <code>Job</code> set before its execution completed (the * type of object set as the result is entirely up to the particular job). * * <p>The result itself is meaningless to Quartz, but may be informative to <code> * {@link JobListener}s</code> or <code>{@link TriggerListener}s</code> that are watching the * job's execution. * * @return Returns the result. */ Object getResult(); /** * Set the result (if any) of the <code>Job</code>'s execution (the type of object set as the * result is entirely up to the particular job). * * <p>The result itself is meaningless to Quartz, but may be informative to <code> * {@link JobListener}s</code> or <code>{@link TriggerListener}s</code> that are watching the * job's execution. */ void setResult(Object result); /** * The amount of time the job ran for (in milliseconds). The returned value will be -1 until the * job has actually completed (or thrown an exception), and is therefore generally only useful to * <code>JobListener</code>s and <code>TriggerListener</code>s. * * @return Returns the jobRunTime. */ long getJobRunTime(); }
[ "tim.molter@gmail.com" ]
tim.molter@gmail.com
cacff7b763925f6e49f85ea41033705eaf50a6b6
24c7837b72da7c5b17af84e2e590832729ef753d
/lesson-demo/src/main/java/com/github/dalianghe/service/ProcessDefinitionService.java
64203e609883c613bad3e2424223dcc927e4988f
[]
no_license
dalianghe/activiti-learn
e33aaeedec6005e197ee5d31bd0c3958d013d0a5
79f144c32ad7cc97a0dfe7703d744d70753b81ba
refs/heads/master
2020-03-23T00:19:40.599400
2018-08-09T13:48:41
2018-08-09T13:48:51
140,856,565
0
0
null
null
null
null
UTF-8
Java
false
false
3,643
java
package com.github.dalianghe.service; import com.github.dalianghe.model.ProcessDefinitionCustom; import org.activiti.engine.RepositoryService; import org.activiti.engine.repository.Deployment; import org.activiti.engine.repository.ProcessDefinition; import org.activiti.engine.repository.ProcessDefinitionQuery; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipInputStream; @Service public class ProcessDefinitionService { @Autowired private RepositoryService repositoryService; public long getProcessDefinitionsCount(String key, String name) { return this.getProcessDefinitionQuery(key, name).count(); } public List<ProcessDefinitionCustom> getProcessDefinitions(String key, String name, Integer firstResult, Integer maxResults) { List<ProcessDefinitionCustom> list = new ArrayList<>(); ProcessDefinitionQuery processDefinitionQuery = this.getProcessDefinitionQuery(key, name); List<ProcessDefinition> processDefinitions = processDefinitionQuery .orderByProcessDefinitionKey().asc() .orderByProcessDefinitionVersion().desc() .listPage((firstResult - 1) * maxResults, maxResults); //lambda循环 processDefinitions.stream().forEach(processDefinition -> { ProcessDefinitionCustom processDefinitionCustom = new ProcessDefinitionCustom(); BeanUtils.copyProperties(processDefinition, processDefinitionCustom); Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(processDefinition.getDeploymentId()).singleResult(); processDefinitionCustom.setCreateDate(deployment.getDeploymentTime()); list.add(processDefinitionCustom); }); return list; } private ProcessDefinitionQuery getProcessDefinitionQuery(String key, String name) { ProcessDefinitionQuery processDefinitionQuery = null; if (!StringUtils.isEmpty(key) && !StringUtils.isEmpty(name)) { processDefinitionQuery = repositoryService.createProcessDefinitionQuery() .processDefinitionKey(key) .processDefinitionNameLike(name + "%"); } else if (!StringUtils.isEmpty(key)) { processDefinitionQuery = repositoryService.createProcessDefinitionQuery() .processDefinitionKey(key); } else if (!StringUtils.isEmpty(name)) { processDefinitionQuery = repositoryService.createProcessDefinitionQuery() .processDefinitionNameLike(name + "%"); } else { processDefinitionQuery = repositoryService.createProcessDefinitionQuery(); } return processDefinitionQuery; } public InputStream getImageStream(String deploymentId, String resourceName){ return repositoryService.getResourceAsStream(deploymentId, resourceName); } public void delProcessDefinition(String deploymentId){ repositoryService.deleteDeployment(deploymentId, true); } public String publishProcessDefinition(String processName, InputStream inputStream){ ZipInputStream zipInputStream = new ZipInputStream(inputStream); Deployment deployment = repositoryService.createDeployment() .name(processName) .addZipInputStream(zipInputStream).deploy(); return deployment.getId(); } }
[ "276420284@qq.com" ]
276420284@qq.com
06b68a6f111be60ea4133d95b9f7183e85c588a3
90792cc575e9f33b5d2a5f4e58a751e9a74bc6e5
/query/src/main/java/com/yang/yunwang/query/api/bean/zfbplant/yihui/Data.java
541e471838649b4ca45e9c7c163f30b8c17d461b
[]
no_license
caleucheg/YunlaohuMulity
8332322d13681a4cdc932b837a0ca1aa7c1f8836
ecc5d0dbf0fefbddb7f2468520c190a942ffded9
refs/heads/master
2020-03-28T11:47:17.683135
2019-01-16T08:20:05
2019-01-16T08:20:21
148,246,848
0
0
null
null
null
null
UTF-8
Java
false
false
2,344
java
package com.yang.yunwang.query.api.bean.zfbplant.yihui; import com.google.gson.annotations.SerializedName; @SuppressWarnings("unused") public class Data { @SerializedName("Old_SysNo") private Object oldSysNo; @SerializedName("OpenID") private Object openID; @SerializedName("Out_refund_no") private Object outRefundNo; @SerializedName("Out_trade_no") private Object outTradeNo; @SerializedName("Pay_Type") private Object payType; @SerializedName("ResultData") private Object resultData; @SerializedName("Status") private Object status; @SerializedName("Time_Start") private Object timeStart; @SerializedName("WxPayData") private String wxPayData; @SerializedName("YwMch_id") private Object ywMchId; public Object getOldSysNo() { return oldSysNo; } public void setOldSysNo(Object oldSysNo) { this.oldSysNo = oldSysNo; } public Object getOpenID() { return openID; } public void setOpenID(Object openID) { this.openID = openID; } public Object getOutRefundNo() { return outRefundNo; } public void setOutRefundNo(Object outRefundNo) { this.outRefundNo = outRefundNo; } public Object getOutTradeNo() { return outTradeNo; } public void setOutTradeNo(Object outTradeNo) { this.outTradeNo = outTradeNo; } public Object getPayType() { return payType; } public void setPayType(Object payType) { this.payType = payType; } public Object getResultData() { return resultData; } public void setResultData(Object resultData) { this.resultData = resultData; } public Object getStatus() { return status; } public void setStatus(Object status) { this.status = status; } public Object getTimeStart() { return timeStart; } public void setTimeStart(Object timeStart) { this.timeStart = timeStart; } public String getWxPayData() { return wxPayData; } public void setWxPayData(String wxPayData) { this.wxPayData = wxPayData; } public Object getYwMchId() { return ywMchId; } public void setYwMchId(Object ywMchId) { this.ywMchId = ywMchId; } }
[ "gubaisongh2@sina.com" ]
gubaisongh2@sina.com
780c5a68c56988e8664cab4428d378d2062054c7
77f83b8fb5e705104cdb71208189b3a2c5f40e00
/yibo-security-browser/src/main/java/com/yibo/security/browser/session/YiBoExpiredSessionStrategy.java
8d014d1bab21909e4d2bbd13aa89cd4a0e451987
[]
no_license
jjhyb/yibo-security2
1c12bff46459bd72938cd8cd0d11ec1554e26fd2
5e6aacb5ec10f883f7a3ec501f0c5cdf82427b51
refs/heads/master
2021-07-10T23:09:26.686516
2019-09-16T09:28:47
2019-09-16T09:28:47
208,761,195
0
0
null
2020-10-13T16:04:30
2019-09-16T09:28:28
Java
UTF-8
Java
false
false
1,195
java
package com.yibo.security.browser.session; import org.springframework.security.web.session.SessionInformationExpiredEvent; import org.springframework.security.web.session.SessionInformationExpiredStrategy; import javax.servlet.ServletException; import java.io.IOException; /** * @author: huangyibo * @Date: 2019/8/12 0:29 * @Description: */ public class YiBoExpiredSessionStrategy extends AbstractSessionStrategy implements SessionInformationExpiredStrategy { public YiBoExpiredSessionStrategy(String invalidSessionUrl) { super(invalidSessionUrl); } /* (non-Javadoc) * @see org.springframework.security.web.session.SessionInformationExpiredStrategy#onExpiredSessionDetected(org.springframework.security.web.session.SessionInformationExpiredEvent) */ @Override public void onExpiredSessionDetected(SessionInformationExpiredEvent event) throws IOException, ServletException { onSessionInvalid(event.getRequest(), event.getResponse()); } /* (non-Javadoc) * @see com.imooc.security.browser.session.AbstractSessionStrategy#isConcurrency() */ @Override protected boolean isConcurrency() { return true; } }
[ "718649016@qq.com" ]
718649016@qq.com
0dfdc48b2119b0f4c9c1f533e08f95494e820dca
a911f926261b82ec8a2ade2d0af1a973280ceab6
/qipai_admin_facade/src/main/java/com/anbang/qipai/admin/msg/channel/source/MemberYushiSource.java
dbb260936bbb8e54990250f61f1d3f6f927e10d3
[]
no_license
791837060/qipai_huainanmajiang
31325550c9db1fcb139c6f5a89d84f7deac0e3a2
b4f17b26484bbe2840a0852156117faee9996bbb
refs/heads/master
2023-06-26T22:31:40.822705
2021-07-30T07:20:49
2021-07-30T07:20:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package com.anbang.qipai.admin.msg.channel.source; import org.springframework.cloud.stream.annotation.Output; import org.springframework.messaging.MessageChannel; public interface MemberYushiSource { String channel = "memberYushi"; String addYushi = "addYushi"; String deleteYushi = "deleteYushi"; String updateYushi = "updateYushi"; @Output MessageChannel memberYushi(); }
[ "shony01@163.com" ]
shony01@163.com
2f5f23af5a8fc7e8126f85144b010a388462743f
efcd979df3eef0382c3f34ee6ed9d1b5d9d10672
/src/main/java/dev/morling/kccli/command/GetConnectorsCommand.java
77ec5610086934a00fe11153d7aaa59a7541d3d8
[ "Apache-2.0" ]
permissive
sfc-gh-japatel/kcctl
fe0102dfbe9d8774bbf626abe2900f495703f1a9
99bef295d6465bf8b1732c6eea0bb88bed3e8426
refs/heads/main
2023-06-26T02:58:18.924154
2021-07-25T03:15:56
2021-07-25T03:16:00
386,745,697
0
0
Apache-2.0
2021-07-16T19:38:25
2021-07-16T19:38:24
null
UTF-8
Java
false
false
3,308
java
/* * Copyright 2021 The original 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 dev.morling.kccli.command; import java.util.List; import javax.inject.Inject; import org.eclipse.microprofile.rest.client.RestClientBuilder; import com.github.freva.asciitable.AsciiTable; import com.github.freva.asciitable.Column; import com.github.freva.asciitable.HorizontalAlign; import dev.morling.kccli.service.ConnectorStatusInfo; import dev.morling.kccli.service.KafkaConnectApi; import dev.morling.kccli.service.TaskState; import dev.morling.kccli.util.ConfigurationContext; import picocli.CommandLine.Command; import static dev.morling.kccli.util.Colors.ANSI_GREEN; import static dev.morling.kccli.util.Colors.ANSI_RED; import static dev.morling.kccli.util.Colors.ANSI_RESET; @Command(name = "connectors") public class GetConnectorsCommand implements Runnable { @Inject ConfigurationContext context; @Override public void run() { KafkaConnectApi kafkaConnectApi = RestClientBuilder.newBuilder() .baseUri(context.getCluster()) .build(KafkaConnectApi.class); List<String> connectors = kafkaConnectApi.getConnectors(); String[][] data = new String[connectors.size()][]; int i = 0; for (String name : connectors) { ConnectorStatusInfo connectorStatus = kafkaConnectApi.getConnectorStatus(name); data[i] = new String[]{ name, " " + connectorStatus.type, " " + connectorStatus.connector.state, " " + toString(connectorStatus.tasks) }; i++; } System.out.println(); String table = AsciiTable.getTable(AsciiTable.NO_BORDERS, new Column[]{ new Column().header("NAME").dataAlign(HorizontalAlign.LEFT), new Column().header(" TYPE").dataAlign(HorizontalAlign.LEFT), new Column().header(" STATE").dataAlign(HorizontalAlign.LEFT), new Column().header(" TASKS").dataAlign(HorizontalAlign.LEFT) }, data); System.out.println(table.replace("RUNNING", ANSI_GREEN + "RUNNING" + ANSI_RESET).replace("FAILED", ANSI_RED + "FAILED" + ANSI_RESET)); System.out.println(); } private String toString(List<TaskState> tasks) { StringBuilder sb = new StringBuilder(); boolean first = true; for (TaskState taskState : tasks) { if (first) { first = false; } else { sb.append(", "); } sb.append(taskState.id + ": " + taskState.state); } return sb.toString(); } }
[ "gunnar.morling@googlemail.com" ]
gunnar.morling@googlemail.com
180e90a76106f9f6ce8a4bb69038e46e541261d0
7ba2a260f6b1b7a5c31dabcdf11e4c0c13a142ef
/java/19.删除链表的倒数第n个节点.java
3170c99999a62fb7fdf92410163a0ee351e74421
[ "Apache-2.0" ]
permissive
maoqitian/MyLeetCode
5c063008760e837567141d64052ae5c53e8be43a
8a85996352a88bb9a8a6a2712dce3eac2e1c3463
refs/heads/master
2022-01-16T23:00:30.348018
2022-01-05T15:42:13
2022-01-05T15:42:13
175,940,000
1
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
/* * @lc app=leetcode.cn id=19 lang=java * * [19] 删除链表的倒数第N个节点 */ // @lc code=start /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int val) { this.val = val; } * ListNode(int val, ListNode next) { this.val = val; this.next = next; } * } */ class Solution { public ListNode removeNthFromEnd(ListNode head, int n) { //迭代 快慢指针 时间复杂度 O(n) n 为链表长度 ListNode res =new ListNode(-1); res.next = head; ListNode pre = res; ListNode slow = head; ListNode fast = head; //找到位置 while(n!=0){ fast = fast.next; n --; } //移动快慢指针 while(fast!=null){ pre = pre.next; slow = slow.next; fast = fast.next; } pre.next = slow.next; return res.next; } } // @lc code=end
[ "maoqitian068@163.com" ]
maoqitian068@163.com
890114644bb3464faed2aa247a370738fcd2fcf6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_95c6f10d2c878b7409983b801fd9143551c73a25/Function/17_95c6f10d2c878b7409983b801fd9143551c73a25_Function_t.java
eca540e7dbf1f67786110c22f9f3dee93194b084
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,818
java
package uk.ac.ic.doc.gander.model; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.python.pydev.parser.jython.SimpleNode; import org.python.pydev.parser.jython.ast.FunctionDef; import org.python.pydev.parser.jython.ast.NameTok; import uk.ac.ic.doc.gander.cfg.Cfg; public class Function implements Namespace { private FunctionDef function; private Namespace parent; private Map<String, Function> functions = new HashMap<String, Function>(); private Map<String, Class> classes = new HashMap<String, Class>(); private Cfg graph = null; public Function(FunctionDef function, Namespace parent) { this.function = function; this.parent = parent; } public String getName() { return ((NameTok) (function.name)).id; } public String getFullName() { String parentName = parent.getFullName(); if (parentName.isEmpty()) return getName(); else return parentName + "." + getName(); } public Cfg getCfg() { if (graph == null) graph = new Cfg(function); return graph; } public FunctionDef getFunctionDef() { return function; } public Namespace getParentScope() { return parent; } public Map<String, Package> getPackages() { return Collections.emptyMap(); } public Map<String, Module> getModules() { return Collections.emptyMap(); } public Map<String, Class> getClasses() { return Collections.unmodifiableMap(classes); } public Map<String, Function> getFunctions() { return Collections.unmodifiableMap(functions); } public void addPackage(Package pkg) { throw new Error("A function cannot contain a package"); } public void addModule(Module module) { throw new Error("A function cannot contain a package"); } public void addClass(Class klass) { classes.put(klass.getName(), klass); } public void addFunction(Function function) { functions.put(function.getName(), function); } @Override public String toString() { return "Function[" + getFullName() + "]"; } /** * Functions inherit their systemness from their parent. * * It isn't possible for a function to be system if it's containing module * isn't a system module. In other words, the resolution of systemness is at * the module level and all namespaces below that, inherit from their * parent. * * XXX: Another way to look at this is that systemness is a property of the * associated <b>hierarchy</b> element so perhaps we should link model * element to their hierarchy parent. However, some model elements don't * have a hierarchy element. For example the dummy_builtin module. */ public boolean isSystem() { return parent.isSystem(); } public SimpleNode getAst() { return getFunctionDef(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com