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
0bf74b8fb3632dd66e61bcc6cd4dc44c140f6b95
6e918da261042cc966bb2a206782a35c76171493
/src/com/esotericsoftware/spine/attachments/AttachmentType.java
c592e7ad8f74b5ef9813fc96be92c38e37339ef5
[]
no_license
Avoduhcado/Cairn
45eff679f27b380a30e1dcfae2c11ce5a2d5edfe
0a8d463aaf56e86dbc230c4f3c1cd39b2bc94cad
refs/heads/master
2021-01-21T04:35:52.065227
2016-01-24T19:00:53
2016-01-24T19:00:53
35,189,049
1
0
null
null
null
null
UTF-8
Java
false
false
1,917
java
/****************************************************************************** * Spine Runtimes Software License * Version 2.1 * * Copyright (c) 2013, Esoteric Software * All rights reserved. * * You are granted a perpetual, non-exclusive, non-sublicensable and * non-transferable license to install, execute and perform the Spine Runtimes * Software (the "Software") solely for internal use. Without the written * permission of Esoteric Software (typically granted by licensing Spine), you * may not (a) modify, translate, adapt or otherwise create derivative works, * improvements of the Software or develop new applications using the Software * or (b) remove, delete, alter or obscure any trademarks or any copyright, * trademark, patent or other intellectual property or proprietary rights * notices on or in the Software, including any copy thereof. Redistributions * in binary or source form must include this license and terms. * * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "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 ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ package com.esotericsoftware.spine.attachments; public enum AttachmentType { region, boundingbox, mesh, skinnedmesh, box2dregion }
[ "lostking9@yahoo.com" ]
lostking9@yahoo.com
ef66d3e0c1edbafebfba2095f68978ee87214ab5
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/naver--pinpoint/d340453b4a6bf169b4e5af27ec03fa77871f53c1/before/DotExtractor.java
ea119ac1067456f7cc68f44b96ce1ddebbd69498
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,190
java
/* * Copyright 2014 NAVER Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.navercorp.pinpoint.web.service; import com.navercorp.pinpoint.common.bo.SpanBo; import com.navercorp.pinpoint.web.vo.*; import com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult; import com.navercorp.pinpoint.web.vo.scatter.Dot; import com.navercorp.pinpoint.web.vo.scatter.ScatterScanResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @author emeroad */ public class DotExtractor { private final Logger logger = LoggerFactory.getLogger(this.getClass()); private final Range range; private Map<Application, List<Dot>> dotMap = new HashMap<Application, List<Dot>>(); public DotExtractor(Range range) { if (range == null) { throw new NullPointerException("range must not be null"); } this.range = range; } public void addDot(SpanBo span) { if (span == null) { throw new NullPointerException("span must not be null"); } Application spanApplication = new Application(span.getApplicationId(), span.getServiceType()); final List<Dot> dotList = getDotList(spanApplication); final TransactionId transactionId = new TransactionId(span.getTraceAgentId(), span.getTraceAgentStartTime(), span.getTraceTransactionSequence()); final Dot dot = new Dot(transactionId, span.getCollectorAcceptTime(), span.getElapsed(), span.getErrCode(), span.getAgentId()); dotList.add(dot); logger.trace("Application:{} Dot:{}", spanApplication, dot); } private List<Dot> getDotList(Application spanApplication) { List<Dot> dotList = this.dotMap.get(spanApplication); if(dotList == null) { dotList = new ArrayList<Dot>(); this.dotMap.put(spanApplication, dotList); } return dotList; } public List<ApplicationScatterScanResult> getApplicationScatterScanResult() { List<ApplicationScatterScanResult> applicationScatterScanResult = new ArrayList<ApplicationScatterScanResult>(); for (Map.Entry<Application, List<Dot>> entry : this.dotMap.entrySet()) { List<Dot> dotList = entry.getValue(); Application application = entry.getKey(); ScatterScanResult scatterScanResult = new ScatterScanResult(range.getFrom(), range.getTo(), dotList); applicationScatterScanResult.add(new ApplicationScatterScanResult(application, scatterScanResult)); } return applicationScatterScanResult; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
e1240dcd9ed2bd829ee6d18ea19a1508bd34d46a
385e3414ccb7458bbd3cec326320f11819decc7b
/frameworks/opt/tedongle/src/java/com/android/internal/tedongle/uicc/CsimFileHandler.java
921e40e7abac1e5e5ed1c470d35af6bbae7aef0b
[]
no_license
carlos22211/Tango_AL813
14de7f2693c3045b9d3c0cb52017ba2bb6e6b28f
b50b1b7491dc9c5e6b92c2d94503635c43e93200
refs/heads/master
2020-03-28T08:09:11.127995
2017-06-26T05:05:29
2017-06-26T05:05:29
147,947,860
1
0
null
2018-09-08T15:55:46
2018-09-08T15:55:45
null
UTF-8
Java
false
false
2,037
java
/* * Copyright (C) 2006, 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.tedongle.uicc; import android.tedongle.Rlog; import com.android.internal.tedongle.CommandsInterface; /** * {@hide} * This class should be used to access files in CSIM ADF */ public final class CsimFileHandler extends IccFileHandler implements IccConstants { static final String LOG_TAG = "3GD-CsimFH"; public CsimFileHandler(UiccCardApplication app, String aid, CommandsInterface ci) { super(app, aid, ci); } @Override protected String getEFPath(int efid) { switch(efid) { case EF_SMS: case EF_CST: case EF_FDN: case EF_MSISDN: case EF_RUIM_SPN: case EF_CSIM_LI: case EF_CSIM_MDN: case EF_CSIM_IMSIM: case EF_CSIM_CDMAHOME: case EF_CSIM_EPRL: return MF_SIM + DF_ADF; } String path = getCommonIccEFPath(efid); if (path == null) { // The EFids in UICC phone book entries are decided by the card manufacturer. // So if we don't match any of the cases above and if its a UICC return // the global 3g phone book path. return MF_SIM + DF_TELECOM + DF_PHONEBOOK; } return path; } @Override protected void logd(String msg) { Rlog.d(LOG_TAG, msg); } @Override protected void loge(String msg) { Rlog.e(LOG_TAG, msg); } }
[ "zhangjinqiang@huaqin.com" ]
zhangjinqiang@huaqin.com
a096210605ee2e7c626af2c00fbb1e9c0cdd1478
8292fd682fa21d3b98a829742c5e004f895b2867
/src/test/java/down/social/security/jwt/TokenProviderTest.java
afcb955c2236e865fa3efa7b1829f27a6d837823
[]
no_license
gustavocaraciolo/down-social
a0576ae6fd4c82e55089d44c9100d1c4121ab57a
b33b210460195a8a52904a8b0fb070f160f964ed
refs/heads/master
2023-01-08T05:13:00.253406
2020-11-06T15:56:33
2020-11-06T15:56:33
310,641,291
0
0
null
null
null
null
UTF-8
Java
false
false
3,864
java
package down.social.security.jwt; import static org.assertj.core.api.Assertions.assertThat; import down.social.security.AuthoritiesConstants; import io.github.jhipster.config.JHipsterProperties; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.io.Decoders; import io.jsonwebtoken.security.Keys; import java.security.Key; import java.util.*; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.test.util.ReflectionTestUtils; public class TokenProviderTest { private static final long ONE_MINUTE = 60000; private Key key; private TokenProvider tokenProvider; @BeforeEach public void setup() { tokenProvider = new TokenProvider(new JHipsterProperties()); key = Keys.hmacShaKeyFor( Decoders.BASE64.decode("fd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8") ); ReflectionTestUtils.setField(tokenProvider, "key", key); ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", ONE_MINUTE); } @Test public void testReturnFalseWhenJWThasInvalidSignature() { boolean isTokenValid = tokenProvider.validateToken(createTokenWithDifferentSignature()); assertThat(isTokenValid).isEqualTo(false); } @Test public void testReturnFalseWhenJWTisMalformed() { Authentication authentication = createAuthentication(); String token = tokenProvider.createToken(authentication, false); String invalidToken = token.substring(1); boolean isTokenValid = tokenProvider.validateToken(invalidToken); assertThat(isTokenValid).isEqualTo(false); } @Test public void testReturnFalseWhenJWTisExpired() { ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", -ONE_MINUTE); Authentication authentication = createAuthentication(); String token = tokenProvider.createToken(authentication, false); boolean isTokenValid = tokenProvider.validateToken(token); assertThat(isTokenValid).isEqualTo(false); } @Test public void testReturnFalseWhenJWTisUnsupported() { String unsupportedToken = createUnsupportedToken(); boolean isTokenValid = tokenProvider.validateToken(unsupportedToken); assertThat(isTokenValid).isEqualTo(false); } @Test public void testReturnFalseWhenJWTisInvalid() { boolean isTokenValid = tokenProvider.validateToken(""); assertThat(isTokenValid).isEqualTo(false); } private Authentication createAuthentication() { Collection<GrantedAuthority> authorities = new ArrayList<>(); authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS)); return new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities); } private String createUnsupportedToken() { return Jwts.builder().setPayload("payload").signWith(key, SignatureAlgorithm.HS512).compact(); } private String createTokenWithDifferentSignature() { Key otherKey = Keys.hmacShaKeyFor( Decoders.BASE64.decode("Xfd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8") ); return Jwts .builder() .setSubject("anonymous") .signWith(otherKey, SignatureAlgorithm.HS512) .setExpiration(new Date(new Date().getTime() + ONE_MINUTE)) .compact(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c20faaf31eba0b2a3d41653347b9ef5c9804b864
02e6c59b3976492b25980c5d3cecae4bb3c0baf8
/app/src/main/java/com/lh/stepcounter/utils/DateUtils.java
250a22c788da9969a739e89e0300d220210f77a4
[]
no_license
lh123/stepcounter
819559ec971b2a7fcd5570912ce53dcc77a972a7
0fca8260a4576bc5bcedecc9e80e139d21340dfd
refs/heads/master
2021-05-02T01:26:27.039721
2017-01-15T10:50:56
2017-01-15T10:50:56
79,025,189
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.lh.stepcounter.utils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; /** * Created by home on 2017/1/15. * 日期工具 */ public class DateUtils { public static Date str2Date(String str){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); try { return simpleDateFormat.parse(str); } catch (ParseException e) { e.printStackTrace(); } return null; } public static String date2Str(Date date){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); return simpleDateFormat.format(date); } }
[ "1585086582@qq.com" ]
1585086582@qq.com
dbfe0bf92da7b53bf8a01345943ddb7c32a854cd
41f48e8c39470d9857276b1b9ff4e278f6e11dff
/justinmobile/tsm/src/test/java/com/justinmobile/tsm/card/utils/CardInfoUtils.java
f97c6dbe3a0ab08dc649cac9150ae1b520bca020
[]
no_license
dbabox/eastseven
542ebe919d4c1711ea0feca376a2c5f7699945cc
bfab0858f368e5dd02596641f888409fe27440b5
refs/heads/master
2021-01-10T11:54:43.753589
2012-07-09T10:19:08
2012-07-09T10:19:08
43,064,877
2
2
null
null
null
null
UTF-8
Java
false
false
487
java
package com.justinmobile.tsm.card.utils; import org.apache.commons.lang.RandomStringUtils; import com.justinmobile.tsm.card.domain.CardInfo; public class CardInfoUtils { /** * 创建对象用于测试 * * @return 除以下字段外,都null<br/> * ardNo:8位随机数字字符<br/> */ public static CardInfo createDefult() { CardInfo card = new CardInfo(); card.setCardNo(RandomStringUtils.randomAlphanumeric(8)); return card; } }
[ "eastseven.dongq@gmail.com" ]
eastseven.dongq@gmail.com
7d4793062f18bc7b78dbc4409d407acca69a93d7
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/1/org/jfree/data/time/DynamicTimeSeriesCollection_getNewestTime_715.java
2e6b2483b390b548cee7ea8287c699f89bb02c8f
[]
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
1,610
java
org jfree data time dynam dataset fast time seri collect fasttimeseriescollect function replac free chart' jfreechart' time seri collect timeseriescollect time seri timeseri class fast time seri collect fasttimeseriescollect fix time rang real time applic subclass add abil append data discard oldest arrai fast time seri collect fasttimeseriescollect fifo' note present data assum assumpt embodi method rang info rangeinfo dynam time seri collect dynamictimeseriescollect abstract interv dataset abstractintervalxydataset return newest time newest time regular time period regulartimeperiod newest time getnewesttim point time pointsintim newest newestat
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ecc5368ca61015457825cfd6ae5cfc70fb863dd6
cb0be690a0afcaf5f7d58727535442c41de60a2d
/src/main/java/me/fromgate/obscura/CORenderer.java
5a115e30fce239a7d66a89f4c9522df52c588069
[]
no_license
fromgate/CameraObscura
fcbefabcb4c60236382851c830d2e763934ab496
605d0f9d9be821fc0cefc03f03023fb33cc8f489
refs/heads/master
2021-01-13T01:57:44.487633
2017-07-02T16:15:39
2017-07-02T16:15:39
7,210,153
2
3
null
2018-08-20T01:52:45
2012-12-17T18:47:16
Java
UTF-8
Java
false
false
2,075
java
/* * CameraObscura, Minecraft bukkit plugin * (c)2012, fromgate, fromgate@gmail.com * http://dev.bukkit.org/server-mods/camera-obscura/ * * This file is part of NoobProtector. * * CameraObscura is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * CameraObscura is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with CameraObscura. If not, see <http://www.gnorg/licenses/>. * */ package me.fromgate.obscura; import org.bukkit.entity.Player; import org.bukkit.map.MapCanvas; import org.bukkit.map.MapRenderer; import org.bukkit.map.MapView; import java.awt.*; import java.awt.image.BufferedImage; @SuppressWarnings("deprecation") public class CORenderer extends MapRenderer { Obscura plg; BufferedImage img; public CORenderer(Obscura plg, final BufferedImage img) { super(false); this.plg = plg; this.img = img; } @Override public void render(MapView map, MapCanvas canvas, Player p) { if (RenderHistory.isRendered(p, map.getId())) return; for (int j = 0; j < 128; j++) for (int i = 0; i < 128; i++) canvas.setPixel(i, j, (byte) 0); if (this.img != null) { short id = map.getId(); if ((Album.isNameShown(id))) canvas.drawImage(0, 0, ImageCraft.writeTextOnImage(img, plg.nameX, plg.nameY, plg.fontName, plg.fontSize, plg.nameColor, plg.stroke, plg.strokeColor, Album.getPictureName(id))); else canvas.drawImage(0, 0, img); } p.sendMap(map); } public BufferedImage getImage() { return this.img; } }
[ "fromgate@gmail.com" ]
fromgate@gmail.com
63c590d7d5185ba90f98b7a7afd82deee6bae408
6985640dfdd3302e9f0255d2c80f87c6e84e11c1
/xxl-job/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobRegistryMonitorHelper.java
463db77c6561ac45be489e7dd2b84d8279ba6874
[ "GPL-1.0-or-later", "GPL-3.0-only", "Apache-2.0" ]
permissive
xiangwbs/springboot
d1273ddd5c061cee5f1dc0389720dacdf8b78de4
083104bca216fe44c62f149df178d440f82887e9
refs/heads/master
2023-09-04T22:36:30.591182
2023-09-04T06:08:30
2023-09-04T06:08:30
243,702,670
2
3
Apache-2.0
2023-08-25T06:43:27
2020-02-28T07:22:47
Java
UTF-8
Java
false
false
3,692
java
package com.xxl.job.admin.core.thread; import com.xxl.job.admin.core.conf.XxlJobAdminConfig; import com.xxl.job.admin.core.model.XxlJobGroup; import com.xxl.job.admin.core.model.XxlJobRegistry; import com.xxl.job.core.enums.RegistryConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.concurrent.TimeUnit; /** * job registry instance * @author xuxueli 2016-10-02 19:10:24 */ public class JobRegistryMonitorHelper { private static Logger logger = LoggerFactory.getLogger(JobRegistryMonitorHelper.class); private static JobRegistryMonitorHelper instance = new JobRegistryMonitorHelper(); public static JobRegistryMonitorHelper getInstance(){ return instance; } private Thread registryThread; private volatile boolean toStop = false; public void start(){ registryThread = new Thread(new Runnable() { @Override public void run() { while (!toStop) { try { // auto registry group List<XxlJobGroup> groupList = XxlJobAdminConfig.getAdminConfig().getXxlJobGroupDao().findByAddressType(0); if (groupList!=null && !groupList.isEmpty()) { // remove dead address (admin/executor) XxlJobAdminConfig.getAdminConfig().getXxlJobRegistryDao().removeDead(RegistryConfig.DEAD_TIMEOUT); // fresh online address (admin/executor) HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>(); List<XxlJobRegistry> list = XxlJobAdminConfig.getAdminConfig().getXxlJobRegistryDao().findAll(RegistryConfig.DEAD_TIMEOUT); if (list != null) { for (XxlJobRegistry item: list) { if (RegistryConfig.RegistType.EXECUTOR.name().equals(item.getRegistryGroup())) { String appName = item.getRegistryKey(); List<String> registryList = appAddressMap.get(appName); if (registryList == null) { registryList = new ArrayList<String>(); } if (!registryList.contains(item.getRegistryValue())) { registryList.add(item.getRegistryValue()); } appAddressMap.put(appName, registryList); } } } // fresh group address for (XxlJobGroup group: groupList) { List<String> registryList = appAddressMap.get(group.getAppName()); String addressListStr = null; if (registryList!=null && !registryList.isEmpty()) { Collections.sort(registryList); addressListStr = ""; for (String item:registryList) { addressListStr += item + ","; } addressListStr = addressListStr.substring(0, addressListStr.length()-1); } group.setAddressList(addressListStr); XxlJobAdminConfig.getAdminConfig().getXxlJobGroupDao().update(group); } } } catch (Exception e) { if (!toStop) { logger.error(">>>>>>>>>>> xxl-job, job registry monitor thread error:{}", e); } } try { TimeUnit.SECONDS.sleep(RegistryConfig.BEAT_TIMEOUT); } catch (InterruptedException e) { if (!toStop) { logger.error(">>>>>>>>>>> xxl-job, job registry monitor thread error:{}", e); } } } logger.info(">>>>>>>>>>> xxl-job, job registry monitor thread stop"); } }); registryThread.setDaemon(true); registryThread.setName("xxl-job, admin JobRegistryMonitorHelper"); registryThread.start(); } public void toStop(){ toStop = true; // interrupt and wait registryThread.interrupt(); try { registryThread.join(); } catch (InterruptedException e) { logger.error(e.getMessage(), e); } } }
[ "xiangwbs@163.com" ]
xiangwbs@163.com
36b26c3e767acb8e8d0f60a026d2aa793bead12c
cba543b732a9a5ad73ddb2e9b20125159f0e1b2e
/sikuli_StuffContainer/might-be-obsolete/SikuliActionManager.java
2dc67707375de295f6eee1b57150ecf312beaed9
[]
no_license
wsh231314/IntelligentOperation
e6266e1ae79fe93f132d8900ee484a4db0da3b24
a12aca5c5c67e6a2dddcd2d8420ca8a64af476f2
refs/heads/master
2020-04-05T13:31:55.376669
2017-07-28T05:59:05
2017-07-28T05:59:05
94,863,918
1
2
null
2017-07-27T02:44:17
2017-06-20T07:45:10
Java
UTF-8
Java
false
false
2,545
java
/* * Copyright 2010-2016, Sikuli.org, sikulix.com * Released under the MIT License. * * modified RaiMan 2013 */ package org.sikuli.script; import java.util.ArrayList; // The *source* field is the Region object that has invoked an action. // // If the target is a Pattern or a String object, the *match* field will be set // to be the last match of the region class, the *screenImage* field will be set to be // the captured screen image that was given to the vision engine to discover the match. // // TODO: // If the target is a Region, a Match, or a Location object, the *match* field will be set // to NULL, because the target location is explicitly specified in this case and no // visual matching is performed to find a match. The *screenImage* // will be the screen image captured right before the action (e.g., click) was performed. // public class SikuliActionManager { static SikuliActionManager _instance; public static SikuliActionManager getInstance(){ if (_instance == null){ _instance = new SikuliActionManager(); } return _instance; } public synchronized <PSRML> void clickTarget(Region source, PSRML target, ScreenImage screenImage, Match match){ notifyListeners(new SikuliAction(SikuliAction.ActionType.CLICK, source, target, screenImage, match)); } public synchronized <PSRML> void doubleClickTarget(Region source, PSRML target, ScreenImage screenImage, Match match){ notifyListeners(new SikuliAction(SikuliAction.ActionType.DOUBLE_CLICK, source, target, screenImage, match)); } public synchronized <PSRML> void rightClickTarget(Region source, PSRML target, ScreenImage screenImage, Match match){ notifyListeners(new SikuliAction(SikuliAction.ActionType.RIGHT_CLICK, source, target, screenImage, match)); } ArrayList<SikuliActionListener> _listeners; SikuliActionManager(){ _listeners = new ArrayList<SikuliActionListener>(); } public synchronized void addListener(SikuliActionListener l ) { _listeners.add(l); } public synchronized void removeListener(SikuliActionListener l ) { _listeners.remove(l); } private synchronized void notifyListeners(SikuliAction action) { for (SikuliActionListener listener : _listeners){ if (action.getType() == SikuliAction.ActionType.CLICK){ listener.targetClicked(action); }else if (action.getType() == SikuliAction.ActionType.DOUBLE_CLICK){ listener.targetDoubleClicked(action); } } } }
[ "hjpq0@163.com" ]
hjpq0@163.com
64986ea6769036d746ee5d5086edf4c8d55e89b7
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/java-inflector/generated/src/gen/java/org/openapitools/model/ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo.java
77edefcc8f152c04314e3577f821ca431b0b720f
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
4,162
java
package org.openapitools.model; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplProperties; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", date = "2019-08-05T00:53:46.291Z[GMT]") public class ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo { @JsonProperty("pid") private String pid = null; @JsonProperty("title") private String title = null; @JsonProperty("description") private String description = null; @JsonProperty("properties") private ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplProperties properties = null; /** **/ public ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo pid(String pid) { this.pid = pid; return this; } @ApiModelProperty(value = "") @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } /** **/ public ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo title(String title) { this.title = title; return this; } @ApiModelProperty(value = "") @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } /** **/ public ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo description(String description) { this.description = description; return this; } @ApiModelProperty(value = "") @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ public ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo properties(ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplProperties properties) { this.properties = properties; return this; } @ApiModelProperty(value = "") @JsonProperty("properties") public ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplProperties getProperties() { return properties; } public void setProperties(ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplProperties properties) { this.properties = properties; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo comAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo = (ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo) o; return Objects.equals(pid, comAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo.pid) && Objects.equals(title, comAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo.title) && Objects.equals(description, comAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo.description) && Objects.equals(properties, comAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo.properties); } @Override public int hashCode() { return Objects.hash(pid, title, description, properties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeCqSocialUgcbaseDispatcherImplFlushServiceImplInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
c462330f6c153f20413f9454e1e4015aab509b4b
4db7adc9e40799ffd97ed78159997d31e8e8fbdd
/src/org/openup/aduana/dua/dto/ArrayOfWSDUASDTITEM.java
d03fbe5124c9db2b7b04d122ea4bdbdc5d64119a
[]
no_license
gvilauy/vsnAdu
7f34411163dad7aff59fbdebd35f584d257eb791
11107320c903bb3e62a4413e72aed5c2c11a1b8a
refs/heads/master
2020-12-30T22:12:17.847734
2016-05-26T19:58:22
2016-05-26T19:58:22
59,778,086
1
0
null
null
null
null
UTF-8
Java
false
false
2,290
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.03.02 at 06:10:13 PM UYST // package org.openup.aduana.dua.dto; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ArrayOfWSDUASDT.ITEM complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ArrayOfWSDUASDT.ITEM"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="WSDUASDT.ITEM" type="{www.aduanas.gub.uy/wsduasdt}WSDUASDT.ITEM" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ArrayOfWSDUASDT.ITEM", propOrder = { "wsduasdtitem" }) public class ArrayOfWSDUASDTITEM { @XmlElement(name = "WSDUASDT.ITEM") protected List<WSDUASDTITEM> wsduasdtitem; /** * Gets the value of the wsduasdtitem property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the wsduasdtitem property. * * <p> * For example, to add a new item, do as follows: * <pre> * getWSDUASDTITEM().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link WSDUASDTITEM } * * */ public List<WSDUASDTITEM> getWSDUASDTITEM() { if (wsduasdtitem == null) { wsduasdtitem = new ArrayList<WSDUASDTITEM>(); } return this.wsduasdtitem; } }
[ "gabrielvila13@gmail.com" ]
gabrielvila13@gmail.com
18b6de842f9c8dca7035d08b2f2bcd0e946fa2d3
30aeaad268c91b5ce97a3a0a7a4def8d33651732
/src/com/anurag/refelectionAPI/RefelectionConcept7.java
3d47565a879de7791c9ec2415a310c053ab04b0e
[]
no_license
AnuragGit/CoreJavaProjects
317d3b6687ec5858e18bdfd483ac5ffd093c52a2
ee21fad2c9306fafbf3ce88e2b501958acb2ca98
refs/heads/master
2021-01-17T09:11:25.773721
2016-05-29T07:47:10
2016-05-29T07:47:10
22,305,528
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.anurag.refelectionAPI; /** * @author Anurag * This program is showing the concept of getDeclaredField() method available on "Class" * class. And here we can get only declared specify field on present class only. * * //Get specific the Declared field //getDeclaredField(); */ import java.lang.reflect.Field; class D { public int a,b,c; int x,y,z; public float f; } public class RefelectionConcept7 extends D { public int p,q,r; int s; public static void main(String[] args) throws Exception { RefelectionConcept7 m = new RefelectionConcept7(); Class c =m.getClass(); Field x=c.getDeclaredField("s");// return all the public field include inherited onces. System.out.println("The field is:"+x.getName()); } } /*Output:- The field is:s */
[ "test@test.com" ]
test@test.com
cc1151c72dcf4460507ae9c1a5137f68f5040261
8e79aa672a29037deffc267137e194cbaf5eb381
/app/src/main/java/com/hospital/fragment/Order_zi_Fragment_2.java
72a8b537ca00b1ad9507ea86eaa3d7bcb77ff861
[]
no_license
xiaofeifei321/clinic_app
3c35d36eeef8350742a89079f7c9f7754dc7d918
9637afdb4b2bf8903fcdcb01d8df8794153ff808
refs/heads/master
2020-04-24T23:29:11.570459
2019-02-24T14:15:41
2019-02-24T14:15:41
172,346,012
0
0
null
null
null
null
UTF-8
Java
false
false
3,306
java
package com.hospital.fragment; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.AlertDialog; import android.app.Fragment; import android.app.AlertDialog.Builder; import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.BaseAdapter; import android.widget.ListView; import android.widget.TextView; import com.hospital.db.HttpUtil; import com.hospital.util.Office; import com.hospital.yuyue.R; public class Order_zi_Fragment_2 extends Fragment{ private List<Office> list=new ArrayList<Office>(); private ListView listView; private SharedPreferences spf; private int uid; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.order_zi_fragment2, null); listView=(ListView) view.findViewById(R.id.yifk); get(); return view; } private void get() { new Thread() { public void run() { try { Map<String, Object> map = new HashMap<String, Object>(); spf =getActivity().getSharedPreferences("getuid",0); uid=spf.getInt("uid",0); map.put("uid",uid); String string = HttpUtil.doPost(HttpUtil.path + "GetAllYifk", map); JSONArray array = new JSONArray(string); for (int i = 0; i < array.length(); i++) { JSONObject object = array.getJSONObject(i); Office office = new Office(); office.setContent(object.getString("content")); office.setDocname(object.getString("docname")); office.setNeed(object.getInt("need")); office.setOid(object.getInt("oid")); office.setOname(object.getString("oname")); office.setPhone(object.getString("phone")); list.add(office); } handler.sendEmptyMessage(0x123); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } }; }.start(); } private Handler handler = new Handler() { public void handleMessage(android.os.Message msg) { if (msg.what == 0x123) { myadapter adapter=new myadapter(); listView.setAdapter(adapter); } }; }; private class myadapter extends BaseAdapter { @Override public int getCount() { return list.size(); } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { View view = LayoutInflater.from(getActivity()).inflate( R.layout.keshi_listview_item, null); TextView oname = (TextView) view.findViewById(R.id.oname); TextView docname = (TextView) view.findViewById(R.id.docname); TextView phone = (TextView) view.findViewById(R.id.phone); oname.setText(list.get(position).getOname()); docname.setText(list.get(position).getDocname()); phone.setText(list.get(position).getPhone()); return view; } } }
[ "874189630@qq.com" ]
874189630@qq.com
82376dfad8518f6f541b6635992669283b69f989
7b82d70ba5fef677d83879dfeab859d17f4809aa
/f/activemq-demo/src/main/java/com/lntea/activemq/Receiver.java
a582343d0c2b6ff63263e005d89508ad5357a6de
[]
no_license
apollowesley/jun_test
fb962a28b6384c4097c7a8087a53878188db2ebc
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
refs/heads/main
2022-12-30T20:47:36.637165
2020-10-13T18:10:46
2020-10-13T18:10:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,995
java
package com.lntea.activemq; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; import javax.jms.TextMessage; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; public class Receiver { public static void main(String[] args) { //���ӹ�������������JMS ConnectionFactory connectionFactory; //JMS�ͻ��˵�JMS Provider������ Connection connection = null; //Session ���ͻ������Ϣ���߳� Session session; //��ϢĿ�ĵ� Destination destination; //��Ϣ������ MessageConsumer consumer; //ʹ��activemq����connectionFactory connectionFactory = new ActiveMQConnectionFactory( ActiveMQConnection.DEFAULT_USER, ActiveMQConnection.DEFAULT_PASSWORD, "tcp://localhost:61616"); try { //�������� connection = connectionFactory.createConnection(); //���� connection.start(); //��ò������� session = connection.createSession(Boolean.TRUE, Session.AUTO_ACKNOWLEDGE); //��ȡ��ϢĿ�ĵ� destination = session.createQueue("FirstQueue"); //�õ���Ϣ����� consumer = session.createConsumer(destination); while(true){ //���ý����߽�����Ϣ��ʱ�� TextMessage message = (TextMessage) consumer.receive(100000L); if(null!=message){ System.out.println("�յ���Ϣ��"+message.getText()); }else{ break; } } } catch (JMSException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ try { if(null != connection){ connection.close(); } } catch (Exception e2) { // TODO: handle exception } } } }
[ "wujun728@hotmail.com" ]
wujun728@hotmail.com
814aec2d544c13cb175d40cdbb45ce14ca306091
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/kotlin/reflect/jvm/internal/impl/resolve/scopes/StaticScopeForKotlinEnum.java
ba2dfd5ea9ecee6c947b907ff0c3cb89fba8e376
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
3,730
java
package kotlin.reflect.jvm.internal.impl.resolve.scopes; import java.util.ArrayList; import java.util.Collection; import java.util.List; import kotlin._Assertions; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; import kotlin.jvm.internal.PropertyReference1Impl; import kotlin.jvm.internal.Reflection; import kotlin.reflect.KProperty; import kotlin.reflect.jvm.internal.impl.descriptors.ClassDescriptor; import kotlin.reflect.jvm.internal.impl.descriptors.ClassKind; import kotlin.reflect.jvm.internal.impl.descriptors.SimpleFunctionDescriptor; import kotlin.reflect.jvm.internal.impl.incremental.components.LookupLocation; import kotlin.reflect.jvm.internal.impl.name.Name; import kotlin.reflect.jvm.internal.impl.storage.NotNullLazyValue; import kotlin.reflect.jvm.internal.impl.storage.StorageKt; import kotlin.reflect.jvm.internal.impl.storage.StorageManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /* compiled from: StaticScopeForKotlinEnum.kt */ public final class StaticScopeForKotlinEnum extends MemberScopeImpl { static final /* synthetic */ KProperty[] $$delegatedProperties = {Reflection.property1(new PropertyReference1Impl(Reflection.getOrCreateKotlinClass(StaticScopeForKotlinEnum.class), "functions", "getFunctions()Ljava/util/List;"))}; /* access modifiers changed from: private */ public final ClassDescriptor containingClass; private final NotNullLazyValue functions$delegate; private final List<SimpleFunctionDescriptor> getFunctions() { return (List) StorageKt.getValue(this.functions$delegate, (Object) this, $$delegatedProperties[0]); } @Nullable public Void getContributedClassifier(@NotNull Name name, @NotNull LookupLocation lookupLocation) { Intrinsics.checkParameterIsNotNull(name, "name"); Intrinsics.checkParameterIsNotNull(lookupLocation, "location"); return null; } public StaticScopeForKotlinEnum(@NotNull StorageManager storageManager, @NotNull ClassDescriptor classDescriptor) { Intrinsics.checkParameterIsNotNull(storageManager, "storageManager"); Intrinsics.checkParameterIsNotNull(classDescriptor, "containingClass"); this.containingClass = classDescriptor; boolean z = this.containingClass.getKind() == ClassKind.ENUM_CLASS; if (!_Assertions.ENABLED || z) { this.functions$delegate = storageManager.createLazyValue(new StaticScopeForKotlinEnum$functions$2(this)); return; } StringBuilder sb = new StringBuilder(); sb.append("Class should be an enum: "); sb.append(this.containingClass); throw new AssertionError(sb.toString()); } @NotNull public List<SimpleFunctionDescriptor> getContributedDescriptors(@NotNull DescriptorKindFilter descriptorKindFilter, @NotNull Function1<? super Name, Boolean> function1) { Intrinsics.checkParameterIsNotNull(descriptorKindFilter, "kindFilter"); Intrinsics.checkParameterIsNotNull(function1, "nameFilter"); return getFunctions(); } @NotNull public ArrayList<SimpleFunctionDescriptor> getContributedFunctions(@NotNull Name name, @NotNull LookupLocation lookupLocation) { Intrinsics.checkParameterIsNotNull(name, "name"); Intrinsics.checkParameterIsNotNull(lookupLocation, "location"); Iterable functions = getFunctions(); Collection arrayList = new ArrayList(1); for (Object next : functions) { if (Intrinsics.areEqual((Object) ((SimpleFunctionDescriptor) next).getName(), (Object) name)) { arrayList.add(next); } } return (ArrayList) arrayList; } }
[ "anon@ymous.email" ]
anon@ymous.email
3720f65452705b145e9ba6a59998c48bb0f4af80
13200e547eec0d67ff9da9204c72ab26a93f393d
/src/com/android/launcher3/DefaultLayoutParser$AppShortcutWithUriParser.java
406df2be3c6bd800aa143821e85dd590a07939b0
[]
no_license
emtee40/DecompiledPixelLauncher
d72d107eaafb42896aa903b9f0f34f5f09f5a15c
fb954b108a7bf3377da5c28fd9a2f22e1b6990ea
refs/heads/master
2020-04-03T03:18:06.239632
2018-01-19T08:49:36
2018-01-19T08:49:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,301
java
// // Decompiled by Procyon v0.5.30 // package com.android.launcher3; import java.net.URISyntaxException; import android.content.Intent; import android.text.TextUtils; import android.content.res.XmlResourceParser; import android.content.pm.ApplicationInfo; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager$NameNotFoundException; import android.util.Log; import android.content.pm.ResolveInfo; import java.util.List; public class DefaultLayoutParser$AppShortcutWithUriParser extends AutoInstallsLayout$AppShortcutParser { final /* synthetic */ DefaultLayoutParser this$0; public DefaultLayoutParser$AppShortcutWithUriParser(final DefaultLayoutParser this$0) { this.this$0 = this$0; super(this$0); } private ResolveInfo getSingleSystemActivity(final List list) { final int size = list.size(); int i = 0; ResolveInfo resolveInfo = null; Label_0131: while (i < size) { while (true) { while (true) { Label_0134: { try { final DefaultLayoutParser this$0 = this.this$0; try { final PackageManager mPackageManager = this$0.mPackageManager; final ResolveInfo value = list.get(i); try { final ResolveInfo resolveInfo2 = value; try { final ActivityInfo activityInfo = resolveInfo2.activityInfo; try { final ApplicationInfo applicationInfo = mPackageManager.getApplicationInfo(activityInfo.packageName, 0); try { if ((applicationInfo.flags & 0x1) == 0x0) { break Label_0134; } if (resolveInfo != null) { return null; } final ResolveInfo value2 = list.get(i); try { final ResolveInfo resolveInfo3 = value2; ++i; resolveInfo = resolveInfo3; } catch (PackageManager$NameNotFoundException ex) { Log.w("DefaultLayoutParser", "Unable to get info about resolve results", (Throwable)ex); return null; } } catch (PackageManager$NameNotFoundException ex2) {} } catch (PackageManager$NameNotFoundException ex3) {} } catch (PackageManager$NameNotFoundException ex4) {} } catch (PackageManager$NameNotFoundException ex5) {} } catch (PackageManager$NameNotFoundException ex6) {} } catch (PackageManager$NameNotFoundException ex7) {} break Label_0131; } final ResolveInfo resolveInfo3 = resolveInfo; continue; } } } return resolveInfo; } private boolean wouldLaunchResolverActivity(final ResolveInfo resolveInfo, final List list) { for (int i = 0; i < list.size(); ++i) { final ResolveInfo resolveInfo2 = list.get(i); if (resolveInfo2.activityInfo.name.equals(resolveInfo.activityInfo.name) && resolveInfo2.activityInfo.packageName.equals(resolveInfo.activityInfo.packageName)) { return false; } } return true; } protected long invalidPackageOrClass(final XmlResourceParser xmlResourceParser) { final int n = 65536; final long n2 = -1; Object o = AutoInstallsLayout.getAttributeValue(xmlResourceParser, "uri"); if (TextUtils.isEmpty((CharSequence)o)) { Log.e("DefaultLayoutParser", "Skipping invalid <favorite> with no component or uri"); return n2; } final CharSequence charSequence = (CharSequence)o; try { final Intent uri = Intent.parseUri((String)charSequence, 0); o = this.this$0.mPackageManager.resolveActivity(uri, n); final List queryIntentActivities = this.this$0.mPackageManager.queryIntentActivities(uri, n); if (this.wouldLaunchResolverActivity((ResolveInfo)o, queryIntentActivities)) { o = this.getSingleSystemActivity(queryIntentActivities); if (o == null) { Log.w("DefaultLayoutParser", "No preference or single system activity found for " + uri.toString()); return n2; } } } catch (URISyntaxException ex) { Log.e("DefaultLayoutParser", "Unable to add meta-favorite: " + (String)o, (Throwable)ex); return n2; } final ActivityInfo activityInfo = ((ResolveInfo)o).activityInfo; final Intent launchIntentForPackage = this.this$0.mPackageManager.getLaunchIntentForPackage(activityInfo.packageName); if (launchIntentForPackage == null) { return n2; } launchIntentForPackage.setFlags(270532608); return this.this$0.addShortcut(activityInfo.loadLabel(this.this$0.mPackageManager).toString(), launchIntentForPackage, 0); } }
[ "azaidi@live.nl" ]
azaidi@live.nl
edaa37999393bef489c5430b0de33377ee1bc8b0
208ba4a5eb2aadee275926e40c9dd068ad37b1ec
/vertx-ifx/zero-ifx-es/src/main/java/io/vertx/tp/plugin/elasticsearch/AbstractEsClient.java
754e0c1f4bb61973df460133ecada490dcf09369
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
wangdefeng/vertx-zero
263c737efef53abd8e1b8edfbc25fb82f3663042
966958f0849a21ddce5ddbe757b418d3383352a2
refs/heads/master
2022-03-13T16:10:07.525445
2021-08-12T00:49:05
2021-08-12T00:49:05
247,605,052
0
0
Apache-2.0
2020-05-29T06:43:00
2020-03-16T03:48:11
null
UTF-8
Java
false
false
3,011
java
package io.vertx.tp.plugin.elasticsearch; import io.vertx.core.json.JsonArray; import io.vertx.core.json.JsonObject; import io.vertx.up.log.Annal; import io.vertx.up.util.Ut; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.client.RequestOptions; import org.elasticsearch.client.RestHighLevelClient; import java.io.IOException; import java.util.Map; import java.util.TreeMap; import java.util.function.Supplier; /** * @author <a href="http://www.origin-x.cn">Lang</a> */ public abstract class AbstractEsClient { protected final transient ElasticSearchHelper helper = ElasticSearchHelper.helper(this.getClass()); private final transient JsonObject options = new JsonObject(); AbstractEsClient(final JsonObject options) { if (Ut.notNil(options)) { this.options.mergeIn(options.copy()); } } protected RestHighLevelClient client() { // Fix Bug: // -- java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED return this.helper.getClient(this.options); } protected String getString(final String field) { return this.options.getString(field); } protected Annal logger() { return Annal.get(this.getClass()); } protected Boolean doBatch(final JsonArray documents, final String idField, final Supplier<BulkRequest> executor) { if (Ut.isNil(documents)) { /* * No data, not needed */ return true; } else { final RestHighLevelClient client = this.client(); boolean result; try { final BulkRequest request = executor.get(); final BulkResponse bulkResponse = client.bulk(request, RequestOptions.DEFAULT); if (bulkResponse.hasFailures()) { this.logger().warn("Failure found: {0}", bulkResponse.buildFailureMessage()); result = false; } else { this.logger().info("Documents have been indexed ( size = {0} ) successfully!", documents.size()); result = true; } } catch (final IOException ioe) { this.logger().jvm(ioe); result = false; } this.helper.closeClient(client); return result; } } protected Map<String, Object> toDocument(final JsonObject json) { final Map<String, Object> originalMap = json.getMap(); final Map<String, Object> processedMap = new TreeMap<>(); originalMap.forEach((key, value) -> { /* * Exclude JsonObject / JsonArray */ if (!(value instanceof JsonObject || value instanceof JsonArray)) { processedMap.put(key, value); } }); return processedMap; } }
[ "silentbalanceyh@126.com" ]
silentbalanceyh@126.com
86e95e139de3bcde8f8e895edf5156ec65d654ab
af94d146638458db0a2aea7b366d5f38485770c8
/src/test/java/org/datanucleus/ClassLoaderResolverTest.java
e15e43367c551d06b390ee1f63ae5213e6dcd5ae
[ "Apache-2.0" ]
permissive
datanucleus/datanucleus-core
781b12241d1a551e36ca0f5df20d04f64d1e8f42
081c668cdc661b0b9626411b92b8b97242f27b86
refs/heads/master
2023-09-04T03:45:58.216619
2023-09-01T09:32:21
2023-09-01T09:32:21
15,055,689
115
81
null
2023-09-01T09:34:17
2013-12-09T18:40:29
Java
UTF-8
Java
false
false
1,699
java
/********************************************************************** Copyright (c) 2010 Erik Bengtson and others. 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. Contributors: ... **********************************************************************/ package org.datanucleus; import java.io.IOException; import java.util.Enumeration; import junit.framework.TestCase; public class ClassLoaderResolverTest extends TestCase { /** test if getResources is idempotent which could be affected by caching **/ public void testResources1() throws IOException { ClassLoaderResolver clr = new ClassLoaderResolverImpl(); Enumeration urls = clr.getResources("/org/datanucleus/ClassLoaderResolverTest.class", ClassConstants.CLASS_LOADER_RESOLVER.getClassLoader()); assertTrue(urls.hasMoreElements()); urls.nextElement(); assertFalse(urls.hasMoreElements()); urls = clr.getResources("/org/datanucleus/ClassLoaderResolverTest.class", ClassConstants.CLASS_LOADER_RESOLVER.getClassLoader()); assertTrue(urls.hasMoreElements()); urls.nextElement(); assertFalse(urls.hasMoreElements()); } }
[ "andy@datanucleus.org" ]
andy@datanucleus.org
7446c9cf68bd63317edf95ab239b9910b07227c9
8cb667bb78ba520f0da39c36dffd94980dfa7907
/app/src/main/java/com/eaglesakura/andriders/ui/navigation/SensorDeviceSettingActivity.java
467e465755b52903ca27b71abb3f239b3fd2e085
[ "MIT" ]
permissive
eaglesakura/andriders-central-engine-v3
e4ee4c4b52dab36629856f489cf0b594c7ef950b
6600104720f6e98faa9931b2479b03c6c274f167
refs/heads/v3.0.x
2021-01-16T23:32:50.477896
2017-01-07T15:44:41
2017-01-07T15:44:41
51,501,559
1
3
MIT
2018-01-13T13:07:59
2016-02-11T08:05:38
Java
UTF-8
Java
false
false
1,122
java
package com.eaglesakura.andriders.ui.navigation; import com.eaglesakura.andriders.ui.navigation.base.AppNavigationActivity; import com.eaglesakura.andriders.ui.navigation.sensor.SensorDeviceSettingFragmentMain; import com.eaglesakura.android.framework.delegate.activity.ContentHolderActivityDelegate; import android.content.Context; import android.content.Intent; import android.support.annotation.NonNull; import android.support.v4.app.Fragment; /** * センサー・周辺デバイスの設定画面 */ public class SensorDeviceSettingActivity extends AppNavigationActivity { @NonNull @Override public Fragment newDefaultContentFragment(@NonNull ContentHolderActivityDelegate self) { return new SensorDeviceSettingFragmentMain(); } public static class Builder { Intent mIntent; public static Builder from(Context context) { Builder result = new Builder(); result.mIntent = new Intent(context, SensorDeviceSettingActivity.class); return result; } public Intent build() { return mIntent; } } }
[ "eagle.sakura@gmail.com" ]
eagle.sakura@gmail.com
73b425d2ae1467f94323c65664d13a837d26936d
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/mockito/src/buildSrc/src/main/groovy/org/mockito/release/notes/Notes.java
6a29f489b276d2ccdd918d0a06c284ae92b8efb1
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0" ]
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
Java
false
false
889
java
package org.mockito.release.notes; import org.mockito.release.notes.versions.PreviousVersion; import org.mockito.release.notes.versions.Versions; import java.io.File; /** * Release notes services */ public class Notes { /** * Release notes build based on git and GitHub. * * @param workDir working directory for executing external processes like 'git log' * @param authTokenEnvVar env variable name that holds the GitHub auth token */ public static NotesBuilder gitHubNotesBuilder(File workDir, String authTokenEnvVar) { return new GitNotesBuilder(workDir, authTokenEnvVar); } /** * Provides previous version information based on the release notes content file */ public static PreviousVersion previousVersion(String releaseNotesContent) { return Versions.previousFromNotesContent(releaseNotesContent); } }
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
44dd88e1556ae2bf48edef1879fcbf10b1a9d2a1
83110fbb179713c411ddf301c90ef4b814285846
/src/VmWwnChangedEvent.java
7284f09696c9dd9617df267223f8ed892033a393
[]
no_license
mikelopez/jvm
f10590edf42b498f2d81dec71b0fee120e381c9a
36a960897062224eabd0c18a1434f7c8961ee81c
refs/heads/master
2021-01-19T05:36:54.710665
2013-06-09T04:36:41
2013-06-09T04:36:41
3,783,647
2
0
null
null
null
null
UTF-8
Java
false
false
5,127
java
package com.vmware.vim25; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for VmWwnChangedEvent complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="VmWwnChangedEvent"> * &lt;complexContent> * &lt;extension base="{urn:vim25}VmEvent"> * &lt;sequence> * &lt;element name="oldNodeWwns" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="oldPortWwns" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="newNodeWwns" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="newPortWwns" type="{http://www.w3.org/2001/XMLSchema}long" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "VmWwnChangedEvent", propOrder = { "oldNodeWwns", "oldPortWwns", "newNodeWwns", "newPortWwns" }) public class VmWwnChangedEvent extends VmEvent { @XmlElement(type = Long.class) protected List<Long> oldNodeWwns; @XmlElement(type = Long.class) protected List<Long> oldPortWwns; @XmlElement(type = Long.class) protected List<Long> newNodeWwns; @XmlElement(type = Long.class) protected List<Long> newPortWwns; /** * Gets the value of the oldNodeWwns property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the oldNodeWwns property. * * <p> * For example, to add a new item, do as follows: * <pre> * getOldNodeWwns().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Long } * * */ public List<Long> getOldNodeWwns() { if (oldNodeWwns == null) { oldNodeWwns = new ArrayList<Long>(); } return this.oldNodeWwns; } /** * Gets the value of the oldPortWwns property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the oldPortWwns property. * * <p> * For example, to add a new item, do as follows: * <pre> * getOldPortWwns().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Long } * * */ public List<Long> getOldPortWwns() { if (oldPortWwns == null) { oldPortWwns = new ArrayList<Long>(); } return this.oldPortWwns; } /** * Gets the value of the newNodeWwns property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the newNodeWwns property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNewNodeWwns().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Long } * * */ public List<Long> getNewNodeWwns() { if (newNodeWwns == null) { newNodeWwns = new ArrayList<Long>(); } return this.newNodeWwns; } /** * Gets the value of the newPortWwns property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the newPortWwns property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNewPortWwns().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Long } * * */ public List<Long> getNewPortWwns() { if (newPortWwns == null) { newPortWwns = new ArrayList<Long>(); } return this.newPortWwns; } }
[ "dev@scidentify.info" ]
dev@scidentify.info
ac40c1fb20ed58809ced03d0dd142fe88e3f8888
679fee84558e55b5521bf48abbf2047d4996f745
/study/src/main/java/com/study/day18/SmallDog.java
44b6f9ed11c0f0e9e25a5e03af7006254a7a154e
[]
no_license
vincenttuan/Java20210726
aa540f23cac85af7c681469e7bee838dbc6a2f4e
62539b5cb351604eff671c28508a1cdeba213a61
refs/heads/master
2023-07-09T04:11:46.284334
2021-08-12T04:04:06
2021-08-12T04:04:06
389,519,486
1
0
null
null
null
null
UTF-8
Java
false
false
147
java
package com.study.day18; // 小狗 public class SmallDog extends ADog { @Override public void skill() { System.out.println("玩飛盤"); } }
[ "vincentjava@yahoo.com.tw" ]
vincentjava@yahoo.com.tw
085902d274418ef8e9fb537929597a4b90f07649
ab79201a418edf2d769cacdbc2f9f84a4bb7a839
/src/beginner/SimpleSum_1003.java
8892a4c9dce362cc4b180243b8427ba53a5cee8c
[]
no_license
ramoncgusmao/URI-test
ed3269aec094dcaf3b412ab40a846b62f5112321
2648a6f38ff47244686e24bcd0396d5eeb1dc46e
refs/heads/master
2020-09-24T08:02:14.927575
2019-12-06T02:13:06
2019-12-06T02:13:06
225,709,119
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package beginner; import java.util.Scanner; public class SimpleSum_1003 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); System.out.println("SOMA = " + (a + b)); sc.close(); } }
[ "ramoncgusmao@gmail.com" ]
ramoncgusmao@gmail.com
e8475c2d78eadd7d14cc8730c49632af731d7942
aa336ab2acc65431df5548ac6eafdecb155c4a42
/src/main/java/com/tangkuo/cn/java/concurrency/in/practice/TestBoundedBuffer.java
e54f269c0f76fda4114aeac0b78af94d845323d1
[]
no_license
TANGKUO/onlineManager
ca69559f9219a7f7fc1f38eb14e80d0914e757a9
a67ec3892dcdd40de4d4265afb3f192beaae12cd
refs/heads/master
2022-07-16T16:45:23.787148
2019-09-15T07:23:54
2019-09-15T07:23:54
83,889,537
0
0
null
2022-06-17T03:28:44
2017-03-04T11:46:24
Java
UTF-8
Java
false
false
2,211
java
package com.tangkuo.cn.java.concurrency.in.practice; import junit.framework.TestCase; /** * TestBoundedBuffer * <p/> * Basic unit tests for BoundedBuffer * * @author Brian Goetz and Tim Peierls */ public class TestBoundedBuffer extends TestCase { private static final long LOCKUP_DETECT_TIMEOUT = 1000; private static final int CAPACITY = 10000; private static final int THRESHOLD = 10000; void testIsEmptyWhenConstructed() { SemaphoreBoundedBuffer<Integer> bb = new SemaphoreBoundedBuffer<Integer>(10); assertTrue(bb.isEmpty()); assertFalse(bb.isFull()); } void testIsFullAfterPuts() throws InterruptedException { SemaphoreBoundedBuffer<Integer> bb = new SemaphoreBoundedBuffer<Integer>(10); for (int i = 0; i < 10; i++) bb.put(i); assertTrue(bb.isFull()); assertFalse(bb.isEmpty()); } void testTakeBlocksWhenEmpty() { final SemaphoreBoundedBuffer<Integer> bb = new SemaphoreBoundedBuffer<Integer>(10); Thread taker = new Thread() { public void run() { try { int unused = bb.take(); fail(); // if we get here, it's an error } catch (InterruptedException success) { } } }; try { taker.start(); Thread.sleep(LOCKUP_DETECT_TIMEOUT); taker.interrupt(); taker.join(LOCKUP_DETECT_TIMEOUT); assertFalse(taker.isAlive()); } catch (Exception unexpected) { fail(); } } class Big { double[] data = new double[100000]; } void testLeak() throws InterruptedException { SemaphoreBoundedBuffer<Big> bb = new SemaphoreBoundedBuffer<Big>(CAPACITY); int heapSize1 = snapshotHeap(); for (int i = 0; i < CAPACITY; i++) bb.put(new Big()); for (int i = 0; i < CAPACITY; i++) bb.take(); int heapSize2 = snapshotHeap(); assertTrue(Math.abs(heapSize1 - heapSize2) < THRESHOLD); } private int snapshotHeap() { /* Snapshot heap and return heap size */ return 0; } }
[ "616507752@qq.com" ]
616507752@qq.com
7bddb102821f92290c9b9bc772fefbbc915438e7
2175d6a417843e151d54cda309bff47be0b97da3
/src/main/java/demos/antiSQLInjection/org/boris/expr/function/excel/RTD.java
ab9d82411dea0c4545147d3a3625ceef7460bb45
[]
no_license
sqlparser/gsp_demo_java
6cf93fdf567f40ca1da86e4d9da8d19d25452e55
6e377789c0b36f47013449a65ea293c9495b7dcc
refs/heads/master
2023-08-18T02:02:34.857633
2023-06-08T02:32:26
2023-06-08T02:32:26
206,196,892
108
55
null
2023-04-14T18:30:08
2019-09-04T00:37:05
Java
UTF-8
Java
false
false
359
java
package org.boris.expr.function.excel; import org.boris.expr.Expr; import org.boris.expr.ExprException; import org.boris.expr.IEvaluationContext; import org.boris.expr.function.AbstractFunction; public class RTD extends AbstractFunction { public Expr evaluate(IEvaluationContext context, Expr[] args) throws ExprException { return null; } }
[ "shawn@example.com" ]
shawn@example.com
f12554dbdd5db6e9d91b0aa9247df100169d5c9c
ac82c09fd704b2288cef8342bde6d66f200eeb0d
/projects/OG-Bloomberg/src/main/java/com/opengamma/bbg/model/ReferenceDataRequestMessage.java
fb3f6fdc13d615e9ab0c46f0418eca6c3b128d74
[ "Apache-2.0" ]
permissive
cobaltblueocean/OG-Platform
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
refs/heads/master
2021-08-26T00:44:27.315546
2018-02-23T20:12:08
2018-02-23T20:12:08
241,467,299
0
2
Apache-2.0
2021-08-02T17:20:41
2020-02-18T21:05:35
Java
UTF-8
Java
false
false
7,532
java
// Automatically created - do not modify - CSOFF ///CLOVER:OFF package com.opengamma.bbg.model; import java.util.Set; import java.util.TreeSet; public class ReferenceDataRequestMessage implements java.io.Serializable { public Set<String> getSecurities () { return new TreeSet<String> (getSecurity ()); } public Set<String> getFields () { return new TreeSet<String> (getField ()); } private static final long serialVersionUID = 27268955680917l; private java.util.List<String> _security; public static final String SECURITY_KEY = "security"; private java.util.List<String> _field; public static final String FIELD_KEY = "field"; public ReferenceDataRequestMessage () { } protected ReferenceDataRequestMessage (final org.fudgemsg.mapping.FudgeDeserializer deserializer, final org.fudgemsg.FudgeMsg fudgeMsg) { java.util.List<org.fudgemsg.FudgeField> fudgeFields; fudgeFields = fudgeMsg.getAllByName (SECURITY_KEY); if (fudgeFields.size () > 0) { final java.util.List<String> fudge1; fudge1 = new java.util.ArrayList<String> (fudgeFields.size ()); for (org.fudgemsg.FudgeField fudge2 : fudgeFields) { try { fudge1.add (fudge2.getValue ().toString ()); } catch (IllegalArgumentException e) { throw new IllegalArgumentException ("Fudge message is not a ReferenceDataRequestMessage - field 'security' is not string", e); } } setSecurity (fudge1); } fudgeFields = fudgeMsg.getAllByName (FIELD_KEY); if (fudgeFields.size () > 0) { final java.util.List<String> fudge1; fudge1 = new java.util.ArrayList<String> (fudgeFields.size ()); for (org.fudgemsg.FudgeField fudge2 : fudgeFields) { try { fudge1.add (fudge2.getValue ().toString ()); } catch (IllegalArgumentException e) { throw new IllegalArgumentException ("Fudge message is not a ReferenceDataRequestMessage - field 'field' is not string", e); } } setField (fudge1); } } public ReferenceDataRequestMessage (java.util.Collection<? extends String> security, java.util.Collection<? extends String> field) { if (security == null) _security = null; else { final java.util.List<String> fudge0 = new java.util.ArrayList<String> (security); for (java.util.ListIterator<String> fudge1 = fudge0.listIterator (); fudge1.hasNext (); ) { String fudge2 = fudge1.next (); if (fudge2 == null) throw new NullPointerException ("List element of 'security' cannot be null"); } _security = fudge0; } if (field == null) _field = null; else { final java.util.List<String> fudge0 = new java.util.ArrayList<String> (field); for (java.util.ListIterator<String> fudge1 = fudge0.listIterator (); fudge1.hasNext (); ) { String fudge2 = fudge1.next (); if (fudge2 == null) throw new NullPointerException ("List element of 'field' cannot be null"); } _field = fudge0; } } protected ReferenceDataRequestMessage (final ReferenceDataRequestMessage source) { if (source == null) throw new NullPointerException ("'source' must not be null"); if (source._security == null) _security = null; else { _security = new java.util.ArrayList<String> (source._security); } if (source._field == null) _field = null; else { _field = new java.util.ArrayList<String> (source._field); } } public ReferenceDataRequestMessage clone () { return new ReferenceDataRequestMessage (this); } public org.fudgemsg.FudgeMsg toFudgeMsg (final org.fudgemsg.mapping.FudgeSerializer serializer) { if (serializer == null) throw new NullPointerException ("serializer must not be null"); final org.fudgemsg.MutableFudgeMsg msg = serializer.newMessage (); toFudgeMsg (serializer, msg); return msg; } public void toFudgeMsg (final org.fudgemsg.mapping.FudgeSerializer serializer, final org.fudgemsg.MutableFudgeMsg msg) { if (_security != null) { for (String fudge1 : _security) { msg.add (SECURITY_KEY, null, fudge1); } } if (_field != null) { for (String fudge1 : _field) { msg.add (FIELD_KEY, null, fudge1); } } } public static ReferenceDataRequestMessage fromFudgeMsg (final org.fudgemsg.mapping.FudgeDeserializer deserializer, final org.fudgemsg.FudgeMsg fudgeMsg) { final java.util.List<org.fudgemsg.FudgeField> types = fudgeMsg.getAllByOrdinal (0); for (org.fudgemsg.FudgeField field : types) { final String className = (String)field.getValue (); if ("com.opengamma.bbg.model.ReferenceDataRequestMessage".equals (className)) break; try { return (com.opengamma.bbg.model.ReferenceDataRequestMessage)Class.forName (className).getDeclaredMethod ("fromFudgeMsg", org.fudgemsg.mapping.FudgeDeserializer.class, org.fudgemsg.FudgeMsg.class).invoke (null, deserializer, fudgeMsg); } catch (Throwable t) { // no-action } } return new ReferenceDataRequestMessage (deserializer, fudgeMsg); } public java.util.List<String> getSecurity () { if (_security != null) { return java.util.Collections.unmodifiableList (_security); } else return null; } public void setSecurity (String security) { if (security == null) _security = null; else { _security = new java.util.ArrayList<String> (1); addSecurity (security); } } public void setSecurity (java.util.Collection<? extends String> security) { if (security == null) _security = null; else { final java.util.List<String> fudge0 = new java.util.ArrayList<String> (security); for (java.util.ListIterator<String> fudge1 = fudge0.listIterator (); fudge1.hasNext (); ) { String fudge2 = fudge1.next (); if (fudge2 == null) throw new NullPointerException ("List element of 'security' cannot be null"); } _security = fudge0; } } public void addSecurity (String security) { if (security == null) throw new NullPointerException ("'security' cannot be null"); if (_security == null) _security = new java.util.ArrayList<String> (); _security.add (security); } public java.util.List<String> getField () { if (_field != null) { return java.util.Collections.unmodifiableList (_field); } else return null; } public void setField (String field) { if (field == null) _field = null; else { _field = new java.util.ArrayList<String> (1); addField (field); } } public void setField (java.util.Collection<? extends String> field) { if (field == null) _field = null; else { final java.util.List<String> fudge0 = new java.util.ArrayList<String> (field); for (java.util.ListIterator<String> fudge1 = fudge0.listIterator (); fudge1.hasNext (); ) { String fudge2 = fudge1.next (); if (fudge2 == null) throw new NullPointerException ("List element of 'field' cannot be null"); } _field = fudge0; } } public void addField (String field) { if (field == null) throw new NullPointerException ("'field' cannot be null"); if (_field == null) _field = new java.util.ArrayList<String> (); _field.add (field); } public String toString () { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this, org.apache.commons.lang.builder.ToStringStyle.SHORT_PREFIX_STYLE); } } ///CLOVER:ON - CSON
[ "cobaltblue.ocean@gmail.com" ]
cobaltblue.ocean@gmail.com
13ea65aef05e50e4726e2447f92d4303a93695b4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_4a36621e028c20e44afc42779eee40687d41825a/MetropolizedRandomWalkWalker/2_4a36621e028c20e44afc42779eee40687d41825a_MetropolizedRandomWalkWalker_s.java
3085928d08b4b08d065e97139dd46ac9836f4660
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,262
java
/* =========================================================== * GTNA : Graph-Theoretic Network Analyzer * =========================================================== * * (C) Copyright 2009-2011, by Benjamin Schiller (P2P, TU Darmstadt) * and Contributors * * Project Info: http://www.p2p.tu-darmstadt.de/research/gtna/ * * GTNA is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GTNA is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * --------------------------------------- * RandomWalkWalker.java * --------------------------------------- * (C) Copyright 2009-2011, by Benjamin Schiller (P2P, TU Darmstadt) * and Contributors * * Original Author: Tim; * Contributors: -; * * Changes since 2011-05-17 * --------------------------------------- * */ package gtna.transformation.sampling.walker; import java.util.ArrayList; import java.util.Collection; import java.util.Random; import gtna.graph.Graph; import gtna.graph.Node; import gtna.transformation.sampling.AWalker; /** * @author Tim * */ public class MetropolizedRandomWalkWalker extends AWalker { /** * @param walker */ public MetropolizedRandomWalkWalker() { super("METROPLIZED_RANDOM_WALK_WALKER"); } /* * (non-Javadoc) * * @see * gtna.transformation.sampling.AWalker#selectNextNode(java.util.Collection) */ @Override protected Node selectNextNode(Collection<Node> candidates) { Random r = this.getRNG(); Collection<Node> c = this.getCurrentNodes(); if (c.size() > 0) { Node current = c.toArray(new Node[0])[0]; int next = r.nextInt(candidates.size()); next = next % candidates.size(); Node nextStepCandidate = candidates.toArray(new Node[0])[next]; int nscDegree = nextStepCandidate.getDegree(); int cDegree = current.getDegree(); double d = (double) cDegree / (double) nscDegree; d = Math.min(d, 1); double p = r.nextDouble(); if (d < p) { return nextStepCandidate; // move the walker to the next node } else { System.err.println("Stay, no moving: deg(old)/deg(candidate) - " + cDegree + "/" + nscDegree); return current; // stay and don't move the walker! } } else { c = this.getRestartNodes(); return c.toArray(new Node[0])[0]; } } /** * returns the list of neighbors as candidates * * @param g * Graph * @param n * Current node * @return List of candidates */ @Override public Collection<Node> resolveCandidates(Graph g, Node n) { int[] nids = n.getOutgoingEdges(); ArrayList<Node> nn = new ArrayList<Node>(); for (int i : nids) { nn.add(g.getNode(i)); } return nn; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
53f8c2acc430e94742ca821fead6af81452d7645
9d265892d49e97e98078f7cdba620acd33f69dd9
/gratewall/szjx_portal20161212/src/com/gwssi/application/log/service/LogOSBService.java
7b1cb681c48cb0da397537148dc4bc37998b4990
[]
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
3,109
java
package com.gwssi.application.log.service; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.commons.lang.StringUtils; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMapping; import com.gwssi.application.common.AppConstants; import com.gwssi.optimus.core.common.ConfigManager; import com.gwssi.optimus.core.exception.OptimusException; import com.gwssi.optimus.core.persistence.dao.IPersistenceDAO; import com.gwssi.optimus.core.service.BaseService; import com.gwssi.optimus.core.web.event.OptimusRequest; import com.gwssi.optimus.core.web.event.OptimusResponse; import com.gwssi.optimus.util.StringUtil; @Service(value = "logOsbService") @EnableAsync public class LogOSBService extends BaseService{ /** * 多数据源 * 获取日志库的数据源的key 该数据源在初始化的时候会自动加载 * @return */ private static String getlog_datasourcekey(){ Properties properties = ConfigManager.getProperties("optimus"); String key= properties.getProperty("logDataSource"); return key; } public List queryOsbLog(Map params) throws OptimusException { IPersistenceDAO dao = getPersistenceDAO(getlog_datasourcekey()); List listParam = new ArrayList(); //获取请求系统和目标系统的主键 String serviceCode = StringUtil.getMapStr(params, "serviceCode").trim(); String requestUrl = StringUtil.getMapStr(params, "requestUrl").trim(); String requestMeth= StringUtil.getMapStr(params, "requestMeth").trim(); //编写sql String sql = "select * from OSBLOG where 1=1"; if(StringUtils.isNotEmpty(serviceCode)){ sql+=" and upper(service_code) like ?"; listParam.add("%"+serviceCode.toUpperCase()+"%"); } if(StringUtils.isNotEmpty(requestUrl)){ sql+=" and upper(request_url) like ?"; listParam.add("%"+requestUrl.toUpperCase()+"%"); } if(StringUtils.isNotEmpty(requestMeth)){ sql+=" and upper(request_meth) like ?"; listParam.add("%"+requestMeth.toUpperCase()+"%"); } //封装结果集 return dao.pageQueryForList(sql.toString(), listParam); } public List querygsbServiceCode() throws OptimusException { IPersistenceDAO dao = getPersistenceDAO(); //编写sql语句 String sql = "select t.service_no as value,t.service_name as name from sm_services t "; //封装结果集 List systemList = dao.queryForList(sql, null); return systemList; } public Map queryOSBLogByPK(String pkOsbLog) throws OptimusException { IPersistenceDAO dao = getPersistenceDAO(getlog_datasourcekey()); List listParam = new ArrayList(); String sql = "select * from OSBLOG where 1=1 and pk_osb_log =?"; listParam.add(pkOsbLog); List<Map> list =dao.pageQueryForList(sql.toString(), listParam); if(list!=null &&list.get(0)!=null){ return list.get(0); }else{ return null; } } }
[ "1039288191@qq.com" ]
1039288191@qq.com
83175970c75291ae89fef49f59a79243ad0fded6
75ae440466edf001ab811878619d9abab9e64e3a
/Investigacion/Investigacion-ejb/build/generated-sources/ap-source-output/ec/edu/espe_ctt_investigacion/entity/EvaluacionParDetalle_.java
2d3c23354814842914d71ed9e7fdf5da1b04f710
[]
no_license
developerJhonAlon/ProyectosSociales
deefdbd3a5f512a11439c1cc53d785032d9a8133
70100377499be092460e0578478b9ceefa92464b
refs/heads/master
2020-03-26T03:54:33.641829
2020-03-22T02:20:12
2020-03-22T02:20:12
144,476,444
0
0
null
null
null
null
UTF-8
Java
false
false
1,188
java
package ec.edu.espe_ctt_investigacion.entity; import ec.edu.espe_ctt_investigacion.entity.EvaluacionPar; import ec.edu.espe_ctt_investigacion.entity.ParametroEvaluacionInv; import ec.edu.espe_ctt_investigacion.entity.ValoracionParametroEvaluacionInv; import java.math.BigDecimal; import javax.annotation.Generated; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; @Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2018-05-10T16:19:09") @StaticMetamodel(EvaluacionParDetalle.class) public class EvaluacionParDetalle_ { public static volatile SingularAttribute<EvaluacionParDetalle, Integer> id; public static volatile SingularAttribute<EvaluacionParDetalle, String> justificacion; public static volatile SingularAttribute<EvaluacionParDetalle, ParametroEvaluacionInv> parametroEvaluacion; public static volatile SingularAttribute<EvaluacionParDetalle, EvaluacionPar> evaluacionPar; public static volatile SingularAttribute<EvaluacionParDetalle, ValoracionParametroEvaluacionInv> valoracionParametroEvaluacion; public static volatile SingularAttribute<EvaluacionParDetalle, BigDecimal> puntaje; }
[ "jhonalonjami@gmail.com" ]
jhonalonjami@gmail.com
dbe88b2bbc2dbc135c27afd0734aee23b5d4cdbf
7d3a562e88db5a6c5df742aacbdc81bae8416efb
/org.plcore.weka/src/org/plcore/classifier/weka/AttributeSet.java
9b89fc3589fa97467f91d231d34a441762976602
[]
no_license
kevinau/plcore
6de5eea4ff84f4a5d5fa5e93068ac491b5c37c4e
43bd889abc20d1985a26a1707bcc928d277ba1ee
refs/heads/master
2021-03-30T20:34:45.568024
2018-07-31T10:37:59
2018-07-31T10:37:59
124,811,974
0
0
null
null
null
null
UTF-8
Java
false
false
3,007
java
package org.plcore.classifier.weka; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.plcore.srcdoc.ISegment; import org.plcore.srcdoc.ISourceDocumentContents; import org.plcore.srcdoc.SourceDocument; import org.plcore.classifier.ClassSet; import org.plcore.classifier.Dictionary; import weka.core.Attribute; import weka.core.Instances; public class AttributeSet { private final Dictionary dictionary; private final ClassSet classSet; private int[] wordDocCounts = new int[512]; private int documentCount = 0; public AttributeSet (Dictionary dictionary, ClassSet classSet) { this.dictionary = dictionary; this.classSet = classSet; } /** * sets the file to use for training */ void addDocument(SourceDocument d) throws Exception { String originName = d.getOriginName(); String companyName = originName.substring(0, 3); classSet.add(companyName); ISourceDocumentContents dc = d.getContents(); boolean[] wordOccurs = new boolean[wordDocCounts.length]; List<? extends ISegment> segments = dc.getSegments(); for (ISegment segment : segments) { switch (segment.getType()) { case CURRENCY : case DATE : // These are not considered for classification break; default : String word = segment.getText(); if (word.length() > 2) { int i = dictionary.resolve(word); while (i >= wordDocCounts.length) { System.out.println("......... " + i + " " + wordDocCounts.length + " " + word); wordDocCounts = Arrays.copyOf(wordDocCounts, wordDocCounts.length * 2); wordOccurs = Arrays.copyOf(wordOccurs, wordDocCounts.length); } wordOccurs[i] = true; } break; } } // Increment the document count for words that appear in this document for (int i = 0; i < dictionary.size(); i++) { if (wordOccurs[i]) { wordDocCounts[i]++; } } documentCount++; } double[] calculateIdfs () { // Calculate idf's for all words in the dictionary double[] idfs = new double[dictionary.size()]; for (int i = 0; i < dictionary.size(); i++) { idfs[i] = Math.log(documentCount / wordDocCounts[i]); } // Create the attribute information Attribute classAttribute = classSet.buildClassAttribute(); ArrayList<Attribute> attributeList = new ArrayList<>(dictionary.size() + 1); for (String word : dictionary.words()) { Attribute attribute = new Attribute(word); attributeList.add(attribute); } attributeList.add(classAttribute); // Create the training data set instanceSet = new Instances("Training data", attributeList, documentCount); instanceSet.setClassIndex(instanceSet.numAttributes() - 1); } }
[ "kholloway@geckosoftware.com.au" ]
kholloway@geckosoftware.com.au
0e8ef8a671d5bd536e3b336550210eaa390733f0
5151397c15936f680dcf8180fcef64fca2184230
/mockserver-core/src/main/java/org/mockserver/client/serialization/model/JsonBodyDTO.java
2bfdcca38d7d5025714c76bb55d95687923cf792
[ "Apache-2.0" ]
permissive
jghoman/mockserver
7beb8fe948eadc306c90392e33c06634ac5d786e
7b69b221015f844e6095fa814b5a5def7d15b56a
refs/heads/master
2021-01-17T07:55:53.114433
2015-04-03T22:17:58
2015-04-03T22:17:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package org.mockserver.client.serialization.model; import org.mockserver.matchers.JsonBodyMatchType; import org.mockserver.model.Body; import org.mockserver.model.JsonBody; /** * @author jamesdbloom */ public class JsonBodyDTO extends BodyDTO { private String json; private JsonBodyMatchType matchType; public JsonBodyDTO(JsonBody jsonBody) { super(Body.Type.JSON); this.json = jsonBody.getValue(); this.matchType = jsonBody.getMatchType(); } protected JsonBodyDTO() { } public String getJson() { return json; } public JsonBodyMatchType getMatchType() { return matchType; } public JsonBody buildObject() { return new JsonBody(getJson(), matchType); } }
[ "jamesdbloom@gmail.com" ]
jamesdbloom@gmail.com
9f9f1e3663d59a152735284f1bd4962efe02ea86
48f0b3e029b304bf2cfb64419aad795445862856
/Evolution/plugins/org.modelrefactoring.evolution.operators.resource.operators/src-gen/org/modelrefactoring/evolution/operators/resource/operators/util/OperatorsListUtil.java
d1eb5640d8877473f6dddeb7064ed5525627ba0d
[]
no_license
jreimone/refactory
09dda0718d5d8117f858d3e4497e8c1371530518
837f1ca3d8537250d024ead3be3ba95f7845409e
refs/heads/master
2021-07-18T15:34:02.469855
2021-02-23T07:55:25
2021-02-23T07:55:25
56,208,480
2
1
null
2020-10-13T06:52:33
2016-04-14T05:01:02
Java
UTF-8
Java
false
false
736
java
/** * <copyright> * </copyright> * * */ package org.modelrefactoring.evolution.operators.resource.operators.util; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * A utility class that encapsulates some case operations that need to be * performed unchecked, because of Java's type erasure. */ public class OperatorsListUtil { @SuppressWarnings("unchecked") public static <T> List<T> castListUnchecked(Object list) { return (List<T>) list; } public static List<Object> copySafelyToObjectList(List<?> list) { Iterator<?> it = list.iterator(); List<Object> castedCopy = new ArrayList<Object>(); while (it.hasNext()) { castedCopy.add(it.next()); } return castedCopy; } }
[ "jreimone@users.noreply.github.com" ]
jreimone@users.noreply.github.com
a2f102d8bf2bba0e7353ad9d7b6f88624c1b729c
9ce31055cc5467c2655f60030103beb502db125b
/spring/boot/embedded-web/src/main/java/com/ew/runner/Runner.java
1da58d532812a0fca0460babc86f6281b0a20f78
[]
no_license
manishfullDev/All-Project
969cfadbb608a76054c675fd854fb2c05f5f8ee2
888f852aea6f4271d8a2737bf6ab1eec7525bad2
refs/heads/master
2023-08-03T10:55:45.437393
2020-04-07T06:44:08
2020-04-07T06:44:08
253,693,976
1
0
null
2023-07-23T11:10:07
2020-04-07T05:17:53
Java
UTF-8
Java
false
false
1,142
java
package com.ew.runner; import java.io.File; import javax.servlet.ServletException; import org.apache.catalina.LifecycleException; import org.apache.catalina.WebResourceRoot; import org.apache.catalina.core.StandardContext; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.webresources.DirResourceSet; import org.apache.catalina.webresources.StandardRoot; public class Runner { private final static String webappDirLocation = "src/main/webapp"; private final static String webinfClassesDirLocation = "target/classes"; public static void main(String[] args) throws LifecycleException, ServletException { Tomcat tomcat = new Tomcat(); StandardContext context = (StandardContext) tomcat.addWebapp("/", new File(webappDirLocation).getAbsolutePath()); StandardRoot resource = new StandardRoot(context); DirResourceSet dirResourceSet = new DirResourceSet(resource, "/WEB-INF/classes/", new File(webinfClassesDirLocation).getAbsolutePath(), "/"); resource.addPreResources(dirResourceSet); context.setResources(resource); tomcat.setPort(8081); tomcat.start(); tomcat.getServer().await(); } }
[ "manish.vishwakarma@s-force.org" ]
manish.vishwakarma@s-force.org
9a27c688d57d7261ce84eb51c3620d1e4f1a1657
ea2aeb37ac80c9b3a4a8c85bdbf5cf05ab850b18
/src/org/jdna/bmt/web/client/util/DateFormatUtil.java
69fe33f784cef6b6bf90e400f5852ff43b4ce197
[]
no_license
stuckless/sagetv-bmtweb
abc34133a6ffbfe4a92bf824753f5713e2d624f9
0d4567bd6491781f45ebd1ac5729537b48ef483c
refs/heads/master
2022-11-19T15:34:02.612161
2022-07-04T11:51:45
2022-07-04T11:51:45
63,011,570
0
1
null
2022-11-09T18:20:43
2016-07-10T17:56:01
Java
UTF-8
Java
false
false
892
java
package org.jdna.bmt.web.client.util; import java.util.Date; import com.google.gwt.i18n.client.DateTimeFormat; import com.google.gwt.i18n.client.NumberFormat; public class DateFormatUtil { public static String formatAiredDate(long in) { DateTimeFormat fmt1 = DateTimeFormat.getFormat("E, L/d, h:MM a"); return fmt1.format(new Date(in)); } public static String formatDuration(long in) { int mins = (int)(in / 1000 / 60); if (mins>0) { return mins + " min"; } return ""; } public static String formatDurationFancy(long in) { int mins = (int)(in / 1000 / 60) % 60; int hrs = (int)(in / 1000 / 60 / 60) % 60; NumberFormat nf = NumberFormat.getFormat("00"); String smins = nf.format(mins); if (hrs>0) { if (mins>0) { return hrs + " hr " + smins + " min"; } else { return hrs + " hr "; } } else { return smins + " min"; } } }
[ "sean.stuckless@gmail.com" ]
sean.stuckless@gmail.com
f403228c7e672068dfb8807730a3f23b66fbbc66
6c35446feb5baaadf1901a083442e14dc423fc0b
/TestWork/src/main/java/com/bussiness/bi/bigdata/string/RpmUtil.java
ed6a30d6f967cf56e489bf69caa42fdaccf5dfbb
[ "Apache-2.0" ]
permissive
chenqixu/TestSelf
8e533d2f653828f9f92564c3918041d733505a30
7488d83ffd20734ab5ca431d13fa3c5946493c11
refs/heads/master
2023-09-01T06:18:59.417999
2023-08-21T06:16:55
2023-08-21T06:16:55
75,791,787
3
1
Apache-2.0
2022-03-02T06:47:48
2016-12-07T02:36:58
Java
UTF-8
Java
false
false
1,753
java
package com.bussiness.bi.bigdata.string; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * RpmUtil * * @author chenqixu */ public class RpmUtil { private static final Logger logger = LoggerFactory.getLogger(RpmUtil.class); private static final String nums = "0123456789."; private static final char[] chars = nums.toCharArray(); private List<String> rpms = new ArrayList<>(); public void addRpms(String rpm_names, String regex) { String[] rpm_name_array = rpm_names.split(regex, -1); rpms = Arrays.asList(rpm_name_array); logger.info("rpms.size : {}", rpms.size()); } public void addRpm(String rpm_name) { rpms.add(rpm_name); } public void deal() { for (String rpm : rpms) { StringBuilder sb = new StringBuilder(); String[] values = rpm.split("-", -1); for (int i = 0; i < values.length; i++) { if (i == 0 && isNum(values[i].charAt(0))) { continue; } else if (i > 0 && isNum(values[i].charAt(0))) { if (sb.length() > 0) sb.deleteCharAt(sb.length() - 1); break; } else { sb.append(values[i]); sb.append("-"); } } // logger.info("rpm -qa|grep {}", sb.toString()); System.out.println(String.format("echo \"===[start]%s\" : `rpm -qa|grep %s|wc -l`", sb.toString(), sb.toString())); } } private boolean isNum(char str) { for (char c : chars) { if (str == c) return true; } return false; } }
[ "13509323824@139.com" ]
13509323824@139.com
24018767175f5c621ad68c7683fceb0647e4bde1
ca0386e990423355a3c1c62e0810d4552eee59b4
/drawinglibs/src/main/java/com/wangbo/www/drawinglibs/data/ShearDrawData.java
b9f843d78a2d08cce00cbe6e98d8dfe131b19b22
[]
no_license
w513209188/DrawingBoard
27778b70ca9e1e3f209f9f810012c69e15f22521
27a98db51d8ad65907183ce8bca1812932e3a3cc
refs/heads/master
2020-03-20T04:51:15.919685
2018-06-14T06:46:48
2018-06-14T06:46:48
137,196,736
1
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.wangbo.www.drawinglibs.data; import android.graphics.Canvas; import android.graphics.Path; import com.wangbo.www.drawinglibs.config.NoteApplication; public class ShearDrawData extends BaseDrawData { private Path mPath; public ShearDrawData() { } public Path getPath() { return mPath; } public void setPath(Path path) { mPath = path; } @Override public void onDraw(Canvas canvas) { canvas.drawPath(mPath, mPaint); } @Override public int getMode() { return NoteApplication.MODE_SHEAR; } }
[ "513209188@qq.com" ]
513209188@qq.com
f90f66a1c2e550e3fff3b581f44fd33a6150d913
073231dca7e07d8513c8378840f2d22b069ae93f
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201608/LinkStatus.java
b821e16884e6178daca01af45f3a09def3b32142
[ "Apache-2.0" ]
permissive
zaper90/googleads-java-lib
a884dc2268211306416397457ab54798ada6a002
aa441cd7057e6a6b045e18d6e7b7dba306085200
refs/heads/master
2021-01-01T19:14:01.743242
2017-07-17T15:48:32
2017-07-17T15:48:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,596
java
// Copyright 2016 Google Inc. 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.google.api.ads.dfp.jaxws.v201608; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LinkStatus. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="LinkStatus"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="LINKED"/> * &lt;enumeration value="UNLINKED"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "LinkStatus") @XmlEnum public enum LinkStatus { LINKED, UNLINKED, /** * * The value returned if the actual value is not exposed by the requested API version. * * */ UNKNOWN; public String value() { return name(); } public static LinkStatus fromValue(String v) { return valueOf(v); } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
95655c3a65d409647d6324de239568b3955cb593
57ed16f69e09cb3fee99f984fe10fe280b982bb2
/src/test/java/edu/ucsb/changeme/services/MembershipServiceTests.java
1c57876da905e6345b3533204ef75f3fabb0c59c
[ "MIT" ]
permissive
ucsb-cs156-w21/demo-spring-react-github
c5b08915295c5e660a13420f8f63cd22a3fcd089
d0676e7aaccb9d1cbd01129cd49c0ef6e441397c
refs/heads/main
2023-04-27T02:22:50.121493
2021-01-25T00:52:36
2021-01-25T00:52:36
340,456,979
0
0
MIT
2023-04-14T19:39:56
2021-02-19T18:32:52
Java
UTF-8
Java
false
false
4,347
java
package edu.ucsb.changeme.services; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; import java.util.List; import com.auth0.jwt.JWT; import com.auth0.jwt.interfaces.DecodedJWT; import edu.ucsb.changeme.entities.AppUser; import edu.ucsb.changeme.services.MembershipServiceTests; public class MembershipServiceTests { private DecodedJWT exampleJWT = JWT.decode( "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTYiLCJuYW1lIjoiSm9obiBEb2UiLCJpYXQiOjE1MTYyMzkwMjJ9.MkiS50WhvOFwrwxQzd5Kp3VzkQUZhvex3kQv-CLeS3M"); private AppUser exampleUser = new AppUser(1L, "test@ucsb.edu", "Test", "User"); private MembershipService serviceNotMemberOrAdmin = new MembershipService() { @Override public boolean isMember(DecodedJWT jwt) { return false; } @Override public boolean isAdmin(DecodedJWT jwt) { return false; } @Override public boolean isMember(AppUser user) { return false; } @Override public boolean isAdmin(AppUser user) { return false; } @Override public List<String> getDefaultAdminEmails() { return new ArrayList<String>(); } }; private MembershipService serviceOnlyAdmin = new MembershipService() { @Override public boolean isMember(DecodedJWT jwt) { return false; } @Override public boolean isAdmin(DecodedJWT jwt) { return true; } @Override public boolean isMember(AppUser user) { return false; } @Override public boolean isAdmin(AppUser user) { return true; } @Override public List<String> getDefaultAdminEmails() { return new ArrayList<String>(); } }; private MembershipService serviceOnlyMember = new MembershipService() { @Override public boolean isMember(DecodedJWT jwt) { return true; } @Override public boolean isAdmin(DecodedJWT jwt) { return false; } @Override public boolean isMember(AppUser user) { return true; } @Override public boolean isAdmin(AppUser user) { return false; } @Override public List<String> getDefaultAdminEmails() { return new ArrayList<String>(); } }; private MembershipService serviceBothMemberAndAdmin = new MembershipService() { @Override public boolean isMember(DecodedJWT jwt) { return true; } @Override public boolean isAdmin(DecodedJWT jwt) { return true; } @Override public boolean isMember(AppUser user) { return true; } @Override public boolean isAdmin(AppUser user) { return true; } @Override public List<String> getDefaultAdminEmails() { return new ArrayList<String>(); } }; @Test public void testMembershipService_isMemberOrAdmin_notMemberOrAdmin() { assertEquals(false, serviceNotMemberOrAdmin.isMemberOrAdmin(null)); } @Test public void testMembershipService_isMemberOrAdmin_isMemberOrAdmin() { assertEquals(true, serviceOnlyMember.isMemberOrAdmin(null)); assertEquals(true, serviceOnlyAdmin.isMemberOrAdmin(null)); assertEquals(true, serviceBothMemberAndAdmin.isMemberOrAdmin(null)); } @Test public void testMemberShipService_roleIsGuest_whenJWTIsNull() { assertEquals("Guest", serviceNotMemberOrAdmin.role((DecodedJWT) null)); } @Test public void testMemberShipService_roleIsGuest_whenJWTExists_butUserIsNotAdminOrMember() { assertEquals("Guest", serviceNotMemberOrAdmin.role(exampleJWT)); } @Test public void testMemberShipService_roleIsMember_whenJWTExists_andUserIsMember() { assertEquals("Member", serviceOnlyMember.role(exampleJWT)); } @Test public void testMemberShipService_roleIsAdmin_whenJWTExists_andUserIsAdmin() { assertEquals("Admin", serviceOnlyAdmin.role(exampleJWT)); assertEquals("Admin", serviceBothMemberAndAdmin.role(exampleJWT)); } @Test public void testMemberShipService_roleWorksForBothUserAndToken() { assertEquals(serviceOnlyMember.role(exampleJWT), serviceOnlyMember.role(exampleUser)); assertEquals(serviceOnlyAdmin.role(exampleJWT), serviceOnlyAdmin.role(exampleUser)); assertEquals(serviceNotMemberOrAdmin.role(exampleJWT), serviceNotMemberOrAdmin.role(exampleUser)); } }
[ "pconrad@cs.ucsb.edu" ]
pconrad@cs.ucsb.edu
b0476a4d385416c4af1ebddeef551dddc5618d94
12c453642784a3359363e33c007d5a5abdae9e4a
/container/org/fdesigner/container/internal/url/URLStreamHandlerSetter.java
68a72102625362172ac116914b2f646fe5942cb9
[]
no_license
WeControlTheFuture/fdesigner
51e56b6d1935f176b23ebaf42119be4ef57e3bec
84483c2f112c8d67ecdf61e9259c1c5556d398c4
refs/heads/master
2020-09-24T13:44:01.238867
2019-12-13T01:21:40
2019-12-13T01:21:40
225,771,252
0
0
null
null
null
null
UTF-8
Java
false
false
1,571
java
/******************************************************************************* * Copyright (c) 2003, 2012 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.fdesigner.container.internal.url; import java.net.URL; public class URLStreamHandlerSetter implements org.fdesigner.framework.service.url.URLStreamHandlerSetter { protected URLStreamHandlerProxy handlerProxy; public URLStreamHandlerSetter(URLStreamHandlerProxy handler) { this.handlerProxy = handler; } /** * @see org.osgi.service.url.URLStreamHandlerSetter#setURL(URL, String, String, int, String, String) * @deprecated */ @Override public void setURL(URL url, String protocol, String host, int port, String file, String ref) { handlerProxy.setURL(url, protocol, host, port, file, ref); } /** * @see org.osgi.service.url.URLStreamHandlerSetter#setURL(URL, String, String, int, String, String, String, String, String) */ @Override public void setURL(URL url, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) { handlerProxy.setURL(url, protocol, host, port, authority, userInfo, path, query, ref); } }
[ "491676539@qq.com" ]
491676539@qq.com
e881924507de0883fd5fa034058c5156bdede785
2e4cbb6ed51f5e9b7515d543729644cae5191cb7
/demo/src/main/java/ro/fortsoft/wicket/jade/demo/BooksPanel.java
9c7f705fe01c098b4295f8634a81e896e5d21528
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
fortsoft/wicket-jade
447da20cc1d9d5273ed59f5b45cb5c32a1a7347c
764332271de6a5e960c1093fafe77bed125970a9
refs/heads/master
2020-08-26T20:07:25.362753
2014-08-01T10:02:43
2014-08-01T10:02:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
/* * Copyright 2013 FortSoft * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with * the License. You may obtain a copy of the License in the LICENSE file, or 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 ro.fortsoft.wicket.jade.demo; import java.util.Map; import org.apache.wicket.AttributeModifier; import org.apache.wicket.markup.html.panel.Panel; import ro.fortsoft.wicket.jade.JadePanel; /** * @author Decebal Suiu */ public class BooksPanel extends JadePanel { private static final long serialVersionUID = 1L; public BooksPanel(String id, Map<String, Object> values) { super(id, values); } @Override protected void onInitialize() { super.onInitialize(); Panel embeddedPanel = new EmbeddedPanel("embedded"); embeddedPanel.add(AttributeModifier.append("style", "background-color: lightgray;")); add(embeddedPanel); } }
[ "decebal.suiu@gmail.com" ]
decebal.suiu@gmail.com
ca38bffb3fdbbb197035eca707c7f9b658d2f219
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/libgdx--libgdx/ffa8bbe46c641dacccbcbcdd345f9654ab3104c9/before/Button.java
46bb5aebeae153cde99e2258a1bdcb97bb214a74
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
5,152
java
package com.badlogic.gdx.scenes.scene2d.ui; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.NinePatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle; import com.badlogic.gdx.scenes.scene2d.ui.tablelayout.Table; import com.esotericsoftware.tablelayout.Cell; /** @author Nathan Sweet */ public class Button extends Table { public ButtonStyle style; protected ClickListener listener; boolean isChecked; ButtonGroup buttonGroup; public Button (Skin skin) { this(skin.getStyle(ButtonStyle.class), null); } public Button (ButtonStyle style) { this(style, null); } public Button (Actor child, Skin skin) { this(child, skin.getStyle(ButtonStyle.class)); } public Button (Actor child, ButtonStyle style) { this(style, null); add(child); pack(); } public Button (String text, Skin skin) { this(skin.getStyle(ButtonStyle.class), null); setText(text); } public Button (String text, ButtonStyle style) { this(style, null); setText(text); } public Button (String text, ButtonStyle style, String name) { this(style, name); setText(text); } public Button (ButtonStyle style, String name) { super(null, null, null, name); setStyle(style); initialize(); } private void initialize () { super.setClickListener(new ClickListener() { public void click (Actor actor) { boolean newChecked = !isChecked; setChecked(newChecked); // Don't fire listener if the button group reverted the change to isChecked. if (newChecked == isChecked && listener != null) listener.click(actor); } }); } public void setChecked (boolean isChecked) { if (buttonGroup != null && !buttonGroup.canCheck(this, isChecked)) return; this.isChecked = isChecked; } public boolean isChecked () { return isChecked; } public void setStyle (ButtonStyle style) { this.style = style; for (int i = 0; i < children.size(); i++) { Actor child = children.get(i); if (child instanceof Label) { ((Label)child).setStyle(style); break; } } setBackground(isPressed ? style.down : style.up); invalidateHierarchy(); } public void setClickListener (ClickListener listener) { this.listener = listener; } /** Returns the first label found in the button, or null. */ public Label getLabel () { for (int i = 0; i < children.size(); i++) { Actor child = children.get(i); if (child instanceof Label) return (Label)child; } return null; } public Cell setText (String text) { Label label = getLabel(); if (label != null) { label.setText(text); return getCell(label); } label = new Label(text, style); label.setAlignment(Align.CENTER); return add(label); } /** Returns the text of the first label in the button, or null if no label was found. */ public String getText () { Label label = getLabel(); if (label == null) return null; return label.getText(); } public void draw (SpriteBatch batch, float parentAlpha) { float offsetX = 0, offsetY = 0; if (isPressed) { setBackground(style.down == null ? style.up : style.down); offsetX = style.pressedOffsetX; offsetY = style.pressedOffsetY; if (style.downFontColor != null) { Label label = getLabel(); if (label != null) label.setColor(style.downFontColor); } } else { if (style.checked == null) setBackground(style.up); else setBackground(isChecked ? style.checked : style.up); offsetX = style.unpressedOffsetX; offsetY = style.unpressedOffsetY; if (style.fontColor != null) { Label label = getLabel(); if (label != null) label.setColor((isChecked && style.downFontColor != null) ? style.downFontColor : style.fontColor); } } for (int i = 0; i < children.size(); i++) { Actor child = children.get(i); child.x += offsetX; child.y += offsetY; } super.draw(batch, parentAlpha); for (int i = 0; i < children.size(); i++) { Actor child = children.get(i); child.x -= offsetX; child.y -= offsetY; } } public float getMinWidth () { return getPrefWidth(); } public float getMinHeight () { return getPrefHeight(); } /** Defines a button style, see {@link Button} * @author mzechner */ static public class ButtonStyle extends LabelStyle { public NinePatch down; public NinePatch up; public NinePatch checked; public float pressedOffsetX, pressedOffsetY; public float unpressedOffsetX, unpressedOffsetY; public Color downFontColor; public ButtonStyle () { } public ButtonStyle (NinePatch down, NinePatch up, NinePatch checked, float pressedOffsetX, float pressedOffsetY, float unpressedOffsetX, float unpressedOffsetY, BitmapFont font, Color fontColor, Color downFontColor) { super(font, fontColor); this.down = down; this.up = up; this.checked = checked; this.pressedOffsetX = pressedOffsetX; this.pressedOffsetY = pressedOffsetY; this.unpressedOffsetX = unpressedOffsetX; this.unpressedOffsetY = unpressedOffsetY; this.downFontColor = downFontColor; } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
7c3775124ec5637131f03daf1674af63d7dba4ab
3fd91eac84351df7a20c6bc62bb8879df07771b7
/src/main/java/com/kshrd/respositories/UserRepository.java
cf16ac33da837ded602231d13f4a33f98d0d4524
[]
no_license
HRDSpring/SR-CHHAICHIVON-190716
db1c93033912ece9710260e1301086e751683dfe
feee8c141465f0588829f50dd1b20b4d8ae3b24b
refs/heads/master
2021-01-09T20:39:48.482657
2016-07-20T10:02:26
2016-07-20T10:02:26
63,693,350
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package com.kshrd.respositories; import java.util.ArrayList; import org.springframework.stereotype.Repository; import com.kshrd.model.User; @Repository public interface UserRepository { //getall user public ArrayList<User> findUsers(); //update user public boolean updateUser(User user); //insert user public boolean insertUser(User user); //insert user public boolean deleteUser(int userId); }
[ "chivonchhai@hotmail.com" ]
chivonchhai@hotmail.com
0ee978fa21185c66da947a4ff149880b720a16ae
94ccacdf5280c837202ebc06393162847f2c0122
/app/src/main/java/com/unicorn/taskscan/record/RecordQueryAct.java
13c91a0e167971d18a36e7b6f42063cd4de61112
[]
no_license
Ivolian/Taskscan
fd43e9a73b32a1d5782f6cde5452b8c4f2897a9d
c687e743cbadf77e3649a70edf5b1a52316d6e22
refs/heads/master
2021-01-11T00:23:43.563722
2017-04-27T07:01:53
2017-04-27T07:01:53
70,557,286
0
0
null
null
null
null
UTF-8
Java
false
false
2,519
java
package com.unicorn.taskscan.record; import android.content.Intent; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.support.v4.content.ContextCompat; import android.widget.ArrayAdapter; import android.widget.TextView; import com.rengwuxian.materialedittext.MaterialEditText; import com.unicorn.taskscan.R; import com.unicorn.taskscan.base.BaseAct; import com.unicorn.taskscan.utils.Constant; import com.weiwangcn.betterspinner.library.material.MaterialBetterSpinner; import java.util.Arrays; import butterknife.BindView; import butterknife.OnClick; public class RecordQueryAct extends BaseAct { @Override protected int getLayoutResID() { return R.layout.activity_record_query; } @Override protected void init() { initMbsIsArrival(); initQueryButton(); } private void initMbsIsArrival() { ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_dropdown_item_1line, Arrays.asList("是", "否")); mbsIsArrival.setAdapter(adapter); mbsIsArrival.setText("是"); } @OnClick(R.id.btnQuery) public void btnQueryOnClick() { Intent intent = new Intent(this, RecordDisplayAct.class); intent.putExtra(Constant.K_TEAM_NO, getTeamNo()); intent.putExtra(Constant.K_LINE_NO, getLineNo()); intent.putExtra(Constant.K_IS_ARRIVAL, getIsArrival()); startActivity(intent); } // ==================== 基本无视 ==================== @BindView(R.id.metTeamNo) MaterialEditText metTeamNo; @BindView(R.id.metLineNo) MaterialEditText metLineNo; @BindView(R.id.mbsIsArrival) MaterialBetterSpinner mbsIsArrival; @BindView(R.id.btnQuery) TextView btnQuery; private void initQueryButton() { btnQuery.setBackground(getQueryButtonBackground()); } private Drawable getQueryButtonBackground() { GradientDrawable bg = new GradientDrawable(); bg.setColor(ContextCompat.getColor(this, R.color.colorPrimary)); bg.setCornerRadius(10); return bg; } private String getTeamNo() { return metTeamNo.getText().toString().trim(); } private String getLineNo() { return metLineNo.getText().toString().trim(); } private String getIsArrival() { return mbsIsArrival.getText().toString(); } @OnClick(R.id.back) public void backOnClick() { finish(); } }
[ "renjiajian@withub.net.cn" ]
renjiajian@withub.net.cn
a8b198a26e26b0fc908530a3af26768a391c10df
e2cfef94c7b756dd73749521b56cdd55e856e61a
/sources/com/tvbus/engine/TVListener.java
fec11c45bc89631cabae54bc5c109d3da59c917b
[]
no_license
BiYiTuan/kworld_apk
9c2076b4f0a2851b9f9bacf2eccec5baea65d128
51f298739e646c0f923727d58052d456d3955de4
refs/heads/master
2020-04-26T22:18:25.640606
2019-01-30T14:14:54
2019-01-30T14:14:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package com.tvbus.engine; public interface TVListener { void onInfo(String str); void onInited(String str); void onPrepared(String str); void onQuit(String str); void onStart(String str); void onStop(String str); }
[ "morpig2@gmail.com" ]
morpig2@gmail.com
85eb86b546bd63aec2cc44ef40a76befc0eac920
9e477cc9dd8690cfd7cee86c7cc3127d36f28384
/app/src/main/java/com/gxtc/huchuan/ui/live/member/MemberManagerSource.java
851072b954a237296456cc50a8e1e6ea2f88ad55
[]
no_license
zhangzzg/xmzj
f0682b5e32c96777405d5985b632b6a4f0ab1d4b
23a76820b33d1766ca196f538fd7e0b44dd26c81
refs/heads/master
2020-03-27T21:59:16.175938
2018-09-03T11:27:58
2018-09-03T11:27:58
147,194,314
1
1
null
null
null
null
UTF-8
Java
false
false
1,789
java
package com.gxtc.huchuan.ui.live.member; import com.gxtc.commlibrary.data.BaseRepository; import com.gxtc.huchuan.bean.ChatJoinBean; import com.gxtc.huchuan.bean.LiveRoomBean; import com.gxtc.huchuan.bean.SignUpMemberBean; import com.gxtc.huchuan.http.ApiCallBack; import com.gxtc.huchuan.http.ApiObserver; import com.gxtc.huchuan.http.ApiResponseBean; import com.gxtc.huchuan.http.service.LiveApi; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import rx.android.schedulers.AndroidSchedulers; import rx.schedulers.Schedulers; /** * Created by Gubr on 2017/4/3. */ public class MemberManagerSource extends BaseRepository implements MemberManagerContract.Source { @Override public void getDatas(HashMap<String,String> map,ApiCallBack<ArrayList<ChatJoinBean.MemberBean>> callBack) { // ArrayList<SignUpMemberBean> beans = new ArrayList<SignUpMemberBean>() {{ // for (int i = 0; i < 20; i++) { // SignUpMemberBean signUpMemberBean = new SignUpMemberBean(); // signUpMemberBean.setName("名字i" + i); // signUpMemberBean.setUserCode("sldkfj"); // signUpMemberBean.setHeadPic("https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/8ad4b31c8701a18bbef9f231982f07082838feba.jpg"); // signUpMemberBean.setIsBlack("1"); // signUpMemberBean.setIsBlock("1"); // add(signUpMemberBean); // } // }}; // callBack.onSuccess(beans); addSub(LiveApi.getInstance().getlistJoinMember(map).subscribeOn(Schedulers.io()).observeOn (AndroidSchedulers.mainThread()).subscribe(new ApiObserver<ApiResponseBean<ArrayList<ChatJoinBean.MemberBean>>>(callBack))); } }
[ "17301673845@163.com" ]
17301673845@163.com
6eb114b039156fc8e26bea9915b7a28a2e747d9d
8540ade77520bfe490b3e748969abb967995ba80
/hackerRank30DaysChallenge/src/hackerRank30DaysChallenge/_02DayTwo.java
dd658e459d2a931d05bc32903027cb62bc662e6e
[]
no_license
mariamiawad/JavaExercises
c0c9ead7c0e4dab8e12eef2a4ddc1774920a82e4
aac4c5c34c936bb24b11159a7baa9006b1393f73
refs/heads/master
2023-08-06T07:42:30.613631
2021-09-26T17:16:43
2021-09-26T17:16:43
193,220,093
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package hackerRank30DaysChallenge; import java.net.Socket; public class _02DayTwo { static void solve(double meal_cost, int tip_percent, int tax_percent) { double tip = meal_cost * tip_percent / 100.0; double tax = meal_cost * tax_percent / 100.0; double totalCost = meal_cost + tip + tax; System.out.println(Math.round(totalCost)); } public static void main(String[] args) { solve(10.25, 17, 5); } }
[ "mariam.i.awad@gmail.com" ]
mariam.i.awad@gmail.com
e906d258ccce1353001a2c8b57ffdad2a2933e53
9d4d1246d7a6ea037d47de317a23bad36117bd0f
/MLN-Android/mlnservics/src/main/java/com/immomo/mls/util/ChannelTools.java
b63ca2fc75af1bec8c585a4ce13ed3fc109985cb
[ "MIT" ]
permissive
dingpuyu/MLN
122ba786ef876feff65c2b8fc8f48116678635d1
32124e5f261ef360f8c97688a4391fda9605389b
refs/heads/master
2020-08-30T19:32:12.119442
2019-12-05T08:27:51
2019-12-05T08:27:51
218,469,439
1
0
MIT
2019-10-30T07:38:52
2019-10-30T07:38:52
null
UTF-8
Java
false
false
3,984
java
/** * Created by MomoLuaNative. * Copyright (c) 2019, Momo Group. All rights reserved. * * This source code is licensed under the MIT. * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree. */ package com.immomo.mls.util; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.nio.channels.Channels; import java.nio.channels.FileChannel; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; import java.util.ArrayList; import java.util.List; public final class ChannelTools { /** * read to * * @param buffer * @param offset * @param size * @return */ public static byte[] toBytes(MappedByteBuffer buffer, int offset, int size) { if (buffer != null && offset >= 0 && size > 0) { byte[] result = new byte[size]; buffer.get(result); return result; } return null; } /** * file path to * * @param filepath * @param sizes * @return */ public static List<byte[]> toBytes(String filepath, int[] sizes) { List<byte[]> result = new ArrayList<byte[]>(); try { RandomAccessFile randomAccessFile = new RandomAccessFile(filepath, "r"); MappedByteBuffer buffer = randomAccessFile.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, randomAccessFile.length()); if (sizes != null && sizes.length > 0) { for (int size : sizes) { byte[] r = new byte[size]; buffer.get(r);//fill buffer } } } catch (Exception e) { e.printStackTrace(); } return result; } /** * copy a input stream to a byte[] * * @param inputStream * @return */ public static byte[] toBytes(InputStream inputStream) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try { fastCopy(inputStream, outputStream); return outputStream.toByteArray(); } catch (IOException e) { e.printStackTrace(); } finally { try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } /** * fast copy * * @param inputStream * @param outputStream * @throws IOException */ public static void fastCopy(InputStream inputStream, OutputStream outputStream) throws IOException { final ReadableByteChannel input = Channels.newChannel(inputStream); final WritableByteChannel output = Channels.newChannel(outputStream); fastCopy(input, output); } /** * copy * * @param src * @param dest * @throws IOException */ public static void fastCopy(final ReadableByteChannel src, final WritableByteChannel dest) throws IOException { final ByteBuffer buffer = ByteBuffer.allocateDirect(8 * 1024); int count = 0; while ((count = src.read(buffer)) != -1) { // LogUtil.d("luaviewp-fastCopy", count, buffer.capacity(), buffer.remaining(), buffer.array().length); // prepare the buffer to be drained buffer.flip(); // write to the channel, may block dest.write(buffer); // If partial transfer, shift remainder down // If buffer is empty, same as doing clear() buffer.compact(); } // EOF will leave buffer in fill state buffer.flip(); // make sure the buffer is fully drained. while (buffer.hasRemaining()) { dest.write(buffer); } } }
[ "xiong.fangyu@immomo.com" ]
xiong.fangyu@immomo.com
cca152d564070adfdbeb33ef1889d9194e889549
1f6f2743e833e97dac8880001e003b8ca7026ccd
/src/main/java/com/johnny/bankworker/service/AccountService.java
e51ff062c0b971b3081283ecfffe0380f2f7f2c9
[]
no_license
johnnywebsite1-0/SwsService
631df9dfe69f0e1c094d0aa84b643b123a3736b3
d483b58c4c65c44fa414b5c03ca0cb021fd08fa1
refs/heads/master
2020-06-23T20:28:36.332239
2019-07-25T06:37:31
2019-07-25T06:37:31
198,744,158
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
package com.johnny.bankworker.service; import com.johnny.bankworker.dto.AccountDTO; import com.johnny.bankworker.entity.AccountEntity; import com.johnny.bankworker.vo.AccountVO; import com.johnny.bankworker.vo.UnifiedResponse; public interface AccountService extends BaseService<AccountDTO, AccountVO, AccountEntity> { UnifiedResponse findCellphone(String cellphone); UnifiedResponse findByAccount(String cellphone, String password); UnifiedResponse delete(int id); UnifiedResponse changePassword(AccountDTO dto); }
[ "johnny.q.zhang@outlook.com" ]
johnny.q.zhang@outlook.com
04d2dd66e963d9856d2a84d1502e67ac5da13d86
ca3bc4c8c68c15c961098c4efb2e593a800fe365
/TableToMyibatisUtf-8/file/com/neusoft/crm/api/cpc/prod/dto/SpecialReqmtIndDTO.java
09217170e56a8281e84c00ac4e569a515dd90afb
[]
no_license
fansq-j/fansq-summary
211b01f4602ceed077b38bb6d2b788fcd4f2c308
00e838843e6885135eeff1eb1ac95d0553fc36ea
refs/heads/master
2022-12-17T01:18:34.323774
2020-01-14T06:57:24
2020-01-14T06:57:24
214,321,994
0
0
null
2022-11-17T16:20:29
2019-10-11T02:02:23
Java
UTF-8
Java
false
false
223
java
package com.neusoft.crm.api.cpc.prod.dto; import com.neusoft.crm.api.cpc.prod.data.SpecialReqmtIndDO; /** * SPECIAL_REQMT_IND表对应的实体DTO信息 */ public class SpecialReqmtIndDTO extends SpecialReqmtIndDO{ }
[ "13552796829@163.com" ]
13552796829@163.com
b7bdbfe4232ec7bbcf38419b211134186b5c4ab9
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_320/Testnull_31957.java
2030082643276fa2f369d47cc263f68a44d432d4
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_320; import static org.junit.Assert.*; public class Testnull_31957 { private final Productionnull_31957 production = new Productionnull_31957("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
0b4e3373acadc1575410aedf590cc08480e9166d
3553bc9c538f1a3120c79839e73dfac7b5a00ff2
/market-srv-workflow/src/main/java/cn/gdeng/market/service/workflow/core/impl/SnakerManagerServiceImpl.java
03d5163166035b0491e484a1ee4ee3e9cb337fb3
[]
no_license
f3226912/market
3a82f220ae4f74745f897b2e31687dcba47cbbd7
090e1e919f90b110eff53aef2f575a8e6eb1f3ce
refs/heads/master
2021-01-19T07:03:48.834124
2017-04-07T07:17:46
2017-04-07T07:17:46
87,516,812
0
3
null
null
null
null
UTF-8
Java
false
false
1,304
java
package cn.gdeng.market.service.workflow.core.impl; import java.util.List; import org.snaker.engine.IManagerService; import org.snaker.engine.access.Page; import org.snaker.engine.access.QueryFilter; import org.snaker.engine.entity.Surrogate; import cn.gdeng.market.service.workflow.core.SnakerManagerService; public class SnakerManagerServiceImpl implements SnakerManagerService { /** * snaker框架的内部服务类接口 */ private IManagerService managerService; public void setManagerService(IManagerService managerService) { this.managerService = managerService; } @Override public void saveOrUpdate(Surrogate surrogate) { managerService.saveOrUpdate(surrogate); } @Override public void deleteSurrogate(String id) { managerService.deleteSurrogate(id); } @Override public Surrogate getSurrogate(String id) { return managerService.getSurrogate(id); } @Override public List<Surrogate> getSurrogate(QueryFilter filter) { return managerService.getSurrogate(filter); } @Override public String getSurrogate(String operator, String processName) { return managerService.getSurrogate(operator, processName); } @Override public List<Surrogate> getSurrogate(Page<Surrogate> page, QueryFilter filter) { return managerService.getSurrogate(page, filter); } }
[ "253332973@qq.com" ]
253332973@qq.com
24941e635412dcea44caf93ed9dbbe80d6c8ec92
bb6cbcd5e4e97dc0b09dd9432dc45af1bf6e5e6e
/util/mtwilson-util-jdbi/src/main/java/com/intel/mtwilson/jdbi/util/DateArgument.java
122036ec7fefa85f1c5abeeb8335aff745433d33
[]
no_license
opencit/opencit-util
a41242c7448f9a8883910041109fefe3229d074c
1bbfa61fd5d0f3514eaf79d07bd07ad18a2fd294
refs/heads/release-cit-2.2
2021-01-21T14:07:27.694296
2016-11-09T22:52:03
2016-11-09T22:52:03
56,611,185
2
5
null
2018-11-28T15:32:40
2016-04-19T15:57:07
Java
UTF-8
Java
false
false
1,301
java
/* * Copyright (C) 2013 Intel Corporation * All rights reserved. */ package com.intel.mtwilson.jdbi.util; import java.util.Date; import java.sql.PreparedStatement; import java.sql.SQLException; import org.skife.jdbi.v2.StatementContext; import org.skife.jdbi.v2.tweak.Argument; import org.skife.jdbi.v2.tweak.ArgumentFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.Timestamp; /** * Converts java.util.Date to java.sql.Timestamp * * @author jbuhacoff */ public class DateArgument implements ArgumentFactory<Date> { private Logger log = LoggerFactory.getLogger(getClass()); @Override public boolean accepts(Class<?> type, Object value, StatementContext ctx) { return value != null && Date.class.isAssignableFrom(value.getClass()); } @Override public Argument build(Class<?> type, final Date value, StatementContext ctx) { return new Argument() { @Override public void apply(int position, PreparedStatement statement, StatementContext ctx) throws SQLException { statement.setTimestamp(position, new Timestamp(value.getTime())); } @Override public String toString() { return value.toString(); } }; } }
[ "jonathan.buhacoff@intel.com" ]
jonathan.buhacoff@intel.com
8a330a7d2de894ed248358ec74950ef21147d527
e63db9eaac8299c2bd16847f084c59cdd08cead6
/branches/services/ReservesServer/src/java/entities/BaseEntity.java
c56fe861cd6bee341ed503434692883b0922d9dc
[]
no_license
BGCX261/zonales-svn-to-git
974432530b3358b0c2d774ed2f5e9472b5618ab8
8008a68284efc58fced9a5e042dd165da1e94f90
refs/heads/master
2021-01-18T14:38:22.068945
2015-08-25T15:43:33
2015-08-25T15:43:33
41,586,043
0
0
null
null
null
null
UTF-8
Java
false
false
716
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package entities; import java.sql.Timestamp; import javax.persistence.Column; import javax.persistence.Version; /** * * @author Administrador */ @org.hibernate.annotations.Entity(optimisticLock = org.hibernate.annotations.OptimisticLockType.ALL, dynamicUpdate = true) public abstract class BaseEntity implements Comparable<BaseEntity> { public abstract Object getPK(); @Version @Column(name = "OBJ_VERSION") protected Timestamp version; public Timestamp getVersion() { return version; } public void setVersion(Timestamp version) { this.version = version; } }
[ "you@example.com" ]
you@example.com
9c43cc7dacdcfbe4dcfe5cee345a484d5926a67b
3a1b713c2603b9ac22121aa2bae02ac6a670b9ff
/sparksys-commons/sparksys-commons-mail-starter/src/main/java/com/sparksys/commons/mail/service/impl/MailServiceImpl.java
0b62fee73292f57775ccc453a38e4b30d3d063f5
[]
no_license
809662683/sparksys-cloud
bb8422d8896d92f2a90cdf25a0879eeefc814451
c61f99179f199278c5357efa90ff86021dfa7dd0
refs/heads/master
2022-08-04T11:57:06.582199
2020-05-24T07:23:38
2020-05-24T07:23:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,280
java
package com.sparksys.commons.mail.service.impl; import cn.hutool.core.util.ArrayUtil; import com.sparksys.commons.mail.service.MailService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.io.FileSystemResource; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.stereotype.Service; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; import java.io.File; /** * description: 邮件 服务实现类 * * @Author zhouxinlei * @Date 2020-05-24 13:20:12 */ @Service public class MailServiceImpl implements MailService { @Autowired private JavaMailSender mailSender; @Value("${spring.mail.username}") private String username; @Override public void sendSimpleMail(String to, String subject, String content, String... cc) { SimpleMailMessage message = new SimpleMailMessage(); message.setFrom(username); message.setTo(to); message.setSubject(subject); message.setText(content); if (ArrayUtil.isNotEmpty(cc)) { message.setCc(cc); } mailSender.send(message); } @Override public void sendHtmlMail(String to, String subject, String content, String... cc) throws MessagingException { MimeMessage message = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(username); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); if (ArrayUtil.isNotEmpty(cc)) { helper.setCc(cc); } mailSender.send(message); } @Override public void sendAttachmentsMail(String to, String subject, String content, String filePath, String... cc) throws MessagingException { MimeMessage message = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(username); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); if (ArrayUtil.isNotEmpty(cc)) { helper.setCc(cc); } FileSystemResource file = new FileSystemResource(new File(filePath)); String fileName = filePath.substring(filePath.lastIndexOf(File.separator)); helper.addAttachment(fileName, file); mailSender.send(message); } @Override public void sendResourceMail(String to, String subject, String content, String rscPath, String rscId, String... cc) throws MessagingException { MimeMessage message = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true); helper.setFrom(username); helper.setTo(to); helper.setSubject(subject); helper.setText(content, true); if (ArrayUtil.isNotEmpty(cc)) { helper.setCc(cc); } FileSystemResource res = new FileSystemResource(new File(rscPath)); helper.addInline(rscId, res); mailSender.send(message); } }
[ "zhouxinlei298@163.com" ]
zhouxinlei298@163.com
7e64dce18c98ffbad507c1ce207e63875152a1de
50954e28cda402c5ec6d198711bffe3c50b0f7c7
/JavaSE/src/main/resources/src/org/omg/PortableServer/CurrentPackage/NoContextHelper.java
584cced58648b794e8a79d790e1638223026f0af
[]
no_license
bulusky/Note
f7b4a76a4ea5d1f10a122152afacd23a4aed4fd6
73c60b2fccac89d48a7566a265217e601c8fcb79
refs/heads/master
2023-01-03T10:03:29.615608
2020-10-24T09:38:45
2020-10-24T09:38:45
303,957,641
2
0
null
null
null
null
UTF-8
Java
false
false
2,325
java
package org.omg.PortableServer.CurrentPackage; /** * org/omg/PortableServer/CurrentPackage/NoContextHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u251/737/corba/src/share/classes/org/omg/PortableServer/poa.idl * Thursday, March 12, 2020 6:33:11 AM UTC */ abstract public class NoContextHelper { private static String _id = "IDL:omg.org/PortableServer/Current/NoContext:1.0"; public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.CurrentPackage.NoContext that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static org.omg.PortableServer.CurrentPackage.NoContext extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; private static boolean __active = false; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { synchronized (org.omg.CORBA.TypeCode.class) { if (__typeCode == null) { if (__active) { return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); } __active = true; org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [0]; org.omg.CORBA.TypeCode _tcOf_members0 = null; __typeCode = org.omg.CORBA.ORB.init ().create_exception_tc (org.omg.PortableServer.CurrentPackage.NoContextHelper.id (), "NoContext", _members0); __active = false; } } } return __typeCode; } public static String id () { return _id; } public static org.omg.PortableServer.CurrentPackage.NoContext read (org.omg.CORBA.portable.InputStream istream) { org.omg.PortableServer.CurrentPackage.NoContext value = new org.omg.PortableServer.CurrentPackage.NoContext (); // read and discard the repository ID istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.CurrentPackage.NoContext value) { // write the repository ID ostream.write_string (id ()); } }
[ "814192772@qq.com" ]
814192772@qq.com
de4f93cb24a324c1bfb7105c55910ff5903d9a53
4d8b6675e599c1dbec114b7d0f599e34c99b1e1e
/src/main/java/com/danielflower/crickam/scorer/Crictils.java
18ef45297e13c7ecef1508be08233de82ba43b62
[ "MIT" ]
permissive
danielflower/cricket-scorer
af7c86055befb0a6f900edbefaf0f6c032eeb3fc
5ba32d1540acda29a6f96eb1119d307fd5084cac
refs/heads/master
2021-06-24T02:49:59.147395
2021-05-30T10:48:48
2021-05-30T10:48:48
226,673,192
3
0
null
null
null
null
UTF-8
Java
false
false
2,734
java
package com.danielflower.crickam.scorer; import javax.annotation.Nullable; import java.time.Instant; import java.time.LocalDateTime; import java.util.TimeZone; import java.util.function.Supplier; public final class Crictils { public static void stateGuard(boolean assertion, Supplier<String> message) { if (!assertion) { throw new IllegalStateException(message.get()); } } /** * Gets the local time at a time zone as an {@code Instant} * @param timeZone The time zone * @param year The year * @param month The month * @param day The day * @param hour The hour * @param minute The minute * @return The instant of the given time at the given time zone */ public static Instant localTime(TimeZone timeZone, int year, int month, int day, int hour, int minute) { return LocalDateTime.of(year, month, day, hour, minute) .atZone(timeZone.toZoneId()) .toInstant(); } /** * For an input of &quot;1&quot; this returns the string &quot;1st&quot; * @param number The number * @return The given number with its suffix */ public static String withOrdinal(int number) { int last = number % 10; String suffix = (last == 1) ? "st" : (last == 2) ? "nd" : (last == 3) ? "rd" : "th"; return number + suffix; } public static String pluralize(int num, String noun) { return pluralize(num, noun, noun + "s"); } public static String pluralize(int num, String singular, String plural) { return num + " " + (num == 1 ? singular : plural); } public static Integer requireInRange(String name, @Nullable Integer value, int min, int max) { return value == null ? null : requireInRange(name, value.intValue(), min, max); } public static int requireInRange(String name, int value, int min) { return requireInRange(name, value, min, Integer.MAX_VALUE); } public static int requireInRange(String name, int value, int min, int max) { if (value < min) { throw new IllegalArgumentException("The min value allowed for " + name + " is " + min + " but it was " + value); } else if (value > max) { throw new IllegalArgumentException("The max value allowed for " + name + " is " + max + " but it was " + value); } return value; } public static <T> T requireNonNullElseGet(@Nullable T value, Supplier<T> supplier) { return value == null ? supplier.get() : value; } public static <T> T requireNonNullElse(@Nullable T value, T defaultValue) { return value == null ? defaultValue : value; } }
[ "git@danielflower.com" ]
git@danielflower.com
fe40a22584065f5ebaa627a8bf6dc8d2d0af72c2
3f2d606bf82f2690067acd8ac8d438f4a2ebf20e
/src/main/java/me/jiangcai/demo/jms/controller/DemoController.java
1217ad0481ddac61c780bd0928735681c14499ab
[]
no_license
caijiang/jpa-jms-demo
5c6ef88471e71260d6776abb9d1022ea9cbe9b74
1e6858eeeb1efd39fe949777efe4ef9e178a9cd5
refs/heads/master
2021-01-21T16:05:44.272112
2017-05-20T08:15:49
2017-05-20T08:15:49
91,875,116
0
0
null
null
null
null
UTF-8
Java
false
false
1,722
java
package me.jiangcai.demo.jms.controller; import me.jiangcai.demo.jms.entity.Note; import me.jiangcai.demo.jms.repository.NoteRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import java.time.LocalDateTime; /** * 如何演示 cache 的冲突 * * @author CJ */ @Controller public class DemoController { private final NoteRepository noteRepository; @Autowired public DemoController(NoteRepository noteRepository) { this.noteRepository = noteRepository; } @RequestMapping(method = RequestMethod.GET, value = "/") public String index(Model model) { model.addAttribute("notes", noteRepository.findAll()); return "notes.html"; } @RequestMapping(method = RequestMethod.POST, value = "/{id}") @ResponseStatus(HttpStatus.OK) public void change(String text, @PathVariable("id") long id) { Note note = noteRepository.getOne(id); note.setText(text); noteRepository.save(note); } @RequestMapping(method = RequestMethod.POST, value = "/") @ResponseStatus(HttpStatus.OK) public void add(String text) { Note note = new Note(); note.setText(text); note.setCreateTime(LocalDateTime.now()); noteRepository.save(note); } }
[ "luffy.ja@gmail.com" ]
luffy.ja@gmail.com
4987e2557aaeab7b91db8c5135ca286b5142cb4a
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_2652486_1/java/lardingd/GuessItBetter.java
d663428f299428c50a57d9c6146834c05429b565
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
4,457
java
package qualifierFun; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; public class GuessItBetter { public static void main(String[] args) { try { PrintWriter out = new PrintWriter(new FileWriter("output3.txt")); BufferedReader in = new BufferedReader(new FileReader("input.txt")); int answer =1; System.out.print(String.format("Case #%s:\n", answer)); out.write(String.format("Case #%s:\n", answer)); String strLine = in.readLine(); strLine = in.readLine(); String inputs[] = strLine.split(" "); int totalCases = Integer.parseInt(inputs[0]); int totCards = Integer.parseInt(inputs[1]); int max = Integer.parseInt(inputs[2]); int numProducts = Integer.parseInt(inputs[3]); for(int i = 0; i < totalCases; i++) { strLine = in.readLine(); inputs = strLine.split(" "); List<Long> products = new ArrayList<Long>(); for(String input : inputs) { products.add(Long.parseLong(input)); } Collections.sort(products); int cardsUsed = 0; int maxUsed = 0; Map<Integer, Integer> cardsUsedMap = new HashMap<Integer, Integer>(); initMap(cardsUsedMap, max); for(int j = products.size() - 1; j>=0;j--) { long product = products.get(j); if (product == 1) { break; } Map<Integer, Integer> thisProdCards = new HashMap<Integer, Integer>(); initMap(thisProdCards, max); for(int k = max; k >= 2 && product != 1; k--) { while(product % k == 0) { thisProdCards.put(k, thisProdCards.get(k) +1); product /= k; } } int curUsed = 0; for (Entry<Integer, Integer> entry : thisProdCards.entrySet()) { curUsed += entry.getValue(); } if(thisProdCards.containsKey(6)) { while(curUsed < totCards) { thisProdCards.put(6, thisProdCards.get(6)-1); thisProdCards.put(2, thisProdCards.get(2)+1); thisProdCards.put(3, thisProdCards.get(3)+1); curUsed++; } } if(thisProdCards.containsKey(8)) { while(curUsed < totCards) { thisProdCards.put(8, thisProdCards.get(8)-1); thisProdCards.put(2, thisProdCards.get(2)+1); thisProdCards.put(4, thisProdCards.get(4)+1); curUsed++; } } if(thisProdCards.containsKey(9)) { while(curUsed < totCards) { thisProdCards.put(9, thisProdCards.get(9)-1); thisProdCards.put(3, thisProdCards.get(3)+2); curUsed++; } } if(thisProdCards.containsKey(4)) { while(curUsed < totCards) { thisProdCards.put(4, thisProdCards.get(4)-1); thisProdCards.put(2, thisProdCards.get(2)+2); curUsed++; } } for (Entry<Integer, Integer> entry : thisProdCards.entrySet()) { int prev = cardsUsedMap.get(entry.getKey()); int diff = entry.getValue() - prev; if (diff > 0) { cardsUsed += diff; cardsUsedMap.put(entry.getKey(), entry.getValue()); } } if(curUsed > maxUsed) { maxUsed = curUsed; } } if(cardsUsed > totCards && maxUsed < totCards) { System.out.println("hmm"); } String guess = getStringForm(cardsUsedMap, totCards); // System.out.print(String.format("%s\n", guess)); out.write(String.format("%s\n", guess)); answer++; } out.close(); in.close(); } catch (FileNotFoundException e) { System.out.println("I'd want to know"); } catch (IOException e) { System.out.println("I'd want to know io"); } System.out.println("done"); } private static String getStringForm(Map<Integer, Integer> cardsUsedMap, int totCards) { StringBuilder theAnswer = new StringBuilder(); for (Entry<Integer, Integer> entry : cardsUsedMap.entrySet()) { for(int i = 0; i < entry.getValue(); i++) { theAnswer.append(entry.getKey()); } } while (theAnswer.length() < totCards) { theAnswer.append(2); } return theAnswer.substring(0, totCards); } private static void initMap(Map<Integer, Integer> map, int max) { for (int i = 2; i <= max; i++) { map.put(i, 0); } } }
[ "eewestman@gmail.com" ]
eewestman@gmail.com
e4db217cc6d3ae96935122727cd10fd2e677ae84
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/autonavi/minimap/agroup/network/GroupNetworkUtil$3.java
e6c846d222395e69ee2dcc97f6e4c98f67f5cd03
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,714
java
package com.autonavi.minimap.agroup.network; import android.content.Context; import com.amap.bundle.aosservice.request.AosRequest; import com.amap.bundle.aosservice.response.AosByteResponse; import com.amap.bundle.aosservice.response.AosResponse; import com.amap.bundle.aosservice.response.AosResponseCallback; import com.amap.bundle.aosservice.response.AosResponseException; import com.amap.bundle.utils.ui.ToastHelper; import com.autonavi.map.fragmentcontainer.page.utils.AMapPageUtil; import com.autonavi.minimap.R; import com.autonavi.minimap.agroup.entity.GroupInfo; import com.autonavi.minimap.bundle.agroup.api.IDataService.TeamStatus; public class GroupNetworkUtil$3 implements AosResponseCallback<AosByteResponse> { final /* synthetic */ a a; public GroupNetworkUtil$3(a aVar) { this.a = aVar; } public final /* synthetic */ void onSuccess(AosResponse aosResponse) { AosByteResponse aosByteResponse = (AosByteResponse) aosResponse; if (aosByteResponse != null) { byte[] responseBodyData = aosByteResponse.getResponseBodyData(); if (responseBodyData != null) { try { String str = new String(responseBodyData, "UTF-8"); cin.a; cjo.a(); GroupInfo c = cju.c(str); if (c != null) { cjt a2 = cjt.a(); if (a2 != null) { a2.a(c); TeamStatus teamStatus = c.getTeamStatus(); if (teamStatus != null && (teamStatus == TeamStatus.STATUS_USER_IN_OTHER_TEAM || teamStatus == TeamStatus.STATUS_USER_IN_TEAM || teamStatus == TeamStatus.STATUS_USER_IN_THIS_TEAM || teamStatus == TeamStatus.STATUS_LEADER_IN_OTHER_TEAM)) { cuh cuh = (cuh) a.a.a(cuh.class); if (cuh != null) { cuh.q(); } } } } if (this.a != null) { this.a.a(str); } } catch (Exception unused) { cin.a; cjo.c(); } } } } public final void onFailure(AosRequest aosRequest, AosResponseException aosResponseException) { Context appContext = AMapPageUtil.getAppContext(); if (appContext != null) { ToastHelper.showToast(appContext.getString(R.string.network_error)); } if (this.a != null) { this.a.a(""); } } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
c4885e59f366ad57da761861d044942eb4c8bebd
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/gopawpaw/erp/hibernate/r/AbstractRcsdDet.java
9d7c5264c459e0bbb3e729df777f52c364d37e1a
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
7,913
java
package com.gopawpaw.erp.hibernate.r; import java.util.Date; /** * AbstractRcsdDet entity provides the base persistence definition of the * RcsdDet entity. @author MyEclipse Persistence Tools */ public abstract class AbstractRcsdDet implements java.io.Serializable { // Fields private RcsdDetId id; private String rcsdCustPart; private Double rcsdDiscrQty; private Double rcsdCumQty; private String rcsdOrder; private Integer rcsdLine; private String rcsdStatus; private Date rcsdCustBuildDate; private String rcsdDerivedRlseId; private String rcsdCustPo; private Boolean rcsdPicked; private Boolean rcsdXReferenced; private Boolean rcsdDeleted; private String rcsdModUserid; private Date rcsdModDate; private String rcsdModPgm; private String rcsdUser1; private String rcsdUser2; private String rcsdQadc01; private String rcsdQadc02; private Double rcsdQadd01; private Double rcsdQadd02; private Integer rcsdQadi01; private Integer rcsdQadi02; private Boolean rcsdQadl01; private Boolean rcsdQadl02; private Date rcsdQadt01; private Date rcsdQadt02; private String rcsdModelyr; private String rcsdCustref; private Double oidRcsdDet; // Constructors /** default constructor */ public AbstractRcsdDet() { } /** minimal constructor */ public AbstractRcsdDet(RcsdDetId id, String rcsdModelyr, String rcsdCustref, Double oidRcsdDet) { this.id = id; this.rcsdModelyr = rcsdModelyr; this.rcsdCustref = rcsdCustref; this.oidRcsdDet = oidRcsdDet; } /** full constructor */ public AbstractRcsdDet(RcsdDetId id, String rcsdCustPart, Double rcsdDiscrQty, Double rcsdCumQty, String rcsdOrder, Integer rcsdLine, String rcsdStatus, Date rcsdCustBuildDate, String rcsdDerivedRlseId, String rcsdCustPo, Boolean rcsdPicked, Boolean rcsdXReferenced, Boolean rcsdDeleted, String rcsdModUserid, Date rcsdModDate, String rcsdModPgm, String rcsdUser1, String rcsdUser2, String rcsdQadc01, String rcsdQadc02, Double rcsdQadd01, Double rcsdQadd02, Integer rcsdQadi01, Integer rcsdQadi02, Boolean rcsdQadl01, Boolean rcsdQadl02, Date rcsdQadt01, Date rcsdQadt02, String rcsdModelyr, String rcsdCustref, Double oidRcsdDet) { this.id = id; this.rcsdCustPart = rcsdCustPart; this.rcsdDiscrQty = rcsdDiscrQty; this.rcsdCumQty = rcsdCumQty; this.rcsdOrder = rcsdOrder; this.rcsdLine = rcsdLine; this.rcsdStatus = rcsdStatus; this.rcsdCustBuildDate = rcsdCustBuildDate; this.rcsdDerivedRlseId = rcsdDerivedRlseId; this.rcsdCustPo = rcsdCustPo; this.rcsdPicked = rcsdPicked; this.rcsdXReferenced = rcsdXReferenced; this.rcsdDeleted = rcsdDeleted; this.rcsdModUserid = rcsdModUserid; this.rcsdModDate = rcsdModDate; this.rcsdModPgm = rcsdModPgm; this.rcsdUser1 = rcsdUser1; this.rcsdUser2 = rcsdUser2; this.rcsdQadc01 = rcsdQadc01; this.rcsdQadc02 = rcsdQadc02; this.rcsdQadd01 = rcsdQadd01; this.rcsdQadd02 = rcsdQadd02; this.rcsdQadi01 = rcsdQadi01; this.rcsdQadi02 = rcsdQadi02; this.rcsdQadl01 = rcsdQadl01; this.rcsdQadl02 = rcsdQadl02; this.rcsdQadt01 = rcsdQadt01; this.rcsdQadt02 = rcsdQadt02; this.rcsdModelyr = rcsdModelyr; this.rcsdCustref = rcsdCustref; this.oidRcsdDet = oidRcsdDet; } // Property accessors public RcsdDetId getId() { return this.id; } public void setId(RcsdDetId id) { this.id = id; } public String getRcsdCustPart() { return this.rcsdCustPart; } public void setRcsdCustPart(String rcsdCustPart) { this.rcsdCustPart = rcsdCustPart; } public Double getRcsdDiscrQty() { return this.rcsdDiscrQty; } public void setRcsdDiscrQty(Double rcsdDiscrQty) { this.rcsdDiscrQty = rcsdDiscrQty; } public Double getRcsdCumQty() { return this.rcsdCumQty; } public void setRcsdCumQty(Double rcsdCumQty) { this.rcsdCumQty = rcsdCumQty; } public String getRcsdOrder() { return this.rcsdOrder; } public void setRcsdOrder(String rcsdOrder) { this.rcsdOrder = rcsdOrder; } public Integer getRcsdLine() { return this.rcsdLine; } public void setRcsdLine(Integer rcsdLine) { this.rcsdLine = rcsdLine; } public String getRcsdStatus() { return this.rcsdStatus; } public void setRcsdStatus(String rcsdStatus) { this.rcsdStatus = rcsdStatus; } public Date getRcsdCustBuildDate() { return this.rcsdCustBuildDate; } public void setRcsdCustBuildDate(Date rcsdCustBuildDate) { this.rcsdCustBuildDate = rcsdCustBuildDate; } public String getRcsdDerivedRlseId() { return this.rcsdDerivedRlseId; } public void setRcsdDerivedRlseId(String rcsdDerivedRlseId) { this.rcsdDerivedRlseId = rcsdDerivedRlseId; } public String getRcsdCustPo() { return this.rcsdCustPo; } public void setRcsdCustPo(String rcsdCustPo) { this.rcsdCustPo = rcsdCustPo; } public Boolean getRcsdPicked() { return this.rcsdPicked; } public void setRcsdPicked(Boolean rcsdPicked) { this.rcsdPicked = rcsdPicked; } public Boolean getRcsdXReferenced() { return this.rcsdXReferenced; } public void setRcsdXReferenced(Boolean rcsdXReferenced) { this.rcsdXReferenced = rcsdXReferenced; } public Boolean getRcsdDeleted() { return this.rcsdDeleted; } public void setRcsdDeleted(Boolean rcsdDeleted) { this.rcsdDeleted = rcsdDeleted; } public String getRcsdModUserid() { return this.rcsdModUserid; } public void setRcsdModUserid(String rcsdModUserid) { this.rcsdModUserid = rcsdModUserid; } public Date getRcsdModDate() { return this.rcsdModDate; } public void setRcsdModDate(Date rcsdModDate) { this.rcsdModDate = rcsdModDate; } public String getRcsdModPgm() { return this.rcsdModPgm; } public void setRcsdModPgm(String rcsdModPgm) { this.rcsdModPgm = rcsdModPgm; } public String getRcsdUser1() { return this.rcsdUser1; } public void setRcsdUser1(String rcsdUser1) { this.rcsdUser1 = rcsdUser1; } public String getRcsdUser2() { return this.rcsdUser2; } public void setRcsdUser2(String rcsdUser2) { this.rcsdUser2 = rcsdUser2; } public String getRcsdQadc01() { return this.rcsdQadc01; } public void setRcsdQadc01(String rcsdQadc01) { this.rcsdQadc01 = rcsdQadc01; } public String getRcsdQadc02() { return this.rcsdQadc02; } public void setRcsdQadc02(String rcsdQadc02) { this.rcsdQadc02 = rcsdQadc02; } public Double getRcsdQadd01() { return this.rcsdQadd01; } public void setRcsdQadd01(Double rcsdQadd01) { this.rcsdQadd01 = rcsdQadd01; } public Double getRcsdQadd02() { return this.rcsdQadd02; } public void setRcsdQadd02(Double rcsdQadd02) { this.rcsdQadd02 = rcsdQadd02; } public Integer getRcsdQadi01() { return this.rcsdQadi01; } public void setRcsdQadi01(Integer rcsdQadi01) { this.rcsdQadi01 = rcsdQadi01; } public Integer getRcsdQadi02() { return this.rcsdQadi02; } public void setRcsdQadi02(Integer rcsdQadi02) { this.rcsdQadi02 = rcsdQadi02; } public Boolean getRcsdQadl01() { return this.rcsdQadl01; } public void setRcsdQadl01(Boolean rcsdQadl01) { this.rcsdQadl01 = rcsdQadl01; } public Boolean getRcsdQadl02() { return this.rcsdQadl02; } public void setRcsdQadl02(Boolean rcsdQadl02) { this.rcsdQadl02 = rcsdQadl02; } public Date getRcsdQadt01() { return this.rcsdQadt01; } public void setRcsdQadt01(Date rcsdQadt01) { this.rcsdQadt01 = rcsdQadt01; } public Date getRcsdQadt02() { return this.rcsdQadt02; } public void setRcsdQadt02(Date rcsdQadt02) { this.rcsdQadt02 = rcsdQadt02; } public String getRcsdModelyr() { return this.rcsdModelyr; } public void setRcsdModelyr(String rcsdModelyr) { this.rcsdModelyr = rcsdModelyr; } public String getRcsdCustref() { return this.rcsdCustref; } public void setRcsdCustref(String rcsdCustref) { this.rcsdCustref = rcsdCustref; } public Double getOidRcsdDet() { return this.oidRcsdDet; } public void setOidRcsdDet(Double oidRcsdDet) { this.oidRcsdDet = oidRcsdDet; } }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
1e0b797fc4047fac2e30ed9f656171eefc3dd7ac
63bb953f15a8980387fa68f670c28b2a7153b77b
/Games/Logoton/sms-image-converter/src/main/java/com/igormaznitsa/LogotipGrabber/common.java
5d6c405d99c2ccfca621c008a112e92ed171c225
[ "Unlicense" ]
permissive
raydac/old-stuff
867314f6dc042dd4f629f6b8d81082a096b98e3e
68f19ab3857bec5d87c12d23e257b6ccbe9579a6
refs/heads/master
2021-12-12T21:38:13.049479
2021-12-02T22:01:31
2021-12-02T22:01:31
162,352,496
1
0
null
null
null
null
UTF-8
Java
false
false
1,080
java
/* Author : Igor A. Maznitsa EMail : rrg@forth.org.ru Date : 24.03.2002 */ package com.igormaznitsa.LogotipGrabber; import java.applet.Applet; import java.awt.*; import java.io.IOException; import java.io.InputStream; public class common { public static Image loadImageResource(Applet cmp, String name) throws IOException { String resource = "/res/" + name; InputStream imgStream = cmp.getClass().getResourceAsStream(resource); if (imgStream == null) throw new IOException("Can't load resource image: " + resource); Toolkit tk = Toolkit.getDefaultToolkit(); Image img = null; byte imageBytes[] = new byte[imgStream.available()]; imgStream.read(imageBytes); img = tk.createImage(imageBytes); MediaTracker trcker = new MediaTracker(cmp); trcker.addImage(img, 0); try { trcker.waitForID(0); } catch (InterruptedException exx) { return null; } trcker.removeImage(img); return img; } }
[ "rrg4400@gmail.com" ]
rrg4400@gmail.com
b1ac7da63da924cb284f4f8b60c3e9122836bcba
4fb0e1f0d013a346d8e72975599bf2e809d14f1d
/src/main/java/com/guohuai/mmp/investor/referprofit/ProfitClientReq.java
cd929d8537c73f0bdb2f3977ee333cefb3236c2e
[]
no_license
soldiers1989/baofeng.mimosa
86af96bb1638c6b15713c00ed4c29f8efe3bd66c
477296925b6e8d1a7b8fc1400921e12bb35696ce
refs/heads/master
2020-03-28T23:54:35.805684
2018-04-24T06:27:57
2018-04-24T06:27:57
149,315,065
0
1
null
2018-09-18T15:57:01
2018-09-18T15:57:01
null
UTF-8
Java
false
false
544
java
package com.guohuai.mmp.investor.referprofit; import com.guohuai.component.web.view.BaseRep; import lombok.Data; @Data public class ProfitClientReq extends BaseRep{ /** * 默认页数 */ private int page = 1; /** * 默认行数 */ private int row = 10; /** * 结算状态(-1:全部, 0:未结算, 1:已结算) */ private int status = -1; /** * 生成日期(-1:全部, 0:7天, 1:一个月, 2:三个月) */ private int timeDemision = -1; /** * 0:当日排行, 1:本周排行, 2:本月排行 */ private int rank; }
[ "jiangjianmin@baofeng.com" ]
jiangjianmin@baofeng.com
802c3f28e7dd3633380ab255e60eeaef700c2587
753ae67d0f7e969e9b9e051fe2e5bc97fb552cbc
/dkpro-core-api-metadata-asl/src/main/java/de/tudarmstadt/ukp/dkpro/core/api/metadata/Tagset.java
20302a9e4fc5a972ecb5eddc8a96efd70e2c0655
[ "Apache-2.0" ]
permissive
artpar/dkpro-core
14ede5792150f069ded9e473554b94ca39453c60
50bb4980e2f1a8567ef1d6a9935741ccc7a068a0
refs/heads/master
2021-01-16T22:34:59.943305
2016-05-17T10:58:18
2016-05-17T10:59:23
59,201,855
1
0
null
2016-05-19T11:55:31
2016-05-19T11:55:31
null
UTF-8
Java
false
false
1,300
java
/******************************************************************************* * Copyright 2013 * Ubiquitous Knowledge Processing (UKP) Lab * Technische Universität Darmstadt * * 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 de.tudarmstadt.ukp.dkpro.core.api.metadata; import java.util.Map; import java.util.Set; /** * API for getting tagset information. */ public interface Tagset { /** * Get a map (key-value pairs) using the layer name as key and the tagset as value. * * @return the layers. */ Map<String, String> getLayers(); Set<String> listTags(String aLayer, String aTagsetName); TagsetMetaData getMetaData(String aLayer, String aTagsetName); }
[ "richard.eckart@gmail.com" ]
richard.eckart@gmail.com
a8f2a16447b58989c85b910371544cdcf6f0e3d6
ef1d87b64da817da712227fb869b2fd23b32e8a7
/bus-http/src/main/java/org/aoju/bus/http/magic/HttpProxy.java
cf6665ab696891e5e0dbc12f744af392f0c8a848
[ "MIT" ]
permissive
Touhousupports/bus
b4a91563df2118d4b52a7c1345a8eb9c21380fd9
e2e3951b9921d7a92c7e0fdce24781e08b588f00
refs/heads/master
2022-11-22T09:26:18.088266
2020-07-17T02:17:43
2020-07-17T02:17:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,585
java
/********************************************************************************* * * * The MIT License (MIT) * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.http.magic; import org.aoju.bus.http.secure.Authenticator; import org.aoju.bus.http.secure.Credentials; import java.net.InetSocketAddress; /** * HTTP代理配置 * * @author Kimi Liu * @version 6.0.3 * @since JDK 1.8+ */ public class HttpProxy { public final String hostAddress; public final int port; public final String user; public final String password; public final java.net.Proxy.Type type; /** * @param hostAddress 服务器域名或IP,比如aoju.org, 192.168.1.1 * @param port 端口 * @param user 用户名,无则填null * @param password 用户密码,无则填null * @param type 代理类型 */ public HttpProxy(String hostAddress, int port, String user, String password, java.net.Proxy.Type type) { this.hostAddress = hostAddress; this.port = port; this.user = user; this.password = password; this.type = type; } public HttpProxy(String hostAddress, int port) { this(hostAddress, port, null, null, java.net.Proxy.Type.HTTP); } public java.net.Proxy proxy() { return new java.net.Proxy(type, new InetSocketAddress(hostAddress, port)); } public Authenticator authenticator() { return (route, response) -> { String credential = Credentials.basic(user, password); return response.request().newBuilder(). header("Proxy-Authorization", credential). header("Proxy-Connection", "Keep-Alive").build(); }; } }
[ "839536@qq.com" ]
839536@qq.com
ae57587822866683393cd17fcaad1b0c6d4c2960
9b294c3bf262770e9bac252b018f4b6e9412e3ee
/camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr-nocode/com/google/android/gms/internal/l.java
6282ac797b354b06a36df5a8a527c413b8a1eba0
[]
no_license
h265/camera
2c00f767002fd7dbb64ef4dc15ff667e493cd937
77b986a60f99c3909638a746c0ef62cca38e4235
refs/heads/master
2020-12-30T22:09:17.331958
2015-08-25T01:22:25
2015-08-25T01:22:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
161
java
/* * Decompiled with CFR 0_100. */ package com.google.android.gms.internal; public class l extends Exception { public l(); public l(String var1); }
[ "jmrm@ua.pt" ]
jmrm@ua.pt
ea62d93435d2e7d9e678f0d4b83d24405e1357c2
c10d85b642d2be55e61f4e68c79e7bd670b33902
/dubbo-common/src/main/java/com/alibaba/dubbo/common/threadpool/support/fixed/FixedThreadPool.java
620125d84bab8547044ce564f6b8ebde9d188131
[ "Apache-2.0" ]
permissive
yangtao198536/dubbo-2.6.5
5a515a92b9806dffbb4e8d16b212f58b7c0be941
8641164372c8ae70fb1bceed8298ba0f6e43d8b7
refs/heads/master
2020-09-12T07:34:38.491435
2019-11-06T11:24:18
2019-11-06T11:24:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,637
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.dubbo.common.threadpool.support.fixed; import com.alibaba.dubbo.common.Constants; import com.alibaba.dubbo.common.URL; import com.alibaba.dubbo.common.threadlocal.NamedInternalThreadFactory; import com.alibaba.dubbo.common.threadpool.ThreadPool; import com.alibaba.dubbo.common.threadpool.support.AbortPolicyWithReport; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; /** * Creates a thread pool that reuses a fixed number of threads 创建一个线程池,该线程池重用固定数量的线程 * * @see java.util.concurrent.Executors#newFixedThreadPool(int) */ //固定线程池,核心线程一直在等待接收任务,性能优化可以把queues队列长度设置为0,任务会不放入队列,可以提高系统的吞吐量 public class FixedThreadPool implements ThreadPool { @Override public Executor getExecutor(URL url) { String name = url.getParameter(Constants.THREAD_NAME_KEY, Constants.DEFAULT_THREAD_NAME); int threads = url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS); int queues = url.getParameter(Constants.QUEUES_KEY, Constants.DEFAULT_QUEUES); // 如果传入的queues字段值是0会用SynchronousQueue队列,否则会用LinkedBlockingQueue return new ThreadPoolExecutor(threads, threads, 0, TimeUnit.MILLISECONDS, queues == 0 ? new SynchronousQueue<Runnable>() : (queues < 0 ? new LinkedBlockingQueue<Runnable>() : new LinkedBlockingQueue<Runnable>(queues)), new NamedInternalThreadFactory(name, true), new AbortPolicyWithReport(name, url)); } }
[ "xunzhao3456" ]
xunzhao3456
22042791134dd51ecf909af2cb1cbeb7abde3e20
cb7f5ac39a92e2f3123fb9f98c0efd5f0906f404
/src/com/junyeong/yu/models/GroceryStore.java
585e24827d1f447fcac8bc57b08a8c5593becf4a
[]
no_license
junyeongyu/Grocery-Store
7b0393fd22adbd6af9f21e43504662b095c99392
054a861d3d64a07e0879fb3f37e4695c91b77d9a
refs/heads/master
2021-07-07T12:44:27.109028
2017-09-30T03:49:46
2017-09-30T03:49:46
105,339,661
0
0
null
null
null
null
UTF-8
Java
false
false
5,456
java
package com.junyeong.yu.models; import com.junyeong.yu.core.annotations.Bean; import com.junyeong.yu.core.annotations.Inject; import com.junyeong.yu.handler.DataHandlerFile; import com.junyeong.yu.handler.DataHandlerFileExt; import java.time.LocalDateTime; import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Author : Junyeong Yu * Class Code : COMP1030 * Treatments of input interface */ @Bean public class GroceryStore { @Inject public DataContext dataContext; public void setDataContext(DataContext dataContext) { this.dataContext = dataContext; } public void setDataContextDao(DataContextDao dataContextDao) { this.dataContext.setDataContextDao(dataContextDao); } public void setDataHandlerFileExt(DataHandlerFileExt dataHandlerFileExt) { this.dataContext.setDataHandlerFileExt(dataHandlerFileExt); } public void setDataHandlerFile(DataHandlerFile dataHandlerFile) { this.dataContext.setDataContextDaoHandler(dataHandlerFile); } public void runGroceryStore() { dataContext.initialize(); // data initialization Scanner scanner = new Scanner(System.in); while (true) { System.out.println("\nMain Menu\n"); System.out.println("1. Daily Summary - Displays a summary of the daily sales (for Today)"); System.out.println("2. Invoice Recall - Asks for an invoice number then displays the Invoice Detail"); System.out.println("3. Add new purchase"); System.out.println("4. Exit\n"); System.out.print("Please enter your number : "); String response = scanner.nextLine(); if ("1".equals(response)) { // Daily Summary printDailySummary(); // Make sure that data are read from file system. } else if ("2".equals(response)) { // Invoice Recall printInvoiceDetail(); } else if ("3".equals(response)) { // Add new purchase addNewPurchase(); } else if ("4".equals(response)) { // Exit break; } else { // wrong case printWrongNumber(); } } } private void printDailySummary() { System.out.println("\r\n" + dataContext.toSummaryString(LocalDateTime.now())); } private void printInvoiceDetail() { System.out.print("Please Enter Invoice Id : "); Scanner scanner = new Scanner(System.in); String response = scanner.nextLine(); if (isNumber(response) == false) { printWrongNumber(); return; } int invoiceId = Integer.parseInt(response); System.out.println(); for (Invoice invoice : dataContext.getInvoiceList()) { if (invoice.getId() == invoiceId) { System.out.println(invoice.toDetailString()); break; } } } private void addNewPurchase() { // Add new product for same invoice. Scanner scanner = new Scanner(System.in); Invoice invoice = null; while (true) { InvoiceItem invoiceItem = new InvoiceItem(); System.out.print("1. Enter a Product (choose 1 - 4) : "); String response = scanner.nextLine(); if (isNumber(response) == false) { printWrongNumber(); continue; } int productId = Integer.parseInt(response); if (productId < 1 || productId > 4) { printWrongNumber(); continue; } invoiceItem.setProduct(dataContext.getProduct(productId)); System.out.print("2. Enter Quantity : "); response = scanner.nextLine(); if (isNumber(response) == false) { printWrongNumber(); continue; } int quantity = Integer.parseInt(response); if (quantity < 1 || quantity > Integer.MAX_VALUE) { printWrongNumber(); continue; } invoiceItem.setQuantity(quantity); System.out.println("3. Complete - Print Receipt\n"); invoice = dataContext.allocateInvoiceItem(invoice, invoiceItem); printWithReceipt(invoiceItem); System.out.print("Will you continue to add product? (y/n) : "); response = scanner.nextLine(); if ("y".equals(response)) { continue; } dataContext.addInvoice(invoice); break; } } private void printWithReceipt(InvoiceItem invoiceItem) { System.out.println("===== Receipt for Registered Product ===="); System.out.println("Invoice Id : " + invoiceItem.getInvoiceId()); System.out.println("InvoiceItem Id : " + invoiceItem.getId()); System.out.println("Product Id : " + invoiceItem.getProductId()); System.out.println("Product Quantity: " + invoiceItem.getQuantity()); System.out.println("=========================================="); } private void printWrongNumber() { System.out.println("\nYour choice is wrong. Please input again."); } private boolean isNumber(String line) { Pattern p = Pattern.compile("-?\\d+"); Matcher m = p.matcher(line); return m.matches(); } }
[ "=" ]
=
3cf63c858e62bf92e6e88d055460d16584b2cc01
6803987319036e73f92429e357aa3ab8b49c3392
/struts2/apps/showcase/src/test/java/it/org/apache/struts2/showcase/ConversionTest.java
03f06e54a1e8c98d4be947a5cad0725ea29d1a20
[]
no_license
oliverswan/OpenSourceReading
8705eac278c3b73426f6d08fc41d14e245b3b97c
30f5ae445dc1ca64b071dc2f5d3bb5b963a5e705
refs/heads/master
2022-10-27T20:34:16.228853
2012-11-03T01:18:13
2012-11-03T01:18:13
5,302,570
0
1
null
2022-10-04T23:36:00
2012-08-05T10:19:28
Java
UTF-8
Java
false
false
2,444
java
/* * $Id: ConversionTest.java 729923 2008-12-29 15:59:38Z musachy $ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package it.org.apache.struts2.showcase; public class ConversionTest extends ITBaseTest { public void testList() { beginAt("/conversion/enterPersonsInfo.action"); setTextField("persons[0].name", "name0"); setTextField("persons[0].age", "0"); setTextField("persons[1].name", "name1"); setTextField("persons[1].age", "1"); setTextField("persons[2].name", "name2"); setTextField("persons[2].age", "2"); submit(); assertTextPresent("SET 0 Name: name0"); assertTextPresent("SET 0 Age: 0"); assertTextPresent("SET 1 Name: name1"); assertTextPresent("SET 1 Age: 1"); assertTextPresent("SET 2 Name: name2"); assertTextPresent("SET 2 Age: 2"); } public void testSet() { beginAt("/conversion/enterAddressesInfo.action"); setTextField("addresses('id0').address", "address0"); setTextField("addresses('id1').address", "address1"); setTextField("addresses('id2').address", "address2"); submit(); assertTextPresent("id0 -> address0"); assertTextPresent("id1 -> address1"); assertTextPresent("id2 -> address2"); } public void testEnum() { beginAt("/conversion/enterOperationEnumInfo.action"); checkCheckbox("selectedOperations", "ADD"); checkCheckbox("selectedOperations", "MINUS"); submit(); assertTextPresent("ADD"); assertTextPresent("MINUS"); } }
[ "li.fu@agree.com.cn" ]
li.fu@agree.com.cn
2d2a4f369be3dddea262aa935e03c1b0a3ff3a88
9510cd7f96e2cd6b8751fab988038228fe0568c7
/Java(Leetcode)/0047. 全排列 II.java
444b8e847cb2daf5f396c32677933e74dad7112e
[]
no_license
juechen-zzz/LeetCode
2df2e7efe2efe22dc1016447761a629a0da65eda
b5926a3d40ca4a9939e1d604887e0ad7e9501f16
refs/heads/master
2021-08-11T00:37:18.891256
2021-06-13T10:26:31
2021-06-13T10:26:31
180,496,839
2
0
null
null
null
null
UTF-8
Java
false
false
1,223
java
/* 给定一个可包含重复数字的序列 nums ,按任意顺序 返回所有不重复的全排列。 示例 1: 输入:nums = [1,1,2] 输出: [[1,1,2], [1,2,1], [2,1,1]] 示例 2: 输入:nums = [1,2,3] 输出:[[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]] */ class Solution { public List<List<Integer>> permuteUnique(int[] nums) { List<List<Integer>> ans = new ArrayList<>(); List<Integer> track = new ArrayList<>(); boolean[] visited = new boolean[nums.length]; Arrays.sort(nums); backtrack(nums, ans, track, visited); return ans; } public void backtrack(int[] nums, List<List<Integer>> ans, List<Integer> track, boolean[] visited) { if (track.size() == nums.length) { ans.add(new ArrayList(track)); return; } for (int i = 0; i < nums.length; i++) { if (visited[i] || (i > 0 && nums[i] == nums[i - 1] && !visited[i - 1])) { continue; } track.add(nums[i]); visited[i] = true; backtrack(nums, ans, track, visited); visited[i] = false; track.remove(track.size() - 1); } } }
[ "240553516@qq.com" ]
240553516@qq.com
d1d67cedc4e2675cccb505c562e38c3dab24ac38
be68bcbe1055784dfd723aa47ccca52f310fda5f
/sources/p021wl/smartled/activity/C0484g.java
0438b986bafacca0a898d39f515db7da9b414eb7
[]
no_license
nicholaschum/DecompiledEvoziSmartLED
02710bc9b7ddb5db2f7fbbcebfe21605f8e889f8
42d3df21feac3d039219c3384e12e56e5f587028
refs/heads/master
2023-08-18T01:57:52.644220
2021-09-17T20:48:43
2021-09-17T20:48:43
407,675,617
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package p021wl.smartled.activity; import android.content.DialogInterface; import p021wl.smartled.beans.C0524e; import p021wl.smartled.p024c.C0528a; /* renamed from: wl.smartled.activity.g */ final class C0484g implements DialogInterface.OnClickListener { /* renamed from: a */ final /* synthetic */ C0524e f2161a; /* renamed from: b */ final /* synthetic */ MainActivity f2162b; C0484g(MainActivity mainActivity, C0524e eVar) { this.f2162b = mainActivity; this.f2161a = eVar; } public final void onClick(DialogInterface dialogInterface, int i) { C0528a.m1795a().mo4928a(this.f2161a.mo4899a()); this.f2162b.f2098Z.sendEmptyMessage(104); } }
[ "nicholas@prjkt.io" ]
nicholas@prjkt.io
987871bff39965e98faa7fe7a3c139980faa05af
93613ce1278d5873100922bae9fb64a9b9b1ec33
/src/src/main/java/com/fuzzyacornindustries/pokemonmd/item/tamable/ItemOkamiUmbreonKOd.java
2a566e6d7ba5ce0b21d0132d644f06ed4f433d93
[]
no_license
SpikybumJolteon/PokemonMD
8cd0f8d0e110fb25360ea5569f5e1b31a6f76007
5b11ca46c1ea6a75db276614a823efee1cefcefd
refs/heads/master
2020-03-17T01:52:58.695572
2018-11-02T17:25:01
2018-11-02T17:25:01
133,170,244
0
0
null
null
null
null
UTF-8
Java
false
false
993
java
package com.fuzzyacornindustries.pokemonmd.item.tamable; import java.util.List; import com.fuzzyacornindustries.pokemonmd.creativetabs.PokemonMDCreativeTabs; import com.fuzzyacornindustries.pokemonmd.library.ModInfo; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; public class ItemOkamiUmbreonKOd extends Item { public static String itemName = "okamiumbreonkod"; public ItemOkamiUmbreonKOd() { this.maxStackSize = 1; this.setUnlocalizedName(itemName); this.setTextureName(ModInfo.MODID + ":" + "tamables/" + getItemName()); } static public String getItemName() { return itemName; } @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack, EntityPlayer player, List parList, boolean parBoolean) { parList.add("Revive by surrounding with oranian"); parList.add("berries in a crafting table."); } }
[ "fuzzy_acorn_ind@hotmail.com" ]
fuzzy_acorn_ind@hotmail.com
7af824da2821cd6f1b84af6a036d70e24f7f98ff
3287552769c6f1dc735fe4cd70c429eec3f8759a
/codelabor-system/src/main/java/org/codelabor/example/integration/mci/services/FinancialServiceImpl.java
fcf432b3b18408310b87822bf3e8b6c4260abc06
[]
no_license
kwbaek/codelabor
bbe4e4a8852dcb74ffed0cac38e810560eab2106
14e1a623a00d03e924557bf16ddd9b6640dae1d1
refs/heads/master
2020-05-20T10:02:27.014587
2015-07-26T16:16:35
2015-07-26T16:16:35
42,217,187
1
0
null
null
null
null
UTF-8
Java
false
false
4,370
java
package org.codelabor.example.integration.mci.services; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Locale; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.codelabor.example.remoting.message.dtos.KsfcHeaderDTO; import org.codelabor.example.remoting.message.dtos.Saaa001001rInputDTO; import org.codelabor.example.remoting.message.dtos.Saaa001001rOutputDTO; import org.codelabor.system.exceptions.RollbackCommonException; import org.codelabor.system.remoting.message.dtos.MessageHeaderDTO; import org.codelabor.system.remoting.message.dtos.SystemHeaderDTO; import org.codelabor.system.remoting.message.dtos.TransactionHeaderDTO; import org.codelabor.system.services.BaseServiceImpl; public class FinancialServiceImpl extends BaseServiceImpl implements FinancialService { @SuppressWarnings("unused") private final Log log = LogFactory.getLog(FinancialServiceImpl.class); @SuppressWarnings("unchecked") public List search(Date fromDate, Date toDate) throws Exception { DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd", Locale .getDefault()); // input data Saaa001001rInputDTO inputData = new Saaa001001rInputDTO(); String fromDateString = dateFormat.format(fromDate); String toDateString = dateFormat.format(toDate); inputData.setInqStDt(fromDateString); inputData.setInqNdDt(toDateString); // prepare header data // input header - system header SystemHeaderDTO systemHeaderDTO = new SystemHeaderDTO(); systemHeaderDTO.setTrCd("SAAA001001R"); systemHeaderDTO.setScrnNo("10000100"); // systemHeaderDTO.setSysDscd("UA"); // systemHeaderDTO.setTrIdChCode("IUS"); // systemHeaderDTO.setTrIdPid("ep133000"); // systemHeaderDTO.setTrIdReqDt("09081815"); // systemHeaderDTO.setTrIdReqTm("15332237"); // systemHeaderDTO.setTrIdSeq("06"); systemHeaderDTO.setLnkgSno("000"); // systemHeaderDTO.setOgTrId("IUSep1330000908181533223706"); // systemHeaderDTO.setCdVlStupDscd(0); // systemHeaderDTO.setSyncDscd("S"); systemHeaderDTO.setTlgPoutTpcd(0); systemHeaderDTO.setNxtTrYn(0); systemHeaderDTO.setLqPoutSno("00000000"); // systemHeaderDTO.setTmnlIp("124.233.17.64"); systemHeaderDTO.setTmnlTpcd("1"); systemHeaderDTO.setMciSrvId("DITEAI1_SC"); systemHeaderDTO.setMciRqsDt("20090818"); systemHeaderDTO.setMciRqsDtlTm("15331703"); // systemHeaderDTO.setTrRqsChnlCd("IUS"); // systemHeaderDTO.setOgTrRqsChnlCd("IUS"); systemHeaderDTO.setTrPrcsRslCd(0); systemHeaderDTO.setOgTrCd("SAAA001001R"); // input header - transaction header TransactionHeaderDTO transactionHeaderDTO = new TransactionHeaderDTO(); transactionHeaderDTO.setHdbrBdcd("101"); transactionHeaderDTO.setSctnBdcd("0150"); transactionHeaderDTO.setTeamBdcd("1100"); transactionHeaderDTO.setHndEmpno("ep133"); transactionHeaderDTO.setOptrNm("정준호"); // transactionHeaderDTO.setLgnYn(1); transactionHeaderDTO.setRsprAprvTrObjYn("0"); transactionHeaderDTO.setCncTlgDscd(0); transactionHeaderDTO.setTlgTrTpcd(0); transactionHeaderDTO.setSlsDt("20090818"); // input header - message header MessageHeaderDTO messageHeaderDTO = new MessageHeaderDTO(); // input header KsfcHeaderDTO inputHeader = new KsfcHeaderDTO(); inputHeader.setSystemHeaderDTO(systemHeaderDTO); inputHeader.setTransactionHeaderDTO(transactionHeaderDTO); inputHeader.setMessageHeaderDTO(messageHeaderDTO); // output header KsfcHeaderDTO outputHeader = new KsfcHeaderDTO(); // output data Saaa001001rOutputDTO outputData = new Saaa001001rOutputDTO(); // call messageAdapterService.call(inputHeader, inputData, outputHeader, outputData); if (outputHeader.isError()) { messageHeaderDTO = outputHeader.getMessageHeaderDTO(); String messageCode = messageHeaderDTO.getMsgCd(); String messageDescription = messageHeaderDTO.getMsgDesc(); // String messageSupplementCode = messageHeaderDTO.getSplmMsgCd(); // String messageSupplementDescription = messageHeaderDTO // .getSplmMsgDesc(); throw new RollbackCommonException(this.messageSource, messageCode, messageDescription); } else { return outputData.getSaaa001001rOutstrSub(); } } }
[ "codelabor@28bd6c16-bb75-11dd-ad1f-f1f9622dbc98" ]
codelabor@28bd6c16-bb75-11dd-ad1f-f1f9622dbc98
c515dd63c9155c7018e9418765998951848bf4b1
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
/iotcore/src/main/java/com/jdcloud/sdk/service/iotcore/client/CreateProductExecutor.java
9844ad701d48bb1bb9d903c089abde850ccf4694
[ "Apache-2.0" ]
permissive
jdcloud-api/jdcloud-sdk-java
3fec9cf552693520f07b43a1e445954de60e34a0
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
refs/heads/master
2023-07-25T07:03:36.682248
2023-07-25T06:54:39
2023-07-25T06:54:39
126,275,669
47
61
Apache-2.0
2023-09-07T08:41:24
2018-03-22T03:41:41
Java
UTF-8
Java
false
false
1,388
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Product * 关于产品基本信息操作的相关接口 * * OpenAPI spec version: v2 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.iotcore.client; import com.jdcloud.sdk.client.JdcloudExecutor; import com.jdcloud.sdk.service.JdcloudResponse; import com.jdcloud.sdk.service.iotcore.model.CreateProductResponse; /** * 新建产品 */ class CreateProductExecutor extends JdcloudExecutor { @Override public String method() { return "POST"; } @Override public String url() { return "/regions/{regionId}/instances/{instanceId}/products"; } @Override public Class<? extends JdcloudResponse> returnType() { return CreateProductResponse.class; } }
[ "tancong@jd.com" ]
tancong@jd.com
b6be651acab0714f6c90ba9cecc0d4d0af579fca
c8c949b3710fbb4b983d03697ec9173a0ad3f79f
/src/DFSorBFS/ConvertSortedArraytoBinarySearchTree.java
bb5ec0c9aa44657f1e462aea1c5d11ccf9810486
[]
no_license
mxx626/myleet
ae4409dec30d81eaaef26518cdf52a75fd3810bc
5da424b2f09342947ba6a9fffb1cca31b7101cf0
refs/heads/master
2020-03-22T15:11:07.145406
2018-07-09T05:12:28
2018-07-09T05:12:28
140,234,151
2
1
null
null
null
null
UTF-8
Java
false
false
1,379
java
package DFSorBFS; // Tree, DFS public class ConvertSortedArraytoBinarySearchTree { /** * Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1. Example: Given the sorted array: [-10,-3,0,5,9], One possible answer is: [0,-3,9,-10,null,5], which represents the following height balanced BST: 0 / \ -3 9 / / -10 5 * @param nums * @return */ public TreeNode sortedArrayToBST(int[] nums) { if (nums==null || nums.length==0) return null; TreeNode root = helper(nums, 0, nums.length-1); return root; } private TreeNode helper(int[] nums, int start, int end){ if (start>end) return null; if (start==end) return new TreeNode(nums[start]); int mid = start+(end-start)/2; TreeNode node = new TreeNode(nums[mid]); node.left = helper(nums, start, mid-1); node.right = helper(nums, mid+1, end); return node; } class TreeNode{ TreeNode left; TreeNode right; int val; public TreeNode(int val){ this.val=val; } } }
[ "mxx626@outlook.com" ]
mxx626@outlook.com
6078fc39c5c3cfa893a3a1bc46275cc6c73780e1
ce8fef4cc72d2f6dcc018cb6a07b1bbaf0c4f37b
/src/main/java/interview/leetcode/interview/amazon/SubtreeOfAnotherTree.java
6e62bde36a5d019ada642238ed9e3b58ad4762d3
[]
no_license
jojo8775/leet-code
f931b30b293178602e7d142c25f9aeef01b43ab0
2b40cb94883cc5ebc079edb3c98a4a01825c71f9
refs/heads/master
2023-08-04T11:49:15.131787
2023-07-23T00:08:50
2023-07-23T00:08:50
49,825,862
1
0
null
2022-05-20T22:01:52
2016-01-17T16:40:49
HTML
UTF-8
Java
false
false
1,022
java
package interview.leetcode.interview.amazon; import java.util.LinkedList; import java.util.Queue; /** * Is the two given tree a part of subtree. * @author jojo * May 4, 2020 11:22:40 PM */ public class SubtreeOfAnotherTree { public boolean subTree(TreeNode n1, TreeNode n2) { if(n1 == null || n2 == null) { return false; } Queue<TreeNode> q1 = new LinkedList<>(); q1.offer(n1); while(!q1.isEmpty()) { TreeNode top = q1.poll(); if(top == n2) { if(isSubtree(top, n2)) { return true; } } if(top.left != null) { q1.offer(top.left); } if(top.right != null) { q1.offer(top.right); } } return false; } private boolean isSubtree(TreeNode n1, TreeNode n2) { if(n1 != n2) { return false; } if(n1 == null) { return true; } return isSubtree(n1.left, n2.left) && isSubtree(n1.right, n2.right); } private static class TreeNode { int val; TreeNode left, right; public TreeNode(int val) { this.val = val; } } }
[ "chiranjeeb.nandy@yahoo.com" ]
chiranjeeb.nandy@yahoo.com
0f5cc66adc24e3e1be52fca8e2c13fd75efccd18
afb4cf30e328c78efc7adad573a4e4a1870754b6
/High School/Classes/Advance Computer Science/2nd Six Weeks/IMDb Done/src/Part8/Actor.java
b62de66b1d20a07302f33caa9ad211bae561c4c9
[ "Apache-2.0" ]
permissive
mmcclain117/School-Code
5c404aaa9b95df136ba382dff79cb7d44e56b4bc
aa9c501d42fc51fa9a66f53c65b875408a40ea0c
refs/heads/main
2023-01-21T00:27:18.669866
2020-11-29T21:32:52
2020-11-29T21:32:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package Part8; public class Actor { private String na; Actor() { } Actor(String name) { this.na = name; } public String getName() { return na; } public void setName(String name) { na = name; } public String toString() { return na; } }
[ "codingmace@gmail.com" ]
codingmace@gmail.com
bd7098ce091c41c55fb7ce24e7a2552b2c36d99a
ac82c09fd704b2288cef8342bde6d66f200eeb0d
/projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/model/option/definition/GeneralNormalOptionDataBundle.java
db207d635013b56696788e76e358da28d92f86aa
[ "Apache-2.0" ]
permissive
cobaltblueocean/OG-Platform
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
refs/heads/master
2021-08-26T00:44:27.315546
2018-02-23T20:12:08
2018-02-23T20:12:08
241,467,299
0
2
Apache-2.0
2021-08-02T17:20:41
2020-02-18T21:05:35
Java
UTF-8
Java
false
false
3,776
java
/** * Copyright (C) 2009 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.model.option.definition; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.Validate; import org.threeten.bp.ZonedDateTime; import com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve; import com.opengamma.analytics.financial.model.volatility.surface.DriftSurface; import com.opengamma.analytics.financial.model.volatility.surface.VolatilitySurface; /** * data bundle for the SDE df = a(f,t)dt + b(f,t)dw */ public class GeneralNormalOptionDataBundle extends StandardOptionDataBundle { private final DriftSurface _drift; /** * Creates a data bundle for the SDE df = a(f,t)dt + b(f,t)dw * @param discountCurve * @param localDrift The function a(f,t) * @param localVolatility The function b(f,t) * @param spot Time zero value of f * @param date Date created */ public GeneralNormalOptionDataBundle(final YieldAndDiscountCurve discountCurve, final DriftSurface localDrift, final VolatilitySurface localVolatility, final double spot, final ZonedDateTime date) { super(discountCurve, 0.0, localVolatility, spot, date); Validate.notNull(localDrift, "null localDrift"); _drift = localDrift; } public GeneralNormalOptionDataBundle(final GeneralNormalOptionDataBundle data) { super(data); _drift = data.getDriftSurface(); } /** * Gets the drift field. * @return the drift */ public DriftSurface getDriftSurface() { return _drift; } public double getLocalDrift(final double f, final double t) { return _drift.getDrift(f, t); } public double getLocalVolatility(final double f, final double t) { return getVolatility(t, f); } @Override public GeneralNormalOptionDataBundle withInterestRateCurve(final YieldAndDiscountCurve curve) { return new GeneralNormalOptionDataBundle(curve, getDriftSurface(), getVolatilitySurface(), getSpot(), getDate()); } @Override public GeneralNormalOptionDataBundle withVolatilitySurface(final VolatilitySurface surface) { return new GeneralNormalOptionDataBundle(getInterestRateCurve(), getDriftSurface(), surface, getSpot(), getDate()); } @Override public GeneralNormalOptionDataBundle withDate(final ZonedDateTime date) { return new GeneralNormalOptionDataBundle(getInterestRateCurve(), getDriftSurface(), getVolatilitySurface(), getSpot(), date); } @Override public GeneralNormalOptionDataBundle withSpot(final double spot) { return new GeneralNormalOptionDataBundle(getInterestRateCurve(), getDriftSurface(), getVolatilitySurface(), spot, getDate()); } public GeneralNormalOptionDataBundle withDriftSurface(final DriftSurface localDrift) { return new GeneralNormalOptionDataBundle(getInterestRateCurve(), localDrift, getVolatilitySurface(), getSpot(), getDate()); } //TODO finish this once we have the ability to multiply / divide surfaces by a constant amount /*public static ForwardOptionDataBundle fromNormalSurfaces(final DriftSurface localDrift, final VolatilitySurface localVolatility, double f) { }*/ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + _drift.hashCode(); return result; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final GeneralNormalOptionDataBundle other = (GeneralNormalOptionDataBundle) obj; return ObjectUtils.equals(_drift, other._drift); } }
[ "cobaltblue.ocean@gmail.com" ]
cobaltblue.ocean@gmail.com
fc02a862af1f8a7798017f9722357498b060a3ee
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
/maind/src/main/java/com/vvt/appengine/a/bl.java
9ea78ffd33aea55960521e9fe866f9a94dcb86fe
[]
no_license
EchoAGI/Flexispy.re
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
ba65a5b8b033b92c5867759f2727c5141b7e92fc
refs/heads/master
2023-04-26T02:52:18.732433
2018-07-16T07:46:56
2018-07-16T07:46:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,536
java
package com.vvt.appengine.a; import com.vvt.appengine.AppEngine1; import com.vvt.preference.FxPreferenceType; import com.vvt.preference.PrefCallRecordingAudioSource; import com.vvt.preference.b; import com.vvt.remotecontrol.ControlCommand; import com.vvt.remotecontrol.input.RmtCtrlInputCallRecordingAudioSource; import com.vvt.remotecontrol.input.RmtCtrlInputCallRecordingAudioSource.AudioSource; public class bl { private static final boolean a = a.a; public boolean a(ControlCommand paramControlCommand, AppEngine1 paramh) { boolean bool1 = a; if (bool1) {} b localb = paramh.n; Object localObject1 = FxPreferenceType.CALL_RECORDING_AUDIO_SOURCE; localObject1 = (PrefCallRecordingAudioSource)localb.a((FxPreferenceType)localObject1); Object localObject2 = paramControlCommand.getData(); boolean bool2 = localObject2 instanceof RmtCtrlInputCallRecordingAudioSource; if (bool2) { localObject2 = ((RmtCtrlInputCallRecordingAudioSource)localObject2).getAudioSource(); int i = ((RmtCtrlInputCallRecordingAudioSource.AudioSource)localObject2).getId(); bool2 = a; if (bool2) {} ((PrefCallRecordingAudioSource)localObject1).setAudioSource(i); localb.b(); bool1 = a; if (!bool1) {} } bool1 = a; if (bool1) {} return true; } } /* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/appengine/a/bl.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "52388483@qq.com" ]
52388483@qq.com
394af6d7fbeaef0343a4ab172b0e0f0e7038a9e3
286d74972076811b780a6cb748c33c7868cf53a7
/B_Baekjoon/src/Month02_Week04/Main_7562_나이트의이동.java
84038857846835a2c19c4460d06801ef5e2ceec5
[]
no_license
muckyang/Algorithm_Study
8a2d63f1afea5bcbe9fadcfe8d2cdc5010c00487
7ff692c341a012880316dbdb8d0679870039c2d9
refs/heads/master
2023-03-27T14:51:11.200187
2021-03-22T05:59:02
2021-03-22T05:59:02
346,667,291
0
0
null
null
null
null
UTF-8
Java
false
false
1,447
java
package Month02_Week04; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main_7562_나이트의이동 { static int T, N; static int sx, sy, ex, ey, cnt; static boolean[][] visited; static int[] dx = { 2, 2, 1, 1, -1, -1, -2, -2 }; static int[] dy = { 1, -1, 2, -2, -2, 2, -1, 1 }; static Queue<Point> que; private static class Point { int x; int y; public Point(int x, int y) { this.x = x; this.y = y; } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); T = sc.nextInt(); for (int i = 0; i < T; i++) { N = sc.nextInt(); visited = new boolean[N][N]; que = new LinkedList<Point>(); sx = sc.nextInt(); sy = sc.nextInt(); ex = sc.nextInt(); ey = sc.nextInt(); visited[sx][sy] = true; que.add(new Point(sx, sy)); cnt = 0; bfs(); System.out.println(cnt); } } private static void bfs() { while (!que.isEmpty()) { int s = que.size(); for (int k = 0; k < s; k++) { Point p = que.poll(); if(p.x ==ex && p.y ==ey) { return; } for (int d = 0; d < 8; d++) { int ix = p.x + dx[d]; int jy = p.y + dy[d]; if (safe(ix, jy) && !visited[ix][jy]) { visited[ix][jy] = true; que.add(new Point(ix, jy)); } } } cnt++; } } private static boolean safe(int x, int y) { if (x >= 0 && y >= 0 && x < N && y < N) return true; return false; } }
[ "yn782@naver.com" ]
yn782@naver.com
e414a41cf84282f5258632bfa4572ac517f9f4f4
d0f5e1f47d0c99142b5b1932acb230a6d6db768b
/src/main/java/org/codenarc/idea/inspections/comments/JavadocEmptySinceTagInspectionTool.java
9ca5d4735fd27439d28c2897b914f6dd98ca5a8f
[]
no_license
melix/codenarc-idea
f1e3c11c444eb05a23ce29a407e1b84ba12d20f7
567cb81cae1495a3d008fc4e4ab543c22ce6b204
refs/heads/master
2023-08-03T11:10:33.385264
2023-07-31T07:30:32
2023-07-31T07:30:32
1,278,732
10
11
null
2023-07-31T07:30:33
2011-01-21T15:03:47
Java
UTF-8
Java
false
false
1,931
java
package org.codenarc.idea.inspections.comments; import com.intellij.codeInspection.LocalQuickFix; import com.intellij.psi.PsiElement; import java.util.Collection; import java.util.Collections; import javax.annotation.Generated; import org.codenarc.idea.CodeNarcInspectionTool; import org.codenarc.rule.Violation; import org.codenarc.rule.comments.JavadocEmptySinceTagRule; import org.jetbrains.annotations.NotNull; @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely") public class JavadocEmptySinceTagInspectionTool extends CodeNarcInspectionTool<JavadocEmptySinceTagRule> { // this code has been generated from org.codenarc.rule.comments.JavadocEmptySinceTagRule public static final String GROUP = "Comments"; public JavadocEmptySinceTagInspectionTool() { super(new JavadocEmptySinceTagRule()); applyDefaultConfiguration(getRule()); } @Override public String getRuleset() { return GROUP; } public void setAllowMultiline(boolean value) { getRule().setAllowMultiline(value); } public boolean isAllowMultiline() { return getRule().isAllowMultiline(); } public void setApplyToClassNames(String value) { getRule().setApplyToClassNames(value); } public String getApplyToClassNames() { return getRule().getApplyToClassNames(); } public void setDoNotApplyToClassNames(String value) { getRule().setDoNotApplyToClassNames(value); } public String getDoNotApplyToClassNames() { return getRule().getDoNotApplyToClassNames(); } // custom code can be written after this line and it will be preserved during the regeneration @Override protected @NotNull Collection<LocalQuickFix> getQuickFixesFor(Violation violation, PsiElement violatingElement) { return Collections.emptyList(); } }
[ "vladimir@orany.cz" ]
vladimir@orany.cz
ddbfddd8e3b9dcac46cb024c975ca247a82bf857
6b0dcff85194eddf0706e867162526b972b441eb
/extension/core/fabric3-resource/src/main/java/org/fabric3/resource/runtime/SystemSourcedResourceWireAttacher.java
a72b29a3674f2523e171dcd0755411c8e46407fa
[]
no_license
jbaeck/fabric3-core
802ae3889169d7cc5c2f3e2704cfe3338931ec76
55aaa7b2228c9bf2c2630cc196938d48a71274ff
refs/heads/master
2021-01-18T15:27:25.959653
2012-11-04T00:36:36
2012-11-04T00:36:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,382
java
/* * Fabric3 * Copyright (c) 2009-2012 Metaform Systems * * Fabric3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the * GNU General Public License along with Fabric3. * If not, see <http://www.gnu.org/licenses/>. */ package org.fabric3.resource.runtime; import java.net.URI; import org.oasisopen.sca.annotation.Reference; import org.fabric3.resource.provision.SystemSourcedTargetDefinition; import org.fabric3.spi.builder.WiringException; import org.fabric3.spi.builder.component.TargetWireAttacher; import org.fabric3.spi.cm.ComponentManager; import org.fabric3.spi.component.AtomicComponent; import org.fabric3.spi.model.physical.PhysicalSourceDefinition; import org.fabric3.spi.objectfactory.ObjectFactory; import org.fabric3.spi.util.UriHelper; import org.fabric3.spi.wire.Wire; /** * Attaches to a service in the runtime domain. */ public class SystemSourcedResourceWireAttacher implements TargetWireAttacher<SystemSourcedTargetDefinition> { private final ComponentManager manager; public SystemSourcedResourceWireAttacher(@Reference ComponentManager manager) { this.manager = manager; } public void attach(PhysicalSourceDefinition source, SystemSourcedTargetDefinition target, Wire wire) throws WiringException { throw new AssertionError(); } public void detach(PhysicalSourceDefinition source, SystemSourcedTargetDefinition target) throws WiringException { throw new AssertionError(); } public ObjectFactory<?> createObjectFactory(SystemSourcedTargetDefinition target) throws WiringException { URI targetId = UriHelper.getDefragmentedName(target.getUri()); AtomicComponent targetComponent = (AtomicComponent) manager.getComponent(targetId); if (targetComponent == null) { throw new ResourceNotFoundException("Resource not found: " + targetId); } return targetComponent.createObjectFactory(); } }
[ "jim.marino@gmail.com" ]
jim.marino@gmail.com
21304d24f4a426942bfbcfff963f6ebf46fa4f40
f0568343ecd32379a6a2d598bda93fa419847584
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201402/video/TargetingGroupSortable.java
9ffb4d8e034ac1247da8e8a1e5065e93b1ba6759
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
3,395
java
/** * TargetingGroupSortable.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201402.video; public class TargetingGroupSortable implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected TargetingGroupSortable(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _UNKNOWN = "UNKNOWN"; public static final java.lang.String _TARGETING_GROUP_NAME = "TARGETING_GROUP_NAME"; public static final java.lang.String _STATUS = "STATUS"; public static final java.lang.String _BID = "BID"; public static final java.lang.String _TARGETING_GROUP_ID = "TARGETING_GROUP_ID"; public static final TargetingGroupSortable UNKNOWN = new TargetingGroupSortable(_UNKNOWN); public static final TargetingGroupSortable TARGETING_GROUP_NAME = new TargetingGroupSortable(_TARGETING_GROUP_NAME); public static final TargetingGroupSortable STATUS = new TargetingGroupSortable(_STATUS); public static final TargetingGroupSortable BID = new TargetingGroupSortable(_BID); public static final TargetingGroupSortable TARGETING_GROUP_ID = new TargetingGroupSortable(_TARGETING_GROUP_ID); public java.lang.String getValue() { return _value_;} public static TargetingGroupSortable fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { TargetingGroupSortable enumeration = (TargetingGroupSortable) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static TargetingGroupSortable fromString(java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } public boolean equals(java.lang.Object obj) {return (obj == this);} public int hashCode() { return toString().hashCode();} public java.lang.String toString() { return _value_;} public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);} public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumSerializer( _javaType, _xmlType); } public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumDeserializer( _javaType, _xmlType); } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TargetingGroupSortable.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/video/v201402", "TargetingGroupSortable")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "cseeley@google.com" ]
cseeley@google.com
0914cf13fbcff85d537728fdc6c267ad57c11d85
94ab5579518876367c41fd0cc5016a65c447e52b
/src/test/java/com/cdi/model/oa/filter/UserAssignedSalesFilter.java
cf8adde51cdc8d3c40ba5b7de2cdfb165fc7e915
[ "Apache-2.0" ]
permissive
ViaOA/oa-core
31688eb10f304944054fa9b7372e95da927d2123
a30ce92c6eb1d9557cd1145353717043b4cd0e23
refs/heads/master
2023-08-17T10:27:38.649812
2022-12-26T21:45:22
2022-12-26T21:45:22
180,035,642
0
0
Apache-2.0
2022-12-25T18:39:54
2019-04-07T23:21:08
Java
UTF-8
Java
false
false
3,334
java
// Generated by OABuilder package com.cdi.model.oa.filter; import java.util.logging.*; import com.cdi.model.oa.*; import com.cdi.model.oa.propertypath.*; import com.viaoa.annotation.*; import com.viaoa.object.*; import com.viaoa.hub.*; import com.viaoa.util.*; import java.util.*; import com.cdi.model.search.*; import com.cdi.model.oa.search.*; @OAClass(useDataSource=false, localOnly=true) @OAClassFilter(name = "AssignedSales", displayName = "Assigned Sales", hasInputParams = false) public class UserAssignedSalesFilter extends OAObject implements CustomHubFilter<User> { private static final long serialVersionUID = 1L; private static Logger LOG = Logger.getLogger(UserAssignedSalesFilter.class.getName()); public static final String PPCode = ":AssignedSales()"; private Hub<User> hubMaster; private Hub<User> hub; private HubFilter<User> hubFilter; private OAObjectCacheFilter<User> cacheFilter; private boolean bUseObjectCache; public UserAssignedSalesFilter() { this(null, null, false); } public UserAssignedSalesFilter(Hub<User> hub) { this(null, hub, true); } public UserAssignedSalesFilter(Hub<User> hubMaster, Hub<User> hub) { this(hubMaster, hub, false); } public UserAssignedSalesFilter(Hub<User> hubMaster, Hub<User> hubFiltered, boolean bUseObjectCache) { this.hubMaster = hubMaster; this.hub = hubFiltered; this.bUseObjectCache = bUseObjectCache; if (hubMaster != null) getHubFilter(); if (bUseObjectCache) getObjectCacheFilter(); } public void reset() { } public boolean isDataEntered() { return false; } public void refresh() { if (hubFilter != null) getHubFilter().refresh(); if (cacheFilter != null) getObjectCacheFilter().refresh(); } @Override public HubFilter<User> getHubFilter() { if (hubFilter != null) return hubFilter; if (hubMaster == null) return null; hubFilter = new HubFilter<User>(hubMaster, hub) { @Override public boolean isUsed(User user) { return UserAssignedSalesFilter.this.isUsed(user); } }; hubFilter.addDependentProperty(UserPP.salesAssignedToList(), false); hubFilter.refresh(); return hubFilter; } public OAObjectCacheFilter<User> getObjectCacheFilter() { if (cacheFilter != null) return cacheFilter; if (!bUseObjectCache) return null; cacheFilter = new OAObjectCacheFilter<User>(hub) { @Override public boolean isUsed(User user) { return UserAssignedSalesFilter.this.isUsed(user); } @Override protected void reselect() { UserAssignedSalesFilter.this.reselect(); } }; cacheFilter.addDependentProperty(UserPP.salesAssignedToList(), false); cacheFilter.refresh(); return cacheFilter; } public void reselect() { // can be overwritten to query datasource } // ================== // this method has custom code that will need to be put into the OABuilder filter @Override public boolean isUsed(User user) { boolean b = user.getSalesAssignedToList(); return b; } }
[ "vince@viaoa.com" ]
vince@viaoa.com
71bc915e01278b51a05935787475eef9a59b2c0b
b61a8ce87a27a325dba024f3d0fc67fb596fd291
/0524/LoopReturn.java
cf1bdf30cb155a03b878703b9f1ebda193977a78
[]
no_license
sagek23/Java-Training
df8b7003b2d791f99c195433f61685a3ded3988a
015e3dfffb10e3665960a71203cfcf37783048df
refs/heads/master
2022-07-12T06:42:13.632644
2019-10-31T00:36:09
2019-10-31T00:36:09
218,571,922
0
0
null
2022-06-22T20:06:54
2019-10-30T16:24:33
Java
UHC
Java
false
false
248
java
class LoopReturn { public static void main(String[] args) { int i = 1; for(;;) { System.out.println("Hello World!"); i++; if(i>3) return; //이 위치에서 메소드를 종료 } System.out.println("작업종료"); } }
[ "ksjsjk123@gmail.com" ]
ksjsjk123@gmail.com
f53f2426a2e0c0c808265105ee31897b8e0ac382
a54d82a965501095d249cc55b02ce09650ca13bd
/inxedu_web/inxedu-common/src/main/java/com/inxedu/os/edu/service/user/UserLoginLogService.java
02ce1b1c80253b308bc8ecaac2f8fc626e938c65
[]
no_license
Win5201314/itbook
69887df75ec634839aeb29d7775265c920585510
9ca674c92fe0f3e1b7b2cc777a40712c9fa1f446
refs/heads/master
2022-12-21T19:43:33.194444
2020-01-03T04:30:21
2020-01-03T04:30:21
220,926,271
0
0
null
2022-12-16T08:04:59
2019-11-11T07:35:54
JavaScript
UTF-8
Java
false
false
774
java
package com.inxedu.os.edu.service.user; import com.inxedu.os.common.entity.PageEntity; import com.inxedu.os.edu.entity.user.UserLoginLog; import java.util.List; /** * @author www.inxedu.com * */ public interface UserLoginLogService { /** * 添加登录日志 * @param loginLog * @return 日志ID */ int createLoginLog(UserLoginLog loginLog); /** * 查询用户登录日志 * @param userId 用户ID * @param page 分页条件 * @return List<UserLoginLog> */ List<UserLoginLog> queryUserLogPage(int userId, PageEntity page); /** * 查询用户登录日志 */ List<UserLoginLog> queryUserLoginLog(UserLoginLog userLoginLog); /** * 根据条件删除 用户登录日志 */ void delUserLoginLogByCondition(UserLoginLog userLoginLog); }
[ "zsl" ]
zsl
09352c6f9a3095d77a05ccb9e04e8599dd3866db
4eabb690090c91ed1c2f3b1ad67aa56c8e9ce27b
/platforms/android/fit-we/src/main/java/com/fit/we/library/extend/weex/IWeexHandler.java
cc2daa284be6a0b2540ede4a21339082da8beee2
[]
no_license
minyangcheng/fit-we
a9aa3c650c9dd7b2926363ecf9f7f0df999078a7
26d56956515d3a3dfc29245d5855659d5d5299df
refs/heads/master
2020-03-08T03:45:56.042921
2018-11-12T08:36:58
2018-11-12T08:36:58
127,900,374
7
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.fit.we.library.extend.weex; import android.view.View; /** * Created by minych on 18-11-9. */ public interface IWeexHandler { LongCallbackHandler getLongCallbackHandler(); void refresh(); void showHudDialog(String message, boolean cancelable); void hideHudDialog(); void setNBVisibility(boolean visible); void setNBBackBtnVisibility(boolean visible); void setNBTitle(String title, String subTitle); void setNBTitleClickable(boolean clickable, int arrow); void setNBLeftBtn(String imageUrl, String text); void hideNBLeftBtn(); void setNBRightBtn(int which, String imageUrl, String text); void hideNBRightBtn(int which); View getNBRoot(); }
[ "332485508@qq.com" ]
332485508@qq.com
dccd6f37479711b2c811417c33145ceb3c47b1f7
eb2c22492d4740a3eb455f2a898f6b3bc8235809
/jnnsBank/image-service/src/main/java/com/ideatech/ams/image/dto/XmlNEAR_PATH.java
11d5be423d4ffbdcee1c15b2f4202377bbccf86b
[]
no_license
deepexpert-gaohz/sa-d
72a2d0cbfe95252d2a62f6247e7732c883049459
2d14275071b3d562447d24bd44d3a53f5a96fb71
refs/heads/master
2023-03-10T08:39:15.544657
2021-02-24T02:17:58
2021-02-24T02:17:58
341,395,351
1
0
null
null
null
null
UTF-8
Java
false
false
416
java
package com.ideatech.ams.image.dto; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name="NEAR_PATH") public class XmlNEAR_PATH { private String string; @XmlElement(name="string") public String getString() { return string; } public void setString(String string) { this.string = string; } }
[ "807661486@qq.com" ]
807661486@qq.com
604741b1e0e13e74a0a87fbf6ff740e8ac04a6e1
6291cb1f32700130e231a221e0fc12d92d1a9e70
/src/main/java/com/isaccanedo/springboot/swagger/resource/HelloResource.java
f72c6b6014935822d35533600be796925fdacc17
[]
no_license
isaccanedo/spring-boot-swagger
f501a4094767fa8f72230e9025d191d54f6553fa
0151cae3a2ccf0a59986d6c3e95fcecd8b8a739d
refs/heads/master
2022-12-12T11:37:02.088752
2020-08-26T12:44:38
2020-08-26T12:44:38
290,272,368
0
0
null
null
null
null
UTF-8
Java
false
false
1,101
java
package com.isaccanedo.springboot.swagger.resource; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/rest/hello") @Api(value = "HelloWorld Resource", description = "shows hello world") public class HelloResource { @ApiOperation(value = "Returns Hello World") @ApiResponses( value = { @ApiResponse(code = 100, message = "100 is the message"), @ApiResponse(code = 200, message = "Successful Hello World") } ) @GetMapping public String hello() { return "Hello World"; } @ApiOperation(value = "Returns Hello World") @PostMapping("/post") public String helloPost(@RequestBody final String hello) { return hello; } @ApiOperation(value = "Returns Hello World") @PutMapping("/put") public String helloPut(@RequestBody final String hello) { return hello; } }
[ "isaccanedo@gmail.com" ]
isaccanedo@gmail.com
981432e1122c39729d33039631f180de30dad1b5
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/neo4j/learning/2163/BoltStateMachineStateTestBase.java
bbecc8bdbcb91532be5c0daa77e486fdd1e9a862
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,914
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.bolt.v3.runtime.integration; import org.junit.jupiter.api.extension.RegisterExtension; import org.neo4j.bolt.BoltChannel; import org.neo4j.bolt.testing.BoltTestUtil; import org.neo4j.bolt.v3.BoltProtocolV3; import org.neo4j.bolt.v3.BoltStateMachineV3; import org.neo4j.bolt.v3.messaging.request .HelloMessage; import org.neo4j.helpers.collection.MapUtil; import org.neo4j.values.virtual.MapValue; import org.neo4j.values.virtual.VirtualValues; class BoltStateMachineStateTestBase { protected static final MapValue EMPTY_PARAMS = VirtualValues.EMPTY_MAP; protected static final String USER_AGENT = "BoltConnectionIT/0.0"; protected static final BoltChannel BOLT_CHANNEL = BoltTestUtil.newTestBoltChannel( "conn-v3-test-boltchannel-id" ); @RegisterExtension static final SessionExtension env = new SessionExtension(); protected BoltStateMachineV3 newStateMachine() { return (BoltStateMachineV3) env.newMachine( BoltProtocolV3.VERSION, BOLT_CHANNEL ); } protected static HelloMessage newHelloMessage() { return new HelloMessage( MapUtil.map( "user_agent", USER_AGENT ) ); } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
459a437c60c369f808826f3cc475e7652fecce82
abde66a1d8b728455a72d5b805d47b8439429a65
/src/rnaseq/mapping/tools/star/SummarizeStarMapping.java
2b4f47720ff011bafccecb66c3693501ec72a9b4
[]
no_license
gatechatl/DRPPM
0fe163ec70b5b6eb5b271767bde60be1757bbdfb
a45ca68cc8b9de8245f7d1d7d3300646fde45383
refs/heads/master
2023-07-06T12:58:32.868792
2023-06-22T19:40:16
2023-06-22T19:40:16
39,201,419
5
4
null
null
null
null
UTF-8
Java
false
false
2,909
java
package rnaseq.mapping.tools.star; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileWriter; import java.io.InputStreamReader; import java.util.LinkedList; public class SummarizeStarMapping { public static String type() { return "RNASEQMAPPING"; } public static String description() { return "Summarize the reads statistics"; } public static String parameter_info() { return "[inputFileList] [outputFile]"; } public static void execute(String[] args) { try { LinkedList list = new LinkedList(); String inputFile = args[0]; String outputFile = args[1]; FileWriter fwriter = new FileWriter(outputFile); BufferedWriter out = new BufferedWriter(fwriter); out.write("SampleName\tTOTAL_READS\tMAPPED\tNONDUPS_MAPPED\tPERCENT_MAPPED\tPERCENT_DUPS\n"); FileInputStream fstream = new FileInputStream(inputFile); DataInputStream din = new DataInputStream(fstream); BufferedReader in = new BufferedReader(new InputStreamReader(din)); while (in.ready()) { String str = in.readLine(); String[] split = str.split("\t"); String logFileName = split[2] + "Log.final.out"; int totalReads = 0; int uniqMapReads = 0; String percent_uniq_map_reads = ""; int multiple_loci = 0; int too_many_loci = 0; FileInputStream fstream2 = new FileInputStream(logFileName); DataInputStream din2 = new DataInputStream(fstream2); BufferedReader in2 = new BufferedReader(new InputStreamReader(din2)); while (in2.ready()) { String str2 = in2.readLine(); str2 = str2.replaceAll(" ", "").replaceAll("\\|", ""); String[] split2 = str2.split("\t"); //System.out.println(str2); //System.out.println(split2[0]); if (split2[0].equals("Numberofinputreads")) { totalReads = new Integer(split2[1]); } if (split2[0].equals("Uniquelymappedreadsnumber")) { uniqMapReads = new Integer(split2[1]); } if (split2[0].equals("Uniquelymappedreads%")) { percent_uniq_map_reads = split2[1]; } if (split2[0].equals("Numberofreadsmappedtomultipleloci")) { multiple_loci = new Integer(split2[1]); } if (split2[0].equals("Numberofreadsmappedtotoomanyloci")) { too_many_loci = new Integer(split2[1]); } } in2.close(); double total_multiple = too_many_loci + multiple_loci; double total_mapped = uniqMapReads + too_many_loci + multiple_loci; double percent_multiple = total_multiple / totalReads; double percent_mapped = total_mapped / totalReads; out.write(split[2] + "\t" + totalReads + "\t" + total_mapped + "\t" + (total_mapped - total_multiple) + "\t" + percent_mapped + "\t" + percent_multiple + "\n"); } in.close(); out.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "gatechatl@gmail.com" ]
gatechatl@gmail.com
1d81df5a6efe75f71276115c47470cdf0e2c17ab
f65b2cdc1970308ab26a7cf36da52f470cb5238a
/app/src/main/java/com/homepaas/sls/mvp/model/CallLogModel.java
f6e4439dfeb6f99e6e2caca622d15a580308b2f4
[]
no_license
Miotlink/MAndroidClient
5cac8a0eeff2289eb676a4ddd51a90926a6ff7ad
83cbd50c38662a7a3662221b52d6b71f157d9740
refs/heads/master
2020-04-18T11:24:18.926374
2019-01-25T06:44:13
2019-01-25T06:44:13
167,498,578
0
0
null
null
null
null
UTF-8
Java
false
false
2,579
java
package com.homepaas.sls.mvp.model; /** * on 2016/1/28 0028 * * @author zhudongjie . */ public class CallLogModel { private String id; private String name; private String photoUrl; private int type; private boolean dialled; private String phoneNumber; private String attribution; private String time; private int count; private boolean callable = true; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhotoUrl() { return photoUrl; } public void setPhotoUrl(String photoUrl) { this.photoUrl = photoUrl; } public int getType() { return type; } public void setType(int type) { this.type = type; } public boolean isDialled() { return dialled; } public void setDialled(boolean dialled) { this.dialled = dialled; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getAttribution() { return attribution; } public void setAttribution(String attribution) { this.attribution = attribution; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } public boolean isCallable() { return callable; } public void setCallable(boolean callable) { this.callable = callable; } @Override public String toString() { final StringBuilder sb = new StringBuilder("CallLogModel{"); sb.append("id='").append(id).append('\''); sb.append(", name='").append(name).append('\''); sb.append(", photoUrl='").append(photoUrl).append('\''); sb.append(", type=").append(type); sb.append(", dialled=").append(dialled); sb.append(", phoneNumber='").append(phoneNumber).append('\''); sb.append(", attribution='").append(attribution).append('\''); sb.append(", time='").append(time).append('\''); sb.append(", count=").append(count); sb.append(", callable=").append(callable); sb.append('}'); return sb.toString(); } }
[ "pm@miotlinl.com" ]
pm@miotlinl.com
05fec85561fa1526cf2ab4bd78692bf6b145b9fe
fe054c25369a5d0d58fa17c3f827c3b0ee0b3c0b
/Back-End/springboot/src/main/java/com/capgemini/springboot/dto/EmployeeResponse.java
949c74c8a204c6bd984a9b991cc405ae918d5654
[]
no_license
SurajkhanPinjar/TY_CG_HTD_BangaloreNovember_JFS_SurajkhanPinjar
4bdc6bacfbb547f4adc4811ec207745e3a53e17c
85dfcdde17a86dd61a7ee83cfea04a0497880ba6
refs/heads/master
2023-01-12T14:37:49.797977
2020-06-15T04:03:35
2020-06-15T04:03:35
225,843,658
0
1
null
2023-01-07T14:14:27
2019-12-04T10:47:21
Java
UTF-8
Java
false
false
757
java
package com.capgemini.springboot.dto; import java.util.List; public class EmployeeResponse { private int statusCode; private String message; private String discription; private List<EmployeeBean> beans; public int getStatusCode() { return statusCode; } public void setStatusCode(int statusCode) { this.statusCode = statusCode; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getDiscription() { return discription; } public void setDiscription(String discription) { this.discription = discription; } public List<EmployeeBean> getBeans() { return beans; } public void setBeans(List<EmployeeBean> beans) { this.beans = beans; } }
[ "surajkhanpinjar@gmail.com" ]
surajkhanpinjar@gmail.com
558f46c5df4e99123289f9051c92ddcb0cecf87b
ceed8ee18ab314b40b3e5b170dceb9adedc39b1e
/android/vendor/fvd/package/DragonAging/src/com/softwinner/agingdragonbox/engine/testcase/CaseThreeDimensional.java
bd498d06dedb9680cc652cdff3ff53624935b167
[]
no_license
BPI-SINOVOIP/BPI-H3-New-Android7
c9906db06010ed6b86df53afb6e25f506ad3917c
111cb59a0770d080de7b30eb8b6398a545497080
refs/heads/master
2023-02-28T20:15:21.191551
2018-10-08T06:51:44
2018-10-08T06:51:44
132,708,249
1
1
null
null
null
null
UTF-8
Java
false
false
2,875
java
package com.softwinner.agingdragonbox.engine.testcase; import android.view.ViewGroup; import java.util.Timer; import java.util.TimerTask; import com.softwinner.agingdragonbox.R; import com.softwinner.agingdragonbox.ThreadVar; import com.softwinner.agingdragonbox.engine.BaseCase; import com.softwinner.agingdragonbox.xml.Node; /** * 3D测试 * * @author zhengxiangna * */ public class CaseThreeDimensional extends BaseCase { private ThreeDimensionalView mThreeDimensionalView; private ViewGroup iewGroup; private TimerTask mTimerTask; private Timer mTimer = new Timer(); private boolean threadExit = true; private boolean threadExitDdr = true; private static int ledTime = 500; Thread browseThread = null; ThreadVar threadVar = new ThreadVar(); @Override protected void onInitialize(Node attr) { setView(R.layout.case_threedimensional); setName(R.string.case_memory_name); mThreeDimensionalView = new ThreeDimensionalView(mContext); iewGroup = (ViewGroup) getView().findViewById(R.id.myViewGroup); } @Override protected boolean onCaseStarted() { iewGroup.addView(mThreeDimensionalView, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); return false; } @Override protected void onCaseFinished() { } @Override protected void onRelease() { } private void chanceLedStatus(int status) { if (status > 0) { com.softwinner.Gpio.setNormalLedOn(false); com.softwinner.Gpio.setStandbyLedOn(true); } else { com.softwinner.Gpio.setNormalLedOn(true); com.softwinner.Gpio.setStandbyLedOn(false); } } private void startCtrlLedThread() { browseThread = new Thread() { public void run() { try { threadExit = threadVar.threadExit; threadExitDdr = threadVar.threadExitDdr; while (threadExitDdr && threadExit) { if (ledTime <= 0) { ledTime = 500; } chanceLedStatus(0); Thread.sleep(ledTime); chanceLedStatus(1); Thread.sleep(ledTime); threadExit = threadVar.threadExit; threadExitDdr = threadVar.threadExitDdr; } chanceLedStatus(0); } catch (Exception e) { e.printStackTrace(); } } }; browseThread.start(); } }
[ "Justin" ]
Justin
982e352b196f822b6592309ad292cd5bf7ec42b2
d381092dd5f26df756dc9d0a2474b253b9e97bfb
/impe3/impe3-palette/src/main/java/com/isotrol/impe3/palette/html/StyleComponent.java
5d06f36cfaa8969d8bb4f58d551c60e16a82ad57
[]
no_license
isotrol-portal3/portal3
2d21cbe07a6f874fff65e85108dcfb0d56651aab
7bd4dede31efbaf659dd5aec72b193763bfc85fe
refs/heads/master
2016-09-15T13:32:35.878605
2016-03-07T09:50:45
2016-03-07T09:50:45
39,732,690
0
1
null
null
null
null
UTF-8
Java
false
false
2,538
java
/** * This file is part of Port@l * Port@l 3.0 - Portal Engine and Management System * Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com * * Port@l is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Port@l is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Port@l. If not, see <http://www.gnu.org/licenses/>. */ package com.isotrol.impe3.palette.html; import static com.isotrol.impe3.api.component.html.HTMLConstants.CLASS; import com.isotrol.impe3.api.component.ComponentResponse; import com.isotrol.impe3.api.component.Inject; import com.isotrol.impe3.api.component.RenderContext; import com.isotrol.impe3.api.component.Renderer; import com.isotrol.impe3.api.component.VisualComponent; import com.isotrol.impe3.api.component.html.HTML; import com.isotrol.impe3.api.component.html.HTMLFragment; import com.isotrol.impe3.api.component.html.HTMLRenderer; import com.isotrol.impe3.api.component.html.SkeletalHTMLRenderer; import com.isotrol.impe3.api.component.html.Tag; /** * Style Component. * @author Andres Rodriguez */ public class StyleComponent implements VisualComponent { /** Component configuration. */ private StyleConfig config; /** CSS class to apply. */ private String klass = null; /** * Public constructor. */ public StyleComponent() { } @Inject public void setConfig(StyleConfig config) { this.config = config; } /** * @see com.isotrol.impe3.api.component.EditModeComponent#edit() */ public void edit() { if (config != null) { klass = config.classAtt(); if (klass.length() == 0) { klass = null; } } } /** * Execute component. */ public ComponentResponse execute() { edit(); return ComponentResponse.OK; } @Renderer public HTMLRenderer html(final RenderContext context) { return new SkeletalHTMLRenderer() { @Override public HTMLFragment getBody() { final Tag div = HTML.create(context).div(); if (klass != null) { div.set(CLASS, klass); } return div; } }; } }
[ "isotrol-portal@portal.isotrol.com" ]
isotrol-portal@portal.isotrol.com
a94c89929ad05c6750c39ac074769469ff4e9d46
d04f1e1d63ca803ef90a757e6c029f4fc0e1d217
/src/cn/edu/buaa/act/service4all/bpmnexecution/endpoints/StartBPMNFeedbackInvoker.java
5732d5403ac56620380d40d719675ec9c80fb882
[]
no_license
winstone/Service4All
e7c08286c3704892798f91eb70a8247b20748856
a190a95a2599e75ae533699c62c494923f6660ac
refs/heads/master
2021-01-01T17:28:09.499684
2014-08-04T07:59:58
2014-08-04T07:59:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,179
java
package cn.edu.buaa.act.service4all.bpmnexecution.endpoints; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.act.sdp.appengine.cmp.Invoker; import org.act.sdp.appengine.messaging.ExchangeContext; import org.act.sdp.appengine.transaction.exception.MessageExchangeInvocationException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import cn.edu.buaa.act.service4all.bpmnexecution.BPMNEngineInfo; import cn.edu.buaa.act.service4all.bpmnexecution.Constants; import cn.edu.buaa.act.service4all.bpmnexecution.Job; /** * feedback the starting of an BPMN execution * * @author dell * */ public class StartBPMNFeedbackInvoker extends Invoker{ private static final Log logger = LogFactory.getLog(StartBPMNFeedbackInvoker.class); /** * the feedback message: * <BPMNExecutionFeedback serviceId="" jobId="" status="start"> * <engineList> * <engine id="" status="true | false"/> * <engine id="" status="true | false"/> * </engineList> * </BPMNExecutionFeedback> * * the context will have a job instance and a selected BPMNEngineInfo instance * */ @Override public Document createRequestDocument(ExchangeContext context) throws MessageExchangeInvocationException { // TODO Auto-generated method stub // get the serviceId and bpmnengineid Job job = (Job)context.getData(Constants.job); BPMNEngineInfo engine = (BPMNEngineInfo)context.getData(Constants.selected_engine); try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.newDocument(); Element root=doc.createElement("BPMNExecuteFeedback"); root.setAttribute("serviceId", job.getServiceID()); root.setAttribute("jobId", job.getJobID()); root.setAttribute("status", "start");// indicate the start of bpmn execution doc.appendChild(root); Element engList = doc.createElement("engineList"); Element engEle = doc.createElement("engine"); engEle.setAttribute("id", engine.getEngineID()); engEle.setAttribute("status", "true"); engList.appendChild(engEle); root.appendChild(engList); return doc; } catch (ParserConfigurationException e) { // TODO Auto-generated catch block logger.warn("Can't create the request document: " + e); } return null; } /** * the response have to include the jobId * <BPMNExecutionFeedbackResponse jobId=""> * * </BPMNExecutionFeedbackResponse> * */ @Override public void handleResponse(Document resp, ExchangeContext context) throws MessageExchangeInvocationException { // TODO Auto-generated method stub Element root = resp.getDocumentElement(); String jobId = root.getAttribute("jobId"); BPMNExecuteReceiveBussinessUnit parentUnit = (BPMNExecuteReceiveBussinessUnit)this.unit; Job job = parentUnit.getTaskManager().getJobByID(jobId); context.storeData(Constants.job, job); // just send out response message this.unit.getReceiver().sendResponseMessage(context); } }
[ "yzdxtyatbj@sina.cn" ]
yzdxtyatbj@sina.cn
6da4cda6b2f9228e7d7571ea407d31b13a10dd62
9d58c31119c612bb6c8a23657b96571048b44155
/minecraft_server/net/minecraft/entity/ai/EntityAIFleeSun.java
682d793b5625cfb751f541e60ce000baa01972ca
[]
no_license
lucaap/minecraft-mods
bcffdb123ca46a3127a14fa7635b3bbfc9852d2c
25c84fa3977d0477c9c009ec2b76a6595ed56fd1
refs/heads/master
2016-09-06T02:09:53.203758
2014-03-27T07:49:46
2014-03-27T07:49:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,873
java
package net.minecraft.entity.ai; import java.util.Random; import net.minecraft.entity.EntityCreature; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class EntityAIFleeSun extends EntityAIBase { private EntityCreature theCreature; private double shelterX; private double shelterY; private double shelterZ; private double movementSpeed; private World theWorld; public EntityAIFleeSun(EntityCreature par1EntityCreature, double par2) { this.theCreature = par1EntityCreature; this.movementSpeed = par2; this.theWorld = par1EntityCreature.worldObj; this.setMutexBits(1); } /** * Returns whether the EntityAIBase should begin execution. */ public boolean shouldExecute() { if (!this.theWorld.isDaytime()) { return false; } else if (!this.theCreature.isBurning()) { return false; } else if (!this.theWorld.canBlockSeeTheSky(MathHelper.floor_double(this.theCreature.posX), (int)this.theCreature.boundingBox.minY, MathHelper.floor_double(this.theCreature.posZ))) { return false; } else { Vec3 var1 = this.findPossibleShelter(); if (var1 == null) { return false; } else { this.shelterX = var1.xCoord; this.shelterY = var1.yCoord; this.shelterZ = var1.zCoord; return true; } } } /** * Returns whether an in-progress EntityAIBase should continue executing */ public boolean continueExecuting() { return !this.theCreature.getNavigator().noPath(); } /** * Execute a one shot task or start executing a continuous task */ public void startExecuting() { this.theCreature.getNavigator().tryMoveToXYZ(this.shelterX, this.shelterY, this.shelterZ, this.movementSpeed); } private Vec3 findPossibleShelter() { Random var1 = this.theCreature.getRNG(); for (int var2 = 0; var2 < 10; ++var2) { int var3 = MathHelper.floor_double(this.theCreature.posX + (double)var1.nextInt(20) - 10.0D); int var4 = MathHelper.floor_double(this.theCreature.boundingBox.minY + (double)var1.nextInt(6) - 3.0D); int var5 = MathHelper.floor_double(this.theCreature.posZ + (double)var1.nextInt(20) - 10.0D); if (!this.theWorld.canBlockSeeTheSky(var3, var4, var5) && this.theCreature.getBlockPathWeight(var3, var4, var5) < 0.0F) { return this.theWorld.getWorldVec3Pool().getVecFromPool((double)var3, (double)var4, (double)var5); } } return null; } }
[ "lucapomm1@gmail.com" ]
lucapomm1@gmail.com
ae33f1e3ae6f4f667da79f931813c4d9c9bed218
abda16e051b78404102e5af67afacefa364134fb
/environment/src/main/java/jetbrains/exodus/tree/btree/LeafNode.java
194c4364bc79b5975d4dc4a03e5c46ee990a9f62
[ "Apache-2.0" ]
permissive
yusuke/xodus
c000e9dc098d58e1e30f6d912ab5283650d3f5c0
f84bb539ec16d96136d35600eb6f0966cc7b3b07
refs/heads/master
2023-09-04T12:35:52.294475
2017-12-01T18:46:24
2017-12-01T18:46:52
112,916,407
0
0
null
2017-12-03T09:46:15
2017-12-03T09:46:15
null
UTF-8
Java
false
false
5,392
java
/** * Copyright 2010 - 2017 JetBrains s.r.o. * * 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 jetbrains.exodus.tree.btree; import jetbrains.exodus.ByteIterable; import jetbrains.exodus.log.ByteIterableWithAddress; import jetbrains.exodus.log.CompressedUnsignedLongByteIterable; import jetbrains.exodus.log.RandomAccessLoggable; import org.jetbrains.annotations.NotNull; /** * Stateless leaf node for immutable btree */ class LeafNode extends BaseLeafNode { @NotNull private final RandomAccessLoggable loggable; private final int keyLength; LeafNode(@NotNull final RandomAccessLoggable loggable) { this.loggable = loggable; final ByteIterableWithAddress data = loggable.getData(); final int keyLength = data.getCompressedUnsignedInt(); final int keyRecordSize = CompressedUnsignedLongByteIterable.getCompressedSize(keyLength); this.keyLength = (keyLength << 3) + keyRecordSize; } @Override public long getAddress() { return loggable.getAddress(); } public int getType() { return loggable.getType(); } @Override public int compareKeyTo(@NotNull final ByteIterable iterable) { return loggable.getData().compareTo(getKeyRecordSize(), getKeyLength(), iterable); } @Override public int compareValueTo(@NotNull final ByteIterable iterable) { return loggable.getData().compareTo(getKeyRecordSize() + getKeyLength(), getValueLength(), iterable); } @Override @NotNull public ByteIterable getKey() { return loggable.getData().subIterable(getKeyRecordSize(), getKeyLength()); } @Override @NotNull public ByteIterable getValue() { return loggable.getData().subIterable(getKeyRecordSize() + getKeyLength(), getValueLength()); } @Override public boolean isMutable() { return false; } @NotNull ByteIterableWithAddress getRawValue(final int offset) { return loggable.getData().clone(getKeyRecordSize() + getKeyLength() + offset); } private int getKeyLength() { return keyLength >>> 3; } private int getKeyRecordSize() { return keyLength & 7; } private int getValueLength() { return loggable.getDataLength() - getKeyRecordSize() - getKeyLength(); } protected void doReclaim(@NotNull BTreeReclaimTraverser context, final int leafIndex) { final long keyAddress = context.currentNode.getKeyAddress(leafIndex); if (keyAddress == loggable.getAddress()) { final BTreeMutable tree = context.mainTree; tree.addExpiredLoggable(keyAddress); final BasePageMutable node = context.currentNode.getMutableCopy(tree); node.set(leafIndex, tree.createMutableLeaf(getKey(), getValue()), null); context.wasReclaim = true; context.setPage(node); } } protected void reclaim(@NotNull final BTreeReclaimTraverser context) { final ByteIterable keyIterable = getKey(); if (!context.canMoveDown() && context.canMoveRight()) { final int leafIndex; final int cmp = context.compareCurrent(keyIterable); if (cmp > 0) { return; } if (cmp == 0) { leafIndex = context.currentPos; } else { context.moveRight(); leafIndex = context.getNextSibling(keyIterable); } if (leafIndex >= 0) { doReclaim(context, leafIndex); context.moveTo(leafIndex + 1); return; } else if (context.canMoveTo(-leafIndex - 1)) { return; } } // go up if (context.canMoveUp()) { while (true) { context.popAndMutate(); context.moveRight(); final int index = context.getNextSibling(keyIterable); if (index < 0) { if (context.canMoveTo(-index - 1) || !context.canMoveUp()) { context.moveTo(Math.max(-index - 2, 0)); break; } } else { context.pushChild(index); // node is always internal break; } } } // go down while (context.canMoveDown()) { int index = context.getNextSibling(keyIterable); if (index < 0) { index = Math.max(-index - 2, 0); } context.pushChild(index); } int leafIndex = context.getNextSibling(keyIterable); if (leafIndex >= 0) { doReclaim(context, leafIndex); context.moveTo(leafIndex + 1); } else { context.moveTo(-leafIndex - 1); } } }
[ "lvo@intellij.net" ]
lvo@intellij.net
be5afc15a5371a142d4c005bcef04581ed76228a
ee64a549f9f9c3fd434dc82f22b2f374e0883b18
/demo-upms/demo-upms-provider/src/main/java/com/shang/app/apiVersion/ApiParam.java
dadc3844b55bf8135f3959a052df859cdfa2e73f
[ "Apache-2.0" ]
permissive
nickshang/ShangMicroArchitecture
6159a132ff3f3704ef99dc128144970424186620
8dfbba0e7010c9a5fd46a7a6eac74b002918a6e3
refs/heads/master
2021-09-07T21:50:10.969758
2018-03-01T14:52:28
2018-03-01T14:52:28
94,010,479
0
0
null
null
null
null
UTF-8
Java
false
false
511
java
package com.shang.app.apiVersion; import java.lang.annotation.*; /** * @author NICK * @create 2017-12-25 **/ @Target({ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface ApiParam { /** * 参数名 */ String value(); /** * 是否必须有值 默认必须有 */ boolean required() default true; /** * 值非必须时 如果未传值 默认值 */ DefaultValueEnum defaultValue() default DefaultValueEnum.DEFAULT; }
[ "ssj00@163.com" ]
ssj00@163.com
8a2fa25b16ffbbe9b935ad20f6e11dd2ce930fca
f7fbc015359f7e2a7bae421918636b608ea4cef6
/base-one/tags/hsqldb_1_8_0_RC8/src/org/hsqldb/NumberSequence.java
918f2c185080fc8cb4a4aa8fa0f5c2a72212b769
[]
no_license
svn2github/hsqldb
cdb363112cbdb9924c816811577586f0bf8aba90
52c703b4d54483899d834b1c23c1de7173558458
refs/heads/master
2023-09-03T10:33:34.963710
2019-01-18T23:07:40
2019-01-18T23:07:40
155,365,089
0
0
null
null
null
null
UTF-8
Java
false
false
4,263
java
/* Copyright (c) 2001-2005, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the HSQL Development Group nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.hsqldb; import org.hsqldb.HsqlNameManager.HsqlName; /** * Maintains a sequence of numbers. * * @author fredt@users * @since 1.7.2 * @version 1.7.2 */ public class NumberSequence { private HsqlName name; // original start value - used in CREATE and ALTER commands private long startValue; // present value private long currValue; // last value private long lastValue; private long increment; private int dataType; /** * constructor with initial value and increment; */ public NumberSequence(HsqlName name, long value, long increment, int type) { this.name = name; startValue = currValue = lastValue = value; this.increment = increment; dataType = type; } /** * principal getter for the next sequence value */ long getValue() { long value = currValue; currValue += increment; return value; } /** * getter for a given value */ long getValue(long value) { if (value >= currValue) { currValue = value; currValue += increment; return value; } else { return value; } } /** @todo fredt - check against max value of type */ Object getValueObject() { long value = currValue; currValue += increment; Object result; if (dataType == Types.INTEGER) { result = new Integer((int) value); } else { result = new Long(value); } return result; } /** * reset to start value */ void reset() { // no change if called before getValue() or called twice lastValue = currValue = startValue; } /** * get next value without incrementing */ public long peek() { return currValue; } /** * true if one or more values were retreived since the last resetWasUsed */ boolean wasUsed() { return lastValue != currValue; } /** * reset the wasUsed flag */ void resetWasUsed() { lastValue = currValue; } /** * reset to new initial value */ public void reset(long value) { startValue = currValue = lastValue = value; } void reset(long value, long increment) { reset(value); this.increment = increment; } int getType() { return dataType; } public HsqlName getName() { return name; } long getIncrement() { return increment; } }
[ "(no author)@7c7dc5f5-a22d-0410-a3af-b41755a11667" ]
(no author)@7c7dc5f5-a22d-0410-a3af-b41755a11667