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
d09e45f6a5ac7208ab8110dc794aa818eca42a9f
2cfd062df499bd7d764f2e3d4d2c9125ead34bc8
/src/main/java/com/inkstore/warehouse/config/DatabaseConfiguration.java
94e1e59f196a13543205faf00c2a681203515689
[]
no_license
rosamacias-bitbox/warehouse-application
f576c6cfc0dc46b3fde6b6344f41f746552b8690
31f08cdfeba629ace45c8ba520d6670edb902083
refs/heads/main
2023-03-21T13:55:25.291119
2021-03-11T13:08:40
2021-03-11T13:08:40
346,701,271
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
package com.inkstore.warehouse.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.h2.H2ConfigurationHelper; import java.sql.SQLException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.core.env.Environment; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableJpaRepositories("com.inkstore.warehouse.repository") @EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") @EnableTransactionManagement public class DatabaseConfiguration { private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class); private final Environment env; public DatabaseConfiguration(Environment env) { this.env = env; } /** * Open the TCP port for the H2 database, so it is available remotely. * * @return the H2 database TCP server. * @throws SQLException if the server failed to start. */ @Bean(initMethod = "start", destroyMethod = "stop") @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public Object h2TCPServer() throws SQLException { String port = getValidPortForH2(); log.debug("H2 database is available on port {}", port); return H2ConfigurationHelper.createServer(port); } private String getValidPortForH2() { int port = Integer.parseInt(env.getProperty("server.port")); if (port < 10000) { port = 10000 + port; } else { if (port < 63536) { port = port + 2000; } else { port = port - 2000; } } return String.valueOf(port); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
dba79cbfd06792977e2424a7fe0c2d2154967711
0194eccba2a54b91647d44ff4b41003051bbdf51
/src/main/java/defense/explosion/ex/missiles/MissileMovingSound.java
8f98045d1ae8f5c3be9c962b390fb5e55c4b0737
[ "MIT" ]
permissive
Vexatos/DefenseTech
4009cdd60682468fcff1a0a97aff0e4a403be237
a10b2c7d489b06e7b97f4fb6506c9d4fcd117b41
refs/heads/master
2020-05-29T11:44:22.746633
2016-04-25T01:39:02
2016-04-25T01:39:02
57,050,850
0
0
null
2016-04-25T14:57:24
2016-04-25T14:57:24
null
UTF-8
Java
false
false
1,681
java
package defense.explosion.ex.missiles; import net.minecraft.client.audio.MovingSound; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import defense.Reference; import defense.explosion.entities.EntityMissile; @SideOnly(Side.CLIENT) public class MissileMovingSound extends MovingSound { private final EntityMissile field_147670_k; private float field_147669_l = 0.0F; public MissileMovingSound(EntityMissile p_i45105_1_) { super(new ResourceLocation(Reference.PREFIX + "missileinair")); this.field_147670_k = p_i45105_1_; this.repeat = true; this.field_147665_h = 0; } /** * Updates the JList with a new model. */ public void update() { if (this.field_147670_k.isDead) { this.donePlaying = true; } else { this.xPosF = (float)this.field_147670_k.posX; this.yPosF = (float)this.field_147670_k.posY; this.zPosF = (float)this.field_147670_k.posZ; float f = MathHelper.sqrt_double(this.field_147670_k.motionX * this.field_147670_k.motionX + this.field_147670_k.motionZ * this.field_147670_k.motionZ); if ((double)f >= 0.01D) { this.field_147669_l = MathHelper.clamp_float(this.field_147669_l + 0.0025F, 0.0F, 1.0F); this.volume = 0.0F + MathHelper.clamp_float(f, 0.0F, 0.5F) * 0.7F; } else { this.field_147669_l = 0.0F; this.volume = 0.0F; } } } }
[ "me@aidancbrady.com" ]
me@aidancbrady.com
08e2c860d86c91612915e61b00be990cce4b2683
7c86e1e4ba9592f7112c2387228c993aa295a857
/xindong-api-dao/src/main/java/com/xindong/api/dao/impl/AdInfoDaoImpl.java
e1c15ac916799f63cbaad87fb9099cd7795a3e20
[]
no_license
qsfjing/xd-api
620ffc014f90eeb0b5ce7fdc7fdd05f6837828b8
5e0a2add49c033ee627d15e549c4264da89abb4d
refs/heads/master
2021-08-23T13:40:59.576275
2017-12-04T08:40:19
2017-12-04T08:40:19
113,126,694
0
1
null
null
null
null
UTF-8
Java
false
false
1,673
java
package com.xindong.api.dao.impl; import java.util.List; import org.springframework.orm.ibatis.SqlMapClientTemplate; import org.springframework.stereotype.Repository; import com.xindong.api.dao.AdInfoDao; import com.xindong.api.domain.AdInfo; import com.xindong.api.domain.query.AdInfoQuery; @Repository(value="adInfoDao") @SuppressWarnings("unchecked") public class AdInfoDaoImpl extends SqlMapClientTemplate implements AdInfoDao { public AdInfoDaoImpl() { super(); } public int insert(AdInfo record) { int rows = (Integer) insert("ad_info.insert", record); return rows; } public int updateByPrimaryKey(AdInfo record) { int rows = update("ad_info.updateByPrimaryKey", record); return rows; } public AdInfo selectByPrimaryKey(Integer id) { AdInfo key = new AdInfo(); key.setId(id); AdInfo record = (AdInfo) queryForObject("ad_info.selectByPrimaryKey", key); return record; } public int deleteByPrimaryKey(Integer id) { AdInfo key = new AdInfo(); key.setId(id); int rows = delete("ad_info.deleteByPrimaryKey", key); return rows; } @Override public int countByCondition(AdInfoQuery query) { return (Integer) queryForObject("ad_info.countByCondition", query); } @Override public List<AdInfo> selectByConditionForPage(AdInfoQuery query) { return queryForList("ad_info.selectByConditionForPage", query); } @Override public List<AdInfo> selectByCondition(AdInfoQuery adInfoQuery) { return queryForList("ad_info.selectByCondition", adInfoQuery); } }
[ "359953111@qq.com" ]
359953111@qq.com
e50802ad3a789c77969617ec1ef2d68606b9d47b
9dfb07095844525a9d1b5a3e5de3cb840486c12b
/MinecraftServer/src/net/minecraft/item/ItemEndCrystal.java
33fa66ef1670f01b6f4e225c9b430a474b8de723
[]
no_license
ilYYYa/ModdedMinecraftServer
0ae1870e6ba9d388afb8fd6e866ca6a62f96a628
7b8143a11f848bf6411917e3d9c60b0289234a3f
refs/heads/master
2020-12-24T20:10:30.533606
2017-04-03T15:32:15
2017-04-03T15:32:15
86,241,373
0
0
null
null
null
null
UTF-8
Java
false
false
3,703
java
package net.minecraft.item; import java.util.List; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityEnderCrystal; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.WorldProviderEnd; import net.minecraft.world.end.DragonFightManager; public class ItemEndCrystal extends Item { public ItemEndCrystal() { this.setUnlocalizedName("end_crystal"); this.setCreativeTab(CreativeTabs.DECORATIONS); } /** * Called when a Block is right-clicked with this Item */ public EnumActionResult onItemUse(EntityPlayer stack, World playerIn, BlockPos worldIn, EnumHand pos, EnumFacing hand, float facing, float hitX, float hitY) { IBlockState iblockstate = playerIn.getBlockState(worldIn); if (iblockstate.getBlock() != Blocks.OBSIDIAN && iblockstate.getBlock() != Blocks.BEDROCK) { return EnumActionResult.FAIL; } else { BlockPos blockpos = worldIn.up(); ItemStack itemstack = stack.getHeldItem(pos); if (!stack.canPlayerEdit(blockpos, hand, itemstack)) { return EnumActionResult.FAIL; } else { BlockPos blockpos1 = blockpos.up(); boolean flag = !playerIn.isAirBlock(blockpos) && !playerIn.getBlockState(blockpos).getBlock().isReplaceable(playerIn, blockpos); flag = flag | (!playerIn.isAirBlock(blockpos1) && !playerIn.getBlockState(blockpos1).getBlock().isReplaceable(playerIn, blockpos1)); if (flag) { return EnumActionResult.FAIL; } else { double d0 = (double)blockpos.getX(); double d1 = (double)blockpos.getY(); double d2 = (double)blockpos.getZ(); List<Entity> list = playerIn.getEntitiesWithinAABBExcludingEntity((Entity)null, new AxisAlignedBB(d0, d1, d2, d0 + 1.0D, d1 + 2.0D, d2 + 1.0D)); if (!list.isEmpty()) { return EnumActionResult.FAIL; } else { if (!playerIn.isRemote) { EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(playerIn, (double)((float)worldIn.getX() + 0.5F), (double)(worldIn.getY() + 1), (double)((float)worldIn.getZ() + 0.5F)); entityendercrystal.setShowBottom(false); playerIn.spawnEntityInWorld(entityendercrystal); if (playerIn.provider instanceof WorldProviderEnd) { DragonFightManager dragonfightmanager = ((WorldProviderEnd)playerIn.provider).getDragonFightManager(); dragonfightmanager.respawnDragon(); } } itemstack.func_190918_g(1); return EnumActionResult.SUCCESS; } } } } } }
[ "ilyyya.777@gmail.com" ]
ilyyya.777@gmail.com
00fa45094223d337231343fa19ac143aa3e56a8d
ceed8ee18ab314b40b3e5b170dceb9adedc39b1e
/android/external/icu/android_icu4j/src/main/java/android/icu/impl/ICURegionDataTables.java
ec88f06ff240cc50bb9d413f783f31b6360ee4f7
[ "BSD-3-Clause", "NAIST-2003", "LicenseRef-scancode-unicode", "ICU", "LicenseRef-scancode-public-domain", "BSD-2-Clause" ]
permissive
BPI-SINOVOIP/BPI-H3-New-Android7
c9906db06010ed6b86df53afb6e25f506ad3917c
111cb59a0770d080de7b30eb8b6398a545497080
refs/heads/master
2023-02-28T20:15:21.191551
2018-10-08T06:51:44
2018-10-08T06:51:44
132,708,249
1
1
null
null
null
null
UTF-8
Java
false
false
635
java
/* GENERATED SOURCE. DO NOT MODIFY. */ /* ******************************************************************************* * Copyright (C) 2009, International Business Machines Corporation and * * others. All Rights Reserved. * ******************************************************************************* */ package android.icu.impl; /** * @hide Only a subset of ICU is exposed in Android */ public class ICURegionDataTables extends LocaleDisplayNamesImpl.ICUDataTables { public ICURegionDataTables() { super(ICUResourceBundle.ICU_REGION_BASE_NAME); } }
[ "Justin" ]
Justin
e3c0703f07997ee7a9fc6d7e048acc69d3e1f445
a389fac72faa6f9ba4f8aa9f70d9e6a4cb7bb462
/Chapter 09/Ch09/src/main/java/org/packt/bus/portal/dao/LoginDao.java
c1e9ec9b6df3e32235dc204aee56497a194a8fec
[ "MIT" ]
permissive
PacktPublishing/Spring-MVC-Blueprints
a0e481dd7a8977a64fa4aa0876ab48b5c78139d0
14fe9a0889c75f31014f2ebdb2184f40cd7e1da0
refs/heads/master
2023-03-13T01:47:20.470661
2023-01-30T09:03:09
2023-01-30T09:03:09
65,816,732
27
42
MIT
2023-02-22T03:32:27
2016-08-16T12:04:50
Java
UTF-8
Java
false
false
329
java
package org.packt.bus.portal.dao; import java.util.List; import org.packt.bus.portal.model.data.CustomerInfo; import org.packt.bus.portal.model.data.Login; public interface LoginDao { public Login getLogin(String username); public CustomerInfo getCustomerInfo(Integer id); public List<CustomerInfo> getAllCustomers(); }
[ "vishalm@packtpub.com" ]
vishalm@packtpub.com
f97dca0f6adb2fb90ad8b7bed9d821371b2aff80
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
/jbpm.3/bpel/library/src/main/java/org/jbpm/bpel/def/Pick.java
152a9ed9cd20ad786d0e4a4770975e2697585219
[]
no_license
sensui74/legacy-project
4502d094edbf8964f6bb9805be88f869bae8e588
ff8156ae963a5c61575ff34612c908c4ccfc219b
refs/heads/master
2020-03-17T06:28:16.650878
2016-01-08T03:46:00
2016-01-08T03:46:00
null
0
0
null
null
null
null
WINDOWS-1250
Java
false
false
7,472
java
/* * JBoss, Home of Professional Open Source * Copyright 2005, JBoss Inc., and individual contributors as indicated * by the @authors tag. * * This is free software; you can redistribute it and/or modify it * under the terms of the JBPM BPEL PUBLIC LICENSE AGREEMENT as * published by JBoss Inc.; either version 1.0 of the License, or * (at your option) any later version. * * This software 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. */ package org.jbpm.bpel.def; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.jbpm.JbpmContext; import org.jbpm.bpel.alarm.Alarm; import org.jbpm.bpel.alarm.TimeDrivenActivity; import org.jbpm.bpel.integration.IntegrationService; import org.jbpm.bpel.integration.def.InboundMessageActivity; import org.jbpm.bpel.integration.def.Receiver; import org.jbpm.bpel.xml.BpelException; import org.jbpm.graph.def.Transition; import org.jbpm.graph.exe.ExecutionContext; import org.jbpm.graph.exe.Token; import org.jbpm.scheduler.SchedulerService; /** * The pick activity awaits the occurrence of one of a set of events and then * performs the activity associated with the event that occurred. * @see "WS-BPEL 2.0 &sect;12.4" * @author Juan Cantú * @version $Revision: 1.2 $ $Date: 2006/08/21 01:05:59 $ */ public class Pick extends StructuredActivity implements TimeDrivenActivity, InboundMessageActivity { private static final long serialVersionUID = 1L; private boolean createInstance; private List onMessages = new ArrayList(); private List onAlarms = new ArrayList(); public Pick() { } public Pick(String name) { super(name); } // behaviour methods // /////////////////////////////////////////////////////////////////////////// public void execute(ExecutionContext exeContext) { Token token = exeContext.getToken(); JbpmContext jbpmContext = exeContext.getJbpmContext(); // prepare message receivers IntegrationService integrationService = Receiver.getIntegrationService(jbpmContext); integrationService.receive(onMessages, token); // prepare alarms SchedulerService schedulerService = Alarm.getSchedulerService(jbpmContext); for (int i = 0, n = onAlarms.size(); i < n; i++) { Alarm alarm = (Alarm) onAlarms.get(i); alarm.createTimer(token, schedulerService); } } public void terminate(ExecutionContext exeContext) { Token token = exeContext.getToken(); JbpmContext jbpmContext = exeContext.getJbpmContext(); // end message receivers and alarms endReceivers(token, jbpmContext); endAlarms(token, jbpmContext, null); } public void messageReceived(Receiver receiver, Token token) { JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext(); // end message receivers and alarms endReceivers(token, jbpmContext); endAlarms(token, jbpmContext, null); // execute the picked activity pickPath(new ExecutionContext(token), getOnMessage(receiver)); } public void alarmFired(Alarm alarm, Token token) { JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext(); // end message receivers and alarms endReceivers(token, jbpmContext); endAlarms(token, jbpmContext, alarm); // execute the picked activity pickPath(new ExecutionContext(token), getOnAlarm(alarm)); } protected void endReceivers(Token token, JbpmContext jbpmContext) { IntegrationService integrationService = Receiver.getIntegrationService(jbpmContext); integrationService.endReception(onMessages, token); } protected void endAlarms(Token token, JbpmContext jbpmContext, Alarm originator) { SchedulerService schedulerService = Alarm.getSchedulerService(jbpmContext); for (int i = 0, n = onAlarms.size(); i < n; i++) { Alarm alarm = (Alarm) onAlarms.get(i); if (alarm != originator) { alarm.cancelTimer(token, schedulerService); } } } protected void pickPath(ExecutionContext context, Activity activity) { for (Iterator it = nodes.iterator(); it.hasNext();) { Activity anActivity = (Activity) it.next(); if (!activity.equals(anActivity)) { anActivity.setNegativeLinkStatus(context.getToken()); } } Transition transition = activity.getDefaultArrivingTransition(); getBegin().leave(context, transition); } // children management // ///////////////////////////////////////////////////////////////////////////// public void attachChild(Activity activity) { super.attachChild(activity); onMessages.add(null); int alarms = onAlarms.size(); // if alarms exist, move the activity at the last receptor index if (alarms > 0) { int receptorIndex = onMessages.size() - 1; nodes.remove(receptorIndex + alarms); nodes.add(receptorIndex, activity); } } public void detachChild(Activity activity) { int index = nodes.indexOf(activity); if (index < onMessages.size()) { onMessages.remove(index); } else { onAlarms.remove(index - onMessages.size()); } super.detachChild(activity); } // event properties // ///////////////////////////////////////////////////////////////////////////// public List getOnMessages() { return onMessages; } public Activity getOnMessage(Receiver receiver) { return (Activity) nodes.get(onMessages.indexOf(receiver)); } public void setOnMessage(Activity activity, Receiver receiver) { int activityIndex = nodes.indexOf(activity); if (activityIndex == -1) { throw new BpelException( "Cannot set a message receiver for a non-member activity: " + activity); } // match the positions of the receiver and the activity if (activityIndex < onMessages.size()) { onMessages.set(activityIndex, receiver); } else { onAlarms.remove(activityIndex - onMessages.size()); nodes.remove(activityIndex); nodes.add(onMessages.size(), activity); onMessages.add(receiver); } // mantain the bidirectional association receiver.setInboundMessageActivity(this); } public List getOnAlarms() { return onAlarms; } public Activity getOnAlarm(Alarm alarm) { return (Activity) nodes.get(onMessages.size() + onAlarms.indexOf(alarm)); } public void setOnAlarm(Activity activity, Alarm alarm) { int activityIndex = nodes.indexOf(activity); if (activityIndex == -1) { throw new BpelException("Cannot set an alarm for a non-member activity: " + activity); } // match the positions of the alarm and the activity if (activityIndex >= onMessages.size()) { int alarmIndex = activityIndex - onMessages.size(); onAlarms.set(alarmIndex, alarm); } else { onMessages.remove(activityIndex); onAlarms.add(alarm); nodes.remove(activityIndex); nodes.add(activity); } // mantain the bidirectional association alarm.setTimeDrivenActivity(this); } // Pick properties // /////////////////////////////////////////////////////////////////////////// public boolean isCreateInstance() { return createInstance; } public void setCreateInstance(boolean createInstance) { this.createInstance = createInstance; } /** {@inheritDoc} */ public void accept(BpelVisitor visitor) { visitor.visit(this); } }
[ "wow_fei@163.com" ]
wow_fei@163.com
4af0230f17911987a0e20827d92744cb2ee49d54
680f4ba5e51a90ccc59140c4c6ba5fbf85bea9d0
/src/test/java/com/saintdan/framework/component/TransformerTest.java
2c8e6ea0173aeeeb545bd62f8d8a076c9420399e
[ "MIT" ]
permissive
war-and-code/spring-rest-api-security-example
f6d3cf9992326ff1e41ac83672760c7a68d64c74
b280fd07da03c341cf87027d2f95599a7349e720
refs/heads/master
2021-07-04T02:25:16.459607
2017-09-26T17:46:18
2017-09-26T17:46:18
104,587,302
1
2
null
null
null
null
UTF-8
Java
false
false
835
java
package com.saintdan.framework.component; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import org.junit.Assert; import org.junit.Test; /** * Test case for {@link Transformer} * * @author <a href="http://github.com/saintdan">Liao Yifan</a> * @date 6/23/16 * @since JDK1.8 */ public class TransformerTest { @Test public void TestIdsStr2Iterable() throws Exception { final String ids = "1,2,3,4,5"; List<Long> expected = new ArrayList<>(); expected.add(1L); expected.add(2L); expected.add(3L); expected.add(4L); expected.add(5L); List<Long> actual = Lists.newArrayList(transformer.idsStr2List(ids)); actual.forEach(System.out::println); Assert.assertEquals(expected, actual); } private Transformer transformer = new Transformer(); }
[ "saintdan1011@gmail.com" ]
saintdan1011@gmail.com
d0222a7372165395e5581e849ce0618027aa3210
c36b14e20c8594e8ffcf3e67cdabc177098bdd6c
/src/java/com/lql/shiro/dao/ResourceDaoImpl.java
9e5373270e3f37f02fb77b116a7d193a0f2ffe6c
[]
no_license
2513lql/ShiroTest
382fbbbe7496398107d0ce15bfb5cf169daa2ea9
099223e567e3db96627dcec1b572c4ad0a152959
refs/heads/master
2020-12-25T14:22:47.581143
2016-08-14T14:10:08
2016-08-14T14:10:08
65,669,254
0
0
null
null
null
null
UTF-8
Java
false
false
3,576
java
package com.lql.shiro.dao; import com.lql.shiro.entity.Resource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.PreparedStatementCreator; import org.springframework.jdbc.support.GeneratedKeyHolder; import org.springframework.stereotype.Repository; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; /** * <p>Resource: Zhang Kaitao * <p>Date: 14-1-28 * <p>Version: 1.0 */ @Repository public class ResourceDaoImpl implements ResourceDao { @Autowired private JdbcTemplate jdbcTemplate; public Resource createResource(final Resource resource) { final String sql = "insert into sys_resource(name, type, url, permission, parent_id, parent_ids, available) values(?,?,?,?,?,?,?)"; GeneratedKeyHolder keyHolder = new GeneratedKeyHolder(); jdbcTemplate.update(new PreparedStatementCreator() { // @Override public PreparedStatement createPreparedStatement(Connection connection) throws SQLException { PreparedStatement psst = connection.prepareStatement(sql, new String[]{"id"}); int count = 1; psst.setString(count++, resource.getName()); psst.setString(count++, resource.getType().name()); psst.setString(count++, resource.getUrl()); psst.setString(count++, resource.getPermission()); psst.setLong(count++, resource.getParentId()); psst.setString(count++, resource.getParentIds()); psst.setBoolean(count++, resource.getAvailable()); return psst; } }, keyHolder); resource.setId(keyHolder.getKey().longValue()); return resource; } // @Override public Resource updateResource(Resource resource) { final String sql = "update sys_resource set name=?, type=?, url=?, permission=?, parent_id=?, parent_ids=?, available=? where id=?"; jdbcTemplate.update( sql, resource.getName(), resource.getType().name(), resource.getUrl(), resource.getPermission(), resource.getParentId(), resource.getParentIds(), resource.getAvailable(), resource.getId()); return resource; } public void deleteResource(Long resourceId) { Resource resource = findOne(resourceId); final String deleteSelfSql = "delete from sys_resource where id=?"; jdbcTemplate.update(deleteSelfSql, resourceId); final String deleteDescendantsSql = "delete from sys_resource where parent_ids like ?"; jdbcTemplate.update(deleteDescendantsSql, resource.makeSelfAsParentIds() + "%"); } // @Override public Resource findOne(Long resourceId) { final String sql = "select id, name, type, url, permission, parent_id, parent_ids, available from sys_resource where id=?"; List<Resource> resourceList = jdbcTemplate.query(sql, new BeanPropertyRowMapper(Resource.class), resourceId); if(resourceList.size() == 0) { return null; } return resourceList.get(0); } // @Override public List<Resource> findAll() { final String sql = "select id, name, type, url, permission, parent_id, parent_ids, available from sys_resource order by concat(parent_ids, id) asc"; return jdbcTemplate.query(sql, new BeanPropertyRowMapper(Resource.class)); } }
[ "2279039068@qq.com" ]
2279039068@qq.com
110101906ecac0c31a26f2d58401b67a67cf232c
296dc5362d07b906a67378f44813744dfdfb892a
/Client/edu.harvard.i2b2.eclipse.plugins.analysis/src/edu/harvard/i2b2/smlib/xml/XmlException.java
3a1e98a0ba44a1af60ed006781cb9de0205f179e
[]
no_license
tfmorris/i2b2
04c60cf02f36c8d97ca4adb5a547d5b6b02082ff
c863e35b892ef41469aef7ba9b0a284093e32862
refs/heads/master
2021-01-20T13:47:49.191738
2016-01-11T20:26:05
2016-01-11T20:26:05
14,435,817
2
0
null
null
null
null
UTF-8
Java
false
false
2,455
java
/* * Copyright (c) 2006-2014 Massachusetts General Hospital * All rights reserved. This program and the accompanying materials * are made available under the terms of the i2b2 Software License v2.1 * which accompanies this distribution. * * * Contributors: * * */ // XmlException.java: Simple base class for AElfred processors. // NO WARRANTY! See README, and copyright below. // $Id: XmlException.java,v 1.3 2010/07/06 14:04:25 mem61 Exp $ //package com.microstar.xml; package edu.harvard.i2b2.smlib.xml; /** * Convenience exception class for reporting XML parsing errors. * <p>This is an exception class that you can use to encapsulate all * of the information from &AElig;lfred's <code>error</code> callback. * This is not necessary for routine use of &AElig;lfred, but it * is used by the optional <code>HandlerBase</code> class. * <p>Note that the core &AElig;lfred classes do <em>not</em> * use this exception. * @author Copyright (c) 1998 by Microstar Software Ltd. * @author written by David Megginson &lt;dmeggins@microstar.com&gt; * @version 1.1 * @see XmlHandler#error * @see HandlerBase */ public class XmlException extends Exception { private String message; private String systemId; private int line; private int column; /** * Construct a new XML parsing exception. * @param message The error message from the parser. * @param systemId The URI of the entity containing the error. * @param line The line number where the error appeared. * @param column The column number where the error appeared. */ public XmlException (String message, String systemId, int line, int column) { this.message = message; this.systemId = systemId; this.line = line; this.column = column; } /** * Get the error message from the parser. * @return A string describing the error. */ @Override public String getMessage () { return message; } /** * Get the URI of the entity containing the error. * @return The URI as a string. */ public String getSystemId () { return systemId; } /** * Get the line number containing the error. * @return The line number as an integer. */ public int getLine () { return line; } /** * Get the column number containing the error. * @return The column number as an integer. */ public int getColumn () { return column; } }
[ "tfmorris@gmail.com" ]
tfmorris@gmail.com
8ed9938cb0c6b75730d2549538dd85e6c1b78105
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-hbr/src/main/java/com/aliyuncs/hbr/model/v20170908/UpdateVaultResponse.java
cf5cf9276c5dcb26e46a37a69f35bdc35977dcbd
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,681
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.hbr.model.v20170908; import com.aliyuncs.AcsResponse; import com.aliyuncs.hbr.transform.v20170908.UpdateVaultResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class UpdateVaultResponse extends AcsResponse { private String code; private String message; private String requestId; private Boolean success; public String getCode() { return this.code; } public void setCode(String code) { this.code = code; } public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Boolean getSuccess() { return this.success; } public void setSuccess(Boolean success) { this.success = success; } @Override public UpdateVaultResponse getInstance(UnmarshallerContext context) { return UpdateVaultResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
6b0f9eab58604e5b6e6735401aad08cd753a94eb
0f6f2bbc6dc015c67a2a219000a6d972a238b70d
/auth2.0-demo02/src/main/java/com/auth/controller/APIController.java
d9556edbc955aad604f15b75fc058872dfde0cfb
[]
no_license
blue19demon/OAuth2.0Security
a10df67b4d2c7a8e201c93a7e69f5ccd38ea114a
3a1a2889c9adf7f262d0b6bf8404d4bcb3eaa238
refs/heads/master
2022-06-24T21:03:16.406419
2019-10-21T07:31:50
2019-10-21T07:31:50
215,010,571
0
0
null
2022-06-21T02:03:07
2019-10-14T10:09:35
Java
UTF-8
Java
false
false
3,017
java
package com.auth.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import com.auth.dto.LoginUserDTO; import com.auth.dto.UserDTO; import com.auth.service.RoleService; import com.auth.service.UserService; import com.auth.utils.AssertUtils; import com.auth.vo.ResponseVO; /** * * 授权后要访问的资源 * @author Administrator * */ @RestController @RequestMapping("/api") public class APIController { @Autowired private UserService userService; @Autowired private RedisTokenStore redisTokenStore; /** * @description 添加用户 * @param userDTO * @return */ @GetMapping("/refreshToken") @ResponseBody public ResponseVO refreshToken(String refreshToken) throws Exception { return userService.refreshToken(refreshToken); } /** * @description 添加用户 * @param userDTO * @return */ @GetMapping("/currrentUserInfo") @ResponseBody public ResponseVO currrentUserInfo(String token) throws Exception { return userService.currrentUserInfo(token); } /** * @description 添加用户 * @param userDTO * @return */ @PostMapping("/user") @ResponseBody public ResponseVO add(@Valid @RequestBody UserDTO userDTO) throws Exception { userService.addUser(userDTO); return ResponseVO.success(); } /** * @description 获取用户列表 * @return */ @GetMapping("/userList") @ResponseBody public ResponseVO findAllUser() { return userService.findAllUserVO(); } /** * @description 删除用户 * @param id * @return */ @DeleteMapping("/user/{id}") public ResponseVO deleteUser(@PathVariable("id") Integer id) throws Exception { userService.deleteUser(id); return ResponseVO.success(); } /** * @descripiton 修改用户 * @param userDTO * @return */ @PutMapping("/user") public ResponseVO updateUser(@Valid @RequestBody UserDTO userDTO) { userService.updateUser(userDTO); return ResponseVO.success(); } /** * @description 用户注销 * @param authorization * @return */ @GetMapping("/user/logout") public ResponseVO logout(@RequestHeader("Authorization") String authorization) { redisTokenStore.removeAccessToken(AssertUtils.extracteToken(authorization)); return ResponseVO.success(); } }
[ "1843080373@qq.com" ]
1843080373@qq.com
3c2960fe646490bf9835495a968e4fb2e958010d
fc4701591408d5f1b059931c052fcab1b0a3c855
/3.JavaMultithreading/src/com/javarush/task/task22/task2210/Solution.java
3b6a78b4fb9ac456edbf091b79b11a5149245168
[]
no_license
VictorLeonidovich/JavaRushCourses_professionalLevel
483779d9d8f40c1f32023deb146cceda676494d2
b2685930ffac81499129a935dbcfb0ecf37321ce
refs/heads/master
2021-08-19T08:16:02.643180
2017-11-25T12:05:57
2017-11-25T12:05:57
84,752,119
0
0
null
null
null
null
UTF-8
Java
false
false
1,457
java
package com.javarush.task.task22.task2210; import java.util.Arrays; import java.util.StringTokenizer; /* StringTokenizer Используя StringTokenizer разделить query на части по разделителю delimiter. Пример getTokens("level22.lesson13.task01", ".") Возвращает {"level22", "lesson13", "task01"} Требования: 1. Метод getTokens должен использовать StringTokenizer. 2. Метод getTokens должен быть публичным. 3. Метод getTokens должен принимать два параметра типа String. 4. Массив типа String возвращенный методом getTokens должен быть заполнен правильно(согласно условию задачи). */ public class Solution { public static void main(String[] args) { System.out.println(Arrays.toString(getTokens("level22.lesson13.task01", "."))); } public static String [] getTokens(String query, String delimiter) { if (query == null || delimiter == null){ return new String[]{""}; } StringTokenizer tokenizer = new StringTokenizer(query, delimiter); String[] strings = new String[tokenizer.countTokens()]; int i = 0; while (tokenizer.hasMoreElements()){ strings[i] = tokenizer.nextToken(); i++; } return strings; } }
[ "k-v-l@tut.by" ]
k-v-l@tut.by
654db8a63f06989de9a4651f161024d0e3205320
89f3af52f5634bce05aaecc742b1e4bb0a009ff2
/trunk/fmps-web/src/main/java/cn/com/fubon/fo/repairplatform/entity/WeixinRepairEvaluation.java
f133db0a06a1247c707d51a8057fb7d2fa79b472
[]
no_license
cash2one/fmps
d331391b7d6cb5b50645e823e1606c6ea236b8a2
b57c463943fec0da800e5374f306176914a39079
refs/heads/master
2021-01-21T06:42:45.275421
2016-06-21T12:47:46
2016-06-21T12:47:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,124
java
package cn.com.fubon.fo.repairplatform.entity; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.Table; import org.jeecgframework.core.common.entity.IdEntity; import cn.com.fubon.fo.card.entity.ContractAddress; import cn.com.fubon.wechatClaims.entity.ReportInfo; @Entity @Table(name = "weixin_repair_evaluation") @PrimaryKeyJoinColumn(name = "id") public class WeixinRepairEvaluation extends IdEntity implements Serializable { private String comment; // 评价内容 private Date createtime; // 评价时间 private Integer evaluation; // 评价星级 private String headimgurl; // 服务号用户头像 private String nickname; // 服务号用户昵称 private String openid; // 服务号用户微信号 private String qRcodeUUID; // 二维码UUID private String repairid; // 维修厂ID private String repairname; // 维修厂名称 private ReportInfo reportInfo; // 微信报案信息表id private Date scanQrCodeTime; // 扫码时间 @Column(name = "comment") public String getComment() { return comment; } @Column(name = "createtime") public Date getCreatetime() { return createtime; } @Column(name = "evaluation") public Integer getEvaluation() { return evaluation; } @Column(name = "headimgurl") public String getHeadimgurl() { return headimgurl; } @Column(name = "nickname") public String getNickname() { return nickname; } @Column(name = "openid") public String getOpenid() { return openid; } @Column(name = "qRcodeUUID") public String getqRcodeUUID() { return qRcodeUUID; } @Column(name = "repairid") public String getRepairid() { return repairid; } @Column(name = "repairname") public String getRepairname() { return repairname; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "reportinfoid", nullable = true) public ReportInfo getReportInfo() { return reportInfo; } @Column(name = "scanQrCodeTime") public Date getScanQrCodeTime() { return scanQrCodeTime; } public void setComment(String comment) { this.comment = comment; } public void setCreatetime(Date createtime) { this.createtime = createtime; } public void setEvaluation(Integer evaluation) { this.evaluation = evaluation; } public void setHeadimgurl(String headimgurl) { this.headimgurl = headimgurl; } public void setNickname(String nickname) { this.nickname = nickname; } public void setOpenid(String openid) { this.openid = openid; } public void setqRcodeUUID(String qRcodeUUID) { this.qRcodeUUID = qRcodeUUID; } public void setRepairid(String repairid) { this.repairid = repairid; } public void setRepairname(String repairname) { this.repairname = repairname; } public void setReportInfo(ReportInfo reportInfo) { this.reportInfo = reportInfo; } public void setScanQrCodeTime(Date scanQrCodeTime) { this.scanQrCodeTime = scanQrCodeTime; } }
[ "fangfang.guo@fubon.com.cn" ]
fangfang.guo@fubon.com.cn
8132005e04fec96a805c7bd31a213a85d3c9ab74
12823b910d5eb51d5907f38a5de0c4648ae27308
/src/io/trivium/dep/com/google/gson/annotations/Expose.java
d9cbd85145d9cc08f03ebad97153164119e379cd
[ "Apache-2.0" ]
permissive
JensWalter/trivium
428330f4cb09229312a601581c380a67f77b7467
e0000bbe59429b1b90f2e1b208fb3be222927a90
refs/heads/master
2021-05-31T10:15:47.682179
2016-03-26T13:29:25
2016-03-26T13:29:25
30,550,214
1
0
null
null
null
null
UTF-8
Java
false
false
3,524
java
/* * Copyright (C) 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.trivium.dep.com.google.gson.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * An annotation that indicates this member should be exposed for JSON * serialization or deserialization. * * <p>This annotation has no effect unless you build {@link io.trivium.dep.com.google.gson.Gson} * with a {@link io.trivium.dep.com.google.gson.GsonBuilder} and invoke * {@link io.trivium.dep.com.google.gson.GsonBuilder#excludeFieldsWithoutExposeAnnotation()} * method.</p> * * <p>Here is an example of how this annotation is meant to be used: * <p><pre> * public class User { * &#64Expose private String firstName; * &#64Expose(serialize = false) private String lastName; * &#64Expose (serialize = false, deserialize = false) private String emailAddress; * private String password; * } * </pre></p> * If you created Gson with {@code new Gson()}, the {@code toJson()} and {@code fromJson()} * methods will use the {@code password} field along-with {@code firstName}, {@code lastName}, * and {@code emailAddress} for serialization and deserialization. However, if you created Gson * with {@code Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create()} * then the {@code toJson()} and {@code fromJson()} methods of Gson will exclude the * {@code password} field. This is because the {@code password} field is not marked with the * {@code @Expose} annotation. Gson will also exclude {@code lastName} and {@code emailAddress} * from serialization since {@code serialize} is set to {@code false}. Similarly, Gson will * exclude {@code emailAddress} from deserialization since {@code deserialize} is set to false. * * <p>Note that another way to achieve the same effect would have been to just mark the * {@code password} field as {@code transient}, and Gson would have excluded it even with default * settings. The {@code @Expose} annotation is useful in a style of programming where you want to * explicitly specify all fields that should get considered for serialization or deserialization. * * @author Inderjeet Singh * @author Joel Leitch */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Expose { /** * If {@code true}, the field marked with this annotation is written out in the JSON while * serializing. If {@code false}, the field marked with this annotation is skipped from the * serialized output. Defaults to {@code true}. * @since 1.4 */ public boolean serialize() default true; /** * If {@code true}, the field marked with this annotation is deserialized from the JSON. * If {@code false}, the field marked with this annotation is skipped during deserialization. * Defaults to {@code true}. * @since 1.4 */ public boolean deserialize() default true; }
[ "js.walter@gmx.net" ]
js.walter@gmx.net
6d08363852408efe10bdb9393a6c55d3e2252295
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/106/org/apache/commons/math/distribution/FDistribution_setNumeratorDegreesOfFreedom_39.java
eaca2a0c3af940d977f9fc674483f18d97e0bf04
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
511
java
org apach common math distribut distribut instanc distribut fdistribut object creat link distribut factori distributionfactori creat distribut createfdistribut refer href http mathworld wolfram distribut html distribut version revis date distribut fdistribut continu distribut continuousdistribut modifi numer degre freedom param degre freedom degreesoffreedom numer degre freedom set numer degre freedom setnumeratordegreesoffreedom degre freedom degreesoffreedom
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ea777bb360ebe8774530ac52bc42d6f7959c47f7
8dba0a2b37be0545149586516df1cffa85d9e383
/app/src/main/java/com/example/mrlanguageturkish/c_serials_1_3_5.java
4a881520de345d68a265736029baf4a31a6a1abf
[]
no_license
ghomdoust/MrLanguageTurkish
9e2ee449ba77d99057f9e3903696f791ef91ce13
ae69f0922d06a9537ec7a5b4b5a05760637f6760
refs/heads/master
2023-03-30T20:38:01.303512
2021-04-06T23:16:20
2021-04-06T23:16:20
355,352,171
0
0
null
null
null
null
UTF-8
Java
false
false
5,613
java
package com.example.mrlanguageturkish; import androidx.appcompat.app.AppCompatActivity; import android.annotation.SuppressLint; import android.app.DownloadManager; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Bundle; import android.view.View; import android.webkit.DownloadListener; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.ProgressBar; import android.widget.Toast; import ir.aghayezaban.mrlanguageturkish.R; public class c_serials_1_3_5 extends AppCompatActivity { WebView mWebView; ProgressBar progressBar; @SuppressLint("SetJavaScriptEnabled") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.c_serials_1_3_5); progressBar = (ProgressBar) findViewById(R.id.progressbar); mWebView = (WebView) findViewById(R.id.mWebView); progressBar.setVisibility(View.VISIBLE); mWebView.setWebViewClient(new c_serials_1_3_5.Browser_home()); mWebView.setWebChromeClient(new c_serials_1_3_5.MyChrome()); WebSettings webSettings = mWebView.getSettings(); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setLoadWithOverviewMode(true); mWebView.getSettings().setUseWideViewPort(true); mWebView.getSettings().setSupportZoom(true); mWebView.getSettings().setBuiltInZoomControls(true); mWebView.getSettings().setDisplayZoomControls(false); mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); mWebView.setScrollbarFadingEnabled(false); webSettings.setJavaScriptEnabled(true); webSettings.setAllowFileAccess(true); webSettings.setAppCacheEnabled(true); loadWebsite(); } private void loadWebsite() { ConnectivityManager cm = (ConnectivityManager) getApplication().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo netInfo = cm.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) { mWebView.loadUrl("https://aspb17.cdn.asset.aparat.com/aparat-video/d822af9011928b8acc107a11538e393322418927-720p.mp4"); } else { mWebView.setVisibility(View.GONE); } mWebView.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { DownloadManager.Request myRequest = new DownloadManager.Request(Uri.parse(url)); myRequest.allowScanningByMediaScanner(); myRequest.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); DownloadManager myManager = (DownloadManager) getSystemService(DOWNLOAD_SERVICE); myManager.enqueue(myRequest); Toast.makeText(c_serials_1_3_5.this,"ویدیوی شما در حال بارگزاریست", Toast.LENGTH_SHORT).show(); } }); } class Browser_home extends WebViewClient { Browser_home() { } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); } @Override public void onPageFinished(WebView view, String url) { setTitle(view.getTitle()); progressBar.setVisibility(View.GONE); super.onPageFinished(view, url); } } private class MyChrome extends WebChromeClient { private View mCustomView; private WebChromeClient.CustomViewCallback mCustomViewCallback; protected FrameLayout mFullscreenContainer; private int mOriginalOrientation; private int mOriginalSystemUiVisibility; MyChrome() {} public Bitmap getDefaultVideoPoster() { if (mCustomView == null) { return null; } return BitmapFactory.decodeResource(getApplicationContext().getResources(), 2130837573); } public void onHideCustomView() { ((FrameLayout)getWindow().getDecorView()).removeView(this.mCustomView); this.mCustomView = null; getWindow().getDecorView().setSystemUiVisibility(this.mOriginalSystemUiVisibility); setRequestedOrientation(this.mOriginalOrientation); this.mCustomViewCallback.onCustomViewHidden(); this.mCustomViewCallback = null; } public void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback paramCustomViewCallback) { if (this.mCustomView != null) { onHideCustomView(); return; } this.mCustomView = paramView; this.mOriginalSystemUiVisibility = getWindow().getDecorView().getSystemUiVisibility(); this.mOriginalOrientation = getRequestedOrientation(); this.mCustomViewCallback = paramCustomViewCallback; ((FrameLayout)getWindow().getDecorView()).addView(this.mCustomView, new FrameLayout.LayoutParams(-1, -1)); getWindow().getDecorView().setSystemUiVisibility(3846); } } }
[ "47427371+ghomdoust@users.noreply.github.com" ]
47427371+ghomdoust@users.noreply.github.com
f5642798fab52b7e0b8c21016e31436c343b593f
de161b3750a643a0a4bc158446c83b9537fdb2e8
/compiler/builtin/src/main/java/com/asakusafw/dag/compiler/builtin/CoGroupOperatorGenerator.java
19460ec3f121e7a3c45a68141c0263cb5d381f97
[ "Apache-2.0" ]
permissive
shino/asakusafw-dag
2ff22707256bb173a454a820c2858b5e16e4f01f
f0c8d7e192a8267ede5ac898eabd8dc5fc3c03bb
refs/heads/master
2021-01-18T03:03:03.980482
2016-09-13T05:47:35
2016-09-13T05:47:35
57,190,874
0
0
null
2016-04-27T06:53:00
2016-04-27T06:53:00
null
UTF-8
Java
false
false
3,844
java
/** * Copyright 2011-2016 Asakusa Framework Team. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.asakusafw.dag.compiler.builtin; import static com.asakusafw.dag.compiler.builtin.Util.*; import static com.asakusafw.dag.compiler.codegen.AsmUtil.*; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Supplier; import org.objectweb.asm.ClassWriter; import com.asakusafw.dag.compiler.codegen.AsmUtil.FieldRef; import com.asakusafw.dag.compiler.codegen.AsmUtil.ValueRef; import com.asakusafw.dag.compiler.model.ClassData; import com.asakusafw.dag.compiler.model.graph.VertexElement; import com.asakusafw.dag.runtime.adapter.CoGroupOperation; import com.asakusafw.dag.utils.common.Lang; import com.asakusafw.lang.compiler.model.description.ClassDescription; import com.asakusafw.lang.compiler.model.description.Descriptions; import com.asakusafw.lang.compiler.model.graph.OperatorInput; import com.asakusafw.lang.compiler.model.graph.OperatorProperty; import com.asakusafw.lang.compiler.model.graph.UserOperator; import com.asakusafw.runtime.core.Result; import com.asakusafw.vocabulary.operator.CoGroup; /** * Generates {@link CoGroup} operator. */ public class CoGroupOperatorGenerator extends UserOperatorNodeGenerator { @Override protected Class<? extends Annotation> getAnnotationClass() { return CoGroup.class; } @Override protected NodeInfo generate(Context context, UserOperator operator, Supplier<? extends ClassDescription> namer) { return gen(context, operator, namer); } static NodeInfo gen(Context context, UserOperator operator, Supplier<? extends ClassDescription> namer) { checkPorts(operator, i -> i >= 1, i -> i >= 1); return new OperatorNodeInfo( context.cache(CacheKey.of(operator), () -> generateClass(context, operator, namer.get())), Descriptions.typeOf(CoGroupOperation.Input.class), getDependencies(context, operator)); } private static List<VertexElement> getDependencies(Context context, UserOperator operator) { return getDefaultDependencies(context, operator); } private static ClassData generateClass(Context context, UserOperator operator, ClassDescription target) { ClassWriter writer = newWriter(target, Object.class, Result.class); FieldRef impl = defineOperatorField(writer, operator, target); Map<OperatorProperty, FieldRef> map = defineConstructor(context, operator, target, writer, method -> { setOperatorField(method, operator, impl); }); defineResultAdd(writer, method -> { cast(method, 1, Descriptions.typeOf(CoGroupOperation.Input.class)); List<ValueRef> arguments = new ArrayList<>(); arguments.add(impl); for (OperatorInput input : operator.getInputs()) { arguments.add(v -> getGroupList(v, context, input)); } arguments.addAll(Lang.project(operator.getOutputs(), e -> map.get(e))); arguments.addAll(Lang.project(operator.getArguments(), e -> map.get(e))); invoke(method, context, operator, arguments); }); return new ClassData(target, writer::toByteArray); } }
[ "arakawa@nautilus-technologies.com" ]
arakawa@nautilus-technologies.com
8ebf2c5ce300628aa49a287c564deb58eae109a5
dbe9dfc23781b99e83577df1ff50aa8614705211
/src/minecraft/net/minecraft/src/ServerList.java
49a04eef562cd7f926da3d0e6fdb3d98b260a9ed
[]
no_license
bbernardoni/RubiksCraft
9041ba72785caa37274b1d6144702f762963cc03
428ddb1ea0e1038629b86de29cadf56da539fa11
refs/heads/master
2021-07-23T17:05:11.745763
2017-11-04T00:45:44
2017-11-04T00:45:44
109,455,526
0
0
null
null
null
null
UTF-8
Java
false
false
2,984
java
package net.minecraft.src; import java.io.File; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import net.minecraft.client.Minecraft; public class ServerList { /** The Minecraft instance. */ private final Minecraft mc; private final List field_78858_b = new ArrayList(); public ServerList(Minecraft par1Minecraft) { this.mc = par1Minecraft; this.func_78853_a(); } public void func_78853_a() { try { NBTTagCompound var1 = CompressedStreamTools.read(new File(this.mc.mcDataDir, "servers.dat")); NBTTagList var2 = var1.getTagList("servers"); this.field_78858_b.clear(); for (int var3 = 0; var3 < var2.tagCount(); ++var3) { this.field_78858_b.add(ServerData.getServerDataFromNBTCompound((NBTTagCompound)var2.tagAt(var3))); } } catch (Exception var4) { var4.printStackTrace(); } } public void func_78855_b() { try { NBTTagList var1 = new NBTTagList(); Iterator var2 = this.field_78858_b.iterator(); while (var2.hasNext()) { ServerData var3 = (ServerData)var2.next(); var1.appendTag(var3.func_78836_a()); } NBTTagCompound var5 = new NBTTagCompound(); var5.setTag("servers", var1); CompressedStreamTools.safeWrite(var5, new File(this.mc.mcDataDir, "servers.dat")); } catch (Exception var4) { var4.printStackTrace(); } } public ServerData func_78850_a(int par1) { return (ServerData)this.field_78858_b.get(par1); } public void func_78851_b(int par1) { this.field_78858_b.remove(par1); } public void func_78849_a(ServerData par1ServerData) { this.field_78858_b.add(par1ServerData); } public int func_78856_c() { return this.field_78858_b.size(); } public void func_78857_a(int par1, int par2) { ServerData var3 = this.func_78850_a(par1); this.field_78858_b.set(par1, this.func_78850_a(par2)); this.field_78858_b.set(par2, var3); } public void func_78854_a(int par1, ServerData par2ServerData) { this.field_78858_b.set(par1, par2ServerData); } public static void func_78852_b(ServerData par0ServerData) { ServerList var1 = new ServerList(Minecraft.getMinecraft()); var1.func_78853_a(); for (int var2 = 0; var2 < var1.func_78856_c(); ++var2) { ServerData var3 = var1.func_78850_a(var2); if (var3.serverName.equals(par0ServerData.serverName) && var3.serverIP.equals(par0ServerData.serverIP)) { var1.func_78854_a(var2, par0ServerData); break; } } var1.func_78855_b(); } }
[ "bennett.bernardoni@gmail.com" ]
bennett.bernardoni@gmail.com
d9190b8f8e226df53f211a42ebaa1ee166901e3b
385d7494b00dae8a72a1663720a2f08a79ba318e
/Java/Exemplos/53-io4/src/main/java/com/javabasico/Main.java
ee0fff3642131af9ffe4db6c0f6d215150e85f92
[ "MIT" ]
permissive
filosofisto/dev-course
74eeff9292090b8bec9c972cde28492d05aedcb5
81b8086487819a321b5f1536fbe087cfc04c0001
refs/heads/master
2020-03-23T06:31:13.603711
2018-10-16T22:02:39
2018-10-16T22:02:39
141,213,712
0
0
MIT
2018-07-29T22:49:03
2018-07-17T01:22:57
Java
UTF-8
Java
false
false
1,307
java
package com.javabasico; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.Random; public class Main { public static void main(String[] args) { try { File file = new File("/home/eduardo/temp/dados.dat"); if (!file.exists()) { gerarDados(file); } lerDados(file); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } private static void lerDados(File file) throws IOException { DataInputStream in = new DataInputStream( new FileInputStream(file)); int valor; int total = 0; int count = 0; for (;;) { try { valor = in.readInt(); System.out.println(valor); total += valor; count++; } catch (EOFException e) { break; } } System.out.printf("Media: %d", total/count); } private static void gerarDados(File file) throws IOException { Random r = new Random(); DataOutputStream out = new DataOutputStream( new FileOutputStream(file)); for (int i = 1; i < 100; i++) { out.writeInt(r.nextInt(100)+1); } out.close(); } }
[ "filosofisto@hotmail.com" ]
filosofisto@hotmail.com
5ae71543d4e40b2b897e5cf489d28e171e02ea34
019bf8f6a7d51c17827077f747820c257b09f603
/src/main/java/se/bjurr/sbcc/RefChangeValidator.java
13c7dfb89d8cac16ea8d35c7e48a58d0d0617d4c
[ "Apache-2.0" ]
permissive
Cloudxtreme/simple-bitbucket-commit-checker
248c3c46ffaaf8a0ac16f75dbb2995271abea234
8991c94d3129463db56f36a55475eb77ea8d8af2
refs/heads/master
2020-03-24T08:32:32.667544
2018-01-27T12:30:09
2018-01-31T18:17:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,148
java
package se.bjurr.sbcc; import static com.atlassian.bitbucket.repository.RefChangeType.DELETE; import static java.util.logging.Level.INFO; import static java.util.regex.Pattern.compile; import static se.bjurr.sbcc.SbccCommon.getBitbucketEmail; import static se.bjurr.sbcc.SbccCommon.getBitbucketName; import static se.bjurr.sbcc.commits.ChangeSetsService.isTag; import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.logging.Logger; import com.atlassian.applinks.api.ApplicationLinkService; import com.atlassian.applinks.api.CredentialsRequiredException; import com.atlassian.bitbucket.auth.AuthenticationContext; import com.atlassian.bitbucket.repository.RefChangeType; import com.atlassian.bitbucket.repository.Repository; import com.atlassian.sal.api.net.ResponseException; import se.bjurr.sbcc.commits.ChangeSetsService; import se.bjurr.sbcc.data.SbccChangeSet; import se.bjurr.sbcc.data.SbccRefChangeVerificationResult; import se.bjurr.sbcc.data.SbccVerificationResult; import se.bjurr.sbcc.settings.SbccSettings; public class RefChangeValidator { private static Logger logger = Logger.getLogger(RefChangeValidator.class.getName()); private final SbccSettings settings; private final ChangeSetsService changesetsService; private final AuthenticationContext bitbucketAuthenticationContext; private final CommitMessageValidator commitMessageValidator; private final SbccRenderer sbccRenderer; private final JqlValidator jqlValidator; private final Repository fromRepository; public RefChangeValidator( final Repository fromRepository, final SbccSettings settings, final ChangeSetsService changesetsService, final AuthenticationContext bitbucketAuthenticationContext, final SbccRenderer sbccRenderer, final ApplicationLinkService applicationLinkService, final SbccUserAdminService sbccUserAdminService) { this.fromRepository = fromRepository; this.settings = settings; this.changesetsService = changesetsService; this.bitbucketAuthenticationContext = bitbucketAuthenticationContext; this.commitMessageValidator = new CommitMessageValidator(bitbucketAuthenticationContext, sbccUserAdminService); this.sbccRenderer = sbccRenderer; this.jqlValidator = new JqlValidator(applicationLinkService, settings, sbccRenderer); } public void validateRefChange( final SbccVerificationResult refChangeVerificationResult, final RefChangeType refChangeType, final String refId, final String fromHash, final String toHash) throws IOException, CredentialsRequiredException, ResponseException, ExecutionException { logger.log( INFO, getBitbucketName(bitbucketAuthenticationContext) + " " + getBitbucketEmail(bitbucketAuthenticationContext) + "> RefChange " + fromHash + " " + refId + " " + toHash + " " + refChangeType); if (compile(settings.getBranches().or(".*")).matcher(refId).find()) { if (refChangeType != DELETE) { final List<SbccChangeSet> refChangeSets = changesetsService.getNewChangeSets( settings, fromRepository, refId, refChangeType, toHash); validateRefChange(refChangeVerificationResult, refId, fromHash, toHash, refChangeSets); } } } private void validateRefChange( final SbccVerificationResult refChangeVerificationResult, final String refId, final String fromHash, final String toHash, final List<SbccChangeSet> refChangeSets) throws IOException, CredentialsRequiredException, ResponseException, ExecutionException { final SbccRefChangeVerificationResult refChangeVerificationResults = validateRefChange(refChangeSets, settings, refId, fromHash, toHash); if (refChangeVerificationResults.hasReportables()) { refChangeVerificationResult.add(refChangeVerificationResults); } } private SbccRefChangeVerificationResult validateRefChange( final List<SbccChangeSet> sbccChangeSets, final SbccSettings settings, final String refId, final String fromHash, final String toHash) throws IOException, CredentialsRequiredException, ResponseException, ExecutionException { final SbccRefChangeVerificationResult refChangeVerificationResult = new SbccRefChangeVerificationResult(refId, fromHash, toHash); if (!isTag(refId)) { final boolean validateBranchName = validateBranchName(refId); refChangeVerificationResult.setBranchValidationResult(validateBranchName); } for (final SbccChangeSet sbccChangeSet : sbccChangeSets) { sbccRenderer.setSbccChangeSet(sbccChangeSet); logger.fine( getBitbucketName(bitbucketAuthenticationContext) + " " + getBitbucketEmail(bitbucketAuthenticationContext) + "> ChangeSet " + sbccChangeSet.getId() + " " + sbccChangeSet.getMessage() + " " + sbccChangeSet.getCommitter().getEmailAddress() + " " + sbccChangeSet.getCommitter().getName()); if (sbccChangeSet.isTag() && settings.shouldExcludeTagCommits()) { continue; } refChangeVerificationResult.setGroupsResult( sbccChangeSet, commitMessageValidator.validateChangeSetForGroups(settings, sbccChangeSet)); refChangeVerificationResult.addAuthorEmailValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForAuthorEmail( settings, sbccChangeSet, sbccRenderer)); refChangeVerificationResult.addCommitterEmailValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForCommitterEmail( settings, sbccChangeSet, sbccRenderer)); refChangeVerificationResult.addAuthorNameValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForAuthorName(settings, sbccChangeSet)); refChangeVerificationResult.addCommitterNameValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForCommitterName(settings, sbccChangeSet)); refChangeVerificationResult.addAuthorEmailInBitbucketValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForAuthorEmailInBitbucket( settings, sbccChangeSet)); refChangeVerificationResult.addAuthorNameInBitbucketValidationResult( sbccChangeSet, commitMessageValidator.validateChangeSetForAuthorNameInBitbucket( settings, sbccChangeSet)); refChangeVerificationResult.setFailingJql( sbccChangeSet, jqlValidator.validateJql(sbccChangeSet)); sbccRenderer.setSbccChangeSet(null); } return refChangeVerificationResult; } private boolean validateBranchName(final String branchName) { return compile(settings.getBranchRejectionRegexp().or(".*")).matcher(branchName).find(); } }
[ "tomas.bjerre85@gmail.com" ]
tomas.bjerre85@gmail.com
32acea5887e2ed5a73a10774dbddd38f374752fb
d5a1a60e4cff631b955a940bb6fb2a0356e3020a
/shirostudy15/src/main/java/com/xiaojihua/web/exception/DefaultExceptionHandler.java
20de3985c5800d6c25fc789545c2c8bd4d3419d8
[]
no_license
githubxiaojihua/shirostudy
d08bf938300cba50fe4c32e39465712abd2fc72f
a3ff01e933ffdb712e83590a7540cb2c6d4aa5c4
refs/heads/master
2022-12-23T08:20:50.612807
2020-08-07T08:19:47
2020-08-07T08:19:47
226,145,178
0
0
null
2022-12-16T03:08:06
2019-12-05T16:35:08
HTML
UTF-8
Java
false
false
1,036
java
package com.xiaojihua.web.exception; import org.apache.shiro.authz.UnauthorizedException; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.servlet.ModelAndView; /** * <p>User: Zhang Kaitao * <p>Date: 14-2-12 * <p>Version: 1.0 */ @ControllerAdvice public class DefaultExceptionHandler { /** * 没有权限 异常 * <p/> * 后续根据不同的需求定制即可 */ @ExceptionHandler({UnauthorizedException.class}) @ResponseStatus(HttpStatus.UNAUTHORIZED) public ModelAndView processUnauthenticatedException(NativeWebRequest request, UnauthorizedException e) { ModelAndView mv = new ModelAndView(); mv.addObject("exception", e); mv.setViewName("unauthorized"); return mv; } }
[ "2542213767@qq.com" ]
2542213767@qq.com
a6131d803c9fbb3d0a289d7b659e1896a8d0b34a
0f5443858747fca7dd9afc94f1cb3eb64a29b519
/src/main/java/org/isamm/plateformeAgile/entities/ScrumMaster.java
ca626f3c69fd2f23a2208e58897f7f6f8cc7eb48
[]
no_license
zayneb182/spring
f3a8f965678140395de55dd7b38a1775344d68eb
21e8593fbd503fb2ec6783168788ae05a9c07bcb
refs/heads/master
2021-02-18T08:45:17.944535
2020-03-06T13:46:30
2020-03-06T13:46:30
245,179,101
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
/*********************************************************************** * Module: ScrumMaster.java * Author: Zayneb * Purpose: Defines the Class ScrumMaster ***********************************************************************/ import java.util.*; /** @pdOid 9f1c2491-dd41-478e-bc32-0015c6865560 */ public class ScrumMaster extends Personne { }
[ "you@example.com" ]
you@example.com
6e248f77df87a90f3d498a908ec1c665507db6a8
e5ed92716951559384442b1c1adb80d813f286e4
/Java_Web/Java EE/9.Introduction To Java EE/Exercises/com.dxc.validator/src/validator/validator/models/rules/ConstraintsRule.java
7de7c3655f0be7e586083168a1741ce647ae7ed0
[]
no_license
aleksandar1498/Softuni
63993b231920bf718bec492c032fc6aeb5b75e67
9c7ed27a04ef094fcd875709c96e452d1b68a8e4
refs/heads/master
2021-06-26T23:45:43.781295
2020-09-23T17:34:34
2020-09-23T17:34:34
164,289,287
0
0
null
2020-10-13T16:29:51
2019-01-06T08:31:42
Java
UTF-8
Java
false
false
265
java
package validator.validator.models.rules; import validator.validator.interfaces.ValidationRule; /** * Abstract class for limits such as IN_RANGE OUT_RANGE AFTER BEFORE * @param <T> */ public abstract class ConstraintsRule<T> implements ValidationRule<T> { }
[ "aleksandar.fs@gmail.com" ]
aleksandar.fs@gmail.com
37dbaede59994b28cfa9b795926897c074b40c6b
4fd08e736019049a838dec9efa74cc2190b6625f
/testdata/src/main/java/iri/JLCGetConstructorB.java
d1614099fe5005ba90e3bec1761a835130775959
[ "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-other-permissive" ]
permissive
knighthunter09/spring-loaded
50a42cc41912ede861cae942e6458b79f2a6faa0
658a8678a672d24e9528fb63f70fa502ca7341ea
refs/heads/master
2020-08-03T17:47:45.312949
2016-06-25T00:10:51
2016-06-25T00:10:51
73,540,025
1
0
null
2016-11-12T08:04:24
2016-11-12T08:04:21
null
UTF-8
Java
false
false
579
java
package iri; import java.lang.reflect.Constructor; public class JLCGetConstructorB extends FormattingHelper { public JLCGetConstructorB() { } public String run() throws Exception { Constructor<JLCGetConstructorB> o = JLCGetConstructorB.class.getConstructor(); // Method m = Class.class.getMethod("getConstructor", Class[].class); // Constructor<?> o = (Constructor<?>) m.invoke(JLCGetConstructorB.class, (Object) null); return format(o); } public static void main(String[] argv) throws Exception { System.out.println(new JLCGetConstructorB().run()); } }
[ "andrew.clement@gmail.com" ]
andrew.clement@gmail.com
114b6de81511d316d2078be552ebf19fda3ba7ec
eeca771cfa828884be1c56e732d63a451f179c52
/java-basic/src/main/java/ch09/Calculator1.java
16801172119c680e34460c93d3cfb7834743a378
[]
no_license
eikhyeonchoi/bitcamp-java-2018-12
54e03db59224d8378de0a5a392917f4ae87cd72f
66d6bce206d8de7b09c482f4695af6f3cd1acf14
refs/heads/master
2021-08-06T17:17:30.648837
2020-04-30T13:12:48
2020-04-30T13:12:48
163,650,669
1
2
null
2020-04-30T17:33:35
2018-12-31T08:00:40
Java
UTF-8
Java
false
false
281
java
package ch09; public class Calculator1 { static int plus(int a, int b) { return a + b; } static int minus(int a, int b) { return a - b; } static int multiple(int a, int b) { return a * b; } static int divide(int a, int b) { return a / b; } }
[ "eikhyeon.choi@gmail.com" ]
eikhyeon.choi@gmail.com
4f3e9aad1659ec114ba5170368e20c7eaeb7f438
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12482-3-4-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/store/hibernate/query/HqlQueryUtils_ESTest_scaffolding.java
950d29b46cb316fda2ac5f5ee914ab0ec81acd7a
[]
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
462
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Apr 07 20:56:38 UTC 2020 */ package com.xpn.xwiki.internal.store.hibernate.query; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class HqlQueryUtils_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
60bc48af154eeed484ccb2e4a656bba724f54d14
f0b00a54576553334d0d980c053acf8c20d98ab2
/java-basic/examples/Test19_2.java
ad0a7b3996cbd8060a1bdd6b6b465c83dad79a4f
[]
no_license
KANG-SEONGHYEON/bitcamp
35de0cfda9e13412548f6c59028aa2acbbf00e2d
606b45bb519b18f7be5333565760e67aa884750b
refs/heads/master
2021-05-08T05:38:29.152680
2018-02-15T15:10:25
2018-02-15T15:10:25
104,423,409
0
0
null
null
null
null
UTF-8
Java
false
false
428
java
// ## import - 클래스가 어떤 패키지에 있는지 컴파일러에게 알리는 방법 // - import의 용도와 사용법을 알아보자! // package bitcamp.java100; // import 명령 import java.util.ArrayList; import java.lang.String;// java.lang 하위 클래스는 생략. public class Test19_2 { public static void main(String[] args) { ArrayList<String> list = new ArrayList<>(); list.add("홍길동"); } }
[ "wlswlsqud@gmail.com" ]
wlswlsqud@gmail.com
f1687e54073a2e1e6c550a6885430a972d216928
d261299e7eb22c7cbb4a325204e55bdd9dc81c89
/abi/src/main/java/one/contentbox/boxd/abi/datatypes/generated/Bytes11.java
db3f77e802833f16f64023a8cef7852b426d040b
[]
no_license
wangjunbao2018/boxd-sdk-java-v2
243ebd6941c200c739a100b93b3b208ae2641dba
708f95e2e5d75f6aaf739863ea8b2946a0d5a003
refs/heads/master
2020-05-31T14:55:09.854762
2019-06-05T08:28:43
2019-06-05T08:28:43
190,342,062
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package one.contentbox.boxd.abi.datatypes.generated; import one.contentbox.boxd.abi.datatypes.Bytes; /** * Auto generated code. * <p><strong>Do not modifiy!</strong> * <p>Please use org.web3j.codegen.AbiTypesGenerator in the * <a href="https://github.com/web3j/web3j/tree/master/codegen">codegen module</a> to update. */ public class Bytes11 extends Bytes { public static final Bytes11 DEFAULT = new Bytes11(new byte[11]); public Bytes11(byte[] value) { super(11, value); } }
[ "junbao.wang@castbox.fm" ]
junbao.wang@castbox.fm
a0452f707499faa0fffdb2c0baaf63dc5365b86c
ba7cab056c31fded038d49ccee0c1c9c54a6f3d4
/dist/gameserver/data/scripts/quests/_734_RedLibraRequestNightmareKamaloka.java
faf3eeee69194c36f327d845c5f2a585e6bdb9bf
[]
no_license
MaicoSautner/l2script-teste
48052f6408be26038e692f48b38f1582a3eded06
196979a27575fd3ff48c28d416f2d820ba02059e
refs/heads/master
2022-07-26T09:08:00.639245
2020-05-22T02:12:02
2020-05-22T02:16:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
215
java
package quests; import l2s.gameserver.model.quest.Quest; public class _734_RedLibraRequestNightmareKamaloka extends Quest { public _734_RedLibraRequestNightmareKamaloka() { super(PARTY_NONE, REPEATABLE); } }
[ "As69839314" ]
As69839314
f69e6a61031f6df12a92f126136a6178500b4911
f8a64679148d0d214d7146132bf8f71d23ca698b
/src/test/java/de/qaware/cloud/nativ/kpad/DcosLogoIT.java
71bf74a0e24aaa7e4dc2122f0355b56d653509e5
[ "MIT" ]
permissive
qaware/kubepad
85adf6f0abf70cfb26d209f12b2d24a2bc52ee15
12c879b630f2125773611684fe78ec1e577d9ef9
refs/heads/master
2021-01-16T23:59:30.587137
2020-01-31T16:29:06
2020-01-31T16:29:06
57,438,516
23
9
MIT
2018-05-04T09:27:05
2016-04-30T11:09:46
Kotlin
UTF-8
Java
false
false
5,533
java
/* * The MIT License (MIT) * * Copyright (c) 2016 QAware GmbH, Munich, Germany * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package de.qaware.cloud.nativ.kpad; import org.junit.After; import org.junit.Before; import org.junit.Test; import javax.sound.midi.MidiSystem; import javax.sound.midi.Receiver; import javax.sound.midi.Transmitter; import java.util.Arrays; import static de.qaware.cloud.nativ.kpad.launchpad.LaunchpadMK2.*; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertThat; /** * Integration tests to display the DC/OS logo in the launchpad. */ public class DcosLogoIT { private Transmitter transmitter; private Receiver receiver; @Before public void setUp() throws Exception { // these here do not seem to make any difference // maybe when there are multiple MIDI devices System.setProperty("javax.sound.midi.Transmitter", "com.sun.media.sound.MidiInDeviceProvider#Launchpad MK2"); System.setProperty("javax.sound.midi.Receiver", "com.sun.media.sound.MidiOutDeviceProvider#Launchpad MK2"); transmitter = MidiSystem.getTransmitter(); assertThat(transmitter, is(notNullValue())); receiver = MidiSystem.getReceiver(); assertThat(receiver, is(notNullValue())); } @After public void tearDown() throws Exception { transmitter.close(); receiver.close(); } @Test public void testDisplayDcosLogo() throws Exception { reset(); top(); right(); dcos(); } private void dcos() { // D new Square(7, 0).on(receiver, Color.CYAN); new Square(7, 1).on(receiver, Color.CYAN); new Square(6, 0).on(receiver, Color.CYAN); new Square(6, 2).on(receiver, Color.CYAN); new Square(5, 0).on(receiver, Color.CYAN); new Square(5, 2).on(receiver, Color.CYAN); new Square(4, 0).on(receiver, Color.CYAN); new Square(4, 1).on(receiver, Color.CYAN); // C new Square(7, 4).on(receiver, Color.ORANGE); new Square(7, 5).on(receiver, Color.ORANGE); new Square(6, 3).on(receiver, Color.ORANGE); new Square(5, 3).on(receiver, Color.ORANGE); new Square(4, 4).on(receiver, Color.ORANGE); new Square(4, 5).on(receiver, Color.ORANGE); // O new Square(1, 0).on(receiver, Color.PURPLE); new Square(2, 0).on(receiver, Color.PURPLE); new Square(0, 1).on(receiver, Color.PURPLE); new Square(3, 1).on(receiver, Color.PURPLE); new Square(0, 2).on(receiver, Color.PURPLE); new Square(3, 2).on(receiver, Color.PURPLE); new Square(1, 3).on(receiver, Color.PURPLE); new Square(2, 3).on(receiver, Color.PURPLE); // S new Square(0, 5).on(receiver, Color.LIGHT_GREEN); new Square(0, 6).on(receiver, Color.LIGHT_GREEN); new Square(1, 7).on(receiver, Color.LIGHT_GREEN); new Square(2, 6).on(receiver, Color.LIGHT_GREEN); new Square(3, 5).on(receiver, Color.LIGHT_GREEN); new Square(4, 7).on(receiver, Color.LIGHT_GREEN); new Square(4, 6).on(receiver, Color.LIGHT_GREEN); } private void right() { Button.Companion.right(0).on(receiver, Color.PURPLE); Button.Companion.right(1).on(receiver, Color.PURPLE); Button.Companion.right(2).on(receiver, Color.PURPLE); Button.Companion.right(3).on(receiver, Color.PURPLE); Button.Companion.right(4).on(receiver, Color.PURPLE); Button.Companion.right(5).on(receiver, Color.PURPLE); Button.Companion.right(6).on(receiver, Color.PURPLE); Button.Companion.right(7).on(receiver, Color.PURPLE); } private void top() { Button.CURSOR_UP.on(receiver, Color.BLUE); Button.CURSOR_DOWN.on(receiver, Color.BLUE); Button.CURSOR_LEFT.on(receiver, Color.BLUE); Button.CURSOR_RIGHT.on(receiver, Color.BLUE); Button.SESSION.on(receiver, Color.RED); Button.USER_1.on(receiver, Color.LIGHT_GREEN); Button.USER_2.on(receiver, Color.YELLOW); Button.MIXER.on(receiver, Color.LIGHT_BLUE); } private void reset() { Arrays.stream(Button.values()).forEach(button -> button.off(receiver)); for (int r = 0; r < 8; r++) { for (int c = 0; c < 8; c++) { new Square(r, c).off(receiver); } } } }
[ "mario-leander.reimer@qaware.de" ]
mario-leander.reimer@qaware.de
e2f9dec6162418793008e74edfeeb88776031092
845a1981d10f17e001a1656c1f0178a5189a3ab1
/neurocore/src/main/java/com/neuroandroid/pyplayer/adapter/SongAdapter.java
320c8fb9b7222cf49a4fdb401e4568371750b89d
[]
no_license
YXHTom/PYPlayer
1fcfc49f903eb89d0f82af7848b5ea194029bbe0
aac78aad191c41afed0792939000b3e0e9a8a70e
refs/heads/master
2020-03-21T12:43:30.569983
2017-06-02T08:55:27
2017-06-02T08:55:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,889
java
package com.neuroandroid.pyplayer.adapter; import android.content.Context; import android.graphics.drawable.Drawable; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.PopupMenu; import com.bumptech.glide.Glide; import com.neuroandroid.pyplayer.R; import com.neuroandroid.pyplayer.adapter.base.SelectAdapter; import com.neuroandroid.pyplayer.bean.Song; import com.neuroandroid.pyplayer.glide.PYPlayerColoredTarget; import com.neuroandroid.pyplayer.glide.SongGlideRequest; import com.neuroandroid.pyplayer.utils.ColorUtils; import com.neuroandroid.pyplayer.utils.MusicUtil; import com.neuroandroid.pyplayer.widget.IconImageView; import com.neuroandroid.pyplayer.widget.NoPaddingTextView; import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * Created by NeuroAndroid on 2017/5/9. */ public class SongAdapter extends SelectAdapter<Song, SongAdapter.Holder> implements FastScrollRecyclerView.SectionedAdapter { public SongAdapter(Context context, List<Song> dataList, int itemType, boolean usePalette) { super(context, dataList); mUsePalette = usePalette; mCurrentType = itemType; } @Override public Holder onCreateItemViewHolder(ViewGroup parent, int viewType) { Holder holder = null; switch (viewType) { case TYPE_LIST: holder = new Holder(LayoutInflater.from(mContext).inflate(R.layout.item_list, parent, false)); break; case TYPE_GRID: holder = new Holder(LayoutInflater.from(mContext).inflate(R.layout.item_grid, parent, false)); break; } return holder; } @Override public void onBindItemViewHolder(Holder holder, int position) { holder.onBind(mDataList.get(position)); } @NonNull @Override public String getSectionName(int position) { return MusicUtil.getSectionName(mDataList.get(position).title); } public class Holder extends RecyclerView.ViewHolder { @BindView(R.id.iv_img) ImageView mIvImg; @BindView(R.id.tv_title) NoPaddingTextView mTvTitle; @BindView(R.id.tv_sub_title) NoPaddingTextView mTvSubTitle; @Nullable @BindView(R.id.iv_menu) IconImageView mIvMenu; @Nullable @BindView(R.id.ll_palette) LinearLayout mLlPalette; public Holder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); } public void onBind(Song song) { itemView.setActivated(song.isSelected()); mTvTitle.setText(song.title); mTvSubTitle.setText(song.artistName); loadAlbumCover(song); if (mIvMenu != null) { mIvMenu.setOnClickListener(view -> { PopupMenu popupMenu = new PopupMenu(mContext, view); popupMenu.inflate(R.menu.menu_item_song); popupMenu.setOnMenuItemClickListener(null); popupMenu.show(); }); } } private void loadAlbumCover(Song song) { SongGlideRequest.Builder.from(Glide.with(mContext), song) .generatePalette(mContext).build() .into(new PYPlayerColoredTarget(mIvImg) { @Override public void onLoadCleared(Drawable placeholder) { super.onLoadCleared(placeholder); setPaletteColor(getDefaultFooterColor()); } @Override public void onColorReady(int color) { if (mUsePalette) { setPaletteColor(color); } else { setPaletteColor(getDefaultFooterColor()); } } }); } private void setPaletteColor(int color) { if (mLlPalette != null) { mLlPalette.setBackgroundColor(color); if (mTvTitle != null) { mTvTitle.setTextColor(ColorUtils.getPrimaryTextColor(mContext, ColorUtils.isColorLight(color))); } if (mTvSubTitle != null) { mTvSubTitle.setTextColor(ColorUtils.getSecondaryTextColor(mContext, ColorUtils.isColorLight(color))); } } } } }
[ "pangyu@corp.neurotech.cn" ]
pangyu@corp.neurotech.cn
d2007d46de7c612b4bcab3de78f47a6267491ba0
d50336de79252c19ec6dd6690654a658de4a5ec9
/app/src/main/java/me/dkzwm/widget/srl/sample/ui/TestMultiDirectionViewsActivity.java
2a33c33a35e7a8de3fe8da0ee3b9f5dd15864ea3
[ "MIT" ]
permissive
jelychow/SmoothRefreshLayout
7c45b2b9fdb84e86b0ccaa93860b1c55d69bd6be
a709967cf6d18abc2c14ced848ed69b3de4cf889
refs/heads/master
2021-09-05T18:49:39.632435
2018-01-30T11:00:28
2018-01-30T11:00:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,717
java
package me.dkzwm.widget.srl.sample.ui; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.view.MenuItem; import android.widget.ScrollView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; import me.dkzwm.widget.srl.HorizontalSmoothRefreshLayout; import me.dkzwm.widget.srl.RefreshingListenerAdapter; import me.dkzwm.widget.srl.SmoothRefreshLayout; import me.dkzwm.widget.srl.extra.header.ClassicHeader; import me.dkzwm.widget.srl.sample.R; import me.dkzwm.widget.srl.sample.adapter.ViewPagerAdapter; import me.dkzwm.widget.srl.sample.footer.CustomLoadDetailFooter; import me.dkzwm.widget.srl.sample.ui.fragment.PageFragment; /** * Created by dkzwm on 2017/11/3. * * @author dkzwm */ public class TestMultiDirectionViewsActivity extends AppCompatActivity { private static final int[] sColors = new int[]{Color.WHITE, Color.GREEN, Color.YELLOW, Color.BLUE, Color.RED, Color.BLACK}; private SmoothRefreshLayout mRefreshLayout; private HorizontalSmoothRefreshLayout mInnerRefreshLayout; private ViewPager mViewPager; private ScrollView mScrollView; private TextView mTextView; private ViewPagerAdapter mAdapter; private Handler mHandler = new Handler(); @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test_multi_direction_views); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayShowHomeEnabled(true); getSupportActionBar().setTitle(R.string.test_multi_direction_views); mRefreshLayout = findViewById(R.id.smoothRefreshLayout_test_multi_direction_views); ClassicHeader header = new ClassicHeader(this); mRefreshLayout.setHeaderView(header); mRefreshLayout.setEnableKeepRefreshView(true); mRefreshLayout.setDisableWhenAnotherDirectionMove(true); mRefreshLayout.setOnRefreshListener(new RefreshingListenerAdapter() { @Override public void onRefreshBegin(boolean isRefresh) { mHandler.postDelayed(new Runnable() { @Override public void run() { mViewPager.setCurrentItem(0, true); mRefreshLayout.refreshComplete(); } }, 2000); } }); mViewPager = findViewById(R.id.viewPager_test_multi_direction_views_pager); List<PageFragment> fragments = new ArrayList<>(); for (int i = 0; i < sColors.length; i++) { fragments.add(PageFragment.newInstance(i, sColors[i])); } mAdapter = new ViewPagerAdapter(getSupportFragmentManager(), fragments); mViewPager.setAdapter(mAdapter); mRefreshLayout.autoRefresh(false); mTextView = findViewById(R.id.textView_load_detail_footer_details); mScrollView = findViewById(R.id.scrollView_test_multi_direction_views); mInnerRefreshLayout = findViewById(R.id.smoothRefreshLayout_test_multi_direction_views_inner); mInnerRefreshLayout.setDisableRefresh(true); mInnerRefreshLayout.setDisableLoadMore(false); mInnerRefreshLayout.setLoadingMinTime(0); mInnerRefreshLayout.setEnableOverScroll(false); CustomLoadDetailFooter footer = new CustomLoadDetailFooter(this); mInnerRefreshLayout.setFooterView(footer); mInnerRefreshLayout.setOnRefreshListener(new RefreshingListenerAdapter() { @Override public void onRefreshBegin(boolean isRefresh) { mInnerRefreshLayout.setDurationToClose(500); mInnerRefreshLayout.refreshComplete(); mInnerRefreshLayout.setDurationToClose(500); mScrollView.smoothScrollTo(0, mTextView.getTop()); } }); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; default: return super.onOptionsItemSelected(item); } } @Override public void onBackPressed() { startActivity(new Intent(TestMultiDirectionViewsActivity.this, MainActivity.class)); finish(); } @Override protected void onDestroy() { super.onDestroy(); mHandler.removeCallbacksAndMessages(null); } }
[ "412946760@qq.com" ]
412946760@qq.com
e1443851446b506004a48fc8ce18ec12a0aca512
e70abc02efbb8a7637eb3655f287b0a409cfa23b
/hyjf-admin/src/main/java/com/hyjf/admin/manager/config/planpushmoneyconfig/PlanPushMoneyConfigDefine.java
8b5fed1958c4f4e4d130555f05853749bb0d4f26
[]
no_license
WangYouzheng1994/hyjf
ecb221560460e30439f6915574251266c1a49042
6cbc76c109675bb1f120737f29a786fea69852fc
refs/heads/master
2023-05-12T03:29:02.563411
2020-05-19T13:49:56
2020-05-19T13:49:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,970
java
package com.hyjf.admin.manager.config.planpushmoneyconfig; import com.hyjf.admin.BaseDefine; import com.hyjf.common.util.ShiroConstants; import com.hyjf.common.util.StringPool; public class PlanPushMoneyConfigDefine extends BaseDefine { /** 汇添金提成配置 @RequestMapping值 */ public static final String REQUEST_MAPPING = "/manager/config/planpushmoneyconfig"; /** 列表画面 路径 */ public static final String LIST_PATH = "manager/config/planpushmoneyconfig/pushmoneyconfigList"; /** 列表画面迁移 */ public static final String INFO_PATH = "manager/config/planpushmoneyconfig/pushmoneyconfigInfo"; /** 列表画面 @RequestMapping值 */ public static final String INIT = "init"; /** 检索Action @RequestMapping */ public static final String SEARCH_ACTION = "searchAction"; /** 迁移到详细画面 @RequestMapping值 */ public static final String INFO_ACTION = "infoAction"; /** 插入数据 @RequestMapping值 */ public static final String INSERT_ACTION = "insertAction"; /** 更新数据 @RequestMapping值 */ public static final String UPDATE_ACTION = "updateAction"; /** FROM */ public static final String PUSHMONEYCONFIG_FORM = "pushMoneyConfigForm"; /** 查看权限 */ public static final String PERMISSIONS = "pushMoneyConfig"; /** 查看权限 */ public static final String PERMISSIONS_VIEW = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_VIEW; /** 检索权限 */ public static final String PERMISSIONS_SEARCH = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_SEARCH; /** 修改权限 */ public static final String PERMISSIONS_MODIFY = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_MODIFY; /** 删除权限 */ public static final String PERMISSIONS_DELETE = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_DELETE; /** 添加权限 */ public static final String PERMISSIONS_ADD = PERMISSIONS + StringPool.COLON + ShiroConstants.PERMISSION_ADD; }
[ "heshuying@hyjf.com" ]
heshuying@hyjf.com
3d7825d732514c9ac8b005e3d0837f12f9834eba
464e89a636ba333b9fa03b5a7fbc946883fe507f
/app/src/main/java/org/gkk/bioshopapp/web/api/controller/OrderApiController.java
3008ad325b2af56e54238a991740c926bde017c1
[ "MIT" ]
permissive
galin-kostadinov/BioProductsShop_REST
d3377c7272e2dbe7493b3fdf54961aeccbada511
960856a635d97a73144bebbfe88fdc28689ad8a1
refs/heads/master
2022-08-17T02:46:44.040882
2020-05-26T11:38:59
2020-05-26T11:38:59
262,988,799
0
0
null
null
null
null
UTF-8
Java
false
false
6,032
java
package org.gkk.bioshopapp.web.api.controller; import org.gkk.bioshopapp.service.model.order.OrderProductCreateServiceModel; import org.gkk.bioshopapp.service.service.OrderService; import org.gkk.bioshopapp.service.service.ProductService; import org.gkk.bioshopapp.web.api.model.order.OrderResponseModel; import org.gkk.bioshopapp.web.view.model.order.OrderProductModel; import org.gkk.bioshopapp.web.view.model.product.ProductShoppingCartModel; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.math.BigDecimal; import java.security.Principal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.stream.Collectors; @RestController public class OrderApiController { private final OrderService orderService; private final ProductService productService; private final ModelMapper modelMapper; @Autowired public OrderApiController(OrderService orderService, ProductService productService, ModelMapper modelMapper) { this.orderService = orderService; this.productService = productService; this.modelMapper = modelMapper; } @GetMapping(value = "/api/order/orders") @PreAuthorize("isAuthenticated()") public ResponseEntity<List<OrderResponseModel>> getAllOrders(Principal principal) { String username = principal.getName(); List<OrderResponseModel> list = this.orderService.getAllOrdersByUser(username) .stream() .map(p -> this.modelMapper.map(p, OrderResponseModel.class)) .collect(Collectors.toList()); return new ResponseEntity<>(list, HttpStatus.OK); } @PostMapping("/api/order/buy") @PreAuthorize("isAuthenticated()") public void buy(HttpSession session, HttpServletResponse response) throws Exception { String username = session.getAttribute("username").toString(); HashMap<String, OrderProductModel> cartInSession = (HashMap<String, OrderProductModel>) session.getAttribute("cart"); if (cartInSession.isEmpty()) { response.sendRedirect("/order/cart"); return; } List<OrderProductCreateServiceModel> ordersService = cartInSession.values() .stream() .map(o -> this.modelMapper.map(o, OrderProductCreateServiceModel.class)) .collect(Collectors.toList()); this.orderService.create(ordersService, username); cartInSession.clear(); response.sendRedirect("/order/orders"); } @PostMapping("/api/order/add-to-cart/{id}") @PreAuthorize("isAuthenticated()") public void addToCart(@PathVariable String id, Integer quantity, HttpSession session, HttpServletResponse response) throws IOException { if (quantity < 1) { throw new IllegalArgumentException("Quantity must be positive number bigger or equal to 1."); } HashMap<String, OrderProductModel> cart = (HashMap<String, OrderProductModel>) session.getAttribute("cart"); if (!cart.containsKey(id)) { ProductShoppingCartModel product = this.modelMapper.map(this.productService.getShoppingCartProductModelById(id), ProductShoppingCartModel.class); cart.put(id, new OrderProductModel(product, quantity)); } else { OrderProductModel orderProductModel = cart.get(id); orderProductModel.setQuantity(orderProductModel.getQuantity() + quantity); } response.sendRedirect("/product"); } @PostMapping("/api/order/remove-from-cart/{id}") @PreAuthorize("isAuthenticated()") public void removeFromCart(@PathVariable String id, HttpSession session, HttpServletResponse response) throws IOException { HashMap<String, OrderProductModel> cart = (HashMap<String, OrderProductModel>) session.getAttribute("cart"); cart.remove(id); response.sendRedirect("/order/cart"); } @GetMapping("/api/order/cart") @PreAuthorize("isAuthenticated()") public ResponseEntity<List<OrderProductModel>> getShoppingCart(HttpSession session) { HashMap<String, OrderProductModel> cartInSession = (HashMap<String, OrderProductModel>) session.getAttribute("cart"); List<OrderProductModel> cart = new ArrayList<>(cartInSession.values()); BigDecimal cartTotalPrice = calculateTotalCartPrice(cart); HttpHeaders headers = new HttpHeaders(); headers.add("cartTotalPrice", cartTotalPrice.toString()); return new ResponseEntity<>(cart, headers, HttpStatus.OK); } private BigDecimal calculateTotalCartPrice(List<OrderProductModel> cart) { return cart.stream() .map(op -> { BigDecimal resultPrice; if (op.getProduct().getPromotionalPrice() == null) { resultPrice = op.getProduct().getPrice().multiply(BigDecimal.valueOf(op.getQuantity())); } else { resultPrice = op.getProduct().getPromotionalPrice().multiply(BigDecimal.valueOf(op.getQuantity())); } return resultPrice; } ) .reduce(BigDecimal.ZERO, BigDecimal::add); } }
[ "gk_1988@abv.bg" ]
gk_1988@abv.bg
b176946aff9b85b6ebdc75191fc665632149cbeb
7e994d213901d0a623e7cece9d812f296888bc07
/facebook-socialshare/src/main/java/com/platzerworld/facebook/utils/Example.java
987dedc840b4c95636cbed6b711be9432b781ea3
[]
no_license
platzerg/SocialShare
f2b1671953b467e4039a4f3c8e2b5443160f819e
f710bda5d4d3131ea4ab45d8bf190d1f473c49d7
refs/heads/master
2020-04-13T17:53:49.911032
2014-09-03T19:24:00
2014-09-03T19:24:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package com.platzerworld.facebook.utils; import android.app.Fragment; public class Example { private final String mTitle; private final Class<? extends Fragment> mFragment; public Example(String title, Class<? extends Fragment> fragment) { mTitle = title; mFragment = fragment; } public String getTitle() { return mTitle; } public Class<? extends Fragment> getFragment() { return mFragment; } }
[ "guenter.platzerworld@googlemail.com" ]
guenter.platzerworld@googlemail.com
e682f7733aa4e7d6c885ffa691d2aff89f67394b
d2f4ef58e59903ba7f22a989f821001575749318
/src/main/java/A20200824_DataStrutures/linklist/LinkListTest.java
9204494aeb9b944c00f964ec090a302890f5b303
[]
no_license
3066244380/lf-interview
b3ce6465577b0535fa80c06d168c00b616f293e4
bc26c448a872269858ff2c2e39e599fca3c55437
refs/heads/master
2022-12-17T07:16:34.814626
2020-09-25T03:45:23
2020-09-25T03:45:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,118
java
package A20200824_DataStrutures.linklist; import java.util.ArrayList; import java.util.LinkedList; /** * create by lishengbo on 2018-07-04 15:56 * 以下分析均基于JDK1.8 * ----------------- * LinkedList底层使用的双向链表结构,有一个头结点和一个尾结点,双向链表意味着我们可以从头开始正向遍历, * 或者是从尾开始逆向遍历,并且可以针对头部和尾部进行相应的操作 * ·类的继承关系: * public class LinkedList<E>extends * AbstractSequentialList<E>implements * List<E>, * Deque<E>, -Deque接口表示是一个双端队列,故基于双端队列的操作在LinkedList中全部有效 * Cloneable, * java.io.Serializable * ·类的内部类:-->内部类Node就是实际的结点,用于存放实际元素的地方。 * private static class Node<E> { E item; // 数据域 Node<E> next; // 后继 Node<E> prev; // 前驱 // 构造函数,赋值前驱后继 Node(Node<E> prev, E element, Node<E> next) { this.item = element; this.next = next; this.prev = prev; } } * ·类的属性:--transient关键字修饰,序列化时该域是不会序列化的。 * // 实际元素个数 transient int size = 0; // 头结点 transient Node<E> first; // 尾结点 transient Node<E> last; * ·类的构造函数: * ·优点: * LinkedList是采用链表的方式来实现List接口的,它本身有自己特定的方法, * 如: addFirst(),addLast(),getFirst(),removeFirst()等. 由于是采用链表实现的, * 因此在进行insert和remove动作时在效率上要比ArrayList要好得多!适合用来实现Stack(堆栈)与Queue(队列), * 前者先进后出,后者是先进先出 * 1.ArrayList插入或删除均会移动指针会耗费时间--所以效率慢 * 2.LinkList插入或删除只需要改变前后节点指向即可,所以效率快 * 关于查询效率: * LinkedList是双向链表,注意是链表。要查询只能头结点开始逐步查询,没有什么给出下标即可直接查询的便利,需要遍历。 * 由于LinkedList查询只能从头结点开始逐步查询的,可以使用 iterator 的方式,就不用每次都从头结点开始访问, * 因为它会缓存当前结点的前后结点。实测查询效率与ArrayList没有太大差别 * 缺点:没有索引的便利,只能通过遍历找到想要的值 */ public class LinkListTest { public static void main(String[] args) { ArrayList<String> strings = new ArrayList<String>(); strings.add("12--"); strings.add("13--"); strings.add("14--"); strings.add("15--"); //无参构造函数 LinkedList<String> strings1 = new LinkedList<String>(); //add函数用于向LinkedList中添加一个元素,并且添加到链表尾部。具体添加到尾部的逻辑是由linkLast函数完成的。 //添加过程如下: // void linkLast(E e) { // // 保存尾结点,l为final类型,不可更改 // final Node<E> l = last; // // 新生成结点的前驱为l,后继为null // final Node<E> newNode = new Node<>(l, e, null); // // 重新赋值尾结点 // last = newNode; // if (l == null) // 尾结点为空 // first = newNode; // 赋值头结点 // else // 尾结点不为空 // l.next = newNode; // 尾结点的后继为新生成的结点 // // 大小加1 // size++; // // 结构性修改加1 // modCount++; // } //如下先添加5后添加6的过程:null 5 6 null // strings1.add("5"); strings1.add("6"); //在链表最后插入集合++++++++++++++++++++ //实际也是调用addAll(1,strings) //addAll-内部也是将传过来的集合进行转换,转换为数组,然后遍历插入 //addAll()中转为数组进行添加是为了提高多线程下 参数Collection 集合的访问效率 strings1.addAll(strings); for (String s:strings1 ) { System.out.println(s+"============"); } //从下标为几的位置开始插入集合++++++++++++ strings1.addAll(1,strings); for (String s:strings1 ) { System.out.println(s); } //集合参数构造方法-->:会调用无参构造函数,并且会把集合中所有的元素添加到LinkedList中 // // 调用无参构造函数 //this(); // 添加集合中所有的元素 //addAll(c); LinkedList<String> strings2 = new LinkedList<String>(); } }
[ "982338665@qq.com" ]
982338665@qq.com
4f1dba3b795616634479792b683a2bf0aae24aba
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project40/src/main/java/org/gradle/test/performance40_2/Production40_159.java
a8a7cb0e09e633a790f049a93b133f5f83b4f078
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance40_2; public class Production40_159 extends org.gradle.test.performance13_2.Production13_159 { private final String property; public Production40_159() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f7ab81b2ba6f66742624b63f83a0bfc8f39d62bf
1a52aa3c19ad15f84d5c239c076008ad187e4bb8
/src/test/java/com/imooc/test/beanannotation/TestJavabased.java
6898adaf004b1914a04ec67ab5adba56988906b3
[]
no_license
Qstar/Spring
96709154e42942f3cbea0e99f2f76bbca7060ab0
8089ac49e601389a426076d5ae739fd8ea2917eb
refs/heads/master
2021-01-10T16:08:38.790008
2016-01-20T08:19:07
2016-01-20T08:19:07
49,939,967
0
0
null
null
null
null
UTF-8
Java
false
false
1,253
java
package com.imooc.test.beanannotation; import com.imooc.beanannotation.javabased.MyDriverManager; import com.imooc.beanannotation.javabased.Store; import com.imooc.beanannotation.javabased.StringStore; import com.imooc.test.base.UnitTestBase; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.BlockJUnit4ClassRunner; @RunWith(BlockJUnit4ClassRunner.class) public class TestJavabased extends UnitTestBase { public TestJavabased() { super("classpath*:spring-beanannotation.xml"); } @Test public void test() { Store store = super.getBean("stringStore"); System.out.println(store.getClass().getName()); } @Test public void testMyDriverManager() { MyDriverManager manager = super.getBean("myDriverManager"); System.out.println(manager.getClass().getName()); } @Test public void testScope() { Store store = super.getBean("stringStore"); System.out.println(store.hashCode()); store = super.getBean("stringStore"); System.out.println(store.hashCode()); } @Test public void testG() { StringStore store = super.getBean("stringStoreTest"); } }
[ "davesla2012@hotmail.com" ]
davesla2012@hotmail.com
d712064149bb64c9e6ad64c4fe4aca83477839d4
6b1bd439c4146dc2545cb53e0ee612f7393b7c89
/RenuGit/mvc/src/main/java/Demo/Student.java
54936f1f80b896ba19132e4fb21207da711deb73
[]
no_license
krishh13/CustomerPortal
939caeb886f6829508d190a744b4448d69d88c7e
acfc465dd3eaef22b9af24fef92f917ce000bb76
refs/heads/master
2020-04-04T06:53:06.424976
2018-11-01T18:55:29
2018-11-01T18:55:29
155,760,390
0
0
null
null
null
null
UTF-8
Java
false
false
1,378
java
package Demo; import java.util.LinkedHashMap; public class Student { private String firstName; private String lastName; private String country; private LinkedHashMap<String,String> countryOptions; private String favoriteLanguage; private String OS; public Student(){ countryOptions = new LinkedHashMap<>(); countryOptions.put("BR","Brazil"); countryOptions.put("PR","Peru"); countryOptions.put("IN","India"); countryOptions.put("PK","Pakistan"); countryOptions.put("U","US"); } public LinkedHashMap<String, String> getCountryOptions() { return countryOptions; } public void setCountryOptions(LinkedHashMap<String, String> countryOptions) { this.countryOptions = countryOptions; } public String getOS() { return OS; } public void setOS(String oS) { OS = oS; } public String getFavoriteLanguage() { return favoriteLanguage; } public void setFavoriteLanguage(String favoriteLanguage) { this.favoriteLanguage = favoriteLanguage; } 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 getCountry() { return country; } public void setCountry(String country) { this.country = country; } }
[ "reddygari.saikrishna@gmail.com" ]
reddygari.saikrishna@gmail.com
362fe61742d589ac247cd905779452bda5368d13
84285f6f44ac23fcac02463bb0ab2782c72e1026
/yifubao/core-common/src/main/java/com/efubao/core/common/dfs/fastdfs/support/StorageClientTemplate.java
9c1f024c90b1982fa397457badc6faa3b67ff4c1
[]
no_license
lichao20000/projects-web
f68122493861dd2a9f141c941534e55faacbd535
da34ce2468731eeff5ba0ae3948e4814e2413ac5
refs/heads/master
2021-12-10T09:41:30.578734
2016-08-05T04:13:41
2016-08-05T04:13:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,397
java
package com.efubao.core.common.dfs.fastdfs.support; import java.io.IOException; import org.csource.fastdfs.StorageServer; import org.csource.fastdfs.TrackerClient; import org.csource.fastdfs.TrackerServer; import com.efubao.core.common.dfs.DistributedFileSystemException; import com.efubao.core.common.dfs.fastdfs.StorageClientCallback; import com.efubao.core.common.dfs.fastdfs.StorageClientReturnedCallback; /** * 存储服务器客户端模板类。 * */ public class StorageClientTemplate { /** 跟踪服务器客户端 */ private TrackerClient trackerClient; /** * 设置跟踪服务器客户端。 * * @param trackerClient 跟踪服务器客户端。 */ public void setTrackerClient(TrackerClient trackerClient) { this.trackerClient = trackerClient; } /** * 此方法可以通过跟踪服务器客户端、跟踪服务器、存储服务器执行相应功能。 * * @param returnedCallback 回调。 * @return 回调返回值。 * @throws DistributedFileSystemException 分布式文件系统异常。 */ public <T> T execute(StorageClientReturnedCallback<T> returnedCallback) throws DistributedFileSystemException { TrackerServer trackerServer = null; StorageServer storageServer = null; try { trackerServer = returnedCallback.getTrackerServer(trackerClient); storageServer = returnedCallback.getStorageServer(trackerClient, trackerServer); return returnedCallback.doInStorageClient(trackerClient, trackerServer, storageServer); } catch (DistributedFileSystemException e) { throw e; } catch (Exception e) { throw new DistributedFileSystemException(e.getMessage(), e); } finally { DistributedFileSystemException exception = null; if (trackerServer != null) { try { trackerServer.close(); } catch (IOException e) { exception = new DistributedFileSystemException(e.getMessage(), e); } } if (storageServer != null) { try { storageServer.close(); } catch (IOException e) { exception = new DistributedFileSystemException(e.getMessage(), e); } } if (exception != null) { throw exception; } } } /** * 此方法可以通过跟踪服务器客户端、跟踪服务器、存储服务器执行相应功能。 * * @param callback 回调。 * @throws DistributedFileSystemException 分布式文件系统异常。 */ public void execute(StorageClientCallback callback) throws DistributedFileSystemException { TrackerServer trackerServer = null; StorageServer storageServer = null; try { trackerServer = callback.getTrackerServer(trackerClient); storageServer = callback.getStorageServer(trackerClient, trackerServer); callback.doInStorageClient(trackerClient, trackerServer, storageServer); } catch (DistributedFileSystemException e) { throw e; } catch (Exception e) { throw new DistributedFileSystemException(e.getMessage(), e); } finally { DistributedFileSystemException exception = null; if (trackerServer != null) { try { trackerServer.close(); } catch (IOException e) { exception = new DistributedFileSystemException(e.getMessage(), e); } } if (storageServer != null) { try { storageServer.close(); } catch (IOException e) { exception = new DistributedFileSystemException(e.getMessage(), e); } } if (exception != null) { throw exception; } } } }
[ "duandingyang@bjtu.edu.cn" ]
duandingyang@bjtu.edu.cn
cc682fcfe6074305cd8ee2017f7f9eb1f3ea370d
2c03c5f656836ea967a381ec4856f86bd908d53c
/src/main/java/crazypants/enderio/teleport/anchor/TravelEntitySpecialRenderer.java
bc25aafa1ea0606fe5b9c41d207773442830f807
[ "Unlicense", "CC0-1.0", "CC-BY-3.0", "LicenseRef-scancode-public-domain" ]
permissive
Speiger/EnderIO
aa930b597047b4d4ab7d206d20d788d76e4348e5
5757f17b56d313afd54e0031ebfa070aee157690
refs/heads/master
2021-01-18T10:37:52.386860
2015-09-09T00:36:48
2015-09-09T00:36:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,467
java
package crazypants.enderio.teleport.anchor; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import org.lwjgl.opengl.GL14; import com.enderio.core.client.render.BoundingBox; import com.enderio.core.client.render.CubeRenderer; import com.enderio.core.client.render.RenderUtil; import com.enderio.core.common.util.BlockCoord; import com.enderio.core.common.util.Util; import com.enderio.core.common.vecmath.Vector3d; import com.enderio.core.common.vecmath.Vector3f; import com.enderio.core.common.vecmath.Vector4f; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import crazypants.enderio.EnderIO; import crazypants.enderio.api.teleport.ITravelAccessable; import crazypants.enderio.api.teleport.TravelSource; import crazypants.enderio.teleport.TravelController; @SideOnly(Side.CLIENT) public class TravelEntitySpecialRenderer extends TileEntitySpecialRenderer { private final Vector4f selectedColor; private final Vector4f highlightColor; public TravelEntitySpecialRenderer() { this(new Vector4f(1, 0.25f, 0, 0.5f), new Vector4f(1, 1, 1, 0.25f)); } public TravelEntitySpecialRenderer(Vector4f selectedColor, Vector4f highlightColor) { this.selectedColor = selectedColor; this.highlightColor = highlightColor; } @Override public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) { if(!TravelController.instance.showTargets()) { return; } ITravelAccessable ta = (ITravelAccessable) tileentity; BlockCoord onBlock = TravelController.instance.onBlockCoord; if(onBlock != null && onBlock.equals(ta.getLocation())) { return; } if(!ta.canSeeBlock(Minecraft.getMinecraft().thePlayer)) { return; } Vector3d eye = Util.getEyePositionEio(Minecraft.getMinecraft().thePlayer); Vector3d loc = new Vector3d(tileentity.xCoord + 0.5, tileentity.yCoord + 0.5, tileentity.zCoord + 0.5); double maxDistance = TravelController.instance.isTravelItemActive(Minecraft.getMinecraft().thePlayer) ? TravelSource.STAFF.maxDistanceTravelledSq : TravelSource.BLOCK.maxDistanceTravelledSq; if(eye.distanceSquared(loc) > maxDistance) { return; } double sf = TravelController.instance.getScaleForCandidate(loc); BlockCoord bc = new BlockCoord(tileentity); TravelController.instance.addCandidate(bc); Minecraft.getMinecraft().entityRenderer.disableLightmap(0); RenderUtil.bindBlockTexture(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); GL11.glPushAttrib(GL11.GL_LIGHTING_BIT); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glColor3f(1, 1, 1); GL11.glPushMatrix(); GL11.glTranslated(x, y, z); Tessellator.instance.startDrawingQuads(); renderBlock(sf); Tessellator.instance.draw(); Tessellator.instance.startDrawingQuads(); Tessellator.instance.setBrightness(15 << 20 | 15 << 4); if(TravelController.instance.isBlockSelected(bc)) { Tessellator.instance.setColorRGBA_F(selectedColor.x, selectedColor.y, selectedColor.z, selectedColor.w); CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(sf + 0.05, sf + 0.05, sf + 0.05), getSelectedIcon()); } else { Tessellator.instance.setColorRGBA_F(highlightColor.x, highlightColor.y, highlightColor.z, highlightColor.w); CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(sf + 0.05, sf + 0.05, sf + 0.05), getHighlightIcon()); } Tessellator.instance.draw(); GL11.glPopMatrix(); renderLabel(tileentity, x, y, z, ta, sf); GL11.glPopAttrib(); GL11.glPopAttrib(); Minecraft.getMinecraft().entityRenderer.enableLightmap(0); } private void renderLabel(TileEntity tileentity, double x, double y, double z, ITravelAccessable ta, double sf) { float globalScale = (float) sf; ItemStack itemLabel = ta.getItemLabel(); if(itemLabel != null && itemLabel.getItem() != null) { boolean isBlock = false; Block block = Block.getBlockFromItem(itemLabel.getItem()); if(block != null && block != Blocks.air) { isBlock = true; } float alpha = 0.5f; GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_CONSTANT_COLOR); float col = 0.5f; GL14.glBlendColor(col, col, col, col); GL11.glColor4f(1, 1, 1, 1); EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer; { GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5f, (float) y + 0.5f, (float) z + 0.5f); if(!isBlock) { GL11.glRotatef(-player.rotationYaw, 0.0F, 1.0F, 0.0F); GL11.glRotatef(player.rotationPitch, 1.0F, 0.0F, 0.0F); } { GL11.glPushMatrix(); GL11.glScalef(globalScale, globalScale, globalScale); { GL11.glPushMatrix(); if(isBlock) { GL11.glTranslatef(0f, -0.25f, 0); } else { GL11.glTranslatef(0f, -0.5f, 0); } GL11.glScalef(2, 2, 2); EntityItem ei = new EntityItem(tileentity.getWorldObj(), x, y, z, itemLabel); ei.age = 0; ei.hoverStart = 0; RenderManager.instance.getEntityRenderObject(ei).doRender(ei, 0, 0, 0, 0, 0); GL11.glPopMatrix(); } GL11.glPopMatrix(); } GL11.glPopMatrix(); } } String toRender = ta.getLabel(); if(toRender != null && toRender.trim().length() > 0) { GL11.glColor4f(1, 1, 1, 1); Vector4f bgCol = RenderUtil.DEFAULT_TEXT_BG_COL; if(TravelController.instance.isBlockSelected(new BlockCoord(tileentity))) { bgCol = new Vector4f(selectedColor.x, selectedColor.y, selectedColor.z, selectedColor.w); } { GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5f, (float) y + 0.5f, (float) z + 0.5f); { GL11.glPushMatrix(); GL11.glScalef(globalScale, globalScale, globalScale); Vector3f pos = new Vector3f(0, 1.2f, 0); float size = 0.5f; RenderUtil.drawBillboardedText(pos, toRender, size, bgCol); GL11.glPopMatrix(); } GL11.glPopMatrix(); } } } protected void renderBlock(double sf) { Tessellator.instance.setColorRGBA_F(1, 1, 1, 0.75f); CubeRenderer.render(BoundingBox.UNIT_CUBE.scale(sf, sf, sf), EnderIO.blockTravelPlatform.getIcon(0, 0)); } public Vector4f getSelectedColor() { return selectedColor; } public IIcon getSelectedIcon() { return EnderIO.blockTravelPlatform.selectedOverlayIcon; } public Vector4f getHighlightColor() { return highlightColor; } public IIcon getHighlightIcon() { return EnderIO.blockTravelPlatform.highlightOverlayIcon; } }
[ "tterrag1098@gmail.com" ]
tterrag1098@gmail.com
bdea82ffafea0dee3de98f257acae1547959b5d9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_f300d01fea4c65ca5ba33435177031b4a34ea13c/ChannelModule/22_f300d01fea4c65ca5ba33435177031b4a34ea13c_ChannelModule_s.java
cf901b4ddd227dba8c8f0a237f322f328cc8ca2f
[]
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,961
java
package mecha.vm.bifs; import java.util.*; import java.util.concurrent.*; import java.util.logging.*; import java.io.*; import java.net.*; import mecha.Mecha; import mecha.vm.channels.*; import mecha.json.*; import mecha.vm.*; public class ChannelModule extends MVMModule { final private static Logger log = Logger.getLogger(ChannelModule.class.getName()); public ChannelModule() throws Exception { super(); } public void moduleLoad() throws Exception { } public void moduleUnload() throws Exception { } public class Subscribe extends MVMFunction { public Subscribe(String refId, MVMContext ctx, JSONObject config) throws Exception { super(refId, ctx, config); } public void start(JSONObject msg) throws Exception { String channel = getConfig().getString("channel"); if (channel.endsWith("*")) { channel = channel.substring(0, channel.length()-1); for(String channelName : Mecha.getChannels().getChannelNames()) { if (channelName.startsWith(channel)) { PubChannel pubChannel = Mecha.getChannels().getChannel(channelName); pubChannel.addMember(getContext().getClient()); getContext().getClient().addSubscription(channelName); } } } else { PubChannel pubChannel = Mecha.getChannels().getOrCreateChannel(channel); pubChannel.addMember(getContext().getClient()); getContext().getClient().addSubscription(channel); } broadcastDone(); } } public class Unsubscribe extends MVMFunction { public Unsubscribe(String refId, MVMContext ctx, JSONObject config) throws Exception { super(refId, ctx, config); String channel = config.getString("channel"); PubChannel pubChannel = Mecha.getChannels().getOrCreateChannel(channel); if (pubChannel == null) { return; } else { pubChannel.removeMember(ctx.getClient()); ctx.getClient().removeSubscription(channel); } } } public class Publish extends MVMFunction { public Publish(String refId, MVMContext ctx, JSONObject config) throws Exception { super(refId, ctx, config); String channel = config.getString("channel"); JSONObject data = config.getJSONObject("data"); PubChannel pubChannel = Mecha.getChannels().getChannel(channel); if (pubChannel == null) { return; } else { pubChannel.send(data); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
318aa043afca9b7fa6586d1cc1d208aa14c50b0f
6e773d6d378d337f36973c39d367de2787fd6875
/sources/modules/api-manager/src/main/java/com/minsait/onesait/platform/api/rest/api/dto/ApiDTO.java
2934f48920a75c2c360edd15b70af613a5c75731
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
evalinani/onesaitplatform-cloud
1d14ee4928a02e4a0743dfe09303ea098840c22c
73e9756c7721cbc1bad7c19ec8737139e651eba5
refs/heads/master
2020-07-25T07:06:50.045635
2019-09-12T08:26:19
2019-09-12T08:26:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,800
java
/** * Copyright Indra Soluciones Tecnologías de la Información, S.L.U. * 2013-2019 SPAIN * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.minsait.onesait.platform.api.rest.api.dto; import java.io.Serializable; import java.util.ArrayList; import com.minsait.onesait.platform.config.model.Api.ApiStates; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; public class ApiDTO implements Cloneable, Serializable { /** * */ private static final long serialVersionUID = 1L; @ApiModelProperty(value = "API Identification") @Getter @Setter private String identification; @ApiModelProperty(value = "API Version Number") @Getter @Setter private Integer version; @ApiModelProperty(value = "API Type") @Getter @Setter private String type; @ApiModelProperty(value = "API Public/Private") @Getter @Setter private Boolean isPublic; @ApiModelProperty(value = "API Category") @Getter @Setter private String category; @ApiModelProperty(value = "API External") @Getter @Setter private Boolean externalApi; @ApiModelProperty(value = "Ontology Identification for OntologyAPI") @Getter @Setter private String ontologyId; @ApiModelProperty(value = "QPS API limit") @Getter @Setter private Integer apiLimit; @ApiModelProperty(value = "Endpoint for API Invocation") @Getter @Setter private String endpoint; @ApiModelProperty(value = "External Endpoint for invoking API") @Getter @Setter private String endpointExt; @ApiModelProperty(value = "API Description") @Getter @Setter private String description; @ApiModelProperty(value = "Tags Meta-inf for API") @Getter @Setter private String metainf; @ApiModelProperty(value = "Image Type") @Getter @Setter private String imageType; @ApiModelProperty(value = "API Status") @Getter @Setter private ApiStates status; @ApiModelProperty(value = "creation Date") @Getter @Setter private String creationDate; @ApiModelProperty(value = "API Propietary") @Getter @Setter private String userId; @ApiModelProperty(value = "API Operations") @Getter @Setter private ArrayList<OperacionDTO> operations; @ApiModelProperty(value = "API Authentication") @Getter @Setter private ArrayList<AutenticacionAtribDTO> authentication; }
[ "danzig6661@gmail.com" ]
danzig6661@gmail.com
56bae9d8435034f47701016e769f2b1f309443ec
14fcf4e34da7d0af1f387c0619390e2dd9299325
/BasicJAVA/src/ex12inheritance/PrivateInheritanceMain.java
5e941f16e190ad8df5c01b875240cfb52dce866c
[]
no_license
hojae-lee/BasicJAVA
a021c0b17c0ff08c5c80d9736fe04faf0c8134d7
bf533695b9585c31ac391c3a5ec9ebbb413010c8
refs/heads/master
2020-09-14T09:19:26.798908
2019-11-21T04:37:48
2019-11-21T04:37:48
223,087,798
1
0
null
null
null
null
UTF-8
Java
false
false
1,911
java
package ex12inheritance; public class PrivateInheritanceMain { public static void main(String[] args) { SavingAccount sa = new SavingAccount(10000); /* private이므로 상속받은 하위 클래스에서는 접근이 불가능하다. 이 떄는 부모의 멤버메소드를 통해서만 접근해야 한다. */ // sa.money = 100000; // 접근불가 sa.saveMoney(5000); sa.showAccountMoney(); // Account ac = new Account(1000); 접근불가 // ac.money = 1000; 접근불가 } } //부모클래스 class Account{ /* 멤버변수가 상속관계에 있다 하더라도 private로 선언되면 클래스 내부에서만 접근이 가능하다. 즉, 상속받은 하위클래스에서 직접 접근이 불가능하다. */ private int money;//잔고 public Account(int init) { money = init; } //입금처리 : protected이므로 상속관계에서 접근가능. protected void depositMoney(int _money) { if(_money<0) { System.out.println("마이너스 금액은 입금처리 불가합니다."); return; } money += _money; } //private 멤버변수를 외부클래스로 반환할때 사용 protected int getAccMoney() { return money; } } //자식클래스 class SavingAccount extends Account{ //멤버변수없음 /* 인자생성자 : super()를 통해서 부모의 생성자를 호출하여 초기화하고있다. 이 떄 인자가 하나인 생성자를 호출하게 된다. */ public SavingAccount(int initVal) { super(initVal); } public void saveMoney(int money) { /* private로 선언된 money에 직접 접근할 수 없기 때문에 protected로 선언된 depositMoney() 를 통해 간접적으로 접근하여 입금을 처리한다. */ depositMoney(money); // money += money; } public void showAccountMoney() { System.out.println("지금까지의 누적금액: "+ getAccMoney() ); } }
[ "jhlee@ibleaders.co.kr" ]
jhlee@ibleaders.co.kr
5d7ff0fec3fda4a7321958b186016de8fc3f4e9b
76781b322fdb28b695103f551af246379b3a63d9
/MuGA/src/com/evolutionary/operator/recombination/real/MuLX.java
391eb1905c8f15d6339459fb03f56d050f2a76b8
[]
no_license
Evolutionary-Algorithms/MuGA
71eb2b6ac0ae5b02a89d7b1ea933f7761c4a8969
10d35980f57adcf8172e145e7dbd910e537e865f
refs/heads/master
2020-09-11T14:19:47.316298
2020-04-08T12:39:11
2020-04-08T12:39:11
222,090,035
0
0
null
null
null
null
UTF-8
Java
false
false
5,049
java
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:: :: //:: Antonio Manuel Rodrigues Manso :: //:: :: //:: Biosystems & Integrative Sciences Institute :: //:: Faculty of Sciences University of Lisboa :: //:: http://www.fc.ul.pt/en/unidade/bioisi :: //:: :: //:: :: //:: I N S T I T U T O P O L I T E C N I C O D E T O M A R :: //:: Escola Superior de Tecnologia de Tomar :: //:: e-mail: manso@ipt.pt :: //:: url : http://orion.ipt.pt/~manso :: //:: :: //:: This software was build with the purpose of investigate and :: //:: learning. :: //:: :: //:: (c)2015 :: //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ////////////////////////////////////////////////////////////////////////////// package com.evolutionary.operator.recombination.real; import com.evolutionary.operator.recombination.Recombination; import com.evolutionary.problem.Individual; import com.evolutionary.problem.real.RealVector; import com.utils.RandomVariable; /** * Created on 2/out/2015, 8:38:28 * * @author zulu - computer */ public class MuLX extends Recombination { double EXPAND = 0.5; @Override public Individual[] recombine(Individual... parents) { return executeAX((RealVector) parents[0], (RealVector) parents[1]); } public Individual[] executeAX(RealVector i0, RealVector i1) { //get genome values final double[] v0 = i0.getGenome(); final double[] v1 = i1.getGenome(); //calculate new genes for (int i = 0; i < v0.length; i++) { //get distance double distance = v1[i] - v0[i]; //get distribution double laplace = RandomVariable.laplace(random, 0, distance*EXPAND); //Crossover individuals v0[i] = v0[i]+laplace*i0.getNumberOfCopies(); v1[i] = v1[i]+laplace*i1.getNumberOfCopies(); } //set gene values - Nomarlize values outside of boundaries i0.setDoubleValues(v0); i1.setDoubleValues(v1); //return descendants return new RealVector[]{i0, i1}; } /////////////////////////////////////////////////////////////////////////// @Override public String getInformation() { StringBuilder buf = new StringBuilder(); buf.append(toString()); buf.append("\nLaplace Crossover "); buf.append("\nParameters <PROBABILITY><EXPANSION>"); buf.append("\n<PROBABILITY> to perform crossover"); buf.append("\n<EXPANSION> expansion factor"); return buf.toString(); } @Override public String getParameters() { return pCrossover + " " + EXPAND; } //---------------------------------------------------------------------------------------------------------- /** * update parameters od the operator * * @param params parameters separated by spaces * @throws RuntimeException not good values to parameters */ @Override public void setParameters(String params) throws RuntimeException { //update parameters by string values //split string by withe chars String[] aParams = params.split("\\s+"); try { pCrossover = Double.parseDouble(aParams[0]); } catch (Exception e) { } try { EXPAND = Double.valueOf(aParams[1]); } catch (Exception e) { } }//---------------------------------------------------------------------------------------------------------- /** * Generate a random number from a uniform random variable. * * @param min min of the random variable. * @param max max of the random variable. * @return a double. */ public double uniform(double min, double max) { if (min > max) { return max + (min - max) * random.nextDouble(); } return min + (max - min) * random.nextDouble(); } //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: private static final long serialVersionUID = 201905151223L; //::::::::::::::::::::::::::: Copyright(c) M@nso 2019 ::::::::::::::::::: }
[ "manso@ipt.pt" ]
manso@ipt.pt
2e4c7a6d179b02aa9221f07fc2e5058ad74c4a6d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_6eab228022b7d62f9b8368a9b20b4d18217b0139/FoursquareCheckinActivity/2_6eab228022b7d62f9b8368a9b20b4d18217b0139_FoursquareCheckinActivity_t.java
95e18b2e661078a790af544e8b34898002cbab79
[]
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,404
java
package com.seawolfsanctuary.tmt; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import android.app.ListActivity; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.Environment; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; public class FoursquareCheckinActivity extends ListActivity { private static final String dataDirectoryPath = Environment .getExternalStorageDirectory().toString() + "/Android/data/com.seawolfsanctuary.tmt"; private static final String dataFilePath = Environment .getExternalStorageDirectory().toString() + "/Android/data/com.seawolfsanctuary.tmt/routes.csv"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ArrayList<String> venues = new ArrayList<String>(); venues.add("Here"); venues.add("There"); venues.add("Everywhere"); venues.add("Nowhere"); setContentView(R.layout.foursquare_checkin_activity); setListAdapter(new ArrayAdapter<String>(this, R.layout.foursquare_checkin_venue, venues)); ListView lv = getListView(); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Toast.makeText( getApplicationContext(), "You've selected #" + (position + 1) + ": " + ((TextView) view).getText(), Toast.LENGTH_SHORT).show(); } }); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7097b658f92ce21849dbdd2b262253809005d097
4aae34d37572688d34c224e6b812ef4a3b633b55
/LTISystem/ofx/com/lti/service/impl/CUSIPManagerImpl.java
35ed9a5a98e4490caf298052e1d7283a10717598
[]
no_license
cpedia/xjany-jee-1
9300eabfc263e1f3a4346fccdceaed5c3b606f6d
2a9791b248c4f58c8113dbff2d32b8023244a0ec
refs/heads/master
2016-08-11T14:58:30.434979
2013-04-11T03:22:40
2013-04-11T03:22:40
55,684,098
0
1
null
null
null
null
UTF-8
Java
false
false
2,185
java
package com.lti.service.impl; import java.util.List; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import com.lti.service.CUSIPManager; import com.lti.service.bo.CUSIP; public class CUSIPManagerImpl extends DAOManagerImpl implements CUSIPManager { private static final long serialVersionUID = 1L; @Override public void deleteByHQL(String string) { super.deleteByHQL(string); } @Override public CUSIP get(long id) { return (CUSIP) getHibernateTemplate().get(CUSIP.class, id); } @Override public void remove(long id) { Object obj = getHibernateTemplate().get(CUSIP.class, id); getHibernateTemplate().delete(obj); } @Override public long save(CUSIP c) { getHibernateTemplate().save(c); return c.getID(); } @Override public void saveOrUpdate(CUSIP c) { getHibernateTemplate().saveOrUpdate(c); } @Override public void update(CUSIP c) { getHibernateTemplate().update(c); } @Override public CUSIP getByCUSIP(String cusip) { DetachedCriteria detachedCriteria = DetachedCriteria.forClass(CUSIP.class); detachedCriteria.add(Restrictions.eq("CUSIP", cusip)); List<CUSIP> cs=super.findByCriteria(detachedCriteria); if(cs!=null&&cs.size()>0){ return cs.get(0); } return null; } @Override public CUSIP getBySymbol(String symbol) { DetachedCriteria detachedCriteria = DetachedCriteria.forClass(CUSIP.class); detachedCriteria.add(Restrictions.eq("Symbol", symbol)); List<CUSIP> cs=super.findByCriteria(detachedCriteria); if(cs!=null&&cs.size()>0){ return cs.get(0); } return null; } @Override public String getCUSIP(String symbol) { CUSIP c=getBySymbol(symbol); if(c!=null)return c.getCUSIP(); else return null; } @Override public String getSymbol(String cusip) { CUSIP c=getByCUSIP(cusip); if(c!=null)return c.getSymbol(); else return null; } @Override public List<CUSIP> getCUSIPs() { DetachedCriteria detachedCriteria = DetachedCriteria.forClass(CUSIP.class); List<CUSIP> cs=super.findByCriteria(detachedCriteria); return cs; } }
[ "xjany.p@gmail.com" ]
xjany.p@gmail.com
3ce53737c5f2c09e28163b1a359e210e347dd329
3ea909c09c9516d5f8eaa6f649ebab7179d8b645
/groovy-level-2/src/com/mycom/BooleanJava.java
09a11fae1fd4fc235324a82f6fab86ac049f63ac
[]
no_license
GreenwaysTechnology/Groovy-MicroGenesis
79e955bf29e038bc4af7081cd13b9959d96d52b1
becba278b32d79d0b2c9ca735276a336525111d4
refs/heads/main
2023-02-08T04:36:21.073995
2020-12-30T11:45:38
2020-12-30T11:45:38
322,599,434
0
0
null
null
null
null
UTF-8
Java
false
false
829
java
package com.mycom; public class BooleanJava { public static void main(String[] args) { boolean isActive = true; boolean isEnabled = false; //booleans inside if to check condition whether is true or not if (isActive) { System.out.println("Active"); } else { System.out.println("InActive"); } if (isEnabled) { System.out.println("Enabled"); } else { System.out.println("Disabled"); } //Result of some relational and conditional operators int a = 108; if (a > 100) { System.out.println("A is greater than 100"); } else { System.out.println("A is not greater than 100"); } // int start = 0; // if(start){ // // } } }
[ "sasubramanian_md@hotmail.com" ]
sasubramanian_md@hotmail.com
88745f14bd78395a097cc660f8b8a9f71f53d4a5
1f04812ff8c19a3313cd64565bdb7af1f591b1f5
/src/main/java/td/news/repository/DboNewsCategory.java
0145564f85f194de3c5903bb7742f7df564d9484
[]
no_license
Acer611/news
c67aae89251f7f79327ecfce145263d6a3f30b69
aa64db04cd7af2927af009dbadb8cbb68d8f27c8
refs/heads/master
2020-05-23T13:25:53.417866
2019-05-18T03:33:21
2019-05-18T03:33:21
186,776,300
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package td.news.repository; import lombok.Data; /** * @author sanlion do */ @Data public class DboNewsCategory { private String code; private String name; private String AppCode; private String AppType; }
[ "y_gaofei@163.com" ]
y_gaofei@163.com
66f07b17bde11f667b2d1ca74c5f29084c18526b
d47e5806106f89d880d036507ee0835a7ed2dbb0
/ktf-db-oracle/src/main/java/com/kivi/framework/persist/mapper/KtfNoticeMapperEx.java
1fdf3da5177a2fafc7c57732e0fe82afbf475eb0
[]
no_license
kivilu/ktf
8b59198d8fb096961c92fe395a7f266b9ed350af
adf55e6a8f9c0b6c1965cbb391a9c189318ee0ca
refs/heads/master
2020-03-19T06:37:06.396632
2019-03-14T09:10:20
2019-03-14T09:10:20
136,039,313
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.kivi.framework.persist.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.kivi.framework.persist.model.KtfNotice; public interface KtfNoticeMapperEx { List<KtfNotice> list( @Param( "condition" ) String condition ); }
[ "michael_0877@163.com" ]
michael_0877@163.com
7a19ae62abc6858dcd0aabca1ae0f211b4c9c28a
c75e6df08eb4065ab80fcc1dcc1cb38ac1256f72
/web/plugins/com.seekon.nextbi.mondrian/src/main/mondrian/olap/fun/LastPeriodsFunDef.java
494f4d87d328d5c68f964eadef5239bb259afebd
[]
no_license
jerome-nexedi/nextbi
7b219c1ec64b21bebf4ccf77c730e15a8ad1c6de
0179b30bf6a86ae6a070434a3161d7935f166b42
refs/heads/master
2021-01-10T09:06:15.838199
2012-11-14T11:59:53
2012-11-14T11:59:53
36,644,370
0
0
null
null
null
null
UTF-8
Java
false
false
4,772
java
/* // $Id: //open/mondrian/src/main/mondrian/olap/fun/LastPeriodsFunDef.java#12 $ // This software is subject to the terms of the Eclipse Public License v1.0 // Agreement, available at the following URL: // http://www.eclipse.org/legal/epl-v10.html. // Copyright (C) 2006-2011 Julian Hyde // All Rights Reserved. // You must accept the terms of that agreement to use this software. */ package mondrian.olap.fun; import mondrian.calc.*; import mondrian.calc.impl.UnaryTupleList; import mondrian.olap.*; import mondrian.olap.type.Type; import mondrian.olap.type.SetType; import mondrian.olap.type.MemberType; import mondrian.olap.type.TypeUtil; import mondrian.calc.impl.AbstractListCalc; import mondrian.mdx.ResolvedFunCall; import mondrian.rolap.RolapCube; import mondrian.rolap.RolapHierarchy; import java.util.List; import java.util.Collections; import java.util.ArrayList; /** * Definition of the <code>LastPeriods</code> MDX function. * * @author jhyde * @version $Id: * //open/mondrian/src/main/mondrian/olap/fun/LastPeriodsFunDef.java#12 * $ * @since Mar 23, 2006 */ class LastPeriodsFunDef extends FunDefBase { static final ReflectiveMultiResolver Resolver = new ReflectiveMultiResolver( "LastPeriods", "LastPeriods(<Index> [, <Member>])", "Returns a set of members prior to and including a specified member.", new String[] { "fxn", "fxnm" }, LastPeriodsFunDef.class); public LastPeriodsFunDef(FunDef dummyFunDef) { super(dummyFunDef); } public Type getResultType(Validator validator, Exp[] args) { if (args.length == 1) { // If Member is not specified, // it is Time.CurrentMember. RolapHierarchy defaultTimeHierarchy = ((RolapCube) validator.getQuery() .getCube()).getTimeHierarchy(getName()); return new SetType(MemberType.forHierarchy(defaultTimeHierarchy)); } else { Type type = args[1].getType(); Type memberType = TypeUtil.toMemberOrTupleType(type); return new SetType(memberType); } } public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) { // Member defaults to [Time].currentmember Exp[] args = call.getArgs(); final MemberCalc memberCalc; if (args.length == 1) { final RolapHierarchy timeHierarchy = ((RolapCube) compiler.getEvaluator() .getCube()).getTimeHierarchy(getName()); memberCalc = new HierarchyCurrentMemberFunDef.FixedCalcImpl(call, timeHierarchy); } else { memberCalc = compiler.compileMember(args[1]); } // Numeric Expression. final IntegerCalc indexValueCalc = compiler.compileInteger(args[0]); return new AbstractListCalc(call, new Calc[] { memberCalc, indexValueCalc }) { public TupleList evaluateList(Evaluator evaluator) { Member member = memberCalc.evaluateMember(evaluator); int indexValue = indexValueCalc.evaluateInteger(evaluator); return new UnaryTupleList(lastPeriods(member, evaluator, indexValue)); } }; } /** * If Index is positive, returns the set of Index members ending with Member * and starting with the member lagging Index - 1 from Member. * * <p> * If Index is negative, returns the set of (- Index) members starting with * Member and ending with the member leading (- Index - 1) from Member. * * <p> * If Index is zero, the empty set is returned. */ List<Member> lastPeriods(Member member, Evaluator evaluator, int indexValue) { // empty set if ((indexValue == 0) || member.isNull()) { return Collections.emptyList(); } List<Member> list = new ArrayList<Member>(); // set with just member if ((indexValue == 1) || (indexValue == -1)) { list.add(member); return list; } // When null is found, getting the first/last // member at a given level is not particularly // fast. Member startMember; Member endMember; if (indexValue > 0) { startMember = evaluator.getSchemaReader().getLeadMember(member, -(indexValue - 1)); endMember = member; if (startMember.isNull()) { List<Member> members = evaluator.getSchemaReader().getLevelMembers( member.getLevel(), false); startMember = members.get(0); } } else { startMember = member; endMember = evaluator.getSchemaReader().getLeadMember(member, -(indexValue + 1)); if (endMember.isNull()) { List<Member> members = evaluator.getSchemaReader().getLevelMembers( member.getLevel(), false); endMember = members.get(members.size() - 1); } } evaluator.getSchemaReader().getMemberRange(member.getLevel(), startMember, endMember, list); return list; } } // End LastPeriodsFunDef.java
[ "undyliu@126.com" ]
undyliu@126.com
790278554912f8ef080043e8bb6b333667de6f3e
38801ab66863e9db549c2f3d5e73fb9fac4db3dc
/src/main/java/br/com/swconsultoria/nfe/schema_4/consSitNFe/SignatureType.java
90026f371b7468a786e7e05190798fb03cedc51f
[ "MIT" ]
permissive
tiagoceridorio/Java_NFe
c5050a89301678fe567e0c8b7766ad587040a0f6
bafd4dfb5938509ce3e15cf7aa5aad1d28e46422
refs/heads/master
2022-05-13T14:45:45.627504
2022-05-01T02:25:40
2022-05-01T02:25:40
84,336,574
1
0
MIT
2022-01-23T20:42:20
2017-03-08T15:35:21
Java
UTF-8
Java
false
false
4,110
java
package br.com.swconsultoria.nfe.schema_4.consSitNFe; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Classe Java de SignatureType complex type. * * <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe. * * <pre> * &lt;complexType name="SignatureType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="SignedInfo" type="{http://www.w3.org/2000/09/xmldsig#}SignedInfoType"/> * &lt;element name="SignatureValue" type="{http://www.w3.org/2000/09/xmldsig#}SignatureValueType"/> * &lt;element name="KeyInfo" type="{http://www.w3.org/2000/09/xmldsig#}KeyInfoType"/> * &lt;/sequence> * &lt;attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SignatureType", namespace = "http://www.w3.org/2000/09/xmldsig#", propOrder = { "signedInfo", "signatureValue", "keyInfo" }) public class SignatureType { @XmlElement(name = "SignedInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected SignedInfoType signedInfo; @XmlElement(name = "SignatureValue", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected SignatureValueType signatureValue; @XmlElement(name = "KeyInfo", namespace = "http://www.w3.org/2000/09/xmldsig#", required = true) protected KeyInfoType keyInfo; @XmlAttribute(name = "Id") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String id; /** * Obtém o valor da propriedade signedInfo. * * @return * possible object is * {@link SignedInfoType } * */ public SignedInfoType getSignedInfo() { return signedInfo; } /** * Define o valor da propriedade signedInfo. * * @param value * allowed object is * {@link SignedInfoType } * */ public void setSignedInfo(SignedInfoType value) { this.signedInfo = value; } /** * Obtém o valor da propriedade signatureValue. * * @return * possible object is * {@link SignatureValueType } * */ public SignatureValueType getSignatureValue() { return signatureValue; } /** * Define o valor da propriedade signatureValue. * * @param value * allowed object is * {@link SignatureValueType } * */ public void setSignatureValue(SignatureValueType value) { this.signatureValue = value; } /** * Obtém o valor da propriedade keyInfo. * * @return * possible object is * {@link KeyInfoType } * */ public KeyInfoType getKeyInfo() { return keyInfo; } /** * Define o valor da propriedade keyInfo. * * @param value * allowed object is * {@link KeyInfoType } * */ public void setKeyInfo(KeyInfoType value) { this.keyInfo = value; } /** * Obtém o valor da propriedade id. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Define o valor da propriedade id. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } }
[ "samuk.exe@hotmail.com" ]
samuk.exe@hotmail.com
1e807a8033be13c10af52b9374c1e7cf43f8a35d
61e98b0302a43ab685be4c255b4ecf2979db55b6
/sdks/java/core/src/main/java/org/apache/beam/sdk/util/Serializer.java
166e4e7399af25450256471f6492a6bf3b36fb57
[ "BSD-3-Clause", "EPL-2.0", "CDDL-1.0", "Apache-2.0", "WTFPL", "GPL-2.0-only", "BSD-2-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "CDDL-1.1", "Classpath-exception-2.0" ]
permissive
dzenyu/kafka
5631c05a6de6e288baeb8955bdddf2ff60ec2a0e
d69a24bce8d108f43376271f89ecc3b81c7b6622
refs/heads/master
2021-07-16T12:31:09.623509
2021-06-28T18:22:16
2021-06-28T18:22:16
198,724,535
0
0
Apache-2.0
2019-07-24T23:51:47
2019-07-24T23:51:46
null
UTF-8
Java
false
false
6,019
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.beam.sdk.util; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Nullable; /** * Utility for converting objects between Java and Cloud representations. * * @deprecated replaced by {@code org.apache.beam.runners.dataflow.util.Serializer} */ @Deprecated public final class Serializer { // Delay initialization of statics until the first call to Serializer. private static class SingletonHelper { static final ObjectMapper OBJECT_MAPPER = createObjectMapper(); static final ObjectMapper TREE_MAPPER = createTreeMapper(); /** * Creates the object mapper that will be used for serializing Google API * client maps into Jackson trees. */ private static ObjectMapper createTreeMapper() { return new ObjectMapper(); } /** * Creates the object mapper that will be used for deserializing Jackson * trees into objects. */ private static ObjectMapper createObjectMapper() { ObjectMapper m = new ObjectMapper(); // Ignore properties that are not used by the object. m.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); // For parameters of type Object, use the @type property to determine the // class to instantiate. // // TODO: It would be ideal to do this for all non-final classes. The // problem with using DefaultTyping.NON_FINAL is that it insists on having // type information in the JSON for classes with useful default // implementations, such as List. Ideally, we'd combine these defaults // with available type information if that information's present. m.enableDefaultTypingAsProperty( ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT, PropertyNames.OBJECT_TYPE_NAME); m.registerModule(new CoderUtils.Jackson2Module()); return m; } } /** * Deserializes an object from a Dataflow structured encoding (represented in * Java as a map). * * <p>The standard Dataflow SDK object serialization protocol is based on JSON. * Data is typically encoded as a JSON object whose fields represent the * object's data. * * <p>The actual deserialization is performed by Jackson, which can deserialize * public fields, use JavaBean setters, or use injection annotations to * indicate how to construct the object. The {@link ObjectMapper} used is * configured to use the "@type" field as the name of the class to instantiate * (supporting polymorphic types), and may be further configured by * annotations or via {@link ObjectMapper#registerModule}. * * @see <a href="http://wiki.fasterxml.com/JacksonFAQ#Data_Binding.2C_general"> * Jackson Data-Binding</a> * @see <a href="https://github.com/FasterXML/jackson-annotations/wiki/Jackson-Annotations"> * Jackson-Annotations</a> * @param serialized the object in untyped decoded form (i.e. a nested {@link Map}) * @param clazz the expected object class */ public static <T> T deserialize(Map<String, Object> serialized, Class<T> clazz) { try { return SingletonHelper.OBJECT_MAPPER.treeToValue( SingletonHelper.TREE_MAPPER.valueToTree( deserializeCloudKnownTypes(serialized)), clazz); } catch (JsonProcessingException e) { throw new RuntimeException( "Unable to deserialize class " + clazz, e); } } /** * Recursively walks the supplied map, looking for well-known cloud type * information (keyed as {@link PropertyNames#OBJECT_TYPE_NAME}, matching a * URI value from the {@link CloudKnownType} enum. Upon finding this type * information, it converts it into the correspondingly typed Java value. */ @SuppressWarnings("unchecked") private static Object deserializeCloudKnownTypes(Object src) { if (src instanceof Map) { Map<String, Object> srcMap = (Map<String, Object>) src; @Nullable Object value = srcMap.get(PropertyNames.SCALAR_FIELD_NAME); @Nullable CloudKnownType type = CloudKnownType.forUri((String) srcMap.get(PropertyNames.OBJECT_TYPE_NAME)); if (type != null && value != null) { // It's a value of a well-known cloud type; let the known type handler // handle the translation. Object result = type.parse(value, type.defaultClass()); return result; } // Otherwise, it's just an ordinary map. Map<String, Object> dest = new HashMap<>(srcMap.size()); for (Map.Entry<String, Object> entry : srcMap.entrySet()) { dest.put(entry.getKey(), deserializeCloudKnownTypes(entry.getValue())); } return dest; } if (src instanceof List) { List<Object> srcList = (List<Object>) src; List<Object> dest = new ArrayList<>(srcList.size()); for (Object obj : srcList) { dest.add(deserializeCloudKnownTypes(obj)); } return dest; } // Neither a Map nor a List; no translation needed. return src; } }
[ "alex.barreto@databricks.com" ]
alex.barreto@databricks.com
0036a358779093331fa1f27bc655c3f914940063
dbab8c3a7720bc5a7466c22d01e248afd63842da
/src/main/java/net/imagej/axis/Axes.java
2442d4bfbd6bc9f80483d26285699729960e62c7
[ "BSD-2-Clause" ]
permissive
tibuch/imagej-common
f537070c2fb78201be59d7e4bbfd0d89f26f92c6
a978bf840af30bd60b7ce6e17b4c4c6946684d8d
refs/heads/master
2021-01-21T01:27:19.750989
2016-06-09T21:04:33
2016-06-09T21:04:33
61,287,173
0
0
null
2016-06-16T11:23:57
2016-06-16T11:23:57
null
UTF-8
Java
false
false
4,751
java
/* * #%L * ImageJ software for multidimensional image processing and analysis. * %% * Copyright (C) 2009 - 2015 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package net.imagej.axis; import java.util.HashMap; /** * An extensible enumeration of dimensional {@link AxisType}s. Provides a core * set ({@link #X}, {@link #Y}, {@link #Z}, {@link #TIME} and {@link #CHANNEL}) * of axis types. The {@link #get} methods can be used to create new, custom * axis types which will be cached for future use. * * @author Curtis Rueden * @author Mark Hiner */ public final class Axes { // -- Constants -- /** Label for unknown axis types, which are returned by {@link #unknown()}. */ public static final String UNKNOWN_LABEL = "Unknown"; // -- Fields -- /** * Table of existing AxisTypes */ private static HashMap<String, AxisType> axes = new HashMap<String, AxisType>(); // -- Constructor to prevent instantiation -- private Axes() {} // -- Core axes constants -- /** * Identifies the <i>X</i> dimensional type, representing a dimension in the * first (X) spatial dimension. */ public static final AxisType X = get("X", true); /** * Identifies the <i>Y</i> dimensional type, representing a dimension in the * second (Y) spatial dimension. */ public static final AxisType Y = get("Y", true); /** * Identifies the <i>Z</i> dimensional type, representing a dimension in the * third (Z) spatial dimension. */ public static final AxisType Z = get("Z", true); /** * Identifies the <i>Time</i> dimensional type, representing a dimension * consisting of time points. */ public static final AxisType TIME = get("Time"); /** * Identifies the <i>Channel</i> dimensional type, representing a generic * channel dimension. */ public static final AxisType CHANNEL = get("Channel"); // -- Static utility methods -- /** * Accessor for an AxisType of the given label. Creates and caches the * AxisType as a non-spatial axis if it does not already exist. */ public static AxisType get(final String label) { return get(label, false); } /** * Accessor for an AxisType of the given label. Creates and caches the * AxisType with the given label and spatial flag if it does not already * exist. */ public static AxisType get(final String label, final boolean spatial) { if (UNKNOWN_LABEL.equals(label)) return unknown(); AxisType axis = axes.get(label); // if the axis is null, create it if (axis == null) { // synchronized to ensure the axis is only created once synchronized (axes) { // see if another thread already created our axis axis = axes.get(label); // if not, create and store it if (axis == null) { axis = new DefaultAxisType(label, spatial); axes.put(label, axis); } } } return axis; } /** * @return an array of {@code AxisType}s corresponding to all currently * defined axes. */ public static AxisType[] knownTypes() { return axes.values().toArray(new AxisType[0]); } /** * Gets an "unknown" axis type. * <p> * Always returns a new object, which is not part of the extended enumeration. * In this way, two unknown axis types are never equal. * </p> */ public static AxisType unknown() { return new DefaultAxisType(UNKNOWN_LABEL); } }
[ "ctrueden@wisc.edu" ]
ctrueden@wisc.edu
c344d7802cc500b71a4ea46687b4aaaa4d87d8a0
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/refactoring/anonymousToInner/typeParameterNotMentioned_after.java
f559e5be34777a554bfa1087d3eb231297e2543b
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
364
java
public class LocalClass { <T> void test(T t) { Runnable r = new MyClass<>(t); r.run(); } private static class MyClass<T> implements Runnable { private final T t; public MyClass(T t) { this.t = t; } @Override public void run() { System.out.println(t); } } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
a6f3c69659b5a9349a9b92ed838462c8334ed9c3
7eeb9c9d1b26c814523dcf56ba8f7c8c4163cf38
/siden-core/src/test/java/ninja/siden/internal/SecurityHandlerTest.java
d27008c0f869f1ffa14a828f3bdf925adb2852ba
[ "Apache-2.0" ]
permissive
no-glue/siden
356260e1a86bbace1b93e7fa15e52c23f1578772
0399bf40cc398daa0b7fda8240683e4fbb7a300f
refs/heads/master
2021-01-15T09:28:18.042796
2015-02-13T05:04:10
2015-02-13T05:04:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,871
java
/* * Copyright 2014 SATO taichi * * 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 ninja.siden.internal; import static org.junit.Assert.assertNotNull; import io.undertow.server.HttpHandler; import io.undertow.server.HttpServerExchange; import io.undertow.util.HttpString; import mockit.integration.junit4.JMockit; import ninja.siden.Config; import ninja.siden.SecurityHeaders; import ninja.siden.util.Loggers; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; /** * @author taichi */ @RunWith(JMockit.class) public class SecurityHandlerTest { @BeforeClass public static void beforeClass() throws Exception { Loggers.setFinest(SecurityHandler.LOG); } HttpServerExchange exchange; HttpHandler target; @Before public void setUp() { this.exchange = new HttpServerExchange(null); this.exchange.putAttachment(Core.CONFIG, Config.defaults().getMap()); this.target = new SecurityHandler(Testing.mustCall()); } void assertHeader(HttpString name) { assertNotNull(this.exchange.getResponseHeaders().get(name)); } @Test public void testHeaders() throws Exception { this.target.handleRequest(this.exchange); assertHeader(SecurityHeaders.FRAME_OPTIONS); assertHeader(SecurityHeaders.XSS_PROTECTION); assertHeader(SecurityHeaders.CONTENT_TYPE_OPTIONS); } }
[ "ryushi@gmail.com" ]
ryushi@gmail.com
dcc760694d140f7eb837bd93e7fe64009dcecee4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/6/org/apache/commons/math3/linear/AbstractRealMatrix_setRowMatrix_448.java
49dffc2f4fe340311beeabe8aa4224b10efbb567
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,729
java
org apach common math3 linear basic implement real matrix realmatrix method underli storag method implement link entri getentri access matrix element deriv provid faster implement version abstract real matrix abstractrealmatrix inherit doc inheritdoc set row matrix setrowmatrix row real matrix realmatrix matrix rang except outofrangeexcept matrix dimens mismatch except matrixdimensionmismatchexcept matrix util matrixutil check row index checkrowindex row col ncol column dimens getcolumndimens matrix row dimens getrowdimens matrix column dimens getcolumndimens col ncol matrix dimens mismatch except matrixdimensionmismatchexcept matrix row dimens getrowdimens matrix column dimens getcolumndimens col ncol col ncol set entri setentri row matrix entri getentri
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
f6849c736920222f8bf3223c3d451f89e13e8da8
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/22382181.java
26b0e094a76d7cea271b1a3a2468ea7602083fe6
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,584
java
import java.io.UncheckedIOException; import java.io.UncheckedIOException; class c22382181 { public MyHelperClass register(File o0){ return null; } public MyHelperClass delete(File o0){ return null; } public boolean copy(File src, File dest, byte[] b) { if ((boolean)(Object)src.isDirectory()) { String[] ss =(String[])(Object) src.list(); for (int i = 0; i < ss.length; i++) if (!copy(new File(src, ss[i]), new File(dest, ss[i]), b)) return false; return true; } delete(dest); dest.getParentFile().mkdirs(); try { FileInputStream fis = new FileInputStream(src); try { FileOutputStream fos = new FileOutputStream(dest); try { int read; while ((read =(int)(Object) fis.read(b)) != -1) fos.write(b, 0, read); } finally { try { fos.close(); } catch (UncheckedIOException ignore) { } register(dest); } } finally { fis.close(); } MyHelperClass log = new MyHelperClass(); if ((boolean)(Object)log.isDebugEnabled()) log.debug("Success: M-COPY " + src + " -> " + dest); return true; } catch (UncheckedIOException e) { MyHelperClass log = new MyHelperClass(); log.error("Failed: M-COPY " + src + " -> " + dest,(IOException)(Object) e); return false; } } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass isDebugEnabled(){ return null; } public MyHelperClass mkdirs(){ return null; } public MyHelperClass debug(String o0){ return null; } public MyHelperClass error(String o0, IOException o1){ return null; }} class File { File(){} File(File o0, String o1){} public MyHelperClass list(){ return null; } public MyHelperClass getParentFile(){ return null; } public MyHelperClass isDirectory(){ return null; }} class FileInputStream { FileInputStream(File o0){} FileInputStream(){} public MyHelperClass read(byte[] o0){ return null; } public MyHelperClass close(){ return null; }} class FileOutputStream { FileOutputStream(File o0){} FileOutputStream(){} public MyHelperClass write(byte[] o0, int o1, int o2){ return null; } public MyHelperClass close(){ return null; }} class IOException extends Exception{ public IOException(String errorMessage) { super(errorMessage); } }
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
2a6de67451443800713a7cdf1eda6868ccfb0fe5
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/iss/v20230517/models/PlayRecordRequest.java
b588fb152569d745fba2c75d832dfd053a8ddfde
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
5,676
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.iss.v20230517.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class PlayRecordRequest extends AbstractModel{ /** * 通道 ID(从查询通道DescribeDeviceChannel接口中获取) */ @SerializedName("ChannelId") @Expose private String ChannelId; /** * 起始时间 */ @SerializedName("Start") @Expose private Long Start; /** * 结束时间 */ @SerializedName("End") @Expose private Long End; /** * 流类型(1:主码流;2:子码流(不可以和 Resolution 同时下发)) */ @SerializedName("StreamType") @Expose private Long StreamType; /** * 分辨率(1:QCIF;2:CIF; 3:4CIF; 4:D1; 5:720P; 6:1080P/I; 自定义的19201080等等(需设备支持)(不可以和 StreamType 同时下发)) */ @SerializedName("Resolution") @Expose private String Resolution; /** * Get 通道 ID(从查询通道DescribeDeviceChannel接口中获取) * @return ChannelId 通道 ID(从查询通道DescribeDeviceChannel接口中获取) */ public String getChannelId() { return this.ChannelId; } /** * Set 通道 ID(从查询通道DescribeDeviceChannel接口中获取) * @param ChannelId 通道 ID(从查询通道DescribeDeviceChannel接口中获取) */ public void setChannelId(String ChannelId) { this.ChannelId = ChannelId; } /** * Get 起始时间 * @return Start 起始时间 */ public Long getStart() { return this.Start; } /** * Set 起始时间 * @param Start 起始时间 */ public void setStart(Long Start) { this.Start = Start; } /** * Get 结束时间 * @return End 结束时间 */ public Long getEnd() { return this.End; } /** * Set 结束时间 * @param End 结束时间 */ public void setEnd(Long End) { this.End = End; } /** * Get 流类型(1:主码流;2:子码流(不可以和 Resolution 同时下发)) * @return StreamType 流类型(1:主码流;2:子码流(不可以和 Resolution 同时下发)) */ public Long getStreamType() { return this.StreamType; } /** * Set 流类型(1:主码流;2:子码流(不可以和 Resolution 同时下发)) * @param StreamType 流类型(1:主码流;2:子码流(不可以和 Resolution 同时下发)) */ public void setStreamType(Long StreamType) { this.StreamType = StreamType; } /** * Get 分辨率(1:QCIF;2:CIF; 3:4CIF; 4:D1; 5:720P; 6:1080P/I; 自定义的19201080等等(需设备支持)(不可以和 StreamType 同时下发)) * @return Resolution 分辨率(1:QCIF;2:CIF; 3:4CIF; 4:D1; 5:720P; 6:1080P/I; 自定义的19201080等等(需设备支持)(不可以和 StreamType 同时下发)) */ public String getResolution() { return this.Resolution; } /** * Set 分辨率(1:QCIF;2:CIF; 3:4CIF; 4:D1; 5:720P; 6:1080P/I; 自定义的19201080等等(需设备支持)(不可以和 StreamType 同时下发)) * @param Resolution 分辨率(1:QCIF;2:CIF; 3:4CIF; 4:D1; 5:720P; 6:1080P/I; 自定义的19201080等等(需设备支持)(不可以和 StreamType 同时下发)) */ public void setResolution(String Resolution) { this.Resolution = Resolution; } public PlayRecordRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public PlayRecordRequest(PlayRecordRequest source) { if (source.ChannelId != null) { this.ChannelId = new String(source.ChannelId); } if (source.Start != null) { this.Start = new Long(source.Start); } if (source.End != null) { this.End = new Long(source.End); } if (source.StreamType != null) { this.StreamType = new Long(source.StreamType); } if (source.Resolution != null) { this.Resolution = new String(source.Resolution); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "ChannelId", this.ChannelId); this.setParamSimple(map, prefix + "Start", this.Start); this.setParamSimple(map, prefix + "End", this.End); this.setParamSimple(map, prefix + "StreamType", this.StreamType); this.setParamSimple(map, prefix + "Resolution", this.Resolution); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
20cf920ac3f6b003fa132f9985ac97d82b245073
fca9096ae40e7b3311358e4ee92cc512f6811e71
/src/com/cw/wizbank/credit/db/CreditsTypeDB.java
67a593ddeacfec282e66d1c0a5e2c58057d815bf
[]
no_license
Conanjun/HK_CPDT
0c3d1c00d8c3c02b5493cb3168e84e0693633d12
0cb797aff03fd4e8c24458c8f78d71a19c788829
refs/heads/master
2022-12-27T16:45:37.746697
2019-06-17T14:21:16
2019-06-17T14:21:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,978
java
/** * */ package com.cw.wizbank.credit.db; import java.sql.Timestamp; /** * @author DeanChen * */ public class CreditsTypeDB { private int cty_id; private String cty_code; private String cty_title; private boolean cty_deduction_ind; private boolean cty_manual_ind; private boolean cty_deleted_ind; private boolean cty_relation_total_ind; private String cty_relation_type; private boolean cty_default_credits_ind; private float cty_default_credits; private String cty_create_usr_id; private Timestamp cty_create_timestamp; private String cty_update_usr_id; private Timestamp cty_update_timestamp; private int cty_hit; private String cty_period; private long cty_tcr_id; public long getCty_tcr_id() { return cty_tcr_id; } public void setCty_tcr_id(long ctyTcrId) { cty_tcr_id = ctyTcrId; } public int getCty_id() { return cty_id; } public void setCty_id(int cty_id) { this.cty_id = cty_id; } public String getCty_code() { return cty_code; } public void setCty_code(String cty_code) { this.cty_code = cty_code; } public String getCty_title() { return cty_title; } public void setCty_title(String cty_title) { this.cty_title = cty_title; } public boolean isCty_deduction_ind() { return cty_deduction_ind; } public void setCty_deduction_ind(boolean cty_deduction_ind) { this.cty_deduction_ind = cty_deduction_ind; } public boolean isCty_manual_ind() { return cty_manual_ind; } public void setCty_manual_ind(boolean cty_manual_ind) { this.cty_manual_ind = cty_manual_ind; } public boolean isCty_deleted_ind() { return cty_deleted_ind; } public void setCty_deleted_ind(boolean cty_deleted_ind) { this.cty_deleted_ind = cty_deleted_ind; } public boolean isCty_relation_total_ind() { return cty_relation_total_ind; } public void setCty_relation_total_ind(boolean cty_relation_total_ind) { this.cty_relation_total_ind = cty_relation_total_ind; } public String getCty_relation_type() { return cty_relation_type; } public void setCty_relation_type(String cty_relation_type) { this.cty_relation_type = cty_relation_type; } public boolean isCty_default_credits_ind() { return cty_default_credits_ind; } public void setCty_default_credits_ind(boolean cty_default_credits_ind) { this.cty_default_credits_ind = cty_default_credits_ind; } public Float getCty_default_credits() { return cty_default_credits; } public void setCty_default_credits(float cty_default_credits) { this.cty_default_credits = cty_default_credits; } public String getCty_create_usr_id() { return cty_create_usr_id; } public void setCty_create_usr_id(String cty_create_usr_id) { this.cty_create_usr_id = cty_create_usr_id; } public Timestamp getCty_create_timestamp() { return cty_create_timestamp; } public void setCty_create_timestamp(Timestamp cty_create_timestamp) { this.cty_create_timestamp = cty_create_timestamp; } public String getCty_update_usr_id() { return cty_update_usr_id; } public void setCty_update_usr_id(String cty_update_usr_id) { this.cty_update_usr_id = cty_update_usr_id; } public Timestamp getCty_update_timestamp() { return cty_update_timestamp; } public void setCty_update_timestamp(Timestamp cty_update_timestamp) { this.cty_update_timestamp = cty_update_timestamp; } public int getCty_hit() { return cty_hit; } public void setCty_hit(int cty_hit) { this.cty_hit = cty_hit; } public String getCty_period() { return cty_period; } public void setCty_period(String cty_period) { this.cty_period = cty_period; } }
[ "13450871516@163.com" ]
13450871516@163.com
70853dcb1fbdf6a9b5e6f8f70f962251d8e74190
129f58086770fc74c171e9c1edfd63b4257210f3
/src/testcases/CWE80_XSS/CWE80_XSS__Servlet_PropertiesFile_14.java
ee66dc79bcf356d4e29bda4de45852532662c4ea
[]
no_license
glopezGitHub/Android23
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
refs/heads/master
2023-03-07T15:14:59.447795
2023-02-06T13:59:49
2023-02-06T13:59:49
6,856,387
0
3
null
2023-02-06T18:38:17
2012-11-25T22:04:23
Java
UTF-8
Java
false
false
6,530
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE80_XSS__Servlet_PropertiesFile_14.java Label Definition File: CWE80_XSS__Servlet.label.xml Template File: sources-sink-14.tmpl.java */ /* * @description * CWE: 80 Cross Site Scripting (XSS) * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * BadSink: Display of data in web page without any encoding or validation * Flow Variant: 14 Control flow: if(IO.static_five==5) and if(IO.static_five!=5) * * */ package testcases.CWE80_XSS; import testcasesupport.*; import javax.servlet.http.*; import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; public class CWE80_XSS__Servlet_PropertiesFile_14 extends AbstractTestCaseServlet { /* uses badsource and badsink */ public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_five==5) { data = ""; /* Initialize data */ /* retrieve the property */ Properties props = new Properties(); FileInputStream finstr = null; try { finstr = new FileInputStream("../common/config.properties"); props.load(finstr); /* POTENTIAL FLAW: Read data from a .properties file */ data = props.getProperty("data"); } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error with stream reading", ioe); } finally { /* Close stream reading object */ try { if( finstr != null ) { finstr.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe); } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ /* FIX: Use a hardcoded string */ data = "foo"; } if (data != null) { /* POTENTIAL FLAW: Display of data in web page without any encoding or validation */ response.getWriter().println("<br>bad(): data = " + data); } } /* goodG2B1() - use goodsource and badsink by changing IO.static_five==5 to IO.static_five!=5 */ private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_five!=5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ data = ""; /* Initialize data */ /* retrieve the property */ Properties props = new Properties(); FileInputStream finstr = null; try { finstr = new FileInputStream("../common/config.properties"); props.load(finstr); /* POTENTIAL FLAW: Read data from a .properties file */ data = props.getProperty("data"); } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error with stream reading", ioe); } finally { /* Close stream reading object */ try { if( finstr != null ) { finstr.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe); } } } else { /* FIX: Use a hardcoded string */ data = "foo"; } if (data != null) { /* POTENTIAL FLAW: Display of data in web page without any encoding or validation */ response.getWriter().println("<br>bad(): data = " + data); } } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable { String data; if(IO.static_five==5) { /* FIX: Use a hardcoded string */ data = "foo"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ data = ""; /* Initialize data */ /* retrieve the property */ Properties props = new Properties(); FileInputStream finstr = null; try { finstr = new FileInputStream("../common/config.properties"); props.load(finstr); /* POTENTIAL FLAW: Read data from a .properties file */ data = props.getProperty("data"); } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error with stream reading", ioe); } finally { /* Close stream reading object */ try { if( finstr != null ) { finstr.close(); } } catch( IOException ioe ) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe); } } } if (data != null) { /* POTENTIAL FLAW: Display of data in web page without any encoding or validation */ response.getWriter().println("<br>bad(): data = " + data); } } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B1(request, response); goodG2B2(request, response); } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "guillermo.pando@gmail.com" ]
guillermo.pando@gmail.com
c313dfd824c8cc0867218be4f6d25b42778f2790
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipseswt_cluster/15930/tar_0.java
042c71f2a8d9d5c4b738d33f2463a57f4dfa7f69
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,286
java
/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.swt.tests.junit; import junit.framework.*; import junit.textui.*; /** * Automated Test Suite for class org.eclipse.swt.graphics.Drawable * * @see org.eclipse.swt.graphics.Drawable */ public class Test_org_eclipse_swt_graphics_Drawable extends SwtTestCase { public Test_org_eclipse_swt_graphics_Drawable(String name) { super(name); } public static void main(String[] args) { TestRunner.run(suite()); } protected void setUp() { } protected void tearDown() { } public void test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData() { warnUnimpl("Test test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData not written"); } public void test_internal_new_GCLorg_eclipse_swt_graphics_GCData() { warnUnimpl("Test test_internal_new_GCLorg_eclipse_swt_graphics_GCData not written"); } public static Test suite() { TestSuite suite = new TestSuite(); java.util.Vector methodNames = methodNames(); java.util.Enumeration e = methodNames.elements(); while (e.hasMoreElements()) { suite.addTest(new Test_org_eclipse_swt_graphics_Drawable((String)e.nextElement())); } return suite; } public static java.util.Vector methodNames() { java.util.Vector methodNames = new java.util.Vector(); methodNames.addElement("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData"); methodNames.addElement("test_internal_new_GCLorg_eclipse_swt_graphics_GCData"); return methodNames; } protected void runTest() throws Throwable { if (getName().equals("test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData")) test_internal_dispose_GCILorg_eclipse_swt_graphics_GCData(); else if (getName().equals("test_internal_new_GCLorg_eclipse_swt_graphics_GCData")) test_internal_new_GCLorg_eclipse_swt_graphics_GCData(); } }
[ "375833274@qq.com" ]
375833274@qq.com
37d9c221948ac93b9437f0a2aa2a20482fb89600
c3eb8b44b67df8c33c94d97e3b1680c22c94eb9b
/clients/google-api-services-healthcare/v1alpha2/1.27.0/com/google/api/services/healthcare/v1alpha2/model/FieldMetadata.java
b3ca83b85dd6a4c7cd4ae9b7abbdd4384a2498d9
[ "Apache-2.0" ]
permissive
codyoss/google-api-java-client-services
302df36ca3f9c4403900cbfcc1ad1d953a469a67
d33c40021554169d843f0abd59c63b106eb96827
refs/heads/master
2020-08-03T21:55:28.616546
2019-09-24T16:48:42
2019-09-24T16:48:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,184
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /* * This code was generated by https://github.com/googleapis/google-api-java-client-services/ * Modify at your own risk. */ package com.google.api.services.healthcare.v1alpha2.model; /** * Specifies FHIR paths to match, and how to handle de-identification of matching fields. * * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Cloud Healthcare API. For a detailed explanation see: * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a> * </p> * * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class FieldMetadata extends com.google.api.client.json.GenericJson { /** * Deidentify action for one field. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String action; /** * List of paths to FHIR fields to be redacted. Each path is a period-separated list where each * component is either a field name or FHIR type name, for example: Patient, HumanName. For * "choice" types (those defined in the FHIR spec with the form: field[x]) we use two separate * components. e.g. "deceasedAge.unit" is matched by "Deceased.Age.unit". Supported types are: * AdministrativeGenderCode, Code, Date, DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, * MimeTypeCode, Oid, String, Uri, Uuid, Xhtml. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.util.List<java.lang.String> paths; /** * Deidentify action for one field. * @return value or {@code null} for none */ public java.lang.String getAction() { return action; } /** * Deidentify action for one field. * @param action action or {@code null} for none */ public FieldMetadata setAction(java.lang.String action) { this.action = action; return this; } /** * List of paths to FHIR fields to be redacted. Each path is a period-separated list where each * component is either a field name or FHIR type name, for example: Patient, HumanName. For * "choice" types (those defined in the FHIR spec with the form: field[x]) we use two separate * components. e.g. "deceasedAge.unit" is matched by "Deceased.Age.unit". Supported types are: * AdministrativeGenderCode, Code, Date, DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, * MimeTypeCode, Oid, String, Uri, Uuid, Xhtml. * @return value or {@code null} for none */ public java.util.List<java.lang.String> getPaths() { return paths; } /** * List of paths to FHIR fields to be redacted. Each path is a period-separated list where each * component is either a field name or FHIR type name, for example: Patient, HumanName. For * "choice" types (those defined in the FHIR spec with the form: field[x]) we use two separate * components. e.g. "deceasedAge.unit" is matched by "Deceased.Age.unit". Supported types are: * AdministrativeGenderCode, Code, Date, DateTime, Decimal, HumanName, Id, LanguageCode, Markdown, * MimeTypeCode, Oid, String, Uri, Uuid, Xhtml. * @param paths paths or {@code null} for none */ public FieldMetadata setPaths(java.util.List<java.lang.String> paths) { this.paths = paths; return this; } @Override public FieldMetadata set(String fieldName, Object value) { return (FieldMetadata) super.set(fieldName, value); } @Override public FieldMetadata clone() { return (FieldMetadata) super.clone(); } }
[ "45548808+kolea2@users.noreply.github.com" ]
45548808+kolea2@users.noreply.github.com
ce630f1366bfa5c660606cf429ef900336b336bd
24e470b99ffb690318885facf392b732f4b428c0
/design/src/main/java/parttern/chainofresponsibility/example3/ProjectManager.java
8aefba6db1ae970a41f4a10dce6fe8d822fea023
[]
no_license
siegluo/demo
3fe247ca450c4d1343944317f077fd20f5242fee
4a3eeec89bb5da95e94ed4db72f0812ee66d6dd4
refs/heads/master
2022-07-13T10:51:03.826126
2019-06-20T05:03:45
2019-06-20T05:03:45
142,255,539
76
10
null
2022-06-21T01:04:19
2018-07-25T06:13:10
Java
GB18030
Java
false
false
709
java
package parttern.chainofresponsibility.example3; public class ProjectManager extends Handler{ public String handleFeeRequest(String user, double fee) { String str = ""; //项目经理的权限比较小,只能在500以内 if(fee < 500){ //为了测试,简单点,只同意小李的 if("小李".equals(user)){ str = "项目经理同意"+user+"聚餐费用"+fee+"元的请求"; }else{ //其他人一律不同意 str = "项目经理不同意"+user+"聚餐费用"+fee+"元的请求"; } return str; }else{ //超过500,继续传递给级别更高的人处理 if(this.successor!=null){ return successor.handleFeeRequest(user, fee); } } return str; } }
[ "jie.luo@Ctrip.com" ]
jie.luo@Ctrip.com
c93177825a377391e4fa2611aaa0b9780a729a84
2bc6c7d00c4d419c884aae7d420b7c9e00f2ba08
/services/hrdb/src/com/auto_kknktylcsr/hrdb/package-info.java
396c7f40e8822a9e9786f75ae959cebb02961743
[]
no_license
wavemakerapps/Auto_kkNktyLcSr
eef3ffa86fd0461883e72383a102825899b6eec8
f01e30796f124cce0395502590881deab4ae4766
refs/heads/master
2021-08-14T06:24:48.772117
2017-11-14T20:37:32
2017-11-14T20:37:32
110,741,983
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
/*Copyright (c) 2016-2017 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ @TypeDefs({@TypeDef(name = "DateTime", defaultForType = org.joda.time.LocalDateTime.class, typeClass = com.wavemaker.commons.data.type.WMPersistentLocalDateTime.class)}) package com.auto_kknktylcsr.hrdb; import org.hibernate.annotations.TypeDefs; import org.hibernate.annotations.TypeDef;
[ "appTest1@wavemaker.com" ]
appTest1@wavemaker.com
f76bc1af6d1d28a7a954ea125f03afcadfe2a88e
b5389245f454bd8c78a8124c40fdd98fb6590a57
/java_only_big_connected/module33/src/main/java/module33packageJava0/Foo4.java
5a1a1b05ca094981e274aa9879e797b318d41ded
[]
no_license
jin/android-projects
3bbf2a70fcf9a220df3716b804a97b8c6bf1e6cb
a6d9f050388cb8af84e5eea093f4507038db588a
refs/heads/master
2021-10-09T11:01:51.677994
2018-12-26T23:10:24
2018-12-26T23:10:24
131,518,587
29
1
null
2018-12-26T23:10:25
2018-04-29T18:21:09
Java
UTF-8
Java
false
false
204
java
package module33packageJava0; public class Foo4 { public void foo0() { new module33packageJava0.Foo3().foo2(); } public void foo1() { foo0(); } public void foo2() { foo1(); } }
[ "jingwen@google.com" ]
jingwen@google.com
277bc0dfebdc6328e924105cc9a4883f9d3b6c63
684732efc4909172df38ded729c0972349c58b67
/interfaces/src/main/java/org/jeesl/interfaces/model/io/dms/JeeslDmsViewType.java
80cddb1904f1d879ebb47af0b808bfce57bf31cd
[]
no_license
aht-group/jeesl
2c4683e8c1e9d9e9698d044c6a89a611b8dfe1e7
3f4bfca6cf33f60549cac23f3b90bf1218c9daf9
refs/heads/master
2023-08-13T20:06:38.593666
2023-08-12T06:59:51
2023-08-12T06:59:51
39,823,889
0
9
null
2022-12-13T18:35:24
2015-07-28T09:06:11
Java
UTF-8
Java
false
false
909
java
package org.jeesl.interfaces.model.io.dms; import java.io.Serializable; import org.jeesl.interfaces.model.marker.jpa.EjbPersistable; import org.jeesl.interfaces.model.system.graphic.core.JeeslGraphic; import org.jeesl.interfaces.model.system.graphic.with.EjbWithCodeGraphic; import org.jeesl.interfaces.model.system.locale.JeeslDescription; import org.jeesl.interfaces.model.system.locale.JeeslLang; import org.jeesl.interfaces.model.system.locale.status.JeeslStatusFixedCode; import org.jeesl.interfaces.qualifier.rest.option.DownloadJeeslData; import org.jeesl.interfaces.model.system.locale.status.JeeslStatus; @DownloadJeeslData public interface JeeslDmsViewType <S extends JeeslStatus<L,D,S>, L extends JeeslLang, D extends JeeslDescription, G extends JeeslGraphic<?,?,?>> extends Serializable,EjbPersistable,JeeslStatusFixedCode,EjbWithCodeGraphic<G> { public enum Code{tree} }
[ "t.kisner@web.de" ]
t.kisner@web.de
6a8227b9eab81d60d2e78f88b3d468d48919c8d4
3c2d2c06d85abb9c7a1a84fefe9b72399c201f85
/phloc-css-jdk5/src/main/java/com/phloc/css/propertyvalue/CSSValueMultiValue.java
42fd2f6e5c955e967b7e58e1b3f07ee159bbd5d5
[]
no_license
phlocbg/phloc-css
2240754f778d06fa95be411abf21544ecb0ac768
215a945f4ec585b0d24d65a5f39666fb8a67e124
refs/heads/master
2022-07-16T02:04:41.954879
2019-08-22T23:10:14
2019-08-22T23:10:14
41,243,652
1
0
null
2022-07-01T22:17:57
2015-08-23T09:27:32
Java
UTF-8
Java
false
false
3,486
java
/** * Copyright (C) 2006-2014 phloc systems * http://www.phloc.com * office[at]phloc[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.phloc.css.propertyvalue; import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import javax.annotation.concurrent.Immutable; import com.phloc.commons.ValueEnforcer; import com.phloc.commons.annotations.Nonempty; import com.phloc.commons.annotations.ReturnsMutableCopy; import com.phloc.commons.collections.ContainerHelper; import com.phloc.commons.hash.HashCodeGenerator; import com.phloc.commons.string.ToStringGenerator; import com.phloc.css.ICSSWriterSettings; import com.phloc.css.property.ECSSProperty; import com.phloc.css.property.ICSSProperty; /** * Represents a CSS value that has one property name, but multiple different * values. This is e.g. if the property <code>display</code> is used with the * value <code>inline-block</code> than the result coding should first emit * <code>display:-moz-inline-block;</code> and then * <code>display:inline-block;</code> for FireFox 2.x specific support. * * @author Philip Helger */ @Immutable public class CSSValueMultiValue implements ICSSMultiValue { private final List <CSSValue> m_aValues = new ArrayList <CSSValue> (); public CSSValueMultiValue (@Nonnull final ICSSProperty aProperty, @Nonnull @Nonempty final String [] aValues, final boolean bIsImportant) { ValueEnforcer.notNull (aProperty, "Property"); ValueEnforcer.notEmptyNoNullValue (aValues, "Values"); for (final String sValue : aValues) m_aValues.add (new CSSValue (aProperty, sValue, bIsImportant)); } @Nonnull @ReturnsMutableCopy public List <CSSValue> getContainedValues () { return ContainerHelper.newList (m_aValues); } @Nonnull public ECSSProperty getProp () { return ContainerHelper.getFirstElement (m_aValues).getProp (); } @Nonnull public String getAsCSSString (@Nonnull final ICSSWriterSettings aSettings, @Nonnegative final int nIndentLevel) { final StringBuilder ret = new StringBuilder (); for (final CSSValue aValue : m_aValues) ret.append (aValue.getAsCSSString (aSettings, nIndentLevel)); return ret.toString (); } @Override public boolean equals (final Object o) { if (o == this) return true; if (o == null || !getClass ().equals (o.getClass ())) return false; final CSSValueMultiValue rhs = (CSSValueMultiValue) o; return m_aValues.equals (rhs.m_aValues); } @Override public int hashCode () { return new HashCodeGenerator (this).append (m_aValues).getHashCode (); } @Override public String toString () { return new ToStringGenerator (this).append ("values", m_aValues).toString (); } }
[ "ph@phloc.com" ]
ph@phloc.com
27dcddf9df3c677f87d628ba4a1e94eeaa4d491d
c81bb092f4838eccdc5de0c871051f62f09f41db
/testsuite/integration-arquillian/servers/auth-server/services/testsuite-providers/src/main/java/org/keycloak/testsuite/util/ServerURLs.java
bf4e70597699f34c335054a9d4c9736489bcec79
[ "Apache-2.0" ]
permissive
hyuntaeng/keycloak
f3a4892f89702b92401769abc7e009d343d506bd
e2040f5d132a08efb2ef8acd24d1b85a2a2d5e3d
refs/heads/master
2022-11-18T08:36:11.137457
2020-05-05T08:41:17
2020-07-01T21:27:04
276,563,410
0
1
Apache-2.0
2020-07-02T06:10:19
2020-07-02T06:10:18
null
UTF-8
Java
false
false
2,878
java
/* * Copyright 2020 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.keycloak.testsuite.util; import static java.lang.Integer.parseInt; public class ServerURLs { public static final boolean AUTH_SERVER_SSL_REQUIRED = Boolean.parseBoolean(System.getProperty("auth.server.ssl.required", "true")); public static final String AUTH_SERVER_PORT = AUTH_SERVER_SSL_REQUIRED ? System.getProperty("auth.server.https.port", "8543") : System.getProperty("auth.server.http.port", "8180"); public static final String AUTH_SERVER_SCHEME = AUTH_SERVER_SSL_REQUIRED ? "https" : "http"; public static final String AUTH_SERVER_HOST = System.getProperty("auth.server.host", "localhost"); public static final String AUTH_SERVER_HOST2 = System.getProperty("auth.server.host2", AUTH_SERVER_HOST); public static String getAuthServerContextRoot() { return getAuthServerContextRoot(0); } public static String getAuthServerContextRoot(int clusterPortOffset) { return removeDefaultPorts(String.format("%s://%s:%s", AUTH_SERVER_SCHEME, AUTH_SERVER_HOST, parseInt(AUTH_SERVER_PORT) + clusterPortOffset)); } public static String getAppServerContextRoot() { return getAppServerContextRoot(0); } public static String getAppServerContextRoot(int clusterPortOffset) { String host = System.getProperty("app.server.host", "localhost"); boolean sslRequired = Boolean.parseBoolean(System.getProperty("app.server.ssl.required")); int port = sslRequired ? parsePort("app.server.https.port") : parsePort("app.server.http.port"); String scheme = sslRequired ? "https" : "http"; return String.format("%s://%s:%s", scheme, host, port + clusterPortOffset); } /** * Removes default ports: 80 and 443 from url */ public static String removeDefaultPorts(String url) { return url != null ? url.replaceFirst("(.*)(:80)(\\/.*)?$", "$1$3").replaceFirst("(.*)(:443)(\\/.*)?$", "$1$3") : null; } private static int parsePort(String property) { try { return parseInt(System.getProperty(property)); } catch (NumberFormatException ex) { throw new RuntimeException("Failed to get " + property, ex); } } }
[ "bruno@abstractj.org" ]
bruno@abstractj.org
1c26b60f64bb7f42e36c31f061f712e42abd708d
611b2f6227b7c3b4b380a4a410f357c371a05339
/src/main/java/cn/xports/field/FieldBookPresenter$orderField$$inlined$apply$lambda$1.java
d9b4223787bf2a0677ba99197c883520bb233ef4
[]
no_license
obaby/bjqd
76f35fcb9bbfa4841646a8888c9277ad66b171dd
97c56f77380835e306ea12401f17fb688ca1373f
refs/heads/master
2022-12-04T21:33:17.239023
2020-08-25T10:53:15
2020-08-25T10:53:15
290,186,830
3
1
null
null
null
null
UTF-8
Java
false
false
2,942
java
package cn.xports.field; import cn.xports.baselib.http.ProcessObserver; import cn.xports.baselib.http.ResponseThrowable; import cn.xports.entity.OrderInfo; import cn.xports.field.FieldBookContract; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.Nullable; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000%\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\b\u0003\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0012\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0002H\u0016J\u0012\u0010\u0006\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\bH\u0016¨\u0006\t¸\u0006\u0000"}, d2 = {"cn/xports/field/FieldBookPresenter$orderField$1$1", "Lcn/xports/baselib/http/ProcessObserver;", "Lcn/xports/entity/OrderInfo;", "next", "", "value", "onError", "responseThrowable", "Lcn/xports/baselib/http/ResponseThrowable;", "xports_productRelease"}, k = 1, mv = {1, 1, 15}) /* compiled from: FieldBookPresenter.kt */ public final class FieldBookPresenter$orderField$$inlined$apply$lambda$1 extends ProcessObserver<OrderInfo> { final /* synthetic */ String $date$inlined; final /* synthetic */ String $fieldInfo$inlined; final /* synthetic */ int $fieldType$inlined; final /* synthetic */ String $serviceId$inlined; final /* synthetic */ String $venueId$inlined; final /* synthetic */ FieldBookPresenter this$0; /* JADX INFO: super call moved to the top of the method (can break code semantics) */ FieldBookPresenter$orderField$$inlined$apply$lambda$1(String str, FieldBookPresenter fieldBookPresenter, String str2, int i, String str3, String str4, String str5) { super(str); this.this$0 = fieldBookPresenter; this.$date$inlined = str2; this.$fieldType$inlined = i; this.$fieldInfo$inlined = str3; this.$serviceId$inlined = str4; this.$venueId$inlined = str5; } public void next(@Nullable OrderInfo orderInfo) { FieldBookContract.View view; if (orderInfo != null && (view = (FieldBookContract.View) this.this$0.getRootView()) != null) { String tradeId = orderInfo.getTradeId(); Intrinsics.checkExpressionValueIsNotNull(tradeId, "tradeId"); view.onGetTradeId(tradeId); } } public void onError(@Nullable ResponseThrowable responseThrowable) { super.onError(responseThrowable); FieldBookContract.View view = (FieldBookContract.View) this.this$0.getRootView(); if (view != null) { if (responseThrowable == null) { Intrinsics.throwNpe(); } String message = responseThrowable.getMessage(); if (message == null) { message = ""; } view.showMsg(message); } } }
[ "obaby.lh@gmail.com" ]
obaby.lh@gmail.com
0f85f101dcfb1b49f3eaf6ff37c5202668d0e9e0
1263008492e8a237605e82dfd7d198e454c31f0c
/java_ver/old_ver/rpg2k/Project.java
cf0dac6769645adc43fd2e0945f7a6d13a87ceb1
[]
no_license
weimingtom/rpg2kemuSvn
78df5490a7fde36d44cba3e5948fb74c133a10c2
8373acf41bbe13b471efd354de1e9384e21eb062
refs/heads/master
2020-12-08T03:11:45.885189
2016-08-20T01:01:06
2016-08-20T01:01:06
66,121,107
0
0
null
null
null
null
SHIFT_JIS
Java
false
false
1,826
java
package rpg2k; import java.net.URL; import rpg2k.*; import rpg2k.database.*; public class Project { public MapTree MAP_TREE; public MapUnit MAP_UNIT; public SaveData SAVE_DATA; protected DataBase DATA_BASE; public Attribute ATTRIBUTE; public BattleAnimation BATTLE_ANIME; public rpg2k.database.Character CHARACTER; public ChipSet CHIP_SET; public CommonEvent COMMON_EVENT; public Condition CONDITION; public Enemy ENEMY; public EnemyGroup ENEMY_GROUP; public Item ITEM; public Skill SKILL; public SystemData SYS_DATA; public Switch SWITCH; public Term TERM; public Variable VARIABLE; public boolean HIDE_TITLE; public URL GAME_DIRECTORY, RTP_DIRECTORY; public String GAME_TITLE = "\0"; protected Project() {} public Project(URL gameDir, URL rtpDir, boolean hideTitle) { GAME_DIRECTORY = gameDir; RTP_DIRECTORY = rtpDir; HIDE_TITLE = hideTitle; // データベース DATA_BASE = new DataBase(gameDir); // データベースの各項目 ATTRIBUTE = DATA_BASE.newAttribute(); BATTLE_ANIME = DATA_BASE.newBattleAnimation(); CHARACTER = DATA_BASE.newCharacter(); CHIP_SET = DATA_BASE.newChipSet(); COMMON_EVENT = DATA_BASE.newCommonEvent(); CONDITION = DATA_BASE.newCondition(); ENEMY = DATA_BASE.newEnemy(); ENEMY_GROUP = DATA_BASE.newEnemyGroup(); ITEM = DATA_BASE.newItem(); SKILL = DATA_BASE.newSkill(); SYS_DATA = DATA_BASE.newSystemData(); SWITCH = DATA_BASE.newSwitch(); TERM = DATA_BASE.newTerm(); VARIABLE = DATA_BASE.newVariable(); DATA_BASE = null; // マップツリー MAP_TREE = new MapTree(gameDir); // ゲームタイトル GAME_TITLE = (String)MAP_TREE.getData(0)[1]; // マップ MAP_UNIT = new MapUnit(gameDir, MAP_TREE.getMapNum()); // セーブデータ SAVE_DATA = new SaveData(gameDir); SAVE_DATA.setGameData(this); } }
[ "weimingtom@qq.com" ]
weimingtom@qq.com
153ba8cdf5645be953542e871c56740fbd6483ee
e80aa55af3a9a0b2675c066ae7c34de55e30e1dc
/bitcamp-java/src/main/java/com/eomcs/oop/ex12/Exam0720.java
ea6ea9fc65418531648ded367aa008341185354f
[]
no_license
dana9112/bitcamp-study
997c37383dd01b485866bd1bf829d3c8a155c0a4
e917ffb6ba89ba21e3738de37dd042777cd18f7c
refs/heads/master
2020-09-23T12:40:09.096620
2020-05-20T08:42:16
2020-05-20T08:42:16
225,501,963
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
// 메서드 레퍼런스 - 생성자 레퍼런스 구현 원리 package com.eomcs.oop.ex12; import java.util.ArrayList; import java.util.List; public class Exam0720 { static interface ListFactory { List create(); } public static void main(String[] args) { // 생성자 레퍼런스를 지정하는 것은 // 다음과 같이 익명 클래스를 만드는 것과 같다. // =>ListFactory f1 = ArrayList::new; ListFactory f1 = new ListFactory() { @Override public List create() { return new ArrayList(); } }; List list = f1.create(); System.out.println(list instanceof ArrayList); System.out.println(list.getClass().getName()); } }// class() end
[ "ehddud2978@gmail.com" ]
ehddud2978@gmail.com
20f0432fa4268eade073343da4f91a5d5fcab5d5
a255fcdcbdbe2fd6119fcce0b53e0a99f949a0f8
/app/src/main/java/com/cjyun/tb/patient/ui/binding/AddBoxContract.java
d4fcc4639cae049cb4c94a77d66876127aa9a730
[ "Apache-2.0" ]
permissive
jianghw/IrrigationTB
2b9c28653f63de6da3b4a5e5c27954de2b2bc07d
2ae714eeed37bab2f8300f39e02447f2df29aadc
refs/heads/master
2020-04-06T06:25:02.489755
2017-02-23T06:19:32
2017-02-23T06:19:40
82,891,622
0
0
null
null
null
null
UTF-8
Java
false
false
1,688
java
package com.cjyun.tb.patient.ui.binding; import android.content.Intent; import com.cjyun.tb.patient.base.IBasePresenter; import com.cjyun.tb.patient.base.IBaseView; import com.cjyun.tb.patient.bean.BindBoxBean; /** * Created by Administrator on 2016/5/6 0006</br> * description:</br> */ public interface AddBoxContract { /*********************************** * ScanBox 准备扫描fgt *************************************************/ interface IScanBoxView extends IBaseView<IScanBoxPresenter> { String getBoxID(); String getBoxSN(); /** * 显示扫描结果 * * @param scanResult */ void onResultFromQR(String scanResult); void onSucceedNextStep(); /** * 解除绑定 * @param bean */ void showRemoveBinding(BindBoxBean bean); } interface IScanBoxPresenter extends IBasePresenter { void onBindingFirstStep(); void onActivityResult(int requestCode, int resultCode, Intent data); void onRemoveBinding(); } /*********************************** * ScanBox 准备扫描fgt *************************************************/ interface IBindFgtView extends IBaseView<IBindFgtPresenter> { Thread onCreateWorkThread(); /** * 中断倒计时 */ void interruptThread(); void onEnteredCountdown(); void onCompleteBinding(); void showCountdown(long l); void onErrorStep(); void onSucceedStep(); } interface IBindFgtPresenter extends IBasePresenter { void onBindingSecondStep(); } }
[ "jiaswei89@gmail.com" ]
jiaswei89@gmail.com
ca173c9355b444c927837742703a3893cd360122
88ae8695987ada722184307301e221e1ba3cc2fa
/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ManageTrustedWebActivityDataActivity.java
187e98312b3e280271016345e096001fbefe31d2
[ "BSD-3-Clause" ]
permissive
iridium-browser/iridium-browser
71d9c5ff76e014e6900b825f67389ab0ccd01329
5ee297f53dc7f8e70183031cff62f37b0f19d25f
refs/heads/master
2023-08-03T16:44:16.844552
2023-07-20T15:17:00
2023-07-23T16:09:30
220,016,632
341
40
BSD-3-Clause
2021-08-13T13:54:45
2019-11-06T14:32:31
null
UTF-8
Java
false
false
3,302
java
// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.browserservices; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import androidx.appcompat.app.AppCompatActivity; import androidx.browser.customtabs.CustomTabsSessionToken; import org.chromium.base.Log; import org.chromium.chrome.browser.ChromeApplicationImpl; import org.chromium.chrome.browser.browserservices.metrics.TrustedWebActivityUmaRecorder; import org.chromium.chrome.browser.customtabs.CustomTabsConnection; import org.chromium.chrome.browser.init.ChromeBrowserInitializer; import org.chromium.webapk.lib.common.WebApkConstants; /** * Launched by Trusted Web Activity apps when the user clears data. * Redirects to the site-settings activity showing the websites associated with the calling app. * The calling app's identity is established using {@link CustomTabsSessionToken} provided in the * intent. */ public class ManageTrustedWebActivityDataActivity extends AppCompatActivity { private static final String TAG = "TwaDataActivity"; private static String sMockCallingPackage; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String urlToLaunchSettingsFor = getIntent().getData().toString(); boolean isWebApk = getIntent().getBooleanExtra(WebApkConstants.EXTRA_IS_WEBAPK, false); launchSettings(urlToLaunchSettingsFor, isWebApk); finish(); } private void launchSettings(@Nullable String urlToLaunchSettingsFor, boolean isWebApk) { String packageName = getClientPackageName(isWebApk); if (packageName == null) { logNoPackageName(); finish(); return; } new TrustedWebActivityUmaRecorder( ChromeBrowserInitializer.getInstance()::runNowOrAfterFullBrowserStarted) .recordOpenedSettingsViaManageSpace(); if (isWebApk) { TrustedWebActivitySettingsLauncher.launchForWebApkPackageName( this, packageName, urlToLaunchSettingsFor); } else { TrustedWebActivitySettingsLauncher.launchForPackageName(this, packageName); } } @VisibleForTesting public static void setCallingPackageForTesting(String packageName) { sMockCallingPackage = packageName; } @Nullable private String getClientPackageName(boolean isWebApk) { if (isWebApk) { return sMockCallingPackage != null ? sMockCallingPackage : getCallingPackage(); } CustomTabsSessionToken session = CustomTabsSessionToken.getSessionTokenFromIntent(getIntent()); if (session == null) { return null; } CustomTabsConnection connection = ChromeApplicationImpl.getComponent().resolveCustomTabsConnection(); return connection.getClientPackageNameForSession(session); } private void logNoPackageName() { Log.e(TAG, "Package name for incoming intent couldn't be resolved. " + "Was a CustomTabSession created and added to the intent?"); } }
[ "jengelh@inai.de" ]
jengelh@inai.de
8e9b8f549708a949011235994e0ac10573599c82
bba1ebf0b3023e1827deaec37ec593e6d3e23af3
/catalogo-ejb/src/main/java/com/indracompany/catalogo/dao/interfaces/DescontoCondPagtoDAO.java
7e349ac653ac15b8b69e5739db1b07b0d441d3b7
[]
no_license
douglasikoshima/teste-repositorio
91a2844c2b8a7cc4f5d423ed25bfd24bfd1eff28
c85512ec57b9a1fd450bba950b6e71c019ca14c3
refs/heads/master
2021-01-19T09:00:23.590328
2017-02-15T19:46:02
2017-02-15T19:46:02
82,079,552
0
0
null
null
null
null
UTF-8
Java
false
false
583
java
package com.indracompany.catalogo.dao.interfaces; import com.indracompany.catalogo.exception.DAOException; import com.indracompany.catalogo.to.DescontoCondPagtoTO; /** * @author Luiz Pereira * */ public interface DescontoCondPagtoDAO { /** * @param descontoCondPagtoTO * @throws DAOException */ public void createUpdateDescontoCondPagto(DescontoCondPagtoTO descontoCondPagtoTO) throws DAOException ; /** * @param idFormaPagamento * @throws DAOException */ public void removeDescontoCondPagtoByFormaPagamento(Integer idFormaPagamento) throws DAOException; }
[ "vfabio@indracompany.com" ]
vfabio@indracompany.com
c7d5de374e30f6310d1305e264bfbd8b51d08633
cac52d34455a08b3fb882d0a58e0b3b72206e935
/common/protocols/android-java/src/main/java/ru/trendtech/common/mobileexchange/model/web/SendEmailResponse.java
eb1428be8cd66830f943dc7198813ff2287e4ead
[]
no_license
MrFractal/taxisto
75f72238ab4ce3c14f6e559098653ae53756fbaa
195863dc17f5c6147c578b5695c1bc34ef9702a5
refs/heads/master
2021-01-10T16:25:28.332080
2016-02-17T12:10:01
2016-02-17T12:10:01
51,916,660
0
0
null
null
null
null
UTF-8
Java
false
false
481
java
package ru.trendtech.common.mobileexchange.model.web; import ru.trendtech.common.mobileexchange.model.common.ErrorCodeHelper; /** * Created by petr on 10.12.2014. */ public class SendEmailResponse { private ErrorCodeHelper errorCodeHelper = new ErrorCodeHelper(); public ErrorCodeHelper getErrorCodeHelper() { return errorCodeHelper; } public void setErrorCodeHelper(ErrorCodeHelper errorCodeHelper) { this.errorCodeHelper = errorCodeHelper; } }
[ "fr@bekker.com.ua" ]
fr@bekker.com.ua
c39d84e02ee059d792dd699d9fb645f9ed566812
091555535b65af4dc6f6074fb14ac4ae4bf7bbea
/src/pack1/ThreatTest1.java
2ede77a5b45f5e32ad8fee521c2ad7ef36286c11
[]
no_license
hyuneun/java4
7c82974cd0eae2042100df6463ce857848cb27aa
50dc3bf431f852b1c5ec3715a889fa06ff137522
refs/heads/master
2021-05-03T20:05:17.662315
2016-10-04T01:20:59
2016-10-04T01:20:59
69,923,690
0
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
package pack1; public class ThreatTest1 extends Thread { public ThreatTest1() { } public ThreatTest1(String name) { super(name); } public void run() { for (int i = 0; i <= 50; i++) { System.out.println(i + " " + super.getName()); } } public static void main(String[] args) throws Exception { /* * process 단위의 실행 Process p1 = Runtime.getRuntime().exec("calc.exe"); * Process p2 = Runtime.getRuntime().exec("notepad.exe"); p1.waitFor(); * p2.destroy(); System.out.println("p1:" + p1.exitValue()); * System.out.println("p1:" + p2.exitValue()); }catch(Exception e){ * System.out.println("err" + e); } */ // 스레드를 사용x경우 ThreatTest1 t1 = new ThreatTest1(); ThreatTest1 t2 = new ThreatTest1(); t1.start();// run을 부른다 t2.start(); t2.setPriority(10);// 우선순위변경(10이라도 무조건 앞은 아님) t1.join();//스레드가 끝날때까지 메인 스레드 실행을 보류한다 t2.join(); Thread.yield();//현재쓰레드를 일시적으로 멈추고 다른스레드실행(양보) System.out.println("종료"); } }
[ "user@user-PC" ]
user@user-PC
d44ea0e2a60672d7943f0b3033b10056eec034f3
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/mscopensubscription-20210713/src/main/java/com/aliyun/mscopensubscription20210713/models/UpdateWebhookRequest.java
f1e7f40acaeac89726886ae5ff8672ef4577942f
[ "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
1,696
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.mscopensubscription20210713.models; import com.aliyun.tea.*; public class UpdateWebhookRequest extends TeaModel { @NameInMap("ClientToken") public String clientToken; @NameInMap("Locale") public String locale; @NameInMap("ServerUrl") public String serverUrl; @NameInMap("WebhookId") public Long webhookId; @NameInMap("WebhookName") public String webhookName; public static UpdateWebhookRequest build(java.util.Map<String, ?> map) throws Exception { UpdateWebhookRequest self = new UpdateWebhookRequest(); return TeaModel.build(map, self); } public UpdateWebhookRequest setClientToken(String clientToken) { this.clientToken = clientToken; return this; } public String getClientToken() { return this.clientToken; } public UpdateWebhookRequest setLocale(String locale) { this.locale = locale; return this; } public String getLocale() { return this.locale; } public UpdateWebhookRequest setServerUrl(String serverUrl) { this.serverUrl = serverUrl; return this; } public String getServerUrl() { return this.serverUrl; } public UpdateWebhookRequest setWebhookId(Long webhookId) { this.webhookId = webhookId; return this; } public Long getWebhookId() { return this.webhookId; } public UpdateWebhookRequest setWebhookName(String webhookName) { this.webhookName = webhookName; return this; } public String getWebhookName() { return this.webhookName; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2dcc8b0a31350ff77e2e6a6ff1676e034f162a1d
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app50/source/com/shoufu/lib/bx.java
cd6193c2b5cbcc089825e9424b298643796a202a
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
1,995
java
package com.shoufu.lib; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.io.PrintStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class bx { private NodeList a; private Node b; public bx(String paramString) { try { DocumentBuilderFactory localDocumentBuilderFactory = DocumentBuilderFactory.newInstance(); System.out.println(paramString); this.a = localDocumentBuilderFactory.newDocumentBuilder().parse(a(paramString)).getChildNodes(); this.b = this.a.item(0); return; } catch (Exception paramString) { paramString.printStackTrace(); } } static InputStream a(String paramString) { return new ByteArrayInputStream(paramString.getBytes()); } public void a(String paramString, int paramInt) { NodeList localNodeList = this.b.getChildNodes(); int k = -1; int j = 0; for (;;) { if (j >= localNodeList.getLength()) { return; } Node localNode = localNodeList.item(j); int i = k; if (localNode.getNodeName().equals(paramString)) { k += 1; i = k; if (paramInt == k) { this.b = localNode; return; } } j += 1; k = i; } } public String b(String paramString, int paramInt) { if (this.a == null) { return null; } NodeList localNodeList = this.b.getChildNodes(); int k = -1; int j = 0; for (;;) { if (j >= localNodeList.getLength()) { return null; } Node localNode = localNodeList.item(j); int i = k; if (localNode.getNodeName().equals(paramString)) { k += 1; i = k; if (paramInt == k) { return localNode.getTextContent(); } } j += 1; k = i; } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
921252c37dfa609ea93dd590a6fba6c25d9f72ca
9f583a2c6706f09c1ce3a85b827a5f4e21637cbb
/aTalk/src/main/java/org/atalk/impl/neomedia/transform/SinglePacketTransformer.java
a7bc25be30dc5094a53f61c85fa3b34283ba3fdc
[ "Apache-2.0" ]
permissive
4KJuegos/atalk-android
67f86b6d0b0db54c1e66a70a9b5b64564c87d438
bf3658c5aaeea10791fc6205086e25a6861c9a9f
refs/heads/master
2020-06-11T14:46:33.569170
2019-06-26T03:40:58
2019-06-26T03:40:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,436
java
/* * Jitsi, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. See terms of license at gnu.org. */ package org.atalk.impl.neomedia.transform; import org.atalk.service.neomedia.ByteArrayBuffer; import org.atalk.service.neomedia.RawPacket; import org.atalk.util.function.Predicate; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import timber.log.Timber; /** * Extends the <tt>PacketTransformer</tt> interface with methods which allow the transformation of a * single packet into a single packet. * * Eases the implementation of <tt>PacketTransformer<tt>-s which transform each * packet into a single transformed packet (as opposed to an array of possibly * more than one packet). * * @author Boris Grozev * @author George Politis * @author Eng Chong Meng */ public abstract class SinglePacketTransformer implements PacketTransformer { /** * The number of <tt>Throwable</tt>s to log with a single call to <tt>logger</tt>. If every * <tt>Throwable</tt> is logged in either of {@link #reverseTransform(RawPacket)} and * {@link #transform(RawPacket)}, the logging may be overwhelming. */ private static final int EXCEPTIONS_TO_LOG = 1000; /** * The number of exceptions caught in {@link #reverseTransform(RawPacket)}. */ private long exceptionsInReverseTransform; /** * The number of exceptions caught in {@link #transform(RawPacket)}. */ private long exceptionsInTransform; /** * The idea is to have <tt>PacketTransformer</tt> implementations strictly associated with a * <tt>Predicate</tt> so that they only process packets that they're supposed to process. For * example, transformers that transform RTP packets should not transform RTCP packets, if, by * mistake, they happen to be passed RTCP packets. */ private final Predicate<ByteArrayBuffer> packetPredicate; /** * Ctor. * * XXX At some point ideally we would get rid of this ctor and all the inheritors will use the * parametrized ctor. Also, we might want to move this check inside the * <tt>TransformEngineChain</tt> so that we only make the check once per packet: The RTCP * transformer is only supposed to (reverse) transform RTCP packets and the RTP transformer is * only supposed to modify RTP packets. */ public SinglePacketTransformer() { this(null); } /** * Ctor. * * @param packetPredicate the <tt>PacketPredicate</tt> to use to match packets to (reverse) transform. */ public SinglePacketTransformer(Predicate<ByteArrayBuffer> packetPredicate) { this.packetPredicate = packetPredicate; } /** * {@inheritDoc} * * The (default) implementation of {@code SinglePacketTransformer} does nothing. */ @Override public void close() { } /** * Reverse-transforms a specific packet. * * @param pkt the transformed packet to be restored. * @return the restored packet. */ public abstract RawPacket reverseTransform(RawPacket pkt); /** * {@inheritDoc} * * Reverse-transforms an array of packets by calling {@link #reverseTransform(RawPacket)} on * each one. */ @Override public RawPacket[] reverseTransform(RawPacket[] pkts) { if (pkts != null) { for (int i = 0; i < pkts.length; i++) { RawPacket pkt = pkts[i]; if (pkt != null && (packetPredicate == null || packetPredicate.test(pkt))) { try { pkts[i] = reverseTransform(pkt); } catch (Throwable t) { exceptionsInReverseTransform++; if ((exceptionsInReverseTransform % EXCEPTIONS_TO_LOG) == 0 || exceptionsInReverseTransform == 1) { Timber.e(t, "Failed to reverse-transform RawPacket(s)!"); } if (t instanceof Error) throw (Error) t; else throw (RuntimeException) t; } } } } return pkts; } /** * Transforms a specific packet. * * @param pkt the packet to be transformed. * @return the transformed packet. */ public abstract RawPacket transform(RawPacket pkt); /** * {@inheritDoc} * * Transforms an array of packets by calling {@link #transform(RawPacket)} on each one. */ @Override public RawPacket[] transform(RawPacket[] pkts) { if (pkts != null) { for (int i = 0; i < pkts.length; i++) { RawPacket pkt = pkts[i]; if (pkt != null && (packetPredicate == null || packetPredicate.test(pkt))) { try { pkts[i] = transform(pkt); } catch (Throwable t) { exceptionsInTransform++; if ((exceptionsInTransform % EXCEPTIONS_TO_LOG) == 0 || exceptionsInTransform == 1) { Timber.e(t, "Failed to transform RawPacket(s)!"); } if (t instanceof Error) throw (Error) t; else throw (RuntimeException) t; } } } } return pkts; } /** * Applies a specific transformation function to an array of {@link RawPacket}s. * * @param pkts the array to transform. * @param transformFunction the function to apply to each (non-null) element * of the array. * @param exceptionCounter a counter of the number of exceptions encountered. * @param logMessage a name of the transformation function, to be used * when logging exceptions. * @return {@code pkts}. */ private RawPacket[] transformArray( RawPacket[] pkts, Function<RawPacket, RawPacket> transformFunction, AtomicInteger exceptionCounter, String logMessage) { if (pkts != null) { for (int i = 0; i < pkts.length; i++) { RawPacket pkt = pkts[i]; if (pkt != null && (packetPredicate == null || packetPredicate.test(pkt))) { try { pkts[i] = transformFunction.apply(pkt); } catch (Throwable t) { exceptionCounter.incrementAndGet(); if ((exceptionCounter.get() % EXCEPTIONS_TO_LOG) == 0 || exceptionCounter.get() == 1) { Timber.e(t, "Failed to %s RawPacket(s)!", logMessage); } if (t instanceof Error) { throw (Error) t; } else if (t instanceof RuntimeException) { throw (RuntimeException) t; } else { throw new RuntimeException(t); } } } } } return pkts; } }
[ "cmeng.gm@gmail.com" ]
cmeng.gm@gmail.com
5bab0f773939b59adec2677371884ee04de84203
fbfc55e7335cd07e38289cd9b291ebbded62a96b
/projetos/discoverability-hateoas/src/main/java/com/algaworks/algafood/api/controller/UsuarioGrupoController.java
c2fb5d259c7b370b2840b6f078a0db1978cb567b
[]
no_license
dvsilva/algaworks-especialista-spring-rest
cc8097a5432fb7d7263f5f5f050a5e05443779f8
c190bb9901d86f6c0eb3ffdedfb1868b8eedd40b
refs/heads/master
2023-04-02T01:44:18.271430
2021-04-02T19:34:26
2021-04-02T19:34:26
304,274,947
0
1
null
2020-12-19T14:03:49
2020-10-15T09:26:38
Java
UTF-8
Java
false
false
2,776
java
package com.algaworks.algafood.api.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.hateoas.CollectionModel; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; import com.algaworks.algafood.api.AlgaLinks; import com.algaworks.algafood.api.assembler.GrupoModelAssembler; import com.algaworks.algafood.api.model.GrupoModel; import com.algaworks.algafood.api.openapi.controller.UsuarioGrupoControllerOpenApi; import com.algaworks.algafood.domain.model.Usuario; import com.algaworks.algafood.domain.service.CadastroUsuarioService; @RestController @RequestMapping(path = "/usuarios/{usuarioId}/grupos", produces = MediaType.APPLICATION_JSON_VALUE) public class UsuarioGrupoController implements UsuarioGrupoControllerOpenApi { @Autowired private CadastroUsuarioService cadastroUsuario; @Autowired private GrupoModelAssembler grupoModelAssembler; @Autowired private AlgaLinks algaLinks; @Override @GetMapping public CollectionModel<GrupoModel> listar(@PathVariable Long usuarioId) { Usuario usuario = cadastroUsuario.buscarOuFalhar(usuarioId); CollectionModel<GrupoModel> gruposModel = grupoModelAssembler.toCollectionModel(usuario.getGrupos()) .removeLinks() .add(algaLinks.linkToUsuarioGrupoAssociacao(usuarioId, "associar")); gruposModel.getContent().forEach(grupoModel -> { grupoModel.add(algaLinks.linkToUsuarioGrupoDesassociacao( usuarioId, grupoModel.getId(), "desassociar")); }); return gruposModel; } @DeleteMapping("/{grupoId}") @ResponseStatus(HttpStatus.NO_CONTENT) public ResponseEntity<Void> desassociar(@PathVariable Long usuarioId, @PathVariable Long grupoId) { cadastroUsuario.desassociarGrupo(usuarioId, grupoId); return ResponseEntity.noContent().build(); } @PutMapping("/{grupoId}") @ResponseStatus(HttpStatus.NO_CONTENT) public ResponseEntity<Void> associar(@PathVariable Long usuarioId, @PathVariable Long grupoId) { cadastroUsuario.associarGrupo(usuarioId, grupoId); return ResponseEntity.noContent().build(); } }
[ "danyllo.dvs@gmail.com" ]
danyllo.dvs@gmail.com
86131617d9a120c5249aa670e24449134fac8278
b6d7c8a3dbe3222dca68cd14173cf47a1b7df065
/yasson/src/test/java/tech/uom/lib/yasson/DimensionJsonDeserializerTest.java
e1ab3869cb13d4716f36b8eed19f51584a779eb1
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
unitsofmeasurement/uom-lib
e82e6a4cd33fecd83743b3068d2b65703f6a1210
8f6f7c33bfab6a0285f197fca05a65c4ac16f625
refs/heads/master
2023-08-25T20:45:42.828496
2023-07-07T16:19:24
2023-07-07T16:19:24
18,996,091
17
15
NOASSERTION
2022-10-20T13:16:43
2014-04-21T15:10:53
Java
UTF-8
Java
false
false
3,323
java
/* * Units of Measurement Jakarta JSON-B Library * Copyright (c) 2005-2023, Werner Keil and others. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions * and the following disclaimer in the documentation and/or other materials provided with the distribution. * * 3. Neither the name of JSR-385, Indriya nor the names of their contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package tech.uom.lib.yasson; import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import javax.json.bind.Jsonb; import javax.json.bind.JsonbBuilder; import javax.json.bind.JsonbConfig; import javax.measure.Dimension; import org.junit.jupiter.api.Test; import tech.units.indriya.unit.UnitDimension; /** * @author keilw */ public class DimensionJsonDeserializerTest { /** * Test of deserialize method, of class DimensionJsonDeserializer.Inspired by * https://stackoverflow.com/questions/21787128/how-to-unit-test-jackson-jsonserializer-and-jsondeserializer * * @throws IOException if an I/O error occurs */ @Test public void testDeserialize() throws IOException { // Create JSONB engine with pretty output and custom serializer/deserializer JsonbConfig config = new JsonbConfig() .withFormatting(true) .withDeserializers(new DimensionJsonDeserializer()); Jsonb jsonb = JsonbBuilder.create(config); InputStream stream = new ByteArrayInputStream("{\"[L]\":2,\"[T]\":1}".getBytes(StandardCharsets.UTF_8)); //JsonParser parser = objectMapper.getFactory().createParser(stream); //DeserializationContext ctxt = objectMapper.getDeserializationContext(); //DimensionJsonDeserializer instance = new DimensionJsonDeserializer(); Dimension expResult = UnitDimension.LENGTH.pow(2).multiply(UnitDimension.TIME); Dimension result = jsonb.fromJson(stream, Dimension.class); assertEquals(expResult, result); } }
[ "werner.keil@gmx.net" ]
werner.keil@gmx.net
f158b0cf61be24cdd45dee7595e0ca608e8b5f02
08506438512693067b840247fa2c9a501765f39d
/Product/Production/Services/PatientCorrelationCore/src/main/java/gov/hhs/fha/nhinc/patientcorrelation/nhinc/proxy/PatientCorrelationProxyFactory.java
8306288b7238422c6801d15c7cb61b374abdf5dd
[]
no_license
AurionProject/Aurion
2f577514de39e91e1453c64caa3184471de891fa
b99e87e6394ecdde8a4197b755774062bf9ef890
refs/heads/master
2020-12-24T07:42:11.956869
2017-09-27T22:08:31
2017-09-27T22:08:31
49,459,710
1
0
null
2017-03-07T23:24:56
2016-01-11T22:55:12
Java
UTF-8
Java
false
false
2,009
java
/** * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 2012, United States Government, as represented by the Secretary of Health and Human Services. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above * copyright notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of the United States Government nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY *DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package gov.hhs.fha.nhinc.patientcorrelation.nhinc.proxy; /** * @author bhumphrey * */ public interface PatientCorrelationProxyFactory { /** * @return Bean instantiated to invoke PatientCorrelationProxy. */ public PatientCorrelationProxy getPatientCorrelationProxy(); }
[ "neilkwebb@hotmail.com" ]
neilkwebb@hotmail.com
bfdc12e5b3e08bd5c8430f2ef04b912d4d8bcbc4
46572b2d3e601944d3e0a32ee3b65a1a249ef0fa
/src/main/java/knightminer/inspirations/tools/entity/RedstoneArrow.java
3b665150cb9b85541d46c0e2a6c7bf7c7cb042cd
[ "CC-BY-NC-SA-4.0", "LicenseRef-scancode-proprietary-license", "CC-BY-NC-4.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
KnightMiner/Inspirations
0522e198c2ec4367b7dfa26608253557501ad33f
6f15ea0a2fda6f0fb8e309b848b35432d12bf423
refs/heads/1.16
2023-08-27T00:55:10.084208
2021-07-10T04:49:03
2021-07-10T04:49:03
115,138,169
53
33
MIT
2022-11-01T01:43:22
2017-12-22T17:50:54
Java
UTF-8
Java
false
false
3,702
java
package knightminer.inspirations.tools.entity; import knightminer.inspirations.tools.InspirationsTools; import knightminer.inspirations.tools.block.RedstoneChargeBlock; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.projectile.AbstractArrowEntity; import net.minecraft.item.DirectionalPlaceContext; import net.minecraft.item.ItemStack; import net.minecraft.network.IPacket; import net.minecraft.network.PacketBuffer; import net.minecraft.util.Direction; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TranslationTextComponent; import net.minecraft.world.World; import net.minecraftforge.common.util.Constants; import net.minecraftforge.fml.common.registry.IEntityAdditionalSpawnData; import net.minecraftforge.fml.network.NetworkHooks; import static knightminer.inspirations.tools.InspirationsTools.redstoneCharge; public class RedstoneArrow extends AbstractArrowEntity implements IEntityAdditionalSpawnData { public RedstoneArrow(EntityType<RedstoneArrow> entType, World world) { super(entType, world); } public RedstoneArrow(World world, double x, double y, double z) { super(InspirationsTools.entRSArrow, x, y, z, world); init(); } public RedstoneArrow(World world, LivingEntity shooter) { super(InspirationsTools.entRSArrow, shooter, world); init(); } @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } @Override public void writeSpawnData(PacketBuffer buffer) { Entity shooter = this.func_234616_v_(); buffer.writeInt(shooter != null ? shooter.getEntityId() : 0); } @Override public void readSpawnData(PacketBuffer buffer) { Entity shooter = this.world.getEntityByID(buffer.readInt()); if (shooter != null) { this.setShooter(shooter); } } private void init() { this.setDamage(0.25); } private static TranslationTextComponent NAME = new TranslationTextComponent("item.inspirations.charged_arrow"); @Override public ITextComponent getName() { if (this.hasCustomName()) { return super.getName(); } else { return NAME; } } @Override protected ItemStack getArrowStack() { return new ItemStack(InspirationsTools.redstoneArrow, 1); } /** * Called when the arrow hits a block or an entity */ @Override protected void func_230299_a_(BlockRayTraceResult raytrace) { // get to the block the arrow is on Direction sideHit = raytrace.getFace(); BlockPos pos = raytrace.getPos().offset(sideHit); // if there is a block there, try the block next to that if (!world.getBlockState(pos).isReplaceable(new DirectionalPlaceContext(world, pos, sideHit, ItemStack.EMPTY, sideHit))) { pos = pos.offset(sideHit); if (!world.getBlockState(pos).isReplaceable(new DirectionalPlaceContext(world, pos, sideHit, ItemStack.EMPTY, sideHit))) { super.func_230299_a_(raytrace); return; } } world.playSound(null, pos, SoundEvents.ITEM_FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.4F + 0.8F); BlockState state = redstoneCharge.getDefaultState().with(RedstoneChargeBlock.FACING, sideHit.getOpposite()); world.setBlockState(pos, state, Constants.BlockFlags.DEFAULT_AND_RERENDER); redstoneCharge.onBlockPlacedBy(world, pos, state, null, ItemStack.EMPTY); this.remove(); } }
[ "knightminer4@gmail.com" ]
knightminer4@gmail.com
054925f074e5a707a2152123afd7eb253ffa8fce
8870fa16fe6f0fe3e791c1463c5ee83c46f86839
/mmoarpg/platform-common/src/main/java/cn/qeng/common/gm/vo/GmPayVO.java
b3ada3f63bf5c80119a8a629d8ec846bf5d45285
[]
no_license
daxingyou/yxj
94535532ea4722493ac0342c18d575e764da9fbb
91fb9a5f8da9e5e772e04b3102fe68fe0db5e280
refs/heads/master
2022-01-08T10:22:48.477835
2018-04-11T03:18:37
2018-04-11T03:18:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,082
java
package cn.qeng.common.gm.vo; /** * 游戏区与GM工具交互的VO * * @author 小流氓(176543888@qq.com) */ public class GmPayVO { private String account; private String name; private String payDate; private int money; private String isCard; public GmPayVO() { } public GmPayVO(String account, String name, String payDate, int money, String isCard) { super(); this.account = account; this.name = name; this.payDate = payDate; this.money = money; this.isCard = isCard; } public String getAccount() { return account; } public void setAccount(String account) { this.account = account; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPayDate() { return payDate; } public void setPayDate(String payDate) { this.payDate = payDate; } public int getMoney() { return money; } public void setMoney(int money) { this.money = money; } public String getIsCard() { return isCard; } public void setIsCard(String isCard) { this.isCard = isCard; } }
[ "lkjx3031274@163.com" ]
lkjx3031274@163.com
7039889f0d30a5539671ef0c8d7f4ae3403517a8
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
/AL-Game/src/com/aionemu/gameserver/model/team2/common/events/TeamCommand.java
40e8155332250d44ee51f528b4ba20d41dff8bba
[]
no_license
EmuZONE/Aion-Lightning-5.1
3c93b8bc5e63fd9205446c52be9b324193695089
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
refs/heads/master
2020-03-08T14:38:42.579437
2018-04-06T04:18:19
2018-04-06T04:18:19
128,191,634
1
1
null
null
null
null
UTF-8
Java
false
false
2,232
java
/* * This file is part of aion-lightning <aion-lightning.com>. * * aion-lightning is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-lightning 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 aion-lightning. If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.model.team2.common.events; import com.google.common.base.Preconditions; import gnu.trove.map.hash.TIntObjectHashMap; /** * @author ATracer */ public enum TeamCommand { GROUP_BAN_MEMBER(2), GROUP_SET_LEADER(3), GROUP_REMOVE_MEMBER(6), GROUP_SET_LFG(9), // TODO confirm GROUP_START_MENTORING(10), GROUP_END_MENTORING(11), ALLIANCE_LEAVE(14), ALLIANCE_BAN_MEMBER(16), ALLIANCE_SET_CAPTAIN(17), ALLIANCE_CHECKREADY_CANCEL(20), ALLIANCE_CHECKREADY_START(21), ALLIANCE_CHECKREADY_AUTOCANCEL(22), ALLIANCE_CHECKREADY_READY(23), ALLIANCE_CHECKREADY_NOTREADY(24), ALLIANCE_SET_VICECAPTAIN(25), ALLIANCE_UNSET_VICECAPTAIN(26), ALLIANCE_CHANGE_GROUP(27), LEAGUE_LEAVE(29), LEAGUE_EXPEL(30); private static TIntObjectHashMap<TeamCommand> teamCommands; static { teamCommands = new TIntObjectHashMap<TeamCommand>(); for (TeamCommand eventCode : values()) { teamCommands.put(eventCode.getCodeId(), eventCode); } } private final int commandCode; private TeamCommand(int commandCode) { this.commandCode = commandCode; } public int getCodeId() { return commandCode; } public static final TeamCommand getCommand(int commandCode) { TeamCommand command = teamCommands.get(commandCode); Preconditions.checkNotNull(command, "Invalid team command code " + commandCode); return command; } }
[ "naxdevil@gmail.com" ]
naxdevil@gmail.com
d9d1f31e4cefb1ee007d7ad53d64538430d12d3d
aa9442e737a0abb3ace0b03bea4a833694aa54a3
/service-api/src/main/java/com/java110/api/listener/resourceStore/DeleteAllocationStorehouseApplyListener.java
f2c1a976afe9f97d03ee316c676a1632a0102a55
[ "Apache-2.0" ]
permissive
shenfh/MicroCommunity
a29a8377725f126f9830d63d65113cb3668ee457
5872721e17244fef1d558065bfedb92eb733aa0b
refs/heads/master
2022-10-25T02:25:54.700463
2022-07-13T04:36:33
2022-07-13T04:36:33
230,180,464
0
0
null
2019-12-26T02:24:34
2019-12-26T02:24:33
null
UTF-8
Java
false
false
1,630
java
package com.java110.api.listener.resourceStore; import com.alibaba.fastjson.JSONObject; import com.java110.api.bmo.allocationStorehouseApply.IAllocationStorehouseApplyBMO; import com.java110.api.listener.AbstractServiceApiPlusListener; import com.java110.core.annotation.Java110Listener; import com.java110.core.context.DataFlowContext; import com.java110.core.event.service.api.ServiceDataFlowEvent; import com.java110.utils.constant.ServiceCodeAllocationStorehouseApplyConstant; import com.java110.utils.util.Assert; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpMethod; /** * 保存小区侦听 * add by wuxw 2019-06-30 */ @Java110Listener("deleteAllocationStorehouseApplyListener") public class DeleteAllocationStorehouseApplyListener extends AbstractServiceApiPlusListener { @Autowired private IAllocationStorehouseApplyBMO allocationStorehouseApplyBMOImpl; @Override protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); Assert.hasKeyAndValue(reqJson, "applyId", "applyId不能为空"); } @Override protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { allocationStorehouseApplyBMOImpl.deleteAllocationStorehouseApply(reqJson, context); } @Override public String getServiceCode() { return ServiceCodeAllocationStorehouseApplyConstant.DELETE_ALLOCATIONSTOREHOUSEAPPLY; } @Override public HttpMethod getHttpMethod() { return HttpMethod.POST; } }
[ "you@example.com" ]
you@example.com
cbe415e00d97a9cd616d9f4e93dde414df09230a
3952047faf6e91cfb730c725436e8ac58ed02440
/src/main/java/eBay/PaymentHoldDetailType.java
543a5bcd7277e79409935b1541db31cc97b7e6a3
[]
no_license
tomskradski/Achilles
ef1f59f969fe477fba96f50a269e1c144aac9a34
0142e152dfb90c02ad3a9bebfed6920172056912
refs/heads/master
2021-01-01T20:14:43.481189
2017-07-30T15:16:36
2017-07-30T15:16:36
98,798,227
0
0
null
null
null
null
UTF-8
Java
false
false
5,042
java
package eBay; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * * This type defines the <b>PaymentHoldDetails</b> container, which * consists of information related to the payment hold on the order, including the * reason why the buyer's payment for the order is being held, the expected * release date of the funds into the seller's account, and possible action(s) the * seller can take to expedite the payout of funds into their account. * * * <p>Java class for PaymentHoldDetailType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PaymentHoldDetailType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="ExpectedReleaseDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="RequiredSellerActionArray" type="{urn:ebay:apis:eBLBaseComponents}RequiredSellerActionArrayType" minOccurs="0"/> * &lt;element name="NumOfReqSellerActions" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/> * &lt;element name="PaymentHoldReason" type="{urn:ebay:apis:eBLBaseComponents}PaymentHoldReasonCodeType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PaymentHoldDetailType", namespace = "urn:ebay:apis:eBLBaseComponents", propOrder = { "expectedReleaseDate", "requiredSellerActionArray", "numOfReqSellerActions", "paymentHoldReason" }) public class PaymentHoldDetailType { @XmlElement(name = "ExpectedReleaseDate", namespace = "urn:ebay:apis:eBLBaseComponents") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar expectedReleaseDate; @XmlElement(name = "RequiredSellerActionArray", namespace = "urn:ebay:apis:eBLBaseComponents") protected RequiredSellerActionArrayType requiredSellerActionArray; @XmlElement(name = "NumOfReqSellerActions", namespace = "urn:ebay:apis:eBLBaseComponents") protected Integer numOfReqSellerActions; @XmlElement(name = "PaymentHoldReason", namespace = "urn:ebay:apis:eBLBaseComponents") @XmlSchemaType(name = "token") protected PaymentHoldReasonCodeType paymentHoldReason; /** * Gets the value of the expectedReleaseDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getExpectedReleaseDate() { return expectedReleaseDate; } /** * Sets the value of the expectedReleaseDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setExpectedReleaseDate(XMLGregorianCalendar value) { this.expectedReleaseDate = value; } /** * Gets the value of the requiredSellerActionArray property. * * @return * possible object is * {@link RequiredSellerActionArrayType } * */ public RequiredSellerActionArrayType getRequiredSellerActionArray() { return requiredSellerActionArray; } /** * Sets the value of the requiredSellerActionArray property. * * @param value * allowed object is * {@link RequiredSellerActionArrayType } * */ public void setRequiredSellerActionArray(RequiredSellerActionArrayType value) { this.requiredSellerActionArray = value; } /** * Gets the value of the numOfReqSellerActions property. * * @return * possible object is * {@link Integer } * */ public Integer getNumOfReqSellerActions() { return numOfReqSellerActions; } /** * Sets the value of the numOfReqSellerActions property. * * @param value * allowed object is * {@link Integer } * */ public void setNumOfReqSellerActions(Integer value) { this.numOfReqSellerActions = value; } /** * Gets the value of the paymentHoldReason property. * * @return * possible object is * {@link PaymentHoldReasonCodeType } * */ public PaymentHoldReasonCodeType getPaymentHoldReason() { return paymentHoldReason; } /** * Sets the value of the paymentHoldReason property. * * @param value * allowed object is * {@link PaymentHoldReasonCodeType } * */ public void setPaymentHoldReason(PaymentHoldReasonCodeType value) { this.paymentHoldReason = value; } }
[ "tkskradski@gmail.com" ]
tkskradski@gmail.com
a510f0b1f32881bc9e4ff42ee26e4dc339e73147
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_8b7ac9262f890983f8e7793b682ef2ae70f51717/SystemTapTextView/1_8b7ac9262f890983f8e7793b682ef2ae70f51717_SystemTapTextView_t.java
e9fc983872b0effc24f77a21e23dce64757224bc
[]
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
6,705
java
package org.eclipse.linuxtools.callgraph.core; import java.util.Vector; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; public class SystemTapTextView extends SystemTapView{ private static StyledText viewer; private static String text; private static StyleRange[] sr; private static Display display; private static int previousEnd; public static SystemTapParser parser; protected static void cleanViewer() { if (viewer != null && !viewer.isDisposed()) { text = viewer.getText(); sr = viewer.getStyleRanges(); viewer.dispose(); } previousEnd = 0; } protected static void restoreViewerContents() { if (text != null) { viewer.setText(text); viewer.setStyleRanges(sr); } previousEnd = 0; } /** * Passing the focus request to the viewer's control. */ public void setFocus() { if (viewer != null && !viewer.isDisposed()) viewer.setFocus(); } public static void createViewer(Composite parent) { viewer = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP); viewer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); Font font = new Font(parent.getDisplay(), "Monospace", 11, SWT.NORMAL); //$NON-NLS-1$ viewer.setFont(font); masterComposite = parent; display = masterComposite.getDisplay(); } public void prettyPrintln(String text) { Vector<StyleRange> styles = new Vector<StyleRange>(); String[] txt = text.split("\\n"); //$NON-NLS-1$ int lineOffset = 0; int inLineOffset; // txt[] contains text, with one entry for each new line for (int i = 0; i < txt.length; i++) { // Skip blank strings if (txt[i].length() == 0) { viewer.append(PluginConstants.NEW_LINE); continue; } // Search for colour codes, if none exist then continue String[] split_txt = txt[i].split("~\\("); //$NON-NLS-1$ if (split_txt.length == 1) { viewer.append(split_txt[0]); viewer.append(PluginConstants.NEW_LINE); continue; } inLineOffset = 0; for (int k = 0; k < split_txt.length; k++) { // Skip blank substrings if (split_txt[k].length() == 0) continue; // Split for the number codes String[] coloursAndText = split_txt[k].split("\\)~"); //$NON-NLS-1$ // If the string is properly formatted, colours should be length // 2 // If it is not properly formatted, don't colour (just print) if (coloursAndText.length != 2) { for (int j = 0; j < coloursAndText.length; j++) { viewer.append(coloursAndText[j]); inLineOffset += coloursAndText[j].length(); } continue; } // The first element in the array should contain the colours String[] colours = coloursAndText[0].split(","); //$NON-NLS-1$ if (colours.length < 3) continue; // The second element in the array should contain the text viewer.append(coloursAndText[1]); // Create a colour based on the 3 integers (if there are any // more integers, just ignore) int R = new Integer(colours[0].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$ int G = new Integer(colours[1].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$ int B = new Integer(colours[2].replaceAll(" ", "")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$ if (R > 255) R = 255; if (G > 255) G = 255; if (B > 255) B = 255; if (R < 0) R = 0; if (G < 0) G = 0; if (B < 0) B = 0; Color newColor = new Color(display, R, G, B); // Find the offset of the current line lineOffset = viewer.getOffsetAtLine(viewer.getLineCount() - 1); // Create a new style that lasts no further than the length of // the line StyleRange newStyle = new StyleRange(lineOffset + inLineOffset, coloursAndText[1].length(), newColor, null); styles.addElement(newStyle); inLineOffset += coloursAndText[1].length(); } viewer.append(PluginConstants.NEW_LINE); } // Create a new style range StyleRange[] s = new StyleRange[styles.size()]; styles.copyInto(s); int cnt = viewer.getCharCount(); // Using replaceStyleRanges with previousEnd, etc, effectively adds // the StyleRange to the existing set of Style Ranges (so we don't // waste time fudging with old style ranges that haven't changed) viewer.replaceStyleRanges(previousEnd, cnt - previousEnd, s); previousEnd = cnt; // Change focus and update viewer.setTopIndex(viewer.getLineCount() - 1); viewer.update(); } public void println(String text) { if (viewer != null && !viewer.isDisposed()) { viewer.append(text); viewer.setTopIndex(viewer.getLineCount() - 1); viewer.update(); } } public void clearAll() { if (viewer != null && !viewer.isDisposed()) { previousEnd = 0; viewer.setText(""); //$NON-NLS-1$ viewer.update(); } } /** * Testing convenience method to see what was printed * * @return viewer text */ public String getText() { return viewer.getText(); } public static void disposeView() { if (viewer != null && !viewer.isDisposed()) { String tmp = viewer.getText(); StyleRange[] tempRange = viewer.getStyleRanges(); viewer.dispose(); createViewer(masterComposite); viewer.setText(tmp); viewer.setStyleRanges(tempRange); } } @Override public IStatus initialize(Display targetDisplay, IProgressMonitor monitor) { previousEnd = 0; forceDisplay(); return Status.OK_STATUS; } @Override public boolean setParser(SystemTapParser p) { parser = p; return true; } @Override public void createPartControl(Composite parent) { createViewer(parent); } /** * Force the CallgraphView to initialize */ public static void forceDisplay(){ try { IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); window.getActivePage().showView("org.eclipse.linuxtools.callgraph.core.staptextview").setFocus(); //$NON-NLS-1$ } catch (PartInitException e2) { e2.printStackTrace(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fe183f4612a985e4f7cb329c1dc3666317dbd6ef
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/spring-framework/2015/4/CorsConfiguration.java
d4fabd101f6ba0e51a74e54e2adcb3e80df62f83
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
6,759
java
/* * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.web.cors; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * Represents the CORS configuration that stores various properties used to check if a * CORS request is allowed and to generate CORS response headers. * * @author Sebastien Deleuze * @author Rossen Stoyanchev * @since 4.2 * @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a> */ public class CorsConfiguration { private List<String> allowedOrigins; private List<String> allowedMethods; private List<String> allowedHeaders; private List<String> exposedHeaders; private Boolean allowCredentials; private Long maxAge; public CorsConfiguration() { } public CorsConfiguration(CorsConfiguration config) { if (config.allowedOrigins != null) { this.allowedOrigins = new ArrayList<String>(config.allowedOrigins); } if (config.allowCredentials != null) { this.allowCredentials = config.allowCredentials; } if (config.exposedHeaders != null) { this.exposedHeaders = new ArrayList<String>(config.exposedHeaders); } if (config.allowedMethods != null) { this.allowedMethods = new ArrayList<String>(config.allowedMethods); } if (config.allowedHeaders != null) { this.allowedHeaders = new ArrayList<String>(config.allowedHeaders); } if (config.maxAge != null) { this.maxAge = config.maxAge; } } public CorsConfiguration combine(CorsConfiguration other) { CorsConfiguration config = new CorsConfiguration(this); if (other.getAllowedOrigins() != null) { config.setAllowedOrigins(other.getAllowedOrigins()); } if (other.getAllowedMethods() != null) { config.setAllowedMethods(other.getAllowedMethods()); } if (other.getAllowedHeaders() != null) { config.setAllowedHeaders(other.getAllowedHeaders()); } if (other.getExposedHeaders() != null) { config.setExposedHeaders(other.getExposedHeaders()); } if (other.getMaxAge() != null) { config.setMaxAge(other.getMaxAge()); } if (other.isAllowCredentials() != null) { config.setAllowCredentials(other.isAllowCredentials()); } return config; } /** * @see #setAllowedOrigins(java.util.List) */ public List<String> getAllowedOrigins() { if (this.allowedOrigins != null) { return this.allowedOrigins.contains("*") ? Arrays.asList("*") : Collections.unmodifiableList(this.allowedOrigins); } return null; } /** * Set allowed allowedOrigins that will define Access-Control-Allow-Origin response * header values (mandatory). For example "http://domain1.com", "http://domain2.com" ... * "*" means that all domains are allowed. */ public void setAllowedOrigins(List<String> allowedOrigins) { this.allowedOrigins = allowedOrigins; } /** * @see #setAllowedOrigins(java.util.List) */ public void addAllowedOrigin(String allowedOrigin) { if (this.allowedOrigins == null) { this.allowedOrigins = new ArrayList<String>(); } this.allowedOrigins.add(allowedOrigin); } /** * @see #setAllowedMethods(java.util.List) */ public List<String> getAllowedMethods() { return this.allowedMethods == null ? null : Collections.unmodifiableList(this.allowedMethods); } /** * Set allow methods that will define Access-Control-Allow-Methods response header * values. For example "GET", "POST", "PUT" ... "*" means that all methods requested * by the client are allowed. If not set, allowed method is set to "GET". * */ public void setAllowedMethods(List<String> allowedMethods) { this.allowedMethods = allowedMethods; } /** * @see #setAllowedMethods(java.util.List) */ public void addAllowedMethod(String allowedMethod) { if (this.allowedMethods == null) { this.allowedMethods = new ArrayList<String>(); } this.allowedMethods.add(allowedMethod); } /** * @see #setAllowedHeaders(java.util.List) */ public List<String> getAllowedHeaders() { return this.allowedHeaders == null ? null : Collections.unmodifiableList(this.allowedHeaders); } /** * Set a list of request headers that will define Access-Control-Allow-Methods response * header values. If a header field name is one of the following, it is not required * to be listed: Cache-Control, Content-Language, Expires, Last-Modified, Pragma. * "*" means that all headers asked by the client will be allowed. */ public void setAllowedHeaders(List<String> allowedHeaders) { this.allowedHeaders = allowedHeaders; } /** * @see #setAllowedHeaders(java.util.List) */ public void addAllowedHeader(String allowedHeader) { if (this.allowedHeaders == null) { this.allowedHeaders = new ArrayList<String>(); } this.allowedHeaders.add(allowedHeader); } /** * @see #setExposedHeaders(java.util.List) */ public List<String> getExposedHeaders() { return this.exposedHeaders == null ? null : Collections.unmodifiableList(this.exposedHeaders); } /** * Set a list of response headers other than simple headers that the resource might use * and can be exposed. Simple response headers are: Cache-Control, Content-Language, * Content-Type, Expires, Last-Modified, Pragma. */ public void setExposedHeaders(List<String> exposedHeaders) { this.exposedHeaders = exposedHeaders; } /** * @see #setExposedHeaders(java.util.List) */ public void addExposedHeader(String exposedHeader) { if (this.exposedHeaders == null) { this.exposedHeaders = new ArrayList<String>(); } this.exposedHeaders.add(exposedHeader); } /** * @see #setAllowCredentials(Boolean) */ public Boolean isAllowCredentials() { return this.allowCredentials; } /** * Indicates whether the resource supports user credentials. * Set the value of Access-Control-Allow-Credentials response header. */ public void setAllowCredentials(Boolean allowCredentials) { this.allowCredentials = allowCredentials; } /** * @see #setMaxAge(Long) */ public Long getMaxAge() { return maxAge; } /** * Indicates how long (seconds) the results of a preflight request can be cached * in a preflight result cache. */ public void setMaxAge(Long maxAge) { this.maxAge = maxAge; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
841c68dde37671e0a83933d7be2f1bcc2fd36e14
a03ddb4111faca852088ea25738bc8b3657e7b5c
/TestTransit/src/com/android/volley/toolbox/StringRequest.java
a6efcc7fb6f37fd799253ea6c7dbe93bf458c69f
[]
no_license
randhika/TestMM
5f0de3aee77b45ca00f59cac227450e79abc801f
4278b34cfe421bcfb8c4e218981069a7d7505628
refs/heads/master
2020-12-26T20:48:28.446555
2014-09-29T14:37:51
2014-09-29T14:37:51
24,874,176
2
0
null
null
null
null
UTF-8
Java
false
false
1,678
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.android.volley.toolbox; import com.android.volley.NetworkResponse; import com.android.volley.Request; import com.android.volley.Response; import java.io.UnsupportedEncodingException; // Referenced classes of package com.android.volley.toolbox: // HttpHeaderParser public class StringRequest extends Request { private final com.android.volley.Response.Listener mListener; public StringRequest(int i, String s, com.android.volley.Response.Listener listener, com.android.volley.Response.ErrorListener errorlistener) { super(i, s, errorlistener); mListener = listener; } public StringRequest(String s, com.android.volley.Response.Listener listener, com.android.volley.Response.ErrorListener errorlistener) { this(0, s, listener, errorlistener); } protected volatile void deliverResponse(Object obj) { deliverResponse((String)obj); } protected void deliverResponse(String s) { mListener.onResponse(s); } protected Response parseNetworkResponse(NetworkResponse networkresponse) { String s; try { s = new String(networkresponse.data, HttpHeaderParser.parseCharset(networkresponse.headers)); } catch (UnsupportedEncodingException unsupportedencodingexception) { s = new String(networkresponse.data); } return Response.success(s, HttpHeaderParser.parseCacheHeaders(networkresponse)); } }
[ "metromancn@gmail.com" ]
metromancn@gmail.com
b1c469513f858336b9cfe43334b9685bfbf8fc28
980cd2a67564e499016a65042178b4ad4a10b00b
/src/day27_DateTime/Notes.java
42138ef9c017f043105b673ecd396a5289f6dac8
[]
no_license
Marat311/Spring2020_JavaPractice
be4463497c555abafd5604b19c23f7d0ca7c407f
278076f8e294587b7436e37bd91a7a9d8c5a39be
refs/heads/master
2022-08-26T10:40:56.892256
2020-05-28T17:33:31
2020-05-28T17:33:31
257,803,746
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package day27_DateTime; public class Notes { /* Topics: LocalDate Date & Time Formatting package name: day27_DateTime Warmup task: 1. write a return method that can return the minimum number from an int array 2. write a return method that can return the minimum number from a double array NOTE: apply method overloading, DO NOT USE SORT METHOD. 3. write a method that can print out the unique elements from an int array Ex: {1,1,2,3,3} ==> 2 {6,6,7,7,8,9} ==> 8 9 4. write a method that can print out the unique elements from a double array Note: Apply method overloading LocalDate: used for creating date (year, months, days) default pattern: year-month-days LocalDate.of() LocalDate.now() methods: isAfter(): returns boolean isBefore(): returns boolean isEqual(): returns boolean isLeapyear(): returns boolean toString(): format(DateTimeFormatter): returns String DateTimeFormatter: DateTimeFormatter dtf = DateTimeFormatter.ofPattern("") year: yy, yyyy Month: MM(number), MMM(three letters), MMMM(full name) days: dd days name: E(three letters), EEEE(full name) Canvas - > Java -> modules -> day27 -> Methods short quiz due by 12:35 LocalTime: hours, minutes, second */ }
[ "marinavelitskaia@gmail.com" ]
marinavelitskaia@gmail.com
47d417a219f02bb9ab3c1ac7b92e7d71000735a7
1cedb98670494d598273ca8933b9d989e7573291
/ezyfox-server-util/src/test/java/com/tvd12/ezyfoxserver/testing/io/EzyMapsTest.java
5cb552b86602d0ac9eae3b681035258d3c9f0ffb
[ "Apache-2.0" ]
permissive
thanhdatbkhn/ezyfox-server
ee00e1e23a2b38597bac94de7103bdc3a0e0bedf
069e70c8a7d962df8341444658b198ffadc3ce61
refs/heads/master
2020-03-10T11:08:10.921451
2018-01-14T16:50:37
2018-01-14T16:50:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,065
java
package com.tvd12.ezyfoxserver.testing.io; import static org.testng.Assert.assertEquals; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.testng.annotations.Test; import com.google.common.collect.Lists; import com.google.common.collect.Sets; import com.tvd12.ezyfoxserver.io.EzyMaps; import com.tvd12.ezyfoxserver.util.EzyMapBuilder; import com.tvd12.test.base.BaseTest; public class EzyMapsTest extends BaseTest { @Test public void test() { Map<Object, Object> map = new HashMap<>(); ClassA classA = new ClassA(); ClassD classD = new ClassD(); ClassJ classJ = new ClassJ(); map.put(InterfaceA.class, classA); map.put(ClassD.class, classD); map.put(ClassF.class, classJ); assert EzyMaps.getValue(map, ClassA.class) == classA; assert EzyMaps.getValue(map, ClassE.class) == classD; assert EzyMaps.getValue(map, ClassJ.class) == classJ; } @Test public void test2() { Map<String, String> map = new HashMap<>(); map.put("1", "a"); map.put("2", "b"); assertEquals(EzyMaps.getValueList(map), new ArrayList<>(map.values())); assertEquals(EzyMaps.getValueSet(map), new HashSet<>(map.values())); } @Test public void test3() { Map<String, String> map = new HashMap<>(); map.put("1", "a"); map.put("2", "b"); map.put("3", "c"); Map<Long, String> map1 = EzyMaps.newHashMapNewKeys(map, (k) -> Long.valueOf(k)); assertEquals(map1.keySet(), Sets.newHashSet(1L, 2L, 3L)); assertEquals(map1.values(), Sets.newHashSet("a", "b", "c")); } @Test public void test4() { Collection<String> coll = Sets.newHashSet("1", "2", "3"); Map<Long, String> map = EzyMaps.newHashMap(coll, (v)->Long.valueOf(v)); assertEquals(map.keySet(), Sets.newHashSet(1L, 2L, 3L)); assertEquals(map.values(), Sets.newHashSet("1", "2", "3")); } @Test public void test5() { Map<String, String> map = new HashMap<>(); map.put("1", "a"); map.put("2", "b"); map.put("3", "c"); Map<String, Character> map1 = EzyMaps.newHashMapNewValues(map, (v) -> v.charAt(0)); assertEquals(map1.keySet(), Sets.newHashSet("1", "2", "3")); assertEquals(map1.values(), Sets.newHashSet('a', 'b', 'c')); } @Test public void test6() { Map<String, String> map = new HashMap<>(); map.put("1", "a"); map.put("2", "b"); map.put("3", "c"); Map<String, String> map1 = EzyMaps.getValues(map, Lists.newArrayList("1", "2", "5")); assertEquals(map1.values(), Sets.newHashSet("a", "b")); } @Test public void test7() { Map<String, String> map = new HashMap<>(); map.put("1", "a"); map.put("2", "b"); map.put("3", "c"); List<String> list = EzyMaps.getValues(map, (v) -> !v.startsWith("b")); assertEquals(list, Lists.newArrayList("a", "c")); } @Test public void test8() { Map<String, List<String>> map = new HashMap<>(); EzyMaps.addItemsToList(map, "1", "a", "b", "c", "d", "e"); assertEquals(map.get("1"), Lists.newArrayList("a", "b", "c", "d", "e")); EzyMaps.removeItems(map, "2", "d", "e"); EzyMaps.removeItems(map, "1", "d", "e"); assertEquals(map.get("1"), Lists.newArrayList("a", "b", "c")); } @Test public void test9() { Map<String, Set<String>> map = new HashMap<>(); EzyMaps.addItemsToSet(map, "1", "a", "b", "c", "d", "e"); assertEquals(map.get("1"), Sets.newHashSet("a", "b", "c", "d", "e")); } @Test public void test1() { assert EzyMaps.getValue(new HashMap<>(), Object.class) == null; } @Test public void test10() { Map<String, String> map = EzyMaps.newHashMap("a", "b"); assert map.get("a").equals("b"); } @SuppressWarnings("unchecked") @Test public void test11() { Map<String, String> map1 = EzyMapBuilder.mapBuilder() .put("1", "a") .put("2", "b") .put("3", "c") .build(); Map<String, String> map2 = EzyMapBuilder.mapBuilder() .put("1", "a") .put("3", "c") .build(); assert EzyMaps.containsAll(map1, map2); Map<String, String> map1a = EzyMapBuilder.mapBuilder() .put("1", "a") .put("2", "b") .put("3", "c") .build(); Map<String, String> map2a = EzyMapBuilder.mapBuilder() .put("1", "a") .put("2", "f") .build(); assert !EzyMaps.containsAll(map1a, map2a); Map<String, String> map1b = EzyMapBuilder.mapBuilder() .put("1", "a") .put("2", "b") .put("3", "c") .build(); Map<String, String> map2b = EzyMapBuilder.mapBuilder() .put("x", "a") .put("y", "f") .build(); assert !EzyMaps.containsAll(map1b, map2b); } @Override public Class<?> getTestClass() { return EzyMaps.class; } public static interface InterfaceA { } public static interface InterfaceB { } public static class ClassA implements InterfaceA { } public static class ClassB extends ClassA { } public static class ClassD { } public static class ClassE extends ClassD { } public static class ClassF { } public static class ClassJ extends ClassF implements InterfaceB { } }
[ "itprono3@gmail.com" ]
itprono3@gmail.com
d4be2ee0424bfc7dbd89948ed8ffa6515488f434
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
/bin/platform/bootstrap/gensrc/de/hybris/platform/core/model/security/UserRightModel.java
463c8afab7cf70c3f28b1468a5cf866a68edeac2
[]
no_license
lun130220/hybris
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
03c074ea76779f96f2db7efcdaa0b0538d1ce917
refs/heads/master
2021-05-14T01:48:42.351698
2018-01-07T07:21:53
2018-01-07T07:21:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,113
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at 2018/1/7 下午 03:03:30 --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("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 hybris. * */ package de.hybris.platform.core.model.security; import de.hybris.bootstrap.annotations.Accessor; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import java.util.Locale; /** * Generated model class for type UserRight first defined at extension core. */ @SuppressWarnings("all") public class UserRightModel extends ItemModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "UserRight"; /** <i>Generated constant</i> - Attribute key of <code>UserRight.code</code> attribute defined at extension <code>core</code>. */ public static final String CODE = "code"; /** <i>Generated constant</i> - Attribute key of <code>UserRight.name</code> attribute defined at extension <code>core</code>. */ public static final String NAME = "name"; /** <i>Generated variable</i> - Variable of <code>UserRight.code</code> attribute defined at extension <code>core</code>. */ private String _code; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public UserRightModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public UserRightModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>UserRight</code> at extension <code>core</code> */ @Deprecated public UserRightModel(final String _code) { super(); setCode(_code); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _code initial attribute declared by type <code>UserRight</code> at extension <code>core</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> */ @Deprecated public UserRightModel(final String _code, final ItemModel _owner) { super(); setCode(_code); setOwner(_owner); } /** * <i>Generated method</i> - Getter of the <code>UserRight.code</code> attribute defined at extension <code>core</code>. * @return the code */ @Accessor(qualifier = "code", type = Accessor.Type.GETTER) public String getCode() { if (this._code!=null) { return _code; } return _code = getPersistenceContext().getValue(CODE, _code); } /** * <i>Generated method</i> - Getter of the <code>UserRight.name</code> attribute defined at extension <code>core</code>. * @return the name */ @Accessor(qualifier = "name", type = Accessor.Type.GETTER) public String getName() { return getName(null); } /** * <i>Generated method</i> - Getter of the <code>UserRight.name</code> attribute defined at extension <code>core</code>. * @param loc the value localization key * @return the name * @throws IllegalArgumentException if localization key cannot be mapped to data language */ @Accessor(qualifier = "name", type = Accessor.Type.GETTER) public String getName(final Locale loc) { return getPersistenceContext().getLocalizedValue(NAME, loc); } /** * <i>Generated method</i> - Setter of <code>UserRight.code</code> attribute defined at extension <code>core</code>. * * @param value the code */ @Accessor(qualifier = "code", type = Accessor.Type.SETTER) public void setCode(final String value) { _code = getPersistenceContext().setValue(CODE, value); } /** * <i>Generated method</i> - Setter of <code>UserRight.name</code> attribute defined at extension <code>core</code>. * * @param value the name */ @Accessor(qualifier = "name", type = Accessor.Type.SETTER) public void setName(final String value) { setName(value,null); } /** * <i>Generated method</i> - Setter of <code>UserRight.name</code> attribute defined at extension <code>core</code>. * * @param value the name * @param loc the value localization key * @throws IllegalArgumentException if localization key cannot be mapped to data language */ @Accessor(qualifier = "name", type = Accessor.Type.SETTER) public void setName(final String value, final Locale loc) { getPersistenceContext().setLocalizedValue(NAME, loc, value); } }
[ "lun130220@gamil.com" ]
lun130220@gamil.com
ae73f29e454f8ebe0d281db75bae5bb59d8af766
cad0e8d89ed12ec565253b9070af60d9c09e3469
/NavigationDrawerConTabs/app/src/main/java/co/quindio/sena/navigationdrawerejemplo/clases/Utilidades.java
dd159364452ef73f36fea694e16327eda4a2c661
[]
no_license
camacho20/curso-android-codejavu
6301663d928072ac0dcb01438f4b257908c30604
bee407f56c395ac201c8003c07f9237529e49bff
refs/heads/master
2020-11-25T13:26:42.137181
2020-06-30T19:49:03
2020-06-30T19:49:03
228,685,851
0
0
null
2019-12-17T19:20:38
2019-12-17T19:20:37
null
UTF-8
Java
false
false
212
java
package co.quindio.sena.navigationdrawerejemplo.clases; /** * Created by CHENAO on 1/07/2017. */ public class Utilidades { public static int rotacion=0; public static boolean validaPantalla=true; }
[ "cdhenao@gmail.com" ]
cdhenao@gmail.com
f23467b3cbef84faa54b5b266a8093fd23a85935
b74bc2324c6b6917d24e1389f1cf95936731643f
/basedata/src/main/java/com/wuyizhiye/basedata/workload/model/WorkloadSort.java
7a41c00406e75d9ee74e6a7092df4cbb7d8e42b0
[]
no_license
919126624/Feiying-
ebeb8fcfbded932058347856e2a3f38731821e5e
d3b14ff819cc894dcbe80e980792c08c0eb7167b
refs/heads/master
2021-01-13T00:40:59.447803
2016-03-24T03:41:30
2016-03-24T03:41:30
54,537,727
1
1
null
null
null
null
UTF-8
Java
false
false
449
java
package com.wuyizhiye.basedata.workload.model; import com.wuyizhiye.basedata.DataEntity; /** * @ClassName WorkloadSort * @Description TODO * @author li.biao * @date 2015-4-3 */ public class WorkloadSort extends DataEntity{ private static final long serialVersionUID = 1L; private String typeValue; public String getTypeValue() { return typeValue; } public void setTypeValue(String typeValue) { this.typeValue = typeValue; } }
[ "919126624@qq.com" ]
919126624@qq.com
f694651a35c2f6689cce4394026e668e82610b63
0ae9e5956cc3363eb26e6039f0f45633a552feba
/src/main/java/com/gifisan/nio/component/concurrent/ExecutorThreadPool.java
3b213f310ac35ea83b713fa42cd656b17d08ae55
[]
no_license
liuzhenfeng511/NimbleIO
79f242c4ccad59c2265807852f7ed607443ef94d
6953f4a7c3f290fa3d81c160839a248e30b66cf2
refs/heads/master
2021-01-18T00:07:02.730682
2016-08-15T09:26:39
2016-08-15T09:26:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,702
java
package com.gifisan.nio.component.concurrent; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import com.gifisan.nio.AbstractLifeCycle; public class ExecutorThreadPool extends AbstractLifeCycle implements ThreadPool{ private int corePoolSize = 4; private int maximumPoolSize = 4 << 4; private long keepAliveTime = 60 * 1000L; private String threadPoolName = "ThreadPool"; public ExecutorThreadPool(String threadPoolName,int corePoolSize) { this.corePoolSize = corePoolSize; this.maximumPoolSize = corePoolSize << 4; this.threadPoolName = threadPoolName; } public ExecutorThreadPool(String threadPoolName,int corePoolSize, int maximumPoolSize) { this.corePoolSize = corePoolSize; this.maximumPoolSize = maximumPoolSize; this.threadPoolName = threadPoolName; } public ExecutorThreadPool(String threadPoolName,int corePoolSize, int maximumPoolSize, long keepAliveTime) { this.corePoolSize = corePoolSize; this.maximumPoolSize = maximumPoolSize; this.keepAliveTime = keepAliveTime; this.threadPoolName = threadPoolName; } private ThreadPoolExecutor poolExecutor ; public void dispatch(Runnable job) { this.poolExecutor.execute(job); } protected void doStart() throws Exception { NamedThreadFactory threadFactory = new NamedThreadFactory(threadPoolName); poolExecutor = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<Runnable>(corePoolSize * 1024 << 8), threadFactory); } protected void doStop() throws Exception { if (poolExecutor != null) { poolExecutor.shutdown(); } } }
[ "8738115@qq.com" ]
8738115@qq.com
6dc011b5d7dbaeaed74456014be4bff6a734026b
19b0ddc45e90a6d938bacc65648d805a941fc90d
/Server/RuleEngine-Common/src/engine/rule/domain/CheckFirstContactSoundForPDLForPDL.java
ad7dfafc4df3c33f86809c54a34c012aab722f38
[]
no_license
dachengzi-software/ap
bec5371a4004eb318258646a7e34fc0352e641c2
ccca3d6c4fb86a698a064c3005eba2b405e8d822
refs/heads/master
2021-12-23T09:26:24.595456
2017-11-10T02:33:18
2017-11-10T02:33:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
416
java
package engine.rule.domain; import com.huateng.toprules.core.annotation.ModelDomainInstance; @ModelDomainInstance(label = "PDL-第一联系人电话审核V3_申请人声音和背景音与常识推断", type = "number", adapter = "engine.rule.domain.adapter.EnumDomainAdapter", params = "X_CheckFirstContactSoundForPDL,Catfish.Platform.ManualJobV4.PDLHandlers") public class CheckFirstContactSoundForPDLForPDL{ }
[ "gum@fenqi.im" ]
gum@fenqi.im
1321790bde9f368c39eaa8e5f35dbfe2be3d7453
47761f5843a42ec5ce4b0e4a5ab23579e8c44959
/src/main/java/com/geniisys/giac/entity/GIACAgingRiSoaDetails.java
5e96c1968e0e680bb4706edd2e1ff4bc6ba21084
[]
no_license
jabautista/GeniisysSCA
df6171c27594638193949df1a65c679444d51b9f
6dc1b21386453240f0632f37f00344df07f6bedd
refs/heads/development
2021-01-19T20:54:11.936774
2017-04-20T02:05:41
2017-04-20T02:05:41
88,571,440
2
0
null
2017-08-02T01:48:59
2017-04-18T02:18:03
PLSQL
UTF-8
Java
false
false
1,792
java
package com.geniisys.giac.entity; import java.math.BigDecimal; import com.geniisys.framework.util.BaseEntity; public class GIACAgingRiSoaDetails extends BaseEntity { private Integer a180RiCd; private Integer premSeqNo; private Integer instNo; private String a150LineCd; private BigDecimal totalAmountDue; private BigDecimal totalPayments; private BigDecimal tempPayments; private BigDecimal balanceDue; private Integer a020AssdNo; public Integer getA180RiCd() { return a180RiCd; } public void setA180RiCd(Integer a180RiCd) { this.a180RiCd = a180RiCd; } public Integer getPremSeqNo() { return premSeqNo; } public void setPremSeqNo(Integer premSeqNo) { this.premSeqNo = premSeqNo; } public Integer getInstNo() { return instNo; } public void setInstNo(Integer instNo) { this.instNo = instNo; } public String getA150LineCd() { return a150LineCd; } public void setA150LineCd(String a150LineCd) { this.a150LineCd = a150LineCd; } public BigDecimal getTotalAmountDue() { return totalAmountDue; } public void setTotalAmountDue(BigDecimal totalAmountDue) { this.totalAmountDue = totalAmountDue; } public BigDecimal getTotalPayments() { return totalPayments; } public void setTotalPayments(BigDecimal totalPayments) { this.totalPayments = totalPayments; } public BigDecimal getTempPayments() { return tempPayments; } public void setTempPayments(BigDecimal tempPayments) { this.tempPayments = tempPayments; } public BigDecimal getBalanceDue() { return balanceDue; } public void setBalanceDue(BigDecimal balanceDue) { this.balanceDue = balanceDue; } public Integer getA020AssdNo() { return a020AssdNo; } public void setA020AssdNo(Integer a020AssdNo) { this.a020AssdNo = a020AssdNo; } }
[ "jeromecris.bautista@gmail.com" ]
jeromecris.bautista@gmail.com