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
4ba88cf19b451a0d7a0a9bee485d2d218973e442
8343bc747a99c511fc1cd7f17744a084e2b6cbbc
/jodconverter-core/src/main/java/org/jodconverter/office/OfficeContext.java
4b359c98ec38780dba0fc4c7a290a2a3678640b4
[ "Apache-2.0" ]
permissive
zhouyinyan/jodconverter
36565f460eb7c587ed018965f9abdda1ecbe2c28
dc894bd1f767769ab14eee0d3e8afb06da1da984
refs/heads/master
2020-12-25T18:42:59.132322
2017-06-09T10:24:48
2017-06-09T10:24:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
/* * Copyright 2004 - 2012 Mirko Nasato and contributors * 2016 - 2017 Simon Braconnier and contributors * * This file is part of JODConverter - Java OpenDocument Converter. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jodconverter.office; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XDesktop; /** Represents an office context. */ public interface OfficeContext { /** * Gets the office component loader for this context. * * @return the component loader. */ XComponentLoader getComponentLoader(); /** * Gets the office desktop for this context. * * @return the desktop. */ XDesktop getDesktop(); }
[ "simonbraconnier@gmail.com" ]
simonbraconnier@gmail.com
2fdd415f7e8ae188d7b881bb17138805d426dc54
642e90aa1c85330cee8bbe8660ca277655bc4f78
/gameserver/src/main/java/l2s/gameserver/skills/effects/EffectCurseOfLifeFlow.java
4cb194e92eff58c9dbb0ed1c37dc46ac929fc32a
[]
no_license
BETAJIb/Studious
ac329f850d8c670d6e355ef68138c9e8fd525986
328e344c2eaa70238c403754566865e51629bd7b
refs/heads/master
2020-04-04T08:41:21.112223
2018-10-31T20:18:49
2018-10-31T20:18:49
155,790,706
0
0
null
null
null
null
UTF-8
Java
false
false
2,608
java
package l2s.gameserver.skills.effects; import gnu.trove.iterator.TObjectIntIterator; import gnu.trove.map.hash.TObjectIntHashMap; import l2s.commons.lang.reference.HardReference; import l2s.gameserver.listener.actor.OnCurrentHpDamageListener; import l2s.gameserver.model.Creature; import l2s.gameserver.model.Skill; import l2s.gameserver.model.actor.instances.creature.Abnormal; import l2s.gameserver.network.l2.components.SystemMsg; import l2s.gameserver.network.l2.s2c.SystemMessagePacket; import l2s.gameserver.stats.Env; import l2s.gameserver.templates.skill.EffectTemplate; public final class EffectCurseOfLifeFlow extends Effect { private CurseOfLifeFlowListener _listener; private TObjectIntHashMap<HardReference<? extends Creature>> _damageList = new TObjectIntHashMap<HardReference<? extends Creature>>(); public EffectCurseOfLifeFlow(Abnormal abnormal, Env env, EffectTemplate template) { super(abnormal, env, template); } @Override public void onStart() { _listener = new CurseOfLifeFlowListener(); getEffected().addListener(_listener); } @Override public void onExit() { getEffected().removeListener(_listener); _listener = null; } @Override public boolean onActionTime() { if(getEffected().isDead()) return false; for(TObjectIntIterator<HardReference<? extends Creature>> iterator = _damageList.iterator(); iterator.hasNext();) { iterator.advance(); Creature damager = iterator.key().get(); if(damager == null || damager.isDead() || damager.isCurrentHpFull()) continue; int damage = iterator.value(); if(damage <= 0) continue; double max_heal = getValue(); double heal = Math.min(damage, max_heal); double newHp = Math.min(damager.getCurrentHp() + heal, damager.getMaxHp()); if(damager != getEffector()) damager.sendPacket(new SystemMessagePacket(SystemMsg.S2_HP_HAS_BEEN_RESTORED_BY_C1).addName(getEffector()).addLong((long) (newHp - damager.getCurrentHp()))); else damager.sendPacket(new SystemMessagePacket(SystemMsg.S1_HP_HAS_BEEN_RESTORED).addLong((long) (newHp - damager.getCurrentHp()))); damager.setCurrentHp(newHp, false); } _damageList.clear(); return true; } private class CurseOfLifeFlowListener implements OnCurrentHpDamageListener { @Override public void onCurrentHpDamage(Creature actor, double damage, Creature attacker, Skill skill) { if(attacker == actor || attacker == getEffected()) return; int old_damage = _damageList.get(attacker.getRef()); _damageList.put(attacker.getRef(), old_damage == 0 ? (int) damage : old_damage + (int) damage); } } }
[ "gladiadorse@hotmail.com" ]
gladiadorse@hotmail.com
a3f0ce8f37541aa123a75b3a46636247a7073dec
ade701706d2c973aaf7d99d32118a998164541f4
/MiniProject_spring/src/main/java/com/model2/mvc/service/purchase/PurchaseService.java
eea44b6f12a5104d53f9556b9efb38fdc8c4a64d
[]
no_license
tazesign/PJT_Spring
e680b09f0472ae0f14f0a6b9e849badfaa91e2b2
2c16952d5ac7864f949eab16b8a502fbc4a3c4b6
refs/heads/master
2020-03-15T10:19:03.157361
2018-06-10T14:43:33
2018-06-10T14:43:33
132,095,785
0
0
null
null
null
null
UHC
Java
false
false
1,002
java
package com.model2.mvc.service.purchase; import java.util.Map; import com.model2.mvc.common.Search; import com.model2.mvc.service.domain.Purchase; public interface PurchaseService { public void addPurchase(Purchase purchase) throws Exception; public Map<String,Object> getPurchaseList(Search search, String buyerId) throws Exception; //구매 목록 조회에서 no링크타고 내가 구매한 상품 보는것 public Purchase getPurchase(int tranNo) throws Exception; //구매요청을 수정 public void updatePurchase(Purchase purchase) throws Exception; /*public PurchaseVO getPurchase2(int ProdNo) throws Exception; public HashMap<String,Object> getSaleList(SearchVO searchVO) throws Exception;*/ //구매이력조회에서 물건도착 눌렀을때 public void updateTranCode(Purchase purchase) throws Exception; //상품관리에서 배송하기를 눌렀을때 public void updateTranCodeByProd(Purchase purchase) throws Exception; }
[ "Bit@Bitcamp" ]
Bit@Bitcamp
c5a0b598e8268f1a823c742d3fe0edfa6b5bda56
182b7e5ca415043908753d8153c541ee0e34711c
/Java9AndAbove/src/main/java/com/vinay/java9/OptionalExample.java
f75d307836005220c4173872b49fe88137ee25a4
[]
no_license
akamatagi/Java9AndAbove
2b62886441241ef4cd62990243d7b29e895452f7
ff002a2395edf506091b3571a470c15fa0742550
refs/heads/master
2023-02-09T17:38:21.467950
2020-12-30T14:47:59
2020-12-30T14:47:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,111
java
package com.vinay.java9; import java.util.*; import java.util.stream.*; public class OptionalExample { // Please don't do this at home or office private static void process(Optional<Integer> result) { // System.out.println(result.get()); // Don't // System.out.println(result.orElseThrow()); System.out.println(result.orElse(0)); // Imperative style if(result.isPresent()){ System.out.println("The value is " + result.get()); }else { System.out.println("Nothing present"); } // Functional style result.ifPresentOrElse(value -> System.out.println("Thew value is " + value), () -> System.out.println("No Value")); // Optional<T> Present Absent // orElse(substitute) T data T substitute // or(()-> Optional.of(substitute)) Optional(data) Optional(substitute) } public static void process(Stream<Integer> result){ result.forEach(System.out::println); } // Use Optional<T> as a return and not as a parameter to a function, // except when giving to this talk. Instead use overloading public static void process(){} public static void process(int value){} public static void main(String[] args) { List<Integer> numbers = Arrays.asList(1,2,3,4,5,6,7,8,9,10); /*Optional<Integer> result1 = numbers.stream() .filter(e -> e > 5) .findFirst(); Optional<Integer> result2 = numbers.stream() .filter(e -> e > 50) .findFirst(); System.out.println(result1); System.out.println(result2);*/ process(numbers.stream() .filter(e -> e > 5) .findFirst()); System.out.println("------"); process(numbers.stream() .filter(e -> e > 50) .findFirst()); System.out.println("------"); process(numbers.stream().filter(e-> e > 5).findFirst().stream()); } }
[ "vinayagam.d.ganesh@gmail.com" ]
vinayagam.d.ganesh@gmail.com
e85d8135fcd96b5690d2b0ff2a2135971e3cfe02
4bbb3ece3857c7ac905091c2c01e5439e6a99780
/dede-bo/src/main/java/net/frank/dede/bean/DedeSearchCache.java
6d62040079ab89476ff11841d6f9cf1e0b39570b
[]
no_license
frankzhf/dream
b98d77de2ea13209aed52a0499cced0be7b99d3c
c90edbdd8dcdb4b0e7c8c22c1fccdefadeb85791
refs/heads/master
2022-12-22T12:20:29.710989
2020-10-13T02:41:37
2020-10-13T02:41:37
38,374,538
0
1
null
2022-12-16T01:03:37
2015-07-01T14:06:19
JavaScript
UTF-8
Java
false
false
890
java
package net.frank.dede.bean; public class DedeSearchCache extends net.frank.framework.bo.BaseEntity{ private String hash; private Integer lasttime; private Integer rsnum; private char[] ids; public String getHash(){ return this.hash; } public void setHash(String hash){ this.hash=hash; } public Integer getLasttime(){ return this.lasttime; } public void setLasttime(Integer lasttime){ this.lasttime=lasttime; } public Integer getRsnum(){ return this.rsnum; } public void setRsnum(Integer rsnum){ this.rsnum=rsnum; } public char[] getIds(){ return this.ids; } public void setIds(char[] ids){ this.ids=ids; } public String toString(){ return "" +this.getHash()+"\t" +this.getLasttime()+"\t" +this.getRsnum()+"\t" +new String(this.getIds())+"\t" ; } }
[ "zhaofeng@ilinong.com" ]
zhaofeng@ilinong.com
b3e186111e33e3543b72f976b2b6559208afaec5
713a28582a2083e7c9db7e6f96a8180622fb20da
/src/main/java/austeretony/oxygen_friendslist/server/FriendsListManagerServer.java
ccc12608060e072decfa21a32250084824a699e8
[]
no_license
AustereTony-MCMods/Oxygen-Friends-List
14c37bc1882e2c2e18c5f16ef396b994ddfb8218
cf7d21c593346894ed0ac489c1fda4f1738f9793
refs/heads/master
2020-06-22T16:04:39.558601
2020-06-07T14:06:07
2020-06-07T14:06:07
197,742,288
2
4
null
2020-06-07T14:06:09
2019-07-19T09:15:29
Java
UTF-8
Java
false
false
1,768
java
package austeretony.oxygen_friendslist.server; import austeretony.oxygen_core.common.api.CommonReference; import austeretony.oxygen_core.server.api.OxygenHelperServer; import austeretony.oxygen_friendslist.common.main.EnumFriendsListStatusMessage; import austeretony.oxygen_friendslist.common.main.FriendsListMain; import net.minecraft.entity.player.EntityPlayerMP; public class FriendsListManagerServer { private static FriendsListManagerServer instance; private final FriendsListPlayerDataContainerServer dataContainer = new FriendsListPlayerDataContainerServer(); private final FriendsListPlayerDataManagerServer dataManager; private FriendsListManagerServer() { this.dataManager = new FriendsListPlayerDataManagerServer(this); } private void registerPersistentData() { OxygenHelperServer.registerPersistentData(this.dataContainer::save); } public static void create() { if (instance == null) { instance = new FriendsListManagerServer(); instance.registerPersistentData(); } } public static FriendsListManagerServer instance() { return instance; } public FriendsListPlayerDataContainerServer getPlayerDataContainer() { return this.dataContainer; } public FriendsListPlayerDataManagerServer getPlayerDataManager() { return this.dataManager; } public void playerLoaded(EntityPlayerMP playerMP) { this.dataContainer.playerLoaded(CommonReference.getPersistentUUID(playerMP)); } public void sendStatusMessage(EntityPlayerMP playerMP, EnumFriendsListStatusMessage message) { OxygenHelperServer.sendStatusMessage(playerMP, FriendsListMain.FRIENDS_LIST_MOD_INDEX, message.ordinal()); } }
[ "anton.zh-off@yandex.ru" ]
anton.zh-off@yandex.ru
b165326ba42e11a2ded73795f30e26c8c102bb74
41589b12242fd642cb7bde960a8a4ca7a61dad66
/teams/codetester/RobotPlayer.java
df943b80ac8ccb28b30365253d1be420cd70f173
[]
no_license
Cixelyn/bcode2011
8e51e467b67b9ce3d9cf1160d9bd0e9f20114f96
eccb2c011565c46db942b3f38eb3098b414c154c
refs/heads/master
2022-11-05T12:52:17.671674
2011-01-27T04:49:12
2011-01-27T04:49:12
275,731,519
0
0
null
null
null
null
UTF-8
Java
false
false
364
java
package codetester; import java.util.ArrayList; import battlecode.common.*; public class RobotPlayer implements Runnable { private final RobotController myRC; public RobotPlayer(RobotController rc) { myRC = rc; } public void run() { System.out.println(GameConstants.MINE_ROUNDS); while(true) {} } }
[ "51144+Cixelyn@users.noreply.github.com" ]
51144+Cixelyn@users.noreply.github.com
e171485d47ecb504ee53ea759dc9ca046d0eae39
350a535e3e0fd67af9ad130d1342a8f5deb759df
/src/main/java/com/ileng/core/tags/html/resolver/HtmlComponentDTDEntityResolver.java
a8dc41e983df273b46e1270cf97301323e5f67f3
[]
no_license
xjLeng/forum
a6088173ea98009ba9f698b52b7ec631b2b0c550
fd9fea3a28b5ee401788f45eb3f4061902b4bea9
refs/heads/master
2020-06-26T07:11:48.161650
2017-08-27T08:40:21
2017-08-27T08:40:21
96,981,373
0
0
null
null
null
null
UTF-8
Java
false
false
2,704
java
package com.ileng.core.tags.html.resolver; import java.io.InputStream; import java.io.Serializable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; /** * hibernate动态sql dtd解析器 * http://blog.csdn.net/hailanzhijia/article/details/6004947 * http://blog.csdn.net/a9529lty/article/details/6671364 * * @author 冷雪剑 */ @SuppressWarnings("serial") public class HtmlComponentDTDEntityResolver implements EntityResolver, Serializable { private static final Logger LOGGER = LoggerFactory.getLogger(HtmlComponentDTDEntityResolver.class); private static final String HOP_DYNAMIC_STATEMENT = "http://www.jeeweb.cn/dtd/"; public InputSource resolveEntity(String publicId, String systemId) { InputSource source = null; // returning null triggers default behavior if (systemId != null) { LOGGER.debug("trying to resolve system-id [" + systemId + "]"); if (systemId.startsWith(HOP_DYNAMIC_STATEMENT)) { LOGGER.debug( "recognized hop html component namespace attempting to resolve on classpath under com.ileng/core/tags/html/dtd/"); source = resolveOnClassPath(publicId, systemId, HOP_DYNAMIC_STATEMENT); } } return source; } private InputSource resolveOnClassPath(String publicId, String systemId, String namespace) { InputSource source = null; String path = "/dtd/" + systemId.substring(namespace.length()); InputStream dtdStream = resolveInHibernateNamespace(path); if (dtdStream == null) { LOGGER.debug("unable to locate [" + systemId + "] on classpath"); if (systemId.substring(namespace.length()).indexOf("2.0") > -1) { LOGGER.error("Don't use old DTDs!"); } } else { LOGGER.debug("located [" + systemId + "] in classpath"); source = new InputSource(dtdStream); source.setPublicId(publicId); source.setSystemId(systemId); } return source; } protected InputStream resolveInHibernateNamespace(String path) { return this.getClass().getClassLoader().getResourceAsStream(path); } public static void main(String[] args) { String path = "com/ileng/core/tags/html/dtd/html-component-1.0.dtd"; System.out.println(HtmlComponentDTDEntityResolver.class.getClass().getResource("/").getPath()); } /*protected InputStream resolveInLocalNamespace(String path) { try { return ConfigHelper.getUserResourceAsStream(path); } catch (Throwable t) { return null; } }*/ }
[ "18085137706@163.com" ]
18085137706@163.com
3834bb3b879061ca70bb92b9fbe3af42f90583eb
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14122-25-2-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiCacheStore_ESTest_scaffolding.java
2b9fe3a0ecbb3fbee4530cacd56e922d8f51da0f
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 11:30:52 UTC 2020 */ package com.xpn.xwiki.store; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class XWikiCacheStore_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
51fdd28f325f22fdf3ddc0fa0133fdc42d0ab63f
3ab0c599279515d8eea2cd06f10d5ffffcb8527e
/src/org/qihuasoft/codegenerate/util/def/JeecgKey.java
072ce627bec7cf25134b055e7b3da79ba114a7c5
[]
no_license
stillywud/gdzc-1228
452455da57f2bcbe57195c315a259f4235a265f3
25f0aa58416bbc7779a60a145a70706b7d723277
refs/heads/master
2021-10-09T12:54:26.393355
2018-12-28T07:18:25
2018-12-28T07:18:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
214
java
package org.qihuasoft.codegenerate.util.def; public final class JeecgKey { public static String UUID = "uuid"; public static String IDENTITY = "identity"; public static String SEQUENCE = "sequence"; }
[ "yumang@" ]
yumang@
77e2b3f641e5230bbc4493f1c0ee9ee2c3326d89
b692a26e0fd0f4bea7a8e43136db381b0a9bc213
/dev/src/org/proteomecommons/io/fasta/ipi/IPIFASTAReaderFactory.java
b8111dbd173f76b25bae1b0e4e08329d2c21f540
[]
no_license
mrjato/IO
afdfaf55389c998058a204fb8c33cf6820f233c0
aedd2aa8e9012c0530b8fff98b32bfd3b291a85d
refs/heads/master
2021-01-15T17:54:55.126453
2013-09-19T06:02:27
2013-09-19T06:02:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,464
java
/* * Copyright 2005 The Regents of the University of Michigan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.proteomecommons.io.fasta.ipi; import java.io.File; import java.io.FileInputStream; import org.proteomecommons.io.fasta.FASTAReader; import org.proteomecommons.io.fasta.FASTAReaderFactory; import org.proteomecommons.io.fasta.ipi.IPIFASTAReader; /** * * @author James "Augie" Hill - augie@828productions.com */ public class IPIFASTAReaderFactory implements FASTAReaderFactory { public String getFileExtension() { return ".fasta"; } public String getName() { return "IPI FASTA"; } public FASTAReader newInstance(String filename) { try { return new IPIFASTAReader(new FileInputStream(new File(filename))); } catch (Exception e) { throw new RuntimeException(e); } } }
[ "jayson@dell-desktop.example.com" ]
jayson@dell-desktop.example.com
35fc9d6998c1ff1f061ddfd6266257f94300f256
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/raizlabs/android/dbflow/rx2/kotlinextensions/QueryExtensionsKt$save$2.java
6714d58394d9ff1d05834b3fe25b871f437675b4
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
1,006
java
package com.raizlabs.android.dbflow.rx2.kotlinextensions; import io.reactivex.functions.Consumer; import kotlin.Metadata; import kotlin.jvm.functions.Function1; import kotlin.jvm.internal.Intrinsics; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"<anonymous>", "", "success", "", "kotlin.jvm.PlatformType", "accept", "(Ljava/lang/Boolean;)V"}, k = 3, mv = {1, 1, 7}) /* compiled from: QueryExtensions.kt */ public final class QueryExtensionsKt$save$2<T> implements Consumer<Boolean> { final /* synthetic */ Function1 $func; public QueryExtensionsKt$save$2(Function1 function1) { this.$func = function1; } public final void accept(Boolean bool) { Function1 function1 = this.$func; Intrinsics.a(bool, "success"); function1.a(bool); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
92c4fb7b02d50d902386aed7f87e10d1a6b97615
29507a23de28705881e0bc0c58ca81e8cc92276d
/advancedJava/src/main/java/com/ecvlearning/javaee/reflection/Client.java
d90c5d0adf5c7472545c022efa71430c1db9aff7
[ "Apache-2.0" ]
permissive
liangduo1993/javaee
cdbe96b25213aeba5ac15a3fd6118d08b873c3d6
785365f190d064ee7042dfd3c693f8f9b1e481e1
refs/heads/master
2021-04-26T23:43:24.874331
2018-01-08T02:58:35
2018-01-08T02:58:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
632
java
package com.ecvlearning.javaee.reflection; public class Client { public static void main(String[] ars) throws ClassNotFoundException, IllegalAccessException, InstantiationException { // ReflectionExample re = new ReflectionExample(); // re.test(); String cretiria = "c"; String className = ""; if("c".equals(cretiria)){ className = "ReflectionExample"; }else{ className = "ReflectionExample2"; } Class cls = Class.forName(className); ReflectionInterface re = (ReflectionInterface) cls.newInstance(); re.test(); } }
[ "you@example.com" ]
you@example.com
f06ba59fdf44c36806dd358ff7716b0d9b1fd25b
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/response/KoubeiRetailWmsWorkQueryResponse.java
51ea587ae75e9efd0234f95cb5ab0a515c5ad197
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,714
java
package com.alipay.api.response; import java.util.Date; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.WorkDetail; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.retail.wms.work.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiRetailWmsWorkQueryResponse extends AlipayResponse { private static final long serialVersionUID = 3383976371723784637L; /** * 扩展字段,json格式 */ @ApiField("ext_info") private String extInfo; /** * 作业完成时间,未完成则该值为空 */ @ApiField("gmt_finished") private Date gmtFinished; /** * 作业对应的入库/出库通知单的外部业务单据号,这个单据可能是采购单、补货单等 */ @ApiField("notice_out_biz_no") private String noticeOutBizNo; /** * 作业对应的通知单的外部业务类型,BHRK=补货入库,CGRK=采购入库,CGTHRK=采购退货入库,DDTHRK=订单退货入库,PDRK=盘点入库,CGCK=采购出库,DDCK=订单出库,PDCK=盘点出库,BHCK=补货出库 */ @ApiField("notice_out_biz_type") private String noticeOutBizType; /** * 操作员id */ @ApiField("operator") private String operator; /** * 与作业相关的外部单据号,如菜鸟发货id */ @ApiField("out_biz_no") private String outBizNo; /** * 备注信息 */ @ApiField("remark") private String remark; /** * 作业单状态 INIT=初始状态,FINISHED=完成状态 */ @ApiField("status") private String status; /** * 仓库编码 */ @ApiField("warehouse_code") private String warehouseCode; /** * 作业明细模型列表 */ @ApiListField("work_details") @ApiField("work_detail") private List<WorkDetail> workDetails; /** * 作业id */ @ApiField("work_id") private String workId; public void setExtInfo(String extInfo) { this.extInfo = extInfo; } public String getExtInfo( ) { return this.extInfo; } public void setGmtFinished(Date gmtFinished) { this.gmtFinished = gmtFinished; } public Date getGmtFinished( ) { return this.gmtFinished; } public void setNoticeOutBizNo(String noticeOutBizNo) { this.noticeOutBizNo = noticeOutBizNo; } public String getNoticeOutBizNo( ) { return this.noticeOutBizNo; } public void setNoticeOutBizType(String noticeOutBizType) { this.noticeOutBizType = noticeOutBizType; } public String getNoticeOutBizType( ) { return this.noticeOutBizType; } public void setOperator(String operator) { this.operator = operator; } public String getOperator( ) { return this.operator; } public void setOutBizNo(String outBizNo) { this.outBizNo = outBizNo; } public String getOutBizNo( ) { return this.outBizNo; } public void setRemark(String remark) { this.remark = remark; } public String getRemark( ) { return this.remark; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } public void setWarehouseCode(String warehouseCode) { this.warehouseCode = warehouseCode; } public String getWarehouseCode( ) { return this.warehouseCode; } public void setWorkDetails(List<WorkDetail> workDetails) { this.workDetails = workDetails; } public List<WorkDetail> getWorkDetails( ) { return this.workDetails; } public void setWorkId(String workId) { this.workId = workId; } public String getWorkId( ) { return this.workId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
bc53285141835d6b0fe6d2a2d313fb72407cbb5f
80403ec5838e300c53fcb96aeb84d409bdce1c0c
/server/test/src/org/labkey/test/selenium/RefindingWebElement.java
04491a4cfb1d6f245196b1e7f63de617bbc29f9a
[]
no_license
scchess/LabKey
7e073656ea494026b0020ad7f9d9179f03d87b41
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
refs/heads/master
2021-09-17T10:49:48.147439
2018-03-22T13:01:41
2018-03-22T13:01:41
126,447,224
0
1
null
null
null
null
UTF-8
Java
false
false
3,578
java
/* * Copyright (c) 2016-2017 LabKey Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.labkey.test.selenium; import org.labkey.test.Locator; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.SearchContext; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; import static org.junit.Assert.assertFalse; public class RefindingWebElement extends LazyWebElement<RefindingWebElement> { private final List<Consumer<WebElement>> _listeners = new ArrayList<>(); public RefindingWebElement(Locator locator, SearchContext searchContext) { super(locator, searchContext); } public RefindingWebElement(WebElement element, SearchContext searchContext) { this(Locator.id(element.getAttribute("id")), searchContext); withRefindListener(this::assertUniqueId); if (element instanceof RefindingWebElement) { throw new IllegalArgumentException("Nesting RefindingWebElements is not supported"); } else { _wrappedElement = element; } } /** * Refinding reliability depends on the specificity of the provided Locator * There is no verification that the provided WebElement matches the provided Locator and SearchContext */ public RefindingWebElement(WebElement element, Locator locator, SearchContext searchContext) { this(locator, searchContext); _wrappedElement = element; } private void assertUniqueId(WebElement el) { String id = el.getAttribute("id"); Locator.IdLocator webPartLocator = Locator.id(id); assertFalse("Unable to refind element: ambiguous ID " + id + ". Fix product code or refind manually.", webPartLocator.findElements(this).size() > 1); } @Override public WebElement getWrappedElement() { try { super.getWrappedElement().isEnabled(); // Check for staleness } catch (StaleElementReferenceException refind) { boolean refound = false; try { _wrappedElement = findWrappedElement(); refound = true; } catch (NoSuchElementException ignore) {} if (refound) callListeners(super.getWrappedElement()); } return super.getWrappedElement(); } public RefindingWebElement withRefindListener(Consumer<WebElement> callback) { _listeners.add(callback); return this; } private void callListeners(WebElement newElement) { try { for (Consumer<WebElement> listener : _listeners) listener.accept(newElement); } catch (WebDriverException t) { throw new RuntimeException("Error after element refind", t); } } }
[ "klum@labkey.com" ]
klum@labkey.com
7f0cf7a2e494bcf6255dcf27fa205cc7a1967471
1487c5a0f4722393f21bd775af44cb21d1cfa578
/src/com/thread/ThreadState.java
563d471c2dc5a0dbaa1b4bc31c9c7ab7126aa221
[]
no_license
Fish-Fan/JavaConcurrentBase
dfd1ae073f8f3c544908a24d0295ab1bdc6e486f
5c2d0ef886f628664122ad5e72a485735bc9e468
refs/heads/master
2021-05-07T04:22:19.685012
2017-11-19T11:44:24
2017-11-19T11:44:24
111,289,719
0
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package com.thread; import java.util.concurrent.TimeUnit; /** * Created by yanfeng-mac on 2017/11/4. */ public class ThreadState { public static void main(String[] args) { new Thread(new TimeWaiting(),"TimeWaiting start").start(); new Thread(new Waiting(),"WaitingThread").start(); new Thread(new Blocked(),"BlockThread-1").start(); new Thread(new Blocked(),"BlockedThread-2").start(); } static class TimeWaiting implements Runnable { @Override public void run() { while (true) { try { TimeUnit.SECONDS.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } } static class Waiting implements Runnable { @Override public void run() { while (true) { synchronized (Waiting.class) { try { Waiting.class.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } } } } static class Blocked implements Runnable { @Override public void run() { synchronized (Blocked.class) { while (true) { try { TimeUnit.SECONDS.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } } } }
[ "fanyank@126.com" ]
fanyank@126.com
ffd118da62411022308966189d87d009f5951c25
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_8202.java
023f6ec7a7d80f60301f8d6a77462448d011159e
[ "Apache-2.0" ]
permissive
lesaint/experimenting-annotation-processing
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
1e9692ceb0d3d2cda709e06ccc13290262f51b39
refs/heads/master
2021-01-23T11:20:19.836331
2014-11-13T10:37:14
2014-11-13T10:37:14
26,336,984
1
0
null
null
null
null
UTF-8
Java
false
false
151
java
package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; @Annotation_001 public class Class_8202 { }
[ "sebastien.lesaint@gmail.com" ]
sebastien.lesaint@gmail.com
f25d5ee26033ea3d2be1ab630facab5be59233ab
1a60f769967ff59c16883bee8b69a670877307e5
/src/main/java/org/biac/manage/dao/CompanyUserMapper.java
94db5902b7d13fd3493cfa6fd1b4bfcc2772742b
[]
no_license
Sonlan/manage
170fd3fee0d13b03f745e6b01ef3ec8ea3bd40bf
ecefc1365453d08615f601d283f51991dff810df
refs/heads/master
2020-04-06T07:10:38.808017
2016-09-08T07:56:37
2016-09-08T07:56:37
63,243,502
0
0
null
null
null
null
UTF-8
Java
false
false
1,410
java
package org.biac.manage.dao; import org.biac.manage.entity.CompanyUser; import java.util.List; import java.util.Map; public interface CompanyUserMapper { /** * 根据用户名查找用户,用户名不能重复 * @param account * @return */ CompanyUser selectByAccount(String account); /** * 用户登录,检查用户名,密码以及当前用户状态 * @param map * @return */ CompanyUser login(Map<Object,Object> map); /** * 根据id查找用户 * @param id * @return */ CompanyUser selectById(String id); /** * 将用户status置为1,挂起 * @param id * @return */ int suspend(String id); /** * 将用户status置为0,恢复 * @param id * @return */ int activate(String id); /** * 根据id删除用户 * @param id * @return */ int delete(String id); /** * 编辑用户信息 * @param map * @return */ int updateSelective(Map<Object,Object> map); /** * 根据企业用户账户名与用户权限分页查找用户 * @param map * @return */ List<CompanyUser> query(Map<Object,Object> map); /**+ * 根据企业用户账户名与用户权限查找用户 * @param map * @return */ List<CompanyUser> queryForSize(Map<Object,Object> map); }
[ "1147649695@qq.com" ]
1147649695@qq.com
ea271fa66a4634070389054d347bd9a6cbef6b6b
a66b608b30e312bfdcf59b5922544b0fa99346fc
/thymeleaf&controllers/residentevil/src/main/java/softuni/residentevil/validators/IsBeforeValidator.java
8d05d7f9ef615bba80f7d3c884cc09d9a1fbb0ee
[ "MIT" ]
permissive
allsi89/Java-Web-MVC-Frameworks---Spring
3bf9b0280f8ff7f9579c5da35fc046638741b873
0ec212aea8458f3e1d6163f55e8bfe4e409fa1a5
refs/heads/master
2020-04-25T05:57:10.309767
2019-03-28T18:57:45
2019-03-28T18:57:45
172,561,080
0
0
null
null
null
null
UTF-8
Java
false
false
634
java
package softuni.residentevil.validators; import softuni.residentevil.annotations.IsBefore; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import java.time.LocalDate; public class IsBeforeValidator implements ConstraintValidator<IsBefore, LocalDate> { @Override public boolean isValid(LocalDate date, ConstraintValidatorContext constraintValidatorContext) { boolean isInTheFuture = false; if (date == null) { return isInTheFuture; } LocalDate currentDate = LocalDate.now(); isInTheFuture = date.isBefore(currentDate); return isInTheFuture; } }
[ "37107768+allsi89@users.noreply.github.com" ]
37107768+allsi89@users.noreply.github.com
f1d70b3ea0932849dbc09273e6f811a29e7360a5
4a0b08f12e9cb8af4e7644511d38627200f81c8e
/zuihou-backend/zuihou-authority/zuihou-authority-entity/src/main/java/com/github/zuihou/authority/dto/auth/RoleDTO.java
3f20722839af33a3c8251de16c1cb04271bcbfdb
[ "Apache-2.0" ]
permissive
gzush/zuihou-admin-cloud
4db4ce73a5aa51d608e1788b689bcca963b66d51
67cf0688715ff59f984b221c3e8c9e4384e7fd43
refs/heads/master
2020-06-11T19:24:05.420709
2019-06-26T07:37:48
2019-06-26T07:37:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
968
java
package com.github.zuihou.authority.dto.auth; import java.io.Serializable; import com.github.zuihou.authority.entity.auth.Role; import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.Accessors; /** * <p> * 实体类 * 角色 * </p> * * @author zuihou * @since 2019-06-23 */ @Data @NoArgsConstructor @Accessors(chain = true) @ToString(callSuper = true) @EqualsAndHashCode(callSuper = false) @ApiModel(value = "RoleDTO", description = "角色") public class RoleDTO extends Role implements Serializable { /** * 在DTO中新增并自定义字段,需要覆盖验证的字段,请新建DTO。Entity中的验证规则可以自行修改,但下次生成代码时,记得同步代码!! */ private static final long serialVersionUID = 1L; public static RoleDTO build() { return new RoleDTO(); } }
[ "244387066@qq.com" ]
244387066@qq.com
1271a845e10653f7d6fa57b08b97f1a869a35f44
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/google/android/gms/common/api/internal/GooglePlayServicesUpdatedReceiver.java
10f6ded7e287a1817ca1a495635c0ba328be1f5e
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.google.android.gms.common.api.internal; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.Uri; import com.tencent.matrix.trace.core.AppMethodBeat; public final class GooglePlayServicesUpdatedReceiver extends BroadcastReceiver { private Context mContext; private final Callback zzkt; public static abstract class Callback { public abstract void zzv(); } public GooglePlayServicesUpdatedReceiver(Callback callback) { this.zzkt = callback; } public final void onReceive(Context context, Intent intent) { AppMethodBeat.i(60637); Uri data = intent.getData(); Object obj = null; if (data != null) { obj = data.getSchemeSpecificPart(); } if ("com.google.android.gms".equals(obj)) { this.zzkt.zzv(); unregister(); } AppMethodBeat.o(60637); } public final synchronized void unregister() { AppMethodBeat.i(60636); if (this.mContext != null) { this.mContext.unregisterReceiver(this); } this.mContext = null; AppMethodBeat.o(60636); } public final void zzc(Context context) { this.mContext = context; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
5c59a8d8f70190489751dae111c4e81d41cf2078
e1e5bd6b116e71a60040ec1e1642289217d527b0
/H5/L2jMaster_org/L2jMaster_org_2019_07_02/L2JMaster_Server/src/main/java/com/l2jserver/gameserver/network/serverpackets/ExAirShipTeleportList.java
8df6f21aadde1a65416f35053be2f4ff7230ecb9
[]
no_license
serk123/L2jOpenSource
6d6e1988a421763a9467bba0e4ac1fe3796b34b3
603e784e5f58f7fd07b01f6282218e8492f7090b
refs/heads/master
2023-03-18T01:51:23.867273
2020-04-23T10:44:41
2020-04-23T10:44:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,769
java
/* * Copyright (C) 2004-2019 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server 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 com.l2jserver.gameserver.network.serverpackets; import com.l2jserver.gameserver.model.VehiclePathPoint; public class ExAirShipTeleportList extends L2GameServerPacket { private final int _dockId; private final VehiclePathPoint[][] _teleports; private final int[] _fuelConsumption; public ExAirShipTeleportList(int dockId, VehiclePathPoint[][] teleports, int[] fuelConsumption) { _dockId = dockId; _teleports = teleports; _fuelConsumption = fuelConsumption; } @Override protected void writeImpl() { writeC(0xfe); writeH(0x9a); writeD(_dockId); if (_teleports != null) { writeD(_teleports.length); VehiclePathPoint[] path; VehiclePathPoint dst; for (int i = 0; i < _teleports.length; i++) { writeD(i - 1); writeD(_fuelConsumption[i]); path = _teleports[i]; dst = path[path.length - 1]; writeD(dst.getX()); writeD(dst.getY()); writeD(dst.getZ()); } } else { writeD(0); } } }
[ "64197706+L2jOpenSource@users.noreply.github.com" ]
64197706+L2jOpenSource@users.noreply.github.com
01f5f3e787c51acd69e1d698ebda0e9c82396a7f
691f0f7ecd1a74e6a3203b3d2505cd3c86d73a87
/src/main/resources/archetype-resources/src/test/java/echo/TestEchoService.java
c825e538e32e24882dfedd2150109b3f83168396
[]
no_license
McFoggy/jee-war-archetype
5602fac571f1be6e8b04d11849f95ac8e7aaed70
c97532f9364fcf2b789d7033c52514aa8dd8ccce
refs/heads/master
2021-05-04T10:20:59.184777
2016-11-20T08:06:04
2016-11-20T08:06:04
51,308,193
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
#set( $symbol_pound = '#' ) #set( $symbol_dollar = '$' ) #set( $symbol_escape = '\' ) package ${package}.echo; import static org.junit.Assert.assertThat; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.core.IsNull.nullValue; public class TestEchoService { @Test public void echo_answers_null_for_null_message() { EchoService es = new EchoService(); assertThat(es.echo(null), nullValue()); } @Test public void echo_answers_identity_for_a_given_message() { String fullMessage = "Lorem ipsum dolor sit amet"; EchoService es = new EchoService(); assertThat(es.echo(fullMessage), is(fullMessage)); for (String word : fullMessage.split("${symbol_escape}${symbol_escape}s")) { assertThat(es.echo(word), is(word)); } } }
[ "matthieu@brouillard.fr" ]
matthieu@brouillard.fr
b0807760e10b0b22ccad9f76301a72d662bd25f2
235d06d08187ae4af8c073e39c74572eff4a3afa
/spring-boot-api-rest-ii/src/main/java/br/com/cmdev/sbootapirestii/controller/HelloController.java
af8f6e602b04c0eecdb6972eba988199a307538b
[]
no_license
calixtomacedo/alura-formacao-spring-framework
9e56aff574c7ab2e417ef15cbbf42bf10dadbca6
4a85223f9c143997d093433f0c909bc297513647
refs/heads/master
2023-07-14T14:06:14.532558
2021-08-19T03:13:10
2021-08-19T03:13:10
384,835,010
0
0
null
null
null
null
UTF-8
Java
false
false
360
java
package br.com.cmdev.sbootapirestii.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class HelloController { @RequestMapping("/") @ResponseBody public String hello() { return "Hello World!"; } }
[ "calixto.macedo@gmail.com" ]
calixto.macedo@gmail.com
31a13d4754a025be11955aabe3af1fd633f0ea09
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/3.2.0/code/base/dso-l2/src/com/tc/objectserver/managedobject/LinkedHashMapManagedObjectState.java
3c753fc8baff8b242755732d786c9fd90348eea5
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
4,349
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tc.objectserver.managedobject; import com.tc.object.ObjectID; import com.tc.object.SerializationUtil; import com.tc.object.dna.api.DNACursor; import com.tc.object.dna.api.DNAWriter; import com.tc.object.dna.api.LogicalAction; import com.tc.object.dna.api.PhysicalAction; import com.tc.objectserver.mgmt.ManagedObjectFacade; import com.tc.util.Assert; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map.Entry; /** * state for maps */ public class LinkedHashMapManagedObjectState extends PartialMapManagedObjectState { private static final String ACCESS_ORDER_FIELDNAME = "java.util.LinkedHashMap.accessOrder"; private boolean accessOrder = false; // TODO:: Come back and make this partial too LinkedHashMapManagedObjectState(long classID) { super(classID, new LinkedHashMap(1)); } protected LinkedHashMapManagedObjectState(ObjectInput in) throws IOException { super(in); } @Override public void apply(ObjectID objectID, DNACursor cursor, BackReferences includeIDs) throws IOException { if (!cursor.next()) { return; } Object action = cursor.getAction(); if (action instanceof PhysicalAction) { PhysicalAction physicalAction = (PhysicalAction) action; Assert.assertEquals(ACCESS_ORDER_FIELDNAME, physicalAction.getFieldName()); setAccessOrder(physicalAction.getObject()); } else { LogicalAction logicalAction = (LogicalAction) action; int method = logicalAction.getMethod(); Object[] params = logicalAction.getParameters(); applyMethod(objectID, includeIDs, method, params); } while (cursor.next()) { LogicalAction logicalAction = cursor.getLogicalAction(); int method = logicalAction.getMethod(); Object[] params = logicalAction.getParameters(); applyMethod(objectID, includeIDs, method, params); } } @Override protected void applyMethod(ObjectID objectID, BackReferences includeIDS, int method, Object[] params) { switch (method) { case SerializationUtil.GET: ((LinkedHashMap) references).get(params[0]); break; default: super.applyMethod(objectID, includeIDS, method, params); } } private void setAccessOrder(Object accessOrderObject) { try { Assert.assertTrue(accessOrderObject instanceof Boolean); accessOrder = ((Boolean) accessOrderObject).booleanValue(); references = new LinkedHashMap(1, 0.75f, accessOrder); } catch (Exception e) { throw new RuntimeException(e); } } @Override public void dehydrate(ObjectID objectID, DNAWriter writer) { writer.addPhysicalAction(ACCESS_ORDER_FIELDNAME, Boolean.valueOf(accessOrder)); super.dehydrate(objectID, writer); } // TODO: The Facade does not include the access order. @Override public ManagedObjectFacade createFacade(ObjectID objectID, String className, int limit) { return super.createFacade(objectID, className, limit); } @Override public byte getType() { return LINKED_HASHMAP_TYPE; } //TODO:: Until partial collections support is enabled for this class @Override protected void basicWriteTo(ObjectOutput out) throws IOException { out.writeBoolean(accessOrder); out.writeInt(references.size()); for (Iterator i = references.entrySet().iterator(); i.hasNext();) { Entry entry = (Entry) i.next(); out.writeObject(entry.getKey()); out.writeObject(entry.getValue()); } } // TODO:: Until CollectionsPersistor saves retrieves data in references map. static MapManagedObjectState readFrom(ObjectInput in) throws IOException, ClassNotFoundException { LinkedHashMapManagedObjectState linkedsmo = new LinkedHashMapManagedObjectState(in); linkedsmo.accessOrder = in.readBoolean(); int size = in.readInt(); LinkedHashMap map = new LinkedHashMap(size, 0.75f, linkedsmo.accessOrder); for (int i = 0; i < size; i++) { Object key = in.readObject(); Object value = in.readObject(); map.put(key, value); } linkedsmo.setMap(map); return linkedsmo; } }
[ "jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
2690f450c0ed9a5f094555cc6bad6e7b377ac282
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/webview/ui/tools/game/GameChattingRoomWebViewUI$2.java
3eadce560262adbc940221a71bc3247d7b582629
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
957
java
package com.tencent.mm.plugin.webview.ui.tools.game; import android.content.Intent; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.pluginsdk.ui.applet.q.a; final class GameChattingRoomWebViewUI$2 implements q.a { GameChattingRoomWebViewUI$2(GameChattingRoomWebViewUI paramGameChattingRoomWebViewUI) { } public final void a(boolean paramBoolean, String paramString, int paramInt) { AppMethodBeat.i(8644); paramString = new Intent(); paramString.putExtra("rawUrl", GameChattingRoomWebViewUI.b(this.uDa)); this.uDa.setResult(GameChattingRoomWebViewUI.c(this.uDa), paramString); this.uDa.finish(); AppMethodBeat.o(8644); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.webview.ui.tools.game.GameChattingRoomWebViewUI.2 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
630328b784c502f59b8905b650b6f6057e42bc3b
c2af0e9f998bbc444579455c92c519e5c8a43435
/src/test/java/MyTests/BaseTest.java
c65e308f425306961f8c56638ff6db052c9c185c
[]
no_license
vrpavan/Jan2021SeleniumSessions
86a46719d0e4c93fc538daff6de59228bb1c3c5c
7ad9c733cf8bbeefdd239eca99bb02b7df850e51
refs/heads/master
2023-04-18T01:24:05.179908
2021-04-20T02:23:58
2021-04-20T02:23:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,268
java
package MyTests; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.safari.SafariDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import io.github.bonigarcia.wdm.WebDriverManager; public class BaseTest { WebDriver driver; @BeforeTest @Parameters({ "browser" }) public void setup(String browserName) { if (browserName.equals("chrome")) { WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); } else if(browserName.equals("firefox")) { WebDriverManager.firefoxdriver().setup(); driver = new FirefoxDriver(); } else if(browserName.equals("safari")) { driver = new SafariDriver(); } else { System.out.println("browser is not found..." + browserName); } driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.manage().deleteAllCookies(); driver.manage().window().maximize(); } @Test public void testing() { System.out.println("base -- testing"); } @AfterTest public void tearDown() { driver.quit(); } }
[ "naveenautomationlabs@naveenautomationlabss-MacBook-Pro.local" ]
naveenautomationlabs@naveenautomationlabss-MacBook-Pro.local
5bbc6f472c9f3394912c3df4a5f05674109d8350
536d5ccc58a6461d47abb199329c899d654e7357
/text-pattern/src/test/java/nl/inl/blacklab/search/TestTextPatternWildcard.java
c8414199c2078435e99c1b231b794a50993e790b
[ "Apache-2.0" ]
permissive
lexionai/BlackLab
560aff91d9c3be33d2a60ad3045f7166ffb9ccfb
358d1c741072e8d5803699fc1fe57a7f746e6f3e
refs/heads/ai2-dev
2023-03-05T01:39:32.463958
2022-11-09T17:59:22
2022-11-09T17:59:22
161,707,222
0
0
Apache-2.0
2022-11-09T17:59:24
2018-12-13T23:34:27
Java
UTF-8
Java
false
false
1,968
java
/******************************************************************************* * Copyright (c) 2010, 2012 Institute for Dutch Lexicology * * 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 nl.inl.blacklab.search; import org.junit.Test; public class TestTextPatternWildcard { @Test public void testBla() { // OK } // @Test // public void testGetAppropriatePatternSimple() { // TextPattern t = TextPatternWildcard.getAppropriatePattern("blabla"); // Assert.assertEquals(TextPatternTerm.class, t.getClass()); // Assert.assertEquals("blabla", ((TextPatternTerm) t).getValue()); // } // // @Test // public void testGetAppropriatePatternPrefix() { // TextPattern t = TextPatternWildcard.getAppropriatePattern("blabla*"); // Assert.assertEquals(TextPatternPrefix.class, t.getClass()); // Assert.assertEquals("blabla", ((TextPatternPrefix) t).getValue()); // } // // @Test // public void testGetAppropriatePatternWildcard() { // TextPattern t = TextPatternWildcard.getAppropriatePattern("*bla"); // Assert.assertEquals(TextPatternWildcard.class, t.getClass()); // Assert.assertEquals("*bla", ((TextPatternWildcard) t).getValue()); // // t = TextPatternWildcard.getAppropriatePattern("*bl??a*"); // Assert.assertEquals(TextPatternWildcard.class, t.getClass()); // Assert.assertEquals("*bl??a*", ((TextPatternWildcard) t).getValue()); // } }
[ "jan.niestadt@inl.nl" ]
jan.niestadt@inl.nl
c4193ce4588b808bc17ff8abd593b885757c05bd
7ce021205687faad6654e04623b3cd49bdad452d
/hvacrepo/timetrackersetup-service-impl/src/main/java/com/key2act/timetracker/builder/ConfigureBatchSetting.java
d966df714d1561b391f4a17cc5d7222927837c94
[]
no_license
venkateshm383/roibackupprojects
4ad9094d25dad9fe60da5f557069ecb36f627e4d
a78467028950c8eafdd662113870f633e61304d2
refs/heads/master
2020-04-18T21:52:10.308611
2016-09-02T04:32:21
2016-09-02T04:32:21
67,107,627
1
0
null
null
null
null
UTF-8
Java
false
false
4,670
java
package com.key2act.timetracker.builder; import static com.key2act.timetracker.util.TimeTrackerConstants.*; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import org.apache.camel.Exchange; import org.apache.metamodel.DataContext; import org.apache.metamodel.data.DataSet; import org.apache.metamodel.data.Row; import org.apache.metamodel.query.SelectItem; import org.apache.metamodel.schema.Column; import org.apache.metamodel.schema.Table; import org.json.JSONException; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.datastax.driver.core.Cluster; import com.getusroi.eventframework.abstractbean.AbstractCassandraBean; import com.getusroi.eventframework.abstractbean.util.CassandraClusterException; import com.getusroi.permastore.config.IPermaStoreCustomCacheObjectBuilder; import com.getusroi.permastore.config.jaxb.CustomBuilder; public class ConfigureBatchSetting extends AbstractCassandraBean implements IPermaStoreCustomCacheObjectBuilder { static Logger logger = LoggerFactory.getLogger(ConfigureBatchSetting.class); /** * Method to load the BatchSetting PermaObject into the cache * * @param configBuilderConfig * @return */ @Override public Serializable loadDataForCache(CustomBuilder configBuilderConfig) { Cluster cluster = null; try { cluster = getCassandraCluster(); } catch (CassandraClusterException e) { logger.error("ClusterException, Connection could not be established"); } String keySpace = CASSANDRA_TABLE_KEYSPACE; DataContext dataContext = getDataContextForCassandraByCluster(cluster, keySpace); Table table = getTableForDataContext(dataContext, BATCH_SETUP_TABLENAME); JSONObject permaObject = getDataSetForBatchSetUp(table, dataContext); return (Serializable) permaObject.toString(); } /** * Fetching the DataSets by selecting all the Column available in the table list * * @param table * @param dataContext */ private JSONObject getDataSetForBatchSetUp(Table table, DataContext dataContext) { List<Column> columnList = getColumnsForDataSet(table); DataSet dataset = dataContext .query() .from(table) .select(columnList.get(0), columnList.get(1), columnList.get(2), columnList.get(3), columnList.get(4)).execute(); JSONObject permaObject = generatePermaObject(dataset, columnList); return permaObject; } /** * Computing the Batch SETUP Database And passing the columns as List * * @param table * @return list of columns present in the Batch SETUP table */ public List<Column> getColumnsForDataSet(Table table) { Column tenantID = table.getColumnByName(TENANTID_COLUMN_KEY); Column batchcomment = table.getColumnByName(BATCH_COMMENT); Column endofweek = table.getColumnByName(END_OF_WEEK); Column ispostbatchesdaily = table.getColumnByName(IS_POST_BATCHES_DAILY); Column prefixbatchname = table.getColumnByName(PREFIX_BATCH_NAME); List<Column> columnList = new ArrayList<Column>(); columnList.add(tenantID); columnList.add(batchcomment); columnList.add(endofweek); columnList.add(ispostbatchesdaily); columnList.add(prefixbatchname); return columnList; } /** * Method which will use the dataset Provided and the List of the columns * available in the table, which would create a new jsonobject based on the * tenant name to act as permaCacheObject * * @param dataset * @param column * @return json object with batch settings */ private JSONObject generatePermaObject(DataSet dataset, List<Column> column) { org.json.JSONObject batchSetUpObject = new org.json.JSONObject(); while (dataset.next()) { Row row = dataset.getRow(); try { JSONObject batchSettingsOfTenant = new JSONObject(); batchSettingsOfTenant.put(BATCH_COMMENT, row.getValue(column.get(1))); batchSettingsOfTenant.put(END_OF_WEEK, row.getValue(column.get(2))); batchSettingsOfTenant.put(IS_POST_BATCHES_DAILY, row.getValue(column.get(3))); batchSettingsOfTenant.put(PREFIX_BATCH_NAME, row.getValue(column.get(4))); batchSetUpObject.put(row.getValue(column.get(0)).toString(), batchSettingsOfTenant); } catch (JSONException e) { logger.error("Unable to store PermaStoreConfiguration data for Batch Setting"); } } return batchSetUpObject; } /** * #TODO to check whether the processBean implementation needs to be changed * or not after having it reviewed * * @param exchange * @throws Exception */ @Override protected void processBean(Exchange exchange) throws Exception { // Since it is a void method, its not used to do any processing for Configuring Batch Settings } }
[ "you@example.com" ]
you@example.com
67b8e7d64d73f6ec50874d71088131091bdb0b4c
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a228/A228545Test.java
b7de97146c2fb5004e4d22b16974404b0d49aff2
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a228; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A228545Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
1e811914d83f5b82450ddef3ca8a572ad83bbcd3
60e04f77d2a9a3f09ede9c7dfbebcac329c7436e
/NotVerified/Overfitting/ArjaE/FindInArray/bug5/Repaired/FindInArray.java
d1adb3a1499e0c22c6f4b97612df54911ead3932
[]
no_license
Amirfarhad-Nilizadeh/BuggyJavaJML
080ea9799955709774a5cb4cad6abdd9e7ddfcae
ae8e6a6b0bced50fcb6d45ea526f3541be0ccdd8
refs/heads/master
2023-05-10T07:27:46.438117
2021-06-07T23:40:18
2021-06-07T23:40:18
305,563,884
0
1
null
null
null
null
UTF-8
Java
false
false
2,372
java
class FindInArray { private /*@ spec_public @*/ int key; private /*@ spec_public @*/ int arr[]; //@ ensures (\forall int i; 0 <= i && i < inputArr.length; inputArr[i] == arr[i]); //@ ensures key == 0; FindInArray(int inputArr[]) { int size = inputArr.length; arr = new int[size]; arr = inputArr.clone(); } //@ ensures this.key == key; //@ ensures (\forall int i; 0 <= i && i < inputArr.length; inputArr[i] == arr[i]); FindInArray(int inputArr[], int key) { int size = inputArr.length; arr = new int[size]; arr = inputArr.clone(); setKey(key); } //@ assignable this.key; //@ ensures this.key == key; void setKey(int key) { this.key = key; } //@ ensures \result == this.key; /*@ pure @*/ int getKey() { return this.key; } //@ requires 0 <= i && i < arr.length; //@ ensures \result == this.arr[i]; /*@ pure @*/ int getArr(int i) { return this.arr[i]; } //@ ensures \result == arr.length; /*@ pure @*/ int size() { return arr.length; } /*@ ensures 0 <= \result && \result < arr.length ==> (arr[\result] == key && @ (\forall int i; \result < i && i < arr.length; arr[i] != key)); @ ensures \result == -1 ==> (\forall int i; 0 <= i && i < arr.length; arr[i] != key); @*/ /*@ pure @*/ int findLast() { int index = size() - 1; // int index = size() - 1; //@ maintaining -1 <= index && index < arr.length; //@ maintaining (\forall int i; index < i && i < arr.length; arr[i] != key); while (1 <= index) { if (getArr(index) == getKey()) return index; index--; } return -1; } /*@ ensures 0 <= \result && \result < arr.length ==> (arr[\result] == key && @ (\forall int i; 0 <= i && i < \result; arr[i] != key)); @ ensures \result == -1 ==> (\forall int i; 0 <= i && i < arr.length; arr[i] != key); @*/ /*@ pure @*/ int findFirst() { //@ maintaining 0 <= index && index <= arr.length; //@ maintaining (\forall int i; 0 <= i && i < index; arr[i] != key); for (int index = 0; index < size(); index++) { if (getArr(index) == getKey()) return index; } return -1; } //@ ensures \result <==> findLast() != findFirst(); /*@ pure @*/ boolean isMoreThanOneKey() { int first = findFirst(); int last = findLast(); return (first != last); } }
[ "amirfarhad.nilizadeh@gmail.com" ]
amirfarhad.nilizadeh@gmail.com
9ac417f4d1fe16630bf6ce84dc6ee2c3f4fe2a30
9a52fe3bcdd090a396e59c68c63130f32c54a7a8
/sources/com/google/android/gms/internal/ads/zzbel.java
66d85ac84851ae660cbc82d6c74fb98e7c1f3bfa
[]
no_license
mzkh/LudoKing
19d7c76a298ee5bd1454736063bc392e103a8203
ee0d0e75ed9fa8894ed9877576d8e5589813b1ba
refs/heads/master
2022-04-25T06:08:41.916017
2020-04-14T17:00:45
2020-04-14T17:00:45
255,670,636
1
0
null
null
null
null
UTF-8
Java
false
false
1,794
java
package com.google.android.gms.internal.ads; import android.content.Context; import com.google.android.gms.ads.internal.zzq; import java.lang.ref.WeakReference; /* compiled from: com.google.android.gms:play-services-ads@@18.2.0 */ public class zzbel { private final zzaxl zzblh; private final WeakReference<Context> zzeju; private final Context zzlk; /* compiled from: com.google.android.gms:play-services-ads@@18.2.0 */ public static class zza { /* access modifiers changed from: private */ public zzaxl zzblh; /* access modifiers changed from: private */ public WeakReference<Context> zzeju; /* access modifiers changed from: private */ public Context zzzc; public final zza zza(zzaxl zzaxl) { this.zzblh = zzaxl; return this; } public final zza zzbs(Context context) { this.zzeju = new WeakReference<>(context); if (context.getApplicationContext() != null) { context = context.getApplicationContext(); } this.zzzc = context; return this; } } private zzbel(zza zza2) { this.zzblh = zza2.zzblh; this.zzlk = zza2.zzzc; this.zzeju = zza2.zzeju; } /* access modifiers changed from: 0000 */ public final Context zzabp() { return this.zzlk; } /* access modifiers changed from: 0000 */ public final WeakReference<Context> zzabq() { return this.zzeju; } /* access modifiers changed from: 0000 */ public final zzaxl zzabr() { return this.zzblh; } /* access modifiers changed from: 0000 */ public final String zzabs() { return zzq.zzkj().zzr(this.zzlk, this.zzblh.zzblz); } }
[ "mdkhnmm@amazon.com" ]
mdkhnmm@amazon.com
a41c6e89879a24045cc5e296b661ad673f014cd8
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/zxing-zxing/nonFlakyMethods/com.google.zxing.oned.CodaBarWriterTestCase-testEncode.java
b936fefbc1864fcf555c92420f7fa75f887bc00a
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
@Test public void testEncode() throws WriterException { CharSequence resultStr="0000000000" + "1001001011011010100101010110010110101001010100110101100101010110110101101001001011" + "0000000000"; BitMatrix result=new CodaBarWriter().encode("B515-3/B",BarcodeFormat.CODABAR,resultStr.length(),0); for (int i=0; i < resultStr.length(); i++) { assertEquals("Element " + i,resultStr.charAt(i) == '1',result.get(i,0)); } }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
8f3f579487195c9794716ad7a4a8f56fd2c992c5
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/utils/view/bottombar/BottomNavigationBehavior.java
09c3d96143767ef7d589281a308f96f14c1de73c
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
7,246
java
package utils.view.bottombar; import android.os.Build.VERSION; import android.support.annotation.NonNull; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.CoordinatorLayout.Behavior; import android.support.design.widget.Snackbar.SnackbarLayout; import android.support.v4.view.ViewCompat; import android.support.v4.view.ViewPropertyAnimatorCompat; import android.support.v4.view.animation.LinearOutSlowInInterpolator; import android.view.View; import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.MarginLayoutParams; import android.view.animation.Interpolator; class BottomNavigationBehavior<V extends View> extends VerticalScrollingBehavior<V> { private static final Interpolator INTERPOLATOR = new LinearOutSlowInInterpolator(); private final int bottomNavHeight; private final int defaultOffset; private boolean hidden = false; private boolean isTablet = false; private boolean mScrollingEnabled; private int mSnackbarHeight = -1; private ViewPropertyAnimatorCompat mTranslationAnimator; private final BottomNavigationWithSnackbar mWithSnackBarImpl; private interface BottomNavigationWithSnackbar { void updateSnackbar(CoordinatorLayout coordinatorLayout, View view, View view2); } private class LollipopBottomNavWithSnackBarImpl implements BottomNavigationWithSnackbar { private LollipopBottomNavWithSnackBarImpl() { } public void updateSnackbar(CoordinatorLayout parent, View dependency, View child) { if (!BottomNavigationBehavior.this.isTablet && (dependency instanceof SnackbarLayout)) { if (BottomNavigationBehavior.this.mSnackbarHeight == -1) { BottomNavigationBehavior.this.mSnackbarHeight = dependency.getHeight(); } if (ViewCompat.getTranslationY(child) == 0.0f) { dependency.setPadding(dependency.getPaddingLeft(), dependency.getPaddingTop(), dependency.getPaddingRight(), (BottomNavigationBehavior.this.mSnackbarHeight + BottomNavigationBehavior.this.bottomNavHeight) - BottomNavigationBehavior.this.defaultOffset); } } } } private class PreLollipopBottomNavWithSnackBarImpl implements BottomNavigationWithSnackbar { private PreLollipopBottomNavWithSnackBarImpl() { } public void updateSnackbar(CoordinatorLayout parent, View dependency, View child) { if (!BottomNavigationBehavior.this.isTablet && (dependency instanceof SnackbarLayout)) { if (BottomNavigationBehavior.this.mSnackbarHeight == -1) { BottomNavigationBehavior.this.mSnackbarHeight = dependency.getHeight(); } if (ViewCompat.getTranslationY(child) == 0.0f) { ((MarginLayoutParams) dependency.getLayoutParams()).bottomMargin = (BottomNavigationBehavior.this.bottomNavHeight + BottomNavigationBehavior.this.mSnackbarHeight) - BottomNavigationBehavior.this.defaultOffset; child.bringToFront(); child.getParent().requestLayout(); if (VERSION.SDK_INT < 19) { ((View) child.getParent()).invalidate(); } } } } } BottomNavigationBehavior(int bottomNavHeight, int defaultOffset, boolean tablet) { this.mWithSnackBarImpl = VERSION.SDK_INT >= 21 ? new LollipopBottomNavWithSnackBarImpl() : new PreLollipopBottomNavWithSnackBarImpl(); this.mScrollingEnabled = true; this.bottomNavHeight = bottomNavHeight; this.defaultOffset = defaultOffset; this.isTablet = tablet; } public boolean layoutDependsOn(CoordinatorLayout parent, V child, View dependency) { this.mWithSnackBarImpl.updateSnackbar(parent, dependency, child); return dependency instanceof SnackbarLayout; } public void onNestedVerticalOverScroll(CoordinatorLayout coordinatorLayout, V v, int direction, int currentOverScroll, int totalOverScroll) { } public void onDependentViewRemoved(CoordinatorLayout parent, V child, View dependency) { updateScrollingForSnackbar(dependency, true); super.onDependentViewRemoved(parent, child, dependency); } private void updateScrollingForSnackbar(View dependency, boolean enabled) { if (!this.isTablet && (dependency instanceof SnackbarLayout)) { this.mScrollingEnabled = enabled; } } public boolean onDependentViewChanged(CoordinatorLayout parent, V child, View dependency) { updateScrollingForSnackbar(dependency, false); return super.onDependentViewChanged(parent, child, dependency); } public void onDirectionNestedPreScroll(CoordinatorLayout coordinatorLayout, V child, View target, int dx, int dy, int[] consumed, int scrollDirection) { handleDirection(child, scrollDirection); } private void handleDirection(V child, int scrollDirection) { if (!this.mScrollingEnabled) { return; } if (scrollDirection == -1 && this.hidden) { this.hidden = false; animateOffset(child, this.defaultOffset); } else if (scrollDirection == 1 && !this.hidden) { this.hidden = true; animateOffset(child, this.bottomNavHeight + this.defaultOffset); } } protected boolean onNestedDirectionFling(CoordinatorLayout coordinatorLayout, V child, View target, float velocityX, float velocityY, int scrollDirection) { handleDirection(child, scrollDirection); return true; } private void animateOffset(V child, int offset) { ensureOrCancelAnimator(child); this.mTranslationAnimator.translationY((float) offset).start(); } private void ensureOrCancelAnimator(V child) { if (this.mTranslationAnimator == null) { this.mTranslationAnimator = ViewCompat.animate(child); this.mTranslationAnimator.setDuration(300); this.mTranslationAnimator.setInterpolator(INTERPOLATOR); return; } this.mTranslationAnimator.cancel(); } void setHidden(@NonNull V view, boolean bottomLayoutHidden) { if (!bottomLayoutHidden && this.hidden) { animateOffset(view, this.defaultOffset); } else if (bottomLayoutHidden && !this.hidden) { animateOffset(view, this.bottomNavHeight + this.defaultOffset); } this.hidden = bottomLayoutHidden; } static <V extends View> BottomNavigationBehavior<V> from(@NonNull V view) { LayoutParams params = view.getLayoutParams(); if (params instanceof CoordinatorLayout.LayoutParams) { Behavior behavior = ((CoordinatorLayout.LayoutParams) params).getBehavior(); if (behavior instanceof BottomNavigationBehavior) { return (BottomNavigationBehavior) behavior; } throw new IllegalArgumentException("The view is not associated with BottomNavigationBehavior"); } throw new IllegalArgumentException("The view is not a child of CoordinatorLayout"); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
6f396e7c21db833a4579bdc0cf9f813fc9c6c772
5a782636974322ef79e41f31cbb00900dfbe71c9
/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGiantChest.java
2f6e99e5e8af88a05b234c59fefdf02f45932328
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
Dawn-MC/ActuallyAdditions
d0a3beed4da6e3d8983699d607f5e8cc37c06abb
544c4020ee775f7cf58d542e65ed4ff3557a11cb
refs/heads/master
2021-01-23T15:52:03.861823
2017-05-28T12:15:11
2017-05-28T12:15:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,103
java
/* * This file ("BlockGiantChest.java") is part of the Actually Additions mod for Minecraft. * It is created and owned by Ellpeck and distributed * under the Actually Additions License to be found at * http://ellpeck.de/actaddlicense * View the source code at https://github.com/Ellpeck/ActuallyAdditions * * © 2015-2017 Ellpeck */ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.items.InitItems; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestLarge; import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChestMedium; import de.ellpeck.actuallyadditions.mod.util.*; import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextFormatting; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; public class BlockGiantChest extends BlockContainerBase{ public final int type; public BlockGiantChest(String name, int type){ super(Material.WOOD, name); this.type = type; this.setHarvestLevel("axe", 0); this.setHardness(0.5F); this.setResistance(15.0F); this.setSoundType(SoundType.WOOD); } @Override public TileEntity createNewTileEntity(World world, int par2){ switch(this.type){ case 1: return new TileEntityGiantChestMedium(); case 2: return new TileEntityGiantChestLarge(); default: return new TileEntityGiantChest(); } } @Override public boolean isFullCube(IBlockState state){ return false; } @Override public boolean isOpaqueCube(IBlockState state){ return false; } @Override public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing par6, float par7, float par8, float par9){ if(!world.isRemote){ TileEntityGiantChest chest = (TileEntityGiantChest)world.getTileEntity(pos); if(chest != null){ chest.fillWithLoot(player); player.openGui(ActuallyAdditions.instance, GuiHandler.GuiTypes.GIANT_CHEST.ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); } return true; } return true; } @Override public EnumRarity getRarity(ItemStack stack){ return EnumRarity.EPIC; } @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack){ if(stack.getTagCompound() != null){ TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ NBTTagList list = stack.getTagCompound().getTagList("Items", 10); ItemStackHandlerCustom slots = ((TileEntityGiantChest)tile).slots; for(int i = 0; i < list.tagCount(); i++){ NBTTagCompound compound = list.getCompoundTagAt(i); if(compound != null && compound.hasKey("id")){ slots.setStackInSlot(i, new ItemStack(list.getCompoundTagAt(i))); } } } } super.onBlockPlacedBy(world, pos, state, entity, stack); } @Override public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune){ ArrayList<ItemStack> drops = super.getDrops(world, pos, state, fortune); TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ ItemStackHandlerCustom slots = ((TileEntityGiantChest)tile).slots; int place = ItemUtil.getPlaceAt(slots.getItems(), new ItemStack(InitItems.itemCrateKeeper), false); if(place >= 0){ NBTTagList list = new NBTTagList(); for(int i = 0; i < slots.getSlots(); i++){ //Destroy the keeper if(i != place){ NBTTagCompound compound = new NBTTagCompound(); if(StackUtil.isValid(slots.getStackInSlot(i))){ slots.getStackInSlot(i).writeToNBT(compound); } list.appendTag(compound); } } if(list.tagCount() > 0){ ItemStack stackInQuestion = drops.get(0); if(StackUtil.isValid(stackInQuestion)){ if(stackInQuestion.getTagCompound() == null){ stackInQuestion.setTagCompound(new NBTTagCompound()); } stackInQuestion.getTagCompound().setTag("Items", list); } } } } return drops; } @Override public boolean shouldDropInventory(World world, BlockPos pos){ TileEntity tile = world.getTileEntity(pos); if(tile instanceof TileEntityGiantChest){ if(ItemUtil.contains(((TileEntityGiantChest)tile).slots.getItems(), new ItemStack(InitItems.itemCrateKeeper), false)){ return false; } } return true; } @Override protected ItemBlockBase getItemBlock(){ return new TheItemBlock(this); } public static class TheItemBlock extends ItemBlockBase{ public TheItemBlock(Block block){ super(block); } @Override public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced){ int type = this.block instanceof BlockGiantChest ? ((BlockGiantChest)this.block).type : -1; if(type == 2){ tooltip.add(TextFormatting.ITALIC+StringUtil.localize("container."+ModUtil.MOD_ID+".giantChestLarge.desc")); } else if(type == 0){ tooltip.add(TextFormatting.ITALIC+StringUtil.localize("container."+ModUtil.MOD_ID+".giantChest.desc")); } } @Override public NBTTagCompound getNBTShareTag(ItemStack stack){ return null; } } }
[ "megamaximal@gmail.com" ]
megamaximal@gmail.com
e79ba35031f0c1a9e3f3a1f3f8bcdabd7d67e8ae
f7295dfe3c303e1d656e7dd97c67e49f52685564
/smali/com/google/zxing/aztec/encoder/SimpleToken.java
904fadaa1c3771ccb0f59e2457de4fd3eb3332d7
[]
no_license
Eason-Chen0452/XiaoMiGame
36a5df0cab79afc83120dab307c3014e31f36b93
ba05d72a0a0c7096d35d57d3b396f8b5d15729ef
refs/heads/master
2022-04-14T11:08:31.280151
2020-04-14T08:57:25
2020-04-14T08:57:25
255,541,211
0
1
null
null
null
null
UTF-8
Java
false
false
929
java
package com.google.zxing.aztec.encoder; import com.google.zxing.common.BitArray; final class SimpleToken extends Token { private final short bitCount; private final short value; SimpleToken(Token paramToken, int paramInt1, int paramInt2) { super(paramToken); this.value = ((short)paramInt1); this.bitCount = ((short)paramInt2); } void appendTo(BitArray paramBitArray, byte[] paramArrayOfByte) { paramBitArray.appendBits(this.value, this.bitCount); } public String toString() { int i = this.value; int j = this.bitCount; int k = this.bitCount; return '<' + Integer.toBinaryString(1 << this.bitCount | i & (1 << j) - 1 | 1 << k).substring(1) + '>'; } } /* Location: C:\Users\Administrator\Desktop\apk\dex2jar\classes-dex2jar.jar!\com\google\zxing\aztec\encoder\SimpleToken.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "chen_guiq@163.com" ]
chen_guiq@163.com
7406852ab3cb48d10fb56e629f851e82a4bdde21
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_6043bc614d254d7bd8c72a1767134aafb7dd7c2d/AbstractJBehaveStory/12_6043bc614d254d7bd8c72a1767134aafb7dd7c2d_AbstractJBehaveStory_t.java
a6e549fa53e3e3909873f642ad71ac591ca05d60
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,358
java
package net.thucydides.jbehave; import net.thucydides.core.model.TestOutcome; import net.thucydides.core.reports.xml.XMLTestOutcomeReporter; import net.thucydides.core.util.MockEnvironmentVariables; import net.thucydides.core.webdriver.Configuration; import net.thucydides.core.webdriver.SystemPropertiesConfiguration; import org.jbehave.core.reporters.StoryReporter; import org.jbehave.core.reporters.TxtOutput; import org.junit.Before; import org.junit.Rule; import org.junit.rules.TemporaryFolder; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.Collections; import java.util.Comparator; import java.util.List; public class AbstractJBehaveStory { protected OutputStream output; protected StoryReporter printOutput; protected MockEnvironmentVariables environmentVariables; protected Configuration systemConfiguration; @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); protected File outputDirectory; @Before public void prepareReporter() { environmentVariables = new MockEnvironmentVariables(); outputDirectory = temporaryFolder.newFolder("output"); environmentVariables.setProperty("thucydides.outputDirectory", outputDirectory.getAbsolutePath()); output = new ByteArrayOutputStream(); printOutput = new TxtOutput(new PrintStream(output)); systemConfiguration = new SystemPropertiesConfiguration(environmentVariables); } protected void run(JUnitThucydidesStories stories) { try { stories.run(); } catch(Throwable e) { e.printStackTrace(); } } protected List<TestOutcome> loadTestOutcomes() throws IOException { XMLTestOutcomeReporter outcomeReporter = new XMLTestOutcomeReporter(); List<TestOutcome> testOutcomes = outcomeReporter.loadReportsFrom(outputDirectory); Collections.sort(testOutcomes, new Comparator<TestOutcome>() { @Override public int compare(TestOutcome testOutcome, TestOutcome testOutcome1) { return testOutcome.getTitle().compareTo(testOutcome1.getTitle()); } }); return testOutcomes; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
dae55c534f90f5b878bb1c26085d3021c39806b5
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.appsafety-AppSafety/sources/java/nio/FloatBuffer.java
fa905aed01d2355ab1ae5379b6f5d486020f1fa8
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
6,471
java
package java.nio; public abstract class FloatBuffer extends Buffer implements Comparable<FloatBuffer> { final float[] hb; boolean isReadOnly; final int offset; public abstract FloatBuffer asReadOnlyBuffer(); public abstract FloatBuffer compact(); public abstract FloatBuffer duplicate(); public abstract float get(); public abstract float get(int i); @Override // java.nio.Buffer public abstract boolean isDirect(); public abstract ByteOrder order(); public abstract FloatBuffer put(float f); public abstract FloatBuffer put(int i, float f); public abstract FloatBuffer slice(); FloatBuffer(int mark, int pos, int lim, int cap, float[] hb2, int offset2) { super(mark, pos, lim, cap, 2); this.hb = hb2; this.offset = offset2; } FloatBuffer(int mark, int pos, int lim, int cap) { this(mark, pos, lim, cap, null, 0); } public static FloatBuffer allocate(int capacity) { if (capacity >= 0) { return new HeapFloatBuffer(capacity, capacity); } throw new IllegalArgumentException(); } public static FloatBuffer wrap(float[] array, int offset2, int length) { try { return new HeapFloatBuffer(array, offset2, length); } catch (IllegalArgumentException e) { throw new IndexOutOfBoundsException(); } } public static FloatBuffer wrap(float[] array) { return wrap(array, 0, array.length); } public FloatBuffer get(float[] dst, int offset2, int length) { checkBounds(offset2, length, dst.length); if (length <= remaining()) { int end = offset2 + length; for (int i = offset2; i < end; i++) { dst[i] = get(); } return this; } throw new BufferUnderflowException(); } public FloatBuffer get(float[] dst) { return get(dst, 0, dst.length); } public FloatBuffer put(FloatBuffer src) { if (src == this) { throw new IllegalArgumentException(); } else if (!isReadOnly()) { int n = src.remaining(); if (n <= remaining()) { for (int i = 0; i < n; i++) { put(src.get()); } return this; } throw new BufferOverflowException(); } else { throw new ReadOnlyBufferException(); } } public FloatBuffer put(float[] src, int offset2, int length) { checkBounds(offset2, length, src.length); if (length <= remaining()) { int end = offset2 + length; for (int i = offset2; i < end; i++) { put(src[i]); } return this; } throw new BufferOverflowException(); } public final FloatBuffer put(float[] src) { return put(src, 0, src.length); } @Override // java.nio.Buffer public final boolean hasArray() { return this.hb != null && !this.isReadOnly; } @Override // java.nio.Buffer public final float[] array() { float[] fArr = this.hb; if (fArr == null) { throw new UnsupportedOperationException(); } else if (!this.isReadOnly) { return fArr; } else { throw new ReadOnlyBufferException(); } } @Override // java.nio.Buffer public final int arrayOffset() { if (this.hb == null) { throw new UnsupportedOperationException(); } else if (!this.isReadOnly) { return this.offset; } else { throw new ReadOnlyBufferException(); } } @Override // java.nio.Buffer public Buffer position(int newPosition) { return super.position(newPosition); } @Override // java.nio.Buffer public Buffer limit(int newLimit) { return super.limit(newLimit); } @Override // java.nio.Buffer public Buffer mark() { return super.mark(); } @Override // java.nio.Buffer public Buffer reset() { return super.reset(); } @Override // java.nio.Buffer public Buffer clear() { return super.clear(); } @Override // java.nio.Buffer public Buffer flip() { return super.flip(); } @Override // java.nio.Buffer public Buffer rewind() { return super.rewind(); } public String toString() { StringBuffer sb = new StringBuffer(); sb.append(getClass().getName()); sb.append("[pos="); sb.append(position()); sb.append(" lim="); sb.append(limit()); sb.append(" cap="); sb.append(capacity()); sb.append("]"); return sb.toString(); } public int hashCode() { int h = 1; int p = position(); for (int i = limit() - 1; i >= p; i--) { h = (h * 31) + ((int) get(i)); } return h; } public boolean equals(Object ob) { if (this == ob) { return true; } if (!(ob instanceof FloatBuffer)) { return false; } FloatBuffer that = (FloatBuffer) ob; if (remaining() != that.remaining()) { return false; } int p = position(); int i = limit() - 1; int j = that.limit() - 1; while (i >= p) { if (!equals(get(i), that.get(j))) { return false; } i--; j--; } return true; } private static boolean equals(float x, float y) { return x == y || (Float.isNaN(x) && Float.isNaN(y)); } public int compareTo(FloatBuffer that) { int n = position() + Math.min(remaining(), that.remaining()); int i = position(); int j = that.position(); while (i < n) { int cmp = compare(get(i), that.get(j)); if (cmp != 0) { return cmp; } i++; j++; } return remaining() - that.remaining(); } private static int compare(float x, float y) { if (x < y) { return -1; } if (x > y) { return 1; } if (x == y) { return 0; } if (Float.isNaN(x)) { return Float.isNaN(y) ? 0 : 1; } return -1; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
752dfbb52f11dd30fe228f212213d82b0c7fbc8d
830e128e7f8fa3145f30b4393fd3cf9f1d84bf45
/samples/tests/SendingAndReceivingEvents.java
4c1e2bfac5280c752b69318bac96698b5be0d4a9
[ "Apache-2.0" ]
permissive
mxmind/mod-socket-io
c91288c9d0747513f6ccd1191de314299d071621
8ca5d8698961d6dff5d75c54fe79cf55dd00f5ca
refs/heads/master
2021-01-16T22:24:41.027785
2012-11-28T09:38:35
2012-11-28T09:38:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,710
java
import com.nhncorp.mods.socket.io.SocketIOServer; import com.nhncorp.mods.socket.io.SocketIOSocket; import com.nhncorp.mods.socket.io.impl.DefaultSocketIOServer; import org.vertx.java.core.Handler; import org.vertx.java.core.Vertx; import org.vertx.java.core.http.HttpServer; import org.vertx.java.core.json.JsonObject; import org.vertx.java.deploy.Verticle; /** * Test server for the <a href="https://github.com/learnboost/socket.io#sending-and-receiving-events">Sending and receiving events</a> * * @author Keesun Baik */ public class SendingAndReceivingEvents extends Verticle { public SendingAndReceivingEvents() { } public SendingAndReceivingEvents(Vertx vertx) { this.vertx = vertx; } @Override public void start() throws Exception { int port = 9191; HttpServer server = vertx.createHttpServer(); final SocketIOServer io = new DefaultSocketIOServer(vertx, server); io.sockets().onConnection(new Handler<SocketIOSocket>() { public void handle(final SocketIOSocket socket) { io.sockets().emit("this", new JsonObject().putString("will", "be received by everyone")); socket.on("private message", new Handler<JsonObject>() { public void handle(JsonObject msg) { System.out.println("I received " + msg); } }); socket.on("msg", new Handler<JsonObject>() { public void handle(JsonObject event) { socket.emit("msg", event); } }); socket.on("event", new Handler<JsonObject>() { public void handle(JsonObject event) { socket.emit("event"); } }); socket.on("global event", new Handler<JsonObject>() { public void handle(JsonObject event) { io.sockets().emit("global event"); } }); socket.on("message", new Handler<JsonObject>() { public void handle(JsonObject event) { String message = event.getString("message"); System.out.println(message); socket.send(message); } }); socket.on("volatile", new Handler<JsonObject>() { public void handle(JsonObject event) { socket.volatilize().emit("volatile", new JsonObject().putString("msg", "hello")); } }); socket.on("broadcast", new Handler<JsonObject>() { public void handle(JsonObject event) { socket.broadcast().emit("broadcast"); } }); socket.onDisconnect(new Handler<JsonObject>() { public void handle(JsonObject event) { io.sockets().emit("user disconnected"); } }); } }); server.listen(port); } public static void main(String[] args) throws Exception { Vertx vertx = Vertx.newVertx(); SendingAndReceivingEvents app = new SendingAndReceivingEvents(vertx); app.start(); Thread.sleep(Long.MAX_VALUE); } }
[ "whiteship@epril.com" ]
whiteship@epril.com
f12f18adf5bbd4c3153da8e7be24969a0ee9a4b0
3c73a700a7d89b1028f6b5f907d4d0bbe640bf9a
/android/src/main/kotlin/lib/org/bouncycastle/jce/provider/X509CertParser.java
f19f6afb2d372061b2ab87e4be3fe678b36ab61d
[]
no_license
afterlogic/flutter_crypto_stream
45efd60802261faa28ab6d10c2390a84231cf941
9d5684d5a7e63d3a4b2168395d454474b3ca4683
refs/heads/master
2022-11-02T02:56:45.066787
2021-03-25T17:45:58
2021-03-25T17:45:58
252,140,910
0
1
null
null
null
null
UTF-8
Java
false
false
4,541
java
package lib.org.bouncycastle.jce.provider; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.security.cert.Certificate; import java.security.cert.CertificateParsingException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import lib.org.bouncycastle.asn1.ASN1InputStream; import lib.org.bouncycastle.asn1.ASN1ObjectIdentifier; import lib.org.bouncycastle.asn1.ASN1Sequence; import lib.org.bouncycastle.asn1.ASN1Set; import lib.org.bouncycastle.asn1.ASN1TaggedObject; import lib.org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import lib.org.bouncycastle.asn1.pkcs.SignedData; import lib.org.bouncycastle.asn1.x509.X509Certificate; import lib.org.bouncycastle.x509.X509StreamParserSpi; import lib.org.bouncycastle.x509.util.X509StreamParsingException; /** * @deprecated use CertificateFactory or the PEMParser in the openssl package (pkix jar). */ public class X509CertParser extends X509StreamParserSpi { private static final PEMUtil PEM_PARSER = new PEMUtil("CERTIFICATE"); private ASN1Set sData = null; private int sDataObjectCount = 0; private InputStream currentStream = null; private Certificate readDERCertificate( InputStream in) throws IOException, CertificateParsingException { ASN1InputStream dIn = new ASN1InputStream(in); ASN1Sequence seq = (ASN1Sequence)dIn.readObject(); if (seq.size() > 1 && seq.getObjectAt(0) instanceof ASN1ObjectIdentifier) { if (seq.getObjectAt(0).equals(PKCSObjectIdentifiers.signedData)) { sData = new SignedData(ASN1Sequence.getInstance( (ASN1TaggedObject)seq.getObjectAt(1), true)).getCertificates(); return getCertificate(); } } return new X509CertificateObject( X509Certificate.getInstance(seq)); } private Certificate getCertificate() throws CertificateParsingException { if (sData != null) { while (sDataObjectCount < sData.size()) { Object obj = sData.getObjectAt(sDataObjectCount++); if (obj instanceof ASN1Sequence) { return new X509CertificateObject( X509Certificate.getInstance(obj)); } } } return null; } private Certificate readPEMCertificate( InputStream in) throws IOException, CertificateParsingException { ASN1Sequence seq = PEM_PARSER.readPEMObject(in); if (seq != null) { return new X509CertificateObject( X509Certificate.getInstance(seq)); } return null; } public void engineInit(InputStream in) { currentStream = in; sData = null; sDataObjectCount = 0; if (!currentStream.markSupported()) { currentStream = new BufferedInputStream(currentStream); } } public Object engineRead() throws X509StreamParsingException { try { if (sData != null) { if (sDataObjectCount != sData.size()) { return getCertificate(); } else { sData = null; sDataObjectCount = 0; return null; } } currentStream.mark(10); int tag = currentStream.read(); if (tag == -1) { return null; } if (tag != 0x30) // assume ascii PEM encoded. { currentStream.reset(); return readPEMCertificate(currentStream); } else { currentStream.reset(); return readDERCertificate(currentStream); } } catch (Exception e) { throw new X509StreamParsingException(e.toString(), e); } } public Collection engineReadAll() throws X509StreamParsingException { Certificate cert; List certs = new ArrayList(); while ((cert = (Certificate)engineRead()) != null) { certs.add(cert); } return certs; } }
[ "princesakenny98@gmail.com" ]
princesakenny98@gmail.com
a312c6ae8493c9911dc418caf66da753e2edfd70
ee99c44457879e56bdfdb9004072bd088aa85b15
/live-domain/src/main/java/cn/idongjia/live/restructure/dto/LiveTagDTO.java
b3b65641f610368dee9e5ccd79838b7d08eedbd7
[]
no_license
maikezhang/maike_live
b91328b8694877f3a2a8132dcdd43c130b66e632
a16be995e4e3f8627a6168d348f8fefd1a205cb3
refs/heads/master
2020-04-07T15:10:52.210492
2018-11-21T03:21:18
2018-11-21T03:21:18
158,475,020
0
0
null
null
null
null
UTF-8
Java
false
false
4,300
java
package cn.idongjia.live.restructure.dto; import cn.idongjia.live.db.mybatis.po.LiveTagPO; import cn.idongjia.live.pojo.purelive.tag.ColumnTag; import cn.idongjia.live.pojo.purelive.tag.PureLiveTagDO; import cn.idongjia.live.pojo.purelive.tag.PureLiveTagRelDO; import cn.idongjia.live.pojo.purelive.tag.TemplateTagRelDO; import java.sql.Timestamp; /** * @author lc * @create at 2018/6/13. */ public class LiveTagDTO extends BaseDTO<LiveTagPO> { public LiveTagDTO(LiveTagPO entity) { super(entity); } public static LiveTagDTO assembleFromPureLiveTagDO(PureLiveTagDO pureLiveTagDO) { LiveTagPO liveTagPO = LiveTagPO.builder() .createTime(pureLiveTagDO.getCreateTm()) .desc(pureLiveTagDO.getDesc()) .id(pureLiveTagDO.getId()) .modifiedTime(pureLiveTagDO.getModifiedTm()) .name(pureLiveTagDO.getName()) .pic(pureLiveTagDO.getPic()) .status(pureLiveTagDO.getStatus()) .type(pureLiveTagDO.getType()) .weight(pureLiveTagDO.getWeight()) .build(); return new LiveTagDTO(liveTagPO); } public Long getId() { return entity.getId(); } public String getName() { return entity.getName(); } public Integer getType() { return entity.getType(); } public String getPic() { return entity.getPic(); } public String getDesc() { return entity.getDesc(); } public Integer getStatus() { return entity.getStatus(); } public Integer getWeight() { return entity.getWeight(); } public Timestamp getCreateTime() { return entity.getCreateTime(); } public Timestamp getModifiedTime() { return entity.getModifiedTime(); } public PureLiveTagDO assemblePureLiveTagDO() { PureLiveTagDO pureLiveTagDO = new PureLiveTagDO(); pureLiveTagDO.setCreateTm(entity.getCreateTime()); pureLiveTagDO.setDesc(entity.getDesc()); pureLiveTagDO.setId(entity.getId()); pureLiveTagDO.setModifiedTm(entity.getModifiedTime()); pureLiveTagDO.setName(entity.getName()); pureLiveTagDO.setPic(entity.getPic()); pureLiveTagDO.setStatus(entity.getStatus()); pureLiveTagDO.setType(entity.getType()); pureLiveTagDO.setWeight(entity.getWeight()); return pureLiveTagDO; } public TemplateTagRelDO assemblePureLiveTagDTO(TemplateTagRelDTO templateTagRelDTO) { TemplateTagRelDO templateTagRelDO = new TemplateTagRelDO(); templateTagRelDO.setCreateTm(entity.getCreateTime()); templateTagRelDO.setId(entity.getId()); templateTagRelDO.setModifiedTm(entity.getModifiedTime()); templateTagRelDO.setStatus(entity.getStatus()); templateTagRelDO.setTagId(entity.getId()); if(templateTagRelDTO!=null){ templateTagRelDO.setUrl(templateTagRelDTO.getUrl()); } return templateTagRelDO; } /** * 根据tagDO组装专栏信息 */ public ColumnTag assembleColumnTag(TemplateTagRelDTO templateTagRelDTO) { ColumnTag columnTag = new ColumnTag(); // 组装基本信息 columnTag.setId(entity.getId()); columnTag.setName(entity.getName()); columnTag.setType(entity.getType()); columnTag.setPic(entity.getPic()); columnTag.setDesc(entity.getDesc()); columnTag.setStatus(entity.getStatus()); columnTag.setWeight(entity.getWeight()); columnTag.setCreateTm(entity.getCreateTime()); columnTag.setModifiedTm(entity.getModifiedTime()); // 组装超级模版地址 columnTag.setUrl(templateTagRelDTO==null?null:templateTagRelDTO.getUrl()); return columnTag; } public void setWeight(Integer weight) { entity.setWeight(weight); } public void setStatus(int status) { entity.setStatus(status); } public void setCreateTime(Timestamp timestamp) { entity.setCreateTime(timestamp); } public void setId(Long tagId) { entity.setId(tagId); } public void setModifiedTime(Timestamp timestamp) { entity.setModifiedTime(timestamp); } }
[ "zhangyingjie@idongjia.cn" ]
zhangyingjie@idongjia.cn
cf9098e1cbbd212314f5bf06da5465d36ffa60c3
0907c886f81331111e4e116ff0c274f47be71805
/sources/com/google/android/gms/internal/ads/zzaap.java
4ac453dc7f65df07c5bb33d7be63c4be95cdb5c7
[ "MIT" ]
permissive
Minionguyjpro/Ghostly-Skills
18756dcdf351032c9af31ec08fdbd02db8f3f991
d1a1fb2498aec461da09deb3ef8d98083542baaf
refs/heads/Android-OS
2022-07-27T19:58:16.442419
2022-04-15T07:49:53
2022-04-15T07:49:53
415,272,874
2
0
MIT
2021-12-21T10:23:50
2021-10-09T10:12:36
Java
UTF-8
Java
false
false
948
java
package com.google.android.gms.internal.ads; import android.content.Intent; import android.os.Bundle; import android.os.IInterface; import android.os.RemoteException; import com.google.android.gms.dynamic.IObjectWrapper; public interface zzaap extends IInterface { void onActivityResult(int i, int i2, Intent intent) throws RemoteException; void onBackPressed() throws RemoteException; void onCreate(Bundle bundle) throws RemoteException; void onDestroy() throws RemoteException; void onPause() throws RemoteException; void onRestart() throws RemoteException; void onResume() throws RemoteException; void onSaveInstanceState(Bundle bundle) throws RemoteException; void onStart() throws RemoteException; void onStop() throws RemoteException; void zzax() throws RemoteException; boolean zznj() throws RemoteException; void zzo(IObjectWrapper iObjectWrapper) throws RemoteException; }
[ "66115754+Minionguyjpro@users.noreply.github.com" ]
66115754+Minionguyjpro@users.noreply.github.com
25c0a6910249dc1ed88a63b710de8ab92204e733
3d8ad313e8bee83e81b729ee7e95a34014bdcc45
/app/src/main/java/com/example/mobilprogramlamaodev2/utils/ConstantUtil.java
62e3b0f1d9caa81724e618b8d58877ccb6b5dddd
[]
no_license
G1NF/MobilOdev2
f78851b9290ba9d151e340adecc43b74dbaff867
6c9d7416e9e78b1fdfd998045d18eee5606544ec
refs/heads/master
2022-04-18T18:33:39.668826
2020-04-17T19:12:27
2020-04-17T19:12:27
256,583,834
0
0
null
null
null
null
UTF-8
Java
false
false
487
java
package com.example.mobilprogramlamaodev2.utils; public class ConstantUtil { public static final String NAME = "password"; public static final String PASSWORD = "password"; public static final String PIC_PATH = "pic_path"; public static final String AGE = "age"; public static final String WEIGHT = "weight"; public static final String HEIGHT = "height"; public static final String GENDER = "gender"; public static final String APP_MODE = "app_mode"; }
[ "aaa" ]
aaa
0e9597a209369adfd0f47ee47a93a567cf567361
285f3ac40bf51d2b7ab59cd6aab24ba080ccfd9f
/sparqlify-core/src/main/java/mapping/ExceptionUtils.java
4d8bd046c633927014c4359cd82162ea1f8b4284
[ "Apache-2.0" ]
permissive
sbrunk/Sparqlify
cbdf846c8e9e0e57577a945ceb1a7ea88a4e62bd
e2a7a477a1105dfac05af674a3b615c31315e128
refs/heads/master
2021-01-16T20:36:50.875519
2013-01-07T15:14:15
2013-01-07T15:14:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,451
java
package mapping; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Sets.newHashSet; import java.io.PrintWriter; import java.io.StringWriter; import java.util.List; import java.util.Set; /** * This code is based on * http://squirrelsewer.blogspot.com/2010/03/filter-your-stack-traces.html * */ public class ExceptionUtils { private static final String INDENT = "\t"; private static List<String> _suppressedPackages = newArrayList("org.h2", "org.hibernate", "$Proxy", "org.junit", "java.lang.reflect.Method", "sun.", "org.eclipse", "junit.framework"); public static String getFilteredStackTrace(Throwable t) { return getFilteredStackTrace(t, true); } public static String getFilteredStackTrace(Throwable t, boolean shouldFilter) { try { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); writeCleanStackTrace(t, pw, shouldFilter); return sw.getBuffer().toString(); } catch (Exception e) { e.printStackTrace(); return e.toString(); } } private static void writeCleanStackTrace(Throwable t, PrintWriter s, boolean wantsFilter) { s.print("Exception: "); printExceptionChain(t, s); Set<String> skippedPackages = newHashSet(); int skippedLines = 0; boolean shouldFilter = wantsFilter && filtersEnabled(); for (StackTraceElement traceElement : getBottomThrowable(t) .getStackTrace()) { String forbiddenPackageName = null; if (shouldFilter) { forbiddenPackageName = tryGetForbiddenPackageName(traceElement); } if (forbiddenPackageName == null) { if (skippedPackages.size() > 0) { // 37 lines skipped for [org.h2, org.hibernate, sun., // java.lang.reflect.Method, $Proxy] s.println(getSkippedPackagesMessage(skippedPackages, skippedLines)); } // at hib.HibExample.test(HibExample.java:18) s.println(INDENT + "at " + traceElement); skippedPackages.clear(); skippedLines = 0; } else { skippedLines++; skippedPackages.add(forbiddenPackageName); } } if (skippedLines > 0) { s.println(getSkippedPackagesMessage(skippedPackages, skippedLines)); } } // 37 lines skipped for [org.h2, org.hibernate, sun., // java.lang.reflect.Method, $Proxy] private static String getSkippedPackagesMessage( Set<String> skippedPackages, int skippedLines) { return INDENT + skippedLines + " line" + (skippedLines == 1 ? "" : "s") + " skipped for " + skippedPackages; } private static Throwable getBottomThrowable(Throwable t) { while (t.getCause() != null) { t = t.getCause(); } return t; } /** * Check configuration to see if filtering is enabled system-wide */ private static boolean filtersEnabled() { return true; } private static void printExceptionChain(Throwable t, PrintWriter s) { s.println(t); if (t.getCause() != null) { s.print("Caused by: "); printExceptionChain(t.getCause(), s); } } /** * Checks to see if the class is part of a forbidden package. If so, it * returns the package name from the list of suppressed packages that * matches, otherwise it returns null. */ private static String tryGetForbiddenPackageName( StackTraceElement traceElement) { String classAndMethod = traceElement.getClassName() + "." + traceElement.getMethodName(); for (String pkg : _suppressedPackages) { if (classAndMethod.startsWith(pkg)) { return pkg; } } return null; } }
[ "cstadler@informatik.uni-leipzig.de" ]
cstadler@informatik.uni-leipzig.de
0cbeef1b18faf17eaaee8fcb75edd7e23dc8e391
5cd2bfafae832b7258c9c6dd7eb31eed53dcf95d
/jeeplus-test/src/main/java/com/jeeplus/modules/test/treetable/dialog/service/Car1Service.java
a85463d188d57407ea34defed206af6402ba040f
[]
no_license
PinPinErKeJi/qgkj
44eddb3f33c1a4f276da327b847337b1fcd82b7c
84a0225ce5756928b7ba939a3df3dfa23125e22e
refs/heads/master
2022-12-13T07:11:31.805580
2019-07-02T07:49:56
2019-07-02T07:49:56
194,814,379
0
1
null
2022-12-06T00:32:14
2019-07-02T07:45:16
JavaScript
UTF-8
Java
false
false
1,107
java
/** * Copyright &copy; 2015-2020 <a href="http://www.hzqnwl.com/">qnwl</a> All rights reserved. */ package com.jeeplus.modules.test.treetable.dialog.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.jeeplus.core.persistence.Page; import com.jeeplus.core.service.CrudService; import com.jeeplus.modules.test.treetable.dialog.entity.Car1; import com.jeeplus.modules.test.treetable.dialog.mapper.Car1Mapper; /** * 车辆Service * @author lgf * @version 2019-01-01 */ @Service @Transactional(readOnly = true) public class Car1Service extends CrudService<Car1Mapper, Car1> { public Car1 get(String id) { return super.get(id); } public List<Car1> findList(Car1 car1) { return super.findList(car1); } public Page<Car1> findPage(Page<Car1> page, Car1 car1) { return super.findPage(page, car1); } @Transactional(readOnly = false) public void save(Car1 car1) { super.save(car1); } @Transactional(readOnly = false) public void delete(Car1 car1) { super.delete(car1); } }
[ "18671095993@163.com" ]
18671095993@163.com
d59218103997826f7b8f7e1c9b6291226930fef5
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
/reladomo/src/main/java/com/gs/fw/common/mithra/cacheloader/CacheLoaderManager.java
3d34ee0dbd037a7c8d1e003877d72fb38d9e2d1b
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-public-domain" ]
permissive
goldmansachs/reladomo
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
a4f4e39290d8012573f5737a4edc45d603be07a5
refs/heads/master
2023-09-04T10:30:12.542924
2023-07-20T09:29:44
2023-07-20T09:29:44
68,020,885
431
122
Apache-2.0
2023-07-07T21:29:52
2016-09-12T15:17:34
Java
UTF-8
Java
false
false
3,385
java
/* Copyright 2016 Goldman Sachs. 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.gs.fw.common.mithra.cacheloader; import com.gs.fw.common.mithra.util.Filter; import java.sql.Timestamp; import java.util.List; import java.util.Map; public interface CacheLoaderManager { /** * load all classes defined in configuration file for provided business date * * @param businessDates list of business dates to be loaded. For non-business dated caches, this parameter should be an empty list. * @param initialLoadEndTime used as a processing time up to which the data is loaded. The same processing time need to be used as a starting point of the next refresh * @param monitor */ public void runInitialLoad(List<Timestamp> businessDates, Timestamp initialLoadEndTime, CacheLoaderMonitor monitor); /** * load all classes defined in configuration file for provided business date and refresh interval * * @param businessDate list of business dates to use for refresh. For non-business dated caches, this parameter should be an empty list. * @param refreshInterval * @param monitor */ public void runRefresh(List<Timestamp> businessDate, RefreshInterval refreshInterval, CacheLoaderMonitor monitor); /** * load subset of classes defined in the classesToLoadWithAdditionalOperations keys. * This can be used to load/reload individual classes as well as load missing classses for corrupt archive. * * @param businessDate list of business dates to be loaded. For non-business dated caches, this parameter should be an empty list. * @param classesToLoadWithAdditionalOperations * map of classes to load to the additionalOperationBuilders. If additionalOperationBuilder is null, will load all instances defined by the cacheLoader.xml * @param loadDependent specifies whether to load classes dependent on the classesToLoad list. * @param monitor */ public void runQualifiedLoad(List<Timestamp> businessDate, Map<String, AdditionalOperationBuilder> classesToLoadWithAdditionalOperations, boolean loadDependent, CacheLoaderMonitor monitor); Map<String, ? extends Filter> createCacheFilterOfDatesToKeep(List<Timestamp> businessDates); /** * load dependent classes defined in the ownerObjects. * * @param ownerObjects * @param businessDates list of business dates to be loaded. For non-business dated caches, this parameter should be an empty list. * @param loadEndTime * @param monitor */ public void loadDependentObjectsFor(List ownerObjects, List<Timestamp> businessDates, Timestamp loadEndTime, CacheLoaderMonitor monitor); }
[ "mohammad.rezaei@gs.com" ]
mohammad.rezaei@gs.com
75a4f7fab666a02865b17eda9ccb6eb7c3f4db3e
41b7bff6c89777f2c0871dc81e9bd25462eae080
/src/main/java/com/github/kahlkn/artoria/codec/Unicode.java
677fbf5dbe45e69eeea69f7115d4b76d099363ee
[ "Apache-2.0" ]
permissive
yh1968684316/artoria
e09a1771d9e75a988108d5f027d2d3867b5e16d8
363dedd6f2cb2e7fee471abc481ec5b334bca507
refs/heads/master
2020-03-07T21:59:08.010668
2018-03-16T14:58:12
2018-03-16T14:58:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,454
java
package com.github.kahlkn.artoria.codec; import com.github.kahlkn.artoria.util.Assert; /** * Unicode encode and decode tools. * @author Kahle */ public class Unicode { private static final String BACKLASH_U = "\\u"; private static final int RADIX = 16; public static String encode(String string) { Assert.notNull(string, "String must is not null. "); StringBuilder unicode = new StringBuilder(); char[] chars = string.toCharArray(); for (char c : chars) { String hexString = Integer.toHexString(c); int len = hexString.length(); if (len != 4) { hexString = (len == 2 ? "00" : "0") + hexString; } unicode.append(BACKLASH_U).append(hexString); } return unicode.toString(); } public static String decode(String unicode) { Assert.notNull(unicode, "Unicode must is not null. "); int index, pos = 0; StringBuilder result = new StringBuilder(); while ((index = unicode.indexOf(BACKLASH_U, pos)) != -1) { result.append(unicode.substring(pos, index)); if (index + 5 < unicode.length()) { pos = index + 6; String hex = unicode.substring(index + 2, index + 6); char ch = (char) Integer.parseInt(hex, RADIX); result.append(ch); } } return result.toString(); } }
[ "Kahlkn@gmail.com" ]
Kahlkn@gmail.com
e113f8533873871160be5d0ae80f4b937f506f37
fa9467194718f6997496278b53fb395490ec6c4a
/src/main/java/org/jacop/constraints/DisjointCondVarValue.java
f153b57ea439348fdacccde550bcfabf06af8392
[]
no_license
valerian-at-pellucid/jacop
90bbced076a3a8aa3a4ca348a9361580051f6196
8fa97c2e32e9b51896c73f6439c783c13574c305
refs/heads/master
2021-01-22T07:22:26.281870
2014-05-16T17:45:29
2014-05-16T17:45:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,864
java
/** * DisjointCondVarValue.java * This file is part of JaCoP. * * JaCoP is a Java Constraint Programming solver. * * Copyright (C) 2000-2008 Krzysztof Kuchcinski and Radoslaw Szymanek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * Notwithstanding any other provision of this License, the copyright * owners of this work supplement the terms of this License with terms * prohibiting misrepresentation of the origin of this work and requiring * that modified versions of this work be marked in reasonable ways as * different from the original version. This supplement of the license * terms is in accordance with Section 7 of GNU Affero General Public * License version 3. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package org.jacop.constraints; import java.util.Vector; import org.jacop.core.MutableVarValue; /** * Defines a current value of the Diff2Var and related operations on it. * * @author Krzysztof Kuchcinski and Radoslaw Szymanek * @version 4.1 */ class DisjointCondVarValue implements MutableVarValue { DisjointCondVarValue previousDisjointCondVarValue = null; RectangleWithCondition[] Rects; int stamp = 0; DisjointCondVarValue() { } DisjointCondVarValue(RectangleWithCondition[] R) { Rects = R; } @Override public Object clone() { DisjointCondVarValue val = new DisjointCondVarValue(Rects); val.stamp = stamp; val.previousDisjointCondVarValue = previousDisjointCondVarValue; return val; } public MutableVarValue previous() { return previousDisjointCondVarValue; } public void setPrevious(MutableVarValue n) { previousDisjointCondVarValue = (DisjointCondVarValue) n; } public void setStamp(int s) { stamp = s; } void setValue(RectangleWithCondition[] R) { Rects = R; } void setValue(Vector<RectangleWithCondition> VR) { Rects = new RectangleWithCondition[VR.size()]; for (int i = 0; i < Rects.length; i++) Rects[i] = VR.get(i); } public int stamp() { return stamp; } @Override public String toString() { StringBuffer result = new StringBuffer(); for (int i = 0; i < Rects.length; i++) if (i == Rects.length - 1) result.append(Rects[i]); else result.append(Rects[i]).append(", "); return result.toString(); } }
[ "radoslaw.szymanek@gmail.com" ]
radoslaw.szymanek@gmail.com
6fc6072a986dd652f56980483ee453cbaaef8fcf
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_9/Foo124.java
598fd8c4ebfc12202501056c96ae371d4c741c50
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package taxi.nicecode.com.ftmap.generated.package_9; public class Foo124 { public void foo0(){ new Foo123().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
5ffdfa5dbb12d2b576c5c79987ca5ddfc26e981e
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
/bin/ext-integration/sap/pointofsale/sapcarintegration/testsrc/de/hybris/platform/sap/sapcarintegration/services/impl/DefaultMultichannelOrderHistoryExtractorServiceTest.java
8cc518826c668b66b15682b1d40a04098e5d3622
[]
no_license
lun130220/hybris
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
03c074ea76779f96f2db7efcdaa0b0538d1ce917
refs/heads/master
2021-05-14T01:48:42.351698
2018-01-07T07:21:53
2018-01-07T07:21:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,177
java
package de.hybris.platform.sap.sapcarintegration.services.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.Date; import java.util.List; import javax.annotation.Resource; import org.apache.olingo.odata2.api.ep.feed.ODataFeed; import org.junit.Test; import org.springframework.test.context.ContextConfiguration; import de.hybris.platform.commerceservices.search.pagedata.PaginationData; import de.hybris.platform.sap.core.test.SapcoreSpringJUnitTest; import de.hybris.platform.sap.sapcarintegration.data.CarMultichannelOrderHistoryData; import de.hybris.platform.sap.sapcarintegration.data.CarOrderHistoryData; import de.hybris.platform.sap.sapcarintegration.data.CarStoreAddress; import de.hybris.platform.sap.sapcarintegration.services.CarDataProviderService; import de.hybris.platform.sap.sapcarintegration.services.MultichannelDataProviderService; import de.hybris.platform.sap.sapcarintegration.services.MultichannelOrderHistoryExtractorService; @ContextConfiguration(locations = { "classpath:test/sapcarintegration-test-spring.xml" }) public class DefaultMultichannelOrderHistoryExtractorServiceTest extends SapcoreSpringJUnitTest { @Resource(name = "multichannelOrderHistoryExtractorService") private MultichannelOrderHistoryExtractorService extractorService; @Resource(name = "multichannelDataProviderService") private MultichannelDataProviderService dataProviderService; @Test public void testExtractMultichannelOrders() throws Exception { final String customerNumber = "0000001000"; final PaginationData paginationData = new PaginationData(); final ODataFeed feed = dataProviderService.readMultiChannelTransactionsFeed(customerNumber, paginationData); final List<CarMultichannelOrderHistoryData> orders = extractorService.extractMultichannelOrders(paginationData, feed); assertNotNull(orders); assertTrue(orders.size() > 0); assertEquals(orders.get(0).getStore().getStoreId(), "R308"); } @Test public void testExtractSalesDocumentHeader() throws Exception { String customerNumber = "0000001000"; String transactionNumber = "0000000115"; final ODataFeed feed = dataProviderService.readSalesDocumentHeaderFeed(customerNumber, transactionNumber ); CarMultichannelOrderHistoryData order = extractorService.extractSalesDocumentHeader(feed); assertNotNull(order); } @Test public void testExtractSalesDocumentEntries(){ String customerNumber = "0000001000"; String transactionNumber= "0000000115"; final ODataFeed orderFeed = dataProviderService.readSalesDocumentHeaderFeed(customerNumber, transactionNumber); CarMultichannelOrderHistoryData order = extractorService.extractSalesDocumentHeader(orderFeed); final ODataFeed itemFeed = dataProviderService.readSalesDocumentItemFeed(customerNumber, transactionNumber); extractorService.extractSalesDocumentEntries(order, itemFeed); assertNotNull(order.getOrderEntries()); assertTrue(order.getOrderEntries().size() > 0); assertNotNull(order.getOrderEntries().get(0).getProduct().getCode()); } }
[ "lun130220@gamil.com" ]
lun130220@gamil.com
4535cb201e466d83d5fc4d889c649f59f587bb3b
175604ea752c2c1b932409897862ff56c1f83d05
/app/src/main/java/com/jiepier/filemanager/event/ItemTotalJunkSizeEvent.java
fd3a1e1f4142fd23a0792862fe67b2242fb49673
[ "Apache-2.0" ]
permissive
greatyingzi/FileManager
ba6b6ac12cd04a9d388f655e5523351871c77986
26fc321da47510044b7851d6c729c86aeefb9c06
refs/heads/master
2021-02-04T22:21:30.745659
2020-03-10T06:43:07
2020-03-10T06:43:07
243,715,863
0
0
Apache-2.0
2020-02-28T08:39:29
2020-02-28T08:39:28
null
UTF-8
Java
false
false
635
java
package com.jiepier.filemanager.event; /** * Created by panruijie on 2017/2/22. * Email : zquprj@gmail.com */ public class ItemTotalJunkSizeEvent { private int index; private String totalSize; public int getIndex() { return index; } public void setIndex(int index) { this.index = index; } public ItemTotalJunkSizeEvent(int index, String totalSize) { this.index = index; this.totalSize = totalSize; } public String getTotalSize() { return totalSize; } public void setTotalSize(String totalSize) { this.totalSize = totalSize; } }
[ "zquprj@gmail.com" ]
zquprj@gmail.com
6c5fa781f3d23f25fedb4f44fb17467126d3eec5
31f63618c7f57253140e333fc21bac2d71bc4000
/maihama-common/src/main/java/org/dbflute/maihama/dbflute/exbhv/MemberSecurityBhv.java
a929db5dc617b712119ee4e3ac9bead20e192fa9
[ "Apache-2.0" ]
permissive
dbflute-session/memorable-saflute
b6507d3a54dad5e9c67539a9178ff74287c0fe2b
c5c6cfe19c9dd52c429d160264e1c8e30b4d51c5
refs/heads/master
2023-03-07T11:02:15.495590
2023-02-22T13:20:03
2023-02-22T13:20:03
50,719,958
0
1
null
2023-02-22T13:20:05
2016-01-30T10:26:15
Java
UTF-8
Java
false
false
974
java
/* * Copyright 2014-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.dbflute.maihama.dbflute.exbhv; import org.dbflute.maihama.dbflute.bsbhv.BsMemberSecurityBhv; /** * The behavior of MEMBER_SECURITY. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class MemberSecurityBhv extends BsMemberSecurityBhv { }
[ "dbflute@gmail.com" ]
dbflute@gmail.com
d91b256a1d1f4f11bfdbc544fa05f07222ac11fc
78f284cd59ae5795f0717173f50e0ebe96228e96
/factura-negocio/src/cl/stotomas/factura/negocio/ia_19/copy/copy/copy/TestingFinalTry.java
f19a40b8ae61f300f5d612d1444c42ecf12e7931
[]
no_license
Pattricio/Factura
ebb394e525dfebc97ee2225ffc5fca10962ff477
eae66593ac653f85d05071b6ccb97fb1e058502d
refs/heads/master
2020-03-16T03:08:45.822070
2018-05-07T15:29:25
2018-05-07T15:29:25
132,481,305
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,813
java
package cl.stotomas.factura.negocio.ia_19.copy.copy.copy; import java.applet.Applet; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class TestingFinalTry { public static String decryptMessage(final byte[] message, byte[] secretKey) { try { // CÓDIGO VULNERABLE final SecretKeySpec KeySpec = new SecretKeySpec(secretKey, "DES"); final Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, KeySpec); // RECOMENDACIÓN VERACODE // final Cipher cipher = Cipher.getInstance("DES..."); // cipher.init(Cipher.DECRYPT_MODE, KeySpec); return new String(cipher.doFinal(message)); } catch(Exception e) { e.printStackTrace(); } return null; } class Echo { // Control de Proceso // Posible reemplazo de librería por una maliciosa // Donde además s enos muestra el nombre explícito de esta. public native void runEcho(); { System.loadLibrary("echo"); // Se carga librería } public void main(String[] args) { new Echo().runEcho(); } public final class TestApplet extends Applet { private static final long serialVersionUID = 1L; } public final class TestAppletDos extends Applet { private static final long serialVersionUID = 1L; } //Comparación de referencias de objeto en lugar de contenido de objeto // El if dentro de este código no se ejecutará. // porque se prioriza el String a mostrar. public final class compareStrings{ public String str1; public String str2; public void comparar() { if (str1 == str2) { System.out.println("str1 == str2"); } } } } }
[ "Adriana Molano@DESKTOP-GQ96FK8" ]
Adriana Molano@DESKTOP-GQ96FK8
92e10d791b9217769996fc81edd8c70ca1389049
a590cf3293c9d5f83a880a706e1686f8aede1377
/Daily Byte/NoDuplicates.java
d9801591155c33b6a969eac19e8e4bb2e4915239
[]
no_license
pushker-git/LeetCodeTopInterviewQuestions
168b9f8fc1054807eeba9ee444745dd2b1a74a29
43c605e6353575fdef5fcdb20b83c047e284534d
refs/heads/master
2023-06-16T21:26:11.614311
2021-07-10T14:12:34
2021-07-10T14:12:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
/* Given a sorted integer array, nums, remove duplicates from the array in-place such that each element only appears once. Once you’ve removed all the duplicates, return the length of the new array. Note: The values you leave beyond the new length of the array does not matter. Ex: Given the following nums… nums = [1, 2, 2, 4, 4, 6, 8, 8], return 5. Ex: Given the following nums… nums = [1, 2, 3, 3], return 3. */ class Solution { public int removeDuplicates(int[] nums) { int length = nums.length; int index = 0; for (int i=1; i<length; i++) { if (nums[index] != nums[i]) { index += 1; nums[index] = nums[i]; } } return index + 1; } }
[ "rohithv63@gmail.com" ]
rohithv63@gmail.com
17689b00db466f34445dc71f1e2415e11727df52
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/d/a/c/Calc_1_1_13022.java
b6750fec3af3022a64594662f50bde47c0768e29
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.d.a.c; public class Calc_1_1_13022 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
50fea2251e57a10e22ed0147d3fd3e908f64ef5e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_77183bdf980ad121c3d94019fb256807e7c40a0f/SpringDataSourceBeanPostProcessor/33_77183bdf980ad121c3d94019fb256807e7c40a0f_SpringDataSourceBeanPostProcessor_t.java
9201fbfaa63724b328ef4a9c3603af5e062541d4
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,478
java
/* * Copyright 2008-2010 by Emeric Vernat * * This file is part of Java Melody. * * Java Melody is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Java Melody is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Java Melody. If not, see <http://www.gnu.org/licenses/>. */ package net.bull.javamelody; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.util.Set; import javax.sql.DataSource; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.jndi.JndiObjectFactoryBean; /** * Post-processor Spring pour une éventuelle DataSource défini dans le fichier xml Spring. * @author Emeric Vernat */ public class SpringDataSourceBeanPostProcessor implements BeanPostProcessor { private Set<String> excludedDatasources; /** * Définit les noms des datasources Spring exclues. * @param excludedDatasources Set */ public void setExcludedDatasources(Set<String> excludedDatasources) { this.excludedDatasources = excludedDatasources; // exemple: // <bean id="springDataSourceBeanPostProcessor" class="net.bull.javamelody.SpringDataSourceBeanPostProcessor"> // <property name="excludedDatasources"> // <set> // <value>excludedDataSourceName</value> // </set> // </property> // </bean> } /** {@inheritDoc} */ public Object postProcessBeforeInitialization(Object bean, String beanName) { return bean; } /** {@inheritDoc} */ public Object postProcessAfterInitialization(final Object bean, final String beanName) { if (excludedDatasources != null && excludedDatasources.contains(beanName)) { LOG.debug("Spring datasource excluded: " + beanName); return bean; } if (bean instanceof DataSource && !Parameters.isNoDatabase()) { final DataSource dataSource = (DataSource) bean; JdbcWrapper.registerSpringDataSource(beanName, dataSource); final DataSource result = JdbcWrapper.SINGLETON.createDataSourceProxy(beanName, dataSource); LOG.debug("Spring datasource wrapped: " + beanName); return result; } else if (bean instanceof JndiObjectFactoryBean && !Parameters.isNoDatabase()) { // fix issue 20 final Object result = createProxy(bean, beanName); LOG.debug("Spring JNDI factory wrapped: " + beanName); return result; } // I tried here in the post-processor to fix "quartz jobs which are scheduled with spring // are not displayed in javamelody, except if there is the following property for // SchedulerFactoryBean in spring xml: // <property name="exposeSchedulerInRepository" value="true" /> ", // but I had some problem with Spring creating the scheduler // twice and so registering the scheduler in SchedulerRepository with the same name // as the one registered below (and Quartz wants not) // else if (bean != null // && "org.springframework.scheduling.quartz.SchedulerFactoryBean".equals(bean // .getClass().getName())) { // try { // // Remarque: on ajoute nous même le scheduler de Spring dans le SchedulerRepository // // de Quartz, car l'appel ici de schedulerFactoryBean.setExposeSchedulerInRepository(true) // // est trop tard et ne fonctionnerait pas // final Method method = bean.getClass().getMethod("getScheduler", (Class<?>[]) null); // final Scheduler scheduler = (Scheduler) method.invoke(bean, (Object[]) null); // // final SchedulerRepository schedulerRepository = SchedulerRepository.getInstance(); // synchronized (schedulerRepository) { // if (schedulerRepository.lookup(scheduler.getSchedulerName()) == null) { // schedulerRepository.bind(scheduler); // scheduler.addGlobalJobListener(new JobGlobalListener()); // } // } // } catch (final NoSuchMethodException e) { // // si la méthode n'existe pas (avant spring 2.5.6), alors cela marche sans rien faire // return bean; // } catch (final InvocationTargetException e) { // // tant pis // return bean; // } catch (final IllegalAccessException e) { // // tant pis // return bean; // } catch (SchedulerException e) { // // tant pis // return bean; // } // } return bean; } private Object createProxy(final Object bean, final String beanName) { final InvocationHandler invocationHandler = new InvocationHandler() { /** {@inheritDoc} */ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object result = method.invoke(bean, args); if (result instanceof DataSource) { result = JdbcWrapper.SINGLETON.createDataSourceProxy(beanName, (DataSource) result); } return result; } }; return JdbcWrapper.createProxy(bean, invocationHandler); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
5153691df01a116dcfe98c7a832eadde281cec55
50c8fc4641d3d237d4e65afdee63803a1e76c98e
/src/com/fs/starfarer/api/impl/campaign/skills/PlanetaryOperations.java
b24d218993a2fb9227cc9e452158aea62287387b
[]
no_license
jaghaimo/starsector-api
7e8ea70471f45581c8d337e43b711a68f262f0ed
5b1af3542e8ce257b2e6efa69e14d63a25746004
refs/heads/master
2023-06-07T00:48:29.078933
2023-06-01T19:14:30
2023-06-01T20:05:31
315,633,840
2
2
null
2022-04-20T15:11:11
2020-11-24T13:02:20
Java
UTF-8
Java
false
false
4,979
java
package com.fs.starfarer.api.impl.campaign.skills; import java.awt.Color; import com.fs.starfarer.api.campaign.econ.MarketAPI; import com.fs.starfarer.api.characters.FleetStatsSkillEffect; import com.fs.starfarer.api.characters.MarketSkillEffect; import com.fs.starfarer.api.characters.MutableCharacterStatsAPI; import com.fs.starfarer.api.characters.SkillSpecAPI; import com.fs.starfarer.api.fleet.MutableFleetStatsAPI; import com.fs.starfarer.api.impl.campaign.ids.Stats; import com.fs.starfarer.api.ui.TooltipMakerAPI; import com.fs.starfarer.api.util.Misc; public class PlanetaryOperations { public static int ATTACK_BONUS = 100; public static int DEFEND_BONUS = 100; public static float CASUALTIES_MULT = 0.75f; public static float STABILITY_BONUS = 2; public static class Level1 implements MarketSkillEffect { public void apply(MarketAPI market, String id, float level) { market.getStats().getDynamic().getMod(Stats.GROUND_DEFENSES_MOD).modifyMult(id, 1f + DEFEND_BONUS * 0.01f, "Ground operations"); } public void unapply(MarketAPI market, String id) { //market.getStats().getDynamic().getMod(Stats.GROUND_DEFENSES_MOD).unmodifyPercent(id); market.getStats().getDynamic().getMod(Stats.GROUND_DEFENSES_MOD).unmodifyMult(id); } public String getEffectDescription(float level) { return "+" + (int)(DEFEND_BONUS) + "% effectiveness of ground defenses"; } public String getEffectPerLevelDescription() { return null; } public ScopeDescription getScopeDescription() { return ScopeDescription.GOVERNED_OUTPOST; } } public static class Level2 implements MarketSkillEffect { public void apply(MarketAPI market, String id, float level) { market.getStability().modifyFlat(id, STABILITY_BONUS, "Ground operations"); } public void unapply(MarketAPI market, String id) { market.getStability().unmodifyFlat(id); } public String getEffectDescription(float level) { return "+" + (int)STABILITY_BONUS + " stability"; } public String getEffectPerLevelDescription() { return null; } public ScopeDescription getScopeDescription() { return ScopeDescription.GOVERNED_OUTPOST; } } public static class Level3 extends BaseSkillEffectDescription implements FleetStatsSkillEffect { public void apply(MutableFleetStatsAPI stats, String id, float level) { //stats.getDynamic().getMod(Stats.PLANETARY_OPERATIONS_MOD).modifyMult(id, 1f + ATTACK_BONUS * 0.01f, "Planetary operations"); stats.getDynamic().getMod(Stats.PLANETARY_OPERATIONS_MOD).modifyPercent(id, ATTACK_BONUS, "Ground operations"); } public void unapply(MutableFleetStatsAPI stats, String id) { //stats.getDynamic().getMod(Stats.PLANETARY_OPERATIONS_MOD).unmodifyMult(id); stats.getDynamic().getMod(Stats.PLANETARY_OPERATIONS_MOD).unmodifyPercent(id); } public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill, TooltipMakerAPI info, float width) { init(stats, skill); float opad = 10f; Color c = Misc.getBasePlayerColor(); info.addPara("Affects: %s", opad + 5f, Misc.getGrayColor(), c, "fleet"); info.addSpacer(opad); info.addPara("+%s effectiveness of ground operations such as raids", 0f, hc, hc, "" + (int) ATTACK_BONUS + "%"); } public String getEffectDescription(float level) { return "+" + (int)(ATTACK_BONUS) + "% effectiveness of ground operations such as raids"; } public String getEffectPerLevelDescription() { return null; } public ScopeDescription getScopeDescription() { return ScopeDescription.FLEET; } } public static class Level4 implements FleetStatsSkillEffect { public void apply(MutableFleetStatsAPI stats, String id, float level) { stats.getDynamic().getStat(Stats.PLANETARY_OPERATIONS_CASUALTIES_MULT).modifyMult(id, CASUALTIES_MULT, "Ground operations"); } public void unapply(MutableFleetStatsAPI stats, String id) { stats.getDynamic().getStat(Stats.PLANETARY_OPERATIONS_CASUALTIES_MULT).unmodifyMult(id); } // public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill, TooltipMakerAPI info, float width) { // init(stats, skill); // // float opad = 10f; // Color c = Misc.getBasePlayerColor(); // info.addPara("Affects: %s", opad + 5f, Misc.getGrayColor(), c, "fleet"); // info.addSpacer(opad); // info.addPara("+%s effectiveness of ground operations", 0f, hc, hc, // "" + (int) ATTACK_BONUS + "%"); // } public String getEffectDescription(float level) { return "-" + (int)Math.round((1f - CASUALTIES_MULT) * 100f) + "% marine casualties suffered during ground operations such as raids"; } public String getEffectPerLevelDescription() { return null; } public ScopeDescription getScopeDescription() { return ScopeDescription.FLEET; } } }
[ "1764586+jaghaimo@users.noreply.github.com" ]
1764586+jaghaimo@users.noreply.github.com
0d9ca01f042bfcc5fcb1ef7ebf343d860f58a2a2
b39898ac4e47e78142a4d1d87fc67cc5356782ea
/jetlinks-components/relation-component/src/main/java/org/jetlinks/community/relation/service/RelationHandler.java
3d42ef1bf4618ff90d7d0b752034f1c6069bacc4
[ "Apache-2.0" ]
permissive
jetlinks/jetlinks-community
8147b61715786de25f5a5d121daf895bc8bc1bc4
b0027125ea2c5a1edfe9bbb0c4a6780efce24ebe
refs/heads/master
2023-08-28T05:14:44.536575
2023-08-18T03:50:11
2023-08-18T03:50:11
231,329,990
4,655
1,551
Apache-2.0
2023-09-13T06:49:54
2020-01-02T07:27:34
Java
UTF-8
Java
false
false
1,062
java
package org.jetlinks.community.relation.service; import org.hswebframework.web.crud.events.EntityBeforeDeleteEvent; import org.jetlinks.community.reference.DataReferenceManager; import org.jetlinks.community.relation.entity.RelationEntity; import org.springframework.context.event.EventListener; import org.springframework.stereotype.Component; import reactor.core.publisher.Flux; /** * 输入描述. * * @author zhangji 2022/6/29 */ @Component public class RelationHandler { private final DataReferenceManager referenceManager; public RelationHandler(DataReferenceManager referenceManager) { this.referenceManager = referenceManager; } //禁止删除存在关系的关系配置 @EventListener public void handleRelationDeleted(EntityBeforeDeleteEvent<RelationEntity> event) { event.async( Flux.fromIterable(event.getEntity()) .flatMap(relation -> referenceManager .assertNotReferenced(DataReferenceManager.TYPE_RELATION, relation.getRelation())) ); } }
[ "zh.sqy@qq.com" ]
zh.sqy@qq.com
6937b49144497c06340b3ef3ec36ffd8882ff817
230ec7c82ba14b6ec340afa3ea0cea2ccc56abe0
/Documentation/4.0/Samples/java/src/test/java/net/ravendb/Indexes/Boosting.java
b7fdf0fa7eec710762c20760046dadd72b096e9a
[]
no_license
ravendb/docs
2fd1aec3194132cd636eaa84f6b2859ba00c2795
3941a394633556f70b149d92873ee62f538858a1
refs/heads/master
2023-08-31T08:14:22.735710
2023-08-28T09:13:30
2023-08-28T09:13:30
961,487
79
139
null
2023-09-14T12:04:02
2010-10-04T19:12:52
JavaScript
UTF-8
Java
false
false
2,105
java
package net.ravendb.Indexes; import net.ravendb.client.documents.DocumentStore; import net.ravendb.client.documents.IDocumentStore; import net.ravendb.client.documents.indexes.AbstractIndexCreationTask; import net.ravendb.client.documents.indexes.IndexDefinition; import net.ravendb.client.documents.operations.indexes.PutIndexesOperation; import net.ravendb.client.documents.session.IDocumentSession; import java.util.Collections; import java.util.List; public class Boosting { //region boosting_2 public class Employees_ByFirstAndLastName extends AbstractIndexCreationTask { public Employees_ByFirstAndLastName() { map = "docs.Employees.Select(employee => new {" + " FirstName = employee.FirstName.Boost(10)," + " LastName = employee.LastName" + "})"; } } //endregion private static class Employee { } public Boosting() { try (IDocumentStore store = new DocumentStore()) { try (IDocumentSession session = store.openSession()) { //region boosting_3 // employees with 'firstName' equal to 'Bob' // will be higher in results // than the ones with 'lastName' match List<Employee> results = session.query(Employee.class, Employees_ByFirstAndLastName.class) .whereEquals("FirstName", "Bob") .whereEquals("LastName", "Bob") .toList(); //endregion } //region boosting_4 IndexDefinition indexDefinition = new IndexDefinition(); indexDefinition.setName("Employees/ByFirstAndLastName"); indexDefinition.setMaps(Collections.singleton( "docs.Employees.Select(employee => new {" + " FirstName = employee.FirstName.Boost(10)," + " LastName = employee.LastName" + "})")); store.maintenance().send(new PutIndexesOperation(indexDefinition)); //endregion } } }
[ "marcin@ravendb.net" ]
marcin@ravendb.net
29c4491816e13e24ef33f021ba992cc48b13bc51
491c0c290027f371a5840de868677beba96f1c73
/a-foundation/src/main/java/com/ajjpj/afoundation/collection/immutable/ALongRedBlackTreeSet.java
f54958fba00b398ef77a3714159d8c7d1a5c04e8
[ "Apache-2.0" ]
permissive
arnohaase/a-foundation
1c1a2c102ac3cae92f3752da1cc81d2b1d2439a8
f3eef2ca89d67775f202a4c28140230a6229291e
refs/heads/master
2023-04-12T13:17:33.865448
2016-08-22T00:52:47
2016-08-22T00:52:47
17,586,846
34
7
null
null
null
null
UTF-8
Java
false
false
1,303
java
package com.ajjpj.afoundation.collection.immutable; import java.util.Arrays; /** * @author arno */ public class ALongRedBlackTreeSet extends MapAsSetWrapper<Long, ALongRedBlackTreeSet> { public static ALongRedBlackTreeSet empty () { return new ALongRedBlackTreeSet (ALongRedBlackTreeMap.<Boolean> empty ()); } public static ALongRedBlackTreeSet create (long... elements) { ALongRedBlackTreeSet result = empty (); for (long el: elements) { result = result.with (el); //TODO specialize this } return result; } public static ALongRedBlackTreeSet create (Long... elements) { return create (Arrays.asList (elements)); } public static ALongRedBlackTreeSet create (Iterable<Long> elements) { ALongRedBlackTreeSet result = empty (); for (Long el: elements) { result = result.with (el); } return result; } public static ALongRedBlackTreeSet create (ALongRedBlackTreeMap<?> inner) { return new ALongRedBlackTreeSet (inner); } private ALongRedBlackTreeSet (AMap<Long, ?> inner) { super (inner); } @Override protected ALongRedBlackTreeSet wrapAsSet (AMap<Long, ?> inner) { return new ALongRedBlackTreeSet (inner); } }
[ "arno.haase@haase-consulting.com" ]
arno.haase@haase-consulting.com
2c894db576131dd504419dcd5e9913c6d2ba9cad
bf5cd2ad1edeb2daf92475d95a380ddc66899789
/study-day01/asynchronous/src/com/microwu/cxd/asynchronous/server/B.java
66d60a0dca3eb2fe2640b5db3052de19a7ac0bfa
[]
no_license
MarsGravitation/demo
4ca7cb8d8021bdc3924902946cc9bb533445a31e
53708b78dcf13367d20fd5c290cf446b02a73093
refs/heads/master
2022-11-27T10:17:18.130657
2022-04-26T08:02:59
2022-04-26T08:02:59
250,443,561
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package com.microwu.cxd.asynchronous.server; import com.microwu.cxd.asynchronous.callback.CallBack2; /** * Description: * Author: Administration chengxudong@microwu.com * Date: 2019/4/19 11:09 * Copyright 北京小悟科技有限公司 http://www.microwu.com * Update History: * Author Time Content */ public class B { public void executeMessage(CallBack2 callBack2, String question) { System.out.println(callBack2.getClass() + "问了一个问题:" + question); try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } String result = "答案是2"; callBack2.solve(result); } }
[ "18435202728@163.com" ]
18435202728@163.com
262a4c6fe4b617c7fd23aba9c1e2112064ec55a8
3da0ad0988776c7c471749c34adc863f863142a6
/iextrading4j-client-rest/src/main/java/pl/zankowski/iextrading4j/client/endpoint/stocks/StocksEndpoint.java
66f60ec8b6fa19423ab4375442b0271e591aab8b
[ "Apache-2.0" ]
permissive
hpdrago/iextrading4j
b20eea3259f0007daa9975cad2f1331e2f9a7a73
0f0d219ba5e19eafdcf4af20c2782f39903d27cb
refs/heads/master
2021-09-15T00:12:27.053423
2017-12-28T11:05:47
2017-12-28T11:05:47
109,058,093
1
0
null
2017-10-31T22:19:24
2017-10-31T22:19:23
null
UTF-8
Java
false
false
974
java
package pl.zankowski.iextrading4j.client.endpoint.stocks; import pl.zankowski.iextrading4j.client.endpoint.stocks.request.ChartRequest; import pl.zankowski.iextrading4j.client.endpoint.stocks.request.NewsRequest; import pl.zankowski.iextrading4j.api.stocks.*; import pl.zankowski.iextrading4j.client.endpoint.stocks.request.StockRequest; /** * @author Wojciech Zankowski */ public interface StocksEndpoint { Quote requestQuote(StockRequest stockRequest); Chart[] requestChart(ChartRequest chartRequest); Company requestCompany(StockRequest stockRequest); KeyStats requestKeyStats(StockRequest stockRequest); News[] requestNews(NewsRequest newsRequest); Financials requestFinancials(StockRequest stockRequest); Earnings requestEarnings(StockRequest stockRequest); Logo requestLogo(StockRequest stockRequest); double requestPrice(StockRequest stockRequest); DelayedQuote requestDelayedQuote(StockRequest stockRequest); }
[ "info@zankowski.pl" ]
info@zankowski.pl
5590a7228a803ade5504999de4902b5dbc0aacaf
ebdcaff90c72bf9bb7871574b25602ec22e45c35
/modules/dfp_appengine/src/main/java/com/google/api/ads/admanager/jaxws/v201805/CreativePolicyViolation.java
efbf7dacf07b43975277546f5bdaf49d52c4eb65
[ "Apache-2.0" ]
permissive
ColleenKeegan/googleads-java-lib
3c25ea93740b3abceb52bb0534aff66388d8abd1
3d38daadf66e5d9c3db220559f099fd5c5b19e70
refs/heads/master
2023-04-06T16:16:51.690975
2018-11-15T20:50:26
2018-11-15T20:50:26
158,986,306
1
0
Apache-2.0
2023-04-04T01:42:56
2018-11-25T00:56:39
Java
UTF-8
Java
false
false
5,095
java
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.api.ads.admanager.jaxws.v201805; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CreativePolicyViolation. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="CreativePolicyViolation"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="MALWARE_IN_CREATIVE"/> * &lt;enumeration value="MALWARE_IN_LANDING_PAGE"/> * &lt;enumeration value="LEGALLY_BLOCKED_REDIRECT_URL"/> * &lt;enumeration value="MISREPRESENTATION_OF_PRODUCT"/> * &lt;enumeration value="SELF_CLICKING_CREATIVE"/> * &lt;enumeration value="GAMING_GOOGLE_NETWORK"/> * &lt;enumeration value="DYNAMIC_DNS"/> * &lt;enumeration value="PHISHING"/> * &lt;enumeration value="DOWNLOAD_PROMPT_IN_CREATIVE"/> * &lt;enumeration value="UNAUTHORIZED_COOKIE_DETECTED"/> * &lt;enumeration value="UNKNOWN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "CreativePolicyViolation") @XmlEnum public enum CreativePolicyViolation { /** * * Malware was found in the creative. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/1308246">here</a>. * * */ MALWARE_IN_CREATIVE, /** * * Malware was found in the landing page. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/1308246">here</a>. * * */ MALWARE_IN_LANDING_PAGE, /** * * The redirect url contains legally objectionable content. * * */ LEGALLY_BLOCKED_REDIRECT_URL, /** * * The creative misrepresents the product or service being advertised. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/6020955?hl=en#355">here</a>. * * */ MISREPRESENTATION_OF_PRODUCT, /** * * The creative has been determined to be self clicking. * * */ SELF_CLICKING_CREATIVE, /** * * The creative has been determined as attempting to game the Google network. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/6020954?hl=en#319">here</a>. * * */ GAMING_GOOGLE_NETWORK, /** * * The landing page for the creative uses a dynamic DNS. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/6020954?rd=1">here</a>. * * */ DYNAMIC_DNS, /** * * Phishing found in creative or landing page. * * <p>For more information see * <a href="https://support.google.com/adwordspolicy/answer/6020955">here</a>. * * */ PHISHING, /** * * The creative prompts the user to download a file. * * <p>For more information see * <a href="https://support.google.com/dfp_premium/answer/7513391">here</a> * * */ DOWNLOAD_PROMPT_IN_CREATIVE, /** * * The creative sets an unauthorized cookie on a Google domain. * * <p>For more information see <a * href="https://support.google.com/dfp_premium/answer/7513391">here</a> * * */ UNAUTHORIZED_COOKIE_DETECTED, /** * * The value returned if the actual value is not exposed by the requested API version. * * */ UNKNOWN; public String value() { return name(); } public static CreativePolicyViolation fromValue(String v) { return valueOf(v); } }
[ "api.cseeley@gmail.com" ]
api.cseeley@gmail.com
64a9b5b842a120c6a86cec76bb2706e638228367
8bb9cbca395976f7bfa56563d772b1456446906e
/jOOQ/src/main/java/org/jooq/WithAsStep18.java
db5372b6fe4a8d76f80d825795d85fedebcb1890
[ "Apache-2.0" ]
permissive
linqtosql/jOOQ
2121d3d76b75c4c1721806bf86dbcdc69e710ddf
5e780aad315f077a3c4e5e9cebc3f9fe2e1a208b
refs/heads/master
2020-04-10T20:30:59.830292
2018-12-10T11:45:42
2018-12-10T11:45:42
161,270,393
0
1
NOASSERTION
2018-12-11T03:16:01
2018-12-11T03:16:01
null
UTF-8
Java
false
false
2,037
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Other licenses: * ----------------------------------------------------------------------------- * Commercial licenses for this work are available. These replace the above * ASL 2.0 and offer limited warranties, support, maintenance, and commercial * database integrations. * * For more information, please visit: http://www.jooq.org/licenses * * * * * * * * * * * * * * * * */ package org.jooq; // ... // ... import static org.jooq.SQLDialect.FIREBIRD; import static org.jooq.SQLDialect.H2; import static org.jooq.SQLDialect.HSQLDB; import static org.jooq.SQLDialect.MARIADB; import static org.jooq.SQLDialect.MYSQL_8_0; // ... import static org.jooq.SQLDialect.POSTGRES; // ... // ... // ... // ... // ... /** * This type is part of the jOOQ DSL to create {@link Select}, {@link Insert}, * {@link Update}, {@link Delete}, {@link Merge} statements prefixed with a * <code>WITH</code> clause and with {@link CommonTableExpression}s. * <p> * Example: * <code><pre> * DSL.with("table", "col1", "col2") * .as( * select(one(), two()) * ) * .select() * .from("table") * </pre></code> * * @author Lukas Eder */ public interface WithAsStep18 { /** * Associate a subselect with a common table expression's table and column names. */ @Support({ FIREBIRD, H2, HSQLDB, MARIADB, MYSQL_8_0, POSTGRES }) WithStep as(Select<? extends Record18<?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?>> select); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
b49a0444d6850091983dbbb1f8c44da936f23f65
75fdfcd791691b9c50da0a765c3b9592ac250217
/src/test/java/mr/hadinarimtic/agribank/service/mapper/UserMapperTest.java
207fae9d7720ce89cb094688d61771d72dcb68a7
[]
no_license
mockhtar/agribank-app
a65cd000a898ba03de235b167504411a9cce1056
1958823f4fed3d5b7ef53d93882a9b5928f1fef9
refs/heads/main
2023-06-28T18:40:25.531916
2021-08-03T14:30:03
2021-08-03T14:30:03
392,345,743
0
0
null
null
null
null
UTF-8
Java
false
false
4,252
java
package mr.hadinarimtic.agribank.service.mapper; import static org.assertj.core.api.Assertions.assertThat; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import mr.hadinarimtic.agribank.domain.User; import mr.hadinarimtic.agribank.service.dto.AdminUserDTO; import mr.hadinarimtic.agribank.service.dto.UserDTO; import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; /** * Unit tests for {@link UserMapper}. */ class UserMapperTest { private static final String DEFAULT_LOGIN = "johndoe"; private static final Long DEFAULT_ID = 1L; private UserMapper userMapper; private User user; private AdminUserDTO userDto; @BeforeEach public void init() { userMapper = new UserMapper(); user = new User(); user.setLogin(DEFAULT_LOGIN); user.setPassword(RandomStringUtils.random(60)); user.setActivated(true); user.setEmail("johndoe@localhost"); user.setFirstName("john"); user.setLastName("doe"); user.setImageUrl("image_url"); user.setLangKey("en"); userDto = new AdminUserDTO(user); } @Test void usersToUserDTOsShouldMapOnlyNonNullUsers() { List<User> users = new ArrayList<>(); users.add(user); users.add(null); List<UserDTO> userDTOS = userMapper.usersToUserDTOs(users); assertThat(userDTOS).isNotEmpty().size().isEqualTo(1); } @Test void userDTOsToUsersShouldMapOnlyNonNullUsers() { List<AdminUserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); usersDto.add(null); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty().size().isEqualTo(1); } @Test void userDTOsToUsersWithAuthoritiesStringShouldMapToUsersWithAuthoritiesDomain() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); List<AdminUserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty().size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isNotEmpty(); assertThat(users.get(0).getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test void userDTOsToUsersMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); List<AdminUserDTO> usersDto = new ArrayList<>(); usersDto.add(userDto); List<User> users = userMapper.userDTOsToUsers(usersDto); assertThat(users).isNotEmpty().size().isEqualTo(1); assertThat(users.get(0).getAuthorities()).isNotNull(); assertThat(users.get(0).getAuthorities()).isEmpty(); } @Test void userDTOToUserMapWithAuthoritiesStringShouldReturnUserWithAuthorities() { Set<String> authoritiesAsString = new HashSet<>(); authoritiesAsString.add("ADMIN"); userDto.setAuthorities(authoritiesAsString); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isNotEmpty(); assertThat(user.getAuthorities().iterator().next().getName()).isEqualTo("ADMIN"); } @Test void userDTOToUserMapWithNullAuthoritiesStringShouldReturnUserWithEmptyAuthorities() { userDto.setAuthorities(null); User user = userMapper.userDTOToUser(userDto); assertThat(user).isNotNull(); assertThat(user.getAuthorities()).isNotNull(); assertThat(user.getAuthorities()).isEmpty(); } @Test void userDTOToUserMapWithNullUserShouldReturnNull() { assertThat(userMapper.userDTOToUser(null)).isNull(); } @Test void testUserFromId() { assertThat(userMapper.userFromId(DEFAULT_ID).getId()).isEqualTo(DEFAULT_ID); assertThat(userMapper.userFromId(null)).isNull(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c1bd1b2b8c6c97cc40045946824497f5bee294df
8ee060eae1cfa9865687892ef9b57d7b65e81a83
/01_Basics/01_HelloWorld/app/src/main/java/com/miguelcr/helloworld/MainActivity.java
bd53c1a58f34496fc846e7c925dc409eebf5df64
[]
no_license
miguelcamposdev/lodz2020
7345787785c6708fbe6811c156cb23580e64cf33
0ca6d62e8ef779ebdb0302cfbf57bfc9ccc285b8
refs/heads/master
2022-04-08T01:17:41.261109
2020-01-30T16:35:16
2020-01-30T16:35:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package com.miguelcr.helloworld; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "camposmiguel@gmail.com" ]
camposmiguel@gmail.com
6aed05e1b9a053a3713e5d7aae132ede6fea3ed3
519de3b9fca2d6f905e7f3498884094546432c30
/kk-4.x/external/apache-http/src/org/apache/http/HttpRequestFactory.java
83b267299565484420fd7cf08dbd1ad8451b4ebc
[ "Apache-2.0" ]
permissive
hongshui3000/mt5507_android_4.4
2324e078190b97afbc7ceca22ec1b87b9367f52a
880d4424989cf91f690ca187d6f0343df047da4f
refs/heads/master
2020-03-24T10:34:21.213134
2016-02-24T05:57:53
2016-02-24T05:57:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,846
java
/* * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/HttpRequestFactory.java $ * $Revision: #1 $ * $Date: 2014/10/13 $ * * ==================================================================== * 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. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.http; /** * A factory for {@link HttpRequest HttpRequest} objects. * * @author <a href="mailto:oleg at ural.ru">Oleg Kalnichevski</a> * * @version $Revision: #1 $ * * @since 4.0 */ public interface HttpRequestFactory { HttpRequest newHttpRequest(RequestLine requestline) throws MethodNotSupportedException; HttpRequest newHttpRequest(String method, String uri) throws MethodNotSupportedException; }
[ "342981011@qq.com" ]
342981011@qq.com
3e13a46248350a94b1a94eaf7350db8efa7b58b5
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/needle/WindNeedle_drawNeedle_76.java
5cd99973a4693fcfbf0abacef59c0db71d28c48f
[]
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,089
java
org jfree chart needl needl wind direct link org jfree chart plot compass plot compassplot wind needl windneedl arrow needl arrowneedl draw needl param graphic devic param plot area plotarea plot area param rotat rotat point param angl angl draw needl drawneedl graphics2 graphics2d rectangle2 rectangle2d plot area plotarea point2 point2d rotat angl draw needl drawneedl plot area plotarea rotat angl rotat plot area plotarea space size getsiz rectangle2 rectangle2d area newarea rectangle2 rectangle2d doubl point2 point2d rotat newrot rotat area newarea set rect setrect plot area plotarea min getminx space plot area plotarea min getmini plot area plotarea width getwidth plot area plotarea height getheight draw needl drawneedl area newarea rotat newrot angl area newarea set rect setrect plot area plotarea min getminx space plot area plotarea min getmini plot area plotarea width getwidth plot area plotarea height getheight draw needl drawneedl area newarea rotat newrot angl
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
1c2631d2762d2a99831735b489852b1da5be73ca
b0f4fac76ba921020b05968c6f9baad698b15cb3
/app/src/main/java/cn/cbdi/AndroidSDK/FileCtlEnum.java
69acd5a51898a6c4087e2b84651d1717d31a5902
[]
no_license
goalgate/HuNanInstrument
68eb13513793e42b6f2b3a3c62e4cf4ceae110a9
ae32b107834045f3e8aa3d772518d1f6c4a1f525
refs/heads/master
2020-07-28T23:28:36.005472
2020-06-29T01:42:02
2020-06-29T01:42:02
209,577,834
0
1
null
null
null
null
UTF-8
Java
false
false
1,209
java
package cn.cbdi.AndroidSDK; public class FileCtlEnum { /* File Flag */ public final static int O_ACCMODE = 00000003; public final static int O_RDONLY = 00000000; public final static int O_WRONLY = 00000001; public final static int O_RDWR = 00000002; public final static int O_CREAT = 00000100; /* not fcntl */ public final static int O_EXCL = 00000200; /* not fcntl */ public final static int O_NOCTTY = 00000400; /* not fcntl */ public final static int O_TRUNC = 00001000; /* not fcntl */ public final static int O_APPEND = 00002000; public final static int O_NONBLOCK = 00004000; public final static int O_DSYNC = 00010000; /* used to be O_SYNC, see below */ public final static int FASYNC = 00020000; /* fcntl, for BSD compatibility */ public final static int O_DIRECT = 00040000; /* direct disk access hint */ public final static int O_LARGEFILE = 00100000; public final static int O_DIRECTORY = 00200000; /* must be a directory */ public final static int O_NOFOLLOW = 00400000; /* don't follow links */ public final static int O_NOATIME = 01000000; public final static int O_CLOEXEC = 02000000; /* set close_on_exec */ }
[ "522508134@qq.com" ]
522508134@qq.com
f7ee62f1ef73d6e798cdc8afdaf450360682d852
6be39fc2c882d0b9269f1530e0650fd3717df493
/weixin反编译/sources/com/tencent/mm/boot/svg/a/a/vo.java
6d87dcf9430dfebfa1f9e2fe801bf9e150eaecc7
[]
no_license
sir-deng/res
f1819af90b366e8326bf23d1b2f1074dfe33848f
3cf9b044e1f4744350e5e89648d27247c9dc9877
refs/heads/master
2022-06-11T21:54:36.725180
2020-05-07T06:03:23
2020-05-07T06:03:23
155,177,067
5
0
null
null
null
null
UTF-8
Java
false
false
3,848
java
package com.tencent.mm.boot.svg.a.a; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; import com.tencent.smtt.sdk.WebView; public final class vo extends c { private final int height = 108; private final int width = 108; protected final int b(int i, Object... objArr) { switch (i) { case 0: return 108; case 1: return 108; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; c.f(looper); c.e(looper); Paint i2 = c.i(looper); i2.setFlags(385); i2.setStyle(Style.FILL); Paint i3 = c.i(looper); i3.setFlags(385); i3.setStyle(Style.STROKE); i2.setColor(WebView.NIGHT_MODE_COLOR); i3.setStrokeWidth(1.0f); i3.setStrokeCap(Cap.BUTT); i3.setStrokeJoin(Join.MITER); i3.setStrokeMiter(4.0f); i3.setPathEffect(null); c.a(i3, looper).setStrokeWidth(1.0f); i2 = c.a(i2, looper); i2.setColor(-499359); canvas.save(); Paint a = c.a(i2, looper); Path j = c.j(looper); j.moveTo(79.03704f, 25.0f); j.lineTo(29.962963f, 25.0f); j.cubicTo(28.879408f, 25.0f, 28.0f, 25.881067f, 28.0f, 26.966667f); j.lineTo(28.0f, 82.03333f); j.cubicTo(28.0f, 83.118935f, 28.879408f, 84.0f, 29.962963f, 84.0f); j.lineTo(79.03704f, 84.0f); j.cubicTo(80.12059f, 84.0f, 81.0f, 83.118935f, 81.0f, 82.03333f); j.lineTo(81.0f, 26.966667f); j.cubicTo(81.0f, 25.880083f, 80.12059f, 25.0f, 79.03704f, 25.0f); j.lineTo(79.03704f, 25.0f); j.close(); j.moveTo(69.22222f, 40.388184f); j.lineTo(69.22222f, 52.533333f); j.cubicTo(69.22222f, 60.679268f, 62.630592f, 67.28333f, 54.5f, 67.28333f); j.cubicTo(46.369408f, 67.28333f, 39.77778f, 60.679268f, 39.77778f, 52.533333f); j.lineTo(39.77778f, 40.388184f); j.cubicTo(38.61963f, 39.83555f, 37.814816f, 38.66145f, 37.814816f, 37.291668f); j.cubicTo(37.814816f, 35.3899f, 39.352795f, 33.85f, 41.25f, 33.85f); j.cubicTo(43.147205f, 33.85f, 44.685184f, 35.3899f, 44.685184f, 37.291668f); j.cubicTo(44.685184f, 38.662434f, 43.88037f, 39.83555f, 42.72222f, 40.388184f); j.lineTo(42.72222f, 52.533333f); j.cubicTo(42.72222f, 59.049885f, 47.99474f, 64.333336f, 54.5f, 64.333336f); j.cubicTo(61.004276f, 64.333336f, 66.27778f, 59.049885f, 66.27778f, 52.533333f); j.lineTo(66.27778f, 40.388184f); j.cubicTo(65.11963f, 39.83555f, 64.31481f, 38.66145f, 64.31481f, 37.291668f); j.cubicTo(64.31481f, 35.3899f, 65.8528f, 33.85f, 67.75f, 33.85f); j.cubicTo(69.6472f, 33.85f, 71.18519f, 35.3899f, 71.18519f, 37.291668f); j.cubicTo(71.18519f, 38.66145f, 70.37939f, 39.83555f, 69.22222f, 40.388184f); j.lineTo(69.22222f, 40.388184f); j.close(); WeChatSVGRenderC2Java.setFillType(j, 2); canvas.drawPath(j, a); canvas.restore(); c.h(looper); break; } return 0; } }
[ "denghailong@vargo.com.cn" ]
denghailong@vargo.com.cn
fd3f3e75715ea39f7303ced4b2e218dfc47c2cf5
ab0706034033e069f9fb0b0e1102a1c9f8e7be47
/src/main/java/com/codeborne/selenide/testng/TextReport.java
541199b2547e90f1eddeb98aa443b87b4ac63ffb
[ "MIT" ]
permissive
yavlanskiy/selenide
67b6d97454bc9f747f1b9fb66a02e5fff9b0765d
d09a7433f6dcffec04a8b0b620e928a39b65027a
refs/heads/master
2021-01-09T09:01:24.926110
2016-01-25T15:01:44
2016-01-25T15:01:44
56,587,434
1
0
null
2016-04-19T10:25:31
2016-04-19T10:25:30
null
UTF-8
Java
false
false
806
java
package com.codeborne.selenide.testng; import com.codeborne.selenide.logevents.SimpleReport; import org.testng.ITestResult; import org.testng.reporters.ExitCodeListener; /** * Annotate your test class with {@code @Listeners({ TextReport.class})} * @since Selenide 2.25 */ public class TextReport extends ExitCodeListener { protected SimpleReport report = new SimpleReport(); @Override public void onTestStart(ITestResult result) { report.start(); } @Override public void onTestFailure(ITestResult result) { report.finish(result.getName()); } @Override public void onTestFailedButWithinSuccessPercentage(ITestResult result) { report.finish(result.getName()); } @Override public void onTestSuccess(ITestResult result) { report.finish(result.getName()); } }
[ "andrei.solntsev@gmail.com" ]
andrei.solntsev@gmail.com
45da8978d9064a047e411e0746aaacae1dc4ae74
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
/httpclient-simple/src/test/java/com/surya/httpclient/HttpClientPostingLiveTest.java
5da18271a063e0e4c3705b289a838ea1f7f7133a
[]
no_license
Suryakanta97/DemoExample
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
5c6b831948e612bdc2d9d578a581df964ef89bfb
refs/heads/main
2023-08-10T17:30:32.397265
2021-09-22T16:18:42
2021-09-22T16:18:42
391,087,435
0
1
null
null
null
null
UTF-8
Java
false
false
6,385
java
package com.surya.httpclient; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.auth.AuthenticationException; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.fluent.Form; import org.apache.http.client.fluent.Request; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.impl.auth.BasicScheme; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.message.BasicNameValuePair; import org.junit.Test; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import static org.hamcrest.Matchers.equalTo; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThat; /* * NOTE : Need module spring-rest to be running */ public class HttpClientPostingLiveTest { private static final String SAMPLE_URL = "http://www.example.com"; private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://browserspy.dk/password-ok.php"; private static final String DEFAULT_USER = "test"; private static final String DEFAULT_PASS = "test"; @Test public void whenSendPostRequestUsingHttpClient_thenCorrect() throws IOException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(SAMPLE_URL); final List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("username", DEFAULT_USER)); params.add(new BasicNameValuePair("password", DEFAULT_PASS)); httpPost.setEntity(new UrlEncodedFormEntity(params)); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } @Test public void whenSendPostRequestWithAuthorizationUsingHttpClient_thenCorrect() throws IOException, AuthenticationException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(URL_SECURED_BY_BASIC_AUTHENTICATION); httpPost.setEntity(new StringEntity("test post")); final UsernamePasswordCredentials creds = new UsernamePasswordCredentials(DEFAULT_USER, DEFAULT_PASS); httpPost.addHeader(new BasicScheme().authenticate(creds, httpPost, null)); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } @Test public void whenPostJsonUsingHttpClient_thenCorrect() throws IOException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(SAMPLE_URL); final String json = "{\"id\":1,\"name\":\"John\"}"; final StringEntity entity = new StringEntity(json); httpPost.setEntity(entity); httpPost.setHeader("Accept", "application/json"); httpPost.setHeader("Content-type", "application/json"); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } @Test public void whenPostFormUsingHttpClientFluentAPI_thenCorrect() throws IOException { final HttpResponse response = Request.Post(SAMPLE_URL).bodyForm(Form.form().add("username", DEFAULT_USER).add("password", DEFAULT_PASS).build()).execute().returnResponse(); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); } @Test public void whenSendMultipartRequestUsingHttpClient_thenCorrect() throws IOException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(SAMPLE_URL); final MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addTextBody("username", DEFAULT_USER); builder.addTextBody("password", DEFAULT_PASS); builder.addBinaryBody("file", new File("src/test/resources/test.in"), ContentType.APPLICATION_OCTET_STREAM, "file.ext"); final HttpEntity multipart = builder.build(); httpPost.setEntity(multipart); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } @Test public void whenUploadFileUsingHttpClient_thenCorrect() throws IOException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(SAMPLE_URL); final MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addBinaryBody("file", new File("src/test/resources/test.in"), ContentType.APPLICATION_OCTET_STREAM, "file.ext"); final HttpEntity multipart = builder.build(); httpPost.setEntity(multipart); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } @Test public void whenGetUploadFileProgressUsingHttpClient_thenCorrect() throws IOException { final CloseableHttpClient client = HttpClients.createDefault(); final HttpPost httpPost = new HttpPost(SAMPLE_URL); final MultipartEntityBuilder builder = MultipartEntityBuilder.create(); builder.addBinaryBody("file", new File("src/test/resources/test.in"), ContentType.APPLICATION_OCTET_STREAM, "file.ext"); final HttpEntity multipart = builder.build(); final ProgressEntityWrapper.ProgressListener pListener = percentage -> assertFalse(Float.compare(percentage, 100) > 0); httpPost.setEntity(new ProgressEntityWrapper(multipart, pListener)); final CloseableHttpResponse response = client.execute(httpPost); assertThat(response.getStatusLine().getStatusCode(), equalTo(200)); client.close(); } }
[ "suryakanta97@github.com" ]
suryakanta97@github.com
3ef7d1cf0b8151755ac86bbe63f04d8abc067b57
7653e008384de73b57411b7748dab52b561d51e6
/SrcGame/dwo/scripts/ai/player/DoDie.java
fc1f6a0597e78202f4e2ffa0881bb123d5054ab9
[]
no_license
BloodyDawn/Ertheia
14520ecd79c38acf079de05c316766280ae6c0e8
d90d7f079aa370b57999d483c8309ce833ff8af0
refs/heads/master
2021-01-11T22:10:19.455110
2017-01-14T12:15:56
2017-01-14T12:15:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
339
java
package dwo.scripts.ai.player; import dwo.gameserver.engine.hookengine.HookType; import dwo.gameserver.model.world.quest.Quest; public class DoDie extends Quest { public DoDie(String name, String desc) { super(name, desc); addEventId(HookType.ON_DIE); } public static void main(String[] args) { new DoDie("DoDie", "ai"); } }
[ "echipachenko@gmail.com" ]
echipachenko@gmail.com
6c02bd13636f5295a49ea4f747900f4592c4f83a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_aefb33b994f39f8cf264ce3e0c88d3873f4317a7/ItineraryAssignmentTest/2_aefb33b994f39f8cf264ce3e0c88d3873f4317a7_ItineraryAssignmentTest_s.java
040189dc727759326b3c47aeb74a3da8c20a25b5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,111
java
package org.drools.planner.examples.ras2012.model; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.drools.planner.examples.ras2012.ProblemSolution; import org.junit.Assert; import org.junit.Test; import org.junit.runners.Parameterized.Parameters; public class ItineraryAssignmentTest extends AbstractItineraryProviderBasedTest { private static Map<Node, MaintenanceWindow> convertMOWs( final Collection<MaintenanceWindow> mows, final Itinerary i) { final Route r = i.getRoute(); final Map<Node, MaintenanceWindow> result = new HashMap<Node, MaintenanceWindow>(); for (final MaintenanceWindow mow : mows) { if (i.isNodeOnRoute(mow.getOrigin(r)) && i.isNodeOnRoute(mow.getDestination(r))) { result.put(mow.getOrigin(r), mow); } } return result; } @Parameters public static Collection<Object[]> getInput() { final Collection<Object[]> providers = new ArrayList<Object[]>(); for (final ItineraryProvider p : AbstractItineraryProviderBasedTest.getProviders()) { for (final Map.Entry<String, int[]> routes : p.getExpectedValues().entrySet()) { for (final int routeId : routes.getValue()) { providers.add(new Object[] { p.getSolution(), p.getItinerary(routes.getKey(), routeId) }); } } } return providers; } private final ProblemSolution solution; private final Itinerary expectedItinerary; private final Train expectedTrain; private final Route expectedRoute; public ItineraryAssignmentTest(final ProblemSolution solution, final Itinerary expectedItinerary) { this.solution = solution; this.expectedItinerary = expectedItinerary; this.expectedRoute = expectedItinerary.getRoute(); this.expectedTrain = expectedItinerary.getTrain(); } @Test public void testClone() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); ia.setRoute(this.expectedRoute); final ItineraryAssignment ia2 = ia.clone(); Assert.assertNotSame(ia2, ia); Assert.assertSame(ia.getItinerary(), ia2.getItinerary()); } @Test public void testConstructorSimple() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); Assert.assertSame(this.expectedTrain, ia.getTrain()); Assert.assertNull(ia.getRoute()); try { ia.getItinerary(); Assert.fail("No route provided, getItinerary() should have failed."); } catch (final IllegalStateException ex) { // requesting itinerary without setting a route should have failed } } @Test(expected = IllegalArgumentException.class) public void testConstructorWithNullTrain() { new ItineraryAssignment(null, this.solution.getMaintenances()); } @Test public void testRouteGetterAndSetter() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); ia.setRoute(this.expectedRoute); Assert.assertSame(this.expectedRoute, ia.getRoute()); final Itinerary itinerary = ia.getItinerary(); Assert.assertEquals(this.expectedItinerary, itinerary); Assert.assertEquals(this.expectedTrain, itinerary.getTrain()); Assert.assertEquals(this.expectedRoute, itinerary.getRoute()); Assert.assertEquals( ItineraryAssignmentTest.convertMOWs(this.solution.getMaintenances(), itinerary), itinerary.getMaintenances()); } @Test(expected = IllegalArgumentException.class) public void testRouteSetterImpossible() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); ia.setRoute(new Route.Builder(this.expectedTrain.isWestbound()).build()); } @Test(expected = IllegalArgumentException.class) public void testRouteSetterNull() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); ia.setRoute(null); } @Test public void testRouteSetterTwiceTheSame() { final ItineraryAssignment ia = new ItineraryAssignment(this.expectedTrain, this.solution.getMaintenances()); ia.setRoute(this.expectedRoute); // itinerary isn't null, so getItinerary() works final Itinerary itinerary = ia.getItinerary(); // the itinerary doesn't change when the route doesn't change ia.setRoute(this.expectedRoute); Assert.assertSame(itinerary, ia.getItinerary()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b2cb8800be69410fd78c9374af67bc2e2c953596
a869070931dc0156c339eb0952d749afa0f168e3
/src/main/java/com/mytests/micronaut/data/Tab3.java
30a55a0af39ebc54246350f1fdf309d98f5b06ac
[]
no_license
jb-tester/micronaut-jpa-rx
d46aee8773be6c8b6f62934b4c0f021366c639f6
6d6352dae9e113ba964ea77a87fe6515903e4682
refs/heads/master
2023-07-19T04:10:42.894797
2021-09-08T15:40:08
2021-09-08T15:40:08
404,400,958
0
0
null
null
null
null
UTF-8
Java
false
false
1,187
java
package com.mytests.micronaut.data; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; /** * * * <p>Created by irina on 07.09.2021.</p> * <p>Project: micronaut-r2dbc-rx</p> * * */ @Entity public class Tab3 { @Id @GeneratedValue int id; String first; String second; int third; boolean forth; public Tab3() { } public Tab3(String first, String second, int third, boolean forth) { this.first = first; this.second = second; this.third = third; this.forth = forth; } public int getId() { return id; } public String getFirst() { return first; } public String getSecond() { return second; } public int getThird() { return third; } public boolean isForth() { return forth; } @Override public String toString() { return "Tab1: " + "id=" + id + ", first='" + first + '\'' + ", second='" + second + '\'' + ", third=" + third + ", forth=" + forth + ' '; } }
[ "irina.petrovskaya@jetbrains.com" ]
irina.petrovskaya@jetbrains.com
eefe577ad4a3e0398a5f4f5c07bd2c81cf5173d3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_241fbb539c6ce69dc15de39a7c633510f3aca2a7/DefaultCompiledTemplatesHolder/2_241fbb539c6ce69dc15de39a7c633510f3aca2a7_DefaultCompiledTemplatesHolder_s.java
b9fa91574180c6c40dbaa26268129ffb42f01107
[]
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,204
java
package pl.matisoft.soy.holder; import java.io.IOException; import java.net.URL; import java.util.Collection; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.template.soy.tofu.SoyTofu; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.InitializingBean; import pl.matisoft.soy.compile.EmptyTofuCompiler; import pl.matisoft.soy.compile.TofuCompiler; import pl.matisoft.soy.config.SoyViewConfigDefaults; import pl.matisoft.soy.template.EmptyTemplateFilesResolver; import pl.matisoft.soy.template.TemplateFilesResolver; /** * Created with IntelliJ IDEA. * User: mati * Date: 02/11/2013 * Time: 14:04 */ public class DefaultCompiledTemplatesHolder implements InitializingBean, CompiledTemplatesHolder { private static final Logger logger = LoggerFactory.getLogger(DefaultCompiledTemplatesHolder.class); private boolean hotReloadMode = false; private TofuCompiler tofuCompiler = new EmptyTofuCompiler(); private TemplateFilesResolver templatesFileResolver = new EmptyTemplateFilesResolver(); private Optional<SoyTofu> compiledTemplates = Optional.absent(); private boolean preCompileTemplates = SoyViewConfigDefaults.DEFAULT_PRECOMPILE_TEMPLATES; public Optional<SoyTofu> compiledTemplates() throws IOException { if (isHotReloadMode() || !compiledTemplates.isPresent()) { this.compiledTemplates = Optional.fromNullable(compileTemplates()); } return compiledTemplates; } @Override public void afterPropertiesSet() throws Exception { logger.debug("TemplatesHolder init..."); if (preCompileTemplates) { this.compiledTemplates = Optional.fromNullable(compileTemplates()); } } private SoyTofu compileTemplates() throws IOException { Preconditions.checkNotNull(templatesFileResolver, "templatesRenderer cannot be null!"); Preconditions.checkNotNull(tofuCompiler, "tofuCompiler cannot be null!"); final Collection<URL> templateFiles = templatesFileResolver.resolve(); if (templateFiles != null && templateFiles.size() > 0) { logger.debug("Compiling templates, no:{}", templateFiles.size()); return tofuCompiler.compile(templateFiles); } throw new IOException("0 template files have been found, check your templateFilesResolver!"); } public void setHotReloadMode(final boolean hotReloadMode) { this.hotReloadMode = hotReloadMode; } public boolean isHotReloadMode() { return hotReloadMode; } public boolean isHotReloadModeOff() { return !hotReloadMode; } public void setTofuCompiler(TofuCompiler tofuCompiler) { this.tofuCompiler = tofuCompiler; } public void setTemplatesFileResolver(TemplateFilesResolver templatesFileResolver) { this.templatesFileResolver = templatesFileResolver; } public void setPreCompileTemplates(boolean preCompileTemplates) { this.preCompileTemplates = preCompileTemplates; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
14011431a0d5cfe843055a457d33c4d0b796eba6
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/p118pd/sdk/AbstractC6333illiL.java
3eef3fdb2671e5979ff00d51d7d5db98d4739627
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
643
java
package com.p118pd.sdk; import java.io.IOException; /* renamed from: com.pd.sdk.illiL reason: case insensitive filesystem */ public interface AbstractC6333illiL { C11iil OooO00o() throws IOException; /* renamed from: OooO00o reason: collision with other method in class */ AbstractC9429Il m17395OooO00o() throws IOException; /* renamed from: OooO00o reason: collision with other method in class */ void m17396OooO00o() throws IOException; void OooO00o(short s, short s2); void OooO00o(short s, short s2, String str, Throwable th); void OooO0O0(boolean z) throws IOException; boolean OooO0O0(); }
[ "593746220@qq.com" ]
593746220@qq.com
7fc26f7445d32152a3392f1b66ca7b13eb5ae787
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/response/AlipayFundCouponOrderPagePayResponse.java
ad100480de7d1cbeaf902ea2142d8659c808d3bc
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,335
java
package com.alipay.api.response; import java.util.Date; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.fund.coupon.order.page.pay response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayFundCouponOrderPagePayResponse extends AlipayResponse { private static final long serialVersionUID = 5463163136692914867L; /** * 本次支付的金额,单位为:元(人民币),精确到小数点后两位 */ @ApiField("amount") private String amount; /** * 支付宝的资金授权订单号 */ @ApiField("auth_no") private String authNo; /** * 资金授权成功时间 格式:YYYY-MM-DD HH:MM:SS */ @ApiField("gmt_trans") private Date gmtTrans; /** * 支付宝的资金操作流水号 */ @ApiField("operation_id") private String operationId; /** * 商户的授权资金订单号 */ @ApiField("out_order_no") private String outOrderNo; /** * 商户本次资金操作的请求流水号 */ @ApiField("out_request_no") private String outRequestNo; /** * 资金预授权明细的状态 目前支持: INIT:初始 SUCCESS: 成功 CLOSED:关闭 */ @ApiField("status") private String status; public void setAmount(String amount) { this.amount = amount; } public String getAmount( ) { return this.amount; } public void setAuthNo(String authNo) { this.authNo = authNo; } public String getAuthNo( ) { return this.authNo; } public void setGmtTrans(Date gmtTrans) { this.gmtTrans = gmtTrans; } public Date getGmtTrans( ) { return this.gmtTrans; } public void setOperationId(String operationId) { this.operationId = operationId; } public String getOperationId( ) { return this.operationId; } public void setOutOrderNo(String outOrderNo) { this.outOrderNo = outOrderNo; } public String getOutOrderNo( ) { return this.outOrderNo; } public void setOutRequestNo(String outRequestNo) { this.outRequestNo = outRequestNo; } public String getOutRequestNo( ) { return this.outRequestNo; } public void setStatus(String status) { this.status = status; } public String getStatus( ) { return this.status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
41ee10643966916c539edebba4c6ce77c4b5b893
0e7f18f5c03553dac7edfb02945e4083a90cd854
/src/main/resources/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/BitLength3.java
1a9ff9cca368161836c421fdaa2560d5f86e4cad
[]
no_license
brunomathidios/PostgresqlWithDocker
13604ecb5506b947a994cbb376407ab67ba7985f
6b421c5f487f381eb79007fa8ec53da32977bed1
refs/heads/master
2020-03-22T00:54:07.750044
2018-07-02T22:20:17
2018-07-02T22:20:17
139,271,591
0
0
null
null
null
null
UTF-8
Java
false
true
1,725
java
/* * This file is generated by jOOQ. */ package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines; import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class BitLength3 extends AbstractRoutine<Integer> { private static final long serialVersionUID = -1352571129; /** * The parameter <code>pg_catalog.bit_length.RETURN_VALUE</code>. */ public static final Parameter<Integer> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.INTEGER, false, false); /** * The parameter <code>pg_catalog.bit_length._1</code>. */ public static final Parameter<String> _1 = createParameter("_1", org.jooq.impl.SQLDataType.CHAR, false, true); /** * Create a new routine call instance */ public BitLength3() { super("bit_length", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.INTEGER); setReturnParameter(RETURN_VALUE); addInParameter(_1); setOverloaded(true); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(String value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<String> field) { setField(_1, field); } }
[ "brunomathidios@yahoo.com.br" ]
brunomathidios@yahoo.com.br
8788df2d45d8133bd7ea9f5a8c8442515094d437
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_6e57ce3afd2da3efd0e10b10df14e390ffbdf897/EncodingManipulator/16_6e57ce3afd2da3efd0e10b10df14e390ffbdf897_EncodingManipulator_s.java
d029d43a75ac2ab10b939095d69ca541c9943f7e
[]
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,721
java
package de.fu_berlin.inf.dpp.preferences; import org.apache.log4j.Logger; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.picocontainer.annotations.Nullable; import de.fu_berlin.inf.dpp.util.BlockingProgressMonitor; import de.fu_berlin.inf.dpp.util.StateChangeNotifier; public class EncodingManipulator implements IPreferenceManipulator { private static final Logger log = Logger .getLogger(EncodingManipulator.class); /** * Flag telling if the {@link #oldEncoding} field contains a valid value * that needs to be restored by the * {@link IPreferenceManipulator.IRestorePoint} returned by * {@link #change(IProject)}. */ protected boolean gotEncoding; /** * The old encoding set at project level before {@link #change(IProject)} * was executed. May be <code>null</code> if there was no encoding set at * project level. This field is only valid if {@link #gotEncoding} contains * <code>true</code>! */ protected String oldEncoding; public IRestorePoint change(final IProject project) { try { gotEncoding = false; oldEncoding = getEncoding(project); String newEncoding = project.getDefaultCharset(); log.debug("Project encoding: " + newEncoding); setEncoding(project, newEncoding); gotEncoding = true; } catch (CoreException e) { log.error("Could not set default encoding.", e); } return new IRestorePoint() { public void restore() { if (gotEncoding) { setEncoding(project, oldEncoding); } } }; } /** * Gets encoding from project settings. Returns <code>null</code> if there * is no encoding set on the project level. */ protected String getEncoding(IProject project) throws CoreException { return project.getDefaultCharset(false); } /** * Sets given encoding as default encoding on the project. The encoding may * be <code>null</code> to set <em>no</em> encoding on project level. */ protected void setEncoding(IProject project, @Nullable String encoding) { BlockingProgressMonitor monitor = new BlockingProgressMonitor(); try { project.setDefaultCharset(encoding, monitor); monitor.await(); } catch (CoreException e) { log.error("Could not set encoding on project.", e); } catch (InterruptedException e) { log.error("Code not designed to be interruptible", e); Thread.currentThread().interrupt(); } } public StateChangeNotifier<IPreferenceManipulator> getPreferenceStateChangeNotifier( IProject project) { return null; } /** * Returns <code>false</code>. * * @see #isDangerousForHost() */ public boolean isDangerousForClient() { return false; } /** * Returns <code>true</code>. This manipulator is only interesting for the * host, because the project setting is transferred to the client. */ public boolean isDangerousForHost() { return true; } /** * Checks if there is a need to set an encoding on the project level. */ public boolean isEnabled(IProject project) { try { return getEncoding(project) == null; } catch (CoreException e) { log.error("Could not get project encoding.", e); return false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
edaf1a7b4a2d12cf170b605df55ffce73dde743a
a5f1da80efdc5ae8dfda2e18af2a1042e2ff9234
/src/com/cyb/thread/localthread/ClientThread.java
96a73bdf87c0a27c3475acee160146ee305ccf52
[]
no_license
iechenyb/sina1.0
fb2b7b9247c7f6504e10d8301ee581a3b960bac2
aac363143e920a418f0cc3a8e3cadcb91cdb3acf
refs/heads/master
2021-05-23T04:47:39.852726
2020-05-15T00:32:27
2020-05-15T00:32:27
81,402,063
0
0
null
null
null
null
UTF-8
Java
false
false
408
java
package com.cyb.thread.localthread; public class ClientThread extends Thread { private SequenceA sequence; public ClientThread(SequenceA sequence) { this.sequence = sequence; } @Override public void run() { for (int i = 0; i < 3; i++) { System.out.println(Thread.currentThread().getName() + " => " + sequence.getNumber()); } } }
[ "zzuchenyb@sina.com" ]
zzuchenyb@sina.com
b58ec7135b9adf1cec258170881d521b4dd66f54
4abd603f82fdfa5f5503c212605f35979b77c406
/html/Programs/hw8/12af4313c0ee2d79552a8f9e6e173201/Clustering.java
4176e6348af3abe25b6f8496d74cf961bfeb695d
[]
no_license
dn070017/1042-PDSA
b23070f51946c8ac708d3ab9f447ab8185bd2a34
5e7d7b1b2c9d751a93de9725316aa3b8f59652e6
refs/heads/master
2020-03-20T12:13:43.229042
2018-06-15T01:00:48
2018-06-15T01:00:48
137,424,305
0
0
null
null
null
null
UTF-8
Java
false
false
7,316
java
import java.io.BufferedReader; import java.io.FileReader; import java.util.Random; import java.util.ArrayList; import java.util.Arrays; import java.util.List; //import edu.princeton.cs.algs4.Point2D; //import edu.princeton.cs.algs4.MaxPQ; public class Clustering { public static void main(String[] args) throws Exception { try(BufferedReader br = new BufferedReader(new FileReader(args[0]))){ String[] header = br.readLine().split("",""); int N = Integer.parseInt(header[0]); Point2D[] point=new Point2D[N]; for(int i=0;i<N;i++) { String[] pointXY = br.readLine().split("" ""); double pointX=Double.parseDouble(pointXY[0]); double pointY=Double.parseDouble(pointXY[1]); point[i]=new Point2D(pointX, pointY); } int numberOfDistance=(N*(N-1))/2; double[] distance=new double[numberOfDistance]; if(N==1) { StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[0].x())+"" ""+ String.format(""%.2f"", point[0].y())); StdOut.print(""\n""+""0.00""); } else if(N==2) { int k=0; distance[0]=Math.sqrt(Math.pow(point[0].x()-point[1].x(), 2)+(Math.pow(point[0].y()-point[1].y(), 2))); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[0].x())+"" ""+ String.format(""%.2f"", point[0].y())+"" ""+""\n""); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[1].x())+"" ""+ String.format(""%.2f"", point[1].y())); StdOut.print(""\n""+String.format(""%.2f"", distance[0])); } else if(N==3) { int k=0; double[] x=new double[3]; double[] y=new double[3]; for(int i=0;i<N-1;i++) { for(int j=i+1;j<N;j++) { distance[k]=Math.sqrt(Math.pow(point[i].x()-point[j].x(), 2)+(Math.pow(point[i].y()-point[j].y(), 2))); k++; } } MaxPQ<Double> maxPQ=new MaxPQ<Double>(); for(int i=0;i<k;i++) { maxPQ.insert(distance[i]); if(maxPQ.size()>1) { maxPQ.delMax(); } } StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[0].x())+"" ""+ String.format(""%.2f"", point[0].y())+""\n""); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[1].x())+"" ""+ String.format(""%.2f"", point[1].y())+""\n""); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[2].x())+"" ""+ String.format(""%.2f"", point[2].y())); StdOut.print(""\n""+String.format(""%.2f"", maxPQ.max())); } else { int k=0; Cluster cluster=new Cluster(point[N]); for(int i=0; i<N;i++) { cluster.points.add(point[i]); } int a=0; a=cluster.getSize(); for(int i=0;i<N-1;i++) { for(int j=i+1;j<N;j++) { distance[k]=Math.sqrt(Math.pow(point[i].x()-point[j].x(), 2)+(Math.pow(point[i].y()-point[j].y(), 2))); k++; } } MaxPQ<Double> maxPQ=new MaxPQ<Double>(); for(int i=0;i<k;i++) { maxPQ.insert(distance[i]); if(maxPQ.size()>1) { maxPQ.delMax(); } } int pointNum1=0; int pointNum2=0; for(int i=0;i<N-1;i++) { for(int j=i+1;j<N;j++) { if(maxPQ.max()==Math.sqrt(Math.pow(point[i].x()-point[j].x(), 2)+(Math.pow(point[i].y()-point[j].y(), 2)))) { pointNum1=i; pointNum2=j; } } } StdOut.print(""1""+"" ""+ String.format(""%.2f"", cluster.getCentroid().x())+"" ""+ String.format(""%.2f"", point[0].y())+""\n""); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[1].x())+"" ""+ String.format(""%.2f"", point[1].y())+""\n""); StdOut.print(""1""+"" ""+ String.format(""%.2f"", point[2].x())+"" ""+ String.format(""%.2f"", point[2].y())); StdOut.print(""\n""+String.format(""%.2f"", maxPQ.max())); } } } } class Cluster { public ArrayList<Point2D> points; public Pair centroid; public int id; private int cluster_number = 0; private int cluster_numberY = 0; //Creates a new Cluster public Cluster(Point2D point) { this.id = id; this.points = new ArrayList<Point2D>(); points.add(point); this.centroid = null; } public int getSize() { return points.size(); } public void setPoints(ArrayList points) { this.points = points; } public Point2D getCentroid() { Point2D[] centroid=new Point2D[1]; double centroidX=0; double centroidY=0; for(int i=0;i<cluster_number;i++) { centroidX+=points.get(i).x(); centroidY+=points.get(i).y(); } for(int i=0;i<cluster_numberY;i++) { centroidX+=points.get(i).x(); centroidY+=points.get(i).y(); } centroidX=centroidX/(cluster_number+cluster_numberY); centroidY=centroidY/(cluster_number+cluster_numberY); centroid[0]=new Point2D(centroidX, centroidY); return centroid[0]; } public void setCentroid(Pair centroid) { this.centroid = centroid; } } class Pair { private Cluster x; private Cluster y; private int cluster_number = 0; private int cluster_numberY = 0; private int N; private int k; public Pair(Cluster x, Cluster y,int N,int k) { this.x=x; this.y=y; this.cluster_number=x.getSize(); this.cluster_numberY=y.getSize(); this.N=N; this.k=k; } public double Distence() { double dis=0; //dis=Math.sqrt(Math.pow(x.getCentroid().x()-y.points.get(i).x();, 2)+(Math.pow(x.points.get(i).y()-y.points.get(i).y(), 2))); return 0; } }
[ "dn070017@gmail.com" ]
dn070017@gmail.com
db303c24e335993125679d60d1ee1d6d60d7964f
49546d8dface7c6f55e2658d6c5286bbbbfb153a
/com/google/api/client/repackaged/com/google/common/base/Joiner$1.java
6b13279c89982aa6851f94865192ab77a3a69ba8
[ "MIT" ]
permissive
XeonLyfe/Backdoored-1.7-Deobf-Source-Leak
257901da437959bbdb976025e1ff1057f98c49f1
942bb61216fbb47f7909372d5c733e13d103e0ed
refs/heads/master
2022-03-18T17:09:16.301479
2019-11-18T01:42:56
2019-11-18T01:42:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
787
java
package com.google.api.client.repackaged.com.google.common.base; import javax.annotation.Nullable; class Joiner$1 extends Joiner { // $FF: synthetic field final String val$nullText; // $FF: synthetic field final Joiner this$0; Joiner$1(Joiner var1, Joiner x0, String var3) { super(x0, (Joiner$1)null); this.this$0 = var1; this.val$nullText = var3; } CharSequence toString(@Nullable Object part) { return (CharSequence)(part == null ? this.val$nullText : this.this$0.toString(part)); } public Joiner useForNull(String nullText) { throw new UnsupportedOperationException("already specified useForNull"); } public Joiner skipNulls() { throw new UnsupportedOperationException("already specified useForNull"); } }
[ "57571957+RIPBackdoored@users.noreply.github.com" ]
57571957+RIPBackdoored@users.noreply.github.com
9b35b951a0010f1be4e4a7396c365f8c971d34cd
ab7857781114ff7bf28c0549ff53df541bb8b51a
/epicamsync/src/main/java/org/imogene/epicam/domain/entity/backup/PatientBck.java
7303ea417e64e810b3ed348a42468bc735976e20
[]
no_license
ummiscolirima/epicam_tb
e367eeebb02e69060fc435ac43b4ef6e58af090a
df0faf27cebcce49888485eb6481bfe4ed4a8658
refs/heads/master
2021-01-10T02:02:38.000112
2015-11-01T23:23:03
2015-11-01T23:23:03
45,359,211
0
0
null
null
null
null
UTF-8
Java
false
false
6,939
java
package org.imogene.epicam.domain.entity.backup; import java.util.Date; import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.imogene.lib.common.entity.GeoField; import org.imogene.lib.common.entity.ImogBeanImpl; import org.imogene.lib.common.entity.ImogBeanBck; import org.imogene.epicam.domain.entity.LocalizedText; /** * ImogBean implementation for the entity Patient Backup * @author MEDES-IMPS */ @Entity @Table(name = "Patient_Bck") public class PatientBck extends ImogBeanBck { private static final long serialVersionUID = 8416500062917735981L; /* Identification group fields */ private String identifiant; private String nom; private String sexe; @Temporal(TemporalType.TIMESTAMP) private Date dateNaissance; private Integer age; private String profession; private String centres; private String nationalite; private String precisionSurNationalite; private Boolean recevoirCarnetTelPortable; /* Contact group fields */ private String telephoneUn; private String telephoneDeux; private String telephoneTrois; private String email; private String libelle; @Column(columnDefinition = "TEXT") private String complementAdresse; private String quartier; private String ville; private String codePostal; private String lieuxDits; /* PersonneContact group fields */ private String pacNom; private String pacTelephoneUn; private String pacTelephoneDeux; private String pacTelephoneTrois; private String pacEmail; private String pacLibelle; @Column(columnDefinition = "TEXT") private String pacComplementAdresse; private String pacQuartier; private String pacVille; private String pacCodePostal; /* Tuberculose group fields */ private String casTuberculose; private String casIndex; /* Examens group fields */ private String examensBiologiques; private String serologies; /** * Constructor */ public PatientBck() { } /* Getters and Setters for Identification group fields */ public String getIdentifiant() { return identifiant; } public void setIdentifiant(String value) { identifiant = value; } public String getNom() { return nom; } public void setNom(String value) { nom = value; } public String getSexe() { return sexe; } public void setSexe(String value) { sexe = value; } public Date getDateNaissance() { return dateNaissance; } public void setDateNaissance(Date value) { dateNaissance = value; } public Integer getAge() { return age; } public void setAge(Integer value) { age = value; } public String getProfession() { return profession; } public void setProfession(String value) { profession = value; } public String getCentres() { return centres; } public void setCentres(String value) { centres = value; } public String getNationalite() { return nationalite; } public void setNationalite(String value) { nationalite = value; } public String getPrecisionSurNationalite() { return precisionSurNationalite; } public void setPrecisionSurNationalite(String value) { precisionSurNationalite = value; } public Boolean getRecevoirCarnetTelPortable() { return recevoirCarnetTelPortable; } public void setRecevoirCarnetTelPortable(Boolean value) { recevoirCarnetTelPortable = value; } /* Getters and Setters for Contact group fields */ public String getTelephoneUn() { return telephoneUn; } public void setTelephoneUn(String value) { telephoneUn = value; } public String getTelephoneDeux() { return telephoneDeux; } public void setTelephoneDeux(String value) { telephoneDeux = value; } public String getTelephoneTrois() { return telephoneTrois; } public void setTelephoneTrois(String value) { telephoneTrois = value; } public String getEmail() { return email; } public void setEmail(String value) { email = value; } public String getLibelle() { return libelle; } public void setLibelle(String value) { libelle = value; } public String getComplementAdresse() { return complementAdresse; } public void setComplementAdresse(String value) { complementAdresse = value; } public String getQuartier() { return quartier; } public void setQuartier(String value) { quartier = value; } public String getVille() { return ville; } public void setVille(String value) { ville = value; } public String getCodePostal() { return codePostal; } public void setCodePostal(String value) { codePostal = value; } public String getLieuxDits() { return lieuxDits; } public void setLieuxDits(String value) { lieuxDits = value; } /* Getters and Setters for PersonneContact group fields */ public String getPacNom() { return pacNom; } public void setPacNom(String value) { pacNom = value; } public String getPacTelephoneUn() { return pacTelephoneUn; } public void setPacTelephoneUn(String value) { pacTelephoneUn = value; } public String getPacTelephoneDeux() { return pacTelephoneDeux; } public void setPacTelephoneDeux(String value) { pacTelephoneDeux = value; } public String getPacTelephoneTrois() { return pacTelephoneTrois; } public void setPacTelephoneTrois(String value) { pacTelephoneTrois = value; } public String getPacEmail() { return pacEmail; } public void setPacEmail(String value) { pacEmail = value; } public String getPacLibelle() { return pacLibelle; } public void setPacLibelle(String value) { pacLibelle = value; } public String getPacComplementAdresse() { return pacComplementAdresse; } public void setPacComplementAdresse(String value) { pacComplementAdresse = value; } public String getPacQuartier() { return pacQuartier; } public void setPacQuartier(String value) { pacQuartier = value; } public String getPacVille() { return pacVille; } public void setPacVille(String value) { pacVille = value; } public String getPacCodePostal() { return pacCodePostal; } public void setPacCodePostal(String value) { pacCodePostal = value; } /* Getters and Setters for Tuberculose group fields */ public String getCasTuberculose() { return casTuberculose; } public void setCasTuberculose(String value) { casTuberculose = value; } public String getCasIndex() { return casIndex; } public void setCasIndex(String value) { casIndex = value; } /* Getters and Setters for Examens group fields */ public String getExamensBiologiques() { return examensBiologiques; } public void setExamensBiologiques(String value) { examensBiologiques = value; } public String getSerologies() { return serologies; } public void setSerologies(String value) { serologies = value; } }
[ "jiofidelus@gmail.com" ]
jiofidelus@gmail.com
dbd115038a4c4d787b14db69edef434ef6d1e11f
d8a0745524f7e07acab23be196bfe58c13e76784
/src/main/java/af/gov/anar/assetmanagement/sample/repository/SampleEntityRepository.java
39581a6ba86f4b70b48142581d71c87d60cd6c24
[]
no_license
asr-registry/assetmanagement
def4c7e4ea103ac962803af4c5d3ee7808f24948
c640a4c80b13a06c50cf9ca3554f45bfb7ce81cb
refs/heads/master
2020-12-20T16:30:38.477431
2020-01-25T08:56:17
2020-01-25T08:56:17
236,138,117
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package af.gov.anar.assetmanagement.sample.repository; import af.gov.anar.assetmanagement.sample.model.SampleEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface SampleEntityRepository extends JpaRepository<SampleEntity, Long> { }
[ "mohammadbadarhashimi@gmail.com" ]
mohammadbadarhashimi@gmail.com
f654fbeb99b40585ff9c370cc3bae872ea857c48
287c890c759181789c0e59e5c580ce51cb8a8a67
/core/src/main/java/org/transcendencej/jni/NativeFutureCallback.java
7cda11555adc75708bdfb1d7e57f758e0a6fd5ee
[ "MIT", "Apache-2.0" ]
permissive
phoenixkonsole/transcendencej
4ce43a73f66d122c6ffd5cbda94805bc379d20fa
ab450741d6676ef1770d5b6689ce4ca9e993f04f
refs/heads/master
2020-04-28T15:36:14.447538
2019-10-23T17:28:03
2019-10-23T17:28:03
175,380,859
0
3
NOASSERTION
2019-10-23T17:28:04
2019-03-13T08:45:58
Java
UTF-8
Java
false
false
1,142
java
/* * Copyright 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.transcendencej.jni; import com.google.common.util.concurrent.FutureCallback; /** * An event listener that relays events to a native C++ object. A pointer to that object is stored in * this class using JNI on the native side, thus several instances of this can point to different actual * native implementations. */ public class NativeFutureCallback implements FutureCallback { public long ptr; @Override public native void onSuccess(Object o); @Override public native void onFailure(Throwable throwable); }
[ "akshaycm@hotmail.com" ]
akshaycm@hotmail.com
d9ed35e44b17e25f3eb2866e3d364d767ca5c322
fe1b82b3d058231d94ea751ead87603e9e1e7723
/pms/src/main/java/com/axboot/pms/controllers/CKEditorController.java
14552a0c2fa415fde9e1c739c3851f9d0fe8355a
[]
no_license
designreuse/projects
c5bf6ede5afd08be6804270ac24eaf07dcfd7fef
d4149db321840371d82a61adf927f68f8ac107cb
refs/heads/master
2020-08-12T07:13:36.738560
2019-04-10T07:07:42
2019-04-10T07:07:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
package com.axboot.pms.controllers; import com.axboot.pms.domain.file.CKEditorUploadResponse; import com.axboot.pms.domain.file.CommonFile; import com.axboot.pms.domain.file.CommonFileService; import com.axboot.pms.domain.file.UploadParameters; import com.chequer.axboot.core.controllers.BaseController; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; 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.multipart.MultipartFile; import javax.inject.Inject; import java.io.IOException; @Controller @RequestMapping("/ckeditor") public class CKEditorController extends BaseController { @Inject private CommonFileService commonFileService; @RequestMapping(value = "/uploadImage", method = RequestMethod.POST, produces = APPLICATION_JSON) public CKEditorUploadResponse uploadDragAndDropFromCKEditor( @RequestParam(value = "upload") MultipartFile multipartFile, @RequestParam(defaultValue = "CKEDITOR", required = false) String targetType, @RequestParam String targetId) throws IOException { if (StringUtils.isEmpty(multipartFile.getName()) || multipartFile.getBytes().length == 0) { throw new IllegalArgumentException("file not presented"); } UploadParameters uploadParameters = new UploadParameters(); uploadParameters.setMultipartFile(multipartFile); uploadParameters.setTargetId(targetId); uploadParameters.setTargetType(targetType); uploadParameters.setThumbnail(false); CommonFile commonFile = commonFileService.upload(uploadParameters); CKEditorUploadResponse ckEditorUploadResponse = new CKEditorUploadResponse(); ckEditorUploadResponse.setFileName(commonFile.getFileNm()); ckEditorUploadResponse.setUrl(commonFile.preview()); return ckEditorUploadResponse; } @RequestMapping(value = "/fileBrowser") public String fileBrowser() { return "/common/fileBrowser"; } }
[ "kwpark@localhost" ]
kwpark@localhost
3117c27ddb388ae4ee903f8c4d1886e2225ca76a
be84b875b5d9df7a3b7d196253f01722afd80a68
/springboot_mybatis/src/main/java/com/example/demo/mapper/UserMapper.java
3b038146c8f65fc0c2906ab242f14facf7bf8f4e
[]
no_license
zhiguangg/SpringBoot-Bybatis-JUnit-or-SpringBoot-JPA-JUnit-Redis
b771c06813347f33ce4df11f475fbba1570dd94d
ee64c3f035ced8bce9db25606c55114be6b1c309
refs/heads/master
2022-04-28T04:46:22.650277
2020-04-28T16:36:43
2020-04-28T16:36:43
258,006,517
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.example.demo.mapper; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.example.demo.domain.User; @Mapper public interface UserMapper { public List<User> queryUserList(); }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
17afb7f65d20530dc77ecb8ccf505c432dde959a
eeffa8e086068b3b1986b220a1a158de902a7ac1
/architecture/src/main/java/com/kunminx/architecture/ui/layout_manager/WrapContentStaggeredGridLayoutManager.java
b88068a06f7879230b2f4bcc41d5942278f93701
[ "Apache-2.0" ]
permissive
yangyugee/Jetpack-MVVM-Best-Practice
cc81a41c7122ac7302c95948aeb58c556172cf36
6b69074580a920aca6e5abb5b0e4c1363d76455c
refs/heads/master
2023-07-07T08:57:15.101098
2020-07-18T17:25:36
2020-07-18T17:25:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,552
java
/* * Copyright 2018-2020 KunMinX * * 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.kunminx.architecture.ui.layout_manager; import android.content.Context; import android.util.AttributeSet; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.StaggeredGridLayoutManager; /** * Create by KunMinX at 2020/6/13 */ public class WrapContentStaggeredGridLayoutManager extends StaggeredGridLayoutManager { public WrapContentStaggeredGridLayoutManager(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); } public WrapContentStaggeredGridLayoutManager(int spanCount, int orientation) { super(spanCount, orientation); } @Override public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) { try { super.onLayoutChildren(recycler, state); } catch (IndexOutOfBoundsException e) { e.printStackTrace(); } } }
[ "kunminx@gmail.com" ]
kunminx@gmail.com
2f8ce964822c0731bd36adf8aa2cb11d32102282
b4b161c350ad7381e8d262312098fae81a08ace4
/ch-server-base/src/main/java/com/zifangdt/ch/base/dto/quote/BillScheme.java
e75090b00e87762b3f72682e6082582fed66e7cc
[]
no_license
snailhu/CRM
53cfec167ddd4040487bdbb6e5b73554c80865a1
e481fed1be654959b8ab053bd34ef79bbd2a79f9
refs/heads/master
2020-03-09T22:59:03.040725
2018-04-11T07:06:53
2018-04-11T07:07:01
129,047,954
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
package com.zifangdt.ch.base.dto.quote; import java.util.Date; public class BillScheme { private Long id; private Long quoteBillId; private String schemeName; private String designImgurl; private String description; private Long designerId; private String designerName; private Date createTime; private String remark; private Long productOrderId; public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Long getProductOrderId() { return productOrderId; } public void setProductOrderId(Long productOrderId) { this.productOrderId = productOrderId; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getQuoteBillId() { return quoteBillId; } public void setQuoteBillId(Long quoteBillId) { this.quoteBillId = quoteBillId; } public String getSchemeName() { return schemeName; } public void setSchemeName(String schemeName) { this.schemeName = schemeName == null ? null : schemeName.trim(); } public String getDesignImgurl() { return designImgurl; } public void setDesignImgurl(String designImgurl) { this.designImgurl = designImgurl == null ? null : designImgurl.trim(); } public String getDescription() { return description; } public void setDescription(String description) { this.description = description == null ? null : description.trim(); } public Long getDesignerId() { return designerId; } public void setDesignerId(Long designerId) { this.designerId = designerId; } public String getDesignerName() { return designerName; } public void setDesignerName(String designerName) { this.designerName = designerName == null ? null : designerName.trim(); } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
[ "snailhu@yahoo.com" ]
snailhu@yahoo.com
e85b6f74f82367ba1374c83681d74b8de41ac538
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/appbrand/widget/c$2.java
d536ef29d70bbfa08744334b2b424c8099431d13
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
376
java
package com.tencent.mm.plugin.appbrand.widget; import android.view.View; import android.view.View.OnClickListener; class c$2 implements OnClickListener { final /* synthetic */ c jUG; public c$2(c cVar) { this.jUG = cVar; } public final void onClick(View view) { this.jUG.lR(c.b(this.jUG).indexOfChild(view)); c.c(this.jUG); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
dd775acc9956492a31e704d1064462b77e2336d9
dbc6ff39c4777a6afe65086e501979136c75a9ac
/app/src/main/java/net/doyouhike/app/bbs/biz/openapi/request/tags/UserTagsPut.java
46ad841a3d14943c781981db063d5b5b765103e5
[]
no_license
dongodngtang/jianghu_android
9aef38bf2272b9ef500a1f87e3fa902f16b065e0
484d4f6e58adec61dd4e602e511b5c3ef86f5575
refs/heads/master
2021-05-10T07:50:45.068221
2018-01-25T04:09:51
2018-01-25T04:09:51
118,858,323
0
1
null
null
null
null
UTF-8
Java
false
false
1,041
java
package net.doyouhike.app.bbs.biz.openapi.request.tags; import com.google.gson.annotations.Expose; import com.yolanda.nohttp.RequestMethod; import net.doyouhike.app.bbs.biz.newnetwork.model.base.BasePostRequest; import net.doyouhike.app.bbs.biz.newnetwork.model.bean.BaseTag; import net.doyouhike.app.bbs.biz.openapi.OpenApiUrl; import java.util.List; /** * 作者:luochangdong on 16/10/14 * 描述: */ public class UserTagsPut extends BasePostRequest { private String user_id; public UserTagsPut(String user_id) { this.user_id = user_id; setRequestMethod(RequestMethod.PUT); } @Override public String getSubUrl() { return OpenApiUrl.USERS + user_id + "/subscriptions"; } /** * id : 102 * type : type */ @Expose private List<BaseTag> subscriptions; public List<BaseTag> getSubscriptions() { return subscriptions; } public void setSubscriptions(List<BaseTag> subscriptions) { this.subscriptions = subscriptions; } }
[ "2270333671@qq.com" ]
2270333671@qq.com
32ec3109c79252aea8e90e18c7291f205771d184
e82c1473b49df5114f0332c14781d677f88f363f
/MED-CLOUD/med-data/src/main/java/nta/med/data/dao/medi/xrt/Xrt0202Repository.java
b67f3532b6638a6e54361cc2b731a61422d2d049
[]
no_license
zhiji6/mih
fa1d2279388976c901dc90762bc0b5c30a2325fc
2714d15853162a492db7ea8b953d5b863c3a8000
refs/heads/master
2023-08-16T18:35:19.836018
2017-12-28T09:33:19
2017-12-28T09:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,448
java
package nta.med.data.dao.medi.xrt; import nta.med.core.domain.xrt.Xrt0202; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; /** * @author dainguyen. */ @Repository public interface Xrt0202Repository extends JpaRepository<Xrt0202, Long>, Xrt0202RepositoryCustom { @Modifying @Query("UPDATE Xrt0202 SET updId = :q_user_id " + ", updDate = SYSDATE(), tubeVol = :f_tube_vol " + " , tubeCur = :f_tube_cur, xrayTime = :f_xray_time " + " , tubeCurTime = :f_tube_cur_time, irradiationTime = :f_irradiation_time " + ", xrayDistance = :f_xray_distance " + "WHERE hospCode = :f_hosp_code AND fkxrt0201 = :f_fkxrt0201 " + "AND xrayCodeIdx = :f_xray_code_idx ") public Integer updateXRT0201U00RadioSaveLayout(@Param("f_hosp_code") String hospCode,@Param("q_user_id") String userId, @Param("f_tube_vol") String tubeVol,@Param("f_tube_cur") String tubeCur,@Param("f_xray_time") String xrayTime, @Param("f_tube_cur_time") String tubeCurTime,@Param("f_irradiation_time") String irradiationTime, @Param("f_xray_distance") String xrayDistance,@Param("f_fkxrt0201") Double fkxrt0201, @Param("f_xray_code_idx") String xrayCodeIdx); }
[ "duc_nt@nittsusystem-vn.com" ]
duc_nt@nittsusystem-vn.com
edc2924c56e17455c456ae5079cef8d52b38b164
23d21d575da06d8a0f0c3a266915df321b5154eb
/templates/reactive-systems/lines-sample-api/src/main/java/lines/module/sample/repository/BoardRepository.java
bac36067bf3b51cbe95bdb322dfdeec21903bc68
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
688
java
package lines.module.sample.repository; import lines.module.sample.model.Board; import org.springframework.stereotype.Repository; import reactor.core.publisher.Mono; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @Repository public class BoardRepository { private long generatedId = 0L; private Map<Long, Board> boardMap = new ConcurrentHashMap<>(); public void saveAll(List<Board> boards) { boards.forEach(board -> { board.setId(++generatedId); boardMap.put(board.getId(), board); }); } public Mono<Board> findOne(Long id) { return Mono.just(boardMap.get(id)); } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
65bcc725022ddfe788bd0f92fa5089946b80d601
e465358040c4de9d5dc9a3e1e08fa4eb27547810
/asterixdb/asterix-app/src/test/java/edu/uci/ics/asterix/test/aql/AQLTestCase.java
2236f492d725260286c7d10c4ffbce5cebe9c6ed
[]
no_license
zhaosheng-zhang/cdnc
84ff7511b57c260e070fc0f3f1d941f39101116e
bc436a948ab1a7eb5df9857916592c7e7b39798c
refs/heads/master
2016-08-04T18:43:31.480569
2013-10-15T17:29:04
2013-10-15T17:29:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,457
java
/* * Copyright 2009-2013 by The Regents of the University of California * 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 from * * 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 edu.uci.ics.asterix.test.aql; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.Reader; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.util.List; import junit.framework.TestCase; import org.junit.Test; import edu.uci.ics.asterix.aql.base.Statement; import edu.uci.ics.asterix.aql.parser.AQLParser; import edu.uci.ics.asterix.aql.parser.ParseException; import edu.uci.ics.asterix.common.config.GlobalConfig; import edu.uci.ics.asterix.common.exceptions.AsterixException; import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException; public class AQLTestCase extends TestCase { private File queryFile; AQLTestCase(File queryFile) { super("testAQL"); this.queryFile = queryFile; } @Test public void testAQL() throws UnsupportedEncodingException, FileNotFoundException, ParseException, AsterixException, AlgebricksException { Reader fis = new BufferedReader(new InputStreamReader(new FileInputStream(queryFile), "UTF-8")); AQLParser parser = new AQLParser(fis); List<Statement> statements; GlobalConfig.ASTERIX_LOGGER.info(queryFile.toString()); try { statements = parser.Statement(); } catch (ParseException e) { GlobalConfig.ASTERIX_LOGGER.warning("Failed while testing file " + fis); StringWriter sw = new StringWriter(); PrintWriter writer = new PrintWriter(sw); e.printStackTrace(writer); GlobalConfig.ASTERIX_LOGGER.warning(sw.toString()); throw new ParseException("Parsing " + queryFile.toString()); } } }
[ "happily84@gmail.com" ]
happily84@gmail.com
90927a70e5160036d0bd1a27c927a723e95b2778
09ca502b44715c987b65fc3e06d41e60d4d08bc0
/bonita-tests/src/main/java/org/ow2/bonita/facade/rest/httpurlconnection/api/RESTHttpURLConnectionCommandAPI.java
d62c3b0a3f49d3b1d093d245c25b496a31bbd857
[]
no_license
fivegg/bbonita-runtime-5-10-1
29b51fe1fd18c7307809c50c28f3a33aab63786d
585aa4ca3cf14771f03d087cfb82237aff99897d
refs/heads/master
2016-09-05T09:47:31.631120
2013-12-20T03:03:11
2013-12-20T03:03:11
14,005,787
1
0
null
null
null
null
UTF-8
Java
false
false
1,490
java
/** * Copyright (C) 2010 BonitaSoft S.A. * BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble * This library is free software; you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Foundation * version 2.1 of the License. * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License along with this * program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301, USA. **/ package org.ow2.bonita.facade.rest.httpurlconnection.api; import java.net.HttpURLConnection; import org.ow2.bonita.facade.rest.httpurlconnection.HttpURLConnectionUtil; /** * * @author Elias Ricken de Medeiros * */ public class RESTHttpURLConnectionCommandAPI { public static HttpURLConnection execute (final String command, final String options, final String restUser, final String restPswd) throws Exception{ final String uri = "API/commandAPI/execute"; final String parameters = "command=" + command + "&options=" + options; return HttpURLConnectionUtil.getConnection(uri, parameters, "application/x-www-form-urlencoded", null, restUser, restPswd); } }
[ "fivegg@163.com" ]
fivegg@163.com
d828e25a5f9425b9987bb8598832592a31be085c
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/google/android/gms/internal/measurement/zzkj.java
a8ddf01e11b14b4e2a5f5f5251832895b4aeb049
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,802
java
package com.google.android.gms.internal.measurement; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.plugin.appbrand.jsapi.JsApiGetABTestConfig; public final class zzkj extends zzaby<zzkj> { private static volatile zzkj[] zzasl; public String name; public Boolean zzasm; public Boolean zzasn; public Integer zzaso; public zzkj() { AppMethodBeat.m2504i(69683); this.name = null; this.zzasm = null; this.zzasn = null; this.zzaso = null; this.zzbww = null; this.zzbxh = -1; AppMethodBeat.m2505o(69683); } public static zzkj[] zzli() { if (zzasl == null) { synchronized (zzacc.zzbxg) { if (zzasl == null) { zzasl = new zzkj[0]; } } } return zzasl; } public final boolean equals(Object obj) { AppMethodBeat.m2504i(69684); if (obj == this) { AppMethodBeat.m2505o(69684); return true; } else if (obj instanceof zzkj) { zzkj zzkj = (zzkj) obj; if (this.name == null) { if (zzkj.name != null) { AppMethodBeat.m2505o(69684); return false; } } else if (!this.name.equals(zzkj.name)) { AppMethodBeat.m2505o(69684); return false; } if (this.zzasm == null) { if (zzkj.zzasm != null) { AppMethodBeat.m2505o(69684); return false; } } else if (!this.zzasm.equals(zzkj.zzasm)) { AppMethodBeat.m2505o(69684); return false; } if (this.zzasn == null) { if (zzkj.zzasn != null) { AppMethodBeat.m2505o(69684); return false; } } else if (!this.zzasn.equals(zzkj.zzasn)) { AppMethodBeat.m2505o(69684); return false; } if (this.zzaso == null) { if (zzkj.zzaso != null) { AppMethodBeat.m2505o(69684); return false; } } else if (!this.zzaso.equals(zzkj.zzaso)) { AppMethodBeat.m2505o(69684); return false; } if (this.zzbww != null && !this.zzbww.isEmpty()) { boolean equals = this.zzbww.equals(zzkj.zzbww); AppMethodBeat.m2505o(69684); return equals; } else if (zzkj.zzbww == null || zzkj.zzbww.isEmpty()) { AppMethodBeat.m2505o(69684); return true; } else { AppMethodBeat.m2505o(69684); return false; } } else { AppMethodBeat.m2505o(69684); return false; } } public final int hashCode() { int i = 0; AppMethodBeat.m2504i(69685); int hashCode = ((this.zzaso == null ? 0 : this.zzaso.hashCode()) + (((this.zzasn == null ? 0 : this.zzasn.hashCode()) + (((this.zzasm == null ? 0 : this.zzasm.hashCode()) + (((this.name == null ? 0 : this.name.hashCode()) + ((getClass().getName().hashCode() + JsApiGetABTestConfig.CTRL_INDEX) * 31)) * 31)) * 31)) * 31)) * 31; if (!(this.zzbww == null || this.zzbww.isEmpty())) { i = this.zzbww.hashCode(); } hashCode += i; AppMethodBeat.m2505o(69685); return hashCode; } /* Access modifiers changed, original: protected|final */ public final int zza() { AppMethodBeat.m2504i(69687); int zza = super.zza(); if (this.name != null) { zza += zzabw.zzc(1, this.name); } if (this.zzasm != null) { this.zzasm.booleanValue(); zza += zzabw.zzaq(2) + 1; } if (this.zzasn != null) { this.zzasn.booleanValue(); zza += zzabw.zzaq(3) + 1; } if (this.zzaso != null) { zza += zzabw.zzf(4, this.zzaso.intValue()); } AppMethodBeat.m2505o(69687); return zza; } public final void zza(zzabw zzabw) { AppMethodBeat.m2504i(69686); if (this.name != null) { zzabw.zzb(1, this.name); } if (this.zzasm != null) { zzabw.zza(2, this.zzasm.booleanValue()); } if (this.zzasn != null) { zzabw.zza(3, this.zzasn.booleanValue()); } if (this.zzaso != null) { zzabw.zze(4, this.zzaso.intValue()); } super.zza(zzabw); AppMethodBeat.m2505o(69686); } public final /* synthetic */ zzace zzb(zzabv zzabv) { AppMethodBeat.m2504i(69688); while (true) { int zzuw = zzabv.zzuw(); switch (zzuw) { case 0: AppMethodBeat.m2505o(69688); break; case 10: this.name = zzabv.readString(); continue; case 16: this.zzasm = Boolean.valueOf(zzabv.zzux()); continue; case 24: this.zzasn = Boolean.valueOf(zzabv.zzux()); continue; case 32: this.zzaso = Integer.valueOf(zzabv.zzuy()); continue; default: if (!super.zza(zzabv, zzuw)) { AppMethodBeat.m2505o(69688); break; } continue; } } return this; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
641c5090090d642f96debc6b1bb8edd63f8a63a3
6d109557600329b936efe538957dfd0a707eeafb
/src/com/google/api/ads/dfp/v201311/CustomTargetingValueAction.java
b0d1f01a9ee6a2e3101b221c5de0d57abd7ef506
[ "Apache-2.0" ]
permissive
google-code-export/google-api-dfp-java
51b0142c19a34cd822a90e0350eb15ec4347790a
b852c716ef6e5d300363ed61e15cbd6242fbac85
refs/heads/master
2020-05-20T03:52:00.420915
2013-12-19T23:08:40
2013-12-19T23:08:40
32,133,590
0
0
null
null
null
null
UTF-8
Java
false
false
5,070
java
/** * CustomTargetingValueAction.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.google.api.ads.dfp.v201311; /** * Represents the actions that can be performed on {@link CustomTargetingValue} * objects. */ public abstract class CustomTargetingValueAction implements java.io.Serializable { /* Indicates that this instance is a subtype of CustomTargetingValueAction. * Although this field is returned in the response, it is ignored on * input * and cannot be selected. Specify xsi:type instead. */ private java.lang.String customTargetingValueActionType; public CustomTargetingValueAction() { } public CustomTargetingValueAction( java.lang.String customTargetingValueActionType) { this.customTargetingValueActionType = customTargetingValueActionType; } /** * Gets the customTargetingValueActionType value for this CustomTargetingValueAction. * * @return customTargetingValueActionType * Indicates that this instance is a subtype of CustomTargetingValueAction. * Although this field is returned in the response, it is ignored on * input * and cannot be selected. Specify xsi:type instead. */ public java.lang.String getCustomTargetingValueActionType() { return customTargetingValueActionType; } /** * Sets the customTargetingValueActionType value for this CustomTargetingValueAction. * * @param customTargetingValueActionType * Indicates that this instance is a subtype of CustomTargetingValueAction. * Although this field is returned in the response, it is ignored on * input * and cannot be selected. Specify xsi:type instead. */ public void setCustomTargetingValueActionType(java.lang.String customTargetingValueActionType) { this.customTargetingValueActionType = customTargetingValueActionType; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CustomTargetingValueAction)) return false; CustomTargetingValueAction other = (CustomTargetingValueAction) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.customTargetingValueActionType==null && other.getCustomTargetingValueActionType()==null) || (this.customTargetingValueActionType!=null && this.customTargetingValueActionType.equals(other.getCustomTargetingValueActionType()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getCustomTargetingValueActionType() != null) { _hashCode += getCustomTargetingValueActionType().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CustomTargetingValueAction.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "CustomTargetingValueAction")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("customTargetingValueActionType"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "CustomTargetingValueAction.Type")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ 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.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ 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.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "api.arogal@gmail.com@e5600b00-1bfd-11df-acd4-e1cde50d4098" ]
api.arogal@gmail.com@e5600b00-1bfd-11df-acd4-e1cde50d4098
bf0d42e658c7cf642d43f206827df4a8e6d8f3a5
b67dc1ca27ecdfc5996dead4ca139cdd5db11756
/app/src/main/java/com/zzu/fixedassets/service/ServiceStore.java
d254196afbbb0a0f8b291c450b637edab6443964
[]
no_license
Mersens/fixedassets
58225e70f900ff925d18edae428f16db59adaa69
b7e1ae7e548840c4956c63408b08b90f1944a7fb
refs/heads/master
2021-01-11T13:43:31.435013
2017-06-22T10:09:24
2017-06-22T10:09:24
95,102,411
1
0
null
null
null
null
UTF-8
Java
false
false
892
java
package com.zzu.fixedassets.service; import com.zzu.fixedassets.entity.ResultsEntity; import io.reactivex.Observable; import okhttp3.ResponseBody; import retrofit2.http.GET; import retrofit2.http.Headers; import retrofit2.http.POST; import retrofit2.http.Path; import retrofit2.http.Url; /** * Created by Mersens on 2016/9/28. */ public interface ServiceStore { @Headers({ "Content-Type: text/xml; charset=utf-8", "SOAPAction: http://tempuri.org/NewsInquiry" }) @POST("WebServices/EhomeWebservice.asmx") Observable<ResponseBody> getNews(@retrofit2.http.Body String str); @GET Observable<ResponseBody> download(@Url String fileUrl); @GET("http://gank.io/api/data/{type}/{pageSize}/{pageIndex}") Observable<ResultsEntity> getInfo(@Path("type") String type, @Path("pageSize") String pageSize, @Path("pageIndex") String pageIndex); }
[ "626168564@qq.com" ]
626168564@qq.com
b91721740d4cc1bd6dcae7288b2d5f7d2783902c
8e9e10734775849c1049840727b63de749c06aae
/src/java/com/webify/shared/edi/model/hipaa837i/beans/SegmentNM1_4.java
65d371730a0085c748b792b94c84a59cd0c1333b
[]
no_license
mperham/edistuff
6ee665082b7561d73cb2aa49e7e4b0142b14eced
ebb03626514d12e375fa593e413f1277a614ab76
refs/heads/master
2023-08-24T00:17:34.286847
2020-05-04T21:31:42
2020-05-04T21:31:42
261,299,559
4
0
null
null
null
null
UTF-8
Java
false
false
5,498
java
package com.webify.shared.edi.model.hipaa837i.beans; import com.webify.shared.edi.model.*; import java.io.*; import java.util.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; /* * AUTOGENERATED FILE - DO NOT EDIT!!! */ public class SegmentNM1_4 implements EDIElement { private static final Log log = LogFactory.getLog(SegmentNM1_4.class); public static final String SEGMENT_NAME = "NM1"; public static final int FIELD_COUNT = 9; private int lineNumber = 0; public int getLineNumber() { return lineNumber; } /** Do NOT use this method - it is not public by choice... */ public void setLineNumber(int foo) { lineNumber = foo; } private int ordinal = 0; public int getOrdinal() { return ordinal; } void setOrdinal(int ord) { ordinal = ord; } // Fields private String Nm101; public String getNm101() { return Nm101; } public void setNm101(String val) { if (val == null) { throw new NullPointerException("Field 'NM101' may not be null"); } if (Field98.validateValue(val)) { Nm101 = val; } else { throw new IllegalArgumentException("Field 'NM101' cannot have value: " + val); } } private String Nm102; public String getNm102() { return Nm102; } public void setNm102(String val) { if (val == null) { throw new NullPointerException("Field 'NM102' may not be null"); } if (Field1065.validateValue(val)) { Nm102 = val; } else { throw new IllegalArgumentException("Field 'NM102' cannot have value: " + val); } } private String Nm103; public String getNm103() { return Nm103; } public void setNm103(String val) { Nm103 = val; } private String Nm104; public String getNm104() { return Nm104; } public void setNm104(String val) { Nm104 = val; } private String Nm105; public String getNm105() { return Nm105; } public void setNm105(String val) { Nm105 = val; } private String Nm107; public String getNm107() { return Nm107; } public void setNm107(String val) { Nm107 = val; } private String Nm108; public String getNm108() { return Nm108; } public void setNm108(String val) { if (val == null) { throw new NullPointerException("Field 'NM108' may not be null"); } if (Field66.validateValue(val)) { Nm108 = val; } else { throw new IllegalArgumentException("Field 'NM108' cannot have value: " + val); } } private String Nm109; public String getNm109() { return Nm109; } public void setNm109(String val) { Nm109 = val; } public void parse(EDIInputStream eis) throws IOException { lineNumber = eis.getCurrentSegmentNumber(); if (log.isDebugEnabled()) log.debug("Starting segment NM1 on line " + lineNumber); String[] fields = eis.readSegment(SEGMENT_NAME, FIELD_COUNT); Nm101 = eis.getStringValue(fields, 1, 2, 3, true); Field98.validateInputValue(eis, "NM101", Nm101, ordinal, 1); if (Nm101 == null || "".equals(fields[1].trim())) { eis.addError("Field 'NM101' missing"); } Nm102 = eis.getStringValue(fields, 2, 1, 1, true); Field1065.validateInputValue(eis, "NM102", Nm102, ordinal, 2); if (Nm102 == null || "".equals(fields[2].trim())) { eis.addError("Field 'NM102' missing"); } Nm103 = eis.getStringValue(fields, 3, 1, 35, true); if (Nm103 == null || "".equals(fields[3].trim())) { eis.addError("Field 'NM103' missing"); } Nm104 = eis.getStringValue(fields, 4, 1, 25, false); Nm105 = eis.getStringValue(fields, 5, 1, 25, false); Nm107 = eis.getStringValue(fields, 7, 1, 10, false); Nm108 = eis.getStringValue(fields, 8, 1, 2, true); Field66.validateInputValue(eis, "NM108", Nm108, ordinal, 8); if (Nm108 == null || "".equals(fields[8].trim())) { eis.addError("Field 'NM108' missing"); } Nm109 = eis.getStringValue(fields, 9, 2, 80, true); if (Nm109 == null || "".equals(fields[9].trim())) { eis.addError("Field 'NM109' missing"); } validate(eis); } protected void validate(EDIInputStream eis) { // PAIRED { int setCount = 0; if (Nm108 != null) setCount++; if (Nm109 != null) setCount++; if (setCount > 0 && setCount < 2) { eis.addError("If any of the following properties are set, all must be set: Nm108, Nm109"); } } } public void emit(EDIOutputStream eos) throws IOException { eos.startSegment("NM1"); if (Nm101 == null) { eos.addError("Emitting null mandatory field 'NM101'"); } eos.writeField(Nm101); if (Nm102 == null) { eos.addError("Emitting null mandatory field 'NM102'"); } eos.writeField(Nm102); if (Nm103 == null) { eos.addError("Emitting null mandatory field 'NM103'"); } eos.writeField(Nm103); eos.writeField(Nm104); eos.writeField(Nm105); eos.writeNullField(); eos.writeField(Nm107); if (Nm108 == null) { eos.addError("Emitting null mandatory field 'NM108'"); } eos.writeField(Nm108); if (Nm109 == null) { eos.addError("Emitting null mandatory field 'NM109'"); } eos.writeField(Nm109); eos.writeNullField(); eos.writeNullField(); eos.endSegment(); } public EDIElement createCopy() { SegmentNM1_4 copy = new SegmentNM1_4(); copy.setLineNumber(this.lineNumber); copy.Nm101 = this.Nm101; copy.Nm102 = this.Nm102; copy.Nm103 = this.Nm103; copy.Nm104 = this.Nm104; copy.Nm105 = this.Nm105; copy.Nm107 = this.Nm107; copy.Nm108 = this.Nm108; copy.Nm109 = this.Nm109; return copy; } }
[ "mperham@gmail.com" ]
mperham@gmail.com