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
221357726057dcfefceb31ba29e914a1f5bd285e
c7cfe234c04cc296a38133acc9ad8fbf579adf3a
/src/main/java/org/jabref/gui/fieldeditors/BibtexKeyEditorViewModel.java
8c7147f81d00e666a1648687f0543dfff3c4062a
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
cassianomaia/JabRef-ES2
4c02891cf1fa671e82ff64dcaed3eac01c4fcbf6
2fb2a62ff5bb57407fc407b1380e717e4ce1ad5e
refs/heads/master
2020-03-18T06:38:24.854070
2018-07-10T13:47:58
2018-07-10T13:47:58
134,407,216
2
3
MIT
2018-07-10T13:47:59
2018-05-22T11:46:21
Java
UTF-8
Java
false
false
1,370
java
package org.jabref.gui.fieldeditors; import javax.swing.undo.UndoManager; import org.jabref.gui.autocompleter.AutoCompleteSuggestionProvider; import org.jabref.gui.undo.UndoableKeyChange; import org.jabref.logic.bibtexkeypattern.BibtexKeyGenerator; import org.jabref.logic.bibtexkeypattern.BibtexKeyPatternPreferences; import org.jabref.logic.integrity.FieldCheckers; import org.jabref.model.database.BibDatabaseContext; public class BibtexKeyEditorViewModel extends AbstractEditorViewModel { private BibtexKeyPatternPreferences keyPatternPreferences; private BibDatabaseContext bibDatabaseContext; private UndoManager undoManager; public BibtexKeyEditorViewModel(String fieldName, AutoCompleteSuggestionProvider<?> suggestionProvider, FieldCheckers fieldCheckers, BibtexKeyPatternPreferences keyPatternPreferences, BibDatabaseContext bibDatabaseContext, UndoManager undoManager) { super(fieldName, suggestionProvider, fieldCheckers); this.keyPatternPreferences = keyPatternPreferences; this.bibDatabaseContext = bibDatabaseContext; this.undoManager = undoManager; } public void generateKey() { new BibtexKeyGenerator(bibDatabaseContext, keyPatternPreferences) .generateAndSetKey(entry) .ifPresent(change -> undoManager.addEdit(new UndoableKeyChange(change))); } }
[ "cassmala@gmail.com" ]
cassmala@gmail.com
986838ec82a6b82212f0a9695ba6a375e02ffb74
22cb683b3657934dc1f24c7e7fce03d87775f4f5
/biovigilans_felles/src/main/java/no/naks/biovigilans/felles/control/AnnenKomplikasjonWebServiceImpl.java
e0dda8b4a245dc576712b4c34580656eb40b7fd4
[]
no_license
olufjen/biovigilans
5c9941c11edbd78cb8106adf4d3173eafef3e547
c6669faa498d1f1966b93b5ee967808b54cdaaf9
refs/heads/master
2021-03-13T00:12:42.716686
2019-08-14T16:48:07
2019-08-14T16:48:07
34,103,970
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
package no.naks.biovigilans.felles.control; import no.naks.biovigilans.model.Annenkomplikasjon; import no.naks.biovigilans.service.AnnenKomplikasjonTableService; import no.naks.biovigilans.felles.model.AnnenKomplikasjonwebModel; /** * Denne singleton tjenesten benyttes til å lagre andre typer hendelser ved bruk av forretningslaget * @author olj * */ public class AnnenKomplikasjonWebServiceImpl implements AnnenKomplikasjonWebService { /** * Forretningslaget singleton tjeneste */ private AnnenKomplikasjonTableService annenKomplikasjonTableService; public AnnenKomplikasjonTableService getAnnenKomplikasjonTableService() { return annenKomplikasjonTableService; } public void setAnnenKomplikasjonTableService( AnnenKomplikasjonTableService annenKomplikasjonTableService) { this.annenKomplikasjonTableService = annenKomplikasjonTableService; } public void saveAnnenKomplikasjon(AnnenKomplikasjonwebModel annenKomplikasjonWebModel){ annenKomplikasjonTableService.saveAnnenKomplikasjon(annenKomplikasjonWebModel.getAnnenKomplikasjon()); } public void setAlterativeSource(String key){ annenKomplikasjonTableService.setAlterativeSource(key); } }
[ "olufjen@gmail.com" ]
olufjen@gmail.com
c49bb893b230f1df6cf3ba1a737734f2c8740536
13c371fffd8c0ecd5e735755e7337a093ac00e30
/com/planet_ink/coffee_mud/Abilities/Spells/Spell_WallOfForce.java
dbef9d134053d8d7831067b6ab4df9224f30f59f
[ "Apache-2.0" ]
permissive
z3ndrag0n/CoffeeMud
e6b0c58953e47eb58544039b0781e4071a016372
50df765daee37765e76a1632a04c03f8a96d8f40
refs/heads/master
2020-09-15T10:27:26.511725
2019-11-18T15:41:42
2019-11-18T15:41:42
223,416,916
1
0
Apache-2.0
2019-11-22T14:09:54
2019-11-22T14:09:53
null
UTF-8
Java
false
false
6,423
java
package com.planet_ink.coffee_mud.Abilities.Spells; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2002-2019 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Spell_WallOfForce extends Spell { @Override public String ID() { return "Spell_WallOfForce"; } private final static String localizedName = CMLib.lang().L("Wall of Force"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Wall of Force)"); @Override public String displayText() { return localizedStaticDisplay; } @Override public int maxRange() { return adjustedMaxInvokerRange(10); } @Override public int minRange() { return 1; } @Override public int abstractQuality() { return Ability.QUALITY_OK_SELF; } @Override public int enchantQuality() { return Ability.QUALITY_INDIFFERENT; } @Override protected int canAffectCode() { return CAN_ITEMS; } @Override protected int canTargetCode() { return 0; } @Override public int classificationCode() { return Ability.ACODE_SPELL|Ability.DOMAIN_CONJURATION; } protected Item theWall=null; @Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if((affected==null)||(!(affected instanceof Item))) return true; final MOB mob=msg.source(); if((invoker!=null) &&(mob.isInCombat()) &&((mob.getVictim()==invoker)||(mob==invoker)) &&(mob.rangeToTarget()>=1) &&(msg.target() instanceof MOB) &&((msg.targetMajor()&CMMsg.MASK_MALICIOUS)>0)) { if(((msg.tool() instanceof Ability)&&(msg.sourceMinor()!=CMMsg.TYP_TEACH)) ||((msg.targetMinor()==CMMsg.TYP_WEAPONATTACK) &&(msg.tool() instanceof Weapon) &&(!((Weapon)msg.tool()).amWearingAt(Wearable.IN_INVENTORY)) &&(((Weapon)msg.tool()).weaponClassification()==Weapon.CLASS_RANGED))) { mob.tell(L("Malice neither escapes nor enters the wall of force.")); if(mob.isMonster() && (msg.tool() instanceof Item)) CMLib.commands().postRemove(mob,(Item)msg.tool(),true); return false; } if((msg.sourceMinor()==CMMsg.TYP_ADVANCE) &&((mob==invoker)||(mob.rangeToTarget()==1))) { if(mob!=invoker) { final CMMsg msg2=CMClass.getMsg(mob,null,CMMsg.MSG_WEAPONATTACK,L("^F^<FIGHT^><S-NAME> attempt(s) to penetrate the wall of force and fail(s).^</FIGHT^>^?")); CMLib.color().fixSourceFightColor(msg2); if(mob.location().okMessage(mob,msg2)) mob.location().send(mob,msg2); } return false; } } return super.okMessage(myHost,msg); } @Override public void unInvoke() { super.unInvoke(); if(canBeUninvoked()) { if((theWall!=null) &&(invoker!=null) &&(theWall.owner()!=null) &&(theWall.owner() instanceof Room) &&(((Room)theWall.owner()).isContent(theWall))) { ((Room)theWall.owner()).showHappens(CMMsg.MSG_OK_VISUAL,L("The wall of force is gone.")); final Item wall=theWall; theWall=null; wall.destroy(); } } } @Override public boolean tick(final Tickable ticking, final int tickID) { if(tickID==Tickable.TICKID_MOB) { if((invoker!=null) &&(theWall!=null) &&(invoker.location()!=null) &&(!invoker.location().isContent(theWall))) unInvoke(); } return super.tick(ticking,tickID); } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { if((!mob.isInCombat())||(mob.rangeToTarget()<1)) { mob.tell(L("You really should be in ranged combat to cast this.")); return false; } for(int i=0;i<mob.location().numItems();i++) { final Item I=mob.location().getItem(i); if((I!=null)&&(I.fetchEffect(ID())!=null)) { mob.tell(L("There is already a wall of force here.")); return false; } } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final Physical target = mob.location(); final boolean success=proficiencyCheck(mob,0,auto); if(success) { final CMMsg msg = CMClass.getMsg(mob, target, this,verbalCastCode(mob,target,auto),auto?L("An impenetrable wall of force appears!"):L("^S<S-NAME> conjur(s) up a impenetrable wall of force!^?")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); final Item I=CMClass.getItem("GenItem"); I.setName(L("a wall of force")); I.setDisplayText(L("an impenetrable wall of force surrounds @x1",mob.name())); I.setDescription(L("It`s tough, that's for sure.")); I.setMaterial(RawMaterial.RESOURCE_NOTHING); CMLib.flags().setGettable(I,false); I.recoverPhyStats(); mob.location().addItem(I); theWall=I; beneficialAffect(mob,I,asLevel,10); } } else return beneficialWordsFizzle(mob,null,L("<S-NAME> incant(s), but the magic fizzles.")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
97344a359c98e88d9408bb6d4353f0c6fb0ba729
a0d013dcae26dd77e4a38b9a801c1d1ddf3ed784
/src/test/java/com/oscar3/web/repository/CustomAuditEventRepositoryIntTest.java
f9e688022007220519db5b782da83138b9b0c8f9
[]
no_license
Tonterias2/oscar3
68d4080118919897e583d5738d16a45cd4333d08
fc450d47214290135d044f9ec0c64532b3e62543
refs/heads/master
2020-03-22T12:22:24.470972
2018-07-06T22:48:56
2018-07-06T22:48:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,566
java
package com.oscar3.web.repository; import com.oscar3.web.Oscar3App; import com.oscar3.web.config.Constants; import com.oscar3.web.config.audit.AuditEventConverter; import com.oscar3.web.domain.PersistentAuditEvent; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpSession; import java.time.Instant; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; import static com.oscar3.web.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; /** * Test class for the CustomAuditEventRepository class. * * @see CustomAuditEventRepository */ @RunWith(SpringRunner.class) @SpringBootTest(classes = Oscar3App.class) @Transactional public class CustomAuditEventRepositoryIntTest { @Autowired private PersistenceAuditEventRepository persistenceAuditEventRepository; @Autowired private AuditEventConverter auditEventConverter; private CustomAuditEventRepository customAuditEventRepository; private PersistentAuditEvent testUserEvent; private PersistentAuditEvent testOtherUserEvent; private PersistentAuditEvent testOldUserEvent; @Before public void setup() { customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); persistenceAuditEventRepository.deleteAll(); Instant oneHourAgo = Instant.now().minusSeconds(3600); testUserEvent = new PersistentAuditEvent(); testUserEvent.setPrincipal("test-user"); testUserEvent.setAuditEventType("test-type"); testUserEvent.setAuditEventDate(oneHourAgo); Map<String, String> data = new HashMap<>(); data.put("test-key", "test-value"); testUserEvent.setData(data); testOldUserEvent = new PersistentAuditEvent(); testOldUserEvent.setPrincipal("test-user"); testOldUserEvent.setAuditEventType("test-type"); testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); testOtherUserEvent = new PersistentAuditEvent(); testOtherUserEvent.setPrincipal("other-test-user"); testOtherUserEvent.setAuditEventType("test-type"); testOtherUserEvent.setAuditEventDate(oneHourAgo); } @Test public void addAuditEvent() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); } @Test public void addAuditEventTruncateLargeData() { Map<String, Object> data = new HashMap<>(); StringBuilder largeData = new StringBuilder(); for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { largeData.append("a"); } data.put("test-key", largeData); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); String actualData = persistentAuditEvent.getData().get("test-key"); assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); assertThat(actualData).isSubstringOf(largeData); assertThat(persistentAuditEvent.getAuditEventDate()).isEqualTo(event.getTimestamp()); } @Test public void testAddEventWithWebAuthenticationDetails() { HttpSession session = new MockHttpSession(null, "test-session-id"); MockHttpServletRequest request = new MockHttpServletRequest(); request.setSession(session); request.setRemoteAddr("1.2.3.4"); WebAuthenticationDetails details = new WebAuthenticationDetails(request); Map<String, Object> data = new HashMap<>(); data.put("test-key", details); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); } @Test public void testAddEventWithNullData() { Map<String, Object> data = new HashMap<>(); data.put("test-key", null); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); } @Test public void addAuditEventWithAnonymousUser() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } @Test public void addAuditEventWithAuthorizationFailureType() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } }
[ "ecorreos@htomail.com" ]
ecorreos@htomail.com
bc4d9f13a1f0570ccd451c1ad851ed3c640f327e
4ecc390ae66bbb8bad8a6bba636fd19702205d34
/minecraft 1.8/cpf.java
ed7495fb23494eead91c054b456cddb833fd7c2c
[]
no_license
project-ion/Decompile-Minecraft
d9c967e57ff7d24ada8c4c49f832dac25f18bb9e
12882633319383b7652b475b4f08b6f72acdddc4
refs/heads/master
2021-01-23T15:28:54.832366
2014-09-20T09:57:54
2014-09-20T09:57:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
512
java
/* 1: */ class cpf /* 2: */ extends csm /* 3: */ { /* 4: */ cpf(cpe paramcpe, cqv paramcqv) /* 5: */ { /* 6:17 */ super(paramcqv); /* 7: */ } /* 8: */ /* 9: */ protected void a() /* 10: */ { /* 11:20 */ this.c = new cbu(0.5F); /* 12:21 */ this.d = new cbu(1.0F); /* 13: */ } /* 14: */ } /* Location: C:\Users\Hugo Haldi\Desktop\Decompile Minecraft\1.8.jar * Qualified Name: cpf * JD-Core Version: 0.7.0.1 */
[ "projection-team@hotmail.com" ]
projection-team@hotmail.com
f37da182a141ecbdc60ef76bfe348a7a606d084b
20d7a12575ffa0b3b3095a83a16f6c0b6a02e133
/src/main/java/cn/gtmap/estateplat/server/service/impl/CreatProjectHmZydjServiceImpl.java
add8792622afeaa484dad12aa6d014c59d99925b
[]
no_license
MrLiJun88/estateplat-service
937e52cb81951e411a0bc4c8317d93a3455227f8
0ba27a9251ce2cd712efe76f8cbe0b769b970cc9
refs/heads/master
2022-12-07T13:32:32.727808
2020-08-13T04:07:12
2020-08-13T04:07:12
287,170,568
0
0
null
null
null
null
UTF-8
Java
false
false
6,959
java
package cn.gtmap.estateplat.server.service.impl; import cn.gtmap.estateplat.core.ex.AppException; import cn.gtmap.estateplat.model.server.core.*; import cn.gtmap.estateplat.server.core.service.*; import cn.gtmap.estateplat.server.model.InitVoFromParm; import cn.gtmap.estateplat.server.service.CreatProjectService; import cn.gtmap.estateplat.server.utils.Constants; import cn.gtmap.estateplat.utils.CommonUtil; import com.gtis.config.AppConfig; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.HashMap; import java.util.List; /** * . * <p/> * 海门转移登记创建项目实现类(由于房屋系统正常用所以转移登记和林口有差别,做转移是过渡房屋权利人就是实际转移的权利人) * * @author <a href="mailto:zhaodongdong@gtmap.cn">zdd</a> * @version V1.0, 15-3-16 */ public class CreatProjectHmZydjServiceImpl extends CreatProjectDefaultServiceImpl implements CreatProjectService { @Autowired QllxService qllxService; @Autowired private BdcXmService bdcXmService; @Autowired private BdcQlrService bdcQlrService; @Autowired private BdcXmRelService bdcXmRelService; @Autowired private BdcTdService bdcTdService; @Autowired private BdcdjbService bdcDjbService; @Autowired private BdcSpxxService bdcSpxxService; @Override public List<InsertVo> initVoFromOldData(final Xmxx xmxx) { Project project; if (xmxx instanceof Project) { project = (Project) xmxx; }else throw new AppException(4005); List<InsertVo> list = new ArrayList<InsertVo>(); //zdd 项目信息 BdcXm bdcxm = bdcXmService.newBdcxm(project); if (bdcxm != null && StringUtils.isNotBlank(project.getYxmid()) && StringUtils.equals(bdcxm.getDjlx(),Constants.DJLX_DYDJ_DM)) { bdcXmService.getYBdcXmDjzx(project.getYxmid(), bdcxm); } list.add(bdcxm); //zx完善项目关系列表,一个项目对应多个项目关系,处理成多条记录 List<BdcXmRel> bdcXmRelList = bdcXmRelService.creatBdcXmRelListFromProject(project); if(CollectionUtils.isNotEmpty(bdcXmRelList)) list.addAll(bdcXmRelList); //zdd 获取地籍数据 InitVoFromParm initVoFromParm=super.getDjxx(xmxx); BdcBdcdjb bdcdjb = null; if (StringUtils.isNotBlank(project.getZdzhh())) { //zdd 防止一个项目选择不同宗地宗海号 造成的垃圾数据 List<BdcBdcdjb> bdcdjbTemps = bdcDjbService.selectBdcdjb(project.getZdzhh()); if (CollectionUtils.isEmpty(bdcdjbTemps)) { bdcdjb = initBdcdjb(initVoFromParm); list.add(bdcdjb); } else { bdcdjb = bdcdjbTemps.get(0); } // zzhw 在选取不动产单元的时候顺便继承土地信息到bdc_td表中 BdcTd bdcTd = bdcTdService.selectBdcTd(project.getZdzhh()); if (bdcTd == null) { bdcTd = bdcTdService.getBdcTdFromDjxx(initVoFromParm.getDjsjZdxx(),initVoFromParm.getDjsjQszdDcbList(),initVoFromParm.getDjsjNydDcbList(),initVoFromParm.getProject(), bdcxm.getQllx()); list.add(bdcTd); } } BdcSpxx bdcSpxx = bdcSpxxService.queryBdcSpxxByProid(project.getProid()); bdcSpxx = initBdcSpxx(initVoFromParm, bdcSpxx); if (bdcSpxx != null) list.add(bdcSpxx); //zdd 不动产单元 BdcBdcdy bdcdy = initBdcdy(initVoFromParm, bdcdjb); if (bdcdy != null && StringUtils.isNotBlank(bdcdy.getBdcdyh())) { bdcxm.setBdcdyid(bdcdy.getBdcdyid()); list.add(bdcdy); //sc根据不动产单元号获取预告项目,如果存在把权利人获取过来 预购商品房预告登记 if (CommonUtil.indexOfStrs(Constants.SQLX_ZYDJ_DM, bdcxm.getSqlx())) { HashMap map = new HashMap(); map.put("bdcdyh", bdcdy.getBdcdyh()); for (int i = 0; i < Constants.SQLX_ZYDJ_DM.length; i++) { if (StringUtils.equals(bdcxm.getSqlx(), Constants.SQLX_ZYDJ_DM[i])) { map.put("sqlx", Constants.SQLX_YGZY_DM[i]); break; } } List<BdcXm> bdcXmList = bdcXmService.getBdcXmByBdcdyAndSqlx(map); if (CollectionUtils.isNotEmpty(bdcXmList)) { List<BdcQlr> ybdcDyQlrList = bdcQlrService.queryBdcQlrByProid(bdcXmList.get(0).getProid()); if (CollectionUtils.isNotEmpty(ybdcDyQlrList)) { List<BdcQlr> tempBdcQlrs = new ArrayList<BdcQlr>(); for (BdcQlr bdcQlr : ybdcDyQlrList) { bdcQlr = bdcQlrService.bdcQlrTurnProjectBdcQlr(bdcQlr, tempBdcQlrs, project.getProid()); tempBdcQlrs.add(bdcQlr); } list.addAll(tempBdcQlrs); } } } } QllxVo qllxVo = qllxService.makeSureQllx(bdcxm); String zsFont = qllxService.makeSureBdcqzlx(qllxVo); String pplx = AppConfig.getProperty("sjpp.type"); if (StringUtils.equals(pplx, Constants.PPLX_GC) && !StringUtils.equals(project.getXmly(), Constants.XMLY_BDC)&&StringUtils.equals(project.getBdclx(),Constants.BDCLX_TDFW)) { List<BdcQlr> bdcQlrList = keepQlrByGcPp(project); if (CollectionUtils.isNotEmpty(bdcQlrList)) list.addAll(bdcQlrList); } else { List<BdcQlr> ybdcQlrList; //zdd 如果为证书 则将原权利人转为义务人 如果证明 则将义务人转为义务人 if (StringUtils.isNotBlank(zsFont) && zsFont.equals(Constants.BDCQZS_BH_FONT)) { ybdcQlrList = getYbdcQlrList(project); } else { ybdcQlrList = getYbdcYwrList(project); } List<BdcQlr> tempBdcYwrList = bdcQlrService.queryBdcYwrByProid(project.getProid()); if (CollectionUtils.isNotEmpty(tempBdcYwrList)) { for (BdcQlr bdcYwr : tempBdcYwrList) bdcQlrService.delBdcQlrByQlrid(bdcYwr.getQlrid(), Constants.QLRLX_YWR); } if (CollectionUtils.isNotEmpty(ybdcQlrList)) { for (BdcQlr bdcQlr : ybdcQlrList) { bdcQlr = bdcQlrService.qlrTurnProjectYwr(bdcQlr, tempBdcYwrList, project.getProid()); list.add(bdcQlr); } } } return list; } }
[ "1424146780@qq.com" ]
1424146780@qq.com
a2f60353b67b994a8fa2beb82c6782bff9b48453
cd21208f659b3cf34f967297363ce694994b48ac
/offlinecachelibrary/src/main/java/net/chilicat/m3u8/ElementBuilder.java
567868b6f1ab5a65934a0496a1641313c1da91c8
[]
no_license
sharpayzara/BranchTalkTv
2755aaf4d7d80f137ee8bd41ba984b9f695ea2e0
43437299d70ab8dfe46b0f16df92da902b7aacb0
refs/heads/master
2021-01-12T15:05:00.761771
2016-10-23T08:01:19
2016-10-23T08:01:19
71,689,354
0
0
null
null
null
null
UTF-8
Java
false
false
1,841
java
package net.chilicat.m3u8; import java.net.URI; /** * @author dkuffner */ class ElementBuilder { private Float duration = 0f; private URI uri; private PlayListInfo playlistInfo; private EncryptionInfo encryptionInfo; private String title; private long programDate = -1; public ElementBuilder() { } public long programDate() { return programDate; } public ElementBuilder programDate(long programDate) { this.programDate = programDate; return this; } public String getTitle() { return title; } public ElementBuilder title(String title) { this.title = title; return this; } public Float getDuration() { return duration; } public ElementBuilder duration(Float duration) { this.duration = duration; return this; } public URI getUri() { return uri; } public ElementBuilder uri(URI uri) { this.uri = uri; return this; } public ElementBuilder playList(final int programId, final int bandWidth, final String codec) { this.playlistInfo = new ElementImpl.PlayListInfoImpl(programId, bandWidth, codec); return this; } public ElementBuilder resetPlatListInfo() { playlistInfo = null; return this; } public ElementBuilder resetEncryptedInfo() { encryptionInfo = null; return this; } public ElementBuilder reset() { duration = 0f; uri = null; title = null; programDate = -1; resetEncryptedInfo(); resetPlatListInfo(); return this; } public ElementBuilder encrypted(EncryptionInfo info) { this.encryptionInfo = info; return this; } public ElementBuilder encrypted(final URI uri, final String method, final String iv) { encryptionInfo = new ElementImpl.EncryptionInfoImpl(uri, method, iv); return this; } public Element create() { return new ElementImpl(playlistInfo, encryptionInfo, duration, uri, title, programDate); } }
[ "864064269@qq.com" ]
864064269@qq.com
b7b3e84945db81b806f23a89e5e9860189aa989f
58f46b9dfb7f845c2fa72f0ff9e51d955469032a
/app/src/main/java/todomore/androidfirebase/TaskEditActivity.java
0bd96f13656bef0aba6ea6e6c69bb350f3013e69
[ "BSD-2-Clause" ]
permissive
IanDarwin/TodoAndroidFirebase
d704bb3ea91089b4a47b05a6a9186efe0a140de3
13ac46e79ac930cdb5856d2af7911e0bd4164b0a
refs/heads/master
2023-02-23T04:03:11.524791
2023-02-07T17:54:33
2023-02-07T17:54:33
56,794,038
1
1
null
null
null
null
UTF-8
Java
false
false
4,266
java
package todomore.androidfirebase; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import com.darwinsys.todo.model.Priority; import com.darwinsys.todo.model.Status; import com.darwinsys.todo.model.Task; import todomore.androidfirebase.R; public class TaskEditActivity extends AppCompatActivity { private final static String TAG = TaskEditActivity.class.getSimpleName(); private Task mTask; private String mKey; private EditText nameTF, descrTF; private Spinner prioSpinner, statusSpinner; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // If the user just deleted an item and that event hasn't yet made it to fhe main view, // they could crash the app by trying to edit it again. Block that, before setContentView(). int index = getIntent().getIntExtra(TaskDetailFragment.ARG_ITEM_INDEX, 0); if (index < 0 || index >= ApplicationClass.sTasks.size()) { Toast.makeText(this, "Unable to edit that item", Toast.LENGTH_SHORT).show(); finish(); } KeyValueHolder<String, Task> taskWrapper = ApplicationClass.sTasks.get(index); mTask = taskWrapper.value; mKey = taskWrapper.key; setContentView(R.layout.activity_task_edit); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); nameTF = (EditText) findViewById(R.id.nameEditText); descrTF = (EditText) findViewById(R.id.descrEditText); prioSpinner = (Spinner) findViewById(R.id.prioSpinner); ArrayAdapter<Priority> adapter2 = new ArrayAdapter<Priority>( this, android.R.layout.simple_spinner_item, Priority.values()); prioSpinner.setAdapter(adapter2); statusSpinner = (Spinner) findViewById(R.id.statusSpinner); ArrayAdapter<Status> adapter3 = new ArrayAdapter<Status>( this, android.R.layout.simple_spinner_item, Status.values()); statusSpinner.setAdapter(adapter3); FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { viewToModel(); doSave(); } }); modelToView(); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_edit, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()) { case R.id.save_menuitem: doSave(); return true; case R.id.delete_menuitem: doDelete(); return true; default: return super.onOptionsItemSelected(item); } } void doSave() { viewToModel(); Log.d(TAG, "Saving " + mTask); mTask.setModified(System.currentTimeMillis()); ((ApplicationClass)getApplication()).getDatabase().child(mKey).setValue(mTask); finish(); } void doDelete() { Log.d(TAG, "Removing " + mTask); ((ApplicationClass)getApplication()).getDatabase().child(mKey).removeValue(); finish(); } void modelToView() { nameTF.setText(mTask.getName()); descrTF.setText(mTask.getDescription()); prioSpinner.setSelection(mTask.getPriority().ordinal()); statusSpinner.setSelection(mTask.getStatus().ordinal()); } void viewToModel() { mTask.setName(nameTF.getText().toString()); mTask.setDescription(descrTF.getText().toString()); mTask.setPriority(Priority.values()[prioSpinner.getSelectedItemPosition()]); mTask.setStatus(Status.values()[statusSpinner.getSelectedItemPosition()]); } }
[ "ian@darwinsys.com" ]
ian@darwinsys.com
7ee8fb21b0f5637b30cc66947f4016e3c95c687c
c9497fc0fd48ef307d14ed47c63447ddd520645f
/LuxorMC Core/src/main/java/com/faithfulmc/hardcorefactions/faction/argument/FactionInviteArgument.java
909f55113a5632a2eafbb11bcd8f2ce1961d1f6f
[ "Apache-2.0" ]
permissive
Tominous/Faithfulmc
7fe0325f3a8437855cb231bf3f88e2bb98656abe
c057628cdbf770e2892b5bf0cdfccdcb54bc8bfa
refs/heads/master
2020-12-10T14:25:07.320691
2020-01-13T14:47:15
2020-01-13T14:47:15
233,617,706
2
0
Apache-2.0
2020-01-13T14:42:51
2020-01-13T14:42:51
null
UTF-8
Java
false
false
5,794
java
package com.faithfulmc.hardcorefactions.faction.argument; import com.faithfulmc.hardcorefactions.ConfigurationService; import com.faithfulmc.hardcorefactions.HCF; import com.faithfulmc.hardcorefactions.faction.struct.Relation; import com.faithfulmc.hardcorefactions.faction.struct.Role; import com.faithfulmc.hardcorefactions.faction.type.Faction; import com.faithfulmc.hardcorefactions.faction.type.PlayerFaction; import com.faithfulmc.hardcorefactions.user.FactionUser; import com.faithfulmc.util.chat.ClickAction; import com.faithfulmc.util.chat.Text; import com.faithfulmc.util.command.CommandArgument; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import java.util.*; import java.util.regex.Pattern; public class FactionInviteArgument extends CommandArgument { private static final Pattern USERNAME_REGEX = Pattern.compile("^[a-zA-Z0-9_]{2,16}$"); private final HCF plugin; public FactionInviteArgument(HCF plugin) { super("invite", "Invite a player to the faction."); this.plugin = plugin; this.aliases = new String[]{"inv", "invitemember", "inviteplayer"}; } public String getUsage(String label) { return '/' + label + ' ' + getName() + " <playerName>"; } public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { if (!(sender instanceof Player)) { sender.sendMessage(ConfigurationService.RED + "Only players can invite to a faction."); } else if (args.length < 2) { sender.sendMessage(ConfigurationService.RED + "Usage: " + getUsage(label)); } else if (!USERNAME_REGEX.matcher(args[1]).matches()) { sender.sendMessage(ConfigurationService.RED + "'" + args[1] + "' is an invalid username."); } else { Player player = (Player) sender; PlayerFaction playerFaction = plugin.getFactionManager().getPlayerFaction(player); if (playerFaction == null) { sender.sendMessage(ConfigurationService.RED + "You are not in a faction.");; } else if (playerFaction.getMember(player.getUniqueId()).getRole() == Role.MEMBER) { sender.sendMessage(ConfigurationService.RED + "You must a faction officer to invite members."); } else { Set<String> invitedPlayerNames = playerFaction.getInvitedPlayerNames(); String name = args[1]; UUID uuid = plugin.getUserManager().fetchUUID(name); if(uuid != null){ FactionUser factionUser = plugin.getUserManager().getUser(uuid); if(factionUser != null){ name = factionUser.getName(); } } if (playerFaction.getMember(plugin, name) != null) { sender.sendMessage(ConfigurationService.RED + "'" + name + "' is already in your faction."); } else if ((!plugin.getEotwHandler().isEndOfTheWorld()) && (playerFaction.isRaidable())) { sender.sendMessage(ConfigurationService.RED + "You may not invite players whilst your faction is raidable."); } else if (!invitedPlayerNames.add(name)) { sender.sendMessage(ConfigurationService.RED + name + " has already been invited."); } else { Player target = Bukkit.getPlayer(uuid); if (target != null) { name = target.getName(); Text text = new Text(sender.getName()).setColor(Relation.ENEMY.toChatColour()).append(new Text(" has invited you to join ").setColor(ConfigurationService.YELLOW)); text.append(new Text(playerFaction.getName()).setColor(Relation.ENEMY.toChatColour())).append(new Text(". ").setColor(ConfigurationService.YELLOW)); text.append(new Text("Click here").setColor(ChatColor.GREEN).setClick(ClickAction.RUN_COMMAND, '/' + label + " accept " + playerFaction.getName()).setHoverText(ConfigurationService.GRAY + "Click to join " + playerFaction.getDisplayName(target) + ConfigurationService.GRAY + '.')).append(new Text(" to accept this invitation.").setColor(ConfigurationService.YELLOW)); text.send(target); } playerFaction.broadcast(Relation.MEMBER.toChatColour() + sender.getName() + ConfigurationService.YELLOW + " has invited " + Relation.ENEMY.toChatColour() + name + ConfigurationService.YELLOW + " to the faction."); } } } return true; } public List<String> onTabComplete(CommandSender sender, Command command, String label, String[] args) { if ((args.length != 2) || (!(sender instanceof Player))) { return Collections.emptyList(); } Player player = (Player) sender; PlayerFaction playerFaction = this.plugin.getFactionManager().getPlayerFaction(player); if ((playerFaction == null) || (playerFaction.getMember(player.getUniqueId()).getRole() == Role.MEMBER)) { return Collections.emptyList(); } List<String> results = new ArrayList<>(); for (Player target : Bukkit.getOnlinePlayers()) { if ((player.canSee(target)) && (!results.contains(target.getName()))) { Faction targetFaction = this.plugin.getFactionManager().getPlayerFaction(target.getUniqueId()); if ((targetFaction == null) || (!targetFaction.equals(playerFaction))) { results.add(target.getName()); } } } return results; } }
[ "realhcfus@gmail.com" ]
realhcfus@gmail.com
60a03cb43022e0b7e92ad93d4ef0d53b4f8bb1cc
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/b2b-accelerator-addons/accountsummaryaddon/src/de/hybris/platform/accountsummaryaddon/document/service/PastDueBalanceDateRangeService.java
d1a242073de4b3c52d1f6615baa239c250958997
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
518
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.accountsummaryaddon.document.service; import java.util.List; import de.hybris.platform.accountsummaryaddon.document.NumberOfDayRange; /** * Provides services for Past Due Balance Date Range. * */ public interface PastDueBalanceDateRangeService { /** * Gets a list of number of days ranges. * * @return date range list */ List<NumberOfDayRange> getNumberOfDayRange(); }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
aca582cfc066cd108d81a13fa5b9892dd51a0209
604d0a647b365411cce92ab97363265f1ad431a9
/sample/src/main/java/la/xiong/androidquick/demo/architecture/architecture3/JsApiHandler.java
cce91ed1ee424251030176a8b4073a3b46da15c7
[ "Apache-2.0", "MIT" ]
permissive
CrazyRabbitCCC/AndroidQuick
49407c87e5df610e2f003c7a3341b040e07dbc33
767cbfed8abfcabe140312373cf14f25959d441f
refs/heads/master
2020-04-28T09:39:22.418388
2019-02-27T10:10:42
2019-02-27T10:10:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
package la.xiong.androidquick.demo.architecture.architecture3; import android.support.annotation.Nullable; /** * @author ddnosh * @website http://blog.csdn.net/ddnosh */ public interface JsApiHandler { String name(); /** * js 调用native的接口 * @param params * @param jsCallback */ void handle(@Nullable Object params, @Nullable String jsCallback); void release(); void setLoadJsCallback(LoadJsCallback callback); }
[ "cage.hung@gmail.com" ]
cage.hung@gmail.com
ae806e4d139238d74c12cdedea995f05758943b1
6baa09045c69b0231c35c22b06cdf69a8ce227d6
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201603/cm/CustomerExtensionSettingPage.java
9af766d8345d59e200bad92c96f905ad33780868
[ "Apache-2.0" ]
permissive
remotejob/googleads-java-lib
f603b47117522104f7df2a72d2c96ae8c1ea011d
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
refs/heads/master
2020-12-11T01:36:29.506854
2016-07-28T22:13:24
2016-07-28T22:13:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,172
java
/** * CustomerExtensionSettingPage.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201603.cm; /** * Contains a subset of CustomerExtensionSetting objects resulting * from a * {@code CustomerExtensionSettingService#get} call. */ public class CustomerExtensionSettingPage extends com.google.api.ads.adwords.axis.v201603.cm.Page implements java.io.Serializable { /* The result entries in this page. */ private com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting[] entries; public CustomerExtensionSettingPage() { } public CustomerExtensionSettingPage( java.lang.Integer totalNumEntries, java.lang.String pageType, com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting[] entries) { super( totalNumEntries, pageType); this.entries = entries; } /** * Gets the entries value for this CustomerExtensionSettingPage. * * @return entries * The result entries in this page. */ public com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting[] getEntries() { return entries; } /** * Sets the entries value for this CustomerExtensionSettingPage. * * @param entries * The result entries in this page. */ public void setEntries(com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting[] entries) { this.entries = entries; } public com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting getEntries(int i) { return this.entries[i]; } public void setEntries(int i, com.google.api.ads.adwords.axis.v201603.cm.CustomerExtensionSetting _value) { this.entries[i] = _value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CustomerExtensionSettingPage)) return false; CustomerExtensionSettingPage other = (CustomerExtensionSettingPage) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.entries==null && other.getEntries()==null) || (this.entries!=null && java.util.Arrays.equals(this.entries, other.getEntries()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getEntries() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getEntries()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getEntries(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CustomerExtensionSettingPage.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "CustomerExtensionSettingPage")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("entries"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "entries")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201603", "CustomerExtensionSetting")); elemField.setMinOccurs(0); elemField.setNillable(false); elemField.setMaxOccursUnbounded(true); 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); } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
458936a3a5ea892612bbca8a08de1db7b07312a5
3779969d3739fe5cde85768e2212cf5a74643903
/src/main/java/hb_03_one_to_many/entity/Instructor.java
ca212b0711095c876852bbfb99c9c301570d9c01
[]
no_license
Anthony17J8/hibernatelearn
e05d99751e76a0e6dd28e2837ee34893fb6c1fcb
eb932a34ec79f9dece889b49998427974a2694ab
refs/heads/master
2020-03-29T13:48:20.670593
2018-12-16T17:14:52
2018-12-16T17:14:52
149,983,142
0
0
null
null
null
null
UTF-8
Java
false
false
3,165
java
package hb_03_one_to_many.entity; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Entity @Table(name = "instructor") public class Instructor { // annotate the class as an entity and map to db table // define the fields // annotate the fields with db column names // ** set up mapping to InstructorDetail entity // create constructors // generate getters and setters // generate toString() method @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email") private String email; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "instructor_detail_id") private InstructorDetail instructorDetail; @OneToMany(mappedBy = "instructor", cascade = { CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}) private List<Course> courses; public Instructor() { } public Instructor(String firstName, String lastName, String email, InstructorDetail instructorDetail) { this.firstName = firstName; this.lastName = lastName; this.email = email; this.instructorDetail = instructorDetail; } public Instructor(String firstName, String lastName, String email) { this.firstName = firstName; this.lastName = lastName; this.email = email; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public InstructorDetail getInstructorDetail() { return instructorDetail; } public void setInstructorDetail(InstructorDetail instructorDetail) { this.instructorDetail = instructorDetail; } public List<Course> getCourses() { return courses; } public void setCourses(List<Course> courses) { this.courses = courses; } @Override public String toString() { return "Instructor{" + "id=" + id + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", email='" + email + '\'' + ", instructorDetail=" + instructorDetail + '}'; } // add convenience methods for bi-directional relationship public void add(Course tempCourse) { if (courses == null) { courses = new ArrayList<>(); } if (tempCourse != null) { courses.add(tempCourse); tempCourse.setInstructor(this); } } }
[ "j8kiselev@gmail.com" ]
j8kiselev@gmail.com
7e17a201c18d6df81f01a30f3de277870b88efcf
deab09441d5367a668e349ace0d087bac21e1b87
/src/test/java/com/mycompany/myapp/repository/CustomAuditEventRepositoryIT.java
519cad997357f6b8f04ada341c94906361e4dce5
[]
no_license
asjrosabal/jhipster-sample-application
852a97955b6af850154a2dfa978e83dde68eaf01
b55bd0269f7ff3b25bd89e30fa508fc0cf8d0db9
refs/heads/master
2022-02-16T19:03:41.524537
2021-04-09T21:03:16
2021-04-09T21:03:16
212,635,573
0
0
null
2022-02-10T01:22:53
2019-10-03T17:13:08
Java
UTF-8
Java
false
false
7,753
java
package com.mycompany.myapp.repository; import com.mycompany.myapp.SampleApplicationApp; import com.mycompany.myapp.config.Constants; import com.mycompany.myapp.config.audit.AuditEventConverter; import com.mycompany.myapp.domain.PersistentAuditEvent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.kafka.test.context.EmbeddedKafka; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.security.web.authentication.WebAuthenticationDetails; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpSession; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; import static com.mycompany.myapp.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; /** * Integration tests for {@link CustomAuditEventRepository}. */ @EmbeddedKafka @SpringBootTest(classes = SampleApplicationApp.class) @Transactional public class CustomAuditEventRepositoryIT { @Autowired private PersistenceAuditEventRepository persistenceAuditEventRepository; @Autowired private AuditEventConverter auditEventConverter; private CustomAuditEventRepository customAuditEventRepository; private PersistentAuditEvent testUserEvent; private PersistentAuditEvent testOtherUserEvent; private PersistentAuditEvent testOldUserEvent; @BeforeEach public void setup() { customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); persistenceAuditEventRepository.deleteAll(); Instant oneHourAgo = Instant.now().minusSeconds(3600); testUserEvent = new PersistentAuditEvent(); testUserEvent.setPrincipal("test-user"); testUserEvent.setAuditEventType("test-type"); testUserEvent.setAuditEventDate(oneHourAgo); Map<String, String> data = new HashMap<>(); data.put("test-key", "test-value"); testUserEvent.setData(data); testOldUserEvent = new PersistentAuditEvent(); testOldUserEvent.setPrincipal("test-user"); testOldUserEvent.setAuditEventType("test-type"); testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); testOtherUserEvent = new PersistentAuditEvent(); testOtherUserEvent.setPrincipal("other-test-user"); testOtherUserEvent.setAuditEventType("test-type"); testOtherUserEvent.setAuditEventDate(oneHourAgo); } @Test public void addAuditEvent() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void addAuditEventTruncateLargeData() { Map<String, Object> data = new HashMap<>(); StringBuilder largeData = new StringBuilder(); for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { largeData.append("a"); } data.put("test-key", largeData); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); String actualData = persistentAuditEvent.getData().get("test-key"); assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); assertThat(actualData).isSubstringOf(largeData); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void testAddEventWithWebAuthenticationDetails() { HttpSession session = new MockHttpSession(null, "test-session-id"); MockHttpServletRequest request = new MockHttpServletRequest(); request.setSession(session); request.setRemoteAddr("1.2.3.4"); WebAuthenticationDetails details = new WebAuthenticationDetails(request); Map<String, Object> data = new HashMap<>(); data.put("test-key", details); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); } @Test public void testAddEventWithNullData() { Map<String, Object> data = new HashMap<>(); data.put("test-key", null); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); } @Test public void addAuditEventWithAnonymousUser() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } @Test public void addAuditEventWithAuthorizationFailureType() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c56dadba2b9366e39719f03ce70ee9719e55fe16
71975999c9d702a0883ec9038ce3e76325928549
/src2.4.0/src/main/java/com/autonavi/amap/mapcore/tools/GlMapUtil.java
b45865db8bc78eda3829e7eb812de40420f91f1f
[]
no_license
XposedRunner/PhysicalFitnessRunner
dc64179551ccd219979a6f8b9fe0614c29cd61de
cb037e59416d6c290debbed5ed84c956e705e738
refs/heads/master
2020-07-15T18:18:23.001280
2019-09-02T04:21:34
2019-09-02T04:21:34
205,620,387
3
2
null
null
null
null
UTF-8
Java
false
false
3,920
java
package com.autonavi.amap.mapcore.tools; import android.content.Context; import android.content.pm.PackageManager.NameNotFoundException; import android.text.TextUtils; import android.util.TypedValue; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; public class GlMapUtil { public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_1 = 2; public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_1_EAGLE_EYE = 3; public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_2 = 4; public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_2_EAGLE_EYE = 5; public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_3 = 6; public static final int AMAP_ENGINE_TYPE_DISPLAY_EXTERNAL_3_EAGLE_EYE = 7; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_1 = 3; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_1_EAGLE_EYE = 4; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_2 = 5; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_2_EAGLE_EYE = 6; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_3 = 7; public static final int AN_ENGINE_ID_DISPLAY_EXTERNAL_3_EAGLE_EYE = 8; public static final int AN_ENGINE_ID_EAGLE_EYE = 2; public static final int AN_ENGINE_ID_INVALID = -1; public static final int AN_ENGINE_ID_MAIN = 1; public static final int DEVICE_DISPLAY_DPI_HIGH = 320; public static final int DEVICE_DISPLAY_DPI_LOW = 120; public static final int DEVICE_DISPLAY_DPI_MEDIAN = 240; public static final int DEVICE_DISPLAY_DPI_NORMAL = 160; public static final int DEVICE_DISPLAY_DPI_XHIGH = 480; public static final int DEVICE_DISPLAY_DPI_XXHIGH = 640; public static byte[] decodeAssetResData(Context context, String str) { try { InputStream open = context.getAssets().open(str); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); byte[] bArr = new byte[1024]; while (true) { int read = open.read(bArr); if (read > -1) { byteArrayOutputStream.write(bArr, 0, read); } else { bArr = byteArrayOutputStream.toByteArray(); byteArrayOutputStream.close(); open.close(); return bArr; } } } catch (IOException unused) { return null; } catch (OutOfMemoryError unused2) { return null; } } public static int dipToPixel(Context context, int i) { if (context == null) { return i; } try { return (int) TypedValue.applyDimension(1, (float) i, context.getResources().getDisplayMetrics()); } catch (Exception unused) { return i; } } public static String getAppVersionName(Context context) { try { return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName; } catch (NameNotFoundException unused) { return ""; } } public static String getString(Context context, int i) { return context.getResources().getString(i); } public static boolean isAssic(String str) { if (TextUtils.isEmpty(str)) { return false; } char[] toCharArray = str.toCharArray(); int i = 0; while (i < toCharArray.length) { if (toCharArray[i] >= 256 || toCharArray[i] <= 0) { return false; } i++; } return true; } public static int spToPixel(Context context, int i) { return (int) TypedValue.applyDimension(2, (float) i, context.getResources().getDisplayMetrics()); } }
[ "xr_master@mail.com" ]
xr_master@mail.com
5a472335a7f1bf7a3698d58affdd606e3e253b84
07396866b2715bccb87f3fc832d4b184f530ebda
/spring-data-geode/src/main/java/org/springframework/data/gemfire/client/support/DefaultableDelegatingPoolAdapter.java
5492b221eb8cf2b4a228c18f80bcf00648376f10
[ "Apache-2.0" ]
permissive
stjordanis/spring-data-geode
661f9a481d1b83a35fbc75e32eba9c39a8cb314d
b805c035e801761b80d91ef6d7b2aea4c2136835
refs/heads/master
2023-01-11T00:41:24.269803
2020-10-28T10:43:51
2020-10-28T11:15:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,070
java
/* * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.springframework.data.gemfire.client.support; import java.net.InetSocketAddress; import java.util.Collection; import java.util.List; import java.util.function.Supplier; import org.apache.geode.cache.client.Pool; import org.apache.geode.cache.client.SocketFactory; import org.apache.geode.cache.query.QueryService; import org.springframework.data.gemfire.util.CollectionUtils; import org.springframework.data.gemfire.util.SpringUtils; import org.springframework.util.Assert; /** * The {@link DefaultableDelegatingPoolAdapter} class is a wrapper class around {@link Pool} * allowing default configuration property values to be provided in the case that the {@link Pool Pool's} * settings were {@literal null}. * * @author John Blum * @see org.apache.geode.cache.client.Pool * @since 1.8.0 */ @SuppressWarnings("unused") public abstract class DefaultableDelegatingPoolAdapter { private final Pool delegate; private Preference preference = Preference.PREFER_POOL; public static DefaultableDelegatingPoolAdapter from(Pool delegate) { return new DefaultableDelegatingPoolAdapter(delegate) {}; } protected DefaultableDelegatingPoolAdapter(Pool delegate) { Assert.notNull(delegate, "Pool delegate must not be null"); this.delegate = delegate; } protected Pool getDelegate() { return this.delegate; } protected DefaultableDelegatingPoolAdapter setPreference(Preference preference) { this.preference = preference; return this; } protected Preference getPreference() { return this.preference; } protected <T> T defaultIfNull(T defaultValue, Supplier<T> valueProvider) { return prefersPool() ? SpringUtils.defaultIfNull(valueProvider.get(), defaultValue) : defaultValue != null ? defaultValue : valueProvider.get(); } protected <E, T extends Collection<E>> T defaultIfEmpty(T defaultValue, Supplier<T> valueProvider) { if (prefersPool()) { T value = valueProvider.get(); return CollectionUtils.isEmpty(value) ? defaultValue : value; } else { return CollectionUtils.isEmpty(defaultValue) ? valueProvider.get() : defaultValue; } } public DefaultableDelegatingPoolAdapter preferDefault() { return setPreference(Preference.PREFER_DEFAULT); } protected boolean prefersDefault() { return Preference.PREFER_DEFAULT.equals(getPreference()); } public DefaultableDelegatingPoolAdapter preferPool() { return setPreference(Preference.PREFER_POOL); } protected boolean prefersPool() { return Preference.PREFER_POOL.equals(getPreference()); } public boolean isDestroyed() { return getDelegate().isDestroyed(); } public int getFreeConnectionTimeout(Integer defaultFreeConnectionTimeout) { return defaultIfNull(defaultFreeConnectionTimeout, () -> getDelegate().getFreeConnectionTimeout()); } public long getIdleTimeout(Long defaultIdleTimeout) { return defaultIfNull(defaultIdleTimeout, () -> getDelegate().getIdleTimeout()); } public int getLoadConditioningInterval(Integer defaultLoadConditioningInterval) { return defaultIfNull(defaultLoadConditioningInterval, () -> getDelegate().getLoadConditioningInterval()); } public List<InetSocketAddress> getLocators(List<InetSocketAddress> defaultLocators) { return defaultIfEmpty(defaultLocators, () -> getDelegate().getLocators()); } public int getMaxConnections(Integer defaultMaxConnections) { return defaultIfNull(defaultMaxConnections, () -> getDelegate().getMaxConnections()); } public int getMinConnections(Integer defaultMinConnections) { return defaultIfNull(defaultMinConnections, () -> getDelegate().getMinConnections()); } public boolean getMultiuserAuthentication(Boolean defaultMultiUserAuthentication) { return defaultIfNull(defaultMultiUserAuthentication, () -> getDelegate().getMultiuserAuthentication()); } public String getName() { return getDelegate().getName(); } public int getPendingEventCount() { return getDelegate().getPendingEventCount(); } public long getPingInterval(Long defaultPingInterval) { return defaultIfNull(defaultPingInterval, () -> getDelegate().getPingInterval()); } public boolean getPRSingleHopEnabled(Boolean defaultPrSingleHopEnabled) { return defaultIfNull(defaultPrSingleHopEnabled, () -> getDelegate().getPRSingleHopEnabled()); } public QueryService getQueryService(QueryService defaultQueryService) { return defaultIfNull(defaultQueryService, () -> getDelegate().getQueryService()); } public int getReadTimeout(Integer defaultReadTimeout) { return defaultIfNull(defaultReadTimeout, () -> getDelegate().getReadTimeout()); } public int getRetryAttempts(Integer defaultRetryAttempts) { return defaultIfNull(defaultRetryAttempts, () -> getDelegate().getRetryAttempts()); } public int getServerConnectionTimeout(Integer defaultServerConnectionTimeout) { return defaultIfNull(defaultServerConnectionTimeout, () -> getDelegate().getServerConnectionTimeout()); } public String getServerGroup(String defaultServerGroup) { return defaultIfNull(defaultServerGroup, () -> getDelegate().getServerGroup()); } public List<InetSocketAddress> getServers(List<InetSocketAddress> defaultServers) { return defaultIfEmpty(defaultServers, () -> getDelegate().getServers()); } public int getSocketBufferSize(Integer defaultSocketBufferSize) { return defaultIfNull(defaultSocketBufferSize, () -> getDelegate().getSocketBufferSize()); } public int getSocketConnectTimeout(Integer defaultSocketConnectTimeout) { return defaultIfNull(defaultSocketConnectTimeout, () -> getDelegate().getSocketConnectTimeout()); } public SocketFactory getSocketFactory(SocketFactory defaultSocketFactory) { return defaultIfNull(defaultSocketFactory, () -> getDelegate().getSocketFactory()); } public int getStatisticInterval(Integer defaultStatisticInterval) { return defaultIfNull(defaultStatisticInterval, () -> getDelegate().getStatisticInterval()); } public int getSubscriptionAckInterval(Integer defaultSubscriptionAckInterval) { return defaultIfNull(defaultSubscriptionAckInterval, () -> getDelegate().getSubscriptionAckInterval()); } public boolean getSubscriptionEnabled(Boolean defaultSubscriptionEnabled) { return defaultIfNull(defaultSubscriptionEnabled, () -> getDelegate().getSubscriptionEnabled()); } public int getSubscriptionMessageTrackingTimeout(Integer defaultSubscriptionMessageTrackingTimeout) { return defaultIfNull(defaultSubscriptionMessageTrackingTimeout, () -> getDelegate().getSubscriptionMessageTrackingTimeout()); } public int getSubscriptionRedundancy(Integer defaultSubscriptionRedundancy) { return defaultIfNull(defaultSubscriptionRedundancy, () -> getDelegate().getSubscriptionRedundancy()); } public int getSubscriptionTimeoutMultiplier(Integer defaultSubscriptionTimeoutMultiplier) { return defaultIfNull(defaultSubscriptionTimeoutMultiplier, () -> getDelegate().getSubscriptionTimeoutMultiplier()); } public boolean getThreadLocalConnections(Boolean defaultThreadLocalConnections) { return defaultIfNull(defaultThreadLocalConnections, () -> getDelegate().getThreadLocalConnections()); } public void destroy() { getDelegate().destroy(); } public void destroy(boolean keepAlive) { getDelegate().destroy(keepAlive); } public void releaseThreadLocalConnection() { getDelegate().releaseThreadLocalConnection(); } enum Preference { PREFER_DEFAULT, PREFER_POOL } interface ValueProvider<T> { T getValue(); } }
[ "jblum@pivotal.io" ]
jblum@pivotal.io
51423a0d1e3c0e81ac271faf123f1b9533b9842f
249d2ec159a37488ecdf22b3f7ac0d7c5426c651
/gchbpm - 副本/src/main/java/com/buss/order/service/impl/TOrderDetailServiceImpl.java
2268161ac144180fcc56e2e877b900f0c3aae9da
[]
no_license
chenxh23/sell
a3d38390bd68074fa7d5854a0a9033ba1005b150
a3e91ad9bacb189625c8427db54f579bd005463e
refs/heads/master
2022-11-09T22:13:17.182490
2018-01-19T09:05:46
2018-01-19T09:05:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
424
java
package com.buss.order.service.impl; import org.jeecgframework.core.common.service.impl.CommonServiceImpl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.buss.order.service.TOrderDetailServiceI; @Service("tOrderDetailService") @Transactional public class TOrderDetailServiceImpl extends CommonServiceImpl implements TOrderDetailServiceI { }
[ "cxh231196@163.com" ]
cxh231196@163.com
146de5f2ae7883f44cb486d3593ba4a2667f7dc8
b1eee7989acdad29096ef323a7609b5af2828792
/AppDyC/DomainDyC/src/main/java/mx/gob/sat/siat/dyc/domain/anexo/DyccMatrizAnexosDTO.java
f166648c43bba70218bb6a3b455624a5ff96f76b
[]
no_license
xtaticzero/AppDyC
2185e5d25840ddbb73d0de6c6c0d61a497a6cdfa
1562a358558323ef6adb84fb0e70ba7560200bda
refs/heads/master
2021-09-09T21:50:41.930101
2018-03-19T21:38:45
2018-03-19T21:38:45
73,757,634
1
0
null
null
null
null
UTF-8
Java
false
false
2,972
java
/* * Todos los Derechos Reservados 2013 SAT. * Servicio de Administracion Tributaria (SAT). * * Este software contiene informacion propiedad exclusiva del SAT considerada * Confidencial. Queda totalmente prohibido su uso o divulgacion en forma **/ package mx.gob.sat.siat.dyc.domain.anexo; import java.io.Serializable; import java.util.Date; /** * DTO de la tabla DYCC_MATRIZANEXOS * @author Alfredo Ramirez * @since 31/03/2014 */ public class DyccMatrizAnexosDTO implements Serializable { @SuppressWarnings("compatibility:-9159333935850504144") private static final long serialVersionUID = 1L; private Integer idAnexo; private String nombreAnexo; private String descripcionAnexo; private Date fechaInicio; private Date fechaFin; private String url; private DyccAnexoTramiteDTO anexoTramite; public DyccMatrizAnexosDTO() { } public DyccMatrizAnexosDTO(String descripcionAnexo, Date fechaFin, Date fechaInicio, Integer idAnexo, String nombreAnexo, String url) { this.descripcionAnexo = descripcionAnexo; this.fechaFin = fechaFin != null ? (Date)fechaFin.clone() : null; this.fechaInicio = fechaInicio != null ? (Date)fechaInicio.clone() : null; this.idAnexo = idAnexo; this.nombreAnexo = nombreAnexo; this.url = url; } public void setIdAnexo(Integer idAnexo) { this.idAnexo = idAnexo; } public Integer getIdAnexo() { return idAnexo; } public void setNombreAnexo(String nombreAnexo) { this.nombreAnexo = nombreAnexo; } public String getNombreAnexo() { return nombreAnexo; } public void setDescripcionAnexo(String descripcionAnexo) { this.descripcionAnexo = descripcionAnexo; } public String getDescripcionAnexo() { return descripcionAnexo; } public void setFechaInicio(Date fechaInicio) { if (null != fechaInicio) { this.fechaInicio = (Date)fechaInicio.clone(); } else { this.fechaInicio = null; } } public Date getFechaInicio() { if (null != fechaInicio) { return (Date)fechaInicio.clone(); } else { return null; } } public void setFechaFin(Date fechaFin) { if (null != fechaFin) { this.fechaFin = (Date)fechaFin.clone(); } else { this.fechaFin = null; } } public Date getFechaFin() { if (null != fechaFin) { return (Date)fechaFin.clone(); } else { return null; } } public void setUrl(String url) { this.url = url; } public String getUrl() { return url; } public void setAnexoTramite(DyccAnexoTramiteDTO anexoTramite) { this.anexoTramite = anexoTramite; } public DyccAnexoTramiteDTO getAnexoTramite() { return anexoTramite; } }
[ "emmanuel.estrada@stksat.com" ]
emmanuel.estrada@stksat.com
6ea60b0b6e07dda41830d7ff71a0095a484943a9
a4fbb458efa6df7e33c4a9c6bb303fdd65570a85
/gameserver-core/src/main/java/org/jyg/gameserver/core/anno/InvokeName.java
176bdda02bba59b70cb2ec63d88b93e76f1907e3
[ "Apache-2.0" ]
permissive
JygTech/gameserver
204de35d9428a60d5cbf3d00eaf69e8c69bc420a
54df3632aa967d2bd7b2ebc90c2af75e3946507a
refs/heads/master
2021-06-11T00:54:52.044866
2021-05-12T09:07:14
2021-05-12T09:07:14
189,595,175
0
0
Apache-2.0
2021-05-12T09:07:14
2019-05-31T13:05:02
Java
UTF-8
Java
false
false
363
java
package org.jyg.gameserver.core.anno; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * create by jiayaoguang on 2021/4/17 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) public @interface InvokeName { String name(); }
[ "1090196116@qq.com" ]
1090196116@qq.com
38c15302fecd5f72ce07d94af8cfe157ef3c8c39
daed78503c8fdcfb0ad06002c3ac58d8a82e8718
/intellij/org.eclipse.xtext.idea/xtend-gen/org/eclipse/xtext/idea/build/AffectedScope.java
7490d9a8868688298048650b611842c689d8e6b0
[ "LicenseRef-scancode-generic-cla" ]
no_license
knutwannheden/xtext
d85e145a33a5c5cf267576c3afa0938d9ffac862
4ba27914b8a65062f5f82ba2c80fc4233253c359
refs/heads/master
2021-01-17T22:14:56.783054
2015-07-15T07:46:23
2015-07-15T07:46:23
2,587,823
2
0
null
null
null
null
UTF-8
Java
false
false
2,149
java
/** * Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.eclipse.xtext.idea.build; import com.intellij.openapi.compiler.CompileScope; import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.module.Module; import com.intellij.openapi.util.Key; import com.intellij.openapi.vfs.VirtualFile; import java.util.HashSet; import java.util.Map; import org.eclipse.emf.common.util.URI; import org.eclipse.xtend.lib.annotations.Accessors; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Pure; @SuppressWarnings("all") public class AffectedScope implements CompileScope { @Accessors private final HashSet<URI> affectedFiles = CollectionLiterals.<URI>newHashSet(); @Override public boolean belongs(final String url) { boolean _xblockexpression = false; { final URI uri = URI.createURI(url); _xblockexpression = this.affectedFiles.contains(uri); } return _xblockexpression; } @Override public Module[] getAffectedModules() { throw new UnsupportedOperationException("TODO: auto-generated method stub"); } @Override public VirtualFile[] getFiles(final FileType fileType, final boolean inSourceOnly) { throw new UnsupportedOperationException("TODO: auto-generated method stub"); } @Override public Map<Key, Object> exportUserData() { throw new UnsupportedOperationException("TODO: auto-generated method stub"); } @Override public <T extends Object> T getUserData(final Key<T> key) { throw new UnsupportedOperationException("TODO: auto-generated method stub"); } @Override public <T extends Object> void putUserData(final Key<T> key, final T value) { throw new UnsupportedOperationException("TODO: auto-generated method stub"); } @Pure public HashSet<URI> getAffectedFiles() { return this.affectedFiles; } }
[ "anton.kosyakov@itemis.de" ]
anton.kosyakov@itemis.de
4a27777d426c879aed1b31e095a98d3aa79e7284
7963486fb2d24df12c58e0020063118f2f4d320a
/src/util/atunit/TestProperty.java
40d211bfd1716228249c969fa4f4b3f94354b393
[]
no_license
Serginiho/Utilits
3cb2d555d54d5a6fcba873e774e32deba883a701
7080ee978cffab7d6757980f9fa4f382f35c1c4f
refs/heads/master
2023-07-04T21:59:02.352956
2021-08-09T15:14:37
2021-08-09T15:14:37
394,339,298
0
0
null
null
null
null
UTF-8
Java
false
false
304
java
package util.atunit; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface TestProperty { }
[ "serginiho2985@gmail.com" ]
serginiho2985@gmail.com
0772199bf5cb753b6f9d102af55ca4f0934d12bb
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/websearch/widget/b/a.java
2e3f1b5728ca8159a33ad7257fb9042a439d5359
[]
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
413
java
package com.tencent.mm.plugin.websearch.widget.b; public final class a { public static abstract interface a { public abstract void cUT(); public abstract void cVR(); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.websearch.widget.b.a * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
c94d7882a58478d194a925e7238f86c38fd05ec4
d95c5fe1c3d33bc8306ab4d716556e117b8fc91a
/SlidingDrawer-Topdown/src/com/example/slidingdrawer/MainActivity.java
06219a17f18578c86eecb65ff7d9e0a7f910f4ac
[ "CC-BY-4.0", "CC-BY-3.0" ]
permissive
IanDarwin/Android-Cookbook-Examples
245d8cdeee2f7f957c75a4aec12fb233d179f6d0
6dc0e15cb2c0c21087ac020594d96c706d3d87e8
refs/heads/master
2023-08-16T17:00:49.358578
2023-07-30T16:53:18
2023-07-30T16:53:18
2,857,893
819
635
NOASSERTION
2021-02-19T01:36:22
2011-11-26T21:48:08
Java
UTF-8
Java
false
false
349
java
package com.example.slidingdrawer; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
[ "ian@darwinsys.com" ]
ian@darwinsys.com
c68610b177ed7e70a83c6438047f907ca0fc4e63
e4fc9f573518531b7a6cf1d424146b6821adbe85
/anno-search-webapp/anno-search-server/src/main/java/com/annosearch/model/AnnotatedDocumentSearchResult.java
8bcaccc233e032ae3f68a9c1fc802441d7a04ad5
[ "Apache-2.0" ]
permissive
powerslider/anno-search
5693fb6c07bd39510d31a63df5bb2326bb8d5669
b47ae5b4077d75622e088d3064e61934a8a3cf37
refs/heads/master
2021-05-01T05:10:48.757845
2017-01-27T21:01:00
2017-01-27T21:01:00
79,724,397
0
0
null
null
null
null
UTF-8
Java
false
false
978
java
package com.annosearch.model; /** * Model class representing a annotated document as a item from search results. * * @author Tsvetan Dimitrov <tsvetan.dimitrov23@gmail.com> * @since 27-Jan-2017 */ public class AnnotatedDocumentSearchResult { private int id; private String title; private String matchedText; private double sentimentScore; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getMatchedText() { return matchedText; } public void setMatchedText(String matchedText) { this.matchedText = matchedText; } public int getId() { return id; } public void setId(int id) { this.id = id; } public double getSentimentScore() { return sentimentScore; } public void setSentimentScore(double sentimentScore) { this.sentimentScore = sentimentScore; } }
[ "tsvetan.dimitrov23@gmail.com" ]
tsvetan.dimitrov23@gmail.com
ea8c60209e22bbd0d2db61c1564bd6f12ee79c7e
f633bbc1a8936b780676e9ac8b099c9d3c32ea50
/src/ch10_holding/Lesson/L19_UniqueWordsAlphabetic.java
136fb01ec433442d1fd50db42665b1628aff5043
[]
no_license
zjn0505/Think-in-Java
4cc203409c886a849819c8d53a3f92089efd6944
61d6fd303ea05d1ba047b10cb7f9167eb94814fb
refs/heads/master
2021-01-17T02:13:21.002319
2017-09-19T14:50:33
2017-09-19T14:50:33
31,588,332
1
0
null
null
null
null
UTF-8
Java
false
false
566
java
package ch10_holding.Lesson; import net.mindview.util.TextFile; import java.util.Set; import java.util.TreeSet; /** * Created by Jienan on 2017/2/27. */ // Producing an alphabetic listing. // Pass in Comparator to TreeSet constructor public class L19_UniqueWordsAlphabetic { public static void main(String[] args) { Set<String> words = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER); words.addAll(new TextFile("src\\ch10_holding\\Lesson\\L17_SetOperations.java", "\\W+")); System.out.println(words); } }
[ "zjn0505@hotmail.com" ]
zjn0505@hotmail.com
816a85431552601f0e6a7e162c22aafae98b661b
2b0694f0563192e2d148d130164e94faf3b4e12f
/Android3D游戏开发技术宝典-OpenGLES2.0/第11章 常用3D开发技巧案例/Sample11_4/src/com/bn/Sample11_4/Mountion.java
d2dfb19dd3dce86ac138827a301d9fc6449bc765
[]
no_license
bxh7425014/BookCode
4757956275cf540e9996b9064d981f6da75c9602
8996b36e689861d55662d15c5db8b0eb498c864b
refs/heads/master
2020-05-23T00:48:51.430340
2017-02-06T01:04:25
2017-02-06T01:04:25
84,735,079
9
3
null
null
null
null
UTF-8
Java
false
false
6,571
java
package com.bn.Sample11_4; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import android.opengl.GLES20; public class Mountion { //单位长度 float UNIT_SIZE=3.0f; //自定义渲染管线的id int mProgram; //总变化矩阵引用的id int muMVPMatrixHandle; //顶点位置属性引用id int maPositionHandle; //顶点纹理坐标属性引用id int maTexCoorHandle; //草地的id int sTextureGrassHandle; //石头的id int sTextureRockHandle; //起始x值 int landStartYYHandle; //长度 int landYSpanHandle; //顶点数据缓冲和纹理坐标数据缓冲 FloatBuffer mVertexBuffer; FloatBuffer mTexCoorBuffer; //顶点数量 int vCount=0; public Mountion(MySurfaceView mv,float[][] yArray,int rows,int cols) { initVertexData(yArray,rows,cols); initShader(mv); } //初始化顶点坐标与着色数据的方法 public void initVertexData(float[][] yArray,int rows,int cols) { //顶点坐标数据的初始化 vCount=cols*rows*2*3;//每个格子两个三角形,每个三角形3个顶点 float vertices[]=new float[vCount*3];//每个顶点xyz三个坐标 int count=0;//顶点计数器 for(int j=0;j<rows;j++) { for(int i=0;i<cols;i++) { //计算当前格子左上侧点坐标 float zsx=-UNIT_SIZE*cols/2+i*UNIT_SIZE; float zsz=-UNIT_SIZE*rows/2+j*UNIT_SIZE; vertices[count++]=zsx; vertices[count++]=yArray[j][i]; vertices[count++]=zsz; vertices[count++]=zsx; vertices[count++]=yArray[j+1][i]; vertices[count++]=zsz+UNIT_SIZE; vertices[count++]=zsx+UNIT_SIZE; vertices[count++]=yArray[j][i+1]; vertices[count++]=zsz; vertices[count++]=zsx+UNIT_SIZE; vertices[count++]=yArray[j][i+1]; vertices[count++]=zsz; vertices[count++]=zsx; vertices[count++]=yArray[j+1][i]; vertices[count++]=zsz+UNIT_SIZE; vertices[count++]=zsx+UNIT_SIZE; vertices[count++]=yArray[j+1][i+1]; vertices[count++]=zsz+UNIT_SIZE; } } //创建顶点坐标数据缓冲 ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4); vbb.order(ByteOrder.nativeOrder());//设置字节顺序 mVertexBuffer = vbb.asFloatBuffer();//转换为Float型缓冲 mVertexBuffer.put(vertices);//向缓冲区中放入顶点坐标数据 mVertexBuffer.position(0);//设置缓冲区起始位置 //顶点纹理坐标数据的初始化 float[] texCoor=generateTexCoor(cols,rows); //创建顶点纹理坐标数据缓冲 ByteBuffer cbb = ByteBuffer.allocateDirect(texCoor.length*4); cbb.order(ByteOrder.nativeOrder());//设置字节顺序 mTexCoorBuffer = cbb.asFloatBuffer();//转换为Float型缓冲 mTexCoorBuffer.put(texCoor);//向缓冲区中放入顶点着色数据 mTexCoorBuffer.position(0);//设置缓冲区起始位置 } //初始化Shader的方法 public void initShader(MySurfaceView mv) { String mVertexShader=ShaderUtil.loadFromAssetsFile("vertex.sh", mv.getResources()); String mFragmentShader=ShaderUtil.loadFromAssetsFile("frag.sh", mv.getResources()); //基于顶点着色器与片元着色器创建程序 mProgram = ShaderUtil.createProgram(mVertexShader, mFragmentShader); //获取程序中顶点位置属性引用id maPositionHandle = GLES20.glGetAttribLocation(mProgram, "aPosition"); //获取程序中顶点纹理坐标属性引用id maTexCoorHandle= GLES20.glGetAttribLocation(mProgram, "aTexCoor"); //获取程序中总变换矩阵引用id muMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "uMVPMatrix"); //纹理 //草地 sTextureGrassHandle=GLES20.glGetUniformLocation(mProgram, "sTextureGrass"); //石头 sTextureRockHandle=GLES20.glGetUniformLocation(mProgram, "sTextureRock"); //x位置 landStartYYHandle=GLES20.glGetUniformLocation(mProgram, "landStartY"); //x最大 landYSpanHandle=GLES20.glGetUniformLocation(mProgram, "landYSpan"); } //自定义的绘制方法drawSelf public void drawSelf(int texId,int rock_textId) { //指定使用某套shader程序 GLES20.glUseProgram(mProgram); //将最终变换矩阵传入shader程序 GLES20.glUniformMatrix4fv(muMVPMatrixHandle, 1, false, MatrixState.getFinalMatrix(), 0); //传送顶点位置数据 GLES20.glVertexAttribPointer ( maPositionHandle, 3, GLES20.GL_FLOAT, false, 3*4, mVertexBuffer ); //传送顶点纹理坐标数据 GLES20.glVertexAttribPointer ( maTexCoorHandle, 2, GLES20.GL_FLOAT, false, 2*4, mTexCoorBuffer ); //允许顶点位置数据数组 GLES20.glEnableVertexAttribArray(maPositionHandle); GLES20.glEnableVertexAttribArray(maTexCoorHandle); //绑定纹理 GLES20.glActiveTexture(GLES20.GL_TEXTURE0); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texId); GLES20.glActiveTexture(GLES20.GL_TEXTURE1); GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, rock_textId); GLES20.glUniform1i(sTextureGrassHandle, 0);//使用0号纹理 GLES20.glUniform1i(sTextureRockHandle, 1); //使用1号纹理 //传送相应的x参数 GLES20.glUniform1f(landStartYYHandle, 0); GLES20.glUniform1f(landYSpanHandle, 50); //绘制纹理矩形 GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, vCount); } //自动切分纹理产生纹理数组的方法 public float[] generateTexCoor(int bw,int bh) { float[] result=new float[bw*bh*6*2]; float sizew=16.0f/bw;//列数 float sizeh=16.0f/bh;//行数 int c=0; for(int i=0;i<bh;i++) { for(int j=0;j<bw;j++) { //每行列一个矩形,由两个三角形构成,共六个点,12个纹理坐标 float s=j*sizew; float t=i*sizeh; result[c++]=s; result[c++]=t; result[c++]=s; result[c++]=t+sizeh; result[c++]=s+sizew; result[c++]=t; result[c++]=s+sizew; result[c++]=t; result[c++]=s; result[c++]=t+sizeh; result[c++]=s+sizew; result[c++]=t+sizeh; } } return result; } }
[ "bxh7425014@163.com" ]
bxh7425014@163.com
e78053d4b579681a026d4410354a451e0ff05536
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/apache/hadoop/mapred/gridmix/TestGridmixSubmission.java
fa0f34bc7663ff85fdce02800e3bbc94cb7c09eb
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
5,823
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.hadoop.mapred.gridmix; import ExitUtil.ExitException; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.InputStream; import java.io.PrintStream; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.test.GenericTestUtils; import org.apache.hadoop.tools.rumen.JobStoryProducer; import org.apache.hadoop.util.ExitUtil; import org.junit.Assert; import org.junit.Test; import org.slf4j.LoggerFactory; import org.slf4j.event.Level; import static GridmixJobSubmissionPolicy.REPLAY; import static GridmixJobSubmissionPolicy.STRESS; public class TestGridmixSubmission extends CommonJobTest { private static File inSpace = new File((((((("src" + (File.separator)) + "test") + (File.separator)) + "resources") + (File.separator)) + "data")); static { GenericTestUtils.setLogLevel(LoggerFactory.getLogger("org.apache.hadoop.mapred.gridmix"), Level.DEBUG); } /** * Tests the reading of traces in GridMix3. These traces are generated by * Rumen and are in the JSON format. The traces can optionally be compressed * and uncompressed traces can also be passed to GridMix3 via its standard * input stream. The testing is effected via JUnit assertions. * * @throws Exception * if there was an error. */ @Test(timeout = 20000) public void testTraceReader() throws Exception { Configuration conf = new Configuration(); FileSystem lfs = FileSystem.getLocal(conf); Path rootInputDir = new Path(System.getProperty("src.test.data")); rootInputDir = rootInputDir.makeQualified(lfs.getUri(), lfs.getWorkingDirectory()); Path rootTempDir = new Path(System.getProperty("test.build.data", System.getProperty("java.io.tmpdir")), "testTraceReader"); rootTempDir = rootTempDir.makeQualified(lfs.getUri(), lfs.getWorkingDirectory()); Path inputFile = new Path(rootInputDir, "wordcount.json.gz"); Path tempFile = new Path(rootTempDir, "gridmix3-wc.json"); InputStream origStdIn = System.in; InputStream tmpIs = null; try { CommonJobTest.DebugGridmix dgm = new CommonJobTest.DebugGridmix(); JobStoryProducer jsp = dgm.createJobStoryProducer(inputFile.toString(), conf); CommonJobTest.LOG.info("Verifying JobStory from compressed trace..."); verifyWordCountJobStory(jsp.getNextJob()); expandGzippedTrace(lfs, inputFile, tempFile); jsp = dgm.createJobStoryProducer(tempFile.toString(), conf); CommonJobTest.LOG.info("Verifying JobStory from uncompressed trace..."); verifyWordCountJobStory(jsp.getNextJob()); tmpIs = lfs.open(tempFile); System.setIn(tmpIs); CommonJobTest.LOG.info("Verifying JobStory from trace in standard input..."); jsp = dgm.createJobStoryProducer("-", conf); verifyWordCountJobStory(jsp.getNextJob()); } finally { System.setIn(origStdIn); if (tmpIs != null) { tmpIs.close(); } lfs.delete(rootTempDir, true); } } @Test(timeout = 500000) public void testReplaySubmit() throws Exception { CommonJobTest.policy = REPLAY; CommonJobTest.LOG.info((" Replay started at " + (System.currentTimeMillis()))); doSubmission(null, false); CommonJobTest.LOG.info((" Replay ended at " + (System.currentTimeMillis()))); } @Test(timeout = 500000) public void testStressSubmit() throws Exception { CommonJobTest.policy = STRESS; CommonJobTest.LOG.info((" Stress started at " + (System.currentTimeMillis()))); doSubmission(null, false); CommonJobTest.LOG.info((" Stress ended at " + (System.currentTimeMillis()))); } // test empty request should be hint message @Test(timeout = 100000) public void testMain() throws Exception { SecurityManager securityManager = System.getSecurityManager(); final ByteArrayOutputStream bytes = new ByteArrayOutputStream(); final PrintStream out = new PrintStream(bytes); final PrintStream oldOut = System.out; System.setErr(out); ExitUtil.disableSystemExit(); try { String[] argv = new String[0]; main(argv); } catch (ExitUtil e) { assertExceptionContains(ExitUtil.EXIT_EXCEPTION_MESSAGE, e); ExitUtil.resetFirstExitException(); } finally { System.setErr(oldOut); System.setSecurityManager(securityManager); } String print = bytes.toString(); // should be printed tip in std error stream Assert.assertTrue(print.contains("Usage: gridmix [-generate <MiB>] [-users URI] [-Dname=value ...] <iopath> <trace>")); Assert.assertTrue(print.contains("e.g. gridmix -generate 100m foo -")); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
8aac877bdde606531ebe23a557a7c86b7c9a7804
c12e7f3dc9e19b585c06f7452cbd34d39910e230
/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java
6ebdca4e888db01d2d64a80b1a9c68a6ea584fde
[]
no_license
dejunhsu/hapi-fhir
57ac0d34f981637515d7c56909cdeee6afc25e13
84af486d511718f79919e2022d3fce1f4008e6fa
refs/heads/master
2021-01-22T16:10:11.987226
2014-07-17T12:32:01
2014-07-17T12:32:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,421
java
package ca.uhn.fhir.model.dstu.valueset; /* * #%L * HAPI FHIR Library * %% * Copyright (C) 2014 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.util.HashMap; import java.util.Map; import ca.uhn.fhir.model.api.IValueSetEnumBinder; public enum ModalityEnum { /** * Code Value: <b>AR</b> */ AR("AR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>AU</b> */ AU("AU", "http://nema.org/dicom/dcid"), /** * Code Value: <b>BDUS</b> */ BDUS("BDUS", "http://nema.org/dicom/dcid"), /** * Code Value: <b>BI</b> */ BI("BI", "http://nema.org/dicom/dcid"), /** * Code Value: <b>BMD</b> */ BMD("BMD", "http://nema.org/dicom/dcid"), /** * Code Value: <b>CR</b> */ CR("CR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>CT</b> */ CT("CT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>DG</b> */ DG("DG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>DX</b> */ DX("DX", "http://nema.org/dicom/dcid"), /** * Code Value: <b>ECG</b> */ ECG("ECG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>EPS</b> */ EPS("EPS", "http://nema.org/dicom/dcid"), /** * Code Value: <b>ES</b> */ ES("ES", "http://nema.org/dicom/dcid"), /** * Code Value: <b>GM</b> */ GM("GM", "http://nema.org/dicom/dcid"), /** * Code Value: <b>HC</b> */ HC("HC", "http://nema.org/dicom/dcid"), /** * Code Value: <b>HD</b> */ HD("HD", "http://nema.org/dicom/dcid"), /** * Code Value: <b>IO</b> */ IO("IO", "http://nema.org/dicom/dcid"), /** * Code Value: <b>IVOCT</b> */ IVOCT("IVOCT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>IVUS</b> */ IVUS("IVUS", "http://nema.org/dicom/dcid"), /** * Code Value: <b>KER</b> */ KER("KER", "http://nema.org/dicom/dcid"), /** * Code Value: <b>KO</b> */ KO("KO", "http://nema.org/dicom/dcid"), /** * Code Value: <b>LEN</b> */ LEN("LEN", "http://nema.org/dicom/dcid"), /** * Code Value: <b>LS</b> */ LS("LS", "http://nema.org/dicom/dcid"), /** * Code Value: <b>MG</b> */ MG("MG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>MR</b> */ MR("MR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>NM</b> */ NM("NM", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OAM</b> */ OAM("OAM", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OCT</b> */ OCT("OCT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OP</b> */ OP("OP", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OPM</b> */ OPM("OPM", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OPT</b> */ OPT("OPT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OPV</b> */ OPV("OPV", "http://nema.org/dicom/dcid"), /** * Code Value: <b>OT</b> */ OT("OT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>PR</b> */ PR("PR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>PT</b> */ PT("PT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>PX</b> */ PX("PX", "http://nema.org/dicom/dcid"), /** * Code Value: <b>REG</b> */ REG("REG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RF</b> */ RF("RF", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RG</b> */ RG("RG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RTDOSE</b> */ RTDOSE("RTDOSE", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RTIMAGE</b> */ RTIMAGE("RTIMAGE", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RTPLAN</b> */ RTPLAN("RTPLAN", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RTRECORD</b> */ RTRECORD("RTRECORD", "http://nema.org/dicom/dcid"), /** * Code Value: <b>RTSTRUCT</b> */ RTSTRUCT("RTSTRUCT", "http://nema.org/dicom/dcid"), /** * Code Value: <b>SEG</b> */ SEG("SEG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>SM</b> */ SM("SM", "http://nema.org/dicom/dcid"), /** * Code Value: <b>SMR</b> */ SMR("SMR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>SR</b> */ SR("SR", "http://nema.org/dicom/dcid"), /** * Code Value: <b>SRF</b> */ SRF("SRF", "http://nema.org/dicom/dcid"), /** * Code Value: <b>TG</b> */ TG("TG", "http://nema.org/dicom/dcid"), /** * Code Value: <b>US</b> */ US("US", "http://nema.org/dicom/dcid"), /** * Code Value: <b>VA</b> */ VA("VA", "http://nema.org/dicom/dcid"), /** * Code Value: <b>XA</b> */ XA("XA", "http://nema.org/dicom/dcid"), /** * Code Value: <b>XC</b> */ XC("XC", "http://nema.org/dicom/dcid"), ; /** * Identifier for this Value Set: * http://hl7.org/fhir/vs/modality */ public static final String VALUESET_IDENTIFIER = "http://hl7.org/fhir/vs/modality"; /** * Name for this Value Set: * Modality */ public static final String VALUESET_NAME = "Modality"; private static Map<String, ModalityEnum> CODE_TO_ENUM = new HashMap<String, ModalityEnum>(); private static Map<String, Map<String, ModalityEnum>> SYSTEM_TO_CODE_TO_ENUM = new HashMap<String, Map<String, ModalityEnum>>(); private final String myCode; private final String mySystem; static { for (ModalityEnum next : ModalityEnum.values()) { CODE_TO_ENUM.put(next.getCode(), next); if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap<String, ModalityEnum>()); } SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); } } /** * Returns the code associated with this enumerated value */ public String getCode() { return myCode; } /** * Returns the code system associated with this enumerated value */ public String getSystem() { return mySystem; } /** * Returns the enumerated value associated with this code */ public ModalityEnum forCode(String theCode) { ModalityEnum retVal = CODE_TO_ENUM.get(theCode); return retVal; } /** * Converts codes to their respective enumerated values */ public static final IValueSetEnumBinder<ModalityEnum> VALUESET_BINDER = new IValueSetEnumBinder<ModalityEnum>() { @Override public String toCodeString(ModalityEnum theEnum) { return theEnum.getCode(); } @Override public String toSystemString(ModalityEnum theEnum) { return theEnum.getSystem(); } @Override public ModalityEnum fromCodeString(String theCodeString) { return CODE_TO_ENUM.get(theCodeString); } @Override public ModalityEnum fromCodeString(String theCodeString, String theSystemString) { Map<String, ModalityEnum> map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); if (map == null) { return null; } return map.get(theCodeString); } }; /** * Constructor */ ModalityEnum(String theCode, String theSystem) { myCode = theCode; mySystem = theSystem; } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
a1a04119abff3df6e63912a54eb34d86c8969e59
265302da0a7cf8c2f06dd0f96970c75e29abc19b
/ar_webapp/src/main/java/org/kuali/kra/service/impl/CustomAttributeDocumentMaintainableImpl.java
abed22b4add5b407865f246d12f83bbcfd4cbeb4
[ "Apache-2.0", "ECL-2.0" ]
permissive
Ariah-Group/Research
ee7718eaf15b59f526fca6983947c8d6c0108ac4
e593c68d44176dbbbcdb033c593a0f0d28527b71
refs/heads/master
2021-01-23T15:50:54.951284
2017-05-05T02:10:59
2017-05-05T02:10:59
26,879,351
1
1
null
null
null
null
UTF-8
Java
false
false
3,889
java
/* * Copyright 2005-2014 The Kuali Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php * * 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.kuali.kra.service.impl; import org.kuali.kra.award.document.AwardDocument; import org.kuali.kra.bo.CoeusModule; import org.kuali.kra.bo.CustomAttributeDocument; import org.kuali.kra.coi.CoiDisclosureDocument; import org.kuali.kra.institutionalproposal.document.InstitutionalProposalDocument; import org.kuali.kra.irb.ProtocolDocument; import org.kuali.kra.proposaldevelopment.document.ProposalDevelopmentDocument; import org.kuali.rice.kns.maintenance.KualiMaintainableImpl; /** * This class... */ public class CustomAttributeDocumentMaintainableImpl extends KualiMaintainableImpl { /** * * @see * org.kuali.rice.kns.maintenance.KualiMaintainableImpl#prepareForSave() */ @Override public void prepareForSave() { CustomAttributeDocument customAttributeDocument = (CustomAttributeDocument) this.getBusinessObject(); boolean needsTranslated = true; int val = 0; try { val = Integer.parseInt(customAttributeDocument.getDocumentTypeName()); // the getDocumentTypeName is a number, so it needs translated needsTranslated = true; } catch (Exception e) { // getDocumentTypeName has already been translated, so can't do it again. needsTranslated = false; } if (needsTranslated) { customAttributeDocument.setDocumentTypeName(convertModuleNumberToDocumentTypeCode(val)); /** * 1 Award 2 Institute Proposal 3 Development Proposal 4 * Subcontracts 5 Negotiations 6 Person 7 IRB 8 COI Disclosure 9 * IACUC 11 Committee */ } super.prepareForSave(); } /** * | * * This method converts the module number to document type code. * Implemented: 1 Award, 2 Institute Proposal, 3 Development Proposal, 7 * IRB, 8 COI Disclosure. Not Implemented: 4 Subcontracts, 5 Negotiations, 6 * Person, 9 IACUC, 11 Committee. * * @param moduleNumber * @return */ public String convertModuleNumberToDocumentTypeCode(int moduleNumber) { String documentTypeCode = null; switch (moduleNumber) { case CoeusModule.AWARD_MODULE_CODE_INT: { documentTypeCode = AwardDocument.DOCUMENT_TYPE_CODE; break; } case CoeusModule.INSTITUTIONAL_PROPOSAL_MODULE_CODE_INT: { documentTypeCode = InstitutionalProposalDocument.DOCUMENT_TYPE_CODE; break; } case CoeusModule.PROPOSAL_DEVELOPMENT_MODULE_CODE_INT: { documentTypeCode = ProposalDevelopmentDocument.DOCUMENT_TYPE_CODE; break; } case CoeusModule.IRB_MODULE_CODE_INT: { documentTypeCode = ProtocolDocument.DOCUMENT_TYPE_CODE; break; } case CoeusModule.COI_DISCLOSURE_MODULE_CODE_INT: { documentTypeCode = CoiDisclosureDocument.DOCUMENT_TYPE_CODE; break; } default: { throw new IllegalArgumentException("invalid typeName provided: " + documentTypeCode); } } return documentTypeCode; } }
[ "code@ariahgroup.org" ]
code@ariahgroup.org
bb69bf720694a834af4bb04373d607576e39c8aa
f68012957a525271d820cdab67256cf460e31625
/com/drturner/leetcode/jianzhioffer/problem19/RegexIsMatch.java
c82e25f648221c98e82d9d67290fcd23e73b47eb
[]
no_license
Turnarde/leetcode
d6091322d385dccdf4040a73ac7d8f9175129aa7
23ac7bd25aaf65faa460a66caf6fa2d83733fa0f
refs/heads/master
2021-05-18T07:08:08.484102
2020-07-18T01:24:38
2020-07-18T01:24:38
251,171,988
1
0
null
2020-07-18T01:24:39
2020-03-30T01:29:40
Java
UTF-8
Java
false
false
1,071
java
package com.drturner.leetcode.jianzhioffer.problem19; /** * ClassName: RegexIsMatch * Description: TO DO * Author: Drturner * Date: 2020/6/4 * Version: 1.0 */ public class RegexIsMatch { private boolean isMatch(char[] s,int startS, char[] p,int startP) { if (startP>=p.length) return startS>=s.length; boolean ismatch=startS<s.length&&(s[startS]==p[startP]||p[startP]=='.'); if ((startP+1<p.length)&&p[startP+1]=='*'){ return ismatch&&(isMatch(s,startS+1,p,startP))|| (isMatch(s, startS, p, startP+2)); } else { return ismatch&&isMatch(s,startS+1,p,startP+1); } } public boolean isMatch(String s, String p) { if (s==null||p==null) return false; return isMatch(s.toCharArray(),0,p.toCharArray(),0); } public static void main(String[] args) { RegexIsMatch regexIsMatch = new RegexIsMatch(); String s=""; String p=""; boolean match = regexIsMatch.isMatch(s, p); System.out.println(match); } }
[ "you@example.comliu" ]
you@example.comliu
449fd8de555890002417b2bfb8067acd9acde335
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/google/android/gms/measurement/internal/zziu.java
10e42863f05c7c3a672431538fc05f5bed3765a3
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
897
java
package com.google.android.gms.measurement.internal; import android.os.RemoteException; /* access modifiers changed from: package-private */ /* compiled from: com.google.android.gms:play-services-measurement-impl@@18.0.0 */ public final class zziu implements Runnable { private final /* synthetic */ zzn zza; private final /* synthetic */ zzir zzb; zziu(zzir zzir, zzn zzn) { this.zzb = zzir; this.zza = zzn; } public final void run() { zzei zzei = this.zzb.zzb; if (zzei == null) { this.zzb.zzq().zze().zza("Failed to reset data on the service: not connected to service"); return; } try { zzei.zzd(this.zza); } catch (RemoteException e) { this.zzb.zzq().zze().zza("Failed to reset data on the service: remote exception", e); } this.zzb.zzaj(); } }
[ "nganht2@vng.com.vn" ]
nganht2@vng.com.vn
4ee58dc64d46d6bb22de7153402db2dc81ec2f1e
19490fcc6f396eeb35a9234da31e7b615abf6d04
/JDownloader/src/jd/gui/swing/jdgui/views/settings/panels/basicauthentication/AuthTable.java
9132dff7fd9f1921c3ff1f3b5047fc93be258ba7
[]
no_license
amicom/my-project
ef72026bb91694e74bc2dafd209a1efea9deb285
951c67622713fd89448ffe6e0983fe3f934a7faa
refs/heads/master
2021-01-02T09:15:45.828528
2015-09-06T15:57:01
2015-09-06T15:57:01
41,953,961
0
0
null
null
null
null
UTF-8
Java
false
false
1,289
java
package jd.gui.swing.jdgui.views.settings.panels.basicauthentication; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import javax.swing.JPopupMenu; import jd.gui.swing.jdgui.BasicJDTable; import org.appwork.swing.exttable.ExtColumn; import org.jdownloader.auth.AuthenticationInfo; public class AuthTable extends BasicJDTable<AuthenticationInfo> { private static final long serialVersionUID = 1L; public AuthTable() { super(new AuthTableModel()); this.setSearchEnabled(true); } @Override protected JPopupMenu onContextMenu(JPopupMenu popup, AuthenticationInfo contextObject, java.util.List<AuthenticationInfo> selection, ExtColumn<AuthenticationInfo> col, MouseEvent ev) { popup.add(new NewAction(this)); popup.add(new RemoveAction(this, selection, false)); return popup; } /* * (non-Javadoc) * * @see * org.appwork.swing.exttable.ExtTable#onShortcutDelete(java.util.ArrayList * , java.awt.event.KeyEvent, boolean) */ @Override protected boolean onShortcutDelete(java.util.List<AuthenticationInfo> selectedObjects, KeyEvent evt, boolean direct) { new RemoveAction(this, selectedObjects, direct).actionPerformed(null); return true; } }
[ "amicom.pro@gmail.com" ]
amicom.pro@gmail.com
8a5422693de07c602b3646949e505d1be88c2ab3
c69f7d4def27e73a47d6710e46cf032c6dbfe23f
/src/net/sourceforge/plantuml/sequencediagram/teoz/MainTileAdapter.java
367a2a07edacbd43eca5f7ec156abe6026c4c779
[ "MIT" ]
permissive
mphilipps/plantuml
0499b5c74a34b664c73877bfeca136c7809bd6eb
fa32bd4c1b2070f4b64a00ae45c37fd6327a3cfb
refs/heads/master
2020-04-02T05:19:35.164422
2016-08-03T14:27:19
2016-08-03T14:27:19
64,850,134
0
0
null
null
null
null
UTF-8
Java
false
false
3,996
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, Arnaud Roques * * Project Info: http://plantuml.com * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * * Original Author: Arnaud Roques */ package net.sourceforge.plantuml.sequencediagram.teoz; import java.awt.geom.Dimension2D; import net.sourceforge.plantuml.Dimension2DDouble; import net.sourceforge.plantuml.graphic.AbstractTextBlock; import net.sourceforge.plantuml.graphic.StringBounder; import net.sourceforge.plantuml.graphic.TextBlock; import net.sourceforge.plantuml.graphic.VerticalAlignment; import net.sourceforge.plantuml.real.Real; import net.sourceforge.plantuml.skin.Context2D; import net.sourceforge.plantuml.skin.SimpleContext2D; import net.sourceforge.plantuml.ugraphic.UGraphic; import net.sourceforge.plantuml.ugraphic.UTranslate; public class MainTileAdapter extends AbstractTextBlock implements TextBlock { private final MainTile mainTile; private Dimension2D cacheDimension; public MainTileAdapter(MainTile mainTile) { if (mainTile == null) { throw new IllegalArgumentException(); } this.mainTile = mainTile; } public Dimension2D calculateDimension(StringBounder stringBounder) { if (cacheDimension == null) { final double width = mainTile.getMaxX(stringBounder).getCurrentValue() - mainTile.getMinX(stringBounder).getCurrentValue(); final int factor = mainTile.isShowFootbox() ? 2 : 1; final double height = mainTile.getPreferredHeight(stringBounder) + factor * mainTile.getLivingSpaces().getHeadHeight(stringBounder); cacheDimension = new Dimension2DDouble(width, height); } return cacheDimension; } public void drawU(UGraphic ug) { final StringBounder stringBounder = ug.getStringBounder(); final Context2D context = new SimpleContext2D(false); final double height = mainTile.getPreferredHeight(stringBounder); final LivingSpaces livingSpaces = mainTile.getLivingSpaces(); final double headHeight = livingSpaces.getHeadHeight(stringBounder); mainTile.drawU(ug.apply(new UTranslate(0, headHeight))); livingSpaces.drawLifeLines(ug.apply(new UTranslate(0, headHeight)), height, context); livingSpaces.drawHeads(ug, context, VerticalAlignment.BOTTOM); if (mainTile.isShowFootbox()) { livingSpaces.drawHeads(ug.apply(new UTranslate(0, height + headHeight)), context, VerticalAlignment.TOP); } mainTile.drawForeground(ug.apply(new UTranslate(0, headHeight))); } public Real getMinX(StringBounder stringBounder) { return mainTile.getMinX(stringBounder); } }
[ "mphilipps@saltation.de" ]
mphilipps@saltation.de
67c36c18d4b3a689e244c40934b53961dfe9d22f
f2893b3141066418b72f1348da6d6285de2512c6
/modelViewPresenter/presentationModel/basic/src/main/java/usantatecla/tictactoe/views/View.java
fc98efa69ca921fb90b379c475cdf6a5b6e229a6
[]
no_license
x-USantaTecla-game-connect4/java.swing.socket.sql
26f8028451aab3c8e5c26db1b1509e6e84108b0d
28dcc3879d782ace1752c2970d314498ee50b243
refs/heads/master
2023-09-01T11:43:43.053572
2021-10-16T16:19:50
2021-10-16T16:19:50
417,161,784
0
1
null
null
null
null
UTF-8
Java
false
false
763
java
package usantatecla.tictactoe.views; import usantatecla.tictactoe.controllers.PlayController; import usantatecla.tictactoe.controllers.ResumeController; import usantatecla.tictactoe.controllers.StartController; public abstract class View { protected StartController startController; protected PlayController playController; protected ResumeController resumeController; public View(StartController startController, PlayController playController, ResumeController resumeController) { this.startController = startController; this.playController = playController; this.resumeController = resumeController; } public abstract void start(); public abstract void play(); public abstract boolean resume(); }
[ "setillofm@gmail.com" ]
setillofm@gmail.com
93b571af65bf214be825f048c737bee5ad4d83d8
e42574d20caa0377aa6405ebabd34e49ced06f1a
/crawler/source code/src/main/java/com/durianeng/crawler/dto/FiveOneVOAAticle.java
c2f9ae352467bb65d4ed11001926d2720876916b
[]
no_license
EdenSun/DurianEnglish
2ff85b2be033ebd7a11e5bc0348da3e7fd16f42c
7354366e6bb2952e0427a10b1c5eb2e2c3cde9d4
refs/heads/master
2016-08-13T00:05:31.319809
2016-04-27T15:23:16
2016-04-27T15:23:16
54,530,254
0
0
null
null
null
null
UTF-8
Java
false
false
1,862
java
package com.durianeng.crawler.dto; import java.util.Date; import java.util.List; /** * Created by Eden on 2016/3/23. */ public class FiveOneVOAAticle { private String title; private String content; private List<String> tags; private String category; private Date createDate; private List<FiveOneVoaArticleImage> images; private String mp3FileUrl; private String lrcFileUrl; private String translate; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public List<String> getTags() { return tags; } public void setTags(List<String> tags) { this.tags = tags; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public List<FiveOneVoaArticleImage> getImages() { return images; } public void setImages(List<FiveOneVoaArticleImage> images) { this.images = images; } public String getMp3FileUrl() { return mp3FileUrl; } public void setMp3FileUrl(String mp3FileUrl) { this.mp3FileUrl = mp3FileUrl; } public String getLrcFileUrl() { return lrcFileUrl; } public void setLrcFileUrl(String lrcFileUrl) { this.lrcFileUrl = lrcFileUrl; } public String getTranslate() { return translate; } public void setTranslate(String translate) { this.translate = translate; } }
[ "durian.suen@gmail.com" ]
durian.suen@gmail.com
0d906b1a5f314717952aa9cce4e4e5d29f027151
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_3/src/g/d/i/Calc_1_3_6383.java
fdd5b44445c8f5c1ae04bda15a5da4c7d7fcca16
[]
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
131
java
package g.d.i; public class Calc_1_3_6383 { /** @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
bc21a88a3cc7b6bd4ac93a948f6cd60690535a36
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/kyc/fragment/e/a/j.java
cd035b51fd72e18d8d2cc3c0b19bcb42ac554d16
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
423
java
package com.iqoption.kyc.fragment.e.a; import android.view.View; import android.view.View.OnClickListener; import com.iqoption.microservice.a.a.a.a; final /* synthetic */ class j implements OnClickListener { private final h cNo; private final a cNp; j(h hVar, a aVar) { this.cNo = hVar; this.cNp = aVar; } public void onClick(View view) { this.cNo.b(this.cNp, view); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
bf38583d01740443adc13f5a6d89b4b9d35034bd
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/7/301.java
d3d8ef616f2d5ace3687cc7178f648fca15fcc51
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
970
java
package <missing>; public class GlobalMembers { public static int Main() { String string = new String(new char[256]); String substring = new String(new char[256]); String replacement = new String(new char[256]); int i; int j; int len1; int len2; int ex = 0; int a = 0; int shit = 0; String = new Scanner(System.in).nextLine(); substring = new Scanner(System.in).nextLine(); replacement = new Scanner(System.in).nextLine(); len1 = String.length(); len2 = substring.length(); for (i = 0;i < len1;i++) { for (j = 0;j < len2;j++) { if (String[i + j] == substring.charAt(j)) { ex++; } if (ex == len2 && shit == 0) { shit = 1; for (j = a;j < i;j++) { System.out.printf("%c",string.charAt(j)); } System.out.printf("%s",replacement); a = i + len2; } } ex = 0; } for (j = a;j < len1;j++) { System.out.printf("%c",string.charAt(j)); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ec7e63a6f353a448ef3039853835db70d228a4ce
6e6f0a4518a323e1a863beedc6c2ea641ba266e6
/client-apis/health-api/src/main/java/org/wildfly/swarm/health/HealthResponseProvider.java
dbb5ce3171233c232ae424e75502d1ef8cc23b67
[ "Apache-2.0" ]
permissive
dbenninger/wildfly-swarm
75a207ce0bf2b9f2eb2fe4583cc2b9c746a231f4
4271ef76c4881a23ed7c22d7912add184c6b98de
refs/heads/master
2021-08-20T05:24:21.721249
2017-11-28T07:46:50
2017-11-28T07:46:50
111,907,014
0
0
null
2017-11-24T10:38:11
2017-11-24T10:38:11
null
UTF-8
Java
false
false
414
java
package org.wildfly.swarm.health; import org.eclipse.microprofile.health.HealthCheckResponseBuilder; import org.eclipse.microprofile.health.spi.HealthCheckResponseProvider; /** * Created by hbraun on 07.07.17. */ public class HealthResponseProvider implements HealthCheckResponseProvider { @Override public HealthCheckResponseBuilder createResponseBuilder() { return new BuilderImpl(); } }
[ "bob@mcwhirter.org" ]
bob@mcwhirter.org
c08ae94097984434149bedf713c912ce81fd4323
50c938319240188c4363379562b264847e6ced0b
/src/main/java/br/com/goobras/config/Constants.java
87800df7dde168a17e7e4b79b5c93b2425efeaaa
[]
no_license
matheushchaves/goobrasbe
3818c84f192849fc7801d67baf96a345ac4f8eb1
526a4418bcbcf2e935d9041e06ed086531367f9c
refs/heads/main
2023-04-08T00:11:07.291986
2021-04-14T01:45:57
2021-04-14T01:45:57
357,740,158
0
0
null
null
null
null
UTF-8
Java
false
false
178
java
package br.com.goobras.config; /** * Application constants. */ public final class Constants { public static final String SYSTEM = "system"; private Constants() {} }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
99e0ae394cf58327cbe749a3fa8a32fe0c1314dd
77972bb4d35dac3f8d7a243fa72fa3af6a5737ae
/shop-api/src/main/java/com/xgit/bj/shop/beans/param/goods/GoodsParam.java
09f7e9498e220f9e39d7cbbc2117182e5c4564e5
[]
no_license
daweifly1/xgit-shop-pom
cdd6df10d2d6d1dda24c2aed13f76acc97f36bb3
dcb147b1f7137a59e16dd3d46272d8f46537678c
refs/heads/master
2020-04-27T06:26:15.817019
2019-03-26T06:32:41
2019-03-26T06:32:41
174,107,951
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
package com.xgit.bj.shop.beans.param.goods; import com.xgit.bj.shop.beans.vo.goods.GoodsAttributeImgVO; import com.xgit.bj.shop.beans.vo.goods.GoodsAttributeValueVO; import com.xgit.bj.shop.beans.vo.goods.GoodsFullReductionVO; import com.xgit.bj.shop.beans.vo.goods.GoodsLadderVO; import com.xgit.bj.shop.beans.vo.goods.GoodsVO; import com.xgit.bj.shop.beans.vo.goods.MemberPriceVO; import com.xgit.bj.shop.beans.vo.goods.SkuStockVO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; import java.util.List; @Data @ToString public class GoodsParam extends GoodsVO { @ApiModelProperty("商品的sku库存信息") private List<SkuStockVO> skuStockList; @ApiModelProperty("商品颜色属性对应的图片信息") private List<GoodsAttributeImgVO> goodsAttributeImgs; @ApiModelProperty("商品阶梯价格设置") private List<GoodsLadderVO> productLadderList; @ApiModelProperty("商品满减价格设置") private List<GoodsFullReductionVO> goodsFullReductionVOList; @ApiModelProperty("商品会员价格设置") private List<MemberPriceVO> memberPriceList; @ApiModelProperty("商品参数及自定义规格属性") private List<GoodsAttributeValueVO> goodsAttributeValueVOList; // @ApiModelProperty("专题和商品关系") // private List<CmsSubjectProductRelation> subjectProductRelationList; // @ApiModelProperty("优选专区和商品的关系") // private List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList; }
[ "tigerwer@126.com" ]
tigerwer@126.com
8d9d94f77c8d30367a3e28441798246c1645dc21
324b6686cf7b5b8e2a2302af998a1774394b308f
/src/main/java/mcjty/rftools/blocks/teleporter/SimpleDialerTileEntity.java
e0ff81debb7d23a230204137ee4800870c4270cc
[ "MIT" ]
permissive
4rz0/RFTools
192cbf093be2f91746c1877241a151f94c1b1b29
76a012b52ad7b7b255b1b9ea6164b4c74c601c72
refs/heads/master
2021-01-15T18:45:45.369610
2015-08-30T06:09:46
2015-08-30T06:09:46
41,792,663
0
0
null
2015-09-02T09:33:19
2015-09-02T09:33:19
null
UTF-8
Java
false
false
3,456
java
package mcjty.rftools.blocks.teleporter; import mcjty.entity.GenericTileEntity; import mcjty.varia.BlockTools; import mcjty.varia.Coordinate; import mcjty.varia.GlobalCoordinate; import net.minecraft.nbt.NBTTagCompound; public class SimpleDialerTileEntity extends GenericTileEntity { GlobalCoordinate transmitter; Integer receiver; private int prevValue = -1; private boolean onceMode = false; public SimpleDialerTileEntity() { } @Override public boolean canUpdate() { return false; } @Override protected void checkStateServer() { // Update is called manuall which is why canUpdate() returns false. super.checkStateServer(); if (transmitter == null) { return; } int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); int newvalue = BlockTools.getRedstoneSignalIn(meta) ? 1 : 0; if (newvalue != prevValue) { prevValue = newvalue; if (newvalue == 1) { TeleportDestinations destinations = TeleportDestinations.getDestinations(worldObj); Coordinate coordinate = null; int dim = 0; if (receiver != null) { GlobalCoordinate gc = destinations.getCoordinateForId(receiver); if (gc != null) { coordinate = gc.getCoordinate(); dim = gc.getDimension(); } } TeleportationTools.dial(worldObj, null, null, transmitter.getCoordinate(), transmitter.getDimension(), coordinate, dim, onceMode); } } } public boolean isOnceMode() { return onceMode; } public void setOnceMode(boolean onceMode) { this.onceMode = onceMode; markDirty(); worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } @Override public void readFromNBT(NBTTagCompound tagCompound) { super.readFromNBT(tagCompound); } @Override public void readRestorableFromNBT(NBTTagCompound tagCompound) { super.readRestorableFromNBT(tagCompound); if (tagCompound.hasKey("transX")) { transmitter = new GlobalCoordinate(new Coordinate(tagCompound.getInteger("transX"), tagCompound.getInteger("transY"), tagCompound.getInteger("transZ")), tagCompound.getInteger("transDim")); } else { transmitter = null; } if (tagCompound.hasKey("receiver")) { receiver = tagCompound.getInteger("receiver"); } else { receiver = null; } onceMode = tagCompound.getBoolean("once"); } @Override public void writeToNBT(NBTTagCompound tagCompound) { super.writeToNBT(tagCompound); } @Override public void writeRestorableToNBT(NBTTagCompound tagCompound) { super.writeRestorableToNBT(tagCompound); if (transmitter != null) { tagCompound.setInteger("transX", transmitter.getCoordinate().getX()); tagCompound.setInteger("transY", transmitter.getCoordinate().getY()); tagCompound.setInteger("transZ", transmitter.getCoordinate().getZ()); tagCompound.setInteger("transDim", transmitter.getDimension()); } if (receiver != null) { tagCompound.setInteger("receiver", receiver); } tagCompound.setBoolean("once", onceMode); } }
[ "mcjty1@gmail.com" ]
mcjty1@gmail.com
800cae0cb6606edb8c5470b918a26f527596e11e
afc040a7aabe058028ffc8045b2147f4ee2abd94
/src/main/java/org/geometrycommands/RandomCommand.java
60a7df1838b8a7435cccb63dfb9980dd78b442d5
[ "MIT" ]
permissive
jericks/geometrycommands
c040aa2aa4cea53069580c491dc3f781ccc5c255
4ca3f6f7d8416e8f41d6bcdc5c6a2db7db7a5b8f
refs/heads/master
2022-10-16T00:28:42.800757
2022-10-04T23:10:46
2022-10-04T23:10:46
3,107,312
8
1
MIT
2020-07-07T23:03:08
2012-01-05T02:43:22
Java
UTF-8
Java
false
false
6,137
java
package org.geometrycommands; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.Polygonal; import org.locationtech.jts.shape.random.RandomPointsBuilder; import org.locationtech.jts.shape.random.RandomPointsInGridBuilder; import java.io.Reader; import java.io.Writer; import org.geometrycommands.RandomCommand.RandomOptions; import org.kohsuke.args4j.Option; /** * A Command that generates random Points inside the input Geometry or Envelope * @author Jared Erickson */ public class RandomCommand extends GeometryCommand<RandomOptions> { /** * Get the name of the Command * @return The name of the Command */ @Override public String getName() { return "random"; } /** * Get the description of what the Command does * @return The description of what the Command does */ @Override public String getDescription() { return "Generate random points inside the input geometry."; } /** * Get a new RandomOptions * @return The new RandomOptions */ @Override public RandomOptions getOptions() { return new RandomOptions(); } /** * Generate random Points inside the input Geometry or Envelope * @param geometry The input Geometry * @param options The RandomOptions * @param reader The java.io.Reader * @param writer The java.io.Writer * @throws Exception if an error occurs */ @Override protected void processGeometry(Geometry geometry, RandomOptions options, Reader reader, Writer writer) throws Exception { if (!(geometry instanceof Polygonal)) { geometry = geometry.getEnvelope(); } if (!(geometry instanceof Polygonal)) { throw new IllegalArgumentException("Geometry must be a Polygon or MultiPolygon!"); } Geometry randomGeometry; if (options.isGridded()) { RandomPointsInGridBuilder builder = new RandomPointsInGridBuilder(); builder.setExtent(geometry.getEnvelopeInternal()); builder.setNumPoints(options.getNumber()); builder.setConstrainedToCircle(options.isConstrainedToCircle()); if (!Double.isNaN(options.getGutterFraction())) { builder.setGutterFraction(options.getGutterFraction()); } randomGeometry = builder.getGeometry(); } else { RandomPointsBuilder builder = new RandomPointsBuilder(); builder.setExtent(geometry); builder.setNumPoints(options.getNumber()); randomGeometry = builder.getGeometry(); } writer.write(writeGeometry(randomGeometry, options)); } /** * The RandomOptions */ public static class RandomOptions extends GeometryOptions { /** * The number of points */ @Option(name = "-n", aliases = "--number", usage = "The number of points", required = true) private int number; /** * The flag for whether the random points should be gridded. */ @Option(name = "-r", aliases = "--gridded", usage = "The flag for whether the random points should be gridded.", required = false) private boolean gridded; /** * The flag for whether the random points should be constrained to a circle when gridded. */ @Option(name = "-c", aliases = "--constrained", usage = "The flag for whether the random points should be constrained to a circle when gridded.", required = false) private boolean constrainedToCircle; /** * The gutter distance or padding for random points when gridded. */ @Option(name = "-f", aliases = "--gutterFraction", usage = "The gutter distance or padding for random points when gridded.", required = false) private double gutterFraction = Double.NaN; /** * Get the number of points * @return The number of points */ public int getNumber() { return number; } /** * Set the number of points * @param number The number of points */ public void setNumber(int number) { this.number = number; } /** * Get the flag for whether the random points should be constrained to a circle when gridded. * @return The flag for whether the random points should be constrained to a circle when gridded. */ public boolean isConstrainedToCircle() { return constrainedToCircle; } /** * Set the flag for whether the random points should be constrained to a circle when gridded. * @param constrainedToCircle The flag for whether the random points should be constrained to a circle when gridded. */ public void setConstrainedToCircle(boolean constrainedToCircle) { this.constrainedToCircle = constrainedToCircle; } /** * Get the flag for whether the random points should be gridded. * @return The flag for whether the random points should be gridded. */ public boolean isGridded() { return gridded; } /** * Set the flag for whether the random points should be gridded. * @param gridded The flag for whether the random points should be gridded. */ public void setGridded(boolean gridded) { this.gridded = gridded; } /** * Get the gutter distance or padding for random points when gridded. * @return The gutter distance or padding for random points when gridded. */ public double getGutterFraction() { return gutterFraction; } /** * Set the gutter distance or padding for random points when gridded. * @param gutterFraction The gutter distance or padding for random points when gridded. */ public void setGutterFraction(double gutterFraction) { this.gutterFraction = gutterFraction; } } }
[ "jared.erickson@gmail.com" ]
jared.erickson@gmail.com
250a477e726e99c349e436ecea78666796cba0f8
994501719c6300b9c94940995932f1c903e710b8
/jikes_tests/TestCompare.java
0d61e5c2f53ecbdd3dc62f615ac0aed85e0b95c5
[]
no_license
qingw/haskell-java-parser
d4fd018cb92787f275cf98be6202a679e958d472
4effc3f225f12f49deb36b87175dc5a66fb93776
refs/heads/master
2021-01-17T22:42:19.829354
2010-10-22T06:06:02
2010-10-22T06:06:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,005
java
// This software is subject to the terms of the IBM Jikes Compiler // License Agreement available at the following URL: // http://www.ibm.com/research/jikes. // Copyright (C) 1996, 1999, International Business Machines Corporation // and others. All Rights Reserved. // You must accept the terms of that agreement to use this software. // TestCompare class Test { public static void main(String args[]) { zero_cmp(); i_cmp(); l_cmp(); f_cmp(); d_cmp(); a_cmp(); null_cmp(); } static void zero_cmp() { int i = -1; System.out.print("\nwant: 100110\n got: "); if (i != 0) System.out.print(1); else System.out.print(0); // ifeq if (i == 0) System.out.print(1); else System.out.print(0); // ifne if (i >= 0) System.out.print(1); else System.out.print(0); // iflt if (i < 0) System.out.print(1); else System.out.print(0); // ifge if (i <= 0) System.out.print(1); else System.out.print(0); // ifgt if (i > 0) System.out.print(1); else System.out.print(0); // ifle System.out.println(); } static void i_cmp() { int i = -1; int j = 0; System.out.print("\nwant: 100110\n got: "); if (i != j) System.out.print(1); else System.out.print(0); // if_icmpeq if (i == j) System.out.print(1); else System.out.print(0); // if_icmpne if (i >= j) System.out.print(1); else System.out.print(0); // if_icmplt if (i < j) System.out.print(1); else System.out.print(0); // if_icmpge if (i <= j) System.out.print(1); else System.out.print(0); // if_icmpgt if (i > j) System.out.print(1); else System.out.print(0); // if_icmple System.out.println(); } static void l_cmp() { long a = 1; long b = 2; System.out.print("\nwant: 100010001\n got: "); if (a < b) System.out.print(1); else System.out.print(0); // lcmp(-1) if (a == b) System.out.print(1); else System.out.print(0); if (a > b) System.out.print(1); else System.out.print(0); if (a < a) System.out.print(1); else System.out.print(0); if (a == a) System.out.print(1); else System.out.print(0); // lcmp(0) if (a > a) System.out.print(1); else System.out.print(0); if (b < a) System.out.print(1); else System.out.print(0); if (b == a) System.out.print(1); else System.out.print(0); if (b > a) System.out.print(1); else System.out.print(0); // lcmp(1) System.out.println(); } static void f_cmp() { float a = 1; float b = 2; System.out.print("\nwant: 100010001\n got: "); if (a < b) System.out.print(1); else System.out.print(0); // fcmp[lg](-1) if (a == b) System.out.print(1); else System.out.print(0); if (a > b) System.out.print(1); else System.out.print(0); if (a < a) System.out.print(1); else System.out.print(0); if (a == a) System.out.print(1); else System.out.print(0); // fcmp[lg](0) if (a > a) System.out.print(1); else System.out.print(0); if (b < a) System.out.print(1); else System.out.print(0); if (b == a) System.out.print(1); else System.out.print(0); if (b > a) System.out.print(1); else System.out.print(0); // fcmp[lg](1) System.out.println(); } static void d_cmp() { double a = 1; double b = 2; System.out.print("\nwant: 100010001\n got: "); if (a < b) System.out.print(1); else System.out.print(0); // dcmp[lg](-1) if (a == b) System.out.print(1); else System.out.print(0); if (a > b) System.out.print(1); else System.out.print(0); if (a < a) System.out.print(1); else System.out.print(0); if (a == a) System.out.print(1); else System.out.print(0); // dcmp[lg](0) if (a > a) System.out.print(1); else System.out.print(0); if (b < a) System.out.print(1); else System.out.print(0); if (b == a) System.out.print(1); else System.out.print(0); if (b > a) System.out.print(1); else System.out.print(0); // dcmp[lg](1) System.out.println(); } static void a_cmp() { Object a = null; Object b = null; System.out.print("\nwant: 10\n got: "); if (a == b) System.out.print(1); else System.out.print(0); // if_acmpne if (a != b) System.out.print(1); else System.out.print(0); // if_acmpeq System.out.println(); } static void null_cmp() { Object o = null; System.out.print("\nwant: 10\n got: "); if (o == null) System.out.print(1); else System.out.print(0); // ifnonnull if (o != null) System.out.print(1); else System.out.print(0); // ifnull System.out.println(); } }
[ "dt@facebook.com" ]
dt@facebook.com
14e3c9160e57b2f0e69dbbe698c6527f55b02ad7
15710c5ac7cb8ad4358f55f3eea88fcc6796d8f1
/ODE_Tooladapter/ode.tooladapter/interface_ThriftContract/dependability/hara/typed/THazardType.java
efade5edb58ad503b2072f0088c5c37d5813a017
[ "MIT", "Apache-2.0", "BSD-3-Clause" ]
permissive
DEIS-Project-EU/DDI-Scripting-Tools
88da26baca23924f625d16c0a66a91afc8cee1e0
a234b7f25500080a421685d4692e8a5b20033b2e
refs/heads/master
2021-07-01T08:51:05.675539
2021-06-18T06:46:50
2021-06-18T06:46:50
169,675,373
7
1
MIT
2021-06-18T06:46:50
2019-02-08T02:34:12
C#
UTF-8
Java
false
false
1,732
java
package dependability.hara.typed; import java.util.List; import base.iface.IBaseElement; import thriftContract.TDDIHazardType; import thriftContract.TDDIKeyValueMap; public class THazardType implements IBaseElement { private TDDIHazardType thriftElement; private THazardType(TDDIHazardType thriftElement) { this.thriftElement = thriftElement; } public static THazardType wrap(TDDIHazardType thriftElement) { return new THazardType(thriftElement); } public TDDIHazardType unwrap() { return thriftElement; } @Override public boolean isSetId() { return thriftElement.isSetId(); } @Override public long getId() { return thriftElement.getId(); } @Override public boolean isSetName() { return thriftElement.isSetName(); } @Override public String getName() { return thriftElement.getName(); } @Override public boolean isSetDescription() { return thriftElement.isSetDescription(); } @Override public String getDescription() { return thriftElement.getDescription(); } @Override public boolean isSetKeyValueMaps() { return thriftElement.isSetKeyValueMaps(); } @Override public List<TDDIKeyValueMap> getKeyValueMaps() { return thriftElement.getKeyValueMaps(); } @Override public void setKeyValueMaps(List<TDDIKeyValueMap> tKeyValueMaps){ thriftElement.setKeyValueMaps(tKeyValueMaps); } @Override public void setId(long id) { thriftElement.setId(id); thriftElement.setIdIsSet(true); } @Override public void setName(String name) { thriftElement.setName(name); thriftElement.setNameIsSet(true); } @Override public void setDescription(String description) { thriftElement.setDescription(description); thriftElement.setDescriptionIsSet(true); } }
[ "josh.frey89@gmail.com" ]
josh.frey89@gmail.com
6a08ece7cd34fabebdfff655a915762391a8f3be
8513787f9666b3edd7c230a6699ae0200f9bce76
/app/src/main/java/com/psi/easymanager/config/Constants.java
79ec0c8ddb9c85dea97cff21edb4e5db090c4f8d
[]
no_license
474843468/em
c0296da454bbb7b4ff28fd25b83d0e53c5463123
3fdc191c8809528358401f2fc7f9e41ca84fea7f
refs/heads/master
2021-01-23T16:35:16.647969
2017-06-04T09:18:59
2017-06-04T09:18:59
93,302,779
0
0
null
null
null
null
UTF-8
Java
false
false
7,875
java
package com.psi.easymanager.config; /** * 常量类 * Created by zjq on 16/1/4. */ public class Constants { /** * 每一页菜单数量 */ public static final int ONE_PAGE_MENU_NUM = 16; /** * 加密盐 */ public static final String SALT = "ap4rf7ax"; /** * Smack 端口 */ public static final int PORT = 5222; //TAG 用于标记添加到栈内的Fragment /** * TAG-CashBillFragment */ public static final String CASH_BILL_TAG = "CashBill"; /** * TAG-CashMenuFragment */ public static final String CASH_MENU_TAG = "CashMenu"; /** * TAG-FindBillFragment */ public static final String FIND_BILL_TAG = "FindBill"; /** * TAG-CheckOutFragment */ public static final String CHECK_OUT_TAG = "CheckOut"; /** * TAG-AboutFireFragment */ public static final String ABOUT_FIRE_TAG = "AboutFire"; /** * TAG-BusinessModelFragment */ public static final String BUSINESS_MODEL_TAG = "BusinessModel"; /** * TAG-LabelPrintFragment */ public static final String LABEL_PRINT_TAG = "LabelPrintModel"; /** * TAG-BTPrintSettingFragment */ public static final String BT_PRINT_TAG = "BTPrintTag"; /** * TAG-OrdinaryPrinterFragment */ public static final String ORDINARY_PRINTER_TAG = "OrdinaryPrinter"; /** * TAG-PermissionSetFragment */ public static final String PERMISSION_SET_TAG = "PermissionSet"; /** * TAG-UploadSettingFragment */ public static final String UPLOAD_SETTING_TAG = "UploadSetting"; /** * TAG-StartBillFragment */ public static final String START_BILL_TAG = "StartBill"; /** * TAG-ModifyBillFragment */ public static final String MODIFY_BILL_TAG = "ModifyBill"; /** * TAG-OverBillSaleListFragment */ public static final String OVER_BILL_SALE_LIST = "OverBillSaleList"; /** * TAG-OverBillSaleContentFragment */ public static final String OVER_BILL_SALE_CONTENT = "OverBillSaleContent"; /** * TAG-OverBillCollectionListFragment */ public static final String OVER_BILL_COLLECTION_LIST = "OverBillCollectionList"; /** * TAG-OverBillCollectionContentFragment */ public static final String OVER_BILL_COLLECTION_CONTENT = "OverBillCollectionContent"; /** * TAG-OverBillDetailListFragment */ public static final String OVER_BILL_DETAIL_LIST = "OverBillDetailList"; /** * TAG-OverBillDetailsContentFragment */ public static final String OVER_BILL_DETAILS_CONTENT = "OverBillDetailsContent"; /** * TAG-AddReserveFragment */ public static final String ADD_RESERVE = "AddReserve"; /** * TAG-ModifyReserveFragment */ public static final String MODIFY_RESERVE = "ModifyReserve"; /** * TAG-ReserveDetail */ public static final String RESERVE_DETAIL = "ReserveDetail"; /** * TAG-AddMember */ public static final String ADD_MEMBER_TAG = "AddMember"; /** * TAG-VipInfoCenterOperation */ public static final String VIPINFOOPERATIONCENTER = "VipInfoOperationCenter"; /** * TAG-VipInfoChargeAndRecharge */ public static final String VIPINFOCHARGEANDRECHARGE = "VipInfoChargeAndRecharge"; /** * TAG-MemberDetail */ public static final String MEMBER_DETAIL_TAG = "MemberDetail"; /** * TAG-MemberFuzzyQuery */ public static final String MEMBER_FUZZY_QUERY_TAG = "MemberFuzzyQuery"; /** * TAG-CashMenuFuzzyQuery */ public static final String CASH_MENU_FUZZY_QUERY_TAG = "CashMenuFuzzyQuery"; /** * TAG-CustomProduct */ public static final String CUSTOM_PRODUCT_TAG = "CustomProduct"; /** * TAG-WingPayDetail */ public static final String WING_PAY_DETAIL_TAG = "WingPayDetail"; /** * TAG-WxPayDetail */ public static final String WX_PAY_DETAIL_TAG = "WxPayDetail"; /** * TAG-AddCombo */ public static final String ADD_COMBO = "AddCombo"; /** * TAG-EditCombo */ public static final String EDIT_COMBO = "EditCombo"; /** * Tag-ShiftOrderCollect */ public static final String SHIFT_ORDER_COLLECT_TAG = "ShiftOrderCollect"; /** * Tag-ShiftCateCollect */ public static final String SHIFT_CATE_COLLECT_TAG = "ShiftCateCollect"; /** * Tag-ShiftBillCollect */ public static final String SHIFT_BILL_COLLECT_TAG = "ShiftBillCollect"; /** * Tag-ExistCombo */ public static final String EXIST_COMBO_TAG = "ExistCombo"; //Switch 用于控制启动时tab开关的标记 /** * Switch-OrdinaryPrint */ public static final String SWITCH_ORDINARY_PRINT = "SwitchOrdinaryPrint"; /** * init_storeNum */ public static String INIT_STORE_NUM = "InitStoreNum"; /** * init_storePsd */ public static String INIT_STORE_PSD = "InitStorePsd"; /** * save store Num */ public static String SAVE_STORE_NUM = "storeNum"; /** * save store Pwd */ public static String SAVE_STORE_PWD = "storePwd"; /** * save login Name */ public static String SAVE_LOGIN_NAME = "loginUserName"; /** * save login Pwd */ public static String SAVE_LOGIN_PWD = "loginUserPwd"; /** * remember pwd */ public static String REMEMBER_PWD = "rememberPwd"; /** * is init */ public static String IS_INIT = "isInit"; /** * 上次上传时间 */ public static String LAST_UPLOAD_TIME = "lastUploadTime"; /** * 上次更新时间 */ public static String LAST_UPDATE_TIME = "lastUpdateTime"; /** * Crash log文件名 */ public static final String LOG_NAME = "errorLog.txt"; /** * 是否支持USB打印 0:支持 1:不支持 */ public static final String SUPPORT_USB_PRINT = "supportUSBPrint"; /** * /** * 旧版本 */ public static final String OLD_VERSION_CODE = "oldVersionCode"; /** * 会员中心 请求字段 */ public static final String VIP = "vip"; /** * 会员中心 请求 会员列表字段 */ public static final String LIST = "list"; /** * 会员中心 请求充值方案 */ public static final String RECHARGEPLANLIST = "rechargePlanList"; /** * 会员中心 请求充值记录 */ public static final String RECHARGERECORDLIST = "rechargeRecordList"; /** * 会员中心 充值记录冲正 */ public static final String REVERSE = "reverse"; /** * 会员中心 获取单个会员的信息 */ public static final String GETSINGLEVIPINFO = "getSingleVipInfo"; /** * 是否开启标签打印机 */ public static final String SWITCH_LABEL_PRINT = "switchLabelPrint"; /** * 标签打印机IP */ public static final String LABEL_PRINTER_IP = "labelPrinterIp"; /** * 标签纸类型 宽高 间隔 */ public static final String LABEL_PRINTER_PAPER_WIDTH = "labelPrinterPaperWidth"; public static final String LABEL_PRINTER_PAPER_HEIGHT = "labelPrinterPaperHeight"; public static final String LABEL_PRINTER_PAPER_GAP = "labelPrinterPaperGap"; /** * USB设备检测 */ public static final int USB_PRODUCT_ID = 1280; public static final String USB_MANUFACTURER_NAME = "Gprinter"; public static final int USB_CONNECT_STATUS = 3; /** * 崩溃时间 */ public static final String ERROR_TIME = "errortime"; /** * 支持客显的设备 佳田 */ public static String[] CUSTOMERS_JT = { "ptksai pos","rk3288" }; /** * 支持客显的设备 好德芯 */ public static String[] CUSTOMERS_HDX = { "HDX066H","HDX075", "HDX066" }; /** * 客显设备类型 */ public static final String CUSTOMER_DISPLAY_TYPE = "customerDisplayType"; /** * 支持蓝牙打印 */ public static String[] BLUE_PRINT = { "HDX065" }; /** * 蓝牙 内置打印机名 */ public static final String BT_INNER_PRINTER = "Inner printer"; /** * 当前登录 USer id */ public static final String LOGIN_USER_OBJID = "LoginUserObjId"; }
[ "15609143618@163.com" ]
15609143618@163.com
8a2e5f078e23c2269ea6a420bcd64eac5f8f5a99
40ded5811fc9113d0f6657e7a19800ca562fcd00
/com/faw_qm/technics/consroute/model/RouteBranchNodeLinkIfc.java
8bc313b2dfbbad073e5c1d6865f03608e598c7e8
[]
no_license
jlcczzj/chengduCode
9ba3001654e02bd099e7f702e441d171b726549b
7de3580e5650e8674b9cf14583367bec82bd5801
refs/heads/master
2020-03-23T16:08:04.366204
2018-01-28T02:55:26
2018-01-28T02:55:26
null
0
0
null
null
null
null
GB18030
Java
false
false
1,842
java
/** * 生成程序 RouteBranchNodeLinkIfc.java 1.0 2005/07/01 * 版权归一汽启明公司所有 * 本程序属一汽启明公司的私有机要资料 * 未经本公司授权,不得非法传播和盗用 * 可在本公司授权范围内,使用本程序 * 保留所有权利 * CR1 2011/12/22 徐春英 原因:增加预留属性 */ package com.faw_qm.technics.consroute.model; import com.faw_qm.framework.service.BinaryLinkIfc; /** * 路线串和节点的关联 <p>Title:leftID = branchID , rightID = routeNodeID </p> <p>Description: </p> <p>Copyright: Copyright (c) 2005</p> <p>Company:faw_qm </p> * @author 管春元 * @version 1.0 */ public interface RouteBranchNodeLinkIfc extends BinaryLinkIfc { /** * 得到路线分支值对象 * @return TechnicsRouteBranchIfc */ public TechnicsRouteBranchIfc getRouteBranchInfo(); /** * 设置路线分支值对象 */ public void setRouteBranchInfo(TechnicsRouteBranchIfc branchInfo); /** * 得到路线节点值对象 * @return RouteNodeIfc */ public RouteNodeIfc getRouteNodeInfo(); /** * 设置路线节点值对象 */ public void setRouteNodeInfo(RouteNodeIfc nodeInfo); //begin CR1 /** * 设置预留属性1 * @param attribute1 * @return */ public void setAttribute1(String attribute1); /** * 获得预留属性1 * @param attribute1 * @return */ public String getAttribute1(); /** * 设置预留属性2 * @param attribute2 * @return */ public void setAttribute2(String attribute2); /** * 获得预留属性2 * @param attribute2 * @return */ public String getAttribute2(); //end CR1 }
[ "mario@Mario-PC" ]
mario@Mario-PC
2b976eaf3e8ffce4d603c6e40104a5e45e972a64
01791d9f334616a629b30db8772c028aa7ba27b6
/src/initialization/Flower.java
c05bceca18394657641b72d545becdb5d0935b15
[]
no_license
VimIcewind/ThinkInJava
7941b3ccadeb0702a26ad9cb712f6131eeda3d77
f98e4185fe1380613bf586e4a77d8205d623ce01
refs/heads/master
2020-12-25T17:34:12.353986
2019-04-07T13:16:20
2019-04-07T13:16:20
50,911,163
1
0
null
null
null
null
UTF-8
Java
false
false
1,173
java
//: initialization/Flower.java // Calling constructors with "this" package initialization; import static net.mindview.util.Print.print; /** * Created by HWD on 2018-7-4. */ public class Flower { int petalCount = 0; String s = "initial value"; Flower(int petals) { petalCount = petals; print("Constructor w/ int arg only, petalCount= " + petalCount); } Flower(String ss) { print("Constructor w/ String arg only, s = " + ss); s = ss; } Flower(String s, int petals) { this(petals); // ! this(s); // Can't call two! this.s = s; // Another use of "this" print("String & int args"); } Flower() { this("hi", 47); print("default constructor (no args)"); } void printPetalCount() { //! this(11); // Not inside non-constructor! print("petalCount = " + petalCount + " s = " + s); } public static void main(String[] args) { Flower x = new Flower(); x.printPetalCount(); } } /* Output: Constructor w/ int arg only, petalCount= 47 String & int args default constructor (no args) petalCount = 47 s = hi *///:~
[ "VimIcewind@gmail.com" ]
VimIcewind@gmail.com
b22980071699cf10da85f33bb56c77725fff7f0a
457e516fc1dc80ef18cbcc896f5a2fd051ddbf46
/src/by/epamtc/array/superLock/Runner.java
7418a7f5dc7683641f619369a883288d5dfb2197
[]
no_license
ViktoriaShamuradova/Simple-Programs
4c3530c4200eedfb8407044e2585346fd34d71c9
9f36c9b35912512d9e02ded8acc696ada764fe7f
refs/heads/master
2022-10-29T07:27:43.215588
2020-06-17T20:59:01
2020-06-17T20:59:01
268,893,321
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package by.epamtc.array.superLock; import java.util.Random; public class Runner { public static void main(String[] args) { Lock lock = new Lock(); randomInsert(lock); System.out.println(lock); Breaker breaker = new Breaker(); int iteration = breaker.hack(lock); System.out.println(iteration); System.out.println(lock); } public static void randomInsert(Lock lock) { Random random = new Random(); int i = 1; while (i < 3) { Dice dice = new Dice(1 + random.nextInt(6)); int cell = random.nextInt(9); lock.insert(dice, cell); i++; } } }
[ "viktoriashamuradova@gmail.com" ]
viktoriashamuradova@gmail.com
cd585f9a205c887869530259ce087f921b0c924a
9eb88736f632b25d2908106d56c415a69e8b72cf
/bibsonomy/bibsonomy-rest-server/src/main/java/org/bibsonomy/rest/strategy/posts/standard/references/PostReferencesStrategy.java
3fcce909ff96d57771fd252234fbcc1cc1fa6ad4
[]
no_license
jppazmin/bibsonomy-social
8aabcc77d4f5f75f31b0dfb1112968ab62598941
09766fe30744dfbe226b4d8a2f6dc5849920b41a
refs/heads/master
2016-08-02T21:09:20.835596
2013-06-18T05:03:34
2013-06-18T05:03:34
10,136,522
3
1
null
null
null
null
UTF-8
Java
false
false
1,981
java
/** * * BibSonomy-Rest-Server - The REST-server. * * Copyright (C) 2006 - 2011 Knowledge & Data Engineering Group, * University of Kassel, Germany * http://www.kde.cs.uni-kassel.de/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.bibsonomy.rest.strategy.posts.standard.references; import java.io.Writer; import java.util.Set; import org.bibsonomy.rest.strategy.AbstractCreateStrategy; import org.bibsonomy.rest.strategy.Context; /** * adds references to a gold standard post * * @author dzo * @version $Id: PostReferencesStrategy.java,v 1.3 2011-04-06 12:10:05 nosebrain Exp $ */ public class PostReferencesStrategy extends AbstractCreateStrategy { private final String hash; /** * @param context * @param hash */ public PostReferencesStrategy(final Context context, final String hash) { super(context); this.hash = hash; } @Override protected String create() { final Set<String> references = this.getRenderer().parseReferences(this.doc); this.getLogic().createReferences(this.hash, references); return this.hash; } @Override protected void render(final Writer writer, final String resourceID) { this.getRenderer().serializeResourceHash(this.writer, resourceID); } }
[ "juanpablotec4@gmail.com" ]
juanpablotec4@gmail.com
733fa704fbdbbaf8cddfe1bd8834c8320a69f61a
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/bpstudio-20210931/src/main/java/com/aliyun/bpstudio20210931/models/ListApplicationResponseBody.java
71b5a607ae064d363cc051dca2d5a2ebb4293acb
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
4,389
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.bpstudio20210931.models; import com.aliyun.tea.*; public class ListApplicationResponseBody extends TeaModel { @NameInMap("Code") public Integer code; /** * <p>The information about the applications.</p> */ @NameInMap("Data") public java.util.List<ListApplicationResponseBodyData> data; @NameInMap("Message") public String message; @NameInMap("NextToken") public Integer nextToken; @NameInMap("RequestId") public String requestId; @NameInMap("TotalCount") public Integer totalCount; public static ListApplicationResponseBody build(java.util.Map<String, ?> map) throws Exception { ListApplicationResponseBody self = new ListApplicationResponseBody(); return TeaModel.build(map, self); } public ListApplicationResponseBody setCode(Integer code) { this.code = code; return this; } public Integer getCode() { return this.code; } public ListApplicationResponseBody setData(java.util.List<ListApplicationResponseBodyData> data) { this.data = data; return this; } public java.util.List<ListApplicationResponseBodyData> getData() { return this.data; } public ListApplicationResponseBody setMessage(String message) { this.message = message; return this; } public String getMessage() { return this.message; } public ListApplicationResponseBody setNextToken(Integer nextToken) { this.nextToken = nextToken; return this; } public Integer getNextToken() { return this.nextToken; } public ListApplicationResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public ListApplicationResponseBody setTotalCount(Integer totalCount) { this.totalCount = totalCount; return this; } public Integer getTotalCount() { return this.totalCount; } public static class ListApplicationResponseBodyData extends TeaModel { @NameInMap("ApplicationId") public String applicationId; @NameInMap("CreateTime") public String createTime; @NameInMap("ImageURL") public String imageURL; @NameInMap("Name") public String name; @NameInMap("ResourceGroupId") public String resourceGroupId; /** * <p>The status of the application.</p> */ @NameInMap("Status") public String status; public static ListApplicationResponseBodyData build(java.util.Map<String, ?> map) throws Exception { ListApplicationResponseBodyData self = new ListApplicationResponseBodyData(); return TeaModel.build(map, self); } public ListApplicationResponseBodyData setApplicationId(String applicationId) { this.applicationId = applicationId; return this; } public String getApplicationId() { return this.applicationId; } public ListApplicationResponseBodyData setCreateTime(String createTime) { this.createTime = createTime; return this; } public String getCreateTime() { return this.createTime; } public ListApplicationResponseBodyData setImageURL(String imageURL) { this.imageURL = imageURL; return this; } public String getImageURL() { return this.imageURL; } public ListApplicationResponseBodyData setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public ListApplicationResponseBodyData setResourceGroupId(String resourceGroupId) { this.resourceGroupId = resourceGroupId; return this; } public String getResourceGroupId() { return this.resourceGroupId; } public ListApplicationResponseBodyData setStatus(String status) { this.status = status; return this; } public String getStatus() { return this.status; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
9a71dd78980d8e7ea69cfffcbccd39a0860d1e69
c65d7c475768942a8941f9f751b7d96e639ea9c9
/com.sap.cloud.lm.sl.cf.core/src/test/java/com/sap/cloud/lm/sl/cf/core/auditlogging/impl/AuditLogManagerTest.java
4db5cdd580267d265aa8209b2d5b02401f217c6b
[ "Apache-2.0" ]
permissive
DenitsaKostova/cf-mta-deploy-service
b7a2043f09c1624771347460ab37303c07cbbb45
6a827cdbf80e06c46d086b6daf169e0bf5be7266
refs/heads/master
2021-09-01T21:33:42.068280
2017-12-28T16:39:23
2017-12-28T16:55:51
107,227,990
0
0
Apache-2.0
2017-12-28T18:52:31
2017-10-17T06:39:44
Java
UTF-8
Java
false
false
1,480
java
package com.sap.cloud.lm.sl.cf.core.auditlogging.impl; import javax.sql.DataSource; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.sap.cloud.lm.sl.cf.core.auditlogging.UserInfoProvider; import com.sap.cloud.lm.sl.cf.core.util.UserInfo; import com.sap.cloud.lm.sl.common.util.TestDataSourceProvider; public class AuditLogManagerTest { private DataSource testDataSource; private AuditLogManager auditLogManager; private static final String AUDIT_LOG_CHANGELOG_LOCATION = "com/sap/cloud/lm/sl/cf/core/db/changelog/db-changelog.xml"; @Before public void setUp() throws Exception { testDataSource = TestDataSourceProvider.getDataSource(AUDIT_LOG_CHANGELOG_LOCATION); auditLogManager = new AuditLogManager(testDataSource, createTestUserInfoProvider()); } @After public void tearDown() throws Exception { testDataSource.getConnection().close(); } @Test public void test() throws Exception { auditLogManager.getSecurityLogger().info("That's a security message"); Exception e = auditLogManager.getException(); if (e != null) { throw e; } } private static UserInfoProvider createTestUserInfoProvider() { return new UserInfoProvider() { @Override public UserInfo getUserInfo() { return null; } }; } }
[ "nikolay.valchev@sap.com" ]
nikolay.valchev@sap.com
4a52fa83af72785035886c43f3274da57954ed96
56d1c5242e970ca0d257801d4e627e2ea14c8aeb
/src/com/csms/leetcode/classification/dp/MaxProfit.java
529a6b66f0745a45417077ee4af734a7967b9db0
[]
no_license
dai-zi/leetcode
e002b41f51f1dbd5c960e79624e8ce14ac765802
37747c2272f0fb7184b0e83f052c3943c066abb7
refs/heads/master
2022-12-14T11:20:07.816922
2020-07-24T03:37:51
2020-07-24T03:37:51
282,111,073
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
package com.csms.leetcode.classification.dp; public class MaxProfit { public int maxProfit(int[] prices) { if(prices == null){ return 0; } int max = 0; int i =0 ,j = 1; int low = -1; int high = -1; while(j < prices.length){ if(prices[j] <= prices[i]){ if(low != -1){ high = i; max += prices[high] - prices[low]; low = -1; high = -1; } }else{ if(low == -1) { low = i; } } j++; i++; } if(low != -1){ max += prices[prices.length - 1] - prices[low]; } return max; } public int maxProfit1(int prices[]) { int minprice = Integer.MAX_VALUE; int maxprofit = 0; for (int i = 0; i < prices.length; i++) { if (prices[i] < minprice) minprice = prices[i]; else if (prices[i] - minprice > maxprofit) maxprofit = prices[i] - minprice; } return maxprofit; } }
[ "liuxiaotongdaizi@sina.com" ]
liuxiaotongdaizi@sina.com
aee40fe1ef7fba99d574948a6d2f458b6e3d8ebd
fddcd2ceab893b3b9383059f748029d701b585d2
/strategy/src/main/java/com/gds/strategy/MeleeStrategy.java
0958e3c4c1470a246d0962ea4aa6251922a06fa8
[]
no_license
a514760469/design-pattern
8a6c4a475e1b4d167b9c03f3b034302734bf0333
1060c44adbf3127bcb36bb0316b53d552c658afe
refs/heads/master
2022-12-06T02:12:29.624422
2020-05-08T09:33:48
2020-05-08T09:33:48
234,487,244
1
0
null
2022-11-24T09:37:52
2020-01-17T06:39:03
Java
UTF-8
Java
false
false
263
java
package com.gds.strategy; /** * @author zhanglifeng * @since 2020-01-19 16:39 */ public class MeleeStrategy implements DragonSlayingStrategy { @Override public void execute() { System.out.println("用你的神剑你砍下了龙头!"); } }
[ "514760469@qq.com" ]
514760469@qq.com
af1c9676028737bb2eb2a3002d9f66f587fcc775
e15e41856892819d1221f661d77f7eff3167085a
/edda/term-discover/java/src/edu/pitt/dbmi/edda/term/discover/StudyDesignFilter.java
0da380e7da6281c5267b3cf40452df4ef1315e75
[]
no_license
dbmi-pitt/edda
bf1f60e87fd7c7c067498d55ba145c72d3d50061
3c1d980f7802d87910793b83eae723e83a475437
refs/heads/master
2020-12-24T00:58:34.173445
2016-07-23T16:48:01
2016-07-23T16:48:01
19,541,817
0
1
null
null
null
null
UTF-8
Java
false
false
7,860
java
package edu.pitt.dbmi.edda.term.discover; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; import edu.pitt.dbmi.edda.term.discover.StudyDesignFinder.Mode; import edu.pitt.dbmi.nlp.noble.coder.NobleCoder; import edu.pitt.dbmi.nlp.noble.terminology.Terminology; import edu.pitt.dbmi.nlp.noble.terminology.TerminologyException; import edu.pitt.dbmi.nlp.noble.terminology.impl.NobleCoderTerminology; import edu.pitt.dbmi.nlp.noble.tools.TextTools; public class StudyDesignFilter { private File nameFile,locationFile; public static List<String> termBlacklist = Arrays.asList("tests","meta","gene","case","blind","regression","disease","root"); public static List<String> abbreviationBlacklist = Arrays.asList("2x2"); private List<String> names, locations; private NobleCoderTerminology thesaurus; public static void main(String [] args) throws FileNotFoundException, IOException{ File dir = new File("/home/tseytlin/Data/SD_Mining/"); File file = new File("/home/tseytlin/Data/HTA/study_designs_MSH.txt"); StudyDesignFilter sd = new StudyDesignFilter(); sd.setNameFile(new File(dir,"names/all_names.txt")); sd.setLocationFile(new File(dir,"gazetteers/all_locations.txt")); String text = TextTools.getText(new FileInputStream(file)); //sd.filterGenes(text); sd.filterDiagnosis(text); sd.filterAcronym(text); sd.filterOrgan(text); sd.filterNames(text); sd.filterLocations(text); if(!file.getName().contains("EDDA")){ sd.filterDesign(text); sd.filterAnalysis(text); } } public void setNameFile(File nameFile) { this.nameFile = nameFile; } public void setLocationFile(File locationFile) { this.locationFile = locationFile; } private List<String> getNames() throws FileNotFoundException, IOException{ if(names == null){ names = new ArrayList<String>(); for(String s: TextTools.getText(new FileInputStream(nameFile)).split("\n")){ s = s.trim(); if(s.length() > 0) names.add(s); } } return names; } private List<String> getLocations() throws FileNotFoundException, IOException{ if(locations == null){ locations = new ArrayList<String>(); for(String s: TextTools.getText(new FileInputStream(locationFile)).split("\n")){ s = s.trim(); if(s.length() > 0) locations.add(s); } } return locations; } private boolean contains(List<String> list, String text ,boolean caseSensitive){ for(String s: list){ if(containsWord(text,s,caseSensitive)) return true; } return false; } private boolean contains(List<String> list, String text){ return contains(list, text, false); } private boolean containsWord(String text, String word){ return containsWord(text, word,false); } private boolean containsWord(String text, String word, boolean caseSensitive){ String cs = caseSensitive?"":"(?i)"; return Pattern.compile(cs+"\\b"+word+"\\b").matcher(text).find(); } private void filterAnalysis(String text) { System.out.println("\n## analysis filter ##"); for(String term: text.split("\n")){ // check for gene mentions try { if(containsWord(term,"analy(s[ie]s|tical)") && !isBlacklisted(term)) System.out.println(term); } catch (Exception e) { e.printStackTrace(); } } } private void filterNames(String text) { System.out.println("\n## name filter ##"); for(String term: text.split("\n")){ // check for gene mentions try { if(contains(getNames(),term) && !isBlacklisted(term)) System.out.println(term); } catch (Exception e) { e.printStackTrace(); } } } private void filterLocations(String text) { System.out.println("\n## location filter ##"); for(String term: text.split("\n")){ // check for gene mentions try { if(contains(getLocations(),term,true)) System.out.println(term); } catch (Exception e) { e.printStackTrace(); } } } /** * filter possible study designs * @param text * @throws IOException */ private void filterGenes(String text) throws IOException { System.out.println("\n## gene filter ##"); NobleCoderTerminology terminology = new NobleCoderTerminology("CRAFT"); terminology.setSourceFilter("GO;PR"); for(String term: text.split("\n")){ // check for gene mentions try { boolean match = terminology.search(term).length > 0; if(match) System.out.println(term); } catch (TerminologyException e) { e.printStackTrace(); } } } public NobleCoderTerminology getThesaurus() throws IOException{ if(thesaurus == null){ thesaurus = new NobleCoderTerminology("NCI_Metathesaurus"); thesaurus.setSourceFilter("NCI;MSH"); } return thesaurus; } /** * filter possible study designs * @param text * @throws IOException */ private void filterDiagnosis(String text) throws IOException { System.out.println("\n## diagnostic filter ##"); NobleCoderTerminology terminology = getThesaurus(); terminology.setSemanticTypeFilter("Disease or Syndrome; Neoplastic Process"); terminology.setSelectBestCandidate(true); for(String term: text.split("\n")){ // check for gene mentions try { boolean match = terminology.search(term,NobleCoderTerminology.ALL_MATCH).length > 0; if(match && !isBlacklisted(term)) System.out.println(term); } catch (TerminologyException e) { e.printStackTrace(); } } } /** * filter possible study designs * @param text * @throws IOException */ private void filterOrgan(String text) throws IOException { System.out.println("\n## organ filter ##"); NobleCoderTerminology terminology = getThesaurus(); terminology.setSemanticTypeFilter("Body Part, Organ, or Organ Component ; Organ or Tissue Function"); terminology.setSelectBestCandidate(true); for(String term: text.split("\n")){ // check for gene mentions try { boolean match = terminology.search(term,NobleCoderTerminology.ALL_MATCH).length > 0; if(match && !isBlacklisted(term)) System.out.println(term); } catch (TerminologyException e) { e.printStackTrace(); } } } private void filterDesign(String text) throws IOException { System.out.println("\n## design filter ##"); NobleCoderTerminology terminology = getThesaurus(); terminology.setSemanticTypeFilter("Research Activity ; Molecular Biology Research Technique"); for(String term: text.split("\n")){ if(term.toLowerCase().contains("design")){ // check for gene mentions try { boolean match = terminology.search(term).length > 0; if(!match) System.out.println(term); } catch (TerminologyException e) { e.printStackTrace(); } } } } private boolean isBlacklisted(String term) { for(String s: termBlacklist){ if(Pattern.compile("\\b"+s+"\\b").matcher(term.toLowerCase()).find()) return true; } return false; } /** * filter possible study designs * @param text * @throws IOException */ private void filterAcronym(String text) throws IOException { System.out.println("\n## acronym filter ##"); for(String term: text.split("\n")){ // skip terms that are all upper case if(term.toUpperCase().equals(term)) continue; // skip terms with roman numerals if(term.matches(".*\\b[IV]+[ab]?\\b.*")) continue; // skip terms that follow 12-labdene pattern if(Pattern.compile("\\d+\\-[a-z]+").matcher(term).find()){ System.out.println(term); continue; } // filter out abbreviation for(String word: TextTools.getWords(term)){ if((TextTools.isLikelyAbbreviation(word) || word.matches("[A-Z]+"))&& !abbreviationBlacklist.contains(word)){ System.out.println(term); break; } } } } }
[ "tseytlin@pitt.edu" ]
tseytlin@pitt.edu
c941159476c131b7369c4559605758c8ca2177ab
29f508e730f2794341593ad18cf352990888c067
/src/org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java
78f724f1de43b19e74d83fc7369c8affef5f6d5f
[]
no_license
nhchanh/jdk1.6.0_21
daf40144acd19d92d15561235038e6e0343f8dec
cdcaafc11122944545c51efc49bb9f884b1ad0d1
refs/heads/master
2021-01-10T19:05:13.011208
2014-01-07T23:10:19
2014-01-07T23:10:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,617
java
package org.omg.CosNaming.NamingContextExtPackage; /** * org/omg/CosNaming/NamingContextExtPackage/AddressHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl * Tuesday, June 22, 2010 1:21:31 AM GMT-08:00 */ /** * Address is the Host and Port information represented as a String. */ abstract public class AddressHelper { private static String _id = "IDL:omg.org/CosNaming/NamingContextExt/Address:1.0"; public static void insert (org.omg.CORBA.Any a, String that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static String extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CosNaming.NamingContextExtPackage.AddressHelper.id (), "Address", __typeCode); } return __typeCode; } public static String id () { return _id; } public static String read (org.omg.CORBA.portable.InputStream istream) { String value = null; value = istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, String value) { ostream.write_string (value); } }
[ "chanh.nguyen@verint.com" ]
chanh.nguyen@verint.com
ee23ab275aad84cc3b4b370ea3cde63c0736a240
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/google/android/gms/internal/measurement/zzgq.java
ba4e55fb7f74af4a3284080f9495fb527b500306
[]
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
632
java
package com.google.android.gms.internal.measurement; import com.tencent.matrix.trace.core.AppMethodBeat; final class zzgq implements Runnable { zzgq(zzgn paramzzgn, zzed paramzzed, zzdz paramzzdz) { } public final void run() { AppMethodBeat.i(69112); zzgn.zza(this.zzanf).zzkx(); zzgn.zza(this.zzanf).zzb(this.zzang, this.zzane); AppMethodBeat.o(69112); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar * Qualified Name: com.google.android.gms.internal.measurement.zzgq * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
db4a3e601fbcd1b92c29a05177e9eedcd64e0cc3
87d27ee2e058c8e6bffc18916af9262fad6567c3
/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLExecutionPlan.java
20f63dec4fe0482cc6da5ce416b571387ab5d5e7
[ "Apache-2.0" ]
permissive
franksam007/cloudbeaver
432f4237f2ed7534b5dacb3f8fdc7db661e561a7
f7c0c6ba848c03cbd2fda2d80ceea3757c3ef89b
refs/heads/devel
2023-06-19T00:36:03.415937
2021-07-20T07:39:29
2021-07-20T07:39:29
323,500,956
0
0
Apache-2.0
2021-07-20T07:39:29
2020-12-22T02:36:10
null
UTF-8
Java
false
false
2,383
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2021 DBeaver Corp and others * * 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 io.cloudbeaver.service.sql; import io.cloudbeaver.model.session.WebSession; import org.jkiss.dbeaver.Log; import org.jkiss.dbeaver.model.exec.plan.DBCPlan; import org.jkiss.dbeaver.model.exec.plan.DBCPlanNode; import java.util.*; /** * WebSQLExecutionPlan. */ public class WebSQLExecutionPlan { private static final Log log = Log.getLog(WebSQLExecutionPlan.class); private final WebSession webSession; private final DBCPlan plan; public WebSQLExecutionPlan(WebSession webSession, DBCPlan plan) { this.webSession = webSession; this.plan = plan; } public String getQuery() { return plan.getQueryString(); } public WebSQLExecutionPlanNode[] getNodes() { Map<String, Object> options = new LinkedHashMap<>(); Map<DBCPlanNode, String> idMap = new IdentityHashMap<>(); List<WebSQLExecutionPlanNode> result = new ArrayList<>(); for (DBCPlanNode node : plan.getPlanNodes(options)) { addNodeWithNested(result, null, node, idMap); } return result.toArray(new WebSQLExecutionPlanNode[0]); } private void addNodeWithNested(List<WebSQLExecutionPlanNode> result, DBCPlanNode parentNode, DBCPlanNode node, Map<DBCPlanNode, String> idMap) { String parentId = idMap.get(parentNode); String nodeId = String.valueOf(idMap.size()); idMap.put(node, nodeId); result.add(new WebSQLExecutionPlanNode(webSession, node, nodeId, parentId)); Collection<? extends DBCPlanNode> nested = node.getNested(); if (nested != null) { for (DBCPlanNode nn : nested) { addNodeWithNested(result, node, nn, idMap); } } } }
[ "serge@jkiss.org" ]
serge@jkiss.org
8d7e1f6190902beaa3fd3a1f32dad93de70011e3
cd4ff501757814b2544dc7a495a59331852dacf6
/web/src/test/java/site/binghai/web/BaseTest.java
7a935f7c0f7ec1bad56122063f58e3dd3f752d37
[]
no_license
IceSeaOnly/super_big_dumpling
4387e2878dd77597275591e7523fde5e895ab41b
770a393f90d33407b48ecc9c6ed2caa015d9bdb4
refs/heads/master
2021-09-02T04:17:57.649224
2017-12-30T08:47:24
2017-12-30T08:47:24
103,634,993
1
0
null
null
null
null
UTF-8
Java
false
false
668
java
package site.binghai.web; import com.alibaba.fastjson.JSONObject; import org.junit.runner.RunWith; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import site.binghai.SuperBigDumpling.SuperBigDumplingApplication; @RunWith(SpringRunner.class) @SpringBootTest(classes = SuperBigDumplingApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @EnableAutoConfiguration public abstract class BaseTest { public void out(Object obj) { System.out.println(JSONObject.toJSONString(obj)); } }
[ "1041414957@qq.com" ]
1041414957@qq.com
73d1be73f170bcfc9cb665d8f8d6f3592e36c366
7098f2d71cb0699a46a11c2db96e76285d35727c
/dss-src/apps/dss/core/dss-document/src/main/java/eu/europa/ec/markt/dss/signature/cades/CAdESProfileXL.java
38bdeb2c5c80a5d35cbe5567e916af77392c0a5e
[]
no_license
p4535992/sd-dss-3.0.3
4344521a309efaacd1798ed4bd7e7ef37a69f874
b2fa77670267732daca5d86a5e46a9f71bd16247
refs/heads/master
2021-08-30T11:07:59.383832
2017-12-17T15:07:14
2017-12-17T15:07:14
112,770,373
0
0
null
null
null
null
UTF-8
Java
false
false
7,312
java
/* * DSS - Digital Signature Services * * Copyright (C) 2011 European Commission, Directorate-General Internal Market and Services (DG MARKT), B-1049 Bruxelles/Brussel * * Developed by: 2011 ARHS Developments S.A. (rue Nicolas Bové 2B, L-1253 Luxembourg) http://www.arhs-developments.com * * This file is part of the "DSS - Digital Signature Services" project. * * "DSS - Digital Signature Services" 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 2.1 of the * License, or (at your option) any later version. * * DSS 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 * "DSS - Digital Signature Services". If not, see <http://www.gnu.org/licenses/>. */ package eu.europa.ec.markt.dss.signature.cades; import java.io.IOException; import java.security.cert.CRL; import java.security.cert.CRLException; import java.security.cert.CertificateEncodingException; import java.security.cert.X509CRL; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Date; import java.util.Hashtable; import java.util.List; import java.util.logging.Logger; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1Object; import org.bouncycastle.asn1.ASN1ObjectIdentifier; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.DERSequence; import org.bouncycastle.asn1.DERSet; import org.bouncycastle.asn1.cms.Attribute; import org.bouncycastle.asn1.cms.AttributeTable; import org.bouncycastle.asn1.esf.RevocationValues; import org.bouncycastle.asn1.ocsp.BasicOCSPResponse; import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers; import org.bouncycastle.asn1.x509.CertificateList; import org.bouncycastle.asn1.x509.X509CertificateStructure; import org.bouncycastle.cms.CMSSignedData; import org.bouncycastle.cms.SignerInformation; import org.bouncycastle.ocsp.BasicOCSPResp; import eu.europa.ec.markt.dss.signature.SignatureParameters; import eu.europa.ec.markt.dss.validation.ValidationContext; import eu.europa.ec.markt.dss.validation.cades.CAdESSignature; import eu.europa.ec.markt.dss.validation.certificate.CertificateAndContext; import eu.europa.ec.markt.dss.validation.certificate.CertificateSource; /** * This class holds the CAdES-X signature profiles; it supports the inclusion of a combination of the unsigned * attributes id-aa-ets-escTimeStamp, id-aa-ets-certCRLTimestamp, id-aa-ets-certValues, id-aa-ets-revocationValues as * defined in ETSI TS 101 733 V1.8.1, clause 6.3. * * * @version $Revision: 1817 $ - $Date: 2013-03-28 15:54:49 +0100 (jeu., 28 mars 2013) $ */ public class CAdESProfileXL extends CAdESProfileX { private static final Logger LOG = Logger.getLogger(CAdESProfileXL.class.getName()); private Hashtable<ASN1ObjectIdentifier, ASN1Encodable> extendUnsignedAttributes(Hashtable<ASN1ObjectIdentifier, ASN1Encodable> unsignedAttrs, X509Certificate signingCertificate, Date signingDate, CertificateSource optionalCertificateSource) throws IOException { ValidationContext validationContext = certificateVerifier.validateCertificate(signingCertificate, signingDate, optionalCertificateSource, null, null); try { List<X509CertificateStructure> certificateValues = new ArrayList<X509CertificateStructure>(); ArrayList<CertificateList> crlValues = new ArrayList<CertificateList>(); ArrayList<BasicOCSPResponse> ocspValues = new ArrayList<BasicOCSPResponse>(); /* * The ETSI TS 101 733 stipulates (§6.2.1): "It references the full set of CA certificates that have been used * to validate an ES with Complete validation data up to (but not including) the signer's certificate. [...] * NOTE 1: The signer's certificate is referenced in the signing certificate attribute (see clause 5.7.3)." * (§6.2.1) * * "The second and subsequent CrlOcspRef fields shall be in the same order as the OtherCertID to which they * relate." (§6.2.2) * * Also, no mention of the way to order those second and subsequent fields, so we add the certificates as * provided by the context. */ /* The SignedCertificate is in validationContext.getCertificate() */ for (CertificateAndContext c : validationContext.getNeededCertificates()) { /* * Add every certificate except the signing certificate */ if (!c.getCertificate().equals(signingCertificate)) { certificateValues.add(new X509CertificateStructure((ASN1Sequence) ASN1Object.fromByteArray(c.getCertificate().getEncoded()))); } } /* * Record each CRL and OCSP with a reference to the corresponding certificate */ for (CRL relatedcrl : validationContext.getNeededCRL()) { crlValues.add(new CertificateList((ASN1Sequence) ASN1Object.fromByteArray(((X509CRL) relatedcrl).getEncoded()))); } for (BasicOCSPResp relatedocspresp : validationContext.getNeededOCSPResp()) { ocspValues.add((new BasicOCSPResponse((ASN1Sequence) ASN1Object.fromByteArray(relatedocspresp.getEncoded())))); } CertificateList[] crlValuesArray = new CertificateList[crlValues.size()]; BasicOCSPResponse[] ocspValuesArray = new BasicOCSPResponse[ocspValues.size()]; RevocationValues revocationValues = new RevocationValues(crlValues.toArray(crlValuesArray), ocspValues.toArray(ocspValuesArray), null); unsignedAttrs.put(PKCSObjectIdentifiers.id_aa_ets_revocationValues, new Attribute(PKCSObjectIdentifiers.id_aa_ets_revocationValues, new DERSet(revocationValues))); X509CertificateStructure[] certValuesArray = new X509CertificateStructure[certificateValues.size()]; unsignedAttrs.put(PKCSObjectIdentifiers.id_aa_ets_certValues, new Attribute(PKCSObjectIdentifiers.id_aa_ets_certValues, new DERSet( new DERSequence(certificateValues.toArray(certValuesArray))))); } catch (CertificateEncodingException e) { throw new RuntimeException(e); } catch (CRLException e) { throw new RuntimeException(e); } return unsignedAttrs; } @SuppressWarnings("unchecked") @Override protected SignerInformation extendCMSSignature(CMSSignedData signedData, SignerInformation si, SignatureParameters parameters) throws IOException { si = super.extendCMSSignature(signedData, si, parameters); LOG.info(">>>CAdESProfileXL::extendCMSSignature"); Hashtable<ASN1ObjectIdentifier, ASN1Encodable> unsignedAttrs = si.getUnsignedAttributes().toHashtable(); /* Extends unsigned attributes */ CAdESSignature signature = new CAdESSignature(signedData, si.getSID()); Date signingTime = signature.getSigningTime(); if (signingTime == null) { signingTime = parameters.getSigningDate(); } if (signingTime == null) { signingTime = new Date(); } unsignedAttrs = extendUnsignedAttributes(unsignedAttrs, signature.getSigningCertificate(), signingTime, signature.getCertificateSource()); SignerInformation newsi = SignerInformation.replaceUnsignedAttributes(si, new AttributeTable(unsignedAttrs)); return newsi; } }
[ "tentimarco0@gmail.com" ]
tentimarco0@gmail.com
e3513b6722cd21968f26d5033d4e279667f77a76
2a76f8d5b366ec0997fdf4373ea849f15aad4860
/ch16/src/main/java/com/core/ChStr.java
32534a9806dd3495a2d466aebf39649fd6e05564
[]
no_license
py85252876/JavaWeb
008d69f274c69780eccc2eb70c58f4f5bb3b9714
ffde4d7b210b29b1b0bdccf7cae2b04167c1ea72
refs/heads/master
2021-06-19T14:31:16.830488
2017-06-02T22:45:11
2017-06-02T22:45:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
package com.core; public class ChStr { public static String toChinese(String strvalue) { try { if (strvalue == null) { //当变量strvalue为null时 strvalue = ""; //将变量strvalue赋值为空 } else { strvalue = new String(strvalue.getBytes("UTF-8"), "UTF-8"); //将字符串转换为UTF-8编码 strvalue = strvalue.trim(); //去除字符串的首尾空格 } } catch (Exception e) { strvalue = ""; //将变量strvalue赋值为空 } return strvalue; //返回转换后的输入变量strvalue } // 处理字符串中的空值 public static final String nullToString(String v, String toV) { if (v == null || "".equals(v)) { //当输入变量v为空时 v = toV; //将输入变量v赋值为输入变量toV } return v; //返回转换后的输入变量v } //过滤危险字符 public static final String filterStr(String str) { str = str.replaceAll(";", ""); str = str.replaceAll("&", "&amp;"); str = str.replaceAll("<", "&lt;"); str = str.replaceAll(">", "&gt;"); str = str.replaceAll("'", ""); str = str.replaceAll("--", " "); str = str.replaceAll("/", ""); str = str.replaceAll("%", ""); return str; } }
[ "yanruilin@139.com" ]
yanruilin@139.com
a0122574cbcf1f3aa5fef7576265918e31871858
fb7cfbc4a914ba3f27344a3fe85db601a21dd57e
/app/src/main/java/com/yj/robust/wxapi/WXPayEntryActivity.java
e94bd37da71e135cc82132f17c89b65dcd236a3b
[]
no_license
zhouxiang130/Robust
f163d68a2e00bee72a985ee6cebe37a8131e2c0d
fb1faf755d4dd6aab267960a95bf9aea00d8c6b0
refs/heads/master
2020-07-14T15:16:51.019563
2019-09-08T13:00:10
2019-09-08T13:00:10
205,341,732
0
0
null
null
null
null
UTF-8
Java
false
false
4,308
java
package com.yj.robust.wxapi; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import com.tencent.mm.opensdk.constants.ConstantsAPI; import com.tencent.mm.opensdk.modelbase.BaseReq; import com.tencent.mm.opensdk.modelbase.BaseResp; import com.tencent.mm.opensdk.openapi.IWXAPI; import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler; import com.tencent.mm.opensdk.openapi.WXAPIFactory; import com.yj.robust.MyApplication; import com.yj.robust.base.Constant; import com.yj.robust.ui.activity.MineOrderActivity; import com.yj.robust.ui.activity.MineOrderDetailActivity; import com.yj.robust.ui.activity.PayResultActivity; import com.yj.robust.ui.activity.SettlementCartActivity; import com.yj.robust.ui.activity.SettlementGoodsActivity; import com.yj.robust.util.LogUtils; import com.yj.robust.util.ToastUtils; import com.yj.robust.util.UserUtils; public class WXPayEntryActivity extends Activity implements IWXAPIEventHandler { private UserUtils mUtils; private IWXAPI api; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); api = WXAPIFactory.createWXAPI(this, Constant.APP_ID); api.handleIntent(getIntent(), this); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); setIntent(intent); api.handleIntent(intent, this); } @Override public void onReq(BaseReq req) { } @Override public void onResp(BaseResp resp) { // Log.d(TAG, "onPayFinish, errCode = " + resp.errCode); LogUtils.e("type的值"+resp.getType()); LogUtils.e("PAYBYWX的值"+ConstantsAPI.COMMAND_PAY_BY_WX); LogUtils.e("resp的errCode的值"+resp.errCode); if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) { if(resp.errCode == 0){ LogUtils.i("我进入errCode == 0 了"+resp.errCode); MyApplication.orderListRefresh = true; //支付成功,发送成功广播进行后续处理 if(MyApplication.orderlistReceiver) { Intent broadcastIntent = new Intent(); broadcastIntent.setAction("com.example.orderlistrefresh"); broadcastIntent.putExtra("state","success"); sendBroadcast(broadcastIntent); } Intent intent = new Intent(WXPayEntryActivity.this, PayResultActivity.class); startActivity(intent); finishAty(); }else{ //非详情及列表的失败 判断是否有相应的activity进行finish 好进行下一步跳转 但详情和列表失败后不需要做任何操作 但详情和列表支付 // 成功后无此限制,因为要跳转到新的支付结果详情里 要先删除后添加 if(MyApplication.orderDetial) { finishAty(); } //支付失败 需要发送失败广播进行注销 if(MyApplication.orderlistReceiver) { Intent broadcastIntent = new Intent(); broadcastIntent.setAction("com.example.orderlistrefresh"); broadcastIntent.putExtra("state","fail"); sendBroadcast(broadcastIntent); } if(MyApplication.orderDetial) { mUtils = UserUtils.getInstance(WXPayEntryActivity.this); if(!TextUtils.isEmpty(mUtils.getPayType()) && mUtils.getPayType().equals("goods")){ Intent orderIntent = new Intent(WXPayEntryActivity.this, MineOrderDetailActivity.class); orderIntent.putExtra("oid", mUtils.getPayOrder()); startActivity(orderIntent); }else{ Intent orderIntent = new Intent(WXPayEntryActivity.this, MineOrderActivity.class); startActivity(orderIntent); } LogUtils.e("我是错误code" + resp.errCode); ToastUtils.showToast(WXPayEntryActivity.this, "微信支付失败"); } } MyApplication.orderDetial = true; MyApplication.orderlistReceiver = false; } LogUtils.i("我finish了"); finish(); } private void finishAty(){ for(int i = 0;i< MyApplication.atyStack.size();i++){ if( MyApplication.atyStack.get(i) instanceof SettlementCartActivity || MyApplication.atyStack.get(i) instanceof SettlementGoodsActivity || MyApplication.atyStack.get(i) instanceof MineOrderDetailActivity ){ //这些activity还存在 LogUtils.i("我remove了"); MyApplication.atyStack.get(i).finish(); break; } } } @Override protected void onDestroy() { super.onDestroy(); LogUtils.i("w onDestory了"); } }
[ "1141681281@qq.com" ]
1141681281@qq.com
0b444bf40b723a9507e5daccbe34480c62e10e1d
404a189c16767191ffb172572d36eca7db5571fb
/hibernate/build/java/gov/georgia/dhr/dfcs/sacwis/db/SafetyResource.java
039c38cee13e5934e48f39307048d63cad4ae1e5
[]
no_license
tayduivn/training
648a8e9e91194156fb4ffb631749e6d4bf2d0590
95078fb2c7e21bf2bba31e2bbd5e404ac428da2f
refs/heads/master
2021-06-13T16:20:41.293097
2017-05-08T21:37:59
2017-05-08T21:37:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,717
java
package gov.georgia.dhr.dfcs.sacwis.db; // Generated Apr 23, 2012 11:16:12 AM by Hibernate Tools 3.2.0.b9 import java.util.Collection; import java.util.Date; /** * SafetyResource generated by hbm2java */ public class SafetyResource implements java.io.Serializable { private Integer idEvent; private Date dtLastUpdate; private Event event; private Integer idPrimary; private Integer idSecondary; private Date dtRequestReceived; private String indRecommendation; private String cdDenialReason; private String txtComments; private Date dtHomeVisit; private Collection<SafetyResourceChild> safetyResourceChilds; public SafetyResource() { } public SafetyResource(Event event, Integer idPrimary) { this.event = event; this.idPrimary = idPrimary; } public SafetyResource(Event event, Integer idPrimary, Integer idSecondary, Date dtRequestReceived, String indRecommendation, String cdDenialReason, String txtComments, Date dtHomeVisit, Collection<SafetyResourceChild> safetyResourceChilds) { this.event = event; this.idPrimary = idPrimary; this.idSecondary = idSecondary; this.dtRequestReceived = dtRequestReceived; this.indRecommendation = indRecommendation; this.cdDenialReason = cdDenialReason; this.txtComments = txtComments; this.dtHomeVisit = dtHomeVisit; this.safetyResourceChilds = safetyResourceChilds; } public Integer getIdEvent() { return this.idEvent; } public void setIdEvent(Integer idEvent) { this.idEvent = idEvent; } public Date getDtLastUpdate() { return this.dtLastUpdate; } public void setDtLastUpdate(Date dtLastUpdate) { this.dtLastUpdate = dtLastUpdate; } public Event getEvent() { return this.event; } public void setEvent(Event event) { this.event = event; } public Integer getIdPrimary() { return this.idPrimary; } public void setIdPrimary(Integer idPrimary) { this.idPrimary = idPrimary; } public Integer getIdSecondary() { return this.idSecondary; } public void setIdSecondary(Integer idSecondary) { this.idSecondary = idSecondary; } public Date getDtRequestReceived() { return this.dtRequestReceived; } public void setDtRequestReceived(Date dtRequestReceived) { this.dtRequestReceived = dtRequestReceived; } public String getIndRecommendation() { return this.indRecommendation; } public void setIndRecommendation(String indRecommendation) { this.indRecommendation = indRecommendation; } public String getCdDenialReason() { return this.cdDenialReason; } public void setCdDenialReason(String cdDenialReason) { this.cdDenialReason = cdDenialReason; } public String getTxtComments() { return this.txtComments; } public void setTxtComments(String txtComments) { this.txtComments = txtComments; } public Date getDtHomeVisit() { return this.dtHomeVisit; } public void setDtHomeVisit(Date dtHomeVisit) { this.dtHomeVisit = dtHomeVisit; } public Collection<SafetyResourceChild> getSafetyResourceChilds() { return this.safetyResourceChilds; } public void setSafetyResourceChilds(Collection<SafetyResourceChild> safetyResourceChilds) { this.safetyResourceChilds = safetyResourceChilds; } }
[ "lgeddam@gmail.com" ]
lgeddam@gmail.com
55b10a5ec2bdf13e19e2d1eb6b4dca0b2f51c494
6251ec8dd7f02c15174e897910f72aa37e9e3c51
/JavaSE/src/main/java/test/extendTest.java
7f1cbbc970d4507ca2cb3bdc9278c41ccfda8a4f
[]
no_license
Wincher/JavaWorkout
ff55ecdf6d2867ed56ec2e1f95e7cf7d41aee068
81e80bfb4aec823ffe625cc98330d123ffd1e3d6
refs/heads/master
2023-06-28T07:07:38.727462
2023-03-18T06:57:55
2023-03-18T07:14:32
99,265,446
0
0
null
2023-06-14T22:46:52
2017-08-03T18:56:37
Java
UTF-8
Java
false
false
500
java
package test; public class extendTest { public static void main(String[] args) { B b = (B)getA(); System.out.println(b.getB()); System.out.println(b.getA()); } private static Parent getA() { Parent a = new B(); a.setA(1); ((B)a).setB(3); return a; } } class Parent { public int getA() { return a; } public void setA(int a) { this.a = a; } int a; } class B extends Parent { int b; public int getB() { return b; } public void setB(int b) { this.b = b; } }
[ "wincher.hoo@gmail.com" ]
wincher.hoo@gmail.com
57a495f5bb846b0bc64b2fcf1f835065aa59a768
92e7a62c54bcf24de97b5d4c1bb15b99f775bed2
/OpenConcerto/src/org/openconcerto/sql/model/SQLItem.java
35bcc3028697cc9021348df012654adc969532be
[]
no_license
trespe/openconcerto
4a9c294006187987f64dbf936f167d666e6c5d52
6ccd5a7b56cd75350877842998c94434083fb62f
refs/heads/master
2021-01-13T02:06:29.609413
2015-04-10T08:35:31
2015-04-10T08:35:31
33,717,537
3
0
null
null
null
null
UTF-8
Java
false
false
785
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved. * * The contents of this file are subject to the terms of the GNU General Public License Version 3 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each file. */ package org.openconcerto.sql.model; /** * An item of an SQL sentence. * * @author Sylvain */ public interface SQLItem { public String getSQL(); }
[ "guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b" ]
guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b
bc7c1379f95f2df86be9b711a4327074ca340253
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13141-44-4-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/container/servlet/filters/internal/SavedRequestRestorerFilter_ESTest.java
c273e64d0135bde4131415a32d6bee99a7cd5a4b
[]
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
603
java
/* * This file was automatically generated by EvoSuite * Wed Jan 22 03:21:51 UTC 2020 */ package org.xwiki.container.servlet.filters.internal; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class SavedRequestRestorerFilter_ESTest extends SavedRequestRestorerFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
fd38c2e5fa962603279777ff1ecac6fe8feca5f8
3a3d82fd0faeed8f0f443dfe3faab5131726daa0
/data/point/PropPntCommon.java
f0c603bf22f0617f4e4ce2df715c1da326a5b826
[]
no_license
galgalusha/webitc
3252c69b399c410091ae48f56422d23f07ee54cd
3cc4908bf67908a3eeb8d63f3a4d9b9339331f37
refs/heads/master
2021-08-06T05:46:05.823169
2017-11-03T13:52:08
2017-11-03T13:52:08
109,401,575
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package webitc.data.point; import webitc.common.enum2.EnumInnerType; import webitc.common.enum2.EnumPntType; import webitc.data.ID; public class PropPntCommon { public final int fAddress; public final String fDetailName; public final int fIconID; public final EnumInnerType fInnerType; public final ID fPntID; public final EnumPntType fPntType; public final int fPortNum; public final String fShortName; public PropPntCommon(ID paramID, int paramInt1, int paramInt2, int paramInt3, String paramString1, String paramString2, EnumPntType paramEnumPntType, EnumInnerType paramEnumInnerType) { fPntID = paramID; fIconID = paramInt3; fPortNum = paramInt1; fAddress = paramInt2; fDetailName = paramString2; fShortName = paramString1; fPntType = paramEnumPntType; fInnerType = paramEnumInnerType; } }
[ "koren.gal@gmail.com" ]
koren.gal@gmail.com
a268d00125d877021a6505914abe68708ef29ec7
574ca6a57daadc9dfe623aa5d1a3e54f662db284
/SpringBootFreemaker/src/main/java/com/mengke/WebSocketConfig.java
58d184b22b1960797b6e0faca8953ffaea94a82e
[]
no_license
kekesam/kekespringboot
7258c2dec423081c82b0f1e09ae489c6c7690c83
d293c92b2fa5f7e4e347eb56d0af5af0fa64d169
refs/heads/master
2021-08-30T20:20:46.801518
2017-12-19T09:22:54
2017-12-19T09:22:54
110,570,109
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package com.mengke; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer { @Override public void configureMessageBroker(MessageBrokerRegistry config) { config.enableSimpleBroker("/topic", "/queue"); config.setApplicationDestinationPrefixes("/app"); // 应用程序以 /app 为前缀,而 代理目的地以 /topic 为前缀. // js.url = "/spring13/app/hello" -> @MessageMapping("/hello") 注释的方法. } @Override public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/stomp").withSockJS(); // 在网页上我们就可以通过这个链接 /server/app/hello 来和服务器的WebSocket连接 } }
[ "xuchengfeifei@163.com" ]
xuchengfeifei@163.com
7c93c1fd4fe555993d13fc7f3e3eb51d3c7e220d
5124c83de0ce2ebd73b7a4edd1dc6edfc3523af5
/Aurora-2.6/me/memeszz/aurora/module/modules/movement/IceSpeed.java
b2bd87ace1ae49afd3ba06c16a8430bf2b5e3a84
[]
no_license
Sixtieth/rip-aurora
44306d2b97f7c14e805724dac7afd2f36af0caeb
30665f17ea09f4995569de887fd14d9ff942b36b
refs/heads/master
2022-11-26T15:28:27.287942
2020-08-08T22:04:45
2020-08-08T22:04:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,016
java
package me.memeszz.aurora.module.modules.movement; import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; import net.minecraft.init.Blocks; import me.memeszz.aurora.event.events.UpdateEvent; import me.memeszz.aurora.setting.Setting; import me.memeszz.aurora.module.Module; public class IceSpeed extends Module { Setting.d speed; public IceSpeed() { super("IceSpeed", Category.MOVEMENT, "SPEED"); } @Override public void setup() { this.speed = this.registerD("Speed", 0.4, 0.0, 1.0); } @Listener public void onUpdate(final UpdateEvent event) { Blocks.ICE.slipperiness = (float)this.speed.getValue(); Blocks.PACKED_ICE.slipperiness = (float)this.speed.getValue(); Blocks.FROSTED_ICE.slipperiness = (float)this.speed.getValue(); } public void onDisable() { Blocks.ICE.slipperiness = 0.98f; Blocks.PACKED_ICE.slipperiness = 0.98f; Blocks.FROSTED_ICE.slipperiness = 0.98f; } }
[ "adadadw123@gmail.com" ]
adadadw123@gmail.com
033a7fc941d89f8a2c203dd0c45aba5e37458d9c
6181a36df1beb0199595e93e5457f1c40160c954
/schemacrawler-sqlite/src/test/java/schemacrawler/integration/test/BundledDistributionTest.java
affc61912f6229ca442c57d4c873ebd9cce17423
[ "Apache-2.0" ]
permissive
liang0/SchemaCrawler
2ae75b95cc1ce4755022b5afa24a748ff8512a6d
7d4f1f052af015375f88204ebc05291e98ba0af2
refs/heads/master
2022-06-11T03:38:23.610214
2020-05-10T14:16:34
2020-05-10T14:16:34
263,398,197
1
0
NOASSERTION
2020-05-12T16:57:33
2020-05-12T16:57:32
null
UTF-8
Java
false
false
2,197
java
/* ======================================================================== SchemaCrawler http://www.schemacrawler.com Copyright (c) 2000-2020, Sualeh Fatehi <sualeh@hotmail.com>. All rights reserved. ------------------------------------------------------------------------ SchemaCrawler 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. SchemaCrawler and the accompanying materials are made available under the terms of the Eclipse Public License v1.0, GNU General Public License v3 or GNU Lesser General Public License v3. You may elect to redistribute this code under any of these licenses. The Eclipse Public License is available at: http://www.eclipse.org/legal/epl-v10.html The GNU General Public License v3 and the GNU Lesser General Public License v3 are available at: http://www.gnu.org/licenses/ ======================================================================== */ package schemacrawler.integration.test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import java.sql.Connection; import org.junit.jupiter.api.Test; import schemacrawler.tools.databaseconnector.DatabaseConnector; import schemacrawler.tools.databaseconnector.DatabaseConnectorRegistry; public class BundledDistributionTest { @Test public void testContextrmationSchema_sqlite() throws Exception { final Connection connection = null; final DatabaseConnectorRegistry registry = DatabaseConnectorRegistry.getDatabaseConnectorRegistry(); final DatabaseConnector databaseSystemIdentifier = registry.lookupDatabaseConnector("sqlite"); assertThat(databaseSystemIdentifier .getSchemaRetrievalOptionsBuilder(connection) .toOptions() .getInformationSchemaViews() .size(), is(3)); } @Test public void testPlugin_sqlite() throws Exception { final DatabaseConnectorRegistry registry = DatabaseConnectorRegistry.getDatabaseConnectorRegistry(); assertThat(registry.hasDatabaseSystemIdentifier("sqlite"), is(true)); } }
[ "sualeh@hotmail.com" ]
sualeh@hotmail.com
94178f17e08d61bc7faab2fd2a5e370cf471a8ed
78a89691ae32f9576143feb561cf127adf7a7a33
/ksh-business/ksh-meeting/src/main/java/com/fosung/ksh/meeting/service/impl/MeetingUserSyncServiceImpl.java
944dfc341e229096cc87f1154bd67d16d1a296a2
[]
no_license
zhenqun/fosung-ksh
e1a4aac4f08ab124018fc89548d7dc9c963afec7
36027ee33b5d56443aafa2fcfb3a02f7159845c2
refs/heads/master
2022-07-10T05:19:44.742151
2019-10-21T01:03:56
2019-10-21T01:03:56
215,750,234
0
0
null
2022-06-29T17:43:12
2019-10-17T09:10:08
Java
UTF-8
Java
false
false
7,723
java
package com.fosung.ksh.meeting.service.impl; import com.fosung.framework.common.util.UtilString; import com.fosung.framework.dao.support.service.jpa.AppJPABaseDataServiceImpl; import com.fosung.ksh.common.util.UtilBean; import com.fosung.ksh.meeting.control.client.UserClient; import com.fosung.ksh.meeting.control.dto.user.UserResponseDTO; import com.fosung.ksh.meeting.control.dto.user.UserinfoRequestDTO; import com.fosung.ksh.meeting.dao.MeetingUserSyncDao; import com.fosung.ksh.meeting.entity.MeetingUserSync; import com.fosung.ksh.meeting.entity.dto.MeetingUserSyncDTO; import com.fosung.ksh.meeting.service.MeetingUserSyncService; import com.fosung.ksh.sys.client.SysUserClient; import com.fosung.ksh.sys.dto.SysUser; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.lang.reflect.InvocationTargetException; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @Slf4j @Service public class MeetingUserSyncServiceImpl extends AppJPABaseDataServiceImpl<MeetingUserSync, MeetingUserSyncDao> implements MeetingUserSyncService { @Autowired private UserClient ctrlUserClient; @Autowired private SysUserClient sysUserClient; /** * 查询条件表达式 */ private Map<String, String> expressionMap = new LinkedHashMap<String, String>() { { put("idCard", "idCard:EQ"); put("userHash", "userHash:EQ"); put("userHashList", "userHash:IN"); } }; /** * 查询党组织下用户同步信息 * * @param orgId * @return */ public List<MeetingUserSyncDTO> query(String orgId, String userName) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { List<SysUser> dtList = sysUserClient.queryDTUserByOrgId(orgId); List<SysUser> localList = sysUserClient.queryLocalUserByOrgId(orgId); dtList.addAll(localList); List<String> userHashList = dtList.stream().map(SysUser::getHash).collect(Collectors.toList()); Map<String, Object> searchParam = Maps.newHashMap(); searchParam.put("userHashList", userHashList); List<MeetingUserSync> dbList = queryAll(searchParam); Map<String, MeetingUserSync> faceMap = dbList.stream().collect(Collectors.toMap(MeetingUserSync::getUserHash, meetingUserFace -> meetingUserFace)); List<MeetingUserSyncDTO> meetingUserFaceDTOList = Lists.newArrayList(); for (SysUser sysUser : dtList) { MeetingUserSyncDTO dto = new MeetingUserSyncDTO(); UtilBean.copyProperties(dto, sysUser); MeetingUserSync meetingUserSync = faceMap.get(sysUser.getHash()); if (meetingUserSync != null) { dto.setMeetingUserSyncId(meetingUserSync.getId()); dto.setSync(true); } meetingUserFaceDTOList.add(dto); } if (UtilString.isNotBlank(userName.trim())) { meetingUserFaceDTOList= meetingUserFaceDTOList.stream().filter(meetingUserFaceDTO -> meetingUserFaceDTO.getRealName().contains(userName)) .collect(Collectors.toList()); } return meetingUserFaceDTOList; } /** * 同步数据到好视通 * * @param user * @throws Exception */ public void sync(UserinfoRequestDTO user) { ctrlUserClient.addUserinfo(user); } /** * 同步数据到好视通 */ @Override public void batchSync(String orgId) { List<MeetingUserSync> addList = Lists.newArrayList(); List<MeetingUserSync> updateList = Lists.newArrayList(); List<SysUser> rtList = sysUserClient.queryDTUserByOrgId(orgId); List<SysUser> localList = sysUserClient.queryLocalUserByOrgId(orgId); rtList.addAll(localList); List<String> userHashList = rtList.stream().map(SysUser::getHash).collect(Collectors.toList()); Map<String, Object> searchParam = Maps.newHashMap(); searchParam.put("userHashList", userHashList); List<MeetingUserSync> dbList = queryAll(searchParam); Map<String, MeetingUserSync> syncMap = dbList.stream().collect(Collectors.toMap(MeetingUserSync::getUserHash, meetingUserFace -> meetingUserFace)); // 获取新增用户 addList = getAddLIst(rtList, syncMap); // 获取修改用户 updateList = getUpdateList(rtList, syncMap); for (MeetingUserSync meetingUserSync : addList) { try { ctrlUserClient.addUserinfo(userinfoRequestDTO(meetingUserSync)); save(meetingUserSync); } catch (Exception e) { UserResponseDTO dto = ctrlUserClient.get(meetingUserSync.getUserHash()); if (dto != null) { save(meetingUserSync); } else { log.error("用户同步失败,{}", ExceptionUtils.getStackTrace(e)); } } } for (MeetingUserSync meetingUserSync : updateList) { ctrlUserClient.editUser(userinfoRequestDTO(meetingUserSync)); update(meetingUserSync, Sets.newHashSet("realName", "orgId")); } log.info("\n党员同步结果:\n党组织:{}\n用户总数:{}\n新增用户:{}\n修改用户:{}", orgId, rtList.size(), addList.size(), updateList.size()); } /** * 获取被修改的数据 * * @param rtList * @param syncMap * @return */ private List<MeetingUserSync> getUpdateList(List<SysUser> rtList, Map<String, MeetingUserSync> syncMap) { return rtList.stream().filter(sysUser -> { MeetingUserSync meetingUserSync = syncMap.get(sysUser.getHash()); if (meetingUserSync == null) { return false; } return !(sysUser.getRealName().equals(meetingUserSync.getRealName()) && sysUser.getOrgId().equals(meetingUserSync.getOrgId())); }).map(sysUser -> { MeetingUserSync meetingUserSync = syncMap.get(sysUser.getHash()); meetingUserSync.setOrgId(sysUser.getOrgId()); meetingUserSync.setRealName(sysUser.getRealName()); return meetingUserSync; }).collect(Collectors.toList()); } /** * 获取新增的用户 * * @param rtList * @param syncMap * @return */ private List<MeetingUserSync> getAddLIst(List<SysUser> rtList, Map<String, MeetingUserSync> syncMap) { List<MeetingUserSync> addList; addList = rtList.stream().filter(sysUser -> syncMap.get(sysUser.getHash()) == null).map(sysUser -> { MeetingUserSync userSync = new MeetingUserSync(); userSync.setUserHash(sysUser.getHash()); userSync.setRealName(sysUser.getRealName()); userSync.setOrgId(sysUser.getOrgId()); return userSync; }).collect(Collectors.toList()); return addList; } private UserinfoRequestDTO userinfoRequestDTO(MeetingUserSync meetingUserSync) { UserinfoRequestDTO u = new UserinfoRequestDTO(); u.setNickName(meetingUserSync.getRealName()); u.setOrgId(meetingUserSync.getOrgId()); u.setUserName(meetingUserSync.getUserHash()); return u; } @Override public Map<String, String> getQueryExpressions() { return this.expressionMap; } }
[ "liuzq@hd100.com" ]
liuzq@hd100.com
f8da555b643de47589add169f17dc8fe9bc4f087
fb055260d32f4980ca2ae23d1872afa5730bdc1e
/src/main/java/com/codenotfound/jms/ReceiverConfig.java
6146ea5cf7eb85409a1118dfa8d0cda62e7ac065
[]
no_license
Home-ActiveMQ/spring-jms-listener
ae7174ebcf8c93913f1e15b13e0aa1f5b2c2a610
d3149b3916af6fa00d9ee3454587f1c3f35785a6
refs/heads/master
2020-04-17T08:34:26.208148
2019-01-18T15:24:37
2019-01-18T15:24:37
166,417,667
0
0
null
null
null
null
UTF-8
Java
false
false
2,594
java
package com.codenotfound.jms; import org.apache.activemq.ActiveMQConnectionFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jms.annotation.EnableJms; import org.springframework.jms.config.DefaultJmsListenerContainerFactory; import org.springframework.jms.config.SimpleJmsListenerContainerFactory; import org.springframework.jms.config.SimpleJmsListenerEndpoint; import org.springframework.jms.listener.DefaultMessageListenerContainer; import org.springframework.jms.listener.SimpleMessageListenerContainer; @Configuration @EnableJms public class ReceiverConfig { @Value("${activemq.broker-url}") private String brokerUrl; @Value("${destination.status1}") private String status1Destination; @Value("${destination.status2}") private String status2Destination; @Bean public ActiveMQConnectionFactory receiverActiveMQConnectionFactory() { ActiveMQConnectionFactory activeMQConnectionFactory = new ActiveMQConnectionFactory(); activeMQConnectionFactory.setBrokerURL(brokerUrl); return activeMQConnectionFactory; } @Bean public SimpleJmsListenerContainerFactory orderSimpleJmsListenerContainerFactory() { SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory(); factory.setConnectionFactory(receiverActiveMQConnectionFactory()); return factory; } @Bean public DefaultJmsListenerContainerFactory orderDefaultJmsListenerContainerFactory() { DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); factory.setConnectionFactory(receiverActiveMQConnectionFactory()); factory.setConcurrency("3-10"); return factory; } // @Bean // public DefaultMessageListenerContainer orderMessageListenerContainer() { // SimpleJmsListenerEndpoint endpoint = new SimpleJmsListenerEndpoint(); // endpoint.setMessageListener(new StatusMessageListener("DMLC")); // endpoint.setDestination(status1Destination); // return orderDefaultJmsListenerContainerFactory().createListenerContainer(endpoint); // } // @Bean // public SimpleMessageListenerContainer statusMessageListenerContainer() { // SimpleJmsListenerEndpoint endpoint = // new SimpleJmsListenerEndpoint(); // endpoint.setMessageListener(new StatusMessageListener("SMLC")); // endpoint.setDestination(status2Destination); // // return orderSimpleJmsListenerContainerFactory() // .createListenerContainer(endpoint); // } }
[ "a.lazarchuk@cartsys.com.ua" ]
a.lazarchuk@cartsys.com.ua
5d384901593341fbeb5f559a49849d96ce486cd7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_0ed4a7996a5b131e449e1cb907f10249a02449b0/PauseMenu/30_0ed4a7996a5b131e449e1cb907f10249a02449b0_PauseMenu_s.java
1bb468669c6b84030dd6fdc66054ebf7bc0f86ac
[]
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,639
java
package com.mojang.mojam.gui; import java.awt.event.KeyEvent; import com.mojang.mojam.MojamComponent; import com.mojang.mojam.gui.components.Button; import com.mojang.mojam.gui.components.ClickableComponent; import com.mojang.mojam.screen.Art; import com.mojang.mojam.screen.Screen; public class PauseMenu extends GuiMenu { private final int gameWidth; private final int gameHeight; private Button resumeButton; private Button how_to = null; private Button options = null; private Button back_to_main = null; private Button exit_game = null; public void changeLocale() { resumeButton.setLabel(MojamComponent.texts.getStatic("pausemenu.resume")); how_to.setLabel(MojamComponent.texts.getStatic("pausemenu.help")); options.setLabel(MojamComponent.texts.getStatic("titlemenu.options")); back_to_main.setLabel(MojamComponent.texts.getStatic("pausemenu.backtomain")); exit_game.setLabel(MojamComponent.texts.getStatic("pausemenu.exit")); } public PauseMenu(int gameWidth, int gameHeight) { super(); this.gameWidth = gameWidth; this.gameHeight = gameHeight; resumeButton = (Button) addButton(new Button(TitleMenu.RETURN_ID, MojamComponent.texts.getStatic("pausemenu.resume"), (gameWidth - 128) / 2, 140)); how_to = (Button) addButton(new Button(TitleMenu.HOW_TO_PLAY, MojamComponent.texts.getStatic("pausemenu.help"), (gameWidth - 128) / 2, 170)); options = (Button) addButton(new Button(TitleMenu.OPTIONS_ID, MojamComponent.texts.getStatic("titlemenu.options"), (gameWidth - 128) / 2, 200)); back_to_main = (Button) addButton(new Button(TitleMenu.RETURN_TO_TITLESCREEN, MojamComponent.texts.getStatic("pausemenu.backtomain"), (gameWidth - 128) / 2, 230)); exit_game = (Button) addButton(new Button(TitleMenu.EXIT_GAME_ID, MojamComponent.texts.getStatic("pausemenu.exit"), (gameWidth - 128) / 2, 260)); } public void render(Screen screen) { //screen.clear(0); //screen.blit(Art.emptyBackground, 0, 0); screen.alphaFill(0, 0, gameWidth, gameHeight, 0xff000000, 0x30); screen.blit(Art.pauseScreen, 0, 0); super.render(screen); screen.blit(Art.getLocalPlayerArt()[0][6], (gameWidth - 128) / 2 - 40, 130 + selectedItem * 30); } @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { resumeButton.postClick(); } else { super.keyPressed(e); } } public void keyReleased(KeyEvent arg0) { } public void keyTyped(KeyEvent arg0) { } @Override public void buttonPressed(ClickableComponent button) { // TODO Auto-generated method stub } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6ffea075246cd9a6c99d07bedd76c865fcf1f54a
55042d6a62a329d6e2ab268f00c80663d868aeb5
/src/chap18/ControllerUsingURI.java
d4957468e257c5fc98e7dceb7ccdf746923ea445
[]
no_license
wkdalswn11/jsp20201103
92e38add2490ef35396d15a72b22a1e083f892cb
6dd2d410401fadd423d7d037435bef2d21c78b21
refs/heads/master
2023-01-20T07:42:37.676515
2020-12-02T08:52:48
2020-12-02T08:52:48
309,549,728
0
0
null
null
null
null
UTF-8
Java
false
false
2,961
java
package chap18; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; //** /* Servlet implementation class ControllerUsingURI */ //@WebServlet("*.do") public class ControllerUsingURI extends HttpServlet { private static final long serialVersionUID = 1L; private Map<String, CommandHandler> commandHandlerMap = new HashMap<>(); /** * @see HttpServlet#HttpServlet() */ public ControllerUsingURI() { super(); // TODO Auto-generated constructor stub } @Override public void init() throws ServletException { String configFile = getInitParameter("configFile"); Properties prop = new Properties(); String configFilePath = getServletContext().getRealPath(configFile); try (FileReader fis = new FileReader(configFilePath)) { prop.load(fis); } catch (Exception e) { throw new ServletException(e); } Iterator keyIter = prop.keySet().iterator(); while (keyIter.hasNext()) { String command = (String) keyIter.next(); String handlerClassName = prop.getProperty(command); try { Class<?> handlerClass = Class.forName(handlerClassName); CommandHandler handlerInstance = (CommandHandler) handlerClass.newInstance(); commandHandlerMap.put(command, handlerInstance); } catch (Exception e) { throw new ServletException(e); } } } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request, response); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { process(request, response); } private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String command = request.getRequestURI(); if (command.indexOf(request.getContextPath()) == 0) { command = command.substring(request.getContextPath().length()); } CommandHandler handler = commandHandlerMap.get(command); if (handler == null) { // handler = new NullHandler(); } String viewPage = null; try { viewPage = handler.process(request, response); } catch (Throwable e) { throw new ServletException(e); } if (viewPage != null) { RequestDispatcher dispatcher = request.getRequestDispatcher(viewPage); dispatcher.forward(request, response); } } }
[ "wkdalswn133@naver.com" ]
wkdalswn133@naver.com
8a12b92189037ffdc234015dd0ddfd49fb9a8889
2f4c22e8727179c7acd92df2eece77a2aa783a15
/extensions/training/trainingstorefront/web/src/com/epam/training/storefront/interceptors/beforeview/UiExperienceMetadataViewHandler.java
f829ef147a6635501071088bf9b0bd2d5096f540
[]
no_license
studenthybris/project
e62dac224d861a29e923e29325c871fa50cf39cc
49a5bf3076701f30380c04909c1d55c8b7c69d87
refs/heads/master
2021-09-02T12:07:52.740012
2018-01-02T12:56:35
2018-01-02T12:56:35
114,237,069
0
0
null
null
null
null
UTF-8
Java
false
false
3,009
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package com.epam.training.storefront.interceptors.beforeview; import de.hybris.platform.acceleratorservices.storefront.data.MetaElementData; import de.hybris.platform.acceleratorservices.uiexperience.UiExperienceService; import de.hybris.platform.acceleratorstorefrontcommons.interceptors.BeforeViewHandler; import de.hybris.platform.commerceservices.enums.UiExperienceLevel; import de.hybris.platform.commerceservices.util.ResponsiveUtils; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView; /** * Adds meta tags to help guide the device for the current UI Experience. */ public class UiExperienceMetadataViewHandler implements BeforeViewHandler { @Resource(name = "uiExperienceService") private UiExperienceService uiExperienceService; @Override public void beforeView(final HttpServletRequest request, final HttpServletResponse response, final ModelAndView modelAndView) throws Exception { if (modelAndView != null && modelAndView.getModel().containsKey("metatags")) { final List<MetaElementData> metaelements = (List<MetaElementData>) modelAndView.getModel().get("metatags"); final UiExperienceLevel currentUiExperienceLevel = uiExperienceService.getUiExperienceLevel(); if (UiExperienceLevel.DESKTOP.equals(currentUiExperienceLevel)) { if (!ResponsiveUtils.isResponsive()) { // Provide some hints to mobile browser even though this is not the mobile site --> metaelements.add(createMetaElement("HandheldFriendly", "True")); metaelements.add(createMetaElement("MobileOptimized", "970")); metaelements.add(createMetaElement("viewport", "width=970, target-densitydpi=160, maximum-scale=1.0")); } } else if (UiExperienceLevel.MOBILE.equals(currentUiExperienceLevel)) { // Provide some hints to mobile browser even though this is not the mobile site --> metaelements.add(createMetaElement("HandheldFriendly", "True")); metaelements.add(createMetaElement("MobileOptimized", "320")); metaelements .add(createMetaElement("viewport", "width=device-width, target-densitydpi=160, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no")); metaelements.add(createMetaElement("format-detection", "telephone=no")); } } } protected MetaElementData createMetaElement(final String name, final String content) { final MetaElementData element = new MetaElementData(); element.setName(name); element.setContent(content); return element; } }
[ "Oleksandr_Bohdan@epam.com" ]
Oleksandr_Bohdan@epam.com
2eafc52b4ad587abf110fc989fa551d41d2b1712
6392035b0421990479baf09a3bc4ca6bcc431e6e
/projects/spring-data-neo4j-071588a4/prev/spring-data-neo4j/src/test/java/org/springframework/data/neo4j/integration/repositories/ProgrammaticRepositoryTest.java
d99735b8aa9ef5a45bcafd9ab00f0647dbb8bd2e
[]
no_license
ameyaKetkar/RMinerEvaluationTools
4975130072bf1d4940f9aeb6583eba07d5fedd0a
6102a69d1b78ae44c59d71168fc7569ac1ccb768
refs/heads/master
2020-09-26T00:18:38.389310
2020-05-28T17:34:39
2020-05-28T17:34:39
226,119,387
3
1
null
null
null
null
UTF-8
Java
false
false
2,196
java
/* * Copyright (c) [2011-2015] "Pivotal Software, Inc." / "Neo Technology" / "Graph Aware Ltd." * * This product is licensed to you under the Apache License, Version 2.0 (the "License"). * You may not use this product except in compliance with the License. * * This product may include a number of subcomponents with * separate copyright notices and license terms. Your use of the source * code for these subcomponents is subject to the terms and * conditions of the subcomponent's license, as noted in the LICENSE file. */ package org.springframework.data.neo4j.integration.repositories; import static org.junit.Assert.*; import static org.neo4j.ogm.testutil.GraphTestUtils.*; import org.junit.Rule; import org.junit.Test; import org.neo4j.ogm.metadata.MetaData; import org.neo4j.ogm.session.SessionFactory; import org.neo4j.ogm.testutil.Neo4jIntegrationTestRule; import org.springframework.data.neo4j.integration.repositories.domain.Movie; import org.springframework.data.neo4j.integration.repositories.repo.MovieRepository; import org.springframework.data.neo4j.mapping.Neo4jMappingContext; import org.springframework.data.neo4j.repository.support.GraphRepositoryFactory; import org.springframework.data.neo4j.util.IterableUtils; import org.springframework.data.repository.core.support.RepositoryFactorySupport; /** * @author Michal Bachman */ public class ProgrammaticRepositoryTest { @Rule public final Neo4jIntegrationTestRule neo4jRule = new Neo4jIntegrationTestRule(7879); private MovieRepository movieRepository; @Test public void canInstantiateRepositoryProgrammatically() { RepositoryFactorySupport factory = new GraphRepositoryFactory( new SessionFactory("org.springframework.data.neo4j.integration.repositories.domain").openSession(neo4jRule.url()),new Neo4jMappingContext(new MetaData())); movieRepository = factory.getRepository(MovieRepository.class); Movie movie = new Movie("PF"); movieRepository.save(movie); assertSameGraph(neo4jRule.getGraphDatabaseService(), "CREATE (m:Movie {title:'PF'})"); assertEquals(1, IterableUtils.count(movieRepository.findAll())); } }
[ "ask1604@gmail.com" ]
ask1604@gmail.com
145fbe62dee422769afbc4358ed2419b21c372dc
b81ea76cf655841e7abc9a2addbc0436ccbad67c
/src/main/java/org/cyclops/evilcraft/core/degradation/effect/ParticleDegradation.java
89d93502076352e4a14994455e4762264881f30c
[ "CC-BY-4.0" ]
permissive
josephcsible/EvilCraft
bdb64db3f25d734bcda11c456fc84ef7abedb5b7
0a606dee60fbdb41fcbaa4464e9027ed60bfa873
refs/heads/master-1.12
2021-09-12T04:43:28.333523
2017-10-15T08:09:12
2017-10-15T08:09:12
107,916,666
0
0
null
2017-10-23T01:12:47
2017-10-23T01:12:47
null
UTF-8
Java
false
false
2,425
java
package org.cyclops.evilcraft.core.degradation.effect; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.client.FMLClientHandler; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import org.cyclops.cyclopscore.config.extendedconfig.ExtendedConfig; import org.cyclops.evilcraft.api.degradation.IDegradable; import org.cyclops.evilcraft.client.particle.ParticleDegrade; import org.cyclops.evilcraft.core.config.configurable.ConfigurableDegradationEffect; import org.cyclops.evilcraft.core.config.extendedconfig.DegradationEffectConfig; /** * An effect that will knockback the entities within the range of the degradable. * @author rubensworks * */ public class ParticleDegradation extends ConfigurableDegradationEffect { private static ParticleDegradation _instance = null; /** * Get the unique instance. * @return The instance. */ public static ParticleDegradation getInstance() { return _instance; } public ParticleDegradation(ExtendedConfig<DegradationEffectConfig> eConfig) { super(eConfig); } @Override public boolean canRun(IDegradable degradable) { return true; } @Override @SideOnly(Side.CLIENT) public void runClientSide(IDegradable degradable) { BlockPos center = degradable.getLocation(); World world = degradable.getDegradationWorld(); int radius = degradable.getRadius(); double xCoord = center.getX() - radius + 2 * radius * world.rand.nextFloat(); double yCoord = center.getY() - radius + 2 * radius * world.rand.nextFloat(); double zCoord = center.getZ() - radius + 2 * radius * world.rand.nextFloat(); double particleX = xCoord; double particleY = yCoord; double particleZ = zCoord; float particleMotionX = world.rand.nextFloat() * 1.4F - 0.7F; float particleMotionY = -0.2F; float particleMotionZ = world.rand.nextFloat() * 1.4F - 0.7F; FMLClientHandler.instance().getClient().effectRenderer.addEffect( new ParticleDegrade(world, particleX, particleY, particleZ, particleMotionX, particleMotionY, particleMotionZ) ); } @Override public void runServerSide(IDegradable degradable) { } }
[ "rubensworks@gmail.com" ]
rubensworks@gmail.com
39dc7511ca936d2c9894701baa971bcb8f9c8a11
dc24bb78f60a413993af938359bd2c8e744d5c75
/pod-AI-service-java/SDK/src/main/java/com/fanap/podAIPlatform/data/modelSrv/ImageProcessingAuthenticationSrv.java
d071836f789030af1ea10b8fe4f2ecf92881b6e7
[]
no_license
FanapSoft/pod-java-sdk
aa63c3a13d0357b8d44e0bec4094d374487780c6
6141c62945e9a98304b0993a63e297e9bdab29b7
refs/heads/master
2021-12-14T21:40:01.515531
2020-11-18T09:25:25
2020-11-18T09:25:25
198,595,351
1
2
null
2021-12-09T22:47:03
2019-07-24T08:47:23
Java
UTF-8
Java
false
false
1,754
java
package com.fanap.podAIPlatform.data.modelSrv; import com.fanap.podBaseService.exception.PodException; import com.fanap.podBaseService.util.JsonUtil; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.json.JSONObject; import java.io.IOException; public class ImageProcessingAuthenticationSrv { private String result; private Header header; private long statusCode; private JSONObject jsonObject; public AIPlatformResult<ImageProcessingAuthenticationContentSrv> getResult() throws PodException { jsonObject = JsonUtil.getJsonObject(result); // System.out.println(jsonObject.toString()); Gson gson = new GsonBuilder().create(); ObjectMapper mapper = new ObjectMapper(); AIPlatformResult<ImageProcessingAuthenticationContentSrv> platformResult = null; try { platformResult = mapper.readValue(result, new TypeReference<AIPlatformResult<ImageProcessingAuthenticationContentSrv>>() { }); if (platformResult.getHasError()) throw PodException.developerException(platformResult.getStatusCode(), ""); } catch (IOException e) { e.printStackTrace(); } return platformResult; } public void setResult(String result) { this.result = result; } public Header getHeader() { return header; } public void setHeader(Header header) { this.header = header; } public long getStatusCode() { return statusCode; } public void setStatusCode(long statusCode) { this.statusCode = statusCode; } }
[ "zahra.gholinia76@gmail.com" ]
zahra.gholinia76@gmail.com
eb1a2d903774ed1bedec12ce9a05bfebf1645896
0ca9a0873d99f0d69b78ed20292180f513a20d22
/saved/sources/com/google/android/exoplayer2/source/hls/HlsSampleStream.java
22d892e95d851f5ced9260949e4f1369d4f10bc0
[]
no_license
Eliminater74/com.google.android.tvlauncher
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
e8284f9970d77a05042a57e9c2173856af7c4246
refs/heads/master
2021-01-14T23:34:04.338366
2020-02-24T16:39:53
2020-02-24T16:39:53
242,788,539
1
0
null
null
null
null
UTF-8
Java
false
false
2,440
java
package com.google.android.exoplayer2.source.hls; import com.google.android.exoplayer2.FormatHolder; import com.google.android.exoplayer2.decoder.DecoderInputBuffer; import com.google.android.exoplayer2.source.SampleStream; import com.google.android.exoplayer2.util.Assertions; import java.io.IOException; final class HlsSampleStream implements SampleStream { private int sampleQueueIndex = -1; private final HlsSampleStreamWrapper sampleStreamWrapper; private final int trackGroupIndex; public HlsSampleStream(HlsSampleStreamWrapper sampleStreamWrapper2, int trackGroupIndex2) { this.sampleStreamWrapper = sampleStreamWrapper2; this.trackGroupIndex = trackGroupIndex2; } public void bindSampleQueue() { Assertions.checkArgument(this.sampleQueueIndex == -1); this.sampleQueueIndex = this.sampleStreamWrapper.bindSampleQueueToSampleStream(this.trackGroupIndex); } public void unbindSampleQueue() { if (this.sampleQueueIndex != -1) { this.sampleStreamWrapper.unbindSampleQueue(this.trackGroupIndex); this.sampleQueueIndex = -1; } } public boolean isReady() { return this.sampleQueueIndex == -3 || (hasValidSampleQueueIndex() && this.sampleStreamWrapper.isReady(this.sampleQueueIndex)); } public void maybeThrowError() throws IOException { if (this.sampleQueueIndex != -2) { this.sampleStreamWrapper.maybeThrowError(); return; } throw new SampleQueueMappingException(this.sampleStreamWrapper.getTrackGroups().get(this.trackGroupIndex).getFormat(0).sampleMimeType); } public int readData(FormatHolder formatHolder, DecoderInputBuffer buffer, boolean requireFormat) { if (this.sampleQueueIndex == -3) { buffer.addFlag(4); return -4; } else if (hasValidSampleQueueIndex()) { return this.sampleStreamWrapper.readData(this.sampleQueueIndex, formatHolder, buffer, requireFormat); } else { return -3; } } public int skipData(long positionUs) { if (hasValidSampleQueueIndex()) { return this.sampleStreamWrapper.skipData(this.sampleQueueIndex, positionUs); } return 0; } private boolean hasValidSampleQueueIndex() { int i = this.sampleQueueIndex; return (i == -1 || i == -3 || i == -2) ? false : true; } }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
c620c9a5527598558a9a866c1deaf13050e96e66
90577e7daee3183e57a14c43f0a0e26c6616c6a6
/com.cssrc.ibms.core.form/src/main/java/com/cssrc/ibms/core/form/model/FormRights.java
26c3aa8ab92ef5b7c416885754d78c6a22a26141
[]
no_license
xeon-ye/8ddp
a0fec7e10182ab4728cafc3604b9d39cffe7687e
52c7440b471c6496f505e3ada0cf4fdeecce2815
refs/heads/master
2023-03-09T17:53:38.427613
2021-02-18T02:18:55
2021-02-18T02:18:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,348
java
package com.cssrc.ibms.core.form.model; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; import com.cssrc.ibms.api.form.model.BaseFormRights; import com.cssrc.ibms.api.form.model.IFormRights; /** * 对象功能:字段权限 Model对象 开发人员:zhulongchao */ @XmlRootElement(name = "formRights") @XmlAccessorType(XmlAccessType.NONE) public class FormRights extends BaseFormRights implements Cloneable, IFormRights { private static final long serialVersionUID = 8734533541139921672L; // id @XmlAttribute protected Long id; // 表单定义KEY @XmlAttribute protected Long formDefId; // 字段名 @XmlAttribute protected String name; // 权限 @XmlAttribute protected String permission = ""; // 权限类型(1,字段FieldRights ,2,子表TableRights,,3,意见OpinionRights, // 4.子表是否显示TableShowRights,5.rel表TableRelRights ,6. // rel表是否显示TableRelShowRights ,7.附件文件列表权限AttachFileRights) @XmlAttribute protected short type = 1; // 流程定义ID @XmlAttribute protected String actDefId = ""; @XmlAttribute protected String parentActDefId = ""; // 流程任务ID @XmlAttribute protected String nodeId = ""; @XmlAttribute protected Integer sn = 0; @XmlAttribute protected Integer platform = Integer.valueOf(0); public FormRights() { } public FormRights(Long id, Long formDefId, String name, String permission, short type) { super(); this.id = id; this.formDefId = formDefId; this.name = name; this.permission = permission; this.type = type; } public void setId(Long id) { this.id = id; } /** * 返回 id * * @return */ public Long getId() { return id; } public void setFormDefId(Long formDefId) { this.formDefId = formDefId; } /** * 返回 表单定义ID * * @return */ public Long getFormDefId() { return formDefId; } public void setName(String fieldName) { this.name = fieldName; } /** * 返回 字段名 * * @return */ public String getName() { return name; } public void setPermission(String permission) { this.permission = permission; } /** * 返回 权限 * * @return */ public String getPermission() { return permission; } public short getType() { return type; } public void setType(short type) { this.type = type; } public String getActDefId() { return actDefId; } public void setActDefId(String actDefId) { this.actDefId = actDefId; } public String getNodeId() { return nodeId; } public void setNodeId(String nodeId) { this.nodeId = nodeId; } public Integer getSn() { return sn; } public void setSn(Integer sn) { this.sn = sn; } public String getParentActDefId() { return this.parentActDefId; } public void setParentActDefId(String parentActDefId) { this.parentActDefId = parentActDefId; } public Integer getPlatform() { return this.platform; } public void setPlatform(Integer platform) { this.platform = platform; } /** * @see java.lang.Object#equals(Object) */ public boolean equals(Object object) { if (!(object instanceof FormRights)) { return false; } FormRights rhs = (FormRights) object; return new EqualsBuilder().append(this.id, rhs.id) .append(this.formDefId, rhs.formDefId) .append(this.name, rhs.name) .append(this.permission, rhs.permission).isEquals(); } /** * @see java.lang.Object#hashCode() */ public int hashCode() { return new HashCodeBuilder(-82280557, -700257973).append(this.id) .append(this.formDefId).append(this.name) .append(this.permission).toHashCode(); } /** * @see java.lang.Object#toString() */ public String toString() { return new ToStringBuilder(this).append("id", this.id) .append("formDefId", this.formDefId) .append("fieldName", this.name) .append("permission", this.permission).toString(); } public Object clone() { FormRights obj = null; try { obj = (FormRights) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return obj; } }
[ "john_qzl@163.com" ]
john_qzl@163.com
80f926cbfa4cc23bbe14f8271ebd475aadb06ea4
e682fa3667adce9277ecdedb40d4d01a785b3912
/internal/fischer/mangf/A358072.java
cbe80cfde5a6559d296a99d0c31736f3e9a2f6d8
[ "Apache-2.0" ]
permissive
gfis/joeis-lite
859158cb8fc3608febf39ba71ab5e72360b32cb4
7185a0b62d54735dc3d43d8fb5be677734f99101
refs/heads/master
2023-08-31T00:23:51.216295
2023-08-29T21:11:31
2023-08-29T21:11:31
179,938,034
4
1
Apache-2.0
2022-06-25T22:47:19
2019-04-07T08:35:01
Roff
UTF-8
Java
false
false
511
java
package irvine.oeis.a358; // Generated by gen_seq4.pl holgrep/holos at 2023-05-08 18:43 import irvine.oeis.recur.HolonomicRecurrence; /** * A358072 a(n) is the number of &quot;merger histories&quot; of n elements (see A256006) where at most 3 elements can merge at the same time. * @author Georg Fischer */ public class A358072 extends HolonomicRecurrence { /** Construct the sequence. */ public A358072() { super(1, "[[0],[0,2,-3,1],[0,-3,3],[-6]]", "1,1,4,28,320,5360,123760,3765440", 0); } }
[ "dr.Georg.Fischer@gmail.com" ]
dr.Georg.Fischer@gmail.com
17b22e855d0ee278c680331a49b1d0b9b7a84d65
c12500c20c3f3cc994dd544868d96a51f725e198
/src/main/java/day5/sortowanie/QuickSort.java
243b0b624e48ae2ed3841985bf8fa3ec0c542311
[]
no_license
ujko/gr1P1
73d0bfa893610364d4d7c8aae61c38bdcf65a432
1000285dd27408b6eb835b9928fc48cfe54bc22e
refs/heads/master
2020-12-09T16:33:10.281423
2020-02-22T14:58:53
2020-02-22T14:58:53
233,359,443
0
0
null
null
null
null
UTF-8
Java
false
false
982
java
package day5.sortowanie; import java.util.Arrays; public class QuickSort { public static void main(String[] args) { int[] x={3,6,7,2,8,5}; quickSort(x); System.out.println(Arrays.toString(x)); } public static void quickSort(int[] x) { quick(x,0,x.length-1); } private static void quick(int[] x, int start, int stop){ if(start<stop){ int pivot=pivot(x,start,stop); quick(x,start,pivot-1); quick(x,pivot+1,stop); } } private static int pivot(int[] x,int start, int stop){ int pivot=x[stop]; int granica=start-1; for (int i=start;i<stop;i++){ if (x[i]<=pivot){ swap(x,i,granica+1); granica++; } } swap(x,stop,granica+1); return granica+1; } private static void swap(int[] x,int i1,int i2){ int y=x[i1]; x[i1]=x[i2]; x[i2]=y; } }
[ "uio6398@gmail.com" ]
uio6398@gmail.com
165b78a1c4d634c92695803d3c639df324b6fef3
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/component/playback/model/audio/PlaybackAudioType.java
8f3d5ab5f64a91e12c4921a69ec21a75460120dc
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
662
java
package dji.component.playback.model.audio; public enum PlaybackAudioType { WAV(0), MP3(1), ACC(2), UNKNOWN(255); private final int mValue; private PlaybackAudioType(int value) { this.mValue = value; } public int value() { return this.mValue; } private boolean _equals(int b) { return this.mValue == b; } public static PlaybackAudioType find(int b) { PlaybackAudioType result = UNKNOWN; for (int i = 0; i < values().length; i++) { if (values()[i]._equals(b)) { return values()[i]; } } return result; } }
[ "michael@districtrace.com" ]
michael@districtrace.com
c55a8dbd9fde9916262916f5402a630923c2f068
148100c6a5ac58980e43aeb0ef41b00d76dfb5b3
/sources/com/google/android/gms/internal/measurement/zzfv.java
3d3f40b6c1d8f0925452daa6537864713cdd7a1d
[]
no_license
niravrathod/car_details
f979de0b857f93efe079cd8d7567f2134755802d
398897c050436f13b7160050f375ec1f4e05cdf8
refs/heads/master
2020-04-13T16:36:29.854057
2018-12-27T19:03:46
2018-12-27T19:03:46
163,325,703
0
0
null
null
null
null
UTF-8
Java
false
false
7,465
java
package com.google.android.gms.internal.measurement; public final class zzfv extends zzza<zzfv> { /* renamed from: g */ private static volatile zzfv[] f20535g; /* renamed from: a */ public Integer f20536a; /* renamed from: b */ public String f20537b; /* renamed from: c */ public zzfw[] f20538c; /* renamed from: d */ public zzfx f20539d; /* renamed from: e */ public Boolean f20540e; /* renamed from: f */ public Boolean f20541f; /* renamed from: h */ private Boolean f20542h; /* renamed from: a */ public static zzfv[] m27104a() { if (f20535g == null) { synchronized (zzze.f10362b) { if (f20535g == null) { f20535g = new zzfv[0]; } } } return f20535g; } public zzfv() { this.f20536a = null; this.f20537b = null; this.f20538c = zzfw.m27108a(); this.f20542h = null; this.f20539d = null; this.f20540e = null; this.f20541f = null; this.J = null; this.K = -1; } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof zzfv)) { return false; } zzfv zzfv = (zzfv) obj; if (this.f20536a == null) { if (zzfv.f20536a != null) { return false; } } else if (!this.f20536a.equals(zzfv.f20536a)) { return false; } if (this.f20537b == null) { if (zzfv.f20537b != null) { return false; } } else if (!this.f20537b.equals(zzfv.f20537b)) { return false; } if (!zzze.m12193a(this.f20538c, zzfv.f20538c)) { return false; } if (this.f20542h == null) { if (zzfv.f20542h != null) { return false; } } else if (!this.f20542h.equals(zzfv.f20542h)) { return false; } if (this.f20539d == null) { if (zzfv.f20539d != null) { return false; } } else if (!this.f20539d.equals(zzfv.f20539d)) { return false; } if (this.f20540e == null) { if (zzfv.f20540e != null) { return false; } } else if (!this.f20540e.equals(zzfv.f20540e)) { return false; } if (this.f20541f == null) { if (zzfv.f20541f != null) { return false; } } else if (!this.f20541f.equals(zzfv.f20541f)) { return false; } if (this.J != null) { if (!this.J.m12188b()) { return this.J.equals(zzfv.J); } } if (zzfv.J != null) { if (zzfv.J.m12188b() == null) { return false; } } return true; } public final int hashCode() { int i; int i2 = 0; int hashCode = ((((((((getClass().getName().hashCode() + 527) * 31) + (this.f20536a == null ? 0 : this.f20536a.hashCode())) * 31) + (this.f20537b == null ? 0 : this.f20537b.hashCode())) * 31) + zzze.m12190a(this.f20538c)) * 31) + (this.f20542h == null ? 0 : this.f20542h.hashCode()); zzfx zzfx = this.f20539d; hashCode *= 31; if (zzfx == null) { i = 0; } else { i = zzfx.hashCode(); } hashCode = (((((hashCode + i) * 31) + (this.f20540e == null ? 0 : this.f20540e.hashCode())) * 31) + (this.f20541f == null ? 0 : this.f20541f.hashCode())) * 31; if (this.J != null) { if (!this.J.m12188b()) { i2 = this.J.hashCode(); } } return hashCode + i2; } /* renamed from: a */ public final void mo3160a(zzyy zzyy) { if (this.f20536a != null) { zzyy.m12167a(1, this.f20536a.intValue()); } if (this.f20537b != null) { zzyy.m12171a(2, this.f20537b); } if (this.f20538c != null && this.f20538c.length > 0) { for (zzzg zzzg : this.f20538c) { if (zzzg != null) { zzyy.m12170a(3, zzzg); } } } if (this.f20542h != null) { zzyy.m12172a(4, this.f20542h.booleanValue()); } if (this.f20539d != null) { zzyy.m12170a(5, this.f20539d); } if (this.f20540e != null) { zzyy.m12172a(6, this.f20540e.booleanValue()); } if (this.f20541f != null) { zzyy.m12172a(7, this.f20541f.booleanValue()); } super.mo3160a(zzyy); } /* renamed from: b */ protected final int mo3161b() { int b = super.mo3161b(); if (this.f20536a != null) { b += zzyy.m12156b(1, this.f20536a.intValue()); } if (this.f20537b != null) { b += zzyy.m12158b(2, this.f20537b); } if (this.f20538c != null && this.f20538c.length > 0) { for (zzzg zzzg : this.f20538c) { if (zzzg != null) { b += zzyy.m12157b(3, zzzg); } } } if (this.f20542h != null) { this.f20542h.booleanValue(); b += zzyy.m12155b(4) + 1; } if (this.f20539d != null) { b += zzyy.m12157b(5, this.f20539d); } if (this.f20540e != null) { this.f20540e.booleanValue(); b += zzyy.m12155b(6) + 1; } if (this.f20541f == null) { return b; } this.f20541f.booleanValue(); return b + (zzyy.m12155b(7) + 1); } /* renamed from: a */ public final /* synthetic */ zzzg mo4347a(zzyx zzyx) { while (true) { int a = zzyx.m12129a(); if (a == 0) { return this; } if (a == 8) { this.f20536a = Integer.valueOf(zzyx.m12140d()); } else if (a == 18) { this.f20537b = zzyx.m12139c(); } else if (a == 26) { a = zzzj.m12207a(zzyx, 26); int length = this.f20538c == null ? 0 : this.f20538c.length; Object obj = new zzfw[(a + length)]; if (length != 0) { System.arraycopy(this.f20538c, 0, obj, 0, length); } while (length < obj.length - 1) { obj[length] = new zzfw(); zzyx.m12132a(obj[length]); zzyx.m12129a(); length++; } obj[length] = new zzfw(); zzyx.m12132a(obj[length]); this.f20538c = obj; } else if (a == 32) { this.f20542h = Boolean.valueOf(zzyx.m12136b()); } else if (a == 42) { if (this.f20539d == null) { this.f20539d = new zzfx(); } zzyx.m12132a(this.f20539d); } else if (a == 48) { this.f20540e = Boolean.valueOf(zzyx.m12136b()); } else if (a == 56) { this.f20541f = Boolean.valueOf(zzyx.m12136b()); } else if (!super.m22647a(zzyx, a)) { return this; } } } }
[ "niravrathod473@gmail.com" ]
niravrathod473@gmail.com
de65895dba4677505f81d008ed1b38ed3134fd48
8dcd6fac592760c5bff55349ffb2d7ce39d485cc
/com/google/android/gms/tasks/TaskExecutors.java
f42586d488a29022c30b2a79630a83be49638aa8
[]
no_license
andrepcg/hikam-android
9e3a02e0ba9a58cf8a17c5e76e2f3435969e4b3a
bf39e345a827c6498052d9df88ca58d8823178d9
refs/heads/master
2021-09-01T11:41:10.726066
2017-12-26T19:04:42
2017-12-26T19:04:42
115,447,829
2
2
null
null
null
null
UTF-8
Java
false
false
777
java
package com.google.android.gms.tasks; import android.os.Handler; import android.os.Looper; import android.support.annotation.NonNull; import java.util.concurrent.Executor; public final class TaskExecutors { public static final Executor MAIN_THREAD = new zza(); static final Executor aJI = new C02641(); class C02641 implements Executor { C02641() { } public void execute(@NonNull Runnable runnable) { runnable.run(); } } private static final class zza implements Executor { private final Handler mHandler = new Handler(Looper.getMainLooper()); public void execute(@NonNull Runnable runnable) { this.mHandler.post(runnable); } } private TaskExecutors() { } }
[ "andrepcg@gmail.com" ]
andrepcg@gmail.com
c74351c2fa491e691d9e1bd1be5ef2339cdcf6b3
54eae96545a07f15fa0302482c043bc4c35e005f
/src/main/java/com/tcf/ms/command/core/operation/AddTroopNoteFromDialog.java
7ab6a3a650fa970d7c4a90e053197a3891a7d907
[]
no_license
yunwei1237/ms-blade
57a4d7942f42d4f74a1879a050a710ed66fb471e
da24fa4223e8a2cc9be0a54c4b9c63d7ea18928c
refs/heads/master
2022-06-21T10:30:14.765505
2020-03-05T03:04:55
2020-03-05T03:04:55
242,106,127
0
0
null
2022-06-17T02:56:51
2020-02-21T09:49:22
Python
UTF-8
Java
false
false
789
java
package com.tcf.ms.command.core.operation; import com.tcf.ms.command.Operation; import com.tcf.ms.command.core.base.var.Variable; /** * (add_troop_note_from_dialog,<troop_id>,<note_slot_no>, <value>), There are maximum of 8 slots. value = 1 -> shows when the note is added */ public class AddTroopNoteFromDialog implements Operation{ private Variable troopId; private Variable noteSlotNo; private Variable value; public AddTroopNoteFromDialog(Variable troopId,Variable noteSlotNo,Variable value) { this.troopId = troopId; this.noteSlotNo = noteSlotNo; this.value = value; } @Override public String toScriptString() { return String.format("(add_troop_note_from_dialog,%s,%s,%s),",troopId,noteSlotNo,value); } }
[ "yunwei1237@163.com" ]
yunwei1237@163.com
daefc0d29f6869fa24c97b0060f706861bafbaf9
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/M_SCT_15/plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/SequencerModule.java
54962c667d57d2057f8836b69cf083dc968abb59
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
package org.yakindu.sct.model.sexec.transformation; import org.eclipse.xtext.naming.IQualifiedNameProvider; import org.yakindu.base.types.ITypeSystemAccess; import org.yakindu.base.types.impl.BaseTypeSystemAccessImpl; import org.yakindu.sct.model.sgraph.naming.SGraphNameProvider; import com.google.inject.Binder; import com.google.inject.Module; import com.google.inject.name.Names; /** * * @author andreas muelder - Initial contribution and API * */ public class SequencerModule implements Module { public static final String ADD_TRACES = "ADD_TRACES"; public void configure(Binder binder) { binder.bind(IQualifiedNameProvider.class).to(SGraphNameProvider.class); binder.bind(ITypeSystemAccess.class).to(BaseTypeSystemAccessImpl.class); binder.bind(Boolean.class).annotatedWith(Names.named(ADD_TRACES)) .toInstance(Boolean.FALSE); } }
[ "terfloth@itemis.de" ]
terfloth@itemis.de
a5d733fa223efd732466c124b9a80369347d9e3b
69662d2b46e48ebd84057a2d79e3158fb9cb6037
/websocket/src/main/java/com/example/template/WebSocketConfig.java
20aa673fd02d3c187d3833d352dac32fef786149
[]
no_license
kimscott/clt-sample
a58c201286f90f20c107849b17b003ab15f3d609
9947d00eef90189da8ff0bae96b87050ee413dda
refs/heads/master
2022-12-15T15:48:04.337660
2019-10-21T04:23:26
2019-10-21T04:23:26
203,135,270
2
8
null
2022-12-11T02:37:07
2019-08-19T08:54:20
Java
UTF-8
Java
false
false
2,521
java
package com.example.template; import org.springframework.context.annotation.Configuration; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.messaging.simp.config.ChannelRegistration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer; import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import javax.servlet.http.HttpSession; import java.security.Principal; import java.util.Map; @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { @Override public void configureMessageBroker(MessageBrokerRegistry config) { config.enableSimpleBroker("/topic/", "/queue/"); config.setApplicationDestinationPrefixes("/app"); } @Override public void configureClientInboundChannel(ChannelRegistration registration) { registration.interceptors(new UserInterceptor()); } @Override public void registerStompEndpoints(StompEndpointRegistry registry) { registry .addEndpoint("/websocket") .setAllowedOrigins("*") .setHandshakeHandler(new DefaultHandshakeHandler() { public boolean beforeHandshake( ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map attributes) throws Exception { if (request instanceof ServletServerHttpRequest) { ServletServerHttpRequest servletRequest = (ServletServerHttpRequest) request; HttpSession session = servletRequest .getServletRequest().getSession(); attributes.put("sessionId", session.getId()); } return true; } }).withSockJS() .setSupressCors(true); } }
[ "sanaloveyou@uengine.org" ]
sanaloveyou@uengine.org
c815a5145984447d1252767a7f9ad7aac4268552
31d41174d056e5d7bd926e773b3d2a7edd107aea
/src/main/java/com/sztouyun/advertisingsystem/viewmodel/contract/UpdateContractViewModel.java
f8ca731c740053b2ad352f0fa343a70809c1052b
[]
no_license
foxbabe/ads
76ed0bb60ca93c9bb2ef0feec4dfdf60adf8a6bb
713d8abd599830180ad37dbc07892dae470e07e5
refs/heads/master
2020-04-07T07:57:31.790305
2018-11-08T03:06:26
2018-11-08T03:06:26
158,195,619
1
0
null
2018-11-19T09:31:47
2018-11-19T09:31:46
null
UTF-8
Java
false
false
1,125
java
package com.sztouyun.advertisingsystem.viewmodel.contract; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; @ApiModel @Data public class UpdateContractViewModel extends BaseContractViewModel { @ApiModelProperty(value = "id", required = true) @NotBlank(message = "id不能为空") private String id; @ApiModelProperty(value = "已经选择的A类门店数量") private Integer storeACountChecked; @ApiModelProperty(value = "已经选择的B类门店数量") private Integer storeBCountChecked; @ApiModelProperty(value = "已经选择的C类门店数量") private Integer storeCCountChecked; @ApiModelProperty(value = "已经选择的C类门店数量") private Integer storeDCountChecked; @ApiModelProperty(value = "选点记录id") private String customerStorePlanId; @ApiModelProperty(value = "选点门店总数") private Integer customerChooseStoreCount=0; @ApiModelProperty(value = "选点记录编号") private String code=""; }
[ "lihf@sina.cn" ]
lihf@sina.cn
a164bb09f402ba5f1593fab1b29c01601f8374d6
bb8e39f70c0aebc9065ef8e179d50d66fd204601
/oracle-10.x-plugin/src/main/java/io/skywalking/apm/plugin/jdbc/oracle/CreateStatementInterceptor.java
ea645d8f93b14b5ff6966457b8db422adbe88c28
[ "Apache-2.0" ]
permissive
SkyAPM/java-plugin-extensions
4577dfcab6de8d7806f0fd8ff63577aec15a0ffc
7724fd78b331ab7ac3d3baaf4b9c232924c5f874
refs/heads/master
2022-11-30T08:58:20.215666
2022-11-23T00:52:51
2022-11-23T00:52:51
156,077,322
113
51
Apache-2.0
2022-11-23T00:52:52
2018-11-04T11:58:13
Java
UTF-8
Java
false
false
2,190
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package io.skywalking.apm.plugin.jdbc.oracle; import java.lang.reflect.Method; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult; import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos; import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo; public class CreateStatementInterceptor implements InstanceMethodsAroundInterceptor { @Override public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, MethodInterceptResult result) throws Throwable { } @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Object ret) throws Throwable { if (ret instanceof EnhancedInstance) { ((EnhancedInstance)ret).setSkyWalkingDynamicField(new StatementEnhanceInfos((ConnectionInfo)objInst.getSkyWalkingDynamicField(), "", "Statement")); } return ret; } @Override public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class<?>[] argumentsTypes, Throwable t) { } }
[ "nzt48.xin@gmail.com" ]
nzt48.xin@gmail.com
99d652aeed5349e0f57225a4b9da716279593a0f
c9ae5bbaf082abe43738a7f17ffab43309327977
/Source/FA-GameServer/src/gameserver/ai/state/handler/AttackingStateHandler.java
ec7a07f5caddd648d80a1e6e4470228b34e62c06
[]
no_license
Ace65/emu-santiago
2071f50e83e3e4075b247e4265c15d032fc13789
ddb2a59abd9881ec95c58149c8bf27f313e3051c
refs/heads/master
2021-01-13T00:43:18.239492
2012-02-22T21:14:53
2012-02-22T21:14:53
54,834,822
0
1
null
null
null
null
UTF-8
Java
false
false
2,619
java
package gameserver.ai.state.handler; import gameserver.ai.AI; import gameserver.ai.desires.impl.AttackDesire; import gameserver.ai.desires.impl.MoveToTargetDesire; import gameserver.ai.desires.impl.SkillUseDesire; import gameserver.ai.state.AIState; import gameserver.model.EmotionType; import gameserver.model.gameobjects.Creature; import gameserver.model.gameobjects.Npc; import gameserver.model.gameobjects.state.CreatureState; import gameserver.model.gameobjects.stats.StatEnum; import gameserver.network.aion.serverpackets.SM_EMOTION; import gameserver.network.aion.serverpackets.SM_LOOKATOBJECT; import gameserver.utils.PacketSendUtility; /** * @author ATracer * */ public class AttackingStateHandler extends StateHandler { @Override public AIState getState() { return AIState.ATTACKING; } /** * State ATTACKING * AI MonsterAi * AI AggressiveAi */ @Override public void handleState(AIState state, AI<?> ai) { ai.clearDesires(); Creature target = ((Npc)ai.getOwner()).getAggroList().getMostHated(); if(target == null) return; Npc owner = (Npc) ai.getOwner(); owner.setTarget(target); PacketSendUtility.broadcastPacket(owner, new SM_LOOKATOBJECT(owner)); owner.setState(CreatureState.WEAPON_EQUIPPED); PacketSendUtility.broadcastPacket(owner, new SM_EMOTION(owner, EmotionType.ATTACKMODE, 0, target.getObjectId())); float runSpeed = owner.getObjectTemplate().getStatsTemplate().getRunSpeedFight() != 0 ? owner.getObjectTemplate().getStatsTemplate().getRunSpeedFight(): owner.getObjectTemplate().getStatsTemplate().getRunSpeed(); owner.getGameStats().setStat(StatEnum.SPEED, (int) (runSpeed * 1000)); owner.getMoveController().setSpeed(((float) owner.getGameStats().getCurrentStat(StatEnum.SPEED))/1000f); PacketSendUtility.broadcastPacket(owner, new SM_EMOTION(owner, EmotionType.START_EMOTE2, 0, target.getObjectId())); owner.getMoveController().setDistance(owner.getGameStats().getCurrentStat(StatEnum.ATTACK_RANGE) / 1000f); if(owner.getNpcSkillList() != null && !owner.getNpcSkillList().getNpcSkills().isEmpty()) ai.addDesire(new SkillUseDesire(owner, AIState.USESKILL.getPriority())); ai.addDesire(new AttackDesire(owner, target, AIState.ATTACKING.getPriority())); if (owner.getGameStats().getCurrentStat(StatEnum.SPEED) != 0) ai.addDesire(new MoveToTargetDesire(owner, target, owner.getGameStats().getCurrentStat(StatEnum.ATTACK_RANGE) / 1000 + 1, AIState.ATTACKING.getPriority()));//added some tolerance to offset ai.schedule(); } }
[ "mixerdj.carlos@gmail.com" ]
mixerdj.carlos@gmail.com
a6f14339ffd554d79d3c3c57f6524bdd0b8ac961
5fd30ecf0c8988a05c71efbd3588d53589cf074b
/aliyun-java-sdk-cdn/src/main/java/com/aliyuncs/cdn/transform/v20141111/DescribeDomainMax95BpsDataResponseUnmarshaller.java
4e69ae90d6f55b03e1497d80d2f6b04795daf22c
[ "Apache-2.0" ]
permissive
mingjian2049/aliyun-openapi-java-sdk
3ab3a0be5030c1f404e6fbb583abf2c3af864c74
d1eabf296d6dc192503cf10fd67feae093817536
refs/heads/master
2021-01-18T08:14:05.283781
2017-08-15T08:27:14
2017-08-15T08:55:29
80,979,991
0
0
null
2017-02-05T08:32:21
2017-02-05T08:32:21
null
UTF-8
Java
false
false
2,170
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.aliyuncs.cdn.transform.v20141111; import com.aliyuncs.cdn.model.v20141111.DescribeDomainMax95BpsDataResponse; import com.aliyuncs.transform.UnmarshallerContext; public class DescribeDomainMax95BpsDataResponseUnmarshaller { public static DescribeDomainMax95BpsDataResponse unmarshall(DescribeDomainMax95BpsDataResponse describeDomainMax95BpsDataResponse, UnmarshallerContext context) { describeDomainMax95BpsDataResponse.setRequestId(context.stringValue("DescribeDomainMax95BpsDataResponse.RequestId")); describeDomainMax95BpsDataResponse.setDomainName(context.stringValue("DescribeDomainMax95BpsDataResponse.DomainName")); describeDomainMax95BpsDataResponse.setStartTime(context.stringValue("DescribeDomainMax95BpsDataResponse.StartTime")); describeDomainMax95BpsDataResponse.setEndTime(context.stringValue("DescribeDomainMax95BpsDataResponse.EndTime")); describeDomainMax95BpsDataResponse.setMax95Bps(context.stringValue("DescribeDomainMax95BpsDataResponse.Max95Bps")); describeDomainMax95BpsDataResponse.setDomesticMax95Bps(context.stringValue("DescribeDomainMax95BpsDataResponse.DomesticMax95Bps")); describeDomainMax95BpsDataResponse.setOverseasMax95Bps(context.stringValue("DescribeDomainMax95BpsDataResponse.OverseasMax95Bps")); return describeDomainMax95BpsDataResponse; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
d9df9ed616ac672d09bce1cd17bc3b1ce41890ab
208ba847cec642cdf7b77cff26bdc4f30a97e795
/u/src/main/java/org.wp.u/ui/prefs/PreferenceHint.java
60adf458c9b5941e815bb2299e744b59d9273291
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
140
java
package org.wp.u.ui.prefs; public interface PreferenceHint { boolean hasHint(); String getHint(); void setHint(String hint); }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
774f11ce4911418c8470199d1d0021361b4f1c19
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-RC2/modules/client/src/test/java/org/mule/extras/client/MuleClientTestCase.java
95a330540ca3d26ef776e0f48678e70179022313
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
733
java
package org.mule.extras.client; import org.mule.api.MuleException; import org.mule.tck.AbstractMuleTestCase; public class MuleClientTestCase extends AbstractMuleTestCase { public void testCreateMuleClient() throws MuleException { MuleClient muleClient = new MuleClient(); assertEquals(muleContext, muleClient.getMuleContext()); assertTrue(muleContext.isInitialised()); assertTrue(muleContext.isStarted()); muleClient.dispatch("test://test", "message", null); muleClient.send("test://test", "message", null); muleClient.dispose(); assertTrue(muleClient.getMuleContext().isInitialised()); assertTrue(muleClient.getMuleContext().isStarted()); } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
88c3b9b6a151048d3bb07eceb6ad3764cf886831
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Manual/After/after_548.java
7d629627ed81f1e1826b6204989694533f95ef24
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
public class Dummy{ public Operador loginOperador(String user) { String sql; Operador operador = new Operador(); sql = "SELECT cedula_op, contrasena FROM Operadores WHERE cedula_op = ?;"; try { Connection con = conexion.getConnetion(); PreparedStatement sentencia = con.prepareStatement(sql); sentencia.setObject(1, user); ResultSet consulta = sentencia.executeQuery(); while (consulta.next()) { operador.setCedula_op(consulta.getString(1)); operador.setContrasena(consulta.getString(2)); } return operador; } catch (SQLException e) { System.out.println("Error: " + e); } catch (Exception e) { System.out.println("Error: " + e); } return null; }}
[ "jahin99@gmail.com" ]
jahin99@gmail.com
2a59d61e284064190e9a1ae235c04176782ff561
63cf604c914e0fa6328a87703a2b16a78e52eeb0
/tl/src/main/java/com/github/badoualy/telegram/tl/api/TLBotInlineMessageMediaGeo.java
ecafba018656ae37cea066a2c7a39e5f3098dd3e
[ "MIT", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
jacoboliveira/kotlogram
7a60d8c58e3297765015607da47bf48d4b5d0581
24bbcece0278fd1b134e869ef74e66326357b097
refs/heads/master
2020-12-25T12:40:39.144898
2016-06-23T07:04:08
2016-06-23T07:04:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,026
java
package com.github.badoualy.telegram.tl.api; import com.github.badoualy.telegram.tl.TLContext; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import static com.github.badoualy.telegram.tl.StreamUtils.readInt; import static com.github.badoualy.telegram.tl.StreamUtils.readTLObject; import static com.github.badoualy.telegram.tl.StreamUtils.writeInt; import static com.github.badoualy.telegram.tl.StreamUtils.writeTLObject; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_CONSTRUCTOR_ID; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_INT32; /** * @author Yannick Badoual yann.badoual@gmail.com * @see <a href="http://github.com/badoualy/kotlogram">http://github.com/badoualy/kotlogram</a> */ public class TLBotInlineMessageMediaGeo extends TLAbsBotInlineMessage { public static final int CONSTRUCTOR_ID = 0x3a8fd8b8; protected TLAbsGeoPoint geo; private final String _constructor = "botInlineMessageMediaGeo#3a8fd8b8"; public TLBotInlineMessageMediaGeo() { } public TLBotInlineMessageMediaGeo(TLAbsGeoPoint geo, TLAbsReplyMarkup replyMarkup) { this.geo = geo; this.replyMarkup = replyMarkup; } private void computeFlags() { flags = 0; // Fields below may not be serialized due to flags field value if ((flags & 4) == 0) replyMarkup = null; } @Override public void serializeBody(OutputStream stream) throws IOException { computeFlags(); writeInt(flags, stream); writeTLObject(geo, stream); if ((flags & 4) != 0) { if (replyMarkup == null) throwNullFieldException("replyMarkup", flags); writeTLObject(replyMarkup, stream); } } @Override @SuppressWarnings("unchecked") public void deserializeBody(InputStream stream, TLContext context) throws IOException { flags = readInt(stream); geo = readTLObject(stream, context, TLAbsGeoPoint.class, -1); replyMarkup = (flags & 4) != 0 ? readTLObject(stream, context, TLAbsReplyMarkup.class, -1) : null; } @Override public int computeSerializedSize() { computeFlags(); int size = SIZE_CONSTRUCTOR_ID; size += SIZE_INT32; size += geo.computeSerializedSize(); if ((flags & 4) != 0) { if (replyMarkup == null) throwNullFieldException("replyMarkup", flags); size += replyMarkup.computeSerializedSize(); } return size; } @Override public String toString() { return _constructor; } @Override public int getConstructorId() { return CONSTRUCTOR_ID; } public TLAbsGeoPoint getGeo() { return geo; } public void setGeo(TLAbsGeoPoint geo) { this.geo = geo; } public TLAbsReplyMarkup getReplyMarkup() { return replyMarkup; } public void setReplyMarkup(TLAbsReplyMarkup replyMarkup) { this.replyMarkup = replyMarkup; } }
[ "yann.badoual@gmail.com" ]
yann.badoual@gmail.com
e8816b543dc25d0edb8779f60aa9be490e423890
7480717e8866db20d8738742630b1733410d6d2b
/ApacheDatasets/MYFACES-2.0.1/myfaces-2.0.0/src/myfaces-api-2.0.0-sources/javax/faces/view/facelets/TagHandler.java
72f944fa9e5842c11d781ca58fc3abb75e86c737
[ "Apache-2.0" ]
permissive
abcdefghiklk/SeekChanges
600ecffeceedbc2caf1672fc7bb553e37b00131a
82103108425f22e2b535f43e424c23dbdea3b6f2
refs/heads/master
2020-04-06T07:02:43.703757
2016-08-17T10:43:59
2016-08-17T10:43:59
57,231,049
1
1
null
null
null
null
UTF-8
Java
false
false
2,517
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package javax.faces.view.facelets; import javax.faces.view.facelets.FaceletHandler; /** * Foundation class for FaceletHandlers associated with markup in a Facelet document. * * @author Jacob Hookom * @version $Id: TagHandler.java,v 1.6 2008/07/13 19:01:35 rlubke Exp $ */ public abstract class TagHandler implements FaceletHandler { protected final String tagId; protected final Tag tag; protected final FaceletHandler nextHandler; public TagHandler(TagConfig config) { this.tagId = config.getTagId(); this.tag = config.getTag(); this.nextHandler = config.getNextHandler(); } /** * Utility method for fetching the appropriate TagAttribute * * @param localName * name of attribute * @return TagAttribute if found, otherwise null */ protected final TagAttribute getAttribute(String localName) { return this.tag.getAttributes().get(localName); } /** * Utility method for fetching a required TagAttribute * * @param localName * name of the attribute * @return TagAttribute if found, otherwise error * @throws TagException * if the attribute was not found */ protected final TagAttribute getRequiredAttribute(String localName) throws TagException { TagAttribute attr = this.getAttribute(localName); if (attr == null) { throw new TagException(this.tag, "Attribute '" + localName + "' is required"); } return attr; } /** * {@inheritDoc} */ @Override public String toString() { return this.tag.toString(); } }
[ "Qiuchi.Li@open.ac.uk" ]
Qiuchi.Li@open.ac.uk
15bef0d71ea33210a57c18acf1722d317d053ab3
a862a140dd6a5c63b4f709c5cdc6cf75d319dcdf
/Codenza_Java/Basics/How to display name of a month in (MMM) format.java
6e88080e75da676570260945015235b81eda5a1f
[]
no_license
MartyMcAir/FromAppsAndBooks
2e730d480737784b9bfff3f49169fdec2fa0448c
7bcbd405053474630c5b5e78d70da1128885fc82
refs/heads/master
2022-02-06T06:14:15.738157
2022-02-01T12:18:37
2022-02-01T12:18:37
222,210,663
3
0
null
2021-08-02T17:19:31
2019-11-17T07:07:59
Java
UTF-8
Java
false
false
343
java
import java.util.Calendar; import java.util.Formatter; public class MainClass { public static void main(String args[]) { Formatter fmt = new Formatter(); Calendar cal = Calendar.getInstance(); fmt = new Formatter(); fmt.format("%tB %tb %tm", cal, cal, cal); System.out.println(fmt); } }
[ "martymcair@gmail.com" ]
martymcair@gmail.com
afe1daafb69aedaf5058ebf6862db881d273c7cd
205b7b6021c545354d9cc4c4589f79d2228938d5
/spring_boot/location/src/main/java/com/wangrui/location/mapper/ClassroomMapper.java
00c82defeafbcd5316a31a224661070e92496bdb
[]
no_license
sunjava2006/1904
1f479f9ba98a451847a30f9ac61e869af7a18e29
d90fc991d866ca1211802bfa58df0f8a2df6dfce
refs/heads/master
2020-11-26T04:16:12.658369
2020-04-14T09:02:58
2020-04-14T09:02:58
228,962,314
0
2
null
2020-10-13T19:48:04
2019-12-19T02:52:45
Java
UTF-8
Java
false
false
1,079
java
package com.wangrui.location.mapper; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.One; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.ResultMap; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.mapping.FetchType; import com.wangrui.location.entity.Classroom; @Mapper public interface ClassroomMapper { @Select("select * from classrooms") @Results(id="ClassroomMapper", value = {@Result(column = "id", property = "ID", id = true), @Result(column = "classroom_name", property = "classroomName"), @Result(column = "build_id", property = "build", one = @One(fetchType = FetchType.EAGER, select = "com.wangrui.location.mapper.BuildMapper.findByID")) }) public List<Classroom> list(); @Select("select * from classrooms where id=#{id}") @ResultMap(value = "ClassroomMapper") public Classroom findByID(int id); }
[ "jkwangrui@126.com" ]
jkwangrui@126.com
7432284917f938e256376ed2e92da78d52fdaef6
4627d514d6664526f58fbe3cac830a54679749cd
/results/cling/time-org.joda.time.format.DateTimeFormat-org.joda.time.format.DateTimeFormat$StyleFormatter-17/org/joda/time/format/DateTimeFormat_ESTest.java
17604cbf93d9472601f2f1077d5793101bf88508
[]
no_license
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
1,599
java
/* * Tue Mar 03 18:21:10 GMT 2020 */ package org.joda.time.format; import org.junit.Test; import org.junit.Ignore; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.Locale; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.joda.time.MutableDateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = false, useJEE = true) public class DateTimeFormat_ESTest extends DateTimeFormat_ESTest_scaffolding { @Test(timeout = 4000) @Ignore public void test0() throws Throwable { DateTimeFormatter dateTimeFormatter0 = DateTimeFormat.longDateTime(); MutableDateTime mutableDateTime0 = MutableDateTime.now(); int int0 = dateTimeFormatter0.parseInto(mutableDateTime0, "+ul=)B(", 3); assertEquals(1583259664382L, mutableDateTime0.getMillis()); assertEquals((-4), int0); } @Test(timeout = 4000) public void test1() throws Throwable { Locale locale0 = Locale.PRC; // Undeclared exception! try { DateTimeFormat.patternForStyle("F$", locale0); fail("Expecting exception: IllegalArgumentException"); } catch(IllegalArgumentException e) { // // Invalid style character: $ // verifyException("org.joda.time.format.DateTimeFormat", e); } } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com