blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
c5b6761d01b0bf9dd5246a3605cf9ef7dc97f7bd
35ad16e06f076d84ec8980d1605703988793bc6d
/src/refactor/adapter/xml/DOMBuilder.java
a4c1416f5a46f300f85d65cc136c4c74c2c8ded1
[]
no_license
janipeng/refactor_adapter_pattern
0869b50b38ebb255e6f9b008a829f8832b7f6503
63b43ea3336b9e906feaacdacd275d9af2439465
refs/heads/master
2021-08-20T08:33:35.842376
2017-11-28T15:58:50
2017-11-28T15:58:50
112,191,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,022
java
package refactor.adapter.xml; import org.apache.xerces.dom.DocumentImpl; import org.apache.xml.serialize.OutputFormat; import org.apache.xml.serialize.XMLSerializer; import org.w3c.dom.Document; import java.io.IOException; import java.io.StringWriter; public class DOMBuilder extends AbstractBuilder { private Document doc; public DOMBuilder(String rootName) { init(rootName); } public Document getDocument() { return doc; } protected void init(String rootName) { doc = new DocumentImpl(); root = new ElementAdapter(doc.createElement(rootName), doc); doc.appendChild(root.getElement()); commonInit(); } public String toString() { OutputFormat format = new OutputFormat(doc); StringWriter stringOut = new StringWriter(); XMLSerializer serial = new XMLSerializer(stringOut, format); try { serial.asDOMSerializer(); serial.serialize(doc.getDocumentElement()); } catch (IOException ioe) { ioe.printStackTrace(); return ioe.getMessage(); } return stringOut.toString(); } }
[ "1184360257@qq.com" ]
1184360257@qq.com
d19e8ce4978a575df031f15ed093e8a960c6da77
75950d61f2e7517f3fe4c32f0109b203d41466bf
/tests/tags/ci-1.8/test-timer-implementation/src/main/java/org/fabric3/tests/timer/TransactionalTimedComponent.java
03964e167da7acbe226715187f9e0768b39b3716
[ "Apache-2.0" ]
permissive
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
2,528
java
/* * Fabric3 * Copyright (c) 2009 Metaform Systems * * Fabric3 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at your option) any later version, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the * GNU General Public License along with Fabric3. * If not, see <http://www.gnu.org/licenses/>. */ package org.fabric3.tests.timer; import javax.transaction.Status; import javax.transaction.SystemException; import javax.transaction.TransactionManager; import org.oasisopen.sca.ServiceRuntimeException; import org.oasisopen.sca.annotation.Reference; import org.fabric3.api.annotation.Resource; /** * @version $Rev$ $Date$ */ public class TransactionalTimedComponent implements Runnable { @Reference protected LatchService latchService; @Resource protected TransactionManager tm; public void run() { try { if (Status.STATUS_ACTIVE != tm.getStatus()) { throw new ServiceRuntimeException("Transaction must be active"); } } catch (SystemException e) { throw new ServiceRuntimeException("Transaction must be active"); } latchService.countDown(); } }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
3631aa5d1e64a81837b578ee1c6c01faba12a29e
eb7deb6fc59054bab1aab380c958a1673e5d290c
/src/main/java/seng302/controllers/spellingtutor/SpellingTutorPopUpController.java
f6d53d4ad8ab9447dc31012333522f20dd6b5dd0
[ "MIT" ]
permissive
South-Paw/Xinity
d8696b4068b3a6a9897c63bc5ff5476445e6a6dc
14a40e08156024470e9bc6e3af4b7e1959ad01b7
refs/heads/master
2020-07-12T10:18:32.938048
2017-01-19T06:08:09
2017-01-19T06:08:09
73,911,047
2
1
null
null
null
null
UTF-8
Java
false
false
2,953
java
package seng302.controllers.spellingtutor; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.CheckBox; import javafx.scene.control.TextField; import org.controlsfx.control.CheckComboBox; import seng302.command.Command; import seng302.command.tutor.ChordSpellingTutor; import seng302.controllers.commontutor.TutorPopUpController; import seng302.util.enumerator.ChordQuality; import java.util.ArrayList; import java.util.List; /** * Controller class for the spelling tutor pop up. */ public class SpellingTutorPopUpController extends TutorPopUpController { private static SpellingTutorPopUpController spellingTutorPopUpController; @FXML private TextField numberOfQuestionsField; @FXML private CheckComboBox chordConstraintDropDown; @FXML private CheckBox noEnharmonicsCheckBox; @FXML private CheckBox randomNotesCheckBox; /** * Constructor for class. */ public SpellingTutorPopUpController() { spellingTutorPopUpController = this; } /** * Used to get the instance of the Tutor Pop Up Controller. * * @return The Tutor Pop Up Controller. */ public static SpellingTutorPopUpController getInstance() { return spellingTutorPopUpController; } /** * Initialise function for when this scene is loaded. */ @SuppressWarnings("Unused") public void initialize() { // Adds all the chord types to the drop down and checks them all ObservableList<String> constraints = FXCollections.observableArrayList(); for (ChordQuality quality: ChordQuality.values()) { String qualityString = quality.getChordQualities().get(0); if (!qualityString.equalsIgnoreCase("unknown")) { constraints.addAll(qualityString); } } chordConstraintDropDown.getItems().addAll(constraints); for (Integer index = 0; index < constraints.size(); index++) { chordConstraintDropDown.getCheckModel().checkIndices(index); } } /** * Handles the start test button being pressed. */ protected void startTestButtonHandler() { List<String> arguments = new ArrayList<>(); List<String> constraintList = chordConstraintDropDown.getCheckModel().getCheckedItems(); arguments.add("x" + numberOfQuestionsField.getText()); for (String constraint: constraintList) { arguments.add(constraint); } if (noEnharmonicsCheckBox.isSelected()) { arguments.add("noEnharmonic"); } if (randomNotesCheckBox.isSelected()) { arguments.add("randomNotes"); } Command spellingTutor = new ChordSpellingTutor(arguments); Boolean validTestValue = isNumberOfTestsValid(numberOfQuestionsField); startTestThroughDsl(spellingTutor, validTestValue); } }
[ "alex@netspeed.net.nz" ]
alex@netspeed.net.nz
1a471528315a6ab26d50a9e9e6f3f304eedb7ba7
77836d266eb9eb1c8ff4d9009bcacf7d518800ae
/src/main/java/com/battcn/service/system/OrderService.java
cbc6b5b783aa71cda24a6f0cd9babd281076156a
[]
no_license
Lida52jiao/hkjgj
6a5e2fd064194978a0e56da7009a8ef897c5e567
1ea4ee57f6d8a20ce56e82e3aeefc64ae330b5f4
refs/heads/master
2022-12-20T10:51:40.252902
2019-12-04T07:20:11
2019-12-04T07:20:11
225,811,746
0
0
null
2022-12-16T06:23:38
2019-12-04T08:01:27
Java
UTF-8
Java
false
false
172
java
package com.battcn.service.system; import com.battcn.entity.Orders; import com.battcn.service.BaseService; public interface OrderService extends BaseService<Orders> { }
[ "875217102@qq.com" ]
875217102@qq.com
ab8f52d550257f5226a40e2da17bd03eba24e02b
caf5ab8817d9fcf85483e4ae233ce18e218ca03e
/app/src/main/java/me/fmy/galaxy_a7/models/Constants.java
f139c74447c7c55df010cda2dc91318c03f0ea62
[]
no_license
famepram/galaxyA7
e85b3b07675164ad9bf40ea30604895269a27e70
5c3b153db4d371b98eadbae22c9d9d2bac61a741
refs/heads/master
2021-07-15T00:15:30.497832
2017-10-19T04:09:28
2017-10-19T04:09:28
107,496,954
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
package me.fmy.galaxy_a7.models; /** * Created by Femmy on 7/24/2016. */ public class Constants { public int DATABASE_VERSION = 1; public String DATABASE_NAME = "galaxyA7"; public String TABLE_USER = "user"; }
[ "femmy.pramana@gmail.com" ]
femmy.pramana@gmail.com
8bf53e6fd538ea09d25c4736299bbce83e2df18e
ceabd99652df1e87ce56840b3a514190aa002d0a
/src/main/java/net/billforward/model/usage/UsageState.java
47f8ea74e34d55925b9919affe4aed0d28827898
[]
no_license
billforward/bf-java
d777666582c6b28f11af4f33753c37c92a966183
522fde77e47e79bdac41d76ee6725021fca5210b
refs/heads/master
2021-01-21T04:54:08.394332
2016-04-06T11:23:13
2016-04-06T11:23:13
23,771,428
0
0
null
2015-02-06T15:46:30
2014-09-07T21:24:41
Java
UTF-8
Java
false
false
84
java
package net.billforward.model.usage; public enum UsageState { Active, Historic }
[ "ian.saunders@c4nsult.com" ]
ian.saunders@c4nsult.com
f47dc6a7fc4994d9367cb78cfd0505bc2743a115
7b0521dfb4ec76ee1632b614f32ee532f4626ea2
/src/main/java/alcoholmod/Mathioks/Final/Summons/Entity/SummonEnderShinobiEntity.java
913f4dffc4e757466bc5501f6418c6bcdc683156
[]
no_license
M9wo/NarutoUnderworld
6c5be180ab3a00b4664fd74f6305e7a1b50fe9fc
948065d8d43b0020443c0020775991b91f01dd50
refs/heads/master
2023-06-29T09:27:24.629868
2021-07-27T03:18:08
2021-07-27T03:18:08
389,832,397
0
0
null
null
null
null
UTF-8
Java
false
false
22,621
java
package alcoholmod.Mathioks.Final.Summons.Entity; import alcoholmod.Mathioks.AlcoholMod; import alcoholmod.Mathioks.ExtendedPlayer; import alcoholmod.Mathioks.ExtraFunctions.SyncChakraExperienceMessage; import alcoholmod.Mathioks.PacketDispatcher; import cpw.mods.fml.common.eventhandler.Event; import cpw.mods.fml.common.network.simpleimpl.IMessage; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EnumCreatureAttribute; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAIFollowOwner; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget; import net.minecraft.entity.ai.EntityAIOwnerHurtTarget; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.ai.attributes.IAttributeInstance; import net.minecraft.entity.passive.EntityTameable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.ChatComponentText; import net.minecraft.util.DamageSource; import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.util.Vec3; import net.minecraft.world.EnumDifficulty; import net.minecraft.world.EnumSkyBlock; import net.minecraft.world.World; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.living.EnderTeleportEvent; public class SummonEnderShinobiEntity extends EntityTameable { public int deathTicks; private static boolean[] carriableBlocks = new boolean[256]; private int teleportDelay; private int stareTimer; private Entity lastEntityToAttack; private boolean isAggressive; public SummonEnderShinobiEntity(World par1World) { super(par1World); this.tasks.addTask(4, (EntityAIBase)new EntityAIAttackOnCollide((EntityCreature)this, 1.0D, true)); this.tasks.addTask(5, (EntityAIBase)new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F)); this.tasks.addTask(7, (EntityAIBase)new EntityAIWander((EntityCreature)this, 1.0D)); this.tasks.addTask(8, (EntityAIBase)new EntityAIWatchClosest((EntityLiving)this, EntityPlayer.class, 8.0F)); this.tasks.addTask(9, (EntityAIBase)new EntityAILookIdle((EntityLiving)this)); this.targetTasks.addTask(1, (EntityAIBase)new EntityAIOwnerHurtByTarget(this)); this.targetTasks.addTask(2, (EntityAIBase)new EntityAIOwnerHurtTarget(this)); this.targetTasks.addTask(3, (EntityAIBase)new EntityAIHurtByTarget((EntityCreature)this, true)); this.tasks.addTask(10, (EntityAIBase)new EntityAISwimming((EntityLiving)this)); setSize(0.6F, 2.9F); } protected void applyEntityAttributes() { super.applyEntityAttributes(); getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(50.0D); getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.4D); } protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(18, new Byte((byte)0)); } public void onLivingUpdate() { if (isWet()) attackEntityFrom(DamageSource.drown, 1.0F); if (this.lastEntityToAttack != this.entityToAttack) { IAttributeInstance iattributeinstance = getEntityAttribute(SharedMonsterAttributes.movementSpeed); if (this.entityToAttack != null); } this.lastEntityToAttack = this.entityToAttack; for (int k = 0; k < 2; k++) this.worldObj.spawnParticle("portal", this.posX + (this.rand.nextDouble() - 0.5D) * this.width, this.posY + this.rand.nextDouble() * this.height - 0.25D, this.posZ + (this.rand.nextDouble() - 0.5D) * this.width, (this.rand.nextDouble() - 0.5D) * 2.0D, -this.rand.nextDouble(), (this.rand.nextDouble() - 0.5D) * 2.0D); if (this.worldObj.isDaytime() && !this.worldObj.isRemote) { float f = getBrightness(1.0F); if (f > 0.5F && this.worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)) && this.rand.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { this.entityToAttack = null; setScreaming(false); this.isAggressive = false; teleportRandomly(); } } if (isWet() || isBurning()) { this.entityToAttack = null; setScreaming(false); this.isAggressive = false; teleportRandomly(); } if (isScreaming() && !this.isAggressive && this.rand.nextInt(100) == 0) setScreaming(false); this.isJumping = false; if (this.entityToAttack != null) faceEntity(this.entityToAttack, 100.0F, 100.0F); if (!this.worldObj.isRemote && isEntityAlive()) if (this.entityToAttack != null) { if (this.entityToAttack.getDistanceSqToEntity((Entity)this) < 16.0D) teleportRandomly(); if (this.entityToAttack != null) { this.teleportDelay = 0; } else if (this.entityToAttack.getDistanceSqToEntity((Entity)this) > 256.0D && this.teleportDelay++ >= 30 && teleportToEntity(this.entityToAttack)) { this.teleportDelay = 0; } } else { setScreaming(false); this.teleportDelay = 0; } super.onLivingUpdate(); } public void onKillEntity(EntityLivingBase p_70074_1_) { super.onKillEntity(p_70074_1_); if (getOwner() != null && getOwner() instanceof EntityPlayer && !(p_70074_1_ instanceof net.minecraft.entity.passive.EntityAnimal) && !(p_70074_1_ instanceof net.minecraft.entity.passive.EntityWaterMob)) { EntityPlayer owner = (EntityPlayer)getOwner(); ExtendedPlayer props = ExtendedPlayer.get(owner); props.setChakraExperience(props.getChakraExperience() + 1); PacketDispatcher.sendTo((IMessage)new SyncChakraExperienceMessage(owner), (EntityPlayerMP)owner); } } protected void dropRareDrop(int p_70600_1_) { entityDropItem(new ItemStack(AlcoholMod.SummonEnderShinobi, 1, 1), 0.0F); } protected boolean teleportRandomly() { double d0 = this.posX + (this.rand.nextDouble() - 0.5D) * 64.0D; double d1 = this.posY + (this.rand.nextInt(64) - 32); double d2 = this.posZ + (this.rand.nextDouble() - 0.5D) * 64.0D; return teleportTo(d0, d1, d2); } public boolean isScreaming() { return (this.dataWatcher.getWatchableObjectByte(18) > 0); } public void setScreaming(boolean p_70819_1_) { this.dataWatcher.updateObject(18, Byte.valueOf((byte)(p_70819_1_ ? 1 : 0))); } protected boolean teleportToEntity(Entity p_70816_1_) { Vec3 vec3 = Vec3.createVectorHelper(this.posX - p_70816_1_.posX, this.boundingBox.minY + (this.height / 2.0F) - p_70816_1_.posY + p_70816_1_.getEyeHeight(), this.posZ - p_70816_1_.posZ); vec3 = vec3.normalize(); double d0 = 16.0D; double d1 = this.posX + (this.rand.nextDouble() - 0.5D) * 8.0D - vec3.xCoord * d0; double d2 = this.posY + (this.rand.nextInt(16) - 8) - vec3.yCoord * d0; double d3 = this.posZ + (this.rand.nextDouble() - 0.5D) * 8.0D - vec3.zCoord * d0; return teleportTo(d1, d2, d3); } protected boolean teleportTo(double p_70825_1_, double p_70825_3_, double p_70825_5_) { EnderTeleportEvent event = new EnderTeleportEvent((EntityLivingBase)this, p_70825_1_, p_70825_3_, p_70825_5_, 0.0F); if (MinecraftForge.EVENT_BUS.post((Event)event)) return false; double d3 = this.posX; double d4 = this.posY; double d5 = this.posZ; this.posX = event.targetX; this.posY = event.targetY; this.posZ = event.targetZ; boolean flag = false; int i = MathHelper.floor_double(this.posX); int j = MathHelper.floor_double(this.posY); int k = MathHelper.floor_double(this.posZ); if (this.worldObj.blockExists(i, j, k)) { boolean flag1 = false; while (!flag1 && j > 0) { Block block = this.worldObj.getBlock(i, j - 1, k); if (block.getMaterial().blocksMovement()) { flag1 = true; continue; } this.posY--; j--; } if (flag1) { setPosition(this.posX, this.posY, this.posZ); if (this.worldObj.getCollidingBoundingBoxes((Entity)this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox)) flag = true; } } if (!flag) { setPosition(d3, d4, d5); return false; } short short1 = 128; for (int l = 0; l < short1; l++) { double d6 = l / (short1 - 1.0D); float f = (this.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (this.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (this.rand.nextFloat() - 0.5F) * 0.2F; double d7 = d3 + (this.posX - d3) * d6 + (this.rand.nextDouble() - 0.5D) * this.width * 2.0D; double d8 = d4 + (this.posY - d4) * d6 + this.rand.nextDouble() * this.height; double d9 = d5 + (this.posZ - d5) * d6 + (this.rand.nextDouble() - 0.5D) * this.width * 2.0D; this.worldObj.spawnParticle("portal", d7, d8, d9, f, f1, f2); } this.worldObj.playSoundEffect(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F); playSound("mob.endermen.portal", 1.0F, 1.0F); return true; } protected String getLivingSound() { return isScreaming() ? "mob.endermen.scream" : "mob.endermen.idle"; } protected String getHurtSound() { return "mob.endermen.hit"; } protected String getDeathSound() { return "mob.endermen.death"; } public boolean attackEntityAsMob(Entity par1Entity) { int i = 7; return (getOwner() != null) ? par1Entity.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer)getOwner()), i) : par1Entity.attackEntityFrom(DamageSource.causeMobDamage((EntityLivingBase)this), i); } protected boolean isAIEnabled() { return true; } public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { if (isEntityInvulnerable()) return false; setScreaming(true); if (p_70097_1_ instanceof net.minecraft.util.EntityDamageSource && p_70097_1_.getEntity() instanceof EntityPlayer) this.isAggressive = true; if (p_70097_1_ instanceof net.minecraft.util.EntityDamageSourceIndirect) { this.isAggressive = false; for (int i = 0; i < 64; i++) { if (teleportRandomly()) return true; } return super.attackEntityFrom(p_70097_1_, p_70097_2_); } return super.attackEntityFrom(p_70097_1_, p_70097_2_); } public void onUpdate() { EntityPlayer entityPlayer = (EntityPlayer)getOwner(); if (this.ticksExisted >= 6000 && !this.worldObj.isRemote) { if (getOwner() != null) { Random rand = new Random(); int randomNumber = rand.nextInt(3); if (randomNumber == 1) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : My time is up, see yah")); if (randomNumber == 2) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : I gotta bro, *Fistbump*")); if (randomNumber == 3) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : My time is over, don't worry, I'll beam myself up!")); if (randomNumber == 0) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : Listen up " + getOwner().getCommandSenderName() + " My time is up, good luck and see ya later!")); } setDead(); } if (getOwner() != null) { if (getAttackTarget() != null && (this.ticksExisted == 500 || this.ticksExisted == 1500 || this.ticksExisted == 2500 || this.ticksExisted == 3500 || this.ticksExisted == 4500 || this.ticksExisted == 5500)) { Random rand = new Random(); int randomNumber = rand.nextInt(3); if (randomNumber == 0) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : DIE " + getAttackTarget().getCommandSenderName() + "!!")); if (randomNumber == 1) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : I'll haunt your dreams " + getAttackTarget().getCommandSenderName() + "!!")); if (randomNumber == 2) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : Come here " + getAttackTarget().getCommandSenderName() + "!!")); if (randomNumber == 3) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : heh heh, " + getAttackTarget().getCommandSenderName() + ", Let's finish this HAHAHA!")); } if (this.ticksExisted == 20 && !this.worldObj.isRemote) { Random rand = new Random(); int randomNumber = rand.nextInt(3); if (randomNumber == 1) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : Why did you summon me " + getOwner().getCommandSenderName())); if (randomNumber == 2) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : What will we do this time friend?")); if (randomNumber == 3) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : Need some a hand bro?")); if (randomNumber == 0) { entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : Different time, different place.")); entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("But you still need Slendobis help!")); entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("It's good to see ya buddy!")); } } } super.onUpdate(); } public void setAttackTarget(EntityLivingBase p_70624_1_) { super.setAttackTarget(p_70624_1_); if (p_70624_1_ == null) { setAngry(false); } else if (!isTamed()) { setAngry(true); } } public void setAngry(boolean p_70916_1_) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (p_70916_1_) { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 | 0x2))); } else { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(b0 & 0xFFFFFFFD))); } } public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.UNDEAD; } protected boolean canDespawn() { return false; } public EntityAgeable createChild(EntityAgeable entityageable) { return null; } protected void onDeathUpdate() { this.deathTicks++; if (getOwner() != null && !this.worldObj.isRemote) { EntityPlayer entityPlayer = (EntityPlayer)getOwner(); Random rand = new Random(); int randomNumber = rand.nextInt(3); if (randomNumber == 1) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : aaargh DAMNIT! I'll leave it to you " + getOwner().getCommandSenderName())); if (randomNumber == 2) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : AAaaAAaaAAARGH")); if (randomNumber == 3) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : I'm down for the count bro, good luck!")); if (randomNumber == 0) entityPlayer.addChatComponentMessage((IChatComponent)new ChatComponentText("Slendobi : I gave it all I got, but this is it, see you later friend!")); } if (this.deathTicks >= 0 && this.deathTicks <= 1) { double d2 = this.rand.nextGaussian() * 0.02D; double d0 = this.rand.nextGaussian() * 0.02D; double d1 = this.rand.nextGaussian() * 0.02D; this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); this.worldObj.spawnParticle("explode", this.posX + (this.rand.nextFloat() * this.width * 2.0F) - this.width, this.posY + 1.0D + (this.rand.nextFloat() * this.height), this.posZ + (this.rand.nextFloat() * this.width * 2.0F) - this.width, d2, d0, d1); } if (this.deathTicks == 1 && !this.worldObj.isRemote) setDead(); } public boolean canAttackClass(Class par1Class) { return true; } protected boolean isValidLightLevel() { int i = MathHelper.floor_double(this.posX); int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); if (this.worldObj.getSavedLightValue(EnumSkyBlock.Sky, i, j, k) > this.rand.nextInt(32)) return false; int l = this.worldObj.getBlockLightValue(i, j, k); if (this.worldObj.isThundering()) { int i1 = this.worldObj.skylightSubtracted; this.worldObj.skylightSubtracted = 10; l = this.worldObj.getBlockLightValue(i, j, k); this.worldObj.skylightSubtracted = i1; } return (l <= this.rand.nextInt(8)); } public boolean getCanSpawnHere() { return (this.worldObj.difficultySetting != EnumDifficulty.PEACEFUL && isValidLightLevel() && super.getCanSpawnHere()); } }
[ "mrkrank2023@gmail.com" ]
mrkrank2023@gmail.com
d8f7816422b0be825ea29cc378302e0a7c3acc24
208ba847cec642cdf7b77cff26bdc4f30a97e795
/aj/ab/src/main/java/org.wp.ab/ui/media/MediaImageLoader.java
8727e4b96edab6b071224a41e67331ae5876c739
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
1,558
java
package org.wp.ab.ui.media; import android.content.Context; import com.android.volley.RequestQueue; import com.android.volley.toolbox.ImageLoader; import com.android.volley.toolbox.Volley; import org.wp.ab.WordPress; import org.wp.ab.models.Blog; import org.wp.ab.util.AppLog; import org.wp.ab.util.VolleyUtils; /** * provides the ImageLoader and backing RequestQueue for media image requests - necessary because * images in protected blogs need to be authenticated, which requires a separate RequestQueue */ class MediaImageLoader { private MediaImageLoader() { throw new AssertionError(); } static ImageLoader getInstance() { return getInstance(WordPress.getCurrentBlog()); } static ImageLoader getInstance(Blog blog) { if (blog != null && VolleyUtils.isCustomHTTPClientStackNeeded(blog)) { // use ImageLoader with authenticating request queue for protected blogs AppLog.d(AppLog.T.MEDIA, "using custom imageLoader"); Context context = WordPress.getContext(); RequestQueue authRequestQueue = Volley.newRequestQueue(context, VolleyUtils.getHTTPClientStack(context, blog)); ImageLoader imageLoader = new ImageLoader(authRequestQueue, WordPress.getBitmapCache()); imageLoader.setBatchedResponseDelay(0); return imageLoader; } else { // use default ImageLoader for all others AppLog.d(AppLog.T.MEDIA, "using default imageLoader"); return WordPress.imageLoader; } } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c4a450fd65b924fa352c06d6ab7cbd6a225b52db
ce67b727842fab338c594cebf5b943352e42bb17
/jdbc/src/main/java/com/jdbc/StudentDao/StudentDaoImpl.java
d45e856509a614e0a2a6b62f4d6e87ccc7103a7e
[]
no_license
Smart110/mytest
c70d39b517236a4037e832f71da1781933470676
a1a1a6a2ff09ceed4b1d7ec423e6f0e44e0b72c7
refs/heads/master
2021-05-06T22:38:24.196632
2017-12-03T13:07:40
2017-12-03T13:07:40
112,921,088
0
0
null
null
null
null
UTF-8
Java
false
false
1,656
java
package com.jdbc.StudentDao; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.BeanPropertyRowMapper; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import com.jdbc.jdbc.Student; @Repository public class StudentDaoImpl implements StudentDao { @Autowired private JdbcTemplate jdbcTemplate; //增加 @Override public int add(Student student) { return jdbcTemplate.update("insert into student(name, age) values(?, ?)", student.getName(),student.getAge()); } @Override public int update(Student student) { return jdbcTemplate.update("UPDATE student SET name=? ,age=? WHERE id=?", student.getName(),student.getAge(),student.getId()); } @Override public int delete(int id) { return jdbcTemplate.update("DELETE from TABLE account where id=?",id); } @Override public Student findStudentById(int id) { List<Student> list = jdbcTemplate.query("select * from student where id = ?", new Object[]{id}, new BeanPropertyRowMapper(Student.class)); if(list!=null && list.size()>0){ Student student = list.get(0); return student; }else{ return null; } } @Override public List<Student> findStudentList() { List<Student> list = jdbcTemplate.query("select * from student", new Object[]{}, new BeanPropertyRowMapper(Student.class)); if(list!=null && list.size()>0){ return list; }else{ return null; } } }
[ "15600050637@163.com" ]
15600050637@163.com
6f1b1935fcf53f36b03d6a3c9dfe6741716164f7
e967caefefe73e4348b6da0bf97bdfcd1a95f18d
/src/belajarDesignPattern/BuilderPattern/Meal.java
2eb8917f28d611e356f79c10e90f8d20e197c423
[]
no_license
riskiabidin/DesignPattern
9c0d711a70161403e0da8a423442c43dbabde188
8fe172abdb58751d5771d56415ae7b5295f4e5a4
refs/heads/master
2022-09-30T11:30:32.351249
2020-06-04T04:47:25
2020-06-04T04:47:25
268,009,016
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package belajarDesignPattern.BuilderPattern; import java.util.ArrayList; import java.util.List; public class Meal { private List<Item> items=new ArrayList<Item>(); public void add(Item item) { items.add(item); } public float getCost() { float cost=0.0f; for(Item item:items) { cost+=item.price(); } return cost; } public void showItems() { for(Item item:items) { System.out.println("item:"+item.name()); System.out.println("Packing:"+item.packing().pack()); System.out.println("Price:"+item.price()); System.out.println("-----------"); } } }
[ "riskiaktor@gmail.com" ]
riskiaktor@gmail.com
9343679e9ed666afa0edb26e60c4647c55089fc1
5217d79af2ca6232edec96a2d8ffe371935e93df
/chorus-selftest/src/test/features/org/chorusbdd/chorus/selftest/processhandler/nonjava/TestNonJavaProcesses.java
7dc8a552b50c6575fd3e5ba4b43eaef1d14a4ed8
[ "MIT" ]
permissive
deepakcdo/Chorus
f263c201a9220ef760826f8f55fe53e36b57491c
c22362a71db7afc22b75cbc9e443ae39018b0995
refs/heads/master
2021-01-17T06:06:25.342740
2014-07-09T20:41:00
2014-07-09T20:41:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,591
java
/** * Copyright (C) 2000-2013 The Software Conservancy and Original Authors. * All rights reserved. * * 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. * * Nothing in this notice shall be deemed to grant any rights to trademarks, * copyrights, patents, trade secrets or any other intellectual property of the * licensor or any contributor except as expressly stated herein. No patent * license is granted separate from the Software, for code that you delete from * the Software, or for combinations of the Software with other software or * hardware. */ package org.chorusbdd.chorus.selftest.processhandler.nonjava; import org.chorusbdd.chorus.selftest.AbstractInterpreterTest; import org.chorusbdd.chorus.selftest.DefaultTestProperties; /** * Created with IntelliJ IDEA. * User: nick * Date: 25/06/12 * Time: 22:14 */ public class TestNonJavaProcesses extends AbstractInterpreterTest { final String featurePath = "src/test/features/org/chorusbdd/chorus/selftest/processhandler/nonjava/startnonjava.feature"; final int expectedExitCode = 0; //success protected int getExpectedExitCode() { return expectedExitCode; } protected String getFeaturePath() { return featurePath; } /** * A test can override this method to modify the sys properties being used from the default set */ protected void doUpdateTestProperties(DefaultTestProperties sysProps) { sysProps.setProperty("chorusExecutionListener", PropertyWritingExecutionListener.class.getName()); } }
[ "nick@objectdefinitions.com" ]
nick@objectdefinitions.com
f4c8d539e125e7439b1f9a53e5419c49342663be
702ed60e5ac14d344644e36feff57060110f780d
/src/Main.java
62e7c3c4b880393f5f413dc9a420982e1e7f79dc
[]
no_license
Zearpex/SEW3
b0056bbdd9f65105a774917f0fca738e2c961ddc
25ae9fdb7bfd88f9045232139b05fb729bc76924
refs/heads/master
2021-03-24T12:29:55.757349
2017-09-25T09:40:31
2017-09-25T09:40:31
104,727,375
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
/** * Created by 5063 on 25.09.2017. */ public class Main { public static void main(String[] args){ System.out.println("Hello from the htl"); return "haha"; } }
[ "felix.kurz@sdsystems.at" ]
felix.kurz@sdsystems.at
33c65a92a67080ef551ab950f2f41e11e3a3b2f5
742e79d3c308ae83aa6e776bfc5462e09e996558
/Automobile Stock Managment Console Applicaton/Controller/BaseInterface/StockAndOrderHistoryViewer.java
d9ab922692ddec76d97fd4f0a7a96b9c2240d133
[]
no_license
arun1810/Zoho-Incubation-Codes
2dc646df7f8d4df2fe595251873092c7b2fc54a3
14d5fa31356e3b710d67479790aa495013047603
refs/heads/main
2023-07-07T07:42:13.713247
2021-08-11T09:00:05
2021-08-11T09:00:05
387,793,788
0
0
null
null
null
null
UTF-8
Java
false
false
918
java
package Controller.BaseInterface; import java.util.List; import CustomExceptions.DataNotFoundException; import POJO.OrderHistory; import POJO.Stock; import Utilities.SortUtil; import Utilities.SortUtil.SortOrder; public interface StockAndOrderHistoryViewer { public List<OrderHistory> getAllOrderHistory(); public List<OrderHistory> sortOrderHistoryByTotalPrice(SortOrder order); public List<OrderHistory> filterOrderHistoryByStockID(String filter); public OrderHistory getOrderHistorybyID(String orderHistoryID) throws DataNotFoundException; public List<Stock> getAllStock(); public Stock getStockByID(String stockID) throws DataNotFoundException; public List<Stock> sortStockbyPrice(SortUtil.SortOrder sortOrder); public List<Stock> sortStockbyCount(SortUtil.SortOrder sortOrder); public List<Stock> filterStockByName(String filter); public void clearAllFilter(); }
[ "arun1810@users.noreply.github.com" ]
arun1810@users.noreply.github.com
9ad6058f9dadc9002dd2d25fe6465169565922a4
3d5717774fc11f14861f7545046dffcfe85afde1
/app/src/main/java/com/example/processcommunicate/skin/SkinManager.java
cb225a0f2053664fccad05224e5cb650a3ba58aa
[]
no_license
whoami-I/process
9c5bc10c7b2000ff44034504e2a59f2967e07f9b
b3dafd3f430bb3bee5c1cd1c70152170bed57328
refs/heads/master
2020-05-20T13:34:13.795863
2019-06-06T10:14:00
2019-06-06T10:14:00
185,601,242
0
0
null
null
null
null
UTF-8
Java
false
false
3,495
java
package com.example.processcommunicate.skin; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.text.TextUtils; import android.view.LayoutInflater; import com.example.processcommunicate.skin.config.SkinPreUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; public class SkinManager { private static SkinManager skinManager = new SkinManager(); private Context context; private Map<Activity, List<SkinView>> map = new HashMap<>(); private SkinResource mSkinResource; private SkinManager() { } public void init(Context context) { this.context = context.getApplicationContext(); //如果存在已经换肤的情况,那么就要先初始化mSkinResource变量 String skinPath = getSkinPath(); if (!TextUtils.isEmpty(skinPath)) { mSkinResource = new SkinResource(context, skinPath); } } public static SkinManager getInstance() { return skinManager; } public void loadSkin(String path) { if (TextUtils.isEmpty(path)) { throw new RuntimeException("Skin path can not be null"); } if (mSkinResource == null) { mSkinResource = new SkinResource(context, path); } else { String resourcePath = mSkinResource.getResourcePath(); if (!path.equals(resourcePath)) { mSkinResource = new SkinResource(context, path); } } Set<Activity> activities = map.keySet(); for (Activity activity : activities) { List<SkinView> skinViews = map.get(activity); for (SkinView skinView : skinViews) { skinView.skin(); } } //保存换肤路径 saveSkinPath(path); } public void restoreDefaultSkin() { String skinPath = getSkinPath(); if (TextUtils.isEmpty(skinPath)) return; skinPath = context.getPackageResourcePath(); mSkinResource = new SkinResource(context, skinPath); Set<Activity> activities = map.keySet(); for (Activity activity : activities) { List<SkinView> skinViews = map.get(activity); for (SkinView skinView : skinViews) { skinView.skin(); } } //清除皮肤 clearSkinPath(); } public void saveSkinPath(String path) { SkinPreUtils.getInstance(context).saveSkinPath(path); } public void clearSkinPath() { SkinPreUtils.getInstance(context).clearSkinPath(); } public String getSkinPath() { return SkinPreUtils.getInstance(context).getSkinPath(); } private void checkNotNull(String path) { } public SkinResource getSkinResource() { return mSkinResource; } public void register(Activity activity, SkinView skinView) { List<SkinView> skinViews = map.get(activity); if (skinViews == null) { skinViews = new ArrayList<>(); } skinViews.add(skinView); map.put(activity, skinViews); } public void unRegister(Activity activity) { map.remove(activity); } public void checkSkin(SkinView skinView) { String skinPath = getSkinPath(); if (!TextUtils.isEmpty(skinPath)) { skinView.skin(); } } }
[ "1874785601@qq.com" ]
1874785601@qq.com
549449b633129229cbef79e6cf0bc7cb78473322
c40b235589793ea971d44a75efad4a60ed318a6a
/src/vista/iconos/icon.java
1956d832b54e52a3578364cc390ceb1277d30ce1
[]
no_license
miguelarriba/DBCase
8604c5240b2e063454058c50d204594515c752a7
a6a756dc03fb231515169a73ec171794141830c6
refs/heads/master
2020-04-07T00:17:21.063137
2019-10-07T16:04:05
2019-10-07T16:04:05
157,897,503
0
1
null
2020-02-06T14:52:11
2018-11-16T17:02:49
Java
UTF-8
Java
false
false
1,093
java
package vista.iconos; import javax.swing.Icon; public abstract class icon implements Icon{ private int size; private boolean pintarMas; private boolean selected; private final int DEFAULTSIZE = 60; private final int MINISIZE = 30; private final int PERSPECTIVESIZE = 50; protected double offset = .1; public icon() { super(); pintarMas = true; size = DEFAULTSIZE; } public icon(String tipo) { super(); switch(tipo) { case "mini": size = MINISIZE;pintarMas = false;break; case "perspective": size = PERSPECTIVESIZE;pintarMas = false;break; default: size = DEFAULTSIZE;pintarMas = true; } } public icon(String string, boolean selected) { this(string); this.selected = selected; } public void setSelected(boolean selected) { this.selected = selected; } protected boolean isSelected() { return selected; } protected boolean pintarMas() { return pintarMas; } @Override public int getIconWidth() { return size; } @Override public int getIconHeight() { return size == PERSPECTIVESIZE ? size :size/2; } }
[ "marriba@ucm.es" ]
marriba@ucm.es
ca71776cb434fd2cca3ea3957cb0523733e07d86
c0463b289fecb907c2554daab819ef4b4fac8546
/app/src/androidTest/java/com/androidexample/ExampleInstrumentedTest.java
0fd0d55a9d840f6ee95d722c8fdbf61edbafb39f
[]
no_license
haticenurokur/androidExample
d7547910d3348e1a6d7a7852c3a3e44b0b24aedb
4d37d6e488f3e382dd61222db754e0107e0e3652
refs/heads/master
2020-06-04T16:39:26.788377
2019-06-15T21:55:37
2019-06-15T21:55:37
192,107,413
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.androidexample; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.androidexample", appContext.getPackageName()); } }
[ "haticenurokur@gmail.com" ]
haticenurokur@gmail.com
aa536d21f8b0700a34e14eaf79d1ae78efa3f47a
afff6a780dbebb9a47abde1f9ae751fba1e15a7f
/Assignment 2/Assignment2/src/WQUPC/WQUPCTest.java
97fa96e65600240809c87a10867eb0aa899c89d8
[]
no_license
yashkhopkar/Program-Structures-And-Algorithms
082f9afa60e4e3106c680583e6e0484dd505eec1
3935cb5aca1c5172711a538f891fa33fa762a98f
refs/heads/master
2020-03-22T12:20:49.440242
2018-09-29T22:49:08
2018-09-29T22:49:08
140,034,469
0
0
null
null
null
null
UTF-8
Java
false
false
2,161
java
package WQUPC; import static org.junit.Assert.*; import org.junit.Test; public class WQUPCTest { /** */ @Test public void testFind0() { WQUPC h = new WQUPC(10); assertEquals(0, h.find(0)); } /** */ @Test public void testFind1() { WQUPC h = new WQUPC(10); h.union(0,1); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); } /** */ @Test public void testFind2() { WQUPC h = new WQUPC(10); h.union(0,1); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); h.union(2,1); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); assertEquals(0, h.find(2)); } /** */ @Test public void testFind3() { WQUPC h = new WQUPC(10); h.union(0,1); h.union(0,2); h.union(3,4); h.union(3,5); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); assertEquals(0, h.find(2)); assertEquals(3, h.find(3)); assertEquals(3, h.find(4)); assertEquals(3, h.find(5)); h.union(0,3); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); assertEquals(0, h.find(2)); assertEquals(0, h.find(3)); assertEquals(0, h.find(4)); assertEquals(0, h.find(5)); } /** */ @Test public void testFind4() { WQUPC h = new WQUPC(10); h.union(0,1); h.union(1,2); h.union(3,4); h.union(3,5); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); assertEquals(0, h.find(2)); assertEquals(3, h.find(3)); assertEquals(3, h.find(4)); assertEquals(3, h.find(5)); h.union(0,3); assertEquals(0, h.find(0)); assertEquals(0, h.find(1)); assertEquals(0, h.find(2)); assertEquals(0, h.find(3)); assertEquals(0, h.find(4)); assertEquals(0, h.find(5)); } /** */ @Test public void testConnected01() { WQUPC h = new WQUPC(10); assertFalse(h.connected(0,1)); } }
[ "khopkar.y@husky.neu.edu" ]
khopkar.y@husky.neu.edu
015b983b437386525b95c6295a6c5ebb8c783f32
98930b5356abef64642a55435219a1aa15097997
/app/src/main/java/enrique/pichangatpa/SettingsActivity.java
da26d50f39a20ca358218db5b631e96eb5d8ab51
[]
no_license
enriquesoto/CapstoneProjectTPAndroidPinPong
2d736110f91f2f763059a015158ef52e22eddb98
aa2a8ed2b7ffcc8c9b27ebd81f07938b00090c87
refs/heads/master
2021-01-18T21:31:51.402068
2014-09-08T21:07:45
2014-09-08T21:07:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,621
java
package enrique.pichangatpa; import android.content.Intent; import android.content.pm.ActivityInfo; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.Spinner; import android.widget.Toast; import enrique.pichangatpa.R; public class SettingsActivity extends ActionBarActivity { private Spinner mSpinnerCountry; private Spinner mSpinnerOpponent; private Button mbttnSubmit; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_settings); mSpinnerCountry = (Spinner) findViewById(R.id.mSpinnerCountry); mSpinnerOpponent = (Spinner) findViewById(R.id.mSpinnerOpponent); mbttnSubmit = (Button) findViewById(R.id.btnSubmit); /*Toast.makeText(SettingsActivity.this, "OnClickListener : " + "\nSpinner 1 : " + String.valueOf(mSpinnerCountry.getSelectedItem()), Toast.LENGTH_SHORT ).show();*/ mbttnSubmit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent returnIntent = new Intent(); int selectedCountryIndex = mSpinnerCountry.getSelectedItemPosition(); int selectedOpponentIndex = mSpinnerOpponent.getSelectedItemPosition(); returnIntent.putExtra("mCountryTeam",selectedCountryIndex); returnIntent.putExtra("mOpponentTeam",selectedOpponentIndex); setResult(RESULT_OK,returnIntent); finish(); } }); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.settings, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "e.sotomendoza@gmail.com" ]
e.sotomendoza@gmail.com
7e2d995d465725c088bfe5cd028e4e72eb106211
e38d327138aa3ce48280fc60e2c5761f52654774
/app/src/main/java/com/vic/lab4/MainActivity.java
cc1c1b2a40643711546a4c72a79ef1fac8fc190f
[]
no_license
bpan2/MAP524_Lab4
aac347693bd175a0d2bcf74248612703f3c880bf
303c4de7f8f01cb5b3d8c1d02640a5449f779a8e
refs/heads/master
2020-05-18T17:11:24.736638
2015-04-09T05:00:50
2015-04-09T05:00:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,592
java
package com.vic.lab4; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; public class MainActivity extends ActionBarActivity { boolean swap = false; FragmentOne fragOne = null; FragmentTwo fragTwo = null; Button btn; FragmentManager fm = getFragmentManager(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); fragOne = new FragmentOne(); fragTwo = new FragmentTwo(); FragmentTransaction ft = fm.beginTransaction(); ft.add(R.id.fragView, fragOne, "Fragment1"); ft.addToBackStack("f1"); ft.add(R.id.fragView, fragTwo, "Fragment2"); ft.addToBackStack("f2"); ft.commit(); btn = (Button) findViewById(R.id.btn); btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { swap = swap == false ? true : false; if(fragOne != null){ fragOne.updateImageView(swap); } if(fragTwo != null){ fragTwo.updateImageView(swap); } } }); } }
[ "bpan2@myseneca.ca" ]
bpan2@myseneca.ca
25ec05c1aa35f8e9e057a27e849f5f21c3c97838
ab3a1a82fda5166daf4062b6d19e27ce31dc4548
/src/main/java/thread/DangerousThread.java
76523aa62346a7d93f863a791b07f53b74ac1ddf
[]
no_license
rafadelnero/javachallengers
8d532abbf44629e91335c03428a762f174a34cf5
a271fa8386fed7b6080a770eb3c7628d3d721a16
refs/heads/master
2022-12-25T05:52:26.644435
2022-12-17T16:28:55
2022-12-17T16:28:55
202,078,407
70
15
null
2022-12-17T16:21:49
2019-08-13T06:23:46
Java
UTF-8
Java
false
false
439
java
package thread; public class DangerousThread { public static void main(String... doYourBest) throws InterruptedException { Thread heisenberg = new Heisenberg(); heisenberg.start(); heisenberg.join(); heisenberg.start(); heisenberg.join(); } static class Heisenberg extends Thread { public void run() { System.out.println("I am the danger!"); } } }
[ "rafacdelnero@gmail.com" ]
rafacdelnero@gmail.com
b81d3ba01486620cb5a1d2d2080c9709ff5d4ed8
e15c58da1d0ded24b9defab70d3a23dfe6149729
/api/src/test/java/com/naverlabs/chatbot/service/web/ChatbotResourceTest.java
4c284bb1ec461ac7abd0478505ab4f7aeb1bdfc3
[]
no_license
stunstunstun/chatbot
cdcb23ed62a1a882dabe22fc92e346f0db55809b
4719c2aae0c932c24bd19acaa3fe20848c987eb3
refs/heads/master
2021-01-19T19:52:18.849504
2017-08-30T04:54:32
2017-08-30T04:54:32
101,212,645
2
0
null
2017-08-26T07:20:51
2017-08-23T18:29:41
Java
UTF-8
Java
false
false
1,313
java
package com.naverlabs.chatbot.service.web; import com.fasterxml.jackson.databind.ObjectMapper; import com.naverlabs.chatbot.domain.Chatbot; import com.naverlabs.chatbot.v1.web.ChatbotResource; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.json.JacksonTester; import org.springframework.core.io.ClassPathResource; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import static org.assertj.core.api.Assertions.assertThat; /** * @author minhyeok */ @RunWith(SpringRunner.class) @Transactional @SpringBootTest public class ChatbotResourceTest { private JacksonTester<ChatbotResource> jacksonTester; private ChatbotResource resource; @Before public void setup() throws IOException { ObjectMapper objectMapper = new ObjectMapper(); JacksonTester.initFields(this, objectMapper); resource = jacksonTester.readObject(new ClassPathResource("chatbot_resource.json")); } @Test public void entityIsMutable() { Chatbot entity = resource.getEntity(); assertThat(entity).isEqualTo(resource.getEntity()); } }
[ "wjdsupj@gmail.com" ]
wjdsupj@gmail.com
30fc3f233913496fdfb64075afb15f0dfc231c2a
9971d019c5a4ecd0892cb9e035c5f5d77af25f92
/src/ru/job4j/array/AlgoArray.java
eff7d09c59f35f46c0a3084cbfce94289e65d2cc
[]
no_license
Zhaava/job4j_elementary
ce5460a97e10e49d82ab93fa033fc8e4d9492bbd
18c26c033806f30a61eabb7720b518dfcb25b5e2
refs/heads/master
2023-05-28T04:23:18.138892
2021-06-22T11:33:56
2021-06-22T11:33:56
298,788,560
0
0
null
2020-09-26T10:17:24
2020-09-26T10:17:23
null
UTF-8
Java
false
false
879
java
package ru.job4j.array; public class AlgoArray { public static void main(String[] args) { int[] array = new int[] {5, 3, 2, 1, 4}; int temp = array[0]; /* переменная для временного хранения значение ячейки с индексом 0. */ array[0] = array[3]; /* записываем в ячейку с индексом 0 значение ячейки с индексом 3. */ array[3] = temp; /* записываем в ячейку с индексом 3 значение временной переменной. */ temp = array[1]; array[1] = array[2]; array[2] = temp; temp = array[3]; array[3] = array[4]; array[4] = temp; for (int index = 0; index < array.length; index++) { System.out.println(array[index]); } } }
[ "zhavoronkov52@gmail.com" ]
zhavoronkov52@gmail.com
8826e1d19c5ef5c98a00f51843c985220a9d830e
f428f600c682396db98127c7ea647b865a57b041
/app/src/androidTest/java/com/example/spinnervolition/ExampleInstrumentedTest.java
d824d90d1e7c56ed95fcc0c94489bb94a3bd0075
[]
no_license
AscEmon/SpinnerVolition
1190dd65e93d44955a74933ede996ab51d042014
79a1939e284d601623abd590811ef2e9803a7079
refs/heads/master
2023-02-26T09:08:53.432873
2021-01-21T17:06:25
2021-01-21T17:06:25
328,210,023
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
package com.example.spinnervolition; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.spinnervolition", appContext.getPackageName()); } }
[ "sayedemon53@gmail.com" ]
sayedemon53@gmail.com
c668c74a6fd1de0aea98781e0b31fb88f90d81bd
b2bac83818f1e3a97d33988423a8b737627b3be9
/hibernate/src/extend/teacher.java
9d44e1b60b506bb9741132d10471861e3edad2a2
[]
no_license
pupilBin/learn
8177fe0cfa060955c3ff88ac63a57f2cfc14e1ad
132fb53adc3d4f0501e86a8cd466221c9e06876c
refs/heads/master
2020-12-07T07:43:28.630882
2017-07-14T14:49:28
2017-07-14T14:49:28
53,180,867
0
0
null
null
null
null
UTF-8
Java
false
false
259
java
package extend; /** * Created by pupil on 2016/6/20. */ public class teacher extends person { private int salary; public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; } }
[ "pupil240343458@gmail.com" ]
pupil240343458@gmail.com
de445e280c0675d722df1f9034837d9f735f6940
31f609157ae46137cf96ce49e217ce7ae0008b1e
/bin/ext-accelerator/acceleratorfacades/src/de/hybris/platform/acceleratorfacades/product/converters/populator/ProductVolumePricesPopulator.java
2e23837875a7f09f87a60c6aaacc089ae98b0ac0
[]
no_license
natakolesnikova/hybrisCustomization
91d56e964f96373781f91f4e2e7ca417297e1aad
b6f18503d406b65924c21eb6a414eb70d16d878c
refs/heads/master
2020-05-23T07:16:39.311703
2019-05-15T15:08:38
2019-05-15T15:08:38
186,672,599
1
0
null
null
null
null
UTF-8
Java
false
false
5,052
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.acceleratorfacades.product.converters.populator; import de.hybris.platform.commercefacades.product.PriceDataFactory; import de.hybris.platform.commercefacades.product.converters.populator.AbstractProductPopulator; import de.hybris.platform.commercefacades.product.data.PriceData; import de.hybris.platform.commercefacades.product.data.PriceDataType; import de.hybris.platform.commercefacades.product.data.ProductData; import de.hybris.platform.commerceservices.util.AbstractComparator; import de.hybris.platform.core.model.product.ProductModel; import de.hybris.platform.europe1.jalo.PriceRow; import de.hybris.platform.jalo.order.price.PriceInformation; import de.hybris.platform.product.PriceService; import de.hybris.platform.servicelayer.dto.converter.ConversionException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Required; /** * Populator for product volume prices. */ public class ProductVolumePricesPopulator<SOURCE extends ProductModel, TARGET extends ProductData> extends AbstractProductPopulator<SOURCE, TARGET> { private PriceService priceService; private PriceDataFactory priceDataFactory; protected PriceService getPriceService() { return priceService; } @Required public void setPriceService(final PriceService priceService) { this.priceService = priceService; } protected PriceDataFactory getPriceDataFactory() { return priceDataFactory; } @Required public void setPriceDataFactory(final PriceDataFactory priceDataFactory) { this.priceDataFactory = priceDataFactory; } @Override public void populate(final SOURCE productModel, final TARGET productData) throws ConversionException { if (productData != null) { final List<PriceInformation> pricesInfos = getPriceService().getPriceInformationsForProduct(productModel); if (pricesInfos == null || pricesInfos.size() < 2) { productData.setVolumePrices(Collections.<PriceData> emptyList()); } else { final List<PriceData> volPrices = createPrices(productModel, pricesInfos); // Sort the list into quantity order Collections.sort(volPrices, VolumePriceComparator.INSTANCE); // Set the max quantities for (int i = 0; i < volPrices.size() - 1; i++) { volPrices.get(i).setMaxQuantity(Long.valueOf(volPrices.get(i + 1).getMinQuantity().longValue() - 1)); } productData.setVolumePrices(volPrices); } } } protected List<PriceData> createPrices(final SOURCE productModel, final List<PriceInformation> pricesInfos) { final List<PriceData> volPrices = new ArrayList<PriceData>(); final PriceDataType priceType = getPriceType(productModel);//not necessary for (final PriceInformation priceInfo : pricesInfos) { final Long minQuantity = getMinQuantity(priceInfo); if (minQuantity != null) { final PriceData volPrice = createPriceData(priceType, priceInfo); if (volPrice != null) { volPrice.setMinQuantity(minQuantity); volPrices.add(volPrice); } } } return volPrices; } protected PriceDataType getPriceType(final ProductModel productModel) { if (CollectionUtils.isEmpty(productModel.getVariants())) { return PriceDataType.BUY; } else { return PriceDataType.FROM; } } protected Long getMinQuantity(final PriceInformation priceInfo) { final Map qualifiers = priceInfo.getQualifiers(); final Object minQtdObj = qualifiers.get(PriceRow.MINQTD); if (minQtdObj instanceof Long) { return (Long) minQtdObj; } return null; } protected PriceData createPriceData(final PriceDataType priceType, final PriceInformation priceInfo) { return getPriceDataFactory().create(priceType, BigDecimal.valueOf(priceInfo.getPriceValue().getValue()), priceInfo.getPriceValue().getCurrencyIso()); } public static class VolumePriceComparator extends AbstractComparator<PriceData> { public static final VolumePriceComparator INSTANCE = new VolumePriceComparator(); @Override protected int compareInstances(final PriceData price1, final PriceData price2) { if (price1 == null || price1.getMinQuantity() == null) { return BEFORE; } if (price2 == null || price2.getMinQuantity() == null) { return AFTER; } return compareValues(price1.getMinQuantity().longValue(), price2.getMinQuantity().longValue()); } } }
[ "nataliia@spadoom.com" ]
nataliia@spadoom.com
a9c253fc5e056c904726cf6ff48e94ae004463f3
2702ff64b7bbe69279c54f505712ce7bcc65022e
/src/Exercicio3b/Funcionario.java
b0cd1c4cb2baf07625246dac0fdce553883250f1
[]
no_license
matheushenrycb/DispositivosMoveis
0cab9c86bb2d2c03fe33aaacb8db81a745ce5e20
e1f0850431c26bcaaf5dd5ffb0f9f1c9c2e95f8c
refs/heads/master
2021-04-27T21:15:22.417381
2018-02-22T17:22:47
2018-02-22T17:22:47
122,396,974
0
0
null
null
null
null
UTF-8
Java
false
false
1,408
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Exercicio3b; /** * * @author Matheus HEnry */ public class Funcionario extends Principal { int matricula; double salario1; double salario2; public Funcionario(int matricula,double salario1, double salario2) { this.matricula= matricula; this.salario1 = salario1; this.salario2= salario2; } public int getMatricula() { return matricula; } public void setMatricula(int matricula) { this.matricula = matricula; } public double getSalario1() { return salario1*0.40; } public void setSalario1(double salario1) { this.salario1 = salario1; } public double getSalario2() { return salario2*0.60; } public void setSalario2(double salario2) { this.salario2 = salario2; } public void getparcelaUm() { System.out.println("-------------------------------------------------"); System.out.println("Primeira parcela do Salario: " + this.getSalario1()); } public void getparcelaDois() { System.out.println("Segunda parcela do Salario: " + this.getSalario2()); } }
[ "Matheus HEnry@MatheusHEnry-PC" ]
Matheus HEnry@MatheusHEnry-PC
44ef7989ee1bcfde2644ed5c17ea58021a0eae0c
8a539448c904b8bc07e8881ca820e5baa9cc0ae0
/src/main/java/com/virtru/saas/framework/sqs/AwsSqsProvider.java
8979d4af170a54f551398fc06d9e9abd3f3c022b
[]
no_license
mkhader12/saasgateway2
db7df5b1ed463baf114f7c7f47a54a13d500382c
2787b2d511920e6ebed775f251c16b7086d236a0
refs/heads/master
2020-03-11T20:00:31.355535
2018-04-19T14:17:37
2018-04-19T14:17:37
130,224,353
1
2
null
null
null
null
UTF-8
Java
false
false
2,560
java
package com.virtru.saas.framework.sqs; import com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper; import com.amazon.sqs.javamessaging.ProviderConfiguration; import com.amazon.sqs.javamessaging.SQSConnection; import com.amazon.sqs.javamessaging.SQSConnectionFactory; import com.amazonaws.services.sqs.AmazonSQSClientBuilder; import com.amazonaws.services.sqs.model.CreateQueueRequest; import com.amazonaws.services.sqs.model.CreateQueueResult; import com.amazonaws.services.sqs.model.DeleteMessageRequest; import com.amazonaws.services.sqs.model.GetQueueUrlResult; import com.amazonaws.services.sqs.model.ReceiveMessageRequest; import com.amazonaws.services.sqs.model.ReceiveMessageResult; import com.amazonaws.services.sqs.model.SendMessageRequest; import com.amazonaws.services.sqs.model.SendMessageResult; import javax.jms.JMSException; public class AwsSqsProvider implements QueueProvider { private static AmazonSQSMessagingClientWrapper client; public AwsSqsProvider(int numberOfMessagesToPrefetch) throws JMSException { // Create a new connection factory with all defaults (credentials and region) set automatically SQSConnectionFactory connectionFactory = new SQSConnectionFactory( new ProviderConfiguration().withNumberOfMessagesToPrefetch(numberOfMessagesToPrefetch), AmazonSQSClientBuilder.defaultClient() ); // Create the connection. SQSConnection connection = connectionFactory.createConnection(); // Get the wrapped client client = connection.getWrappedAmazonSQSClient(); } @Override public void deleteMessage(DeleteMessageRequest deleteMessageRequest) throws JMSException { client.deleteMessage(deleteMessageRequest); } @Override public SendMessageResult sendMessage(SendMessageRequest sendMessageRequest) throws JMSException { return client.sendMessage(sendMessageRequest); } @Override public boolean queueExists(String queueName) throws JMSException { return client.queueExists(queueName); } @Override public GetQueueUrlResult getQueueUrl(String queueName) throws JMSException { return client.getQueueUrl(queueName); } @Override public CreateQueueResult createQueue(CreateQueueRequest createQueueRequest) { return null; } @Override public ReceiveMessageResult receiveMessage(ReceiveMessageRequest receiveMessageRequest) throws JMSException { return client.receiveMessage(receiveMessageRequest); } }
[ "mkhader@virtru.com" ]
mkhader@virtru.com
80d827cba9c12e300c15eb85cd7eab04c88c3369
7859fb2a0d2d8b324b3b78ace92803cd0eba3f5b
/src/main/java/ar/edu/um/programacion2/config/WebConfigurer.java
5f0c34af8654ed6e3e252f5899a94e3ab5eeaffc
[]
no_license
francomanuel/programacion2-tp
a9fc1c73e56c904398d95951f6b336f5e054edfd
ce30a3763a3a8f85c839e2626b62ec3b975df314
refs/heads/master
2022-12-09T07:58:57.167364
2020-09-01T22:44:41
2020-09-01T22:44:41
292,095,741
0
0
null
null
null
null
UTF-8
Java
false
false
5,478
java
package ar.edu.um.programacion2.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.JHipsterProperties; import io.github.jhipster.config.h2.H2ConfigurationHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.web.server.*; import org.springframework.boot.web.servlet.ServletContextInitializer; import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import org.springframework.http.MediaType; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; import javax.servlet.*; import java.io.File; import java.io.UnsupportedEncodingException; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; import java.util.*; import static java.net.URLDecoder.decode; /** * Configuration of web application with Servlet 3.0 APIs. */ @Configuration public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> { private final Logger log = LoggerFactory.getLogger(WebConfigurer.class); private final Environment env; private final JHipsterProperties jHipsterProperties; public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) { this.env = env; this.jHipsterProperties = jHipsterProperties; } @Override public void onStartup(ServletContext servletContext) throws ServletException { if (env.getActiveProfiles().length != 0) { log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles()); } if (env.acceptsProfiles(Profiles.of(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT))) { initH2Console(servletContext); } log.info("Web application fully configured"); } /** * Customize the Servlet engine: Mime types, the document root, the cache. */ @Override public void customize(WebServerFactory server) { setMimeMappings(server); // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets. setLocationForStaticAssets(server); } private void setMimeMappings(WebServerFactory server) { if (server instanceof ConfigurableServletWebServerFactory) { MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT); // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711 mappings.add("html", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64 mappings.add("json", MediaType.TEXT_HTML_VALUE + ";charset=" + StandardCharsets.UTF_8.name().toLowerCase()); ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; servletWebServer.setMimeMappings(mappings); } } private void setLocationForStaticAssets(WebServerFactory server) { if (server instanceof ConfigurableServletWebServerFactory) { ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server; File root; String prefixPath = resolvePathPrefix(); root = new File(prefixPath + "target/classes/static/"); if (root.exists() && root.isDirectory()) { servletWebServer.setDocumentRoot(root); } } } /** * Resolve path prefix to static resources. */ private String resolvePathPrefix() { String fullExecutablePath; try { fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { /* try without decoding if this ever happens */ fullExecutablePath = this.getClass().getResource("").getPath(); } String rootPath = Paths.get(".").toUri().normalize().getPath(); String extractedPath = fullExecutablePath.replace(rootPath, ""); int extractionEndIndex = extractedPath.indexOf("target/"); if (extractionEndIndex <= 0) { return ""; } return extractedPath.substring(0, extractionEndIndex); } @Bean public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); CorsConfiguration config = jHipsterProperties.getCors(); if (config.getAllowedOrigins() != null && !config.getAllowedOrigins().isEmpty()) { log.debug("Registering CORS filter"); source.registerCorsConfiguration("/api/**", config); source.registerCorsConfiguration("/management/**", config); source.registerCorsConfiguration("/v2/api-docs", config); } return new CorsFilter(source); } /** * Initializes H2 console. */ private void initH2Console(ServletContext servletContext) { log.debug("Initialize H2 console"); H2ConfigurationHelper.initH2Console(servletContext); } }
[ "frma98@gmail.com" ]
frma98@gmail.com
83597c61bfea49e42342f96e38cb4b6b742282a6
238a8b90fdb315b3f3ccafa00fb3d498c4b2b36e
/app/src/main/java/com/waoss/ciby/EmergencyActivity.java
1859ef3c6a014b7ea0e6df28f0cf4e17582fb700
[]
no_license
rohan23chhabra/ciby
2fec384ba0f20ea41a42a6415676eaf479433274
0310478bad1da427e5eeacc6cb8104a8f4acc577
refs/heads/master
2022-04-20T23:08:56.866057
2020-04-01T10:05:16
2020-04-01T10:05:16
251,101,084
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.waoss.ciby; import android.content.Intent; import android.util.Log; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import com.google.android.gms.maps.model.LatLng; import java.util.Objects; public class EmergencyActivity extends AppCompatActivity { LatLng location; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_emergency); } public void hospitalOnClick(View view) { startZonalListViewActivity("hospital"); } public void policeStationOnClick(View view) { startZonalListViewActivity("police"); } private void startZonalListViewActivity(String type) { final Intent intent = new Intent(this, ZonalListViewActivity.class); intent.putExtra("emergency-type", type); startActivity(intent); } }
[ "rohan23chhabra@gmail.com" ]
rohan23chhabra@gmail.com
1bb38a0be60dec6c396cc2c545d4d436c470a988
427ed6dd94a24adaf90cd4d333d5ae0aefc71cad
/analyse/src/main/java/de/ami/team1/analyse/services/UserService.java
07549b62ebe416539df6d67a94f6836e9504de60
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
permissive
ixLikro/master-ami-java-contact-tracing-services
d9b98efb17d13fa8d269efe9929ef1b0aa77ff0e
2bc647125b1533c2ff582e05bb6c79f5e513ea2a
refs/heads/master
2023-03-20T10:04:39.378931
2021-03-17T23:14:35
2021-03-17T23:14:35
348,425,112
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package de.ami.team1.analyse.services; import de.ami.team1.analyse.crud.CrudService; import de.ami.team1.analyse.entities.User; import javax.enterprise.context.RequestScoped; @RequestScoped public class UserService extends CrudService<User> { @Override protected Class<User> getEntityClass() { return User.class; } }
[ "o.schleesselmann@ostfalia.de" ]
o.schleesselmann@ostfalia.de
faf73d1f418ac9c956a2ab4d21168f63cfd65dd3
b87b45b3d1dd19311528a7803692df780e6f6a25
/app/src/main/java/com/itla/testappdb/entity/Career.java
1f81cbf977573194dbb1818c6bf78a08e0e0171a
[]
no_license
darkdaven/school
769d51965332006668e985be22ef250a8c6122f2
842633dc52c5df0082d5bd61e959e57d2afcebbc
refs/heads/master
2020-08-03T23:18:22.761904
2019-10-27T00:31:52
2019-10-27T00:31:52
211,917,661
0
0
null
null
null
null
UTF-8
Java
false
false
1,770
java
package com.itla.testappdb.entity; import android.content.ContentValues; import android.database.Cursor; import androidx.annotation.NonNull; public class Career { private Integer id; private String name; private Integer subjects; private Integer credits; public Career() { } public Career(Integer id) { this.id = id; } public Career(String name) { this.name = name; } public Career(final Cursor cursor) { this.setId(cursor.getInt(cursor.getColumnIndex("career_id"))); this.setName(cursor.getString(cursor.getColumnIndex("career_name"))); if (cursor.getColumnIndex("career_subjects") != -1) this.setSubjects(cursor.getInt(cursor.getColumnIndex("career_subjects"))); if (cursor.getColumnIndex("career_credits") != -1) this.setCredits(cursor.getInt(cursor.getColumnIndex("career_credits"))); } public ContentValues contentValues() { final ContentValues contentValues = new ContentValues(); contentValues.put("name", this.getName()); return contentValues; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSubjects() { return subjects; } public void setSubjects(Integer subjects) { this.subjects = subjects; } public Integer getCredits() { return credits; } public void setCredits(Integer credits) { this.credits = credits; } @NonNull @Override public String toString() { return this.getName(); } }
[ "ariel.herrera@cloud-catalogs.com" ]
ariel.herrera@cloud-catalogs.com
52202305cc4658e186476e3bc18efd4bb1b315ba
2f3bb917adcc081c8ef2f7370787ef83431183c5
/src/main/java/com/igomall/entity/Admin.java
ec350fd4624a739963dfd827d06ba947f95ae53e
[]
no_license
heyewei/shopec-b2b2c
bc7aad32fc632ab20c3ed1f6a875e533d482dfa3
a03fd48250aad4315a6ff687b6d01c7e12d0f93e
refs/heads/master
2023-02-24T13:12:37.985421
2021-01-27T07:24:25
2021-01-27T07:24:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,090
java
package com.igomall.entity; import java.util.HashSet; import java.util.Set; import javax.persistence.Entity; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import javax.persistence.Transient; import javax.validation.constraints.NotEmpty; import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang.StringUtils; import com.baomidou.mybatisplus.annotation.TableField; /** * Entity - 管理员 * */ @Entity public class Admin extends User { private static final long serialVersionUID = -4000007477538426L; /** * 用户名 */ @NotEmpty(groups = Save.class) private String username; /** * 密码 */ @NotEmpty(groups = Save.class) @TableField(exist = false) private String password; /** * 加密密码 */ private String encodedPassword; /** * E-mail */ @NotEmpty private String email; /** * 手机 */ @NotEmpty private String mobile; /** * 姓名 */ private String name; /** * 部门 */ private String department; /** * 角色 */ @TableField(exist=false) private Set<Role> roles = new HashSet<>(); /** * 获取用户名 * * @return 用户名 */ public String getUsername() { return username; } /** * 设置用户名 * * @param username * 用户名 */ public void setUsername(String username) { this.username = username; } /** * 获取密码 * * @return 密码 */ public String getPassword() { return password; } /** * 设置密码 * * @param password * 密码 */ public void setPassword(String password) { this.password = password; if (password != null) { setEncodedPassword(DigestUtils.md5Hex(password)); } } /** * 获取加密密码 * * @return 加密密码 */ public String getEncodedPassword() { return encodedPassword; } /** * 设置加密密码 * * @param encodedPassword * 加密密码 */ public void setEncodedPassword(String encodedPassword) { this.encodedPassword = encodedPassword; } /** * 获取E-mail * * @return E-mail */ public String getEmail() { return email; } /** * 设置E-mail * * @param email * E-mail */ public void setEmail(String email) { this.email = email; } /** * 获取手机 * * @return 手机 */ public String getMobile() { return mobile; } /** * 设置手机 * * @param mobile * 手机 */ public void setMobile(String mobile) { this.mobile = mobile; } /** * 获取姓名 * * @return 姓名 */ public String getName() { return name; } /** * 设置姓名 * * @param name * 姓名 */ public void setName(String name) { this.name = name; } /** * 获取部门 * * @return 部门 */ public String getDepartment() { return department; } /** * 设置部门 * * @param department * 部门 */ public void setDepartment(String department) { this.department = department; } /** * 获取角色 * * @return 角色 */ public Set<Role> getRoles() { return roles; } /** * 设置角色 * * @param roles * 角色 */ public void setRoles(Set<Role> roles) { this.roles = roles; } @Override @Transient public String getDisplayName() { return getUsername(); } @Override @Transient public Object getPrincipal() { return getUsername(); } @Override @Transient public Object getCredentials() { return getPassword(); } @Override @Transient public boolean isValidCredentials(Object credentials) { return credentials != null && StringUtils.equals(DigestUtils.md5Hex(credentials instanceof char[] ? String.valueOf((char[]) credentials) : String.valueOf(credentials)), getEncodedPassword()); } /** * 持久化前处理 */ @PrePersist public void prePersist() { setUsername(StringUtils.lowerCase(getUsername())); setEmail(StringUtils.lowerCase(getEmail())); } /** * 更新前处理 */ @PreUpdate public void preUpdate() { setEmail(StringUtils.lowerCase(getEmail())); } }
[ "1169794338@qq.com" ]
1169794338@qq.com
bfd9d2a3da506b0ffae7c3fa04e25eb21c95a98c
23a9b9e2d6f3d4dd496911862e2f2b144282a3bc
/src/test/java/cn/cuit/exam/service/impl/MajorServiceImplTest.java
654558390597c025657e2117d0b28ff2b78d5985
[]
no_license
adventure-111/exam2.0
fdb9de1bc105d9bfb9a58bd7c53320816b7e0c00
b0940f4d923b2c5eac646bb8e4108b99cc7f5bbd
refs/heads/main
2023-06-01T14:23:59.126672
2021-06-21T19:39:03
2021-06-21T19:39:03
368,561,766
0
2
null
2021-06-16T16:51:24
2021-05-18T14:32:00
Java
UTF-8
Java
false
false
401
java
package cn.cuit.exam.service.impl; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest public class MajorServiceImplTest { @Autowired private MajorServiceImpl service; @Test void test1() { System.out.println(service.getMshortByMno("0702")); } }
[ "2715150056@qq.com" ]
2715150056@qq.com
42c6a21555e70c3cbf318faf519c9e1f67ee672d
eaf1803c0ceeb0c1dd2467884fbf330c5c85f6cb
/src/com/vova_cons/Physics/Point.java
404dfd4b82d90ee8e024fedc0dba567bdeb3213b
[]
no_license
anbu93/SpaceBattleGame
16f4b6ceb7764cbd9b50067fce1ee2a0506a730e
4783de0cfd9e2bcfc45d560501738892e271d36d
refs/heads/master
2021-01-10T14:31:00.866304
2016-02-13T06:45:20
2016-02-13T06:45:20
51,239,759
0
0
null
null
null
null
UTF-8
Java
false
false
651
java
package com.vova_cons.Physics; public interface Point extends Cloneable { static Point create(double x, double y){ return new PointImpl(x, y); } static Point create(String str){ String[] values = str.split(" "); double x = Double.parseDouble(values[0]); double y = Double.parseDouble(values[1]); return create(x, y); } static Point getInvertYPoint(Point point, double height){ return new InvertY(point, height); } double getX(); double getY(); Point offset(Point point); Point clone(); boolean equals(Point point); Point offset(double x, double y); }
[ "anbu23477@gmail.com" ]
anbu23477@gmail.com
6f2a92d2e369af7c61cd6aa163db185947d3c160
a2e5315745c6e5252c8bc76e21f2c0c0ffb6c41b
/Spring/Spring-Day2/src/main/java/com/taggy/spring/beanpostprocessor/Loan.java
a1b403136556764b726662e3cfd340070eb7abfb
[]
no_license
TheMaheshBiradar/spring-web-apps
6f140a7ca05b65134bbfadace33b6f8b9751741b
42c882c65ec9ff63fb51de1a2d68ad2521309d63
refs/heads/master
2023-07-25T19:51:36.626345
2023-07-12T23:02:21
2023-07-12T23:02:21
38,208,574
0
0
null
null
null
null
UTF-8
Java
false
false
321
java
package com.taggy.spring.beanpostprocessor; public class Loan { private String loanType; public void setLoanType(String loanType) { this.loanType = loanType; } public String getLoanType() { return loanType; } @Override public String toString() { return "Loan [loanType=" + loanType + "]"; } }
[ "biradar.m2@gmail.com" ]
biradar.m2@gmail.com
cddd675b99d82bc53a490fba3ca1ed0b8d1dbf41
9b5f2e99feeed748f0aa7ad30cf71088ede9b722
/src/main/java/hu/sztaki/phytree/io/FastaWriter.java
a6bd215c441c868e51613e8a5cee01767be98938
[ "Apache-2.0" ]
permissive
wsgan001/PhyTreeSearch
408dc2b6096671b6df64b7119a3f7518b54bdddc
577e0a60db101ccee16705a28ca9177078fa4982
refs/heads/master
2021-05-10T13:50:39.382768
2016-02-03T08:54:46
2016-02-03T08:54:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,591
java
package hu.sztaki.phytree.io; import hu.sztaki.phytree.FastaItem; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; public class FastaWriter { private OutputStream output; public FastaWriter(OutputStream os) { output = os; } public void closeOS() throws IOException { output.flush(); output.close(); } public void writeFastaItem(FastaItem fastaItem) throws IOException { output.write(fastaItem.getHeaderRow().getBytes(Charset.forName("UTF-8"))); output.write("\n".getBytes(Charset.forName("UTF-8"))); for (String sequenceRow : fastaItem.getSequenceRows()) { output.write(sequenceRow.getBytes(Charset.forName("UTF-8"))); output.write("\n".getBytes(Charset.forName("UTF-8"))); } } public void writeFastaItemWithMatch(FastaItem fastaItem, boolean matched) throws IOException { output.write(fastaItem.getHeaderRow().getBytes(Charset.forName("UTF-8"))); if (matched) { output.write("|1".getBytes(Charset.forName("UTF-8"))); } else { output.write("|0".getBytes(Charset.forName("UTF-8"))); } output.write("\n".getBytes(Charset.forName("UTF-8"))); for (String sequenceRow : fastaItem.getSequenceRows()) { output.write(sequenceRow.getBytes(Charset.forName("UTF-8"))); output.write("\n".getBytes(Charset.forName("UTF-8"))); } } public void writeFastaList(List<FastaItem> fastaList) throws IOException { for (FastaItem fastaItem : fastaList) { writeFastaItem(fastaItem); } } public void writeFastaListWithPatternMatchResult(List<FastaItem> fastaList, boolean matched) throws IOException { for (FastaItem fastaItem : fastaList) { writeFastaItemWithMatch(fastaItem, matched); } } // fasta items containing the pattern will be printed first, in alphabetical order(by AC num), // then the rest (also in AC-alphabetical order) public void writeOrderedFastaList(List<FastaItem> fastaList, String pattern) throws IOException { List<FastaItem> contains = new ArrayList<FastaItem>(); List<FastaItem> notContains = new ArrayList<FastaItem>(); for (FastaItem it: fastaList) { if (it.getSequenceString().contains(pattern)) { contains.add(it); } else { notContains.add(it); } } java.util.Collections.sort(contains); java.util.Collections.sort(notContains); writeFastaListWithPatternMatchResult(contains, true); writeFastaListWithPatternMatchResult(notContains, false); } }
[ "adrienn.szabo4@gmail.com" ]
adrienn.szabo4@gmail.com
47a0a7495a5337f4dbae7b2333d6096000e1eb1f
0d4f05c9909695a166e97b8958680945ea5c1266
/src/minecraft/io/netty/handler/codec/Headers.java
c5c5910f84782abf540ad43f4d6719a5bda82610
[]
no_license
MertDundar1/ETB-0.6
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
145d008fed353545157cd0e73daae8bc8d7f50b9
refs/heads/master
2022-01-15T08:42:12.762634
2019-05-15T23:37:33
2019-05-15T23:37:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,890
java
package io.netty.handler.codec; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; import java.util.Set; public abstract interface Headers<K, V, T extends Headers<K, V, T>> extends Iterable<Map.Entry<K, V>> { public abstract V get(K paramK); public abstract V get(K paramK, V paramV); public abstract V getAndRemove(K paramK); public abstract V getAndRemove(K paramK, V paramV); public abstract List<V> getAll(K paramK); public abstract List<V> getAllAndRemove(K paramK); public abstract Boolean getBoolean(K paramK); public abstract boolean getBoolean(K paramK, boolean paramBoolean); public abstract Byte getByte(K paramK); public abstract byte getByte(K paramK, byte paramByte); public abstract Character getChar(K paramK); public abstract char getChar(K paramK, char paramChar); public abstract Short getShort(K paramK); public abstract short getShort(K paramK, short paramShort); public abstract Integer getInt(K paramK); public abstract int getInt(K paramK, int paramInt); public abstract Long getLong(K paramK); public abstract long getLong(K paramK, long paramLong); public abstract Float getFloat(K paramK); public abstract float getFloat(K paramK, float paramFloat); public abstract Double getDouble(K paramK); public abstract double getDouble(K paramK, double paramDouble); public abstract Long getTimeMillis(K paramK); public abstract long getTimeMillis(K paramK, long paramLong); public abstract Boolean getBooleanAndRemove(K paramK); public abstract boolean getBooleanAndRemove(K paramK, boolean paramBoolean); public abstract Byte getByteAndRemove(K paramK); public abstract byte getByteAndRemove(K paramK, byte paramByte); public abstract Character getCharAndRemove(K paramK); public abstract char getCharAndRemove(K paramK, char paramChar); public abstract Short getShortAndRemove(K paramK); public abstract short getShortAndRemove(K paramK, short paramShort); public abstract Integer getIntAndRemove(K paramK); public abstract int getIntAndRemove(K paramK, int paramInt); public abstract Long getLongAndRemove(K paramK); public abstract long getLongAndRemove(K paramK, long paramLong); public abstract Float getFloatAndRemove(K paramK); public abstract float getFloatAndRemove(K paramK, float paramFloat); public abstract Double getDoubleAndRemove(K paramK); public abstract double getDoubleAndRemove(K paramK, double paramDouble); public abstract Long getTimeMillisAndRemove(K paramK); public abstract long getTimeMillisAndRemove(K paramK, long paramLong); public abstract boolean contains(K paramK); public abstract boolean contains(K paramK, V paramV); public abstract boolean containsObject(K paramK, Object paramObject); public abstract boolean containsBoolean(K paramK, boolean paramBoolean); public abstract boolean containsByte(K paramK, byte paramByte); public abstract boolean containsChar(K paramK, char paramChar); public abstract boolean containsShort(K paramK, short paramShort); public abstract boolean containsInt(K paramK, int paramInt); public abstract boolean containsLong(K paramK, long paramLong); public abstract boolean containsFloat(K paramK, float paramFloat); public abstract boolean containsDouble(K paramK, double paramDouble); public abstract boolean containsTimeMillis(K paramK, long paramLong); public abstract int size(); public abstract boolean isEmpty(); public abstract Set<K> names(); public abstract T add(K paramK, V paramV); public abstract T add(K paramK, Iterable<? extends V> paramIterable); public abstract T add(K paramK, V... paramVarArgs); public abstract T addObject(K paramK, Object paramObject); public abstract T addObject(K paramK, Iterable<?> paramIterable); public abstract T addObject(K paramK, Object... paramVarArgs); public abstract T addBoolean(K paramK, boolean paramBoolean); public abstract T addByte(K paramK, byte paramByte); public abstract T addChar(K paramK, char paramChar); public abstract T addShort(K paramK, short paramShort); public abstract T addInt(K paramK, int paramInt); public abstract T addLong(K paramK, long paramLong); public abstract T addFloat(K paramK, float paramFloat); public abstract T addDouble(K paramK, double paramDouble); public abstract T addTimeMillis(K paramK, long paramLong); public abstract T add(Headers<? extends K, ? extends V, ?> paramHeaders); public abstract T set(K paramK, V paramV); public abstract T set(K paramK, Iterable<? extends V> paramIterable); public abstract T set(K paramK, V... paramVarArgs); public abstract T setObject(K paramK, Object paramObject); public abstract T setObject(K paramK, Iterable<?> paramIterable); public abstract T setObject(K paramK, Object... paramVarArgs); public abstract T setBoolean(K paramK, boolean paramBoolean); public abstract T setByte(K paramK, byte paramByte); public abstract T setChar(K paramK, char paramChar); public abstract T setShort(K paramK, short paramShort); public abstract T setInt(K paramK, int paramInt); public abstract T setLong(K paramK, long paramLong); public abstract T setFloat(K paramK, float paramFloat); public abstract T setDouble(K paramK, double paramDouble); public abstract T setTimeMillis(K paramK, long paramLong); public abstract T set(Headers<? extends K, ? extends V, ?> paramHeaders); public abstract T setAll(Headers<? extends K, ? extends V, ?> paramHeaders); public abstract boolean remove(K paramK); public abstract T clear(); public abstract Iterator<Map.Entry<K, V>> iterator(); }
[ "realhcfus@gmail.com" ]
realhcfus@gmail.com
b1c02fe82f66d922df7b365744f3f7bdc34a3887
f3e9144e2cee84e08c79ae0f952f78bf627db5e5
/runner-api/src/main/java/com/ckx/runner/RunnerApiApplication.java
86264709bec46b2cd2e63f4f0eecdb5bafff3eb9
[]
no_license
toeygueoo/runner
31bb773514fb5175dfde516d25c98f349a3482f4
69a42add0fe65c9148c9d89677f99f23ef316e9b
refs/heads/master
2023-04-17T23:02:21.700318
2021-04-16T12:56:15
2021-04-16T12:56:15
363,603,623
0
0
null
null
null
null
UTF-8
Java
false
false
324
java
package com.ckx.runner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class RunnerApiApplication { public static void main(String[] args) { SpringApplication.run(RunnerApiApplication.class,args); } }
[ "shizhi1970122@126.com" ]
shizhi1970122@126.com
d76a7e51a78d35f02083d5c09369abffcecce222
f1f392854275c425726bc2f308c51251df6c567a
/src/server/events/MapleSnowball.java
d6bd9cb850481c4f1170a5581b3940c516015095
[]
no_license
s884812/TWMS_118
e7cac6603facf2187ea21d5c77bae10dd89bd392
f30028cd9211042078a6c537dcf60955ec42c56a
refs/heads/master
2020-03-25T11:58:36.479591
2018-10-05T10:49:25
2018-10-05T10:49:25
143,756,012
3
7
null
null
null
null
UTF-8
Java
false
false
8,745
java
package server.events; import client.MapleCharacter; import client.MapleDisease; import java.util.concurrent.ScheduledFuture; import server.Timer.EventTimer; import server.life.MobSkillFactory; import server.maps.MapleMap; import tools.packet.MaplePacketCreator; public class MapleSnowball extends MapleEvent { private MapleSnowballs[] balls = new MapleSnowballs[2]; public MapleSnowball(final int channel, final MapleEventType type) { super(channel,type); } @Override public void finished(MapleCharacter chr) { //do nothing. } @Override public void unreset() { super.unreset(); for (int i = 0; i < 2; i++) { getSnowBall(i).resetSchedule(); resetSnowBall(i); } } @Override public void reset() { super.reset(); makeSnowBall(0); makeSnowBall(1); } @Override public void startEvent() { for (int i = 0; i < 2; i++) { MapleSnowballs ball = getSnowBall(i); ball.broadcast(getMap(0), 0); //gogogo ball.setInvis(false); ball.broadcast(getMap(0), 5); //idk xd getMap(0).broadcastMessage(MaplePacketCreator.enterSnowBall()); } } public void resetSnowBall(int teamz) { balls[teamz] = null; } public void makeSnowBall(int teamz) { resetSnowBall(teamz); balls[teamz] = new MapleSnowballs(teamz); } public MapleSnowballs getSnowBall(int teamz) { return balls[teamz]; } public static class MapleSnowballs { private int position = 0; private final int team; private int startPoint = 0; private boolean invis = true; private boolean hittable = true; private int snowmanhp = 7500; private ScheduledFuture<?> snowmanSchedule = null; public MapleSnowballs(int team_) { this.team = team_; } public void resetSchedule() { if (snowmanSchedule != null) { snowmanSchedule.cancel(false); snowmanSchedule = null; } } public int getTeam() { return team; } public int getPosition() { return position; } public void setPositionX(int pos) { this.position = pos; } public void setStartPoint(MapleMap map) { this.startPoint++; broadcast(map, startPoint); } public boolean isInvis() { return invis; } public void setInvis(boolean i) { this.invis = i; } public boolean isHittable() { return hittable && !invis; } public void setHittable(boolean b) { this.hittable = b; } public int getSnowmanHP() { return snowmanhp; } public void setSnowmanHP(int shp) { this.snowmanhp = shp; } public void broadcast(MapleMap map, int message) { for (MapleCharacter chr : map.getCharactersThreadsafe()) { chr.getClient().getSession().write(MaplePacketCreator.snowballMessage(team, message)); } } public int getLeftX() { return position * 3 + 175; } public int getRightX() { return getLeftX() + 275; //exact pos where you cant hit it, as it should knockback } public static final void hitSnowball(final MapleCharacter chr) { int team = chr.getTruePosition().y > -80 ? 0 : 1; final MapleSnowball sb = ((MapleSnowball) chr.getClient().getChannelServer().getEvent(MapleEventType.Snowball)); final MapleSnowballs ball = sb.getSnowBall(team); if (ball != null && !ball.isInvis()) { boolean snowman = chr.getTruePosition().x < -360 && chr.getTruePosition().x > -560; if (!snowman) { int damage = (Math.random() < 0.01 || (chr.getTruePosition().x > ball.getLeftX() && chr.getTruePosition().x < ball.getRightX())) && ball.isHittable() ? 10 : 0; chr.getMap().broadcastMessage(MaplePacketCreator.hitSnowBall(team, damage, 0, 1)); if (damage == 0) { if (Math.random() < 0.2) { chr.getClient().getSession().write(MaplePacketCreator.leftKnockBack()); chr.getClient().getSession().write(MaplePacketCreator.enableActions()); } } else { ball.setPositionX(ball.getPosition() + 1); //System.out.println("pos: " + chr.getPosition().x + ", ballpos: " + ball.getPosition().x + ", hittable: " + ball.isHittable() + ", startPoints: " + startPoints[0] + "," + startPoints[1] + ", damage: " + damage + ", snowmens: " + snowmens[0] + "," + snowmens[1] + ", extraDistances: " + extraDistances[0] + "," + extraDistances[1] + ", HP: " + ball.getHP()); if (ball.getPosition() == 255 || ball.getPosition() == 511 || ball.getPosition() == 767) { // Going to stage ball.setStartPoint(chr.getMap()); chr.getMap().broadcastMessage(MaplePacketCreator.rollSnowball(4, sb.getSnowBall(0), sb.getSnowBall(1))); } else if (ball.getPosition() == 899) { // Crossing the finishing line final MapleMap map = chr.getMap(); for (int i = 0; i < 2; i++) { sb.getSnowBall(i).setInvis(true); map.broadcastMessage(MaplePacketCreator.rollSnowball(i + 2, sb.getSnowBall(0), sb.getSnowBall(1))); //inviseble } chr.getMap().broadcastMessage(MaplePacketCreator.serverNotice(6, "Congratulations! Team " + (team == 0 ? "Story" : "Maple") + " has won the Snowball Event!")); for (MapleCharacter chrz : chr.getMap().getCharactersThreadsafe()) { if ((team == 0 && chrz.getTruePosition().y > -80) || (team == 1 && chrz.getTruePosition().y <= -80)) { //winner sb.givePrize(chrz); } sb.warpBack(chrz); } sb.unreset(); } else if (ball.getPosition() < 899) { chr.getMap().broadcastMessage(MaplePacketCreator.rollSnowball(4, sb.getSnowBall(0), sb.getSnowBall(1))); ball.setInvis(false); } } } else if (ball.getPosition() < 899) { int damage = 15; if (Math.random() < 0.3) { damage = 0; } if (Math.random() < 0.05) { damage = 45; } chr.getMap().broadcastMessage(MaplePacketCreator.hitSnowBall(team + 2, damage, 0, 0)); // Hitting the snowman ball.setSnowmanHP(ball.getSnowmanHP() - damage); if (damage > 0) { chr.getMap().broadcastMessage(MaplePacketCreator.rollSnowball(0, sb.getSnowBall(0), sb.getSnowBall(1))); //not sure if (ball.getSnowmanHP() <= 0) { ball.setSnowmanHP(7500); final MapleSnowballs oBall = sb.getSnowBall(team == 0 ? 1 : 0); oBall.setHittable(false); final MapleMap map = chr.getMap(); oBall.broadcast(map, 4); oBall.snowmanSchedule = EventTimer.getInstance().schedule(new Runnable() { @Override public void run() { oBall.setHittable(true); oBall.broadcast(map, 5); } }, 10000); for (MapleCharacter chrz : chr.getMap().getCharactersThreadsafe()) { if ((ball.getTeam() == 0 && chr.getTruePosition().y < -80) || (ball.getTeam() == 1 && chr.getTruePosition().y > -80)) { chrz.giveDebuff(MapleDisease.SEDUCE, MobSkillFactory.getMobSkill(128, 1)); //go left } } } } } } } } }
[ "s884812@gmail.com" ]
s884812@gmail.com
efacc38cd6dab7d8b46f29d4a32f1930f3e0d954
0eb37ae3ccd63221b5abaf167d5bceb4e0705fbc
/web-s/src/main/java/com/enjoygolf24/online/web/controller/PointHistoryController.java
fe5a1e5258e2a7d18a5f298814e0922deb24bf06
[]
no_license
r-e-d-dragon/myWork
2405303054d4bb181cc129a007b4fe5db3bb29e1
62a147ccd6f7749aaddc42d1f9fec4f9afb85551
refs/heads/master
2022-12-25T12:55:56.015817
2020-10-09T16:01:39
2020-10-09T16:01:39
291,210,244
0
0
null
null
null
null
UTF-8
Java
false
false
7,825
java
package com.enjoygolf24.online.web.controller; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.enjoygolf24.api.common.code.CodeTypeCd; import com.enjoygolf24.api.common.database.bean.TblPointManage; import com.enjoygolf24.api.common.utility.DefaultPageSizeUtility; import com.enjoygolf24.api.common.utility.LoginUtility; import com.enjoygolf24.api.common.validator.groups.Search0; import com.enjoygolf24.api.service.AspService; import com.enjoygolf24.api.service.CdMapService; import com.enjoygolf24.api.service.MemberInfoManageService; import com.enjoygolf24.api.service.MemberReservationManageService; import com.enjoygolf24.api.service.PointService; import com.enjoygolf24.online.web.form.PointHistoryListForm; import com.github.pagehelper.PageInfo; @Controller @RequestMapping("/admin/member/pointHistory") public class PointHistoryController { private static final Logger logger = LoggerFactory.getLogger(PointHistoryController.class); @Autowired HttpServletRequest request; @Autowired PointService pointService; @Autowired AspService aspService; @Autowired MemberInfoManageService memberInfoManageService; @Autowired MemberReservationManageService memberReservationManageService; @Autowired private CdMapService cdMapService; @RequestMapping(value = "/index", method = RequestMethod.POST) public String index(@ModelAttribute("pointHistoryListForm") PointHistoryListForm form, HttpServletRequest request, Model model) { logger.info("Start pointHistory Controller"); initListForm(form, model); form.setPageNo(DefaultPageSizeUtility.PAGE_FIRST); List<TblPointManage> pointHistoryList = pointService.getHistoryListAll(form.getAspCode(), form.getPageNo(), form.getPageSize()); PageInfo<TblPointManage> pageInfo = new PageInfo<TblPointManage>(pointHistoryList); model.addAttribute("pageInfo", pageInfo); form.setPointHistoryList(pointHistoryList); model.addAttribute("modelPointHistoryList", pointHistoryList); model.addAttribute("pointHistoryListForm", form); logger.info("End pointHistory Controller"); return "/admin/member/pointHistory/index"; } @RequestMapping(value = "", method = RequestMethod.GET) public String memberHistoryList(@ModelAttribute("pointHistoryListForm") PointHistoryListForm form, Model model) { logger.info("Start pointHistory Controller"); initListForm(form, model); form.setPageNo(DefaultPageSizeUtility.PAGE_FIRST); List<TblPointManage> pointHistoryList = pointService.getHistoryListAll(form.getAspCode(), form.getPageNo(), form.getPageSize()); PageInfo<TblPointManage> pageInfo = new PageInfo<TblPointManage>(pointHistoryList); model.addAttribute("pageInfo", pageInfo); form.setPointHistoryList(pointHistoryList); model.addAttribute("modelPointHistoryList", pointHistoryList); model.addAttribute("pointHistoryListForm", form); logger.info("End pointHistory Controller"); return "/admin/member/pointHistory/index"; } @RequestMapping(value = "/list", method = RequestMethod.POST) public String list(@ModelAttribute @Validated(Search0.class) PointHistoryListForm form, BindingResult result, Model model) { logger.info("Start pointHistory Controller"); if (result.hasErrors()) { return memberHistoryList(form, model); } initListForm(form, model); List<TblPointManage> pointHistoryList = pointService.getHistoryList(form.getMemberCode(), form.getName(), form.getRegisterUserCode(), form.getRegisterUserName(), form.getRegisteredMonth(), form.getStartMonth(), form.getAspCode(), form.getPageNo(), form.getPageSize()); PageInfo<TblPointManage> pageInfo = new PageInfo<TblPointManage>(pointHistoryList); model.addAttribute("pageInfo", pageInfo); form.setPointHistoryList(pointHistoryList); model.addAttribute("modelPointHistoryList", pointHistoryList); model.addAttribute("pointHistoryListForm", form); logger.info("End pointHistory Controller"); return "/admin/member/pointHistory/index"; } @RequestMapping(value = "/list/prev", method = RequestMethod.POST) public String listPrev(@ModelAttribute @Validated(Search0.class) PointHistoryListForm form, BindingResult result, Model model) { logger.info("Start pointHistory Controller"); if (result.hasErrors()) { return memberHistoryList(form, model); } initListForm(form, model); form.setPageNo(form.getPageNo() - 1); List<TblPointManage> pointHistoryList = pointService.getHistoryList(form.getMemberCode(), form.getName(), form.getRegisterUserCode(), form.getRegisterUserName(), form.getRegisteredMonth(), form.getStartMonth(), form.getAspCode(), form.getPageNo(), form.getPageSize()); PageInfo<TblPointManage> pageInfo = new PageInfo<TblPointManage>(pointHistoryList); model.addAttribute("pageInfo", pageInfo); form.setPointHistoryList(pointHistoryList); model.addAttribute("modelPointHistoryList", pointHistoryList); model.addAttribute("pointHistoryListForm", form); logger.info("End pointHistory Controller"); return "/admin/member/pointHistory/index"; } @RequestMapping(value = "/list/next", method = RequestMethod.POST) public String listNext(@ModelAttribute @Validated(Search0.class) PointHistoryListForm form, BindingResult result, Model model) { logger.info("Start pointHistory Controller"); if (result.hasErrors()) { return memberHistoryList(form, model); } initListForm(form, model); form.setPageNo(form.getPageNo() + 1); List<TblPointManage> pointHistoryList = pointService.getHistoryList(form.getMemberCode(), form.getName(), form.getRegisterUserCode(), form.getRegisterUserName(), form.getRegisteredMonth(), form.getStartMonth(), form.getAspCode(), form.getPageNo(), form.getPageSize()); PageInfo<TblPointManage> pageInfo = new PageInfo<TblPointManage>(pointHistoryList); model.addAttribute("pageInfo", pageInfo); form.setPointHistoryList(pointHistoryList); model.addAttribute("modelPointHistoryList", pointHistoryList); model.addAttribute("pointHistoryListForm", form); logger.info("End pointHistory Controller"); return "/admin/member/pointHistory/index"; } @RequestMapping(value = "/details", method = RequestMethod.POST) public String details(@ModelAttribute PointHistoryListForm form, BindingResult result, Model model) { TblPointManage pointHistory = pointService.getHistory(form.getSelectedId(), form.getSelectedMemberCode()); model.addAttribute("pointHistory", pointHistory); model.addAttribute("pointHistoryId", pointHistory.getId().getId()); model.addAttribute("memberCode", pointHistory.getId().getMemberCode()); model.addAttribute("pointTypeName", cdMapService.getName(CodeTypeCd.POINT_TYPE_CD, pointHistory.getPointType())); model.addAttribute("pointCategoryName", cdMapService.getName(CodeTypeCd.POINT_CATEGORY_CD, pointHistory.getCategoryCode())); model.addAttribute("memberName", memberInfoManageService.selectMember(pointHistory.getId().getMemberCode()).getUserName()); return "/admin/member/pointHistory/details"; } private void initListForm(PointHistoryListForm form, Model model) { String aspCode = LoginUtility.getLoginUser().getAspCode(); if (!aspService.getAspByName("本社").getAspCode().equals(aspCode)) { form.setAspCode(aspCode); } } }
[ "H1705635@H1705635" ]
H1705635@H1705635
c76c5c5a015d86ea26e832996dcdc137f1038fec
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project399/src/test/java/org/gradle/test/performance/largejavamultiproject/project399/p1995/Test39914.java
47dc943da5fa0e3c82f7f33c314a51bba2558052
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,113
java
package org.gradle.test.performance.largejavamultiproject.project399.p1995; import org.junit.Test; import static org.junit.Assert.*; public class Test39914 { Production39914 objectUnderTest = new Production39914(); @Test public void testProperty0() { String value = "value"; objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { String value = "value"; objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { String value = "value"; objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
4541468c18a7cb93f55e2af0564f80bb4e2845e7
226dcda557ea73e65b08af537ce86bc3e387fd9b
/src/view/View.java
837e5a76c2e73537dd864fe62bff34cd62196646
[]
no_license
pierremalaga/ProyectoInventario
3e120dc24ec2c928dba249b53901b8d016950482
9e8320e6d96ef5381907303af084447e40866a6f
refs/heads/master
2021-01-10T06:18:00.543038
2015-11-07T14:23:02
2015-11-07T14:23:02
45,921,420
0
1
null
null
null
null
UTF-8
Java
false
false
49
java
package view; public class View { }
[ "pierre.malaga.t@gmail.com" ]
pierre.malaga.t@gmail.com
94d1c7d254cfd292a64e22732851a5c059e50b39
d1e6dcf0cd24690658182b842f45a1876c4c7124
/wolf_openresource/src/com/wzd/openresource/util/JsonUtil.java
bf8d0f7de7c67609f84710f645809ee1e9d82d44
[]
no_license
423811758/android_frame
b606ab07e49eada4272741310a1be68047c2349e
789bac56254127a473ad4d0b3a2c027d90d0d152
refs/heads/master
2021-01-20T00:28:29.063359
2017-08-24T09:31:08
2017-08-24T09:31:08
101,277,259
0
0
null
null
null
null
UTF-8
Java
false
false
589
java
package com.wzd.openresource.util; import org.codehaus.jackson.map.ObjectMapper; /** * Json 和 Java 对象转化工具类 */ public class JsonUtil { private static ObjectMapper objectMapper; static { objectMapper = new ObjectMapper(); } /** * bean 到 json 转化 */ public static String bean2Json ( Object bean ) throws Exception { String s = objectMapper.writeValueAsString(bean); return s; } /** * json 到 bean 转化 */ public static Object json2Bean ( String json, Class<?> cls ) throws Exception { return objectMapper.readValue(json, cls); } }
[ "kj-8796@zzy.local" ]
kj-8796@zzy.local
061ca15842b0288a8cac0ea10f21d86f1e363cd9
1c8c51b70de24925d3b169083c0a1f66bb676142
/src/main/java/data/代数/负数.java
b0517fd55c7d561f459954ebc51111e5dda3c74e
[]
no_license
xugeiyangguang/kownledgeGraph
867b733c19b7ac3ca034468843a4cad59755ea2c
e1f0d5d048449440bade905bd6265bbd8557e866
refs/heads/master
2022-12-09T19:15:59.060402
2020-04-01T11:32:53
2020-04-01T11:32:53
222,592,654
0
0
null
2022-12-06T00:43:16
2019-11-19T02:40:27
Java
UTF-8
Java
false
false
61
java
package data.代数; public class 负数 extends 实数 { }
[ "yixuyangguang_2017@163.com" ]
yixuyangguang_2017@163.com
bce0d5b27163a37dc3548a23b3802ca2711fff67
754ee75fa5b434ce646eee6c8e3381c8d5371d53
/src/main/java/commons/AbstractTest.java
7be942dce3c89f12a0ccc09eac357d8ca75a0c88
[]
no_license
mylinh12/GITHUB_JENKIN_BLUEOCEAN_MAVEN_CUCUMBER_05_LINHOM
cd7afa2e9d18ae4ca48224fb50582e90d131e065
5758e02926a7fd1e6b77ff447bdc215c77b2b065
refs/heads/master
2020-04-21T22:30:56.766498
2019-02-09T21:23:59
2019-02-09T21:23:59
169,913,670
0
0
null
null
null
null
UTF-8
Java
false
false
3,601
java
package commons; import java.util.Random; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openqa.selenium.WebDriver; import org.testng.Assert; import org.testng.Reporter; public class AbstractTest { WebDriver driver; // Khoi tao log protected final Log log; // Vi moi file TCs deu ke thu AbstractTest, nen contructor cua AbstractTest la noi de bat dau viec ghi log. public AbstractTest() { log = LogFactory.getLog(getClass()); } protected void closeBrowser(WebDriver driver) { try { // delete all cookies driver.manage().deleteAllCookies(); // Detect OS (Windows/ Linux/ MAC) String osName = System.getProperty("os.name").toLowerCase(); String cmd = ""; driver.quit(); if (driver.toString().toLowerCase().contains("chrome")) { // Kill process if (osName.toLowerCase().contains("mac")) { cmd = "pkill chromedriver"; } else { cmd = "taskkill /F /FI \"IMAGENAME eq chromedriver*\""; } Process process = Runtime.getRuntime().exec(cmd); process.waitFor(); } if (driver.toString().toLowerCase().contains("internetexplorer")) { cmd = "taskkill /F /FI \"IMAGENAME eq IEDriverServer*\""; Process process = Runtime.getRuntime().exec(cmd); process.waitFor(); } // log.info("---------- QUIT BROWSER SUCCESS ----------"); } catch (Exception e) { System.out.println(e.getMessage()); } } public int randomNumber() { Random rand = new Random(); int number = rand.nextInt(999999) + 1; return number; } public String randomEmail() { Random rand = new Random(); String email = rand.nextInt(999999) + "@gmail.com"; return email; } private boolean checkPassed(boolean condition) { boolean pass = true; try { if (condition == true) log.info("===PASSED==="); else log.info("===FAILED==="); Assert.assertTrue(condition); } catch (Throwable e) { pass = false; log.info("=== Throw error message: " + e.getMessage() + " ===\n"); // Se add ket qua error vao TestNG report cho minh. VertificationFailures.getFailures().addFailureForTest(Reporter.getCurrentTestResult(), e); // Con cai nay la dung de add status (true/false) to ReportNG report cho minh. // Khi ko co dong nay, thi tat ca cac loai reports se bao Pass het (la bi sai nha), khi co dong nay vao thi report bao chinh xac hon (co fail xuat hien) Reporter.getCurrentTestResult().setThrowable(e); } return pass; } public boolean verifyTrue(boolean condition) { return checkPassed(condition); } private boolean checkFailed(boolean condition) { boolean pass = true; try { if (condition == true) log.info("===PASSEDd==="); else log.info("===FAILED==="); Assert.assertFalse(condition); } catch (Throwable e) { pass = false; log.info("=== Throw error message: " + e.getMessage() + " ===\n"); Reporter.getCurrentTestResult().setThrowable(e); } return pass; } public boolean verifyFail(boolean condition) { return checkFailed(condition); } private boolean checkEquals(Object actual, Object expected) { boolean pass = true; try { Assert.assertEquals(actual, expected); } catch (Throwable e) { pass = false; log.info("=== Throw error message: " + e.getMessage() + " ===\n"); Reporter.getCurrentTestResult().setThrowable(e); } return pass; } public boolean verifyEquals(Object actual, Object expected) { return checkEquals(actual, expected); } }
[ "shinichi121088@gmail.com" ]
shinichi121088@gmail.com
3c41725ddf872070d87687a2bb5050dbf136bc23
d28374709c32819fd0aafca36f379ead5256edd1
/src/net/whn/loki/common/MachineUpdate.java
84ff40075582f9690fa6a705040724a65f2e4e8a
[]
no_license
champy/Loki
93f2ffc146e838b2440b4969d9d74e041bf1a959
11784c54028daf363060f6e40287a1643d5857ef
refs/heads/master
2021-01-10T18:38:19.713662
2013-02-22T23:53:38
2013-02-22T23:53:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,227
java
/** *Project: Loki Render - A distributed job queue manager. *Version 0.6.2b *Copyright (C) 2013 Daniel Petersen *Created on Sep 28, 2009 */ /** *This program is free software: you can redistribute it and/or modify *it under the terms of the GNU General Public License as published by *the Free Software Foundation, either version 3 of the License, or *(at your option) any later version. * *This program is distributed in the hope that it will be useful, *but WITHOUT ANY WARRANTY; without even the implied warranty of *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *GNU General Public License for more details. * *You should have received a copy of the GNU General Public License *along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.whn.loki.common; import java.io.Serializable; import java.text.DecimalFormat; /** * * @author daniel */ public class MachineUpdate implements Serializable { public MachineUpdate(double lAvg, long tMemory, long fMemory, long fSwap) { loadAvg = lAvg; totalMemory = tMemory; freeMemory = fMemory; freeSwap = fSwap; usedMemory = generateMemUsage(); } public String getMemUsageStr() { return usedMemory; } public long getFreeSwap() { return freeSwap; } public double getLoadAvg() { return loadAvg; } public long getFreeMemory() { return freeMemory; } /*PRIVATE*/ private static final long bytesPerGB = 1073741824; private static DecimalFormat gb = new DecimalFormat("#0.00"); private final double loadAvg; private final long totalMemory; private final long freeMemory; private final long freeSwap; private final String usedMemory; private String generateMemUsage() { double total = (double) totalMemory / (double) bytesPerGB; String tmpUsed; if (totalMemory == freeMemory) { tmpUsed = "?"; } else { double used = (double) (totalMemory - freeMemory) / (double) bytesPerGB; tmpUsed = gb.format(used); } String tmpTotal = gb.format(total); return tmpUsed + "/" + tmpTotal; } }
[ "samuraidanieru@9f4f354f-a68d-4dce-aede-ed6e1f314cf8" ]
samuraidanieru@9f4f354f-a68d-4dce-aede-ed6e1f314cf8
310592a9d25fd3349ff0ceba5befd60988f9c51c
1da2285d1dad13204cb2ef0ba10f08fd76e050ed
/src/main/java/jm/security/example/service/UserServiceImpl.java
9138394bbf6d228baee8dcf84a0b6d55398e3700
[]
no_license
MukhachevMaksim/spring-security
06f797dba5abdff3170764eebb8dffdae01be45f
b519e2e265c4cade0e714cd40b4f0277473fb6eb
refs/heads/master
2023-03-01T08:56:01.047467
2021-01-27T16:18:22
2021-01-27T16:18:22
333,488,139
0
0
null
null
null
null
UTF-8
Java
false
false
1,379
java
package jm.security.example.service; import jm.security.example.dao.RoleDao; import jm.security.example.dao.UserDao; import jm.security.example.model.Role; import jm.security.example.model.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.HashSet; import java.util.List; import java.util.Set; @Service public class UserServiceImpl implements UserService { @Autowired private UserDao userDao; @Autowired private RoleDao roleDao; @Override public User getUserByName(String name) { return userDao.getUserByName(name); } @Override public User getUserById(Long id) { return userDao.getUserById(id); } @Override @Transactional public void add(User user) { Set<Role> roles = new HashSet<Role>(); roles.add(roleDao.getRoleById(1L)); user.setRoles(roles); userDao.add(user); } @Override @Transactional public void removeUserById(Long id) { userDao.removeUserById(id); } @Override @Transactional public List<User> listUsers() { return userDao.listUsers(); } @Override @Transactional public void update(Long id, User user) { userDao.update(id, user); } }
[ "itmukhachev@gmail.com" ]
itmukhachev@gmail.com
7961b6683fc1deba8760586976375574d8f5434e
6def7510eff84f1f87c3a8104d025acabe6daf72
/redisson/src/main/java/org/redisson/api/mapreduce/RReducer.java
36aed233ce42995558030f770a8571ce64336b9a
[ "Apache-2.0" ]
permissive
superhealth/redisson
3137702cd6d001efa9ea87a4d37fae8e35067dc1
09b2724c44567035c8806bfe4a79bdf355c816b8
refs/heads/master
2021-09-01T03:32:05.669015
2017-12-20T11:36:20
2017-12-20T11:36:20
115,315,003
1
0
null
2017-12-25T07:04:48
2017-12-25T07:04:48
null
UTF-8
Java
false
false
1,091
java
/** * Copyright 2016 Nikita Koksharov * * 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.redisson.api.mapreduce; import java.io.Serializable; import java.util.Iterator; /** * Reduces values mapped by key into single value. * * @author Nikita Koksharov * * @param <K> key type * @param <V> value type */ public interface RReducer<K, V> extends Serializable { /** * Invoked for each key * * @param reducedKey - key * @param iter - collection of values * @return value */ V reduce(K reducedKey, Iterator<V> iter); }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
d4b5c1036411a20f4f9939dabda53093b7c578f9
f4707f2466a4397a315a659520a98ba59137d460
/src/ch/jmildner/bridge/Drawing.java
c6f0f396b74cd9a2623ab656ed3ffc349ad4563e
[]
no_license
java-akademie/java_designpatterns
5f7de12b0c829472a352516d8869bd64435f7b50
b08349d6dc3bfb9bac6da17ebb7693a58a10de68
refs/heads/master
2020-03-25T07:18:15.585758
2018-08-09T08:35:04
2018-08-09T08:35:04
143,553,159
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package ch.jmildner.bridge; public abstract class Drawing { abstract public void drawCircle(double x, double y, double r); abstract public void drawLine(double x1, double y1, double x2, double y2); }
[ "johann.mildner@balcab.ch" ]
johann.mildner@balcab.ch
10027820f70c78aa770e168648f694f4013936ff
a5a7c6814a41bc3d74c59072eb739cad8a714b33
/src/main/src/com/sun/org/apache/xml/internal/serializer/utils/SerializerMessages.java
72f9062818880ef9545239613ba8a5905a4989ab
[ "Apache-2.0" ]
permissive
as543343879/myReadBook
3dcbbf739c184a84b32232373708c73db482f352
5f3af76e58357a0b2b78cc7e760c1676fe19414b
refs/heads/master
2023-09-01T16:09:21.287327
2023-08-23T06:44:46
2023-08-23T06:44:46
139,959,385
3
3
Apache-2.0
2023-06-14T22:31:32
2018-07-06T08:54:15
Java
UTF-8
Java
false
false
8,230
java
/* * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2004 The Apache Software Foundation. * * 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.sun.org.apache.xml.internal.serializer.utils; import java.util.ListResourceBundle; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * An instance of this class is a ListResourceBundle that * has the required getContents() method that returns * an array of message-key/message associations. * <p> * The message keys are defined in {@link MsgKey}. The * messages that those keys map to are defined here. * <p> * The messages in the English version are intended to be * translated. * * This class is not a public API, it is only public because it is * used in com.sun.org.apache.xml.internal.serializer. * * @xsl.usage internal */ public class SerializerMessages extends ListResourceBundle { /* * This file contains error and warning messages related to * Serializer Error Handling. * * General notes to translators: * 1) A stylesheet is a description of how to transform an input XML document * into a resultant XML document (or HTML document or text). The * stylesheet itself is described in the form of an XML document. * * 2) An element is a mark-up tag in an XML document; an attribute is a * modifier on the tag. For example, in <elem attr='val' attr2='val2'> * "elem" is an element name, "attr" and "attr2" are attribute names with * the values "val" and "val2", respectively. * * 3) A namespace declaration is a special attribute that is used to associate * a prefix with a URI (the namespace). The meanings of element names and * attribute names that use that prefix are defined with respect to that * namespace. * * */ /** The lookup table for error messages. */ public Object[][] getContents() { Object[][] contents = new Object[][] { { MsgKey.BAD_MSGKEY, "The message key ''{0}'' is not in the message class ''{1}''" }, { MsgKey.BAD_MSGFORMAT, "The format of message ''{0}'' in message class ''{1}'' failed." }, { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler." }, { MsgKey.ER_RESOURCE_COULD_NOT_FIND, "The resource [ {0} ] could not be found.\n {1}" }, { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, "The resource [ {0} ] could not load: {1} \n {2} \t {3}" }, { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, "Buffer size <=0" }, { MsgKey.ER_INVALID_UTF16_SURROGATE, "Invalid UTF-16 surrogate detected: {0} ?" }, { MsgKey.ER_OIERROR, "IO error" }, { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, "Cannot add attribute {0} after child nodes or before an element is produced. Attribute will be ignored." }, /* * Note to translators: The stylesheet contained a reference to a * namespace prefix that was undefined. The value of the substitution * text is the name of the prefix. */ { MsgKey.ER_NAMESPACE_PREFIX, "Namespace for prefix ''{0}'' has not been declared." }, /* * Note to translators: This message is reported if the stylesheet * being processed attempted to construct an XML document with an * attribute in a place other than on an element. The substitution text * specifies the name of the attribute. */ { MsgKey.ER_STRAY_ATTRIBUTE, "Attribute ''{0}'' outside of element." }, /* * Note to translators: As with the preceding message, a namespace * declaration has the form of an attribute and is only permitted to * appear on an element. The substitution text {0} is the namespace * prefix and {1} is the URI that was being used in the erroneous * namespace declaration. */ { MsgKey.ER_STRAY_NAMESPACE, "Namespace declaration ''{0}''=''{1}'' outside of element." }, { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, "Could not load ''{0}'' (check CLASSPATH), now using just the defaults" }, { MsgKey.ER_ILLEGAL_CHARACTER, "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}." }, { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" }, { MsgKey.ER_INVALID_PORT, "Invalid port number" }, { MsgKey.ER_PORT_WHEN_HOST_NULL, "Port cannot be set when host is null" }, { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, "Host is not a well formed address" }, { MsgKey.ER_SCHEME_NOT_CONFORMANT, "The scheme is not conformant." }, { MsgKey.ER_SCHEME_FROM_NULL_STRING, "Cannot set scheme from null string" }, { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, "Path contains invalid escape sequence" }, { MsgKey.ER_PATH_INVALID_CHAR, "Path contains invalid character: {0}" }, { MsgKey.ER_FRAG_INVALID_CHAR, "Fragment contains invalid character" }, { MsgKey.ER_FRAG_WHEN_PATH_NULL, "Fragment cannot be set when path is null" }, { MsgKey.ER_FRAG_FOR_GENERIC_URI, "Fragment can only be set for a generic URI" }, { MsgKey.ER_NO_SCHEME_IN_URI, "No scheme found in URI" }, { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, "Cannot initialize URI with empty parameters" }, { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, "Fragment cannot be specified in both the path and fragment" }, { MsgKey.ER_NO_QUERY_STRING_IN_PATH, "Query string cannot be specified in path and query string" }, { MsgKey.ER_NO_PORT_IF_NO_HOST, "Port may not be specified if host is not specified" }, { MsgKey.ER_NO_USERINFO_IF_NO_HOST, "Userinfo may not be specified if host is not specified" }, { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, "Warning: The version of the output document is requested to be ''{0}''. This version of XML is not supported. The version of the output document will be ''1.0''." }, { MsgKey.ER_SCHEME_REQUIRED, "Scheme is required!" }, /* * Note to translators: The words 'Properties' and * 'SerializerFactory' in this message are Java class names * and should not be translated. */ { MsgKey.ER_FACTORY_PROPERTY_MISSING, "The Properties object passed to the SerializerFactory does not have a ''{0}'' property." }, { MsgKey.ER_ENCODING_NOT_SUPPORTED, "Warning: The encoding ''{0}'' is not supported by the Java runtime." }, }; return contents; } }
[ "543343879@qq.com" ]
543343879@qq.com
b1b147eaf281538acb0d5c3573a2c11c25331feb
bbf526bca24e395fcc87ef627f6c196d30a1844f
/building-h2o/H2O.java
927559b8d809f0b9f31c08716163b062fe2baf47
[]
no_license
charles-wangkai/leetcode
864e39505b230ec056e9b4fed3bb5bcb62c84f0f
778c16f6cbd69c0ef6ccab9780c102b40731aaf8
refs/heads/master
2023-08-31T14:44:52.850805
2023-08-31T03:04:02
2023-08-31T03:04:02
25,644,039
52
18
null
2021-06-05T00:02:50
2014-10-23T15:29:44
Java
UTF-8
Java
false
false
1,290
java
import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class H2O { Lock lock = new ReentrantLock(); Condition canReleaseH = lock.newCondition(); Condition canReleaseO = lock.newCondition(); int hCount = 0; int oCount = 0; int releaseCount = 0; int index; public void hydrogen(Runnable releaseHydrogen) throws InterruptedException { lock.lock(); try { hCount++; if (hCount >= 2 && oCount >= 1) { releaseCount++; } while (!(index < releaseCount * 3 && index % 3 != 2)) { canReleaseH.await(); } // releaseHydrogen.run() outputs "H". Do not change or remove this line. releaseHydrogen.run(); index++; canReleaseH.signal(); canReleaseO.signal(); } finally { lock.unlock(); } } public void oxygen(Runnable releaseOxygen) throws InterruptedException { lock.lock(); try { oCount++; if (hCount >= 2 && oCount >= 1) { releaseCount++; } while (!(index < releaseCount * 3 && index % 3 == 2)) { canReleaseO.await(); } // releaseOxygen.run() outputs "H". Do not change or remove this line. releaseOxygen.run(); index++; canReleaseH.signal(); canReleaseO.signal(); } finally { lock.unlock(); } } }
[ "charles.wangkai@gmail.com" ]
charles.wangkai@gmail.com
1739ce1ff99e171730d3608dba71c1996f11b268
a56873f51b9acb825c1491a4b9047ad03971d7dd
/app/src/main/java/com/nmakademija/nmaakademija/listener/ClickListener.java
8fe21a1de400bd58e218e2eb4782c6cf65757e4b
[ "Unlicense" ]
permissive
vycius/NMAkademija
c9b7940cba9b376d8806a73d42e4e8bc22cc1a69
dfa9e21efb8403cf5504ed500b1ce77f4464387e
refs/heads/master
2020-09-12T09:17:57.289630
2017-11-27T14:12:00
2017-11-27T14:12:00
66,378,139
4
1
Unlicense
2020-03-28T17:55:56
2016-08-23T15:12:37
Java
UTF-8
Java
false
false
201
java
package com.nmakademija.nmaakademija.listener; import android.view.View; public interface ClickListener { void onClick(View view, int position); void onLongClick(View view, int position); }
[ "gediminasel@gmail.com" ]
gediminasel@gmail.com
4aa0221871b81ae3fd55e244a43f0055495b155a
62b162a1d7367e475aacb5cc5bcbedb13f7c6508
/PMIS_Report/src/com/tetrapak/util/cip/TPM4CIPReportAnalyser.java
10d74a820a4755dae9056062554815b2efbcad93
[]
no_license
frankshou1988/Work
1f66e4871661cca473c9ab628449cd8a50064afb
4309ab9ae474c6cd8f4217827e26e3479a0d8611
refs/heads/master
2021-01-17T17:05:46.667235
2013-09-04T14:41:12
2013-09-04T14:41:12
12,592,530
1
0
null
null
null
null
UTF-8
Java
false
false
14,265
java
package com.tetrapak.util.cip; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.tetrapak.dao.CommonDao; import com.tetrapak.domain.cip.CIPMasterLine; import com.tetrapak.domain.cip.CIPPhase; import com.tetrapak.domain.cip.CIPReportAnalysePoint; import com.tetrapak.domain.cip.CIPReportResult; import com.tetrapak.domain.cip.CIPResult; import com.tetrapak.domain.cip.CIPSlaveLine; import com.tetrapak.domain.cip.CIPTarget; import com.tetrapak.domain.cip.CIPType; import com.tetrapak.domain.comm.HMIOperator; import com.tetrapak.insql.InSQLDaoUtil; import com.tetrapak.metaclass.CIPResults; import com.tetrapak.metaclass.CIPStepN; import com.tetrapak.metaclass.EdgeSection; import com.tetrapak.metaclass.PLCStructureTypes; import com.tetrapak.metaclass.TPM4CIPType; import com.tetrapak.metaclass.TimePeriod; import com.tetrapak.util.common.HMIOperatorUtil; import com.tetrapak.util.common.Tools; /** * This class used to analyze the TPM4-based structure CIP Program * */ public class TPM4CIPReportAnalyser extends CIPReportAnalyserUtil { private static Logger log = LoggerFactory.getLogger(TPM4CIPReportAnalyser.class); public static void cipReportAnalyse() throws Exception { String queryEndDate = Tools.toDateStr(new Date()); // This code only for the TPM4 based structure cip List<CIPMasterLine> cipMasterLineList = CIPLineUtil.getCIPMasterLineOfTPM4(); // execute the query for (CIPMasterLine ml : cipMasterLineList) { String latestCIPEndTime = ""; // get the latest cip analyse time CIPReportAnalysePoint point = CIPReportUtil.getCIPLastestAnalyseDateTime(ml.getCipMasterLineName()); String queryStartDate = point.getCipLatestAnalyseDateTime(); List<EdgeSection> edgeSectionList = InSQLDaoUtil.getEdgeSectionList(ml.getCipMasterLineOperTag(), queryStartDate, queryEndDate); for (EdgeSection edgeSection : edgeSectionList) { CIPReportResult cipReportResult = new CIPReportResult(); String cipEdgeLeadingTime = edgeSection.getEdgeStartDateTime(); String cipEdgeTrailingTime = edgeSection.getEdgeEndDateTime(); Map<String, Integer> cipSteps = getCIPSteps(ml.getCipMasterLineStepsTag(), cipEdgeLeadingTime, cipEdgeTrailingTime); long programID = getCIPProgramID(ml.getCipMasterLineCIPProgramIDTag(), cipEdgeLeadingTime, cipEdgeTrailingTime); long phaseID = getCIPPhaseID(ml.getCipMasterLineRoutePhaseIDTag(), cipEdgeLeadingTime, cipEdgeTrailingTime); if (phaseID == 0) { if (log.isErrorEnabled()) log.error("Unable to find the phaseID [" + phaseID + "] for " + ml.getCipMasterLineName() + "\t[" + cipEdgeLeadingTime + ":" + cipEdgeTrailingTime + "]"); continue; } CIPPhase cipPhase = CIPReportUtil.getCIPPhaseByPhaseID(phaseID); if (cipPhase == null) { if (log.isErrorEnabled()) log.error("Unable to find cip phase for phase id: " + phaseID + "\t" + ml.getCipMasterLineName() + "\t[" + cipEdgeLeadingTime + ":" + cipEdgeTrailingTime + "]"); continue; } long cipResultID = CIPResults.NOT_CLEAN; Collection<Integer> values = cipSteps.values(); List<Integer> steps = new ArrayList<Integer>(); for (Integer value : values) { steps.add(value); } int size = steps.size(); int lastStep = steps.get(size - 1); if (lastStep == 0) { if (size - 2 >= 0) { lastStep = steps.get(size - 2); } } if (lastStep == CIPStepN.TPM4_STEP_38 || lastStep == CIPStepN.TPM4_STEP_49 || lastStep == CIPStepN.TPM4_STEP_94) { if (programID == TPM4CIPType.LYE || programID == TPM4CIPType.LYE_ACID || programID == TPM4CIPType.ACID) { cipResultID = CIPResults.CLEANED; } else if (programID == TPM4CIPType.RINSE) { cipResultID = CIPResults.RINSED; } else if (programID == TPM4CIPType.STERILIZE) { cipResultID = CIPResults.CLEANED_STERILIZED; } } CIPResult cipResult = CIPReportUtil.getCIPResultByResultIDOfTPM4(cipResultID); // Attention: Get TPM4 CIP Types CIPType cipType = CIPReportUtil.getCIPTypeByProgramIDOfTPM4(programID); if (cipType == null) { if (log.isErrorEnabled()) log.error("[TPM4 CIP] Unable to find cip type for type id: " + programID + "\t" + ml.getCipMasterLineName() + "\t[" + cipEdgeLeadingTime + ":" + cipEdgeTrailingTime + "]"); // Error tolerant cipType = new CIPType(); cipType.setCipTypePLCId(programID); cipType.setCipTypeDesc("N/A"); } HMIOperator operator = HMIOperatorUtil.getHMIOperatorByPLCId(0, PLCStructureTypes.TPM4); CIPSlaveLine slaveLine = cipPhase.getCipSlaveLine(); CIPTarget cipTarget = cipPhase.getCipTarget(); // set the general information for cip report result cipReportResult.setCipMasterLineId(ml.getId()); cipReportResult.setCipMasterLineName(ml.getCipMasterLineDesc()); cipReportResult.setCipSlaveLineId(slaveLine.getId()); cipReportResult.setCipSlaveLineName(slaveLine.getCipSlaveLineDesc()); cipReportResult.setCipStartDateTime(Tools.toDate(cipEdgeLeadingTime).getTime()); cipReportResult.setCipEndDateTime(Tools.toDate(cipEdgeTrailingTime).getTime()); cipReportResult.setCipLastTime(Tools.dateDiffMinutes(cipEdgeLeadingTime, cipEdgeTrailingTime) .getHumanTime()); cipReportResult.setCipTargetDesc(cipTarget.getCipTargetDesc()); cipReportResult.setCipTargetName(cipTarget.getCipTargetName()); cipReportResult.setCipType(cipType.getCipTypeDesc()); cipReportResult.setCipTypePLCId(cipType.getCipTypePLCId()); cipReportResult.setCipResultPLCId(cipResultID); cipReportResult.setCipResult(cipResult.getCipResultDesc()); cipReportResult.setCipOperatedByID(10L); cipReportResult.setCipOperatedByName(operator.getOperatorName()); cipReportResult.setPlcStructureType(ml.getPlcStructureType()); cipReportResult.setWorkshopType(ml.getWorkshopType()); Set<Entry<String, Integer>> entrySet = cipSteps.entrySet(); if (programID == TPM4CIPType.LYE) { String preRinseStartDateTime = null; String preRinseEndDateTime = null; String lyeCycleStartDateTime = null; String lyeCycleEndDateTime = null; String finalRinseStartDateTime = null; String finalRinseEndDateTime = null; for (Entry<String, Integer> each : entrySet) { Integer stepN = each.getValue(); if (stepN.equals(CIPStepN.TPM4_STEP_5)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_5, cipEdgeLeadingTime, cipEdgeTrailingTime); preRinseStartDateTime = tp.getStartDateTime(); preRinseEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_10)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_10, cipEdgeLeadingTime, cipEdgeTrailingTime); lyeCycleStartDateTime = tp.getStartDateTime(); lyeCycleEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_29)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_29, cipEdgeLeadingTime, cipEdgeTrailingTime); finalRinseStartDateTime = tp.getStartDateTime(); finalRinseEndDateTime = tp.getEndDateTime(); } } // pre rinse setCIPPreRinse(ml, cipReportResult, preRinseStartDateTime, preRinseEndDateTime); // lye cycle setCIPLyeCycle(ml, cipReportResult, lyeCycleStartDateTime, lyeCycleEndDateTime); // final rinse setCIPFinalRinse(ml, cipReportResult, finalRinseStartDateTime, finalRinseEndDateTime); } else if (programID == TPM4CIPType.ACID) { String preRinseStartDateTime = null; String preRinseEndDateTime = null; String acidCycleStartDateTime = null; String acidCycleEndDateTime = null; String finalRinseStartDateTime = null; String finalRinseEndDateTime = null; for (Entry<String, Integer> each : entrySet) { Integer stepN = each.getValue(); if (stepN.equals(CIPStepN.TPM4_STEP_5)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_5, cipEdgeLeadingTime, cipEdgeTrailingTime); preRinseStartDateTime = tp.getStartDateTime(); preRinseEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_20)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_20, cipEdgeLeadingTime, cipEdgeTrailingTime); acidCycleStartDateTime = tp.getStartDateTime(); acidCycleEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_29)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_29, cipEdgeLeadingTime, cipEdgeTrailingTime); finalRinseStartDateTime = tp.getStartDateTime(); finalRinseEndDateTime = tp.getEndDateTime(); } } // pre rinse setCIPPreRinse(ml, cipReportResult, preRinseStartDateTime, preRinseEndDateTime); // acid cycle setCIPAcidCycle(ml, cipReportResult, acidCycleStartDateTime, acidCycleEndDateTime); // final rinse setCIPFinalRinse(ml, cipReportResult, finalRinseStartDateTime, finalRinseEndDateTime); } else if (programID == TPM4CIPType.LYE_ACID) { String preRinseStartDateTime = null; String preRinseEndDateTime = null; String lyeCycleStartDateTime = null; String lyeCycleEndDateTime = null; String interRinseStartDateTime = null; String interRinseEndDateTime = null; String acidCycleStartDateTime = null; String acidCycleEndDateTime = null; String finalRinseStartDateTime = null; String finalRinseEndDateTime = null; for (Entry<String, Integer> each : entrySet) { Integer stepN = each.getValue(); if (stepN.equals(CIPStepN.TPM4_STEP_5)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_5, cipEdgeLeadingTime, cipEdgeTrailingTime); preRinseStartDateTime = tp.getStartDateTime(); preRinseEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_10)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_10, cipEdgeLeadingTime, cipEdgeTrailingTime); lyeCycleStartDateTime = tp.getStartDateTime(); lyeCycleEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_15)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_15, cipEdgeLeadingTime, cipEdgeTrailingTime); interRinseStartDateTime = tp.getStartDateTime(); interRinseEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_20)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_20, cipEdgeLeadingTime, cipEdgeTrailingTime); acidCycleStartDateTime = tp.getStartDateTime(); acidCycleEndDateTime = tp.getEndDateTime(); } else if (stepN.equals(CIPStepN.TPM4_STEP_29)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_29, cipEdgeLeadingTime, cipEdgeTrailingTime); finalRinseStartDateTime = tp.getStartDateTime(); finalRinseEndDateTime = tp.getEndDateTime(); } } // pre rinse setCIPPreRinse(ml, cipReportResult, preRinseStartDateTime, preRinseEndDateTime); // lye cycle setCIPLyeCycle(ml, cipReportResult, lyeCycleStartDateTime, lyeCycleEndDateTime); // inter rinse setCIPInterRinse(ml, cipReportResult, interRinseStartDateTime, interRinseEndDateTime); // acid cycle setCIPAcidCycle(ml, cipReportResult, acidCycleStartDateTime, acidCycleEndDateTime); // final rinse setCIPFinalRinse(ml, cipReportResult, finalRinseStartDateTime, finalRinseEndDateTime); } else if (programID == TPM4CIPType.RINSE) { String finalRinseStartDateTime = null; String finalRinseEndDateTime = null; for (Entry<String, Integer> each : entrySet) { Integer stepN = each.getValue(); if (stepN.equals(CIPStepN.TPM4_STEP_32)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_32, cipEdgeLeadingTime, cipEdgeTrailingTime); finalRinseStartDateTime = tp.getStartDateTime(); finalRinseEndDateTime = tp.getEndDateTime(); } } setCIPFinalRinse(ml, cipReportResult, finalRinseStartDateTime, finalRinseEndDateTime); } else if (programID == TPM4CIPType.STERILIZE) { String sterStartDateTime = null; String sterEndDateTime = null; for (Entry<String, Integer> each : entrySet) { Integer stepN = each.getValue(); if (stepN.equals(CIPStepN.TPM4_STEP_35)) { TimePeriod tp = InSQLDaoUtil.getTimePeriodOfTagValue(ml.getCipMasterLineStepsTag(), CIPStepN.TPM4_STEP_35, cipEdgeLeadingTime, cipEdgeTrailingTime); sterStartDateTime = tp.getStartDateTime(); sterEndDateTime = tp.getEndDateTime(); } } setCIPSterilize(ml, cipReportResult, sterStartDateTime, sterEndDateTime); } // get the last time operation CIPReportResult lastCIPReportResult = CIPReportUtil.getLastCIPOperation(cipTarget.getCipTargetName()); if (lastCIPReportResult != null) { Date lastCIPOperationEndTime = lastCIPReportResult.getCipEndDateTime(); cipReportResult.setTimeSinceLastOperation(Tools.dateDiffMinutes(lastCIPOperationEndTime, cipReportResult.getCipEndDateTime()).getHumanTime()); } // save cip result to database CIPReportUtil.saveCIPReportResult(cipReportResult); // compare the cip end time with the cipendtime if (cipEdgeTrailingTime.compareTo(latestCIPEndTime) >= 0) { latestCIPEndTime = cipEdgeTrailingTime; } // save or update cip end time if (!latestCIPEndTime.isEmpty()) { point.setCipLatestAnalyseDateTime(latestCIPEndTime); CommonDao.update(point); } } } } }
[ "frankshou1988@126.com" ]
frankshou1988@126.com
55b22956eb703bc7892de03138c23641617796eb
5784885d3d232a1197a76a9918a5b43c514ba4fb
/jspeedtest/src/test/java/fr/bmartel/speedtest/test/server/IHttpStream.java
a2f0effbdb9048aaf67f29f86c2a780d65a81f3d
[ "MIT" ]
permissive
sherry-android/speed-test-lib
bd8177e8779682e8a6621d0984cb58f6430a37c2
882d0afdb46b8c7f86bff1d978a38727f1b1f600
refs/heads/master
2021-03-29T05:36:28.677849
2020-04-08T03:03:52
2020-04-08T03:03:52
247,923,342
0
0
MIT
2020-03-17T09:01:32
2020-03-17T09:01:31
null
UTF-8
Java
false
false
1,495
java
/* * The MIT License (MIT) * <p/> * Copyright (c) 2016-2017 Bertrand Martel * <p/> * 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: * <p/> * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * <p/> * 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 fr.bmartel.speedtest.test.server; /** * Interface for writing http data frame * * @author Bertrand Martel */ public interface IHttpStream { /** * Write http request frame * * @param data data to be written * @return 0 if OK -1 if error */ int writeHttpFrame(byte[] data); }
[ "bmartel.fr@gmail.com" ]
bmartel.fr@gmail.com
a90650f5efac6588ebc727f08069bc28ff331663
2038ae1d81705a7f743174bd8d91cea547779794
/BTHienThiCacLoaiHinh/src/BTHienThiCacLoaiHinh.java
f440926bcc96a82cb21b9932c914afe795fa8096
[]
no_license
herokillv1/Module2_Tuan1
1098a69979344bdfe92da11f05f0c8a0c9473ec6
884a3267ebcbd39092aebc490b246aec67c9b54f
refs/heads/master
2022-11-09T21:31:41.558966
2020-07-06T06:46:31
2020-07-06T06:46:31
276,839,023
0
0
null
null
null
null
UTF-8
Java
false
false
2,662
java
import java.util.Scanner; public class BTHienThiCacLoaiHinh { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Menu"); System.out.println("1. Print the rectangle"); System.out.println("2. Print the square triangle"); System.out.println("3. Print isosceles triangle"); System.out.println("4. Exit"); System.out.println("Enter your choice: "); while(true) { int choice = input.nextInt(); switch (choice) { case 1: System.out.println("Print the rectangle"); for (int i=0;i<3;i++){ for (int j=0;j<7;j++){ System.out.print("* "); } System.out.println(""); } break; case 2: System.out.println("Print the square triangle"); for(int i=0; i<=5; i++){ for(int j=0; j<i; j++){ System.out.print("* "); } System.out.println(""); } System.out.println(""); for(int i=0; i<=5; i++){ for(int j=5; j>i; j--){ System.out.print("* "); } System.out.println(""); } break; case 3: System.out.println("Print isosceles triangle"); int i,j; for (i=0;i<5;i++){ for (j=0;j<5-i;j++){ System.out.print(""); for (j=0;j<2*i-1;j++){ if (j==0||j==2*i-1){ System.out.print("*"); }else { System.out.print(""); } } } System.out.println(""); if (i==5-1){ for (j=0;j<2*5-1;j++){ System.out.print("*"); break; } } } break; case 0: System.exit(0); default: System.out.println("No choice!"); } } } }
[ "nguyentrunghieu.hha101196@gmail.com" ]
nguyentrunghieu.hha101196@gmail.com
79006559b82164b8abb596508f05cf4f99c375d8
52d70ecd16e9043be3623c66b3b2ac486422fbd4
/src/main/java/de/fearnixx/jeak/service/command/matcher/meta/FirstOfMatcher.java
04cccce49a42a84e0b9b36db79984cc7eb2ca12f
[ "MIT", "LicenseRef-scancode-free-unknown" ]
permissive
jeakfrw/jeak-framework
01cbbda4b713b1ae48e37fb8fe6fcf3d00335079
bede7f4f575d828e67fa54c4f65b338c70c73443
refs/heads/bleeding-1.X.X
2023-02-20T11:35:57.312649
2022-01-03T19:57:07
2022-01-03T19:57:07
188,801,672
8
5
MIT
2021-07-30T03:18:02
2019-05-27T08:19:58
Java
UTF-8
Java
false
false
1,878
java
package de.fearnixx.jeak.service.command.matcher.meta; import de.fearnixx.jeak.reflect.Inject; import de.fearnixx.jeak.reflect.LocaleUnit; import de.fearnixx.jeak.service.command.ICommandExecutionContext; import de.fearnixx.jeak.service.command.spec.matcher.*; import de.fearnixx.jeak.service.locale.ILocalizationUnit; import java.util.Map; import java.util.stream.Collectors; public class FirstOfMatcher implements ICriterionMatcher<Void> { @Inject @LocaleUnit("commandService") private ILocalizationUnit localeUnit; @Override public Class<Void> getSupportedType() { return Void.class; } @Override public IMatcherResponse tryMatch(ICommandExecutionContext ctx, IMatchingContext matchingContext) { for (var child : matchingContext.getChildren()) { var childResponse = child.getMatcher().tryMatch(ctx, child); if (childResponse.getResponseType().equals(MatcherResponseType.SUCCESS)) { ctx.getParameterIndex().incrementAndGet(); return childResponse; } else if (childResponse.getResponseType().equals(MatcherResponseType.NOTICE)) { ctx.getCommandInfo().getErrorMessages().add(childResponse.getFailureMessage()); } } String typeList = matchingContext .getChildren() .stream() .map(m -> m.getMatcher().getSupportedType().getName()) .collect(Collectors.joining(", ")); String unmatchedMessage = localeUnit.getContext(ctx.getSender().getCountryCode()) .getMessage("matcher.firstOf.unmatched", Map.of( "types", typeList )); return new BasicMatcherResponse(MatcherResponseType.ERROR, ctx.getParameterIndex().get(), unmatchedMessage); } }
[ "github@m-lessmann.de" ]
github@m-lessmann.de
8d150fb83c61ee629b3bab60c1af31145e229851
a05d9347d233152affa726a2359be87e42b22e03
/Trabajos/Proyecto ErickOre/NDRAsistencias/src/pe/eeob/ndrasistencias/view/MantEstView.java
08823cdd05479b3d70990824f1fec124e93d80f9
[]
no_license
gcoronelc/SISTUNI_JAVA_JDBC_002
2aa5393d8e20cb5e9fe747255bca7dec17689f58
7ae0b7f53b2585d01f34fa337464e22b040712f6
refs/heads/master
2021-01-10T11:17:06.603759
2016-03-25T21:47:44
2016-03-25T21:47:44
51,031,997
0
1
null
null
null
null
UTF-8
Java
false
false
11,844
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pe.eeob.ndrasistencias.view; import java.util.List; import javax.swing.DefaultComboBoxModel; import javax.swing.JOptionPane; import pe.eeob.ndrasistencias.controller.ApoderadoController; import pe.eeob.ndrasistencias.controller.EstudianteController; import pe.eeob.ndrasistencias.domain.Estudiante; import pe.eeob.ndrasistencias.util.Dialogo; import pe.eeob.ndrasistencias.util.Ndr; /** * * @author ErickOre */ public class MantEstView extends javax.swing.JInternalFrame { private String accion; /** * Creates new form MantEstView */ public MantEstView() { initComponents(); } public void setAccion(String accion) { this.accion = accion; establecerTitulo(); habilitarControles(); // Inicializando combo box try { ApoderadoController cr = new ApoderadoController(); llenarCombo(cr.getDniApos()); } catch (Exception e) { Dialogo.error(rootPane, e.getMessage()); } comboDniApoderado.setSelectedIndex(-1); } private void establecerTitulo() { String titulo = "%s ESTUDIANTE"; titulo = String.format(titulo, accion); this.setTitle(titulo); } private void habilitarControles() { txtDni.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); txtPaterno.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); txtMaterno.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); txtNombre.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); txtEdad.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); txtDistrito.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); comboDniApoderado.setEnabled(!accion.equals(Ndr.CRUD_ELIMINAR)); } /** * Inyecta el bean a editar * * @param bean Datos del cliente a editar. */ public void setBean(Estudiante bean) { txtDni.setText(bean.getDni()); txtPaterno.setText(bean.getPaterno()); txtMaterno.setText(bean.getMaterno()); txtNombre.setText(bean.getNombre()); txtEdad.setText(bean.getEdad()); txtDistrito.setText(bean.getDistrito()); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btnProcesar = new javax.swing.JButton(); btnSalir = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); comboDniApoderado = new javax.swing.JComboBox<>(); txtDni = new javax.swing.JTextField(); txtPaterno = new javax.swing.JTextField(); txtMaterno = new javax.swing.JTextField(); txtNombre = new javax.swing.JTextField(); txtEdad = new javax.swing.JTextField(); txtDistrito = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); setClosable(true); setTitle("Mantenimiento Estudiante"); btnProcesar.setText("AGREGAR"); btnProcesar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnProcesarActionPerformed(evt); } }); btnSalir.setText("SALIR"); btnSalir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSalirActionPerformed(evt); } }); jLabel1.setText("DNI:"); jLabel5.setText("EDAD:"); jLabel2.setText("APELLIDO PATERNO:"); jLabel6.setText("DISTRITO:"); jLabel3.setText("APELLIDO MATERNO:"); jLabel7.setText("DNI APODERADO:"); comboDniApoderado.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); jLabel4.setText("NOMBRE:"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel5) .addComponent(jLabel6) .addComponent(jLabel7)) .addGap(46, 46, 46) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtDni, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE) .addComponent(txtPaterno) .addComponent(txtMaterno) .addComponent(txtNombre) .addComponent(txtEdad) .addComponent(txtDistrito) .addComponent(comboDniApoderado, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup() .addGap(91, 91, 91) .addComponent(btnProcesar) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSalir))) .addContainerGap(45, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(21, 21, 21) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txtPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(txtEdad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(txtDistrito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent(comboDniApoderado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnProcesar) .addComponent(btnSalir)) .addContainerGap(28, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void btnProcesarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProcesarActionPerformed Estudiante bean = new Estudiante(); bean.setDni(txtDni.getText()); bean.setPaterno(txtPaterno.getText()); bean.setMaterno(txtMaterno.getText()); bean.setNombre(txtNombre.getText()); bean.setEdad(txtEdad.getText()); bean.setDistrito(txtDistrito.getText()); bean.setDni_apoderado(comboDniApoderado.getSelectedItem().toString()); EstudianteController control = new EstudianteController(); control.insertar(bean); JOptionPane.showMessageDialog(null, "Estudiante Ingresado!"); txtDni.setText(""); txtPaterno.setText(""); txtMaterno.setText(""); txtNombre.setText(""); txtEdad.setText(""); txtDistrito.setText(""); comboDniApoderado.setSelectedIndex(-1); }//GEN-LAST:event_btnProcesarActionPerformed private void btnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalirActionPerformed this.dispose(); }//GEN-LAST:event_btnSalirActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnProcesar; private javax.swing.JButton btnSalir; private javax.swing.JComboBox<String> comboDniApoderado; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JTextField txtDistrito; private javax.swing.JTextField txtDni; private javax.swing.JTextField txtEdad; private javax.swing.JTextField txtMaterno; private javax.swing.JTextField txtNombre; private javax.swing.JTextField txtPaterno; // End of variables declaration//GEN-END:variables private void llenarCombo(List<String> ls) { DefaultComboBoxModel combo; combo = (DefaultComboBoxModel) comboDniApoderado.getModel(); combo.removeAllElements(); for ( String c : ls) { String row = c; combo.addElement(row); } } }
[ "gcoronelc@gmail.com" ]
gcoronelc@gmail.com
b24f85f62e6090a6a451280643588575a0c3ae00
ad2f2cff744dd3203b0d060273bd8c39774eb626
/app/src/main/java/com/ifox/zh/rca/app/net/Urls.java
62c8c5ddcdae9e432b1e5536e1aaed94a372d269
[]
no_license
csIfox/RemoteCompileApp
5aed001d6fd8cefe2c92c7c8c0eb58ea879a2cfd
f4f6cd2ab4f1f7a7e7d7f4480d081e1f646fd13b
refs/heads/master
2021-01-10T13:20:17.288015
2016-02-13T14:00:18
2016-02-13T14:00:18
50,641,545
0
0
null
null
null
null
UTF-8
Java
false
false
113
java
package com.ifox.zh.rca.app.net; /** * Created by zh on 2016/2/4. * @author zh */ public interface Urls { }
[ "280808306@qq.com" ]
280808306@qq.com
ce61eb1c849977c5605dc78a6c87d8e52ec21e69
fb86ca764176fd27d9a228d2494b0ee76133a4da
/src/main/java/co/com/grupoasd/documental/presentacion/service/correspondencia/iface/CorRadicadoService.java
c4d75b434e7c0572fd55fd2716001532f279aa5f
[]
no_license
jc-mojicap/pruebas-pryFinal-front
38ea208ccedc33fdb139e7129ef70836e7e2f08c
50fafd87998d20f8d91719f3557dff0e52d57baf
refs/heads/master
2022-06-29T15:50:40.726186
2019-11-28T05:00:28
2019-11-28T05:00:28
224,572,147
0
0
null
2022-06-20T22:28:45
2019-11-28T04:50:34
Java
UTF-8
Java
false
false
8,287
java
/* * Archivo: EstadoRadicadoService.java * Fecha creacion: 14/03/2017 * Todos los derechos de propiedad intelectual e industrial sobre esta * aplicacion son de propiedad exclusiva del GRUPO ASESORIA EN * SISTEMATIZACION DE DATOS SOCIEDAD POR ACCIONES SIMPLIFICADA – GRUPO ASD S.A.S. * Su uso, alteracion, reproduccion o modificacion sin la debida * consentimiento por escrito de GRUPO ASD S.A.S. * autorizacion por parte de su autor quedan totalmente prohibidos. * * Este programa se encuentra protegido por las disposiciones de la * Ley 23 de 1982 y demas normas concordantes sobre derechos de autor y * propiedad intelectual. Su uso no autorizado dara lugar a las sanciones * previstas en la Ley. */ package co.com.grupoasd.documental.presentacion.service.correspondencia.iface; import java.util.List; import co.com.grupoasd.documental.cliente.comun.Token; import co.com.grupoasd.documental.cliente.correspondencia.model.CorAdjunto; import co.com.grupoasd.documental.cliente.correspondencia.model.CorCanal; import co.com.grupoasd.documental.cliente.correspondencia.model.CorRadicado; import co.com.grupoasd.documental.cliente.correspondencia.model.CorTerceroXRadicado; import co.com.grupoasd.documental.cliente.correspondencia.model.CorUsuarioXRadicado; import co.com.grupoasd.documental.cliente.correspondencia.model.EstadoRadicado; import co.com.grupoasd.documental.presentacion.comun.dto.InfoMedia; import co.com.grupoasd.documental.presentacion.service.correspondencia.dto.RadicadoDto; /** * Servicios del recurso estado radicado. * * @author cestrada * */ public interface CorRadicadoService { /******************************* * EstadoRadicado ******************************/ /** * Lista los estados radicado activas e inactivas. * * @return Listado con estados radicado. Si no existen retorna vacio. * @author cestrada */ public List<EstadoRadicado> listarEstadosRadicado(); /******************************* * CorCanal ******************************/ /** * Buscar un corCanal por su id. * * @param id * identificador del corCanal. * @return CorCanal asociado. */ CorCanal buscarCanalPorId(Integer id); /** * Lista los corCanales. * * @return Lista de corCanales. */ List<CorCanal> listarCanales(); /******************************* * CorRadicado ******************************/ /** * Lista los radicados de comunicación por filtros. * * @return Listado con estados radicado. Si no existen retorna vacio. * @author cestrada */ public List<CorRadicado> listarRadicadosComunicacionPorFiltros(CorRadicado filtros); /** * Crea un nuevo radicado. * * @param token * Token con identificacion del usuario. * @param corRadicado * Objeto CorRadicado. * @return Objeto CorRadicado creado con identificador asignado. */ public CorRadicado crear(Token token, CorRadicado corRadicado); /** * Busca un radicado por empresa y código de radicado. * * @param empresaId * Identificador de la empresa. * @param radicado * Código del radicado. * @return Objeto CorRadicado. */ public CorRadicado buscarPorEmpresaYRadicado(Integer empresaId, String radicado); /******************************* * CorRadicado ******************************/ /** * Lista los radicados de comunicación por filtros. * * @param filtros * Filtros para la consulta. * @return Listado con estados radicado. Si no existen retorna vacio. * @author cestrada */ public List<RadicadoDto> listarRadicadosComunicacionPorFiltros(RadicadoDto filtros); /** * Cantidad de radicados filtrados. * * @param filtros * Filtros para la consulta. * @return Integer * @author cestrada */ public Integer contarRadicadosComunicacionPorFiltros(RadicadoDto filtros); /** * Archivo de radicados filtrados enviando el tipo de archivo. * * @return InfoMedia Archivo de radicados. * @author cestrada */ public InfoMedia obtenerArchivoRadicadosComunicacionPorFiltros(RadicadoDto filtros, String tipoArchivo); /******************************* * CorAdjunto ******************************/ /** * Lista los adjuntos de radicados. * * @param radicadoId * Identificador del radicado. * @param eliminado * Adjunto eliminado. * @return Listado con adjuntos de radicados. Si no existen retorna vacio. * @author cestrada */ public List<CorAdjunto> listarAdjuntosPorRadicadoIdEliminado(Long radicadoId, Boolean eliminado); /** * Lista los adjuntos de radicados. * * @param radicadoId * Identificador del radicado. * @return Listado con adjuntos de radicados. Si no existen retorna vacio. * @author cestrada */ public List<CorAdjunto> listarAdjuntosPorRadicadoId(Long radicadoId); /** * Cantidad de adjuntos por radicado. * * @param radicadoId * Identificador del radicado. * @param eliminado * Adjunto eliminado. * @return Integer Cantidad de adjuntos. * @author cestrada */ public Integer contarAdjuntosPorRadicadoIdEliminado(Long radicadoId, Boolean eliminado); /******************************* * CorTerceroXRadicado ******************************/ /** * listarRadicadosPorTerceroId. * * @param terceroId * Identificador del tercero. * @return Lista de radicados por tercero. * @author cestrada */ public List<CorTerceroXRadicado> listarRadicadosPorTerceroId(Integer terceroId); /** * listarTercerosPorRadicadoId. * * @param radicadoId * Identificador del radicado. * @return Lista de terceros por radicado. * @author cestrada */ public List<CorTerceroXRadicado> listarTercerosPorRadicadoId(Long radicadoId); /** * listarTercerosConRadicados. * * @return Lista de terceros con radicados. * @author cestrada */ public List<CorTerceroXRadicado> listarTercerosConRadicados(); /******************************* * CorUsuarioXRadicado ******************************/ /** * listarRadicadosPorUsuarioId. * * @param terceroId * Identificador del tercero. * @return Lista de radicados por usuario. * @author cestrada */ public List<CorUsuarioXRadicado> listarRadicadosPorUsuarioId(Integer usuarioId); /** * listarUsuariosPorRadicadoId. * * @param radicadoId * Identificador del radicado. * @return Lista de usuarios por radicado. * @author cestrada */ public List<CorUsuarioXRadicado> listarUsuariosPorRadicadoId(Long radicadoId); /** * listarUsuariosConRadicados. * * @return Lista de usuarios con radicados. * @author cestrada */ public List<CorUsuarioXRadicado> listarUsuariosConRadicados(); /** * Obtiene la información del radicado por radicado_id * @param id Id del radicado * @return Objeto corRadicado */ CorRadicado obtenerPorId(Long id); /** * Anular radicado * @param token * Token con identificacion del usuario. * @param corRadicado Objeto CorRadicado * @return Objeto CorRadicado */ CorRadicado anularRadicado(Token token, CorRadicado corRadicado); /** * Asignar responsables * @param token * Token con identificacion del usuario. * @param corRadicado Objeto CorRadicado * @return Objeto CorRadicado */ CorRadicado asignarResponsables(Token token, CorRadicado corRadicado); /** * Actualiza un CorRadicado. * @param token Token de autenticación. * @param radicado CorRadicado a actualizar. * @return radicado actualizado. */ public CorRadicado actualizarRadicado(Token token, CorRadicado radicado); }
[ "jc.mojicap@uniandes.edu.co" ]
jc.mojicap@uniandes.edu.co
ff10f3b0a325c6ddfda805ac79cbc6db1dbb4476
e3622c6483135f17f5f2ebeae21865638757a66c
/turbo-jmh/src/main/java/rpc/turbo/benchmark/threadlocal/ThreadLocalBenchmark.java
47ad94c8fa6af893024bd5040e3c93021f6295ae
[ "Apache-2.0" ]
permissive
solerwell/turbo-rpc
6533697dee5a30f0773f0db7ee5e0d9f82aac817
49f0389a6beb370f73b85aa0d55af119360d8b54
refs/heads/master
2020-03-19T11:35:06.537496
2018-09-04T02:24:32
2018-09-04T02:24:32
136,463,431
0
0
Apache-2.0
2018-09-03T14:46:21
2018-06-07T10:49:40
Java
UTF-8
Java
false
false
6,061
java
package rpc.turbo.benchmark.threadlocal; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.State; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.RunnerException; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; import io.netty.util.concurrent.FastThreadLocalThread; import io.netty.util.internal.InternalThreadLocalMap; import rpc.turbo.util.concurrent.AttachmentThread; import rpc.turbo.util.concurrent.AttachmentThreadUtils; import rpc.turbo.util.concurrent.ConcurrentIntToObjectArrayMap; /** * * @author Hank * */ @State(Scope.Benchmark) public class ThreadLocalBenchmark { public static final int CONCURRENCY = Runtime.getRuntime().availableProcessors(); private final Integer value = 100; private final ThreadLocal<Integer> threadLocal = new ThreadLocal<>(); private final ConcurrentIntToObjectArrayMap<Integer> arrayMap = new ConcurrentIntToObjectArrayMap<>(1024); private final ConcurrentHashMap<Long, Integer> threadIdMap = new ConcurrentHashMap<>(); private final ConcurrentHashMap<Thread, Integer> threadMap = new ConcurrentHashMap<>(); private final ConcurrentLinkedQueue<Integer> concurrentLinkedQueue = new ConcurrentLinkedQueue<>(); private final Holder holder = new Holder(new Holder(new ConcurrentIntToObjectArrayMap<>())); private final Supplier<Integer> supplier = () -> value; private final FastThreadLocalThread fastThread = new FastThreadLocalThread(); private final AttachmentThread attachmentThread = new AttachmentThread(); public ThreadLocalBenchmark() { fastThread.setThreadLocalMap(InternalThreadLocalMap.get()); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public void _do_nothing() { } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer directGet() { return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer threadLocal() { Integer value = threadLocal.get(); if (value != null) { return value; } value = 100; threadLocal.set(value); return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) @SuppressWarnings("unchecked") public Integer fastThreadWithArrayMap() { Object obj = fastThread.threadLocalMap().indexedVariable(1024); ConcurrentIntToObjectArrayMap<Integer> map; if (obj != InternalThreadLocalMap.UNSET) { map = (ConcurrentIntToObjectArrayMap<Integer>) obj; return map.getOrUpdate(1024, () -> value); } map = new ConcurrentIntToObjectArrayMap<>(); fastThread.threadLocalMap().setIndexedVariable(1024, map); return map.getOrUpdate(1024, () -> value); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer fastThread() { Object obj = fastThread.threadLocalMap().indexedVariable(256); if (obj != InternalThreadLocalMap.UNSET) { return (Integer) obj; } Integer value = 100; fastThread.threadLocalMap().setIndexedVariable(256, value); return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer attachmentThread() { return attachmentThread.getOrUpdate(1, supplier); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer attachmentThreadUtils() { return AttachmentThreadUtils.getOrUpdate(1, supplier); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer arrayMap() { int key = (int) Thread.currentThread().getId(); return arrayMap.getOrUpdate(key, () -> 1); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer arrayMapConstantProducer() { int key = (int) Thread.currentThread().getId(); return arrayMap.getOrUpdate(key, supplier); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer threadMap() { Thread key = Thread.currentThread(); Integer value = threadMap.get(key); if (value != null) { return value; } value = 100; threadMap.put(key, value); return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer threadIdMap() { Long key = Thread.currentThread().getId(); Integer value = threadIdMap.get(key); if (value != null) { return value; } value = 100; threadIdMap.put(key, value); return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Integer concurrentLinkedQueue() { Integer value = concurrentLinkedQueue.poll(); if (value == null) { value = 100; } concurrentLinkedQueue.add(value); return value; } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) @SuppressWarnings("unchecked") public Integer getByHolder() { return ((ConcurrentIntToObjectArrayMap<Integer>) ((Holder) holder.obj).obj).getOrUpdate(1, () -> 1); } @Benchmark @BenchmarkMode({ Mode.Throughput }) @OutputTimeUnit(TimeUnit.MICROSECONDS) public Thread currentThread() { return Thread.currentThread(); } public static void main(String[] args) throws RunnerException { Options opt = new OptionsBuilder()// .include(ThreadLocalBenchmark.class.getName())// .warmupIterations(5)// .measurementIterations(5)// .threads(CONCURRENCY)// .forks(1)// .build(); new Runner(opt).run(); } } class Holder { public final Object obj; public Holder(Object obj) { this.obj = obj; } }
[ "bjweizengjie@corp.netease.com" ]
bjweizengjie@corp.netease.com
2e26d7fee3d25b3270fae845b70abadc6573b815
627eebf240f38c07ef6e3ee7bc33378bfe64d86a
/StickHeaderLayout/app/src/main/java/com/stickheaderlayout/simple/RecyclerViewSimpleActivity.java
48ebd8b53e62e6caa911cdf0f03b3b80edca18cb
[ "Apache-2.0" ]
permissive
chenchengyin/StickHeaderLayout
b0d5495327c1ace2fa5f9081bf33be9af84e4e47
83de5943ce78bde58ab994faf2154ef2b0d249e7
refs/heads/master
2021-05-30T03:34:52.551548
2015-11-30T07:36:54
2015-11-30T07:36:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,040
java
package com.stickheaderlayout.simple; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; 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.TextView; import com.stickheaderlayout.RecyclerWithHeaderAdapter; import java.util.ArrayList; import java.util.List; public class RecyclerViewSimpleActivity extends AppCompatActivity { public static void openActivity(Activity activity){ activity.startActivity(new Intent(activity,RecyclerViewSimpleActivity.class)); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_recyclerview); RecyclerView v_scroll = (RecyclerView)findViewById(R.id.v_scroll); LinearLayoutManager mLayoutMgr = new LinearLayoutManager(this); v_scroll.setLayoutManager(mLayoutMgr); RecyclerAdapter recyclerAdapter = new RecyclerAdapter(); recyclerAdapter.addItems(createItemList()); v_scroll.setAdapter(recyclerAdapter); } private List<String> createItemList() { List<String> list = new ArrayList<>(); for(int i = 0 ; i < 100 ; i++){ list.add("" + i); } return list; } public class RecyclerAdapter extends RecyclerWithHeaderAdapter { private List<String> mItemList; public RecyclerAdapter() { super(); mItemList = new ArrayList<>(); } public void addItems(List<String> list) { mItemList.addAll(list); } @Override public RecyclerView.ViewHolder oncreateViewHolder(ViewGroup viewGroup, int viewType) { Context context = viewGroup.getContext(); View view; view = LayoutInflater.from(context).inflate(R.layout.item_recyclerview, viewGroup, false); return new RecyclerItemViewHolder(view); } @Override public void onbindViewHolder(RecyclerView.ViewHolder holder, int position) { RecyclerItemViewHolder viewHolder = (RecyclerItemViewHolder) holder; viewHolder.tvTitle.setText(mItemList.get(position - 1)); } @Override public int getitemCount() { return mItemList == null ? 0 : mItemList.size(); } private class RecyclerItemViewHolder extends RecyclerView.ViewHolder { private final TextView tvTitle; private final ImageView ivIcon; public RecyclerItemViewHolder(View itemView) { super(itemView); tvTitle = (TextView) itemView.findViewById(R.id.tv_title); ivIcon = (ImageView) itemView.findViewById(R.id.iv_icon); } } } }
[ "446108264@qq.com" ]
446108264@qq.com
0e78add91ba4c99513a442202bfe748036ca4853
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_459/Testnull_45875.java
276222ef3549b3dd56e5bc4912fa7f43a19969a5
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_459; import static org.junit.Assert.*; public class Testnull_45875 { private final Productionnull_45875 production = new Productionnull_45875("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
d1750e19814000c054c6496b8faff3c966ced44c
bfef838b56cad8e07164d3fe8ac552038efe04d1
/src/main/java/com/christianchang/cursomc/repositories/ClienteRepository.java
dd29d8506984f27e536d1d0b5421d00857d2c65d
[]
no_license
ChristianChang97/cursomc
5b2e7ffcaf4d7dba9561637f75172f8fcb77845a
72d379984ebcd476694b28ee3b7568da490dbebb
refs/heads/master
2022-11-12T11:07:37.702862
2020-07-09T02:10:07
2020-07-09T02:10:07
275,951,704
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.christianchang.cursomc.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import com.christianchang.cursomc.domain.Cliente; @Repository public interface ClienteRepository extends JpaRepository<Cliente, Integer>{ }
[ "christianchangthomaz@gmail.com" ]
christianchangthomaz@gmail.com
f006012a88cc12300062e4c5be3a62ce60ca0ab9
e5bd02c1fa54af85e1b8d9e2f2a4fe00409b75c6
/app/src/main/java/com/example/kenvin/launchpageview/ButterKnifeActivity.java
2e0154162d91e283403a5222eaafc36bd46c3a86
[]
no_license
summerHearts/LaunchPageView
d0541e6785d3bc13dfb9f47a1a3b680aaed71214
c4ec2a89cf358db1edf83277fe50f0aac0b84fe1
refs/heads/master
2021-07-24T12:50:47.119277
2017-11-06T06:58:05
2017-11-06T06:58:10
109,365,442
0
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
package com.example.kenvin.launchpageview; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.Button; import android.widget.Toast; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.OnLongClick; /** * Created by Kenvin on 2017/11/6. */ public class ButterKnifeActivity extends AppCompatActivity { @BindView(R.id.button1) Button button1; @BindView(R.id.button2) Button button2; @BindView(R.id.button3) Button button3; @OnClick(R.id.button1 ) //点击事件 public void showToast(){ Toast.makeText(this, " OnClick", Toast.LENGTH_SHORT).show(); } @OnLongClick( R.id.button1 ) //长按事件 public boolean showToast2(){ Toast.makeText(this, " OnLongClick", Toast.LENGTH_SHORT).show(); return true ; } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_butterkinfe); ButterKnife.bind(this); } }
[ "yaoyj@oriental-finance.com" ]
yaoyj@oriental-finance.com
fee30667b7b00a09ab088b3e97bca444d25b489a
baf18fbf9ad3fbc94fc7e7aa22c1daec5dce57ce
/ProyectoTDP/src/Engine/IUpdatable.java
58c8015dff78f2ddf4987b4c2d99fa1d869681d6
[]
no_license
Nicolas-Guasch/Proyecto-TDP
9dc37086538f8f7b96cd2cad2981b0176a858439
0e2e0bc65790cf9a8c615163bcd0f3c84bcd3327
refs/heads/master
2020-03-26T09:52:51.608125
2018-11-30T01:31:33
2018-11-30T01:31:33
144,770,001
1
0
null
null
null
null
UTF-8
Java
false
false
69
java
package Engine; public interface IUpdatable { void update(); }
[ "wallywest" ]
wallywest
103289b539cc5650f51ad77de0e21cbaf9572889
ea38db0eaecefcbf4f7f85056eefe2e06f015dc4
/java-basic/src/main/java/bitcamp/java100/ch02/Test11_12.java
626dcedff2a6429c72b224f8ed4486b66e80477b
[]
no_license
tjr7788/bitcamp
5b8dfff352a812719b2013a8e59c72f271e3e758
89cfab1e2cc1de403a04d033db431b29dde7e361
refs/heads/master
2021-09-05T05:17:05.620145
2018-01-24T09:53:16
2018-01-24T09:53:16
104,423,411
0
1
null
null
null
null
UTF-8
Java
false
false
390
java
package bitcamp.java100.ch02; public class Test11_12 { public static void main(String[] args) { System.out.println("ABC"); System.out.println("가각간"); System.out.println("가"); System.out.println('가'); System.out.println("ABC\n가각간"); System.out.println("ABC\uAC00\uac00똘똠똥"); System.out.println(""); } }
[ "sig4213@naver.com" ]
sig4213@naver.com
3a4f068c2cd1b9745243bd75ffbd326d4733eefb
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_56434cc59180678a988b6f24b1fe6c1433174cdd/UIUserPlatformToolbarDesktopPortlet/13_56434cc59180678a988b6f24b1fe6c1433174cdd_UIUserPlatformToolbarDesktopPortlet_s.java
115befcf50aa92d54078a6ce87783516f82513e3
[]
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
13,171
java
/** * Copyright (C) 2009 eXo Platform SAS. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * 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. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.exoplatform.platform.component; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import javax.portlet.EventRequest; import org.exoplatform.container.ExoContainer; import org.exoplatform.platform.webui.NavigationURLUtils; import org.exoplatform.portal.application.PortalRequestContext; import org.exoplatform.portal.config.DataStorage; import org.exoplatform.portal.config.UserPortalConfigService; import org.exoplatform.portal.config.model.Page; import org.exoplatform.portal.config.model.PortalConfig; import org.exoplatform.portal.mop.SiteKey; import org.exoplatform.portal.mop.Visibility; import org.exoplatform.portal.mop.navigation.Scope; import org.exoplatform.portal.mop.user.UserNavigation; import org.exoplatform.portal.mop.user.UserNode; import org.exoplatform.portal.mop.user.UserNodeFilterConfig; import org.exoplatform.portal.mop.user.UserPortal; import org.exoplatform.portal.webui.util.Util; import org.exoplatform.portal.webui.workspace.UIPortalApplication; import org.exoplatform.services.log.ExoLogger; import org.exoplatform.services.log.Log; import org.exoplatform.web.url.navigation.NavigationResource; import org.exoplatform.web.url.navigation.NodeURL; import org.exoplatform.webos.webui.page.UIDesktopPage; import org.exoplatform.webui.application.WebuiRequestContext; import org.exoplatform.webui.config.annotation.ComponentConfig; import org.exoplatform.webui.config.annotation.EventConfig; import org.exoplatform.webui.core.UIComponent; import org.exoplatform.webui.core.UIPortletApplication; import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle; import org.exoplatform.webui.event.Event; import org.exoplatform.webui.event.EventListener; /** * @author <a href="mailto:anouar.chattouna@exoplatform.com">Anouar * Chattouna</a> */ @ComponentConfig(lifecycle = UIApplicationLifecycle.class, template = "app:/groovy/platformNavigation/portlet/UIUserPlatformToolbarDesktopPortlet/UIUserPlatformToolbarDesktopPortlet.gtmpl", events = { @EventConfig(name = "AddDefaultDashboard", listeners = UIUserPlatformToolbarDesktopPortlet.AddDashboardActionListener.class), @EventConfig(listeners = UIUserPlatformToolbarDesktopPortlet.CreateWebOSActionListener.class), @EventConfig(listeners = UIUserPlatformToolbarDesktopPortlet.NavigationChangeActionListener.class) }) public class UIUserPlatformToolbarDesktopPortlet extends UIPortletApplication { public static String DEFAULT_TAB_NAME = "Tab_Default"; private UserNodeFilterConfig toolbarFilterConfig; public UIUserPlatformToolbarDesktopPortlet() throws Exception { UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder(); builder.withReadWriteCheck().withVisibility(Visibility.DISPLAYED, Visibility.TEMPORAL).withTemporalCheck(); toolbarFilterConfig = builder.build(); } public UserNavigation getCurrentUserNavigation() throws Exception { return getNavigation(SiteKey.user(getCurrentUser())); } public String getCurrentUser() { WebuiRequestContext rcontext = WebuiRequestContext.getCurrentInstance(); return rcontext.getRemoteUser(); } private UserNavigation getNavigation(SiteKey userKey) { UserPortal userPortal = getUserPortal(); return userPortal.getNavigation(userKey); } private UserPortal getUserPortal() { UIPortalApplication uiPortalApplication = Util.getUIPortalApplication(); return uiPortalApplication.getUserPortalConfig().getUserPortal(); } private UserNode getSelectedNode() throws Exception { return Util.getUIPortal().getSelectedUserNode(); } private boolean isWebOSNode(UserNode userNode) throws Exception { if (userNode == null) { return false; } String pageRef = userNode.getPageRef(); if (pageRef == null) { return false; } DataStorage ds = getApplicationComponent(DataStorage.class); Page page = ds.getPage(pageRef); return page == null || UIDesktopPage.DESKTOP_FACTORY_ID.equals(page.getFactoryId()); } private boolean hasDashboardNode() throws Exception { Collection<UserNode> nodes = getUserNodes(getCurrentUserNavigation()); if (nodes.size() == 0 || (nodes.size() == 1 && isWebOSNode(nodes.iterator().next()))) { return false; } return true; } public String getDashboardURL() throws Exception { Collection<UserNode> nodes = getUserNodes(getCurrentUserNavigation()); if (nodes == null || nodes.isEmpty()) { return NavigationURLUtils.getURL(SiteKey.user(WebuiRequestContext.getCurrentInstance().getRemoteUser()), DEFAULT_TAB_NAME); } Iterator<UserNode> nodesIterator = nodes.iterator(); while (nodesIterator.hasNext()) { UserNode userNode = (UserNode) nodesIterator.next(); if (!isWebOSNode(userNode) && !userNode.getVisibility().equals(Visibility.HIDDEN)) { return NavigationURLUtils.getURL(userNode); } } return NavigationURLUtils.getURL(SiteKey.user(WebuiRequestContext.getCurrentInstance().getRemoteUser()), DEFAULT_TAB_NAME); } private boolean isWebOSCreated() throws Exception { WebuiRequestContext context = WebuiRequestContext.getCurrentInstance(); DataStorage storage = getApplicationComponent(DataStorage.class); Page page = storage.getPage(PortalConfig.USER_TYPE + "::" + context.getRemoteUser() + "::" + UIDesktopPage.PAGE_ID); return page != null; } private UserNode getFirstNonWebOSNode(Collection<UserNode> nodes) throws Exception { for (UserNode node : nodes) { if (!isWebOSNode(node)) { return node; } } throw new NullPointerException("There is no dashboard node. The dashboard node existing should be checked before"); } private boolean isWebOsProfileActivated() { return (ExoContainer.getProfiles().contains("webos") || ExoContainer.getProfiles().contains("all")); } static public class NavigationChangeActionListener extends EventListener<UIUserPlatformToolbarDesktopPortlet> { private Log log = ExoLogger.getExoLogger(NavigationChangeActionListener.class); @Override public void execute(Event<UIUserPlatformToolbarDesktopPortlet> event) throws Exception { log.debug("PageNode : " + ((EventRequest) event.getRequestContext().getRequest()).getEvent().getValue() + " is deleted"); } } /** * Create user dashboard pagenode or redirect to the first node already * created which isn't webos node */ static public class AddDashboardActionListener extends EventListener<UIUserPlatformToolbarDesktopPortlet> { private final static String PAGE_TEMPLATE = "dashboard"; private static Log logger = ExoLogger.getExoLogger(AddDashboardActionListener.class); public void execute(Event<UIUserPlatformToolbarDesktopPortlet> event) throws Exception { UIUserPlatformToolbarDesktopPortlet toolbarPortlet = event.getSource(); String nodeName = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID); Collection<UserNode> nodes = toolbarPortlet.getUserNodes(toolbarPortlet.getCurrentUserNavigation()); if (toolbarPortlet.hasDashboardNode()) { PortalRequestContext prContext = Util.getPortalRequestContext(); NodeURL url = prContext.createURL(NodeURL.TYPE); url.setResource(new NavigationResource(toolbarPortlet.getFirstNonWebOSNode(nodes))); prContext.getResponse().sendRedirect(url.toString()); } else { createDashboard(nodeName, toolbarPortlet); } } private static void createDashboard(String _nodeName, UIUserPlatformToolbarDesktopPortlet toolbarPortlet) { try { PortalRequestContext prContext = Util.getPortalRequestContext(); if (_nodeName == null) { logger.debug("Parsed nodeName is null, hence use Tab_0 as default name"); _nodeName = DEFAULT_TAB_NAME; } UserPortalConfigService _configService = toolbarPortlet.getApplicationComponent(UserPortalConfigService.class); UserPortal userPortal = toolbarPortlet.getUserPortal(); UserNavigation userNavigation = toolbarPortlet.getCurrentUserNavigation(); if (userNavigation == null) { _configService.createUserSite(toolbarPortlet.getCurrentUser()); userNavigation = toolbarPortlet.getCurrentUserNavigation(); } SiteKey siteKey = userNavigation.getKey(); Page page = _configService.createPageTemplate(PAGE_TEMPLATE, siteKey.getTypeName(), siteKey.getName()); page.setTitle(_nodeName); page.setName(_nodeName); toolbarPortlet.getApplicationComponent(DataStorage.class).create(page); UserNode rootNode = userPortal.getNode(userNavigation, Scope.CHILDREN, toolbarPortlet.toolbarFilterConfig, null); UserNode dashboardNode = rootNode.addChild(_nodeName); dashboardNode.setLabel(_nodeName); dashboardNode.setPageRef(page.getPageId()); userPortal.saveNode(rootNode, null); prContext.getResponse().sendRedirect(NavigationURLUtils.getURL(dashboardNode)); } catch (Exception ex) { logger.error("Could not create default dashboard page", ex); } } } /** * Create user page navigation, page and node for Desktop if they haven't * been created already. */ static public class CreateWebOSActionListener extends EventListener<UIUserPlatformToolbarDesktopPortlet> { @Override public void execute(Event<UIUserPlatformToolbarDesktopPortlet> event) throws Exception { WebuiRequestContext context = event.getRequestContext(); UIUserPlatformToolbarDesktopPortlet toolbarDesktopPortlet = event.getSource(); String userName = context.getRemoteUser(); if (userName != null) { Page page = createPage(userName, toolbarDesktopPortlet); UserNode desktopNode = createNavigation(userName, page.getPageId(), toolbarDesktopPortlet); PortalRequestContext prContext = Util.getPortalRequestContext(); NodeURL url = prContext.createURL(NodeURL.TYPE); url.setResource(new NavigationResource(desktopNode)); prContext.getResponse().sendRedirect(url.toString()); } } private Page createPage(String userName, UIUserPlatformToolbarDesktopPortlet toolbarDesktopPortlet) throws Exception { DataStorage service = toolbarDesktopPortlet.getApplicationComponent(DataStorage.class); Page page = service.getPage(PortalConfig.USER_TYPE + "::" + userName + "::" + UIDesktopPage.PAGE_ID); if (page == null) { page = new Page(); page.setName(UIDesktopPage.PAGE_ID); page.setTitle(UIDesktopPage.PAGE_TITLE); page.setFactoryId(UIDesktopPage.DESKTOP_FACTORY_ID); page.setShowMaxWindow(true); page.setOwnerType(PortalConfig.USER_TYPE); page.setOwnerId(userName); service.create(page); } return page; } private UserNode createNavigation(String userName, String pageId, UIUserPlatformToolbarDesktopPortlet toolbarDesktopPortlet) throws Exception { UserPortal userPortal = toolbarDesktopPortlet.getUserPortal(); UserNode rootNode = userPortal.getNode(toolbarDesktopPortlet.getCurrentUserNavigation(), Scope.CHILDREN, toolbarDesktopPortlet.toolbarFilterConfig, null); UserNode desktopNode = rootNode.getChild(UIDesktopPage.NODE_NAME); if (desktopNode == null) { desktopNode = rootNode.addChild(UIDesktopPage.NODE_NAME); desktopNode.setLabel(UIDesktopPage.NODE_LABEL); desktopNode.setPageRef(pageId); userPortal.saveNode(rootNode, null); } return desktopNode; } } public Collection<UserNode> getUserNodes(UserNavigation nav) { UserPortal userPortall = getUserPortal(); if (nav != null) { try { UserNode rootNode = userPortall.getNode(nav, Scope.CHILDREN, toolbarFilterConfig, null); return rootNode.getChildren(); } catch (Exception exp) { log.warn(nav.getKey().getName() + " has been deleted"); } } return Collections.emptyList(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
dbddf73b8456e3b2c154ee8ee9ca3b8d4643373a
ea49dd7d31d2e0b65ce6aadf1274f3bb70abfaf9
/problems/0215_Kth_Largest_Element_in_an_Array/FindKMaxNumber.java
b9fdab84d09af9ee823d859eaea1e5473508e26f
[]
no_license
yychuyu/LeetCode
907a3d7d67ada9714e86103ac96422381e75d683
48384483a55e120caf5d8d353e9aa287fce3cf4a
refs/heads/master
2020-03-30T15:02:12.492378
2019-06-19T01:52:45
2019-06-19T01:52:45
151,345,944
134
331
null
2019-08-01T02:56:10
2018-10-03T01:26:28
C++
UTF-8
Java
false
false
229
java
import java.util.Arrays; public class FindKMaxNumber { public static void main(String[] argu) { int[] a = {9, 8, 7, 2, 3, 4, 1, 0, 6, 5}; Arrays.sort(a); System.out.println(a[a.length - 2]); } }
[ "710851069@qq.com" ]
710851069@qq.com
7e0d5af77de0474ccd6b2363ed71718c12183c51
3a15c4070a3c9774b3a2ccca818bceb41047429c
/src/com/sist/Ex07.java
8d7c192bbe5c5bcfeeffae211c01890d76f8c077
[]
no_license
Seo-Baek/SsYJavaOperator
00f09dbf2a45a09bfdca3eb806b5436c60c76f20
cdedd6f85bf500066e0716fd23cd7ed2fb52dceb
refs/heads/master
2020-10-01T13:21:54.594361
2019-12-13T06:46:22
2019-12-13T06:46:22
227,546,043
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package com.sist; /* * 7. 쉬프트(shift) 연산자 * - 비트열을 대상으로 왼쪽/오른쪽으로 비트를 밀어서 연산을 수행하는 연산자. * - 왼쪽 쉬프트(<<) : 곱하기의 의미. * - 오른쪽 쉬프트(>>) : 나누기의 의미. */ public class Ex07 { public static void main(String[] args) { int num1 = 10, num2 = 5; System.out.println(num2 << 3); System.out.println(num2 >> 1); } }
[ "sist87@DESKTOP-SPLIGP1" ]
sist87@DESKTOP-SPLIGP1
cd2afe64b6ec205b5d989b842e2e6e59a0ac36a6
d31b461f5201475e2b6f87737aa61f49c7051bbe
/SevenPractice/seven_19.java
418fb44166fb03bd1db877c1f306c5af60a3f447
[]
no_license
zhenganjing0421/Java
01983cce9a1376e99d169eab96c54262d5b8859a
74e853887d47eeb3eb1037ec82af9438b3587e72
refs/heads/master
2020-12-01T19:36:30.699751
2019-12-29T13:00:45
2019-12-29T13:03:11
225,563,044
0
0
null
null
null
null
GB18030
Java
false
false
1,140
java
package sevenPractice; import java.util.Scanner; import java.util.Stack; public class seven_19 { private static Stack<Integer> getElements(int val) { Stack<Integer> result = new Stack<Integer>(); int prime = 2; while (val > 1) { while (!isPrime(prime)) { prime++; } while (val % prime == 0) { result.push(prime); val = val / prime; } prime++; } return result; } private static boolean isPrime(int num) { boolean flag = true; for(int i = 2; i < num; i++){ if(num % i == 0){ flag = false; break; } } return flag; } public static void main(String[] args) { System.out.println("请输入要计算的整数: "); Scanner scanner = new Scanner(System.in); int toComputed = scanner.nextInt(); Stack<Integer> elements = getElements(toComputed); while (!elements.isEmpty()) { System.out.println(elements.pop()); } } }
[ "1104447350@qq.com" ]
1104447350@qq.com
d5d51614a81ae754af2144015b274fa7c2bc9eb8
5bca99fdb9ae64ec85c25296c7a74b9099acb911
/src/main/java/com/farm/controllers/HistoryController.java
2b5e8bed167479bef4f78b164cdf8e7ddd17ed2b
[]
no_license
FarmartApp/Farmart_Backend
e72f602b771803ef50144a61f6ef0874586dd7fc
72204285498ac53e1bd1805f1680e877ee293b27
refs/heads/master
2023-04-22T20:32:31.059425
2021-05-17T03:00:07
2021-05-17T03:00:07
360,557,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,929
java
package com.farm.controllers; import com.farm.entities.Product; import com.farm.entities.User; import com.farm.services.ProductService; import com.farm.settings.Constants; import com.farm.settings.FarmGenericResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.bind.annotation.*; import com.farm.services.HistoryService; import com.farm.entities.History; import java.util.List; @RestController @RequestMapping(Constants.BASE_URI) public class HistoryController { @Autowired private HistoryService historyService; @GetMapping("/hisory") public ResponseEntity<?> getAllHistory(@RequestParam(required = false) Integer buyerId,@RequestParam(required = false) Integer sellerId) { try { List<History> prolist= historyService.filterHistory(buyerId,sellerId); return FarmGenericResponse.builder().status(Constants.HTTP_RESULT_SUCCESS) .msg("Users get successfully!").statusCode(Constants.HTTP_SUCCESS_CODE) .isSuccess(Constants.HTTP_RESULT_SUCCESS_BOOL).data("hello").entity(); } catch (Exception e) { return FarmGenericResponse.builder().status(Constants.HTTP_RESULT_FAILED) .msg(Constants.HTTP_EXPECTATION_FAILED_MESSAGE).statusCode(Constants.HTTP_EXPECTATION_FAILED_CODE) .isSuccess(Constants.HTTP_RESULT_FAILED_BOOL).error(e.toString()).entity(); } } @PostMapping("/hisory") public ResponseEntity<?> addProduct(@RequestBody History history) { History saveUser = historyService.saveHistory(history); return FarmGenericResponse.builder().status(Constants.HTTP_RESULT_SUCCESS).msg("Product added successfully!!!") .statusCode(Constants.HTTP_SUCCESS_CODE).isSuccess(Constants.HTTP_RESULT_SUCCESS_BOOL).data(saveUser) .entity(); } }
[ "keerththy2012@gmail.com" ]
keerththy2012@gmail.com
8e9746edf66f89284373b90984855b87645b1d1f
6ed203d5b14200d3effb577dfc783eb51d9bbfde
/src/main/java/com/DBMSproject/HelperClasses/LoginWindowHelper.java
040eb0d0fa477184eef915fcc01c3c74d0857efc
[]
no_license
badcannon/JavafxCanteen
e905a105de549bc636844b914c0d0e01d2f639e2
81c3c758e807836188816491dba4d24b3327e1e3
refs/heads/master
2022-06-25T06:25:37.913011
2020-01-07T14:07:45
2020-01-07T14:07:45
205,866,203
4
1
null
2022-06-21T01:47:46
2019-09-02T13:44:18
Java
UTF-8
Java
false
false
2,437
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.DBMSproject; import java.sql.SQLException; import java.sql.Statement; import javafx.scene.control.Alert; /** * * @author shree */ public class LoginWindowHelper { boolean ConnectToDb(){ boolean Con = MainApp.Connect(); if(Con){ try { String LoginTableStatement = "CREATE TABLE IF NOT EXISTS `canteen`.`logindets` (\n" + " `Image` varchar(200) NOT NULL,\n" + " `Name` varchar(300) NOT NULL,\n" + " `Username` varchar(20) NOT NULL PRIMARY KEY,\n" + " `Password` varchar(20) DEFAULT NULL,\n" + " `Salary` float NOT NULL,\n" + " `CreatedTime` DATETIME DEFAULT NULL,\n"+ " `CreatedBy` VARCHAR(200) DEFAULT NULL" + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; String RolesTableStatement = "CREATE TABLE IF NOT EXISTS `canteen`.`roles` (\n" + " `Role` varchar(200) DEFAULT NULL,\n" + " `Username` varchar(200) DEFAULT NULL,\n" + " CONSTRAINT usernames FOREIGN KEY (username) REFERENCES `canteen`.`logindets`(Username)\n " + "ON UPDATE CASCADE\n" + "ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;"; Statement statement =MainApp.Connect.createStatement(); statement.execute(LoginTableStatement); statement.execute(RolesTableStatement); System.out.println("Here Done!"); } catch (SQLException e ){ System.out.println(e.getMessage()); } } else{ return false; } return true; } }
[ "shreenidhihk@gmail.com" ]
shreenidhihk@gmail.com
893ae448f3fd14cb0a732ff5f22f5eb637fc7805
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Closure-110/com.google.javascript.jscomp.ScopedAliases/BBC-F0-opt-20/21/com/google/javascript/jscomp/ScopedAliases_ESTest_scaffolding.java
d9a1b11d58ac8a1542aec5e1cacf67b4edaa63eb
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
68,089
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Oct 23 18:30:29 GMT 2021 */ package com.google.javascript.jscomp; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.junit.AfterClass; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class ScopedAliases_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "com.google.javascript.jscomp.ScopedAliases"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @AfterClass public static void clearEvoSuiteFramework(){ Sandbox.resetDefaultSecurityManager(); java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); setSystemProperties(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { java.lang.System.setProperties((java.util.Properties) defaultProperties.clone()); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ScopedAliases_ESTest_scaffolding.class.getClassLoader() , "com.google.common.collect.ArrayListMultimap", "com.google.javascript.rhino.head.Icode", "com.google.javascript.jscomp.type.ReverseAbstractInterpreter", "com.google.javascript.jscomp.CompilerOptions$LanguageMode", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$SeenType", "com.google.javascript.rhino.jstype.PrototypeObjectType", "com.google.javascript.rhino.SimpleErrorReporter", "com.google.common.collect.Lists$RandomAccessPartition", "com.google.javascript.rhino.head.WrappedException", "com.google.common.collect.Collections2", "com.google.common.collect.PeekingIterator", "com.google.javascript.rhino.head.debug.DebuggableObject", "com.google.javascript.jscomp.NodeTraversal$Callback", "com.google.javascript.rhino.head.jdk13.VMBridge_jdk13", "com.google.javascript.jscomp.Scope$Arguments", "com.google.javascript.jscomp.graph.Graph", "com.google.javascript.rhino.jstype.StaticScope", "com.google.javascript.rhino.head.Function", "com.google.common.collect.AbstractMapBasedMultiset$1", "com.google.javascript.jscomp.PassFactory", "com.google.common.collect.Sets$2", "com.google.javascript.rhino.Node$IntPropListItem", "com.google.javascript.jscomp.JSModule", "com.google.common.collect.Sets$3", "com.google.javascript.rhino.jstype.ObjectType", "com.google.common.collect.Sets$1", "com.google.common.collect.Platform", "com.google.common.collect.NullsLastOrdering", "com.google.common.collect.RegularImmutableMap", "com.google.common.collect.RegularImmutableBiMap", "com.google.javascript.rhino.Node$NodeMismatch", "com.google.javascript.jscomp.ControlFlowGraph", "com.google.javascript.jscomp.graph.GraphvizGraph", "com.google.javascript.rhino.head.ContextFactory$Listener", "com.google.javascript.rhino.head.ast.Jump", "com.google.javascript.rhino.head.NativeCall", "com.google.common.collect.ByFunctionOrdering", "com.google.javascript.jscomp.Tracer", "com.google.javascript.jscomp.HotSwapCompilerPass", "com.google.common.collect.AbstractMapEntry", "com.google.common.collect.Iterators$12", "com.google.common.collect.Iterators$11", "com.google.javascript.jscomp.ClosureCodingConvention", "com.google.common.collect.EmptyImmutableBiMap", "com.google.common.base.Predicate", "com.google.javascript.jscomp.ReplaceIdGenerators$NameSupplier", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$EventfulObjectState", "com.google.javascript.jscomp.CodingConvention", "com.google.javascript.jscomp.ReplaceIdGenerators$UniqueRenamingToken", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter", "com.google.javascript.jscomp.SourceMap$DetailLevel", "com.google.javascript.jscomp.MemoizedScopeCreator", "com.google.javascript.jscomp.WarningsGuard", "com.google.common.collect.ImmutableMapEntry$TerminalEntry", "com.google.javascript.jscomp.CompilerOptions$1", "com.google.javascript.jscomp.SourceMap", "com.google.common.base.Joiner", "com.google.javascript.rhino.Node$SiblingNodeIterable", "com.google.javascript.jscomp.CheckEventfulObjectDisposal", "com.google.common.collect.AbstractListMultimap", "com.google.javascript.jscomp.ReplaceIdGenerators", "com.google.javascript.jscomp.CleanupPasses", "com.google.javascript.jscomp.CompilerOptions", "com.google.common.collect.NullsFirstOrdering", "com.google.javascript.rhino.Node$StringNode", "com.google.javascript.jscomp.CompilerOptions$Reach", "com.google.javascript.jscomp.AnonymousFunctionNamingPolicy", "com.google.common.collect.Iterators$13", "com.google.javascript.rhino.InputId", "com.google.common.collect.Lists$Partition", "com.google.common.collect.AbstractMapBasedMultimap", "com.google.common.collect.Lists", "com.google.javascript.rhino.head.ast.AstRoot", "com.google.common.collect.UnmodifiableListIterator", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$Traversal", "com.google.javascript.jscomp.RhinoErrorReporter", "com.google.javascript.rhino.ErrorReporter", "com.google.javascript.jscomp.CompilerOptions$AliasTransformation", "com.google.javascript.rhino.Node$FileLevelJsDocBuilder", "com.google.javascript.rhino.jstype.StaticSourceFile", "org.mozilla.classfile.ClassFileWriter$ClassFileFormatException", "com.google.javascript.rhino.head.ScriptableObject$Slot", "com.google.common.base.Joiner$MapJoiner", "com.google.javascript.jscomp.CssRenamingMap", "com.google.javascript.rhino.head.Context$ClassShutterSetter", "com.google.common.collect.AbstractMultiset$EntrySet", "com.google.common.collect.Sets$ImprovedAbstractSet", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter", "com.google.javascript.jscomp.DiagnosticGroupWarningsGuard", "com.google.common.base.Preconditions", "com.google.javascript.jscomp.MessageFormatter", "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.jscomp.parsing.Config", "com.google.common.collect.ImmutableMapValues", "com.google.common.collect.ImmutableEntry", "com.google.common.base.Joiner$1", "com.google.common.base.Joiner$2", "com.google.javascript.jscomp.ErrorHandler", "com.google.javascript.rhino.head.Callable", "com.google.common.collect.ImmutableEnumMap", "com.google.common.collect.ImmutableCollection", "com.google.javascript.jscomp.PerformanceTracker", "com.google.javascript.jscomp.ComposeWarningsGuard$GuardComparator", "com.google.javascript.jscomp.ScopedAliases", "com.google.javascript.rhino.head.ast.ScriptNode", "com.google.javascript.rhino.head.NativeArray", "com.google.javascript.jscomp.Result", "com.google.javascript.jscomp.CompilerPass", "com.google.javascript.jscomp.Scope", "com.google.javascript.jscomp.VariableRenamingPolicy", "com.google.javascript.rhino.Node$NumberNode", "com.google.common.collect.ImmutableCollection$Builder", "com.google.common.collect.Iterators$6", "com.google.javascript.jscomp.ErrorFormat$2", "com.google.common.collect.BiMap", "com.google.common.collect.Iterators$7", "com.google.javascript.rhino.head.NativeString", "com.google.javascript.jscomp.ErrorFormat$3", "com.google.javascript.jscomp.Scope$Var", "com.google.javascript.jscomp.ErrorFormat$4", "com.google.common.collect.ImmutableSet", "com.google.javascript.jscomp.CodeChangeHandler", "com.google.common.collect.Lists$AbstractListWrapper", "com.google.common.collect.ImmutableMapEntry", "com.google.javascript.jscomp.MakeDeclaredNamesUnique$Renamer", "com.google.javascript.jscomp.FunctionInformationMap", "com.google.javascript.jscomp.RecentChange", "com.google.common.collect.AbstractMapBasedMultiset", "com.google.javascript.jscomp.NodeUtil$MayBeStringResultPredicate", "com.google.common.collect.Iterators$1", "com.google.common.collect.Iterators$2", "com.google.javascript.jscomp.JSModuleGraph$MissingModuleException", "com.google.common.collect.Iterators$3", "com.google.javascript.rhino.head.Evaluator", "com.google.javascript.jscomp.CodingConventions$DefaultCodingConvention", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$ComputeEventizeTraversal", "com.google.common.collect.Lists$StringAsImmutableList", "com.google.javascript.rhino.head.JavaScriptException", "com.google.javascript.rhino.head.ast.IdeErrorReporter", "com.google.common.collect.Lists$2", "com.google.javascript.jscomp.NodeUtil$1", "com.google.javascript.jscomp.JSSourceFile", "com.google.javascript.jscomp.CodingConventions", "com.google.javascript.rhino.head.TopLevel", "com.google.common.collect.RegularImmutableMap$NonTerminalMapEntry", "com.google.common.collect.Lists$1", "com.google.javascript.jscomp.ErrorFormat$1", "com.google.javascript.rhino.jstype.StaticReference", "com.google.javascript.jscomp.Compiler$1", "com.google.javascript.jscomp.PreprocessorSymbolTable", "com.google.common.collect.Multiset", "com.google.javascript.jscomp.Scope$1", "com.google.javascript.jscomp.Compiler$4", "com.google.javascript.rhino.head.BaseFunction", "com.google.common.collect.AbstractMultimap", "com.google.common.base.Supplier", "com.google.protobuf.MessageOrBuilder", "com.google.common.collect.EmptyImmutableSet", "com.google.javascript.jscomp.GlobalVarReferenceMap", "com.google.javascript.jscomp.graph.LinkedDirectedGraph", "com.google.common.collect.Maps$ImprovedAbstractMap", "com.google.common.collect.AbstractMapBasedMultimap$SortedAsMap", "com.google.javascript.jscomp.ScopedAliases$Traversal$1", "com.google.javascript.jscomp.TypeValidator", "com.google.common.collect.ImmutableList", "com.google.common.collect.ReverseOrdering", "com.google.common.collect.AbstractMapBasedMultimap$SortedKeySet", "com.google.protobuf.GeneratedMessage", "com.google.javascript.rhino.Node$AbstractPropListItem", "com.google.javascript.jscomp.NodeUtil$MatchNotFunction", "com.google.protobuf.AbstractMessage", "com.google.common.collect.SortedMultisetBridge", "com.google.javascript.rhino.head.ScriptRuntime$1", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$1", "com.google.protobuf.MessageLiteOrBuilder", "com.google.common.collect.ImmutableMap$Builder", "com.google.protobuf.MessageLite", "com.google.javascript.rhino.head.ConstProperties", "com.google.common.collect.Maps$EntryTransformer", "com.google.common.collect.Ordering", "com.google.javascript.jscomp.deps.SortedDependencies$MissingProvideException", "com.google.javascript.jscomp.CustomPassExecutionTime", "com.google.common.collect.NaturalOrdering", "com.google.javascript.jscomp.SyntacticScopeCreator", "com.google.javascript.rhino.head.debug.DebuggableScript", "com.google.common.collect.AllEqualOrdering", "com.google.javascript.jscomp.CompilerOptions$TweakProcessing", "com.google.common.collect.Hashing", "com.google.common.collect.ImmutableList$SubList", "com.google.javascript.jscomp.SourceMap$Format", "com.google.common.collect.ListMultimap", "com.google.javascript.rhino.head.Script", "com.google.javascript.rhino.head.ScriptRuntime$DefaultMessageProvider", "com.google.javascript.jscomp.SourceMap$Format$4", "com.google.javascript.jscomp.SourceMap$Format$3", "com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection", "com.google.javascript.jscomp.SourceMap$Format$2", "com.google.javascript.jscomp.SourceMap$Format$1", "com.google.javascript.jscomp.SourceAst", "com.google.common.collect.RegularImmutableList", "com.google.common.collect.SortedMultiset", "com.google.javascript.jscomp.MessageBundle", "com.google.javascript.jscomp.SourceExcerptProvider", "com.google.javascript.jscomp.CodingConventions$Proxy", "com.google.javascript.rhino.head.ScriptableObject$RelinkedSlot", "com.google.common.collect.Lists$TransformingRandomAccessList", "com.google.javascript.rhino.Node$PropListItem", "com.google.common.collect.Maps$KeySet", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.head.RhinoException", "com.google.javascript.rhino.SourcePosition", "com.google.common.collect.ImmutableMapKeySet", "com.google.javascript.jscomp.ComposeWarningsGuard", "com.google.javascript.jscomp.NodeTraversal", "com.google.javascript.rhino.head.ErrorReporter", "com.google.javascript.rhino.head.optimizer.Codegen", "com.google.common.collect.Multisets", "com.google.javascript.jscomp.VariableMap", "com.google.javascript.jscomp.JsAst", "com.google.common.collect.SortedMapDifference", "com.google.javascript.jscomp.RhinoErrorReporter$NewRhinoErrorReporter", "com.google.common.collect.RegularImmutableSet", "com.google.javascript.jscomp.NodeUtil", "com.google.javascript.jscomp.ErrorFormat", "com.google.javascript.rhino.head.ast.Scope", "com.google.javascript.jscomp.AbstractCompiler$LifeCycleStage", "com.google.javascript.rhino.head.Scriptable", "com.google.javascript.rhino.head.EcmaError", "com.google.javascript.rhino.head.FunctionObject", "com.google.common.collect.LexicographicalOrdering", "com.google.common.collect.Multisets$5", "com.google.javascript.jscomp.NodeUtil$BooleanResultPredicate", "com.google.javascript.jscomp.CompilerOptions$NullAliasTransformationHandler", "com.google.javascript.rhino.head.NativeContinuation", "com.google.javascript.rhino.jstype.JSType", "com.google.javascript.rhino.head.xml.XMLObject", "com.google.common.collect.ImmutableAsList", "com.google.common.collect.Sets$SetView", "com.google.javascript.jscomp.PassConfig", "com.google.common.collect.RegularImmutableAsList", "com.google.javascript.jscomp.PhaseOptimizer", "com.google.javascript.jscomp.SyntheticAst", "com.google.common.collect.SingletonImmutableSet", "com.google.javascript.rhino.head.InterpretedFunction", "com.google.javascript.jscomp.DiagnosticGroups", "com.google.common.collect.ImmutableMapEntrySet", "com.google.javascript.jscomp.ScopeCreator", "com.google.javascript.rhino.Node$SideEffectFlags", "com.google.common.collect.UsingToStringOrdering", "com.google.javascript.jscomp.ReferenceCollectingCallback$ReferenceMap", "com.google.javascript.jscomp.graph.AdjacencyGraph", "com.google.javascript.jscomp.deps.SortedDependencies$CircularDependencyException", "com.google.javascript.jscomp.Compiler$CodeBuilder", "com.google.javascript.jscomp.FunctionInformationMapOrBuilder", "com.google.javascript.rhino.head.NativeNumber", "com.google.common.collect.Lists$TransformingSequentialList", "com.google.javascript.jscomp.SourceFile", "com.google.common.collect.AbstractMapBasedMultimap$AsMap", "com.google.javascript.jscomp.PropertyRenamingPolicy", "com.google.javascript.jscomp.ScopedAliases$Traversal", "com.google.common.collect.ObjectArrays", "com.google.common.collect.AbstractIterator", "com.google.javascript.rhino.head.ScriptableObject$GetterSlot", "com.google.javascript.jscomp.DiagnosticType", "com.google.javascript.jscomp.CompilerOptions$NullAliasTransformationHandler$NullAliasTransformation", "com.google.common.collect.ImmutableList$1", "com.google.javascript.rhino.head.ScriptRuntime$MessageProvider", "com.google.common.collect.MapDifference", "com.google.javascript.jscomp.CompilerOptions$AliasTransformationHandler", "com.google.common.collect.ImmutableMap$MapViewOfValuesAsSingletonSets", "com.google.common.collect.SortedIterable", "com.google.javascript.jscomp.CompilerInput", "com.google.javascript.rhino.jstype.FunctionType", "com.google.javascript.rhino.head.ast.FunctionNode", "com.google.javascript.jscomp.AbstractCompiler", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$DisposalCheckingPolicy", "com.google.javascript.rhino.head.ast.AstNode", "com.google.common.collect.UnmodifiableIterator", "com.google.javascript.rhino.head.Context", "com.google.common.collect.AbstractMapBasedMultimap$RandomAccessWrappedList", "com.google.javascript.jscomp.Compiler", "com.google.javascript.jscomp.DiagnosticGroup", "com.google.javascript.jscomp.NodeTraversal$ScopedCallback", "com.google.javascript.jscomp.SyntacticScopeCreator$RedeclarationHandler", "com.google.javascript.jscomp.NodeUtil$Visitor", "com.google.javascript.rhino.head.Node", "com.google.javascript.rhino.head.NativeBoolean", "com.google.javascript.jscomp.JSError", "com.google.javascript.rhino.Node$AncestorIterable", "com.google.common.collect.AbstractMapBasedMultimap$KeySet", "com.google.common.collect.ImmutableEnumSet", "com.google.common.collect.Lists$RandomAccessListWrapper", "com.google.common.collect.AbstractMapBasedMultimap$WrappedList", "com.google.common.collect.HashMultiset", "com.google.common.collect.ImmutableList$ReverseImmutableList", "com.google.protobuf.AbstractMessageLite", "com.google.javascript.jscomp.ErrorManager", "com.google.javascript.jscomp.NodeUtil$NumbericResultPredicate", "com.google.common.collect.SingletonImmutableList", "com.google.javascript.jscomp.CheckLevel", "com.google.javascript.rhino.jstype.StaticSlot", "com.google.javascript.rhino.head.ContextFactory", "com.google.common.base.Function", "com.google.common.collect.ImmutableMap", "com.google.javascript.rhino.head.VMBridge", "com.google.common.collect.ComparatorOrdering", "com.google.common.collect.AbstractIndexedListIterator", "com.google.common.collect.Maps$1", "com.google.javascript.jscomp.JSModuleGraph", "com.google.common.collect.CollectPreconditions", "com.google.javascript.rhino.jstype.SimpleSlot", "com.google.common.collect.Multiset$Entry", "com.google.javascript.jscomp.SyntacticScopeCreator$DefaultRedeclarationHandler", "com.google.common.collect.Sets", "com.google.javascript.rhino.head.Kit", "com.google.javascript.rhino.head.jdk15.VMBridge_jdk15", "com.google.javascript.rhino.Node$ObjectPropListItem", "com.google.common.collect.ExplicitOrdering", "com.google.javascript.jscomp.Region", "com.google.javascript.rhino.head.ContextAction", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.head.EvaluatorException", "com.google.javascript.jscomp.NodeTraversal$AbstractPostOrderCallback", "com.google.javascript.jscomp.DefaultPassConfig", "com.google.javascript.jscomp.Compiler$IntermediateState", "com.google.javascript.jscomp.CompilerOptions$TracerMode", "com.google.javascript.jscomp.RhinoErrorReporter$OldRhinoErrorReporter", "com.google.common.collect.AbstractMultiset", "com.google.common.collect.Multimap", "com.google.javascript.jscomp.SourceMap$DetailLevel$2", "com.google.javascript.jscomp.SourceMap$DetailLevel$1", "com.google.common.collect.Iterators", "com.google.common.collect.CompoundOrdering", "com.google.javascript.rhino.head.IdFunctionCall", "com.google.common.collect.ImmutableBiMap", "com.google.javascript.jscomp.CompilerOptions$DevMode", "com.google.javascript.jscomp.DependencyOptions", "com.google.common.collect.SingletonImmutableBiMap", "com.google.javascript.rhino.head.Interpreter", "com.google.common.collect.Multisets$EntrySet", "com.google.javascript.rhino.head.ImporterTopLevel", "com.google.javascript.rhino.jstype.StaticSymbolTable", "com.google.javascript.jscomp.JSModuleGraph$ModuleDependenceException", "com.google.javascript.rhino.jstype.JSTypeRegistry", "com.google.javascript.jscomp.graph.DiGraph", "com.google.javascript.jscomp.RenamingMap", "com.google.common.collect.RegularImmutableMap$EntrySet", "com.google.javascript.rhino.head.ScriptRuntime", "com.google.javascript.jscomp.SymbolTable", "com.google.javascript.jscomp.deps.DependencyInfo", "com.google.common.collect.Maps", "com.google.common.primitives.Ints", "com.google.javascript.rhino.head.ContextFactory$GlobalSetter", "com.google.protobuf.Message", "com.google.common.collect.Iterators$MergingIterator", "com.google.javascript.rhino.head.ScriptableObject", "com.google.javascript.rhino.head.IdScriptableObject", "com.google.javascript.rhino.head.NativeFunction", "com.google.javascript.rhino.head.NativeObject" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ScopedAliases_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "com.google.javascript.jscomp.DiagnosticType", "com.google.javascript.jscomp.CheckLevel", "com.google.javascript.jscomp.ScopedAliases", "com.google.javascript.jscomp.ScopedAliases$Traversal", "com.google.javascript.jscomp.ScopedAliases$AliasUsage", "com.google.javascript.jscomp.ScopedAliases$AliasedNode", "com.google.javascript.jscomp.ScopedAliases$AliasedTypeNode", "com.google.common.collect.ImmutableCollection", "com.google.common.collect.ImmutableSet", "com.google.common.collect.EmptyImmutableSet", "com.google.javascript.jscomp.AbstractCompiler", "com.google.javascript.jscomp.Compiler$1", "com.google.javascript.jscomp.Compiler", "com.google.javascript.jscomp.AbstractCompiler$LifeCycleStage", "com.google.common.base.Joiner", "com.google.common.base.Preconditions", "com.google.common.base.Joiner$1", "com.google.common.collect.Collections2", "com.google.common.base.Joiner$MapJoiner", "com.google.common.collect.Maps", "com.google.javascript.jscomp.CodingConventions$Proxy", "com.google.javascript.jscomp.ClosureCodingConvention", "com.google.javascript.jscomp.CodingConventions", "com.google.javascript.jscomp.CodingConventions$DefaultCodingConvention", "com.google.common.collect.ObjectArrays", "com.google.common.collect.Hashing", "com.google.common.collect.RegularImmutableSet", "com.google.common.collect.Sets", "com.google.common.collect.RegularImmutableList", "com.google.common.collect.ImmutableList", "com.google.common.collect.UnmodifiableIterator", "com.google.common.collect.UnmodifiableListIterator", "com.google.common.collect.Iterators$1", "com.google.common.collect.Iterators$2", "com.google.common.collect.Iterators", "com.google.javascript.jscomp.RhinoErrorReporter", "com.google.javascript.jscomp.RhinoErrorReporter$OldRhinoErrorReporter", "com.google.common.collect.ImmutableMap", "com.google.common.collect.ImmutableMap$Builder", "com.google.javascript.rhino.head.Kit", "com.google.javascript.rhino.head.optimizer.Codegen", "com.google.javascript.rhino.head.Icode", "com.google.javascript.rhino.head.Interpreter", "com.google.javascript.rhino.head.Context", "com.google.javascript.rhino.head.ContextFactory", "com.google.javascript.rhino.head.ScriptableObject", "com.google.javascript.rhino.head.ScriptRuntime$DefaultMessageProvider", "com.google.javascript.rhino.head.ScriptRuntime", "com.google.javascript.rhino.head.jdk13.VMBridge_jdk13", "com.google.javascript.rhino.head.jdk15.VMBridge_jdk15", "com.google.javascript.rhino.head.VMBridge", "com.google.common.collect.CollectPreconditions", "com.google.common.collect.AbstractMapEntry", "com.google.common.collect.ImmutableEntry", "com.google.common.collect.ImmutableMapEntry", "com.google.common.collect.ImmutableMapEntry$TerminalEntry", "com.google.javascript.rhino.SimpleErrorReporter", "com.google.common.collect.ImmutableCollection$Builder", "com.google.common.collect.Platform", "com.google.common.collect.RegularImmutableMap", "com.google.javascript.jscomp.RhinoErrorReporter$NewRhinoErrorReporter", "com.google.common.collect.RegularImmutableMap$NonTerminalMapEntry", "com.google.javascript.jscomp.PassFactory", "com.google.javascript.jscomp.Compiler$4", "com.google.javascript.jscomp.RecentChange", "com.google.common.collect.Lists", "com.google.javascript.jscomp.ReplaceIdGenerators$UniqueRenamingToken", "com.google.javascript.jscomp.ReplaceIdGenerators", "com.google.javascript.jscomp.CompilerOptions$NullAliasTransformationHandler$NullAliasTransformation", "com.google.javascript.jscomp.CompilerOptions$NullAliasTransformationHandler", "com.google.javascript.jscomp.CompilerOptions", "com.google.javascript.jscomp.DependencyOptions", "com.google.javascript.jscomp.WarningsGuard", "com.google.javascript.jscomp.ComposeWarningsGuard", "com.google.common.primitives.Ints", "com.google.javascript.jscomp.ComposeWarningsGuard$GuardComparator", "com.google.javascript.jscomp.SourceMap$DetailLevel", "com.google.javascript.jscomp.SourceMap$Format", "com.google.javascript.jscomp.CompilerOptions$LanguageMode", "com.google.javascript.jscomp.CompilerOptions$DevMode", "com.google.javascript.jscomp.VariableRenamingPolicy", "com.google.javascript.jscomp.PropertyRenamingPolicy", "com.google.javascript.jscomp.AnonymousFunctionNamingPolicy", "com.google.javascript.jscomp.CompilerOptions$TweakProcessing", "com.google.common.collect.ImmutableBiMap", "com.google.common.collect.EmptyImmutableBiMap", "com.google.javascript.jscomp.CompilerOptions$TracerMode", "com.google.javascript.jscomp.JSModule", "com.google.javascript.jscomp.BasicErrorManager", "com.google.javascript.jscomp.LoggerErrorManager", "com.google.javascript.jscomp.AbstractMessageFormatter", "com.google.javascript.jscomp.LightweightMessageFormatter$LineNumberingFormatter", "com.google.javascript.jscomp.LightweightMessageFormatter", "com.google.javascript.jscomp.BasicErrorManager$LeveledJSErrorComparator", "com.google.javascript.jscomp.CheckGlobalThis", "com.google.javascript.jscomp.DiagnosticGroup", "com.google.common.collect.SingletonImmutableSet", "com.google.javascript.jscomp.CheckAccessControls", "com.google.common.collect.AbstractIndexedListIterator", "com.google.common.collect.Iterators$11", "com.google.javascript.jscomp.TypeValidator", "com.google.javascript.jscomp.NodeTraversal$AbstractPostOrderCallback", "com.google.javascript.jscomp.VarCheck", "com.google.javascript.jscomp.CheckGlobalNames", "com.google.javascript.jscomp.VariableReferenceCheck", "com.google.javascript.jscomp.StrictModeCheck", "com.google.javascript.jscomp.ProcessDefines", "com.google.common.base.CharMatcher$1", "com.google.common.base.CharMatcher$FastMatcher", "com.google.common.base.CharMatcher$13", "com.google.common.base.CharMatcher$RangesMatcher", "com.google.common.base.CharMatcher$2", "com.google.common.base.CharMatcher$3", "com.google.common.base.CharMatcher$4", "com.google.common.base.CharMatcher$5", "com.google.common.base.CharMatcher$6", "com.google.common.base.CharMatcher$Or", "com.google.common.base.CharMatcher$7", "com.google.common.base.CharMatcher$8", "com.google.common.base.CharMatcher$15", "com.google.common.base.CharMatcher", "com.google.common.base.CharMatcher$11", "com.google.javascript.jscomp.ProcessTweaks$TweakFunction", "com.google.javascript.jscomp.ProcessTweaks", "com.google.javascript.rhino.jstype.CanCastToVisitor", "com.google.javascript.rhino.jstype.JSType$1", "com.google.javascript.rhino.jstype.JSType", "com.google.javascript.rhino.jstype.ObjectType", "com.google.javascript.jscomp.TypedScopeCreator", "com.google.javascript.jscomp.FunctionTypeBuilder", "com.google.javascript.jscomp.TypeCheck", "com.google.javascript.jscomp.CheckMissingReturn$1", "com.google.javascript.jscomp.CheckMissingReturn$2", "com.google.javascript.jscomp.CheckMissingReturn", "com.google.javascript.jscomp.CheckDebuggerStatement", "com.google.javascript.jscomp.CheckRegExp", "com.google.javascript.jscomp.CheckEventfulObjectDisposal", "com.google.javascript.jscomp.CheckSideEffects", "com.google.javascript.jscomp.CheckUnreachableCode", "com.google.javascript.jscomp.ConstCheck", "com.google.javascript.jscomp.DisambiguateProperties$Warnings", "com.google.javascript.jscomp.ControlStructureCheck", "com.google.javascript.jscomp.CheckProvides", "com.google.javascript.jscomp.CheckRequiresForConstructors", "com.google.javascript.jscomp.JsMessageVisitor", "com.google.javascript.jscomp.CheckSuspiciousCode", "com.google.javascript.jscomp.DiagnosticGroups", "com.google.javascript.jscomp.DiagnosticGroupWarningsGuard", "com.google.javascript.jscomp.WarningsGuard$Priority", "com.google.javascript.jscomp.SuppressDocWarningsGuard", "com.google.common.collect.ImmutableMapEntrySet", "com.google.common.collect.RegularImmutableMap$EntrySet", "com.google.common.collect.ImmutableAsList", "com.google.common.collect.RegularImmutableAsList", "com.google.javascript.jscomp.SourceFile", "com.google.javascript.jscomp.SourceFile$Builder", "com.google.common.base.Charsets", "com.google.javascript.jscomp.SourceFile$Preloaded", "com.google.javascript.jscomp.CompilerInput", "com.google.javascript.jscomp.JsAst", "com.google.javascript.rhino.InputId", "com.google.javascript.jscomp.PreprocessorSymbolTable", "com.google.common.collect.AbstractMultimap", "com.google.common.collect.AbstractMapBasedMultimap", "com.google.common.collect.AbstractListMultimap", "com.google.common.collect.ArrayListMultimap", "com.google.common.collect.AbstractMultiset", "com.google.common.collect.AbstractMapBasedMultiset", "com.google.common.collect.HashMultiset", "com.google.common.collect.Ordering", "com.google.common.collect.Multisets$5", "com.google.common.collect.Multisets", "com.google.common.collect.Sets$ImprovedAbstractSet", "com.google.common.collect.Multisets$EntrySet", "com.google.common.collect.AbstractMultiset$EntrySet", "com.google.common.collect.AbstractMapBasedMultiset$1", "com.google.javascript.jscomp.NodeTraversal", "com.google.javascript.jscomp.SyntacticScopeCreator", "com.google.javascript.jscomp.SyntacticScopeCreator$DefaultRedeclarationHandler", "com.google.javascript.jscomp.NodeUtil$1", "com.google.javascript.jscomp.NodeUtil$NumbericResultPredicate", "com.google.javascript.jscomp.NodeUtil$BooleanResultPredicate", "com.google.javascript.jscomp.NodeUtil$MayBeStringResultPredicate", "com.google.javascript.jscomp.NodeUtil$MatchNotFunction", "com.google.javascript.jscomp.NodeUtil", "com.google.javascript.jscomp.Compiler$11", "com.google.javascript.jscomp.PassConfig", "com.google.javascript.jscomp.DefaultPassConfig", "com.google.javascript.jscomp.CrossModuleMethodMotion$IdGenerator", "com.google.javascript.jscomp.DefaultPassConfig$HotSwapPassFactory", "com.google.javascript.jscomp.DefaultPassConfig$1", "com.google.javascript.jscomp.DefaultPassConfig$2", "com.google.javascript.jscomp.DefaultPassConfig$3", "com.google.javascript.jscomp.DefaultPassConfig$4", "com.google.javascript.jscomp.DefaultPassConfig$5", "com.google.javascript.jscomp.DefaultPassConfig$6", "com.google.javascript.jscomp.DefaultPassConfig$7", "com.google.javascript.jscomp.DefaultPassConfig$8", "com.google.javascript.jscomp.DefaultPassConfig$9", "com.google.javascript.jscomp.DefaultPassConfig$10", "com.google.javascript.jscomp.DefaultPassConfig$11", "com.google.javascript.jscomp.DefaultPassConfig$12", "com.google.javascript.jscomp.DefaultPassConfig$13", "com.google.javascript.jscomp.DefaultPassConfig$14", "com.google.javascript.jscomp.DefaultPassConfig$15", "com.google.javascript.jscomp.DefaultPassConfig$16", "com.google.javascript.jscomp.DefaultPassConfig$17", "com.google.javascript.jscomp.DefaultPassConfig$18", "com.google.javascript.jscomp.DefaultPassConfig$19", "com.google.javascript.jscomp.DefaultPassConfig$20", "com.google.javascript.jscomp.DefaultPassConfig$21", "com.google.javascript.jscomp.DefaultPassConfig$22", "com.google.javascript.jscomp.DefaultPassConfig$23", "com.google.javascript.jscomp.DefaultPassConfig$24", "com.google.javascript.jscomp.DefaultPassConfig$25", "com.google.javascript.jscomp.DefaultPassConfig$26", "com.google.javascript.jscomp.DefaultPassConfig$27", "com.google.javascript.jscomp.DefaultPassConfig$28", "com.google.javascript.jscomp.DefaultPassConfig$29", "com.google.javascript.jscomp.DefaultPassConfig$30", "com.google.javascript.jscomp.DefaultPassConfig$31", "com.google.javascript.jscomp.DefaultPassConfig$32", "com.google.javascript.jscomp.DefaultPassConfig$33", "com.google.javascript.jscomp.DefaultPassConfig$34", "com.google.javascript.jscomp.DefaultPassConfig$35", "com.google.javascript.jscomp.DefaultPassConfig$36", "com.google.javascript.jscomp.DefaultPassConfig$37", "com.google.javascript.jscomp.DefaultPassConfig$38", "com.google.javascript.jscomp.DefaultPassConfig$39", "com.google.javascript.jscomp.DefaultPassConfig$40", "com.google.javascript.jscomp.DefaultPassConfig$41", "com.google.javascript.jscomp.DefaultPassConfig$42", "com.google.javascript.jscomp.DefaultPassConfig$43", "com.google.javascript.jscomp.DefaultPassConfig$44", "com.google.javascript.jscomp.DefaultPassConfig$45", "com.google.javascript.jscomp.DefaultPassConfig$46", "com.google.javascript.jscomp.DefaultPassConfig$47", "com.google.javascript.jscomp.DefaultPassConfig$48", "com.google.javascript.jscomp.DefaultPassConfig$49", "com.google.javascript.jscomp.DefaultPassConfig$50", "com.google.javascript.jscomp.DefaultPassConfig$51", "com.google.javascript.jscomp.DefaultPassConfig$52", "com.google.javascript.jscomp.DefaultPassConfig$53", "com.google.javascript.jscomp.DefaultPassConfig$54", "com.google.javascript.jscomp.DefaultPassConfig$55", "com.google.javascript.jscomp.DefaultPassConfig$56", "com.google.javascript.jscomp.DefaultPassConfig$57", "com.google.javascript.jscomp.DefaultPassConfig$58", "com.google.javascript.jscomp.DefaultPassConfig$59", "com.google.javascript.jscomp.DefaultPassConfig$60", "com.google.javascript.jscomp.DefaultPassConfig$61", "com.google.javascript.jscomp.DefaultPassConfig$62", "com.google.javascript.jscomp.DefaultPassConfig$63", "com.google.javascript.jscomp.DefaultPassConfig$64", "com.google.javascript.jscomp.DefaultPassConfig$65", "com.google.javascript.jscomp.DefaultPassConfig$66", "com.google.javascript.jscomp.DefaultPassConfig$67", "com.google.javascript.jscomp.DefaultPassConfig$68", "com.google.javascript.jscomp.DefaultPassConfig$69", "com.google.javascript.jscomp.DefaultPassConfig$70", "com.google.javascript.jscomp.DefaultPassConfig$71", "com.google.javascript.jscomp.DefaultPassConfig$72", "com.google.javascript.jscomp.DefaultPassConfig$73", "com.google.javascript.jscomp.DefaultPassConfig$74", "com.google.javascript.jscomp.DefaultPassConfig$75", "com.google.javascript.jscomp.DefaultPassConfig$76", "com.google.javascript.jscomp.DefaultPassConfig$77", "com.google.javascript.jscomp.DefaultPassConfig$78", "com.google.javascript.jscomp.DefaultPassConfig$79", "com.google.javascript.jscomp.DefaultPassConfig$80", "com.google.javascript.jscomp.DefaultPassConfig$81", "com.google.javascript.jscomp.DefaultPassConfig$82", "com.google.javascript.jscomp.DefaultPassConfig$83", "com.google.javascript.jscomp.DefaultPassConfig$84", "com.google.javascript.jscomp.DefaultPassConfig$85", "com.google.javascript.jscomp.DefaultPassConfig$86", "com.google.javascript.jscomp.DefaultPassConfig$87", "com.google.javascript.jscomp.DefaultPassConfig$88", "com.google.javascript.jscomp.DefaultPassConfig$89", "com.google.javascript.jscomp.DefaultPassConfig$90", "com.google.javascript.jscomp.DefaultPassConfig$91", "com.google.javascript.jscomp.DefaultPassConfig$92", "com.google.javascript.jscomp.DefaultPassConfig$93", "com.google.javascript.jscomp.DefaultPassConfig$94", "com.google.javascript.jscomp.DefaultPassConfig$95", "com.google.javascript.jscomp.DefaultPassConfig$96", "com.google.javascript.jscomp.DefaultPassConfig$97", "com.google.javascript.jscomp.DefaultPassConfig$98", "com.google.javascript.jscomp.DefaultPassConfig$99", "com.google.javascript.jscomp.DefaultPassConfig$100", "com.google.javascript.jscomp.DefaultPassConfig$101", "com.google.javascript.jscomp.DefaultPassConfig$102", "com.google.javascript.jscomp.DefaultPassConfig$103", "com.google.javascript.jscomp.DefaultPassConfig$107", "com.google.javascript.jscomp.DefaultPassConfig$108", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Node$StringNode", "com.google.javascript.jscomp.PrintStreamErrorManager", "com.google.javascript.jscomp.SyntheticAst", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node$AbstractPropListItem", "com.google.javascript.rhino.Node$ObjectPropListItem", "com.google.javascript.jscomp.InferJSDocInfo", "com.google.javascript.jscomp.parsing.Config$LanguageMode", "com.google.javascript.jscomp.parsing.ParserRunner", "com.google.javascript.jscomp.parsing.Config", "com.google.javascript.jscomp.parsing.Annotation", "com.google.javascript.rhino.head.DefaultErrorReporter", "com.google.javascript.rhino.head.CompilerEnvirons", "com.google.javascript.rhino.head.Parser", "com.google.javascript.rhino.head.TokenStream", "com.google.javascript.rhino.head.ObjToIntMap", "com.google.javascript.rhino.head.Node", "com.google.javascript.rhino.head.ast.AstNode", "com.google.javascript.rhino.head.ast.Jump", "com.google.javascript.rhino.head.ast.Scope", "com.google.javascript.rhino.head.ast.ScriptNode", "com.google.javascript.rhino.head.ast.AstRoot", "com.google.javascript.rhino.head.AttachJsDocs", "com.google.javascript.jscomp.parsing.IRFactory", "com.google.javascript.rhino.Node$FileLevelJsDocBuilder", "com.google.javascript.jscomp.parsing.TypeSafeDispatcher", "com.google.javascript.jscomp.parsing.IRFactory$TransformDispatcher", "com.google.javascript.jscomp.parsing.IRFactory$1", "com.google.javascript.rhino.head.Node$NodeIterator", "com.google.javascript.rhino.Node$IntPropListItem", "com.google.javascript.jscomp.parsing.ParserRunner$ParseResult", "com.google.javascript.jscomp.PrepareAst", "com.google.javascript.jscomp.PrepareAst$PrepareAnnotations", "com.google.javascript.jscomp.Tracer$1", "com.google.javascript.jscomp.Tracer$Stat", "com.google.javascript.jscomp.Tracer", "com.google.javascript.jscomp.AbstractPeepholeOptimization", "com.google.javascript.jscomp.PeepholeMinimizeConditions", "com.google.javascript.rhino.Node$NumberNode", "com.google.javascript.jscomp.StatementFusion", "com.google.javascript.jscomp.Normalize", "com.google.javascript.rhino.head.ast.Name", "com.google.javascript.rhino.head.ast.ExpressionStatement", "com.google.javascript.rhino.TokenStream", "com.google.javascript.jscomp.Normalize$NormalizeStatements", "com.google.javascript.jscomp.MakeDeclaredNamesUnique", "com.google.javascript.jscomp.MakeDeclaredNamesUnique$ContextualRenamer", "com.google.javascript.jscomp.PeepholeRemoveDeadCode", "com.google.javascript.rhino.jstype.JSTypeRegistry", "com.google.javascript.jscomp.VerboseMessageFormatter", "com.google.javascript.jscomp.CodeGenerator", "com.google.javascript.jscomp.PeepholeSubstituteAlternateSyntax", "com.google.javascript.jscomp.ControlFlowAnalysis", "com.google.javascript.jscomp.SourceFile$Generated", "com.google.javascript.jscomp.SimpleDefinitionFinder", "com.google.javascript.jscomp.ExploitAssigns", "com.google.javascript.jscomp.AbstractMessageFormatter$1", "com.google.javascript.jscomp.AbstractMessageFormatter$Color", "com.google.javascript.jscomp.CleanupPasses", "com.google.javascript.jscomp.CleanupPasses$1", "com.google.javascript.jscomp.CleanupPasses$2", "com.google.javascript.jscomp.CleanupPasses$3", "com.google.javascript.jscomp.FunctionRewriter", "com.google.javascript.jscomp.JqueryCodingConvention", "com.google.javascript.jscomp.JSError", "com.google.javascript.jscomp.LoggerErrorManager$1", "com.google.javascript.jscomp.PeepholeReplaceKnownMethods", "com.google.javascript.jscomp.TightenTypes", "com.google.javascript.jscomp.PeepholeFoldConstants", "com.google.javascript.jscomp.TightenTypes$ConcreteScope", "com.google.javascript.jscomp.PeepholeSimplifyRegExp", "com.google.javascript.jscomp.JSError$1", "com.google.javascript.rhino.Node$AncestorIterable", "com.google.javascript.rhino.Node$AncestorIterable$1", "com.google.javascript.jscomp.ReorderConstantExpression", "com.google.javascript.jscomp.PassConfig$State", "com.google.common.collect.AbstractSetMultimap", "com.google.common.collect.LinkedHashMultimap", "com.google.common.collect.LinkedHashMultimap$ValueEntry", "com.google.javascript.rhino.jstype.TemplateTypeMap", "com.google.javascript.rhino.jstype.ModificationVisitor", "com.google.javascript.rhino.jstype.TemplateTypeMapReplacer", "com.google.common.collect.ImmutableCollection$ArrayBasedBuilder", "com.google.common.collect.ImmutableList$Builder", "com.google.javascript.rhino.jstype.ProxyObjectType", "com.google.javascript.rhino.jstype.TemplateType", "com.google.javascript.rhino.jstype.ValueType", "com.google.javascript.rhino.jstype.BooleanType", "com.google.javascript.rhino.jstype.NullType", "com.google.javascript.rhino.jstype.NumberType", "com.google.javascript.rhino.jstype.StringType", "com.google.javascript.rhino.jstype.UnknownType", "com.google.javascript.rhino.jstype.VoidType", "com.google.javascript.rhino.jstype.AllType", "com.google.javascript.rhino.jstype.PrototypeObjectType", "com.google.javascript.rhino.jstype.PropertyMap$1", "com.google.javascript.rhino.jstype.PropertyMap", "com.google.javascript.rhino.jstype.FunctionType", "com.google.javascript.rhino.jstype.FunctionParamBuilder", "com.google.javascript.rhino.jstype.ArrowType", "com.google.javascript.rhino.jstype.FunctionType$Kind", "com.google.javascript.rhino.jstype.FunctionType$PropAccess", "com.google.javascript.rhino.jstype.InstanceObjectType", "com.google.javascript.rhino.jstype.Property", "com.google.javascript.rhino.jstype.NoObjectType", "com.google.javascript.rhino.jstype.NoType", "com.google.javascript.rhino.jstype.NoResolvedType", "com.google.common.collect.SingletonImmutableList", "com.google.javascript.rhino.jstype.ErrorFunctionType", "com.google.javascript.rhino.jstype.UnionTypeBuilder", "com.google.javascript.rhino.jstype.EquivalenceMethod", "com.google.javascript.rhino.jstype.TemplateTypeMap$EquivalenceMatch", "com.google.javascript.rhino.jstype.UnionType", "com.google.javascript.rhino.jstype.FunctionBuilder", "com.google.javascript.rhino.jstype.JSTypeRegistry$1", "com.google.javascript.jscomp.JSModuleGraph", "com.google.javascript.jscomp.InlineProperties$PropertyInfo", "com.google.javascript.jscomp.InlineProperties", "com.google.javascript.jscomp.DefaultPassConfig$104", "com.google.javascript.rhino.jstype.SimpleSlot", "com.google.common.collect.ImmutableSortedMapFauxverideShim", "com.google.common.collect.NaturalOrdering", "com.google.common.collect.EmptyImmutableSortedMap", "com.google.common.collect.ImmutableSortedSetFauxverideShim", "com.google.common.collect.EmptyImmutableSortedSet", "com.google.common.collect.ImmutableSortedSet", "com.google.common.collect.ImmutableSortedMap", "com.google.common.collect.Maps$EntryFunction", "com.google.common.collect.ByFunctionOrdering", "com.google.javascript.rhino.Token", "com.google.javascript.jscomp.PeepholeCollectPropertyAssignments", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter$1", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter$2", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter$3", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter$4", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter", "com.google.javascript.jscomp.Compiler$IntermediateState", "com.google.common.collect.Iterators$12", "com.google.common.io.CharStreams", "com.google.javascript.rhino.head.ast.InfixExpression", "com.google.javascript.jscomp.BasicErrorManager$ErrorWithLevel", "com.google.javascript.rhino.head.Parser$ParserException", "com.google.javascript.rhino.head.ast.EmptyStatement", "com.google.javascript.rhino.head.ast.UnaryExpression", "com.google.javascript.rhino.head.ast.PropertyGet", "com.google.javascript.rhino.head.Token", "com.google.javascript.rhino.head.RhinoException", "com.google.javascript.rhino.head.EvaluatorException", "com.google.javascript.jscomp.Compiler$6", "com.google.javascript.jscomp.Compiler$3", "com.google.javascript.jscomp.Compiler$5", "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.rhino.jstype.TemplatizedType", "com.google.javascript.jscomp.ControlFlowAnalysis$1", "com.google.common.collect.HashMultimap", "com.google.javascript.jscomp.PeepholeFoldWithTypes", "com.google.javascript.jscomp.SourceFile$OnDisk", "com.google.common.collect.ImmutableMultimap", "com.google.common.collect.ImmutableSetMultimap", "com.google.common.collect.ImmutableMultimap$Builder", "com.google.common.collect.ImmutableSetMultimap$Builder", "com.google.common.collect.ImmutableMultimap$BuilderMultimap", "com.google.common.collect.ImmutableSetMultimap$BuilderMultimap", "com.google.javascript.rhino.JSDocInfo$LazilyInitializedInfo", "com.google.javascript.jscomp.NodeTraversal$AbstractShallowCallback", "com.google.javascript.jscomp.FieldCleanupPass$QualifiedNameSearchTraversal", "com.google.javascript.jscomp.Normalize$PropagateConstantAnnotationsOverVars", "com.google.javascript.jscomp.TypeInferencePass", "com.google.javascript.rhino.Node$NodeMismatch", "com.google.javascript.rhino.Node$SiblingNodeIterable", "com.google.javascript.jscomp.Scope$1", "com.google.javascript.jscomp.Scope", "com.google.javascript.jscomp.CompilerOptions$1", "com.google.javascript.rhino.head.ast.FunctionCall", "com.google.javascript.rhino.head.ast.NewExpression", "com.google.javascript.jscomp.SymbolTable", "com.google.javascript.jscomp.DisambiguatePrivateProperties", "com.google.javascript.jscomp.graph.Graph", "com.google.javascript.jscomp.graph.DiGraph", "com.google.javascript.jscomp.graph.LinkedDirectedGraph", "com.google.javascript.jscomp.CoverageInstrumentationCallback", "com.google.javascript.rhino.jstype.SimpleSourceFile", "com.google.javascript.jscomp.ReferenceCollectingCallback$1", "com.google.javascript.jscomp.ReferenceCollectingCallback", "com.google.common.base.Predicates", "com.google.common.base.Predicates$ObjectPredicate", "com.google.javascript.rhino.head.ast.NumberLiteral", "com.google.javascript.rhino.head.ast.StringLiteral", "com.google.javascript.jscomp.NameReferenceGraph$Reference", "com.google.javascript.rhino.jstype.EnumType", "com.google.javascript.rhino.jstype.EnumElementType", "com.google.javascript.jscomp.CoalesceVariableNames$1", "com.google.javascript.jscomp.CoalesceVariableNames", "com.google.javascript.jscomp.PassConfig$PassConfigDelegate", "com.google.javascript.jscomp.PerformanceTracker", "com.google.javascript.jscomp.PerformanceTracker$2", "com.google.javascript.jscomp.PhaseOptimizer$ProgressRange", "com.google.javascript.jscomp.PhaseOptimizer", "com.google.javascript.jscomp.CodePrinter$Builder", "com.google.javascript.jscomp.CodePrinter$Format", "com.google.javascript.jscomp.CodePrinter", "com.google.javascript.jscomp.CodeConsumer", "com.google.javascript.jscomp.CodePrinter$MappedCodePrinter", "com.google.javascript.jscomp.CodePrinter$CompactCodePrinter", "com.google.javascript.jscomp.CodeGenerator$Context", "com.google.javascript.jscomp.LinkedFlowScope", "com.google.javascript.jscomp.LinkedFlowScope$FlatFlowScopeCache", "com.google.javascript.jscomp.ProcessCommonJSModules", "com.google.javascript.jscomp.DefaultPassConfig$36$1", "com.google.javascript.jscomp.ProcessClosurePrimitives", "com.google.javascript.jscomp.ProcessClosurePrimitives$ProvidedName", "com.google.javascript.jscomp.Compiler$8", "com.google.javascript.jscomp.MemoizedScopeCreator", "com.google.javascript.jscomp.ReferenceCollectingCallback$Reference", "com.google.javascript.jscomp.LineNumberCheck", "com.google.javascript.jscomp.Result", "com.google.javascript.jscomp.Tracer$ThreadTrace", "com.google.javascript.jscomp.MinimizeExitPoints", "com.google.javascript.jscomp.Compiler$CodeBuilder", "com.google.javascript.jscomp.Compiler$10", "com.google.javascript.jscomp.MakeDeclaredNamesUnique$BoilerplateRenamer", "com.google.javascript.jscomp.Compiler$2", "com.google.javascript.jscomp.OptimizeCalls", "com.google.javascript.jscomp.OptimizeReturns", "com.google.javascript.jscomp.SimpleDefinitionFinder$DefinitionGatheringCallback", "com.google.javascript.jscomp.GlobalNamespace", "com.google.javascript.jscomp.GlobalNamespace$BuildGlobalNamespace", "com.google.javascript.rhino.head.Token$CommentType", "com.google.javascript.rhino.head.ast.Comment", "com.google.javascript.rhino.head.ast.AstNode$PositionComparator", "com.google.javascript.rhino.head.ast.Assignment", "com.google.javascript.rhino.head.ast.VariableDeclaration", "com.google.javascript.rhino.head.ast.Symbol", "com.google.javascript.rhino.head.ast.ObjectLiteral", "com.google.javascript.rhino.head.ast.VariableInitializer", "com.google.javascript.rhino.head.Node$PropListItem", "com.google.javascript.rhino.head.AttachJsDocs$NodePos", "com.google.javascript.jscomp.parsing.JsDocInfoParser", "com.google.javascript.jscomp.parsing.JsDocTokenStream", "com.google.javascript.jscomp.parsing.JsDocInfoParser$ErrorReporterParser", "com.google.javascript.rhino.JSDocInfoBuilder", "com.google.javascript.jscomp.parsing.JsDocInfoParser$State", "com.google.javascript.jscomp.parsing.JsDocToken", "com.google.javascript.jscomp.parsing.JsDocInfoParser$1", "com.google.javascript.rhino.JSDocInfo$Visibility", "com.google.common.collect.Count", "com.google.common.collect.AbstractMapBasedMultimap$WrappedCollection", "com.google.common.collect.AbstractMapBasedMultimap$WrappedList", "com.google.common.collect.AbstractMapBasedMultimap$RandomAccessWrappedList", "com.google.javascript.jscomp.GatherRawExports", "com.google.javascript.jscomp.Denormalize", "com.google.javascript.jscomp.ForbiddenChange", "com.google.javascript.jscomp.GroupVariableDeclarations", "com.google.javascript.jscomp.ReplaceMessages", "com.google.javascript.jscomp.DeadAssignmentsElimination$1", "com.google.javascript.jscomp.DeadAssignmentsElimination", "com.google.javascript.jscomp.CheckMissingGetCssName", "com.google.common.collect.TreeTraverser", "com.google.common.io.Files$2", "com.google.common.io.Files", "com.google.common.io.ByteSource", "com.google.common.io.Files$FileByteSource", "com.google.common.io.CharSource", "com.google.common.io.ByteSource$AsCharSource", "com.google.common.io.Closer$SuppressingSuppressor", "com.google.common.io.Closer", "com.google.common.base.Throwables", "com.google.javascript.jscomp.NodeTraversal$AbstractPreOrderCallback", "com.google.javascript.jscomp.NodeTraversal$1", "com.google.javascript.jscomp.CallGraph", "com.google.javascript.jscomp.GoogleCodingConvention", "com.google.javascript.jscomp.Compiler$7", "com.google.common.collect.RegularImmutableBiMap", "com.google.javascript.rhino.head.ast.ErrorNode", "com.google.javascript.jscomp.CollapseProperties", "com.google.javascript.jscomp.GlobalNamespace$Name$Type", "com.google.javascript.jscomp.ExternExportsPass", "com.google.javascript.jscomp.AngularPass", "com.google.javascript.jscomp.WhitelistWarningsGuard$WhitelistBuilder", "com.google.javascript.jscomp.SourceMap$LocationMapping", "com.google.javascript.jscomp.CheckSideEffects$StripProtection", "com.google.javascript.jscomp.FindExportableNodes", "com.google.javascript.rhino.Node$SideEffectFlags", "com.google.javascript.rhino.head.ast.Label", "com.google.javascript.rhino.head.ast.LabeledStatement", "com.google.javascript.jscomp.SourceInformationAnnotator", "com.google.common.collect.RegularImmutableSortedSet", "com.google.common.collect.RegularImmutableSortedMap", "com.google.javascript.jscomp.ReplaceCssNames", "com.google.javascript.rhino.head.ast.ArrayLiteral", "com.google.javascript.jscomp.Compiler$9", "com.google.javascript.jscomp.RecordFunctionInformation", "com.google.protobuf.AbstractMessageLite", "com.google.protobuf.AbstractMessage", "com.google.protobuf.GeneratedMessage", "com.google.protobuf.UnknownFieldSet", "com.google.javascript.jscomp.FunctionInformationMap", "com.google.protobuf.AbstractMessageLite$Builder", "com.google.protobuf.AbstractMessage$Builder", "com.google.protobuf.GeneratedMessage$Builder", "com.google.javascript.jscomp.FunctionInformationMap$Builder", "com.google.javascript.jscomp.ClosureRewriteClass", "com.google.javascript.jscomp.CombinedCompilerPass", "com.google.javascript.jscomp.NameAnalyzer$1", "com.google.javascript.jscomp.NameAnalyzer", "com.google.javascript.jscomp.NameGenerator", "com.google.javascript.jscomp.NameGenerator$CharPriority", "com.google.common.primitives.Chars", "com.google.common.primitives.Chars$CharArrayAsList", "com.google.javascript.jscomp.GatherCharacterEncodingBias", "com.google.javascript.jscomp.Denormalize$StripConstantAnnotations", "com.google.javascript.jscomp.MethodCompilerPass", "com.google.javascript.jscomp.InlineSimpleMethods$1", "com.google.javascript.jscomp.InlineSimpleMethods", "com.google.javascript.jscomp.InvocationsCallback", "com.google.javascript.jscomp.InlineSimpleMethods$InlineTrivialAccessors", "com.google.javascript.jscomp.NameReferenceGraph", "com.google.javascript.jscomp.NameReferenceGraph$Name", "com.google.javascript.jscomp.graph.LinkedDirectedGraph$LinkedDirectedGraphNode", "com.google.javascript.jscomp.graph.LinkedDirectedGraph$AnnotatedLinkedDirectedGraphNode", "com.google.javascript.jscomp.FlowSensitiveInlineVariables$1", "com.google.javascript.jscomp.FlowSensitiveInlineVariables", "com.google.javascript.jscomp.MoveFunctionDeclarations", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter$1", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter$2", "com.google.javascript.jscomp.type.SemanticReverseAbstractInterpreter$5", "com.google.javascript.jscomp.ExpandJqueryAliases", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter$RestrictByTypeOfResultVisitor", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter$RestrictByTrueTypeOfResultVisitor", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$1", "com.google.javascript.jscomp.type.ChainableReverseAbstractInterpreter$RestrictByFalseTypeOfResultVisitor", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$2", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$3", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$4", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$13", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$12", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$11", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$10", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$9", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$8", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$7", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$6", "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$5", "com.google.common.collect.Iterables", "com.google.common.collect.FluentIterable", "com.google.common.collect.Iterables$2", "com.google.common.collect.TransformedIterator", "com.google.common.collect.Iterables$3", "com.google.common.collect.Iterators$5", "com.google.javascript.jscomp.graph.LinkedDirectedGraph$LinkedDirectedGraphEdge", "com.google.javascript.jscomp.GoogleJsMessageIdGenerator", "com.google.javascript.jscomp.ReplaceMessagesForChrome", "com.google.common.base.Splitter", "com.google.common.base.Splitter$2", "com.google.javascript.jscomp.WhitelistWarningsGuard", "com.google.common.io.LineReader", "com.google.common.io.LineBuffer", "com.google.common.io.LineReader$1", "com.google.javascript.jscomp.EmptyMessageBundle", "com.google.javascript.jscomp.OptimizeArgumentsArray", "com.google.common.base.Splitter$3", "com.google.common.io.CharSource$CharSequenceCharSource", "com.google.common.io.CharSource$ConcatenatedCharSource", "com.google.common.io.MultiReader", "com.google.common.io.CharSequenceReader", "com.google.javascript.rhino.head.ast.KeywordLiteral", "com.google.javascript.jscomp.Normalize$VerifyConstants", "com.google.javascript.jscomp.VariableMap", "com.google.common.collect.EmptyImmutableSetMultimap", "com.google.javascript.jscomp.AliasStrings", "com.google.javascript.jscomp.ReferenceCollectingCallback$BasicBlock", "com.google.javascript.jscomp.ControlFlowGraph", "com.google.javascript.jscomp.ControlFlowAnalysis$AstControlFlowGraph", "com.google.javascript.jscomp.ConvertToDottedProperties", "com.google.common.collect.AbstractIterator", "com.google.common.collect.Iterators$7", "com.google.common.collect.AbstractIterator$State", "com.google.javascript.jscomp.Scope$Var", "com.google.javascript.jscomp.Scope$Arguments", "com.google.javascript.jscomp.NodeUtil$MatchNodeType", "com.google.common.base.Predicates$OrPredicate", "com.google.javascript.jscomp.FileInstrumentationData", "com.google.javascript.jscomp.BitField", "com.google.javascript.jscomp.DisambiguateProperties", "com.google.javascript.jscomp.DisambiguateProperties$JSTypeSystem", "com.google.javascript.rhino.head.ast.RegExpLiteral", "com.google.common.collect.ImmutableList$ReverseImmutableList", "com.google.javascript.jscomp.RemoveUnusedClassProperties", "com.google.javascript.rhino.jstype.NamedType", "com.google.javascript.jscomp.CombinedCompilerPass$CallbackWrapper", "com.google.common.base.Splitter$5", "com.google.common.base.AbstractIterator", "com.google.common.base.Splitter$SplittingIterator", "com.google.common.base.Splitter$3$1", "com.google.common.base.AbstractIterator$State", "com.google.common.base.AbstractIterator$1", "com.google.javascript.jscomp.FunctionRewriter$Reducer", "com.google.javascript.jscomp.FunctionRewriter$SingleReturnStatementReducer", "com.google.javascript.jscomp.FunctionRewriter$ReturnConstantReducer", "com.google.javascript.jscomp.FunctionRewriter$GetterReducer", "com.google.javascript.jscomp.FunctionRewriter$SetterReducer", "com.google.javascript.jscomp.FunctionRewriter$EmptyFunctionReducer", "com.google.javascript.jscomp.FunctionRewriter$IdentityReducer", "com.google.javascript.jscomp.FunctionRewriter$ReductionGatherer", "com.google.javascript.rhino.jstype.SimpleReference", "com.google.javascript.jscomp.PreprocessorSymbolTable$Reference", "com.google.javascript.rhino.jstype.TernaryValue", "com.google.common.collect.LinkedListMultimap", "com.google.common.collect.LinkedListMultimap$3", "com.google.common.collect.LinkedListMultimap$NodeIterator", "com.google.common.collect.TransformedListIterator", "com.google.common.collect.LinkedListMultimap$3$1", "com.google.common.collect.ImmutableList$1", "com.google.javascript.rhino.head.ast.EmptyExpression", "com.google.common.collect.SingletonImmutableBiMap", "com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallback$GetReplacementSideEffectSubexpressions", "com.google.javascript.jscomp.GatherSideEffectSubexpressionsCallback", "com.google.javascript.jscomp.NameAnonymousFunctions", "com.google.javascript.jscomp.AnonymousFunctionNamingCallback", "com.google.javascript.jscomp.NameAnonymousFunctions$AnonymousFunctionNamer", "com.google.javascript.jscomp.NodeNameExtractor", "com.google.common.collect.ComparatorOrdering", "com.google.javascript.jscomp.AnalyzeNameReferences", "com.google.javascript.jscomp.PhaseOptimizer$Loop", "com.google.javascript.jscomp.PhaseOptimizer$NamedPass", "com.google.javascript.jscomp.DefaultPassConfig$106", "com.google.javascript.jscomp.FunctionNames", "com.google.javascript.jscomp.FunctionNames$FunctionListExtractor", "com.google.javascript.jscomp.RenameLabels", "com.google.javascript.jscomp.RenameLabels$DefaultNameSupplier", "com.google.javascript.jscomp.RenameLabels$ProcessLabels", "com.google.javascript.jscomp.RenameLabels$LabelNamespace", "com.google.javascript.jscomp.GlobalNamespace$Name", "com.google.javascript.jscomp.XtbMessageBundle$SecureEntityResolver", "com.google.javascript.jscomp.XtbMessageBundle", "com.google.javascript.jscomp.XtbMessageBundle$Handler", "com.google.javascript.jscomp.CrossModuleCodeMotion", "com.google.javascript.jscomp.ReplaceStrings$1", "com.google.javascript.jscomp.ReplaceStrings", "com.google.javascript.jscomp.GlobalNamespace$AstChange", "com.google.javascript.jscomp.CheckEventfulObjectDisposal$DisposalCheckingPolicy", "com.google.javascript.jscomp.ErrorFormat", "com.google.javascript.rhino.SourcePosition", "com.google.javascript.jscomp.ScopedAliases$Traversal$1" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
dcee0291554ff45645fdfb24c1f6a0e9129524a1
0b58d5c4f01ce8d57be8663fe3842c3d69f74b15
/app/src/main/java/com/tasomaniac/muzei/tvshows/ui/SettingsActivity.java
c19950fe9a7178b9e4f8162ada901f995ea6a8f5
[ "Apache-2.0" ]
permissive
tasomaniac/MuzeiTVShows
da065f3c5ac0cc80ebc2ffec5543d0cd4b312187
efbf2ff463cef8ca19bfa11e8ca355e1c69a2509
refs/heads/master
2016-08-08T03:17:49.658282
2016-02-14T21:51:38
2016-02-14T21:51:38
39,311,816
5
1
null
null
null
null
UTF-8
Java
false
false
1,378
java
package com.tasomaniac.muzei.tvshows.ui; import android.os.Bundle; import android.support.design.widget.CollapsingToolbarLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import com.tasomaniac.muzei.tvshows.R; public class SettingsActivity extends AppCompatActivity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setNavigationIcon(R.drawable.ic_action_done); toolbar.setNavigationContentDescription(R.string.done); setSupportActionBar(toolbar); CollapsingToolbarLayout collapsingToolbar = (CollapsingToolbarLayout) findViewById(R.id.collapsing_toolbar); collapsingToolbar.setTitle(getTitle()); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.fragment_container, new SettingsFragment()) .commit(); } } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish(); return true; } return super.onOptionsItemSelected(item); } }
[ "tasomaniac@gmail.com" ]
tasomaniac@gmail.com
447de6390077076a6327c92cec8b27612792efa0
5e38017e1fcb4b69614f0a72f018cf3b960d9246
/org/omg/DynamicAny/_DynSequenceStub.java
0baf4afc18775d304e4129560b34f807b73b3549
[]
no_license
leeon/annotated-jdk
bea64a10ed766faa5fd0792d7dd0d3de815e6678
4703f5e51cb2fcffe219ffa15e64215fb19c66c7
refs/heads/master
2021-01-13T02:40:11.648169
2014-03-10T14:18:55
2014-03-10T14:18:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
50,619
java
package org.omg.DynamicAny; /** * org/omg/DynamicAny/_DynSequenceStub.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/DynamicAny/DynamicAny.idl * Monday, June 27, 2011 2:16:34 AM PDT */ /** * DynSequence objects support the manipulation of IDL sequences. */ public class _DynSequenceStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.DynamicAny.DynSequence { final public static java.lang.Class _opsClass = DynSequenceOperations.class; /** * Returns the current length of the sequence. */ public int get_length () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_length", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_length (); } finally { _servant_postinvoke ($so); } } // get_length /** * Sets the length of the sequence. * Increasing the length of a sequence adds new elements at the tail without affecting the values * of already existing elements. Newly added elements are default-initialized. * Increasing the length of a sequence sets the current position to the first newly-added element * if the previous current position was -1. Otherwise, if the previous current position was not -1, * the current position is not affected. * Decreasing the length of a sequence removes elements from the tail without affecting the value * of those elements that remain. The new current position after decreasing the length of a sequence * is determined as follows: * <UL> * <LI>If the length of the sequence is set to zero, the current position is set to -1. * <LI>If the current position is -1 before decreasing the length, it remains at -1. * <LI>If the current position indicates a valid element and that element is not removed when the length * is decreased, the current position remains unaffected. * <LI>If the current position indicates a valid element and that element is removed, * the current position is set to -1. * </UL> * * @exception InvalidValue if this is a bounded sequence and len is larger than the bound */ public void set_length (int len) throws org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_length", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.set_length (len); } finally { _servant_postinvoke ($so); } } // set_length /** * Returns the elements of the sequence. */ public org.omg.CORBA.Any[] get_elements () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_elements", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_elements (); } finally { _servant_postinvoke ($so); } } // get_elements /** * Sets the elements of a sequence. * The length of the DynSequence is set to the length of value. The current position is set to zero * if value has non-zero length and to -1 if value is a zero-length sequence. * * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent * to the element TypeCode of the DynSequence * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence */ public void set_elements (org.omg.CORBA.Any[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_elements", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.set_elements (value); } finally { _servant_postinvoke ($so); } } // set_elements /** * Returns the DynAnys representing the elements of the sequence. */ public org.omg.DynamicAny.DynAny[] get_elements_as_dyn_any () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_elements_as_dyn_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_elements_as_dyn_any (); } finally { _servant_postinvoke ($so); } } // get_elements_as_dyn_any /** * Sets the elements of a sequence using DynAnys. * The length of the DynSequence is set to the length of value. The current position is set to zero * if value has non-zero length and to -1 if value is a zero-length sequence. * * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent * to the element TypeCode of the DynSequence * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence */ public void set_elements_as_dyn_any (org.omg.DynamicAny.DynAny[] value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("set_elements_as_dyn_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.set_elements_as_dyn_any (value); } finally { _servant_postinvoke ($so); } } // set_elements_as_dyn_any /** * Returns the TypeCode associated with this DynAny object. * A DynAny object is created with a TypeCode value assigned to it. * This TypeCode value determines the type of the value handled through the DynAny object. * Note that the TypeCode associated with a DynAny object is initialized at the time the * DynAny is created and cannot be changed during lifetime of the DynAny object. * * @return The TypeCode associated with this DynAny object */ public org.omg.CORBA.TypeCode type () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("type", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.type (); } finally { _servant_postinvoke ($so); } } // type /** * Initializes the value associated with a DynAny object with the value * associated with another DynAny object. * The current position of the target DynAny is set to zero for values that have components * and to -1 for values that do not have components. * * @param dyn_any * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny */ public void assign (org.omg.DynamicAny.DynAny dyn_any) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("assign", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.assign (dyn_any); } finally { _servant_postinvoke ($so); } } // assign /** * Initializes the value associated with a DynAny object with the value contained in an any. * The current position of the target DynAny is set to zero for values that have components * and to -1 for values that do not have components. * * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string) */ public void from_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("from_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.from_any (value); } finally { _servant_postinvoke ($so); } } // from_any /** * Creates an any value from a DynAny object. * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any. * The value associated with the DynAny object is copied into the any. * * @return a new Any object with the same value and TypeCode */ public org.omg.CORBA.Any to_any () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("to_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.to_any (); } finally { _servant_postinvoke ($so); } } // to_any /** * Compares two DynAny values for equality. * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys * have equal values. * The current position of the two DynAnys being compared has no effect on the result of equal. * * @return true of the DynAnys are equal, false otherwise */ public boolean equal (org.omg.DynamicAny.DynAny dyn_any) { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("equal", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.equal (dyn_any); } finally { _servant_postinvoke ($so); } } // equal /** * Destroys a DynAny object. * This operation frees any resources used to represent the data value associated with a DynAny object. * It must be invoked on references obtained from one of the creation operations on the ORB interface * or on a reference returned by DynAny.copy() to avoid resource leaks. * Invoking destroy on component DynAny objects (for example, on objects returned by the * current_component operation) does nothing. * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it. * That is, references to components of a destroyed DynAny become invalid. * Invocations on such references raise OBJECT_NOT_EXIST. * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny * from which the component was obtained by making a copy of the component with the copy operation * before destroying the DynAny from which the component was obtained. */ public void destroy () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("destroy", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.destroy (); } finally { _servant_postinvoke ($so); } } // destroy /** * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked. * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny, * such as DynStruct, creates the derived type but returns its reference as the DynAny base type. * * @return a deep copy of the DynAny object */ public org.omg.DynamicAny.DynAny copy () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("copy", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.copy (); } finally { _servant_postinvoke ($so); } } // copy /** * Inserts a boolean value into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_boolean (boolean value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_boolean", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_boolean (value); } finally { _servant_postinvoke ($so); } } // insert_boolean /** * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_octet (byte value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_octet", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_octet (value); } finally { _servant_postinvoke ($so); } } // insert_octet /** * Inserts a char value into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_char (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_char", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_char (value); } finally { _servant_postinvoke ($so); } } // insert_char /** * Inserts a short value into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_short (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_short", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_short (value); } finally { _servant_postinvoke ($so); } } // insert_short /** * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_ushort (short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ushort", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_ushort (value); } finally { _servant_postinvoke ($so); } } // insert_ushort /** * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_long (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_long", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_long (value); } finally { _servant_postinvoke ($so); } } // insert_long /** * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_ulong (int value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ulong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_ulong (value); } finally { _servant_postinvoke ($so); } } // insert_ulong /** * Inserts a float value into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_float (float value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_float", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_float (value); } finally { _servant_postinvoke ($so); } } // insert_float /** * Inserts a double value into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_double (double value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_double", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_double (value); } finally { _servant_postinvoke ($so); } } // insert_double /** * Inserts a string value into the DynAny. * Both bounded and unbounded strings are inserted using this method. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception InvalidValue if the string inserted is longer than the bound of a bounded string * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_string (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_string", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_string (value); } finally { _servant_postinvoke ($so); } } // insert_string /** * Inserts a reference to a CORBA object into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_reference (org.omg.CORBA.Object value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_reference", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_reference (value); } finally { _servant_postinvoke ($so); } } // insert_reference /** * Inserts a TypeCode object into the DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_typecode (org.omg.CORBA.TypeCode value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_typecode", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_typecode (value); } finally { _servant_postinvoke ($so); } } // insert_typecode /** * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_longlong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_longlong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_longlong (value); } finally { _servant_postinvoke ($so); } } // insert_longlong /** * Inserts a long value into the DynAny. * The IDL unsigned long long data type is mapped to the Java long data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_ulonglong (long value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_ulonglong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_ulonglong (value); } finally { _servant_postinvoke ($so); } } // insert_ulonglong /** * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_wchar (char value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_wchar", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_wchar (value); } finally { _servant_postinvoke ($so); } } // insert_wchar /** * Inserts a string value into the DynAny. * Both bounded and unbounded strings are inserted using this method. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception InvalidValue if the string inserted is longer than the bound of a bounded string */ public void insert_wstring (String value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_wstring", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_wstring (value); } finally { _servant_postinvoke ($so); } } // insert_wstring /** * Inserts an Any value into the Any represented by this DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_any (org.omg.CORBA.Any value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_any (value); } finally { _servant_postinvoke ($so); } } // insert_any /** * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_dyn_any (org.omg.DynamicAny.DynAny value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_dyn_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_dyn_any (value); } finally { _servant_postinvoke ($so); } } // insert_dyn_any /** * Inserts a reference to a Serializable object into this DynAny. * The IDL ValueBase type is mapped to the Java Serializable type. * * @exception InvalidValue if this DynAny has components but has a current position of -1 * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public void insert_val (java.io.Serializable value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("insert_val", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.insert_val (value); } finally { _servant_postinvoke ($so); } } // insert_val /** * Extracts the boolean value from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public boolean get_boolean () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_boolean", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_boolean (); } finally { _servant_postinvoke ($so); } } // get_boolean /** * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public byte get_octet () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_octet", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_octet (); } finally { _servant_postinvoke ($so); } } // get_octet /** * Extracts the char value from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public char get_char () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_char", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_char (); } finally { _servant_postinvoke ($so); } } // get_char /** * Extracts the short value from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public short get_short () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_short", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_short (); } finally { _servant_postinvoke ($so); } } // get_short /** * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public short get_ushort () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ushort", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_ushort (); } finally { _servant_postinvoke ($so); } } // get_ushort /** * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public int get_long () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_long", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_long (); } finally { _servant_postinvoke ($so); } } // get_long /** * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public int get_ulong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ulong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_ulong (); } finally { _servant_postinvoke ($so); } } // get_ulong /** * Extracts the float value from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public float get_float () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_float", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_float (); } finally { _servant_postinvoke ($so); } } // get_float /** * Extracts the double value from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public double get_double () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_double", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_double (); } finally { _servant_postinvoke ($so); } } // get_double /** * Extracts the string value from this DynAny. * Both bounded and unbounded strings are extracted using this method. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public String get_string () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_string", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_string (); } finally { _servant_postinvoke ($so); } } // get_string /** * Extracts the reference to a CORBA Object from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public org.omg.CORBA.Object get_reference () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_reference", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_reference (); } finally { _servant_postinvoke ($so); } } // get_reference /** * Extracts the TypeCode object from this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public org.omg.CORBA.TypeCode get_typecode () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_typecode", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_typecode (); } finally { _servant_postinvoke ($so); } } // get_typecode /** * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public long get_longlong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_longlong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_longlong (); } finally { _servant_postinvoke ($so); } } // get_longlong /** * Extracts the long value from this DynAny. * The IDL unsigned long long data type is mapped to the Java long data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public long get_ulonglong () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_ulonglong", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_ulonglong (); } finally { _servant_postinvoke ($so); } } // get_ulonglong /** * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public char get_wchar () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_wchar", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_wchar (); } finally { _servant_postinvoke ($so); } } // get_wchar /** * Extracts the string value from this DynAny. * Both bounded and unbounded strings are extracted using this method. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components */ public String get_wstring () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_wstring", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_wstring (); } finally { _servant_postinvoke ($so); } } // get_wstring /** * Extracts an Any value contained in the Any represented by this DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public org.omg.CORBA.Any get_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_any (); } finally { _servant_postinvoke ($so); } } // get_any /** * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped * into a new DynAny. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public org.omg.DynamicAny.DynAny get_dyn_any () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_dyn_any", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_dyn_any (); } finally { _servant_postinvoke ($so); } } // get_dyn_any /** * Extracts a Serializable object from this DynAny. * The IDL ValueBase type is mapped to the Java Serializable type. * * @exception TypeMismatch if the accessed component in the DynAny is of a type * that is not equivalent to the requested type. * @exception TypeMismatch if called on a DynAny whose current component itself has components * @exception InvalidValue if this DynAny has components but has a current position of -1 */ public java.io.Serializable get_val () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("get_val", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.get_val (); } finally { _servant_postinvoke ($so); } } // get_val /** * Sets the current position to index. The current position is indexed 0 to n-1, that is, * index zero corresponds to the first component. The operation returns true if the resulting * current position indicates a component of the DynAny and false if index indicates * a position that does not correspond to a component. * Calling seek with a negative index is legal. It sets the current position to -1 to indicate * no component and returns false. Passing a non-negative index value for a DynAny that does not * have a component at the corresponding position sets the current position to -1 and returns false. */ public boolean seek (int index) { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("seek", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.seek (index); } finally { _servant_postinvoke ($so); } } // seek /** * Is equivalent to seek(0). */ public void rewind () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("rewind", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { $self.rewind (); } finally { _servant_postinvoke ($so); } } // rewind /** * Advances the current position to the next component. * The operation returns true while the resulting current position indicates a component, false otherwise. * A false return value leaves the current position at -1. * Invoking next on a DynAny without components leaves the current position at -1 and returns false. */ public boolean next () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("next", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.next (); } finally { _servant_postinvoke ($so); } } // next /** * Returns the number of components of a DynAny. * For a DynAny without components, it returns zero. * The operation only counts the components at the top level. * For example, if component_count is invoked on a DynStruct with a single member, * the return value is 1, irrespective of the type of the member. * <UL> * <LI>For sequences, the operation returns the current number of elements. * <LI>For structures, exceptions, and value types, the operation returns the number of members. * <LI>For arrays, the operation returns the number of elements. * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active, * otherwise, it returns 1. * <LI>For DynFixed and DynEnum, the operation returns zero. * </UL> */ public int component_count () { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("component_count", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.component_count (); } finally { _servant_postinvoke ($so); } } // component_count /** * Returns the DynAny for the component at the current position. * It does not advance the current position, so repeated calls to current_component * without an intervening call to rewind, next, or seek return the same component. * The returned DynAny object reference can be used to get/set the value of the current component. * If the current component represents a complex type, the returned reference can be narrowed * based on the TypeCode to get the interface corresponding to the to the complex type. * Calling current_component on a DynAny that cannot have components, * such as a DynEnum or an empty exception, raises TypeMismatch. * Calling current_component on a DynAny whose current position is -1 returns a nil reference. * The iteration operations, together with current_component, can be used * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct, * current_component and next can be used to initialize all the components of the value. * Once the dynamic value is completely initialized, to_any creates the corresponding any value. * * @exception TypeMismatch If called on a DynAny that cannot have components, * such as a DynEnum or an empty exception */ public org.omg.DynamicAny.DynAny current_component () throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch { org.omg.CORBA.portable.ServantObject $so = _servant_preinvoke ("current_component", _opsClass); DynSequenceOperations $self = (DynSequenceOperations) $so.servant; try { return $self.current_component (); } finally { _servant_postinvoke ($so); } } // current_component // Type-specific CORBA::Object operations private static String[] __ids = { "IDL:omg.org/DynamicAny/DynSequence:1.0", "IDL:omg.org/DynamicAny/DynAny:1.0"}; public String[] _ids () { return (String[])__ids.clone (); } private void readObject (java.io.ObjectInputStream s) throws java.io.IOException { String str = s.readUTF (); String[] args = null; java.util.Properties props = null; org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate (); _set_delegate (delegate); } private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException { String[] args = null; java.util.Properties props = null; String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); s.writeUTF (str); } } // class _DynSequenceStub
[ "leeon.ly@foxmail.com" ]
leeon.ly@foxmail.com
6c1f6c1a240478ac5a1bd2b59a9708b83afa4c8b
363a26167be723be18b6aee917e5996a18a1fe1d
/backend/src/main/java/de/neuefische/saildog/service/RouteService.java
8b55d3b3861999130f82830a8a02da3965d85a86
[]
no_license
LennartSchwier/saildog
f00e3de090b8984bfad89d5571d5f0c7fd71a598
f384be6d70bf981e2e9d36f18904b4b03b10155b
refs/heads/main
2023-02-01T03:17:55.359021
2020-12-14T16:36:13
2020-12-14T16:36:13
311,796,641
1
0
null
2020-12-14T16:36:14
2020-11-10T22:09:42
Java
UTF-8
Java
false
false
2,980
java
package de.neuefische.saildog.service; import de.neuefische.saildog.dao.RouteDao; import de.neuefische.saildog.dto.LegDto; import de.neuefische.saildog.dto.RouteDto; import de.neuefische.saildog.enums.TypeOfWaypoint; import de.neuefische.saildog.model.Leg; import de.neuefische.saildog.model.Route; import de.neuefische.saildog.model.Waypoint; import de.neuefische.saildog.utils.RouteUtils; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.server.ResponseStatusException; import java.util.List; import java.util.stream.Collectors; @Service public class RouteService { private final RouteDao routeDao; private final RouteUtils routeUtils; public RouteService(RouteDao routeDao, RouteUtils routeUtils) { this.routeDao = routeDao; this.routeUtils = routeUtils; } public List<Route> getRoutesByCreator(String creator) { return routeDao.findAllByCreator(creator); } public Route addNewRoute(RouteDto routeToAdd, String creator) { Route newRoute = Route.builder() .routeId(routeUtils.createRandomId()) .routeName(routeToAdd.getRouteName()) .creator(creator) .legs(createRouting(routeToAdd)) .totalDistance(calculateTotalDistance(routeToAdd)) .build(); routeDao.save(newRoute); return newRoute; } public List<Leg> createRouting(RouteDto routeToCreate) { return routeToCreate.getLegs().stream() .map(this::createLeg) .collect(Collectors.toList()); } public double calculateTotalDistance(RouteDto totalRoute) { double totalDistance = createRouting(totalRoute).stream() .map(Leg::getDistance) .reduce(0.00, Double::sum); return Math.round(totalDistance * 100.0) / 100.0; } public Leg createLeg(LegDto legToCreate) { Waypoint startWaypoint = new Waypoint(TypeOfWaypoint.START, legToCreate.getStartLatitude(), legToCreate.getStartLongitude()); Waypoint endWaypoint = new Waypoint(TypeOfWaypoint.END, legToCreate.getEndLatitude(), legToCreate.getEndLongitude()); return Leg.builder() .legId(routeUtils.createRandomId()) .startWaypoint(startWaypoint) .endWaypoint(endWaypoint) .distance(routeUtils.calculateDistance(startWaypoint, endWaypoint)) .bearing(routeUtils.calculateBearing(startWaypoint, endWaypoint)) .build(); } public void deleteRoute(String routeId, String creator) { Route routeToDelete = routeDao.findById(routeId).orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND)); if (!routeToDelete.getCreator().equals(creator)) { throw new ResponseStatusException(HttpStatus.FORBIDDEN); } routeDao.deleteById(routeId); } }
[ "lennart.schwier@icloud.com" ]
lennart.schwier@icloud.com
ee090459e4c074154b8c3f4219a70a79b431b20f
00f9bfc3bda11e828dfee5796c811a36f3ccd617
/7.0.0-alpha03/com.android.tools.build/gradle/com/android/build/gradle/internal/plugins/DynamicFeaturePlugin.java
f781d87e72fc1bbee29cb93e4fe156e2ac5361e5
[ "Apache-2.0" ]
permissive
NirvanaNimbusa/agp-sources
c2fa758f27a628121c60a770ff046c1860cd4177
2b16dd9e08744d6e4f011fa5d0c550530c6a2c0e
refs/heads/master
2023-02-17T22:11:45.787321
2021-01-19T22:06:09
2021-01-19T22:10:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,166
java
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.build.gradle.internal.plugins; import com.android.AndroidProjectTypes; import com.android.annotations.NonNull; import com.android.build.api.component.impl.TestComponentBuilderImpl; import com.android.build.api.component.impl.TestComponentImpl; import com.android.build.api.extension.DynamicFeatureAndroidComponentsExtension; import com.android.build.api.extension.impl.DynamicFeatureAndroidComponentsExtensionImpl; import com.android.build.api.extension.impl.VariantApiOperationsRegistrar; import com.android.build.api.variant.impl.DynamicFeatureVariantBuilderImpl; import com.android.build.api.variant.impl.DynamicFeatureVariantImpl; import com.android.build.gradle.BaseExtension; import com.android.build.gradle.api.BaseVariantOutput; import com.android.build.gradle.internal.ExtraModelInfo; import com.android.build.gradle.internal.dsl.BuildType; import com.android.build.gradle.internal.dsl.DefaultConfig; import com.android.build.gradle.internal.dsl.DynamicFeatureExtension; import com.android.build.gradle.internal.dsl.DynamicFeatureExtensionImpl; import com.android.build.gradle.internal.dsl.ProductFlavor; import com.android.build.gradle.internal.dsl.SigningConfig; import com.android.build.gradle.internal.scope.GlobalScope; import com.android.build.gradle.internal.services.DslServices; import com.android.build.gradle.internal.services.ProjectServices; import com.android.build.gradle.internal.tasks.DynamicFeatureTaskManager; import com.android.build.gradle.internal.variant.ComponentInfo; import com.android.build.gradle.internal.variant.DynamicFeatureVariantFactory; import com.android.build.gradle.options.BooleanOption; import com.android.builder.model.v2.ide.ProjectType; import com.google.wireless.android.sdk.stats.GradleBuildProject; import java.util.List; import javax.inject.Inject; import org.gradle.api.NamedDomainObjectContainer; import org.gradle.api.Project; import org.gradle.api.component.SoftwareComponentFactory; import org.gradle.build.event.BuildEventsListenerRegistry; import org.gradle.tooling.provider.model.ToolingModelBuilderRegistry; /** Gradle plugin class for 'application' projects, applied on an optional APK module */ public class DynamicFeaturePlugin extends AbstractAppPlugin< DynamicFeatureAndroidComponentsExtension, DynamicFeatureVariantBuilderImpl, DynamicFeatureVariantImpl> { @Inject public DynamicFeaturePlugin( ToolingModelBuilderRegistry registry, SoftwareComponentFactory componentFactory, BuildEventsListenerRegistry listenerRegistry) { super(registry, componentFactory, listenerRegistry); } @Override protected int getProjectType() { return AndroidProjectTypes.PROJECT_TYPE_DYNAMIC_FEATURE; } @Override protected ProjectType getProjectTypeV2() { return ProjectType.DYNAMIC_FEATURE; } @NonNull @Override protected GradleBuildProject.PluginType getAnalyticsPluginType() { return GradleBuildProject.PluginType.DYNAMIC_FEATURE; } @Override protected void pluginSpecificApply(@NonNull Project project) { // do nothing } @NonNull @Override protected BaseExtension createExtension( @NonNull DslServices dslServices, @NonNull GlobalScope globalScope, @NonNull DslContainerProvider<DefaultConfig, BuildType, ProductFlavor, SigningConfig> dslContainers, @NonNull NamedDomainObjectContainer<BaseVariantOutput> buildOutputs, @NonNull ExtraModelInfo extraModelInfo) { if (globalScope.getProjectOptions().get(BooleanOption.USE_NEW_DSL_INTERFACES)) { return (BaseExtension) project.getExtensions() .create( com.android.build.api.dsl.DynamicFeatureExtension.class, "android", DynamicFeatureExtension.class, dslServices, globalScope, buildOutputs, dslContainers.getSourceSetManager(), extraModelInfo, new DynamicFeatureExtensionImpl(dslServices, dslContainers)); } return project.getExtensions() .create( "android", DynamicFeatureExtension.class, dslServices, globalScope, buildOutputs, dslContainers.getSourceSetManager(), extraModelInfo, new DynamicFeatureExtensionImpl(dslServices, dslContainers)); } @NonNull @Override protected DynamicFeatureAndroidComponentsExtension createComponentExtension( @NonNull DslServices dslServices, @NonNull VariantApiOperationsRegistrar< DynamicFeatureVariantBuilderImpl, DynamicFeatureVariantImpl> variantApiOperationsRegistrar) { return project.getExtensions() .create( DynamicFeatureAndroidComponentsExtension.class, "androidComponents", DynamicFeatureAndroidComponentsExtensionImpl.class, dslServices, variantApiOperationsRegistrar); } @NonNull @Override protected DynamicFeatureTaskManager createTaskManager( @NonNull List<ComponentInfo<DynamicFeatureVariantBuilderImpl, DynamicFeatureVariantImpl>> variants, @NonNull List<ComponentInfo<TestComponentBuilderImpl, TestComponentImpl>> testComponents, boolean hasFlavors, @NonNull GlobalScope globalScope, @NonNull BaseExtension extension) { return new DynamicFeatureTaskManager( variants, testComponents, hasFlavors, globalScope, extension); } @NonNull @Override protected DynamicFeatureVariantFactory createVariantFactory( @NonNull ProjectServices projectServices, @NonNull GlobalScope globalScope) { return new DynamicFeatureVariantFactory(projectServices, globalScope); } }
[ "john.rodriguez@gmail.com" ]
john.rodriguez@gmail.com
de3da6e43784d54c348222783c256666fa11d04a
acd54b03f7f9d835d0e549ab9afdf4f9637e3c8f
/src/main/java/com/spring/mypham/DAOImpl/NhanVienDAOImpl.java
454b3cee9d2d98c327fb67a0cd72673b416816d6
[]
no_license
thanhliem-SE/website-shop-my-pham
1f0dd38a35bc57263ced0eaed32e1631d1b9cda5
5eff5c567d09baf32209d994476699c3d2cfdde4
refs/heads/main
2023-06-25T15:43:44.711515
2021-07-25T05:38:03
2021-07-25T05:38:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,577
java
package com.spring.mypham.DAOImpl; import java.util.ArrayList; import java.util.List; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.spring.mypham.DAO.MySessionFactory; import com.spring.mypham.DAO.NhanVienDAO; import com.spring.mypham.models.DiaChi; import com.spring.mypham.models.KhachHang; import com.spring.mypham.models.NhanVien; import com.spring.mypham.models.User; @Repository public class NhanVienDAOImpl implements NhanVienDAO{ @Autowired private SessionFactory sessionFactory; public NhanVienDAOImpl() { sessionFactory = MySessionFactory.getInstance().getSessionFactory(); } @Override public void saveNhanVien(NhanVien nv) { Session currentSession = sessionFactory.getCurrentSession(); Transaction tr = currentSession.beginTransaction(); currentSession.saveOrUpdate(nv); tr.commit(); } @Override public String isExistNhanVien(NhanVien nhanVien) { Session session = sessionFactory.getCurrentSession(); Transaction tr = session.beginTransaction(); try { String sql = "select email,soDienThoai,username from NhanVien"; @SuppressWarnings("unchecked") List<Object> objs = session.createNativeQuery(sql).getResultList(); for (Object arrayObj : objs) { Object[] obj = (Object[]) arrayObj; String email = obj[0].toString(); String soDienThoai = obj[1].toString(); String username = obj[2].toString(); if(nhanVien.getUser().getUsername().equals(username)) { return "Username Exist"; } if(nhanVien.getEmail().equals(email)) { return "Email Exist"; } if(nhanVien.getSoDienThoai().equals(soDienThoai)) { return "Phone Exist"; } } tr.commit(); } catch (Exception e) { e.printStackTrace(); } //nhanVien moi (Hop le) return "Ready"; } public ArrayList<NhanVien> getAllNhanVien() { ArrayList<NhanVien> listNV = new ArrayList<NhanVien>(); Session session = sessionFactory.getCurrentSession(); Transaction tr = session.beginTransaction(); try { String sql = "select * from NhanVien"; @SuppressWarnings("unchecked") List<Object> objs = session.createNativeQuery(sql).getResultList(); for (Object arrayObj : objs) { Object[] obj = (Object[]) arrayObj; NhanVien nv = new NhanVien(); User user = new User(); DiaChi dc = new DiaChi(); if(obj[0]!=null) nv.setMaNhanVien(Long.parseLong(obj[0].toString())); else nv.setMaNhanVien(0); if(obj[1]!=null) nv.setCMND(obj[1].toString()); else nv.setCMND("Chưa có"); if(obj[2]!=null) nv.setChucVu(obj[2].toString()); else nv.setChucVu("Chưa có"); if(obj[3]!=null) nv.setEmail(obj[3].toString()); else nv.setEmail("Chưa có"); if(obj[4]!=null) nv.setGioiTinh(obj[4].toString()); else nv.setGioiTinh("Chưa có"); if(obj[5]!=null) nv.setNamSinh(Integer.parseInt(obj[5].toString())); else nv.setNamSinh(0); if(obj[6]!=null) nv.setSoDienThoai(obj[6].toString()); else nv.setSoDienThoai("Chưa có"); if(obj[7]!=null) nv.setTenNhanVien(obj[7].toString()); else nv.setTenNhanVien("Chưa có"); if(obj[8]!=null) nv.setTrinhDoHocVan(obj[8].toString()); else nv.setTrinhDoHocVan("Chưa có"); if(obj[9]!=null) user.setUsername(obj[9].toString()); else user.setUsername("Chưa có"); nv.setUser(user); listNV.add(nv); } tr.commit(); } catch (Exception e) { e.printStackTrace(); } return listNV; } @Override public void updateNhanVien(NhanVien nhanVien) { // TODO Auto-generated method stub Session currentSession = sessionFactory.getCurrentSession(); Transaction tr = currentSession.beginTransaction(); // System.out.println("Make: "+nhanVien.toString()); // System.out.println("Make: "+nhanVien.getDiaChi().toString()); int role=2; if(nhanVien.getChucVu().equalsIgnoreCase("ADMIN")) role=2; if(nhanVien.getChucVu().equalsIgnoreCase("MANAGER")) role=3; try { String sql = "update NhanVien set tenNhanVien=?,soDienThoai=?,email=?,chucVu=?,CMND=?,gioiTinh=?,namSinh=?,trinhDoHocVan=? where username like ?"; currentSession.createNativeQuery(sql) .setParameter(1, nhanVien.getTenNhanVien()) .setParameter(2, nhanVien.getSoDienThoai()) .setParameter(3, nhanVien.getEmail()) .setParameter(4, nhanVien.getChucVu()) .setParameter(5, nhanVien.getCMND()) .setParameter(6, nhanVien.getGioiTinh()) .setParameter(7, nhanVien.getNamSinh()) .setParameter(8, nhanVien.getTrinhDoHocVan()) .setParameter(9, nhanVien.getUser().getUsername()) .executeUpdate(); sql = "update user_role set ROLE_ID=? where USER_ID like ?"; currentSession.createNativeQuery(sql) .setParameter(1, role) .setParameter(2, nhanVien.getUser().getUsername()) .executeUpdate(); tr.commit(); System.out.println("Update Thanh COng"); }catch (Exception e) { // TODO: handle exception System.out.println("Update Khong Thanh COng"); } } public void updateRole(NhanVien nhanVien) { Session currentSession = sessionFactory.getCurrentSession(); Transaction tr = currentSession.beginTransaction(); int role=2; if(nhanVien.getChucVu().equalsIgnoreCase("ADMIN")) role=2; if(nhanVien.getChucVu().equalsIgnoreCase("MANAGER")) role=3; try { String sql = "update user_role set ROLE_ID=? where USER_ID like ?"; currentSession.createNativeQuery(sql) .setParameter(1, role) .setParameter(2, nhanVien.getUser().getUsername()) .executeUpdate(); tr.commit(); } catch (Exception e) { // TODO: handle exception } } @Override public void deleteNhanVienByUserName(String username) { // TODO Auto-generated method stub Session currentSession = sessionFactory.getCurrentSession(); Transaction tr = currentSession.beginTransaction(); try { String sql = "delete user_role where USER_ID like ?"; currentSession.createNativeQuery(sql) .setParameter(1, username).executeUpdate(); sql = "delete NhanVien where username like ?"; currentSession.createNativeQuery(sql) .setParameter(1, username).executeUpdate(); sql = "delete users where username like ?"; currentSession.createNativeQuery(sql) .setParameter(1, username).executeUpdate(); tr.commit(); System.out.println("Delete Thanh COng"); }catch (Exception e) { // TODO: handle exception System.out.println("Delete Khong Thanh COng"); } } }
[ "66979358+onebabyq@users.noreply.github.com" ]
66979358+onebabyq@users.noreply.github.com
fc9456738bd62afaf9f8fa04c74f6f76b7976d51
a9f31c3cc98da944f9d252a5ff5a8b7b4620870c
/src/cn/map/demon4/CollectionsDemon.java
1f79d06b5c89382332fde6e5b7b0f3165fbd3d32
[]
no_license
yyb1369584682/JavaProject
8d434e339fbc18f373ef6d480bf18ed627a1d271
40b81bac8e926440069616bf86839975a82cbef9
refs/heads/master
2020-05-05T13:56:11.644977
2019-04-08T08:11:17
2019-04-08T08:11:17
180,100,061
0
0
null
null
null
null
UTF-8
Java
false
false
1,674
java
package cn.map.demon4; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; /* Collections */ public class CollectionsDemon { public static void main(String[] args) { function2(); } /* Collections.shuffle方法 对于List集合中的元素,进行随机排列 */ public static void function2(){ List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(5); list.add(8); list.add(12); list.add(45); list.add(67); System.out.println(list); Collections.shuffle(list); System.out.println(list); } /* Collections.binarySearch静态方法 对于List集合,进行二分搜索法排列 方法参数,传递List集合,传递被查找的元素 */ public static void function1(){ List<Integer> list = new ArrayList<Integer>(); list.add(1); list.add(5); list.add(8); list.add(12); list.add(45); list.add(67); int i = Collections.binarySearch(list, 13); System.out.println(i); } /* Collections.sort静态方法 对于List集合,进行升序排列 */ public static void function(){ //创建List集合 List<String> list = new ArrayList<>(); list.add("avd"); list.add("cdf"); list.add("ASA"); list.add("weqfgr"); list.add("dww"); list.add("RDFD"); System.out.println(list); //调用集合工具类的方法sort Collections.sort(list); System.out.println(list); } }
[ "1369584682@qq.com" ]
1369584682@qq.com
edcb1d5f2c70a7ee25cee4e7575d9c130e040081
6f73a0d38addee468dd21aba1d5d53963be84825
/application/src/test/java/org/mifos/application/fees/struts/actionforms/FeeActionFormTest.java
95f13d189d3ed0ffd210e37b26645d41ffd90ffb
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
mifos/1.4.x
0f157f74220e8e65cc13c4252bf597c80aade1fb
0540a4b398407b9415feca1f84b6533126d96511
refs/heads/master
2020-12-25T19:26:15.934566
2010-05-11T23:34:08
2010-05-11T23:34:08
2,946,607
0
0
null
null
null
null
UTF-8
Java
false
false
2,251
java
/* * Copyright (c) 2005-2009 Grameen Foundation USA * 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. * * See also http://www.apache.org/licenses/LICENSE-2.0.html for an * explanation of the license and how it is applied. */ package org.mifos.application.fees.struts.actionforms; import java.util.Locale; import junit.framework.Assert; import org.apache.struts.action.ActionErrors; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mifos.framework.TestUtils; public class FeeActionFormTest { Locale locale = TestUtils.ukLocale(); FeeActionForm form; @Before public void setUp() { form = new FeeActionForm(); } @After public void tearDown() { form = null; } @Test public void testIsAmountValidWithNonNumberString() { form.setAmount("aaa"); Assert.assertFalse(isAmountValid(form)); } @Test public void testIsAmountValidWithValidString() { form.setAmount("2.5"); Assert.assertTrue(isAmountValid(form)); } @Test public void testIsAmountValidWithTooMuchPrecision() { form.setAmount("2.12345"); Assert.assertFalse(isAmountValid(form)); } @Test public void testIsAmountValidWithZero() { form.setAmount("0.0"); Assert.assertFalse(isAmountValid(form)); } @Test public void testIsAmountValidWithTooLargeANumber() { form.setAmount("12345678.5"); Assert.assertFalse(isAmountValid(form)); } private boolean isAmountValid(FeeActionForm form) { ActionErrors errors = new ActionErrors(); form.validateAmount(errors, locale); return errors.size() == 0; } }
[ "meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4" ]
meonkeys@a8845c50-7012-0410-95d3-8e1449b9b1e4
b23e25d5cef4ea8fdb76b474661f9ab37eaa4359
3768fca8b4792ccd8607bcd4d2c46e3c5299b696
/app/src/main/java/zollie/travelblogger/guidee/models/MarkerItem.java
219890099f72553d9369b3b427c9265096a01f19
[]
no_license
Zoltaneusz/Guidee
995378cb33436ebe07b08111cf88c421bd1099d9
61f202c4e05ae1b003ae71a03013da5d6193e6d5
refs/heads/master
2021-01-13T09:18:56.682018
2018-05-13T18:20:43
2018-05-13T18:20:43
72,342,514
1
0
null
null
null
null
UTF-8
Java
false
false
1,580
java
package zollie.travelblogger.guidee.models; import android.graphics.Bitmap; import com.google.android.gms.maps.model.LatLng; import com.google.maps.android.clustering.ClusterItem; /** * Created by FuszeneckerZ on 2017. 04. 13.. */ public class MarkerItem implements ClusterItem { private final LatLng mPosition; private String mTitle; private String mSnippet; private Bitmap mIcon; private String mID; private long likes; private String journeyID; public MarkerItem(double lat, double lng) { mPosition = new LatLng(lat, lng); } public MarkerItem(double lat, double lng, String title, long liked, String snippet, Bitmap icon, String jID) { mPosition = new LatLng(lat, lng); mTitle = title; mSnippet = snippet; mIcon = icon; likes = liked; journeyID = jID; } @Override public LatLng getPosition() { return mPosition; } @Override public String getTitle() { return mTitle; } @Override public String getSnippet() { return mSnippet; } public Bitmap getmIcon() { return mIcon; } public String getID() { return mID; } public void setID(String mID) { this.mID = mID; } public long getLikes() { return likes; } public void setLikes(long likes) { this.likes = likes; } public String getJourneyID() { return journeyID; } public void setJourneyID(String journeyID) { this.journeyID = journeyID; } }
[ "fzoltan88@gmail.com" ]
fzoltan88@gmail.com
3d0f172ea752987ac9b38a0b6d6b81186e9e658d
0ce67699d6b46c275ba021ae06c352940b04344e
/MyPage/app/src/main/java/com/example/mypage/MainActivity.java
7fa8fc9234ccbb525e1c31560c2aaab63d7b2134
[]
no_license
hagyeonglee/RODANG_Leap
af8ae0743bbe1da20d18adba595dd341950c7bb0
2338cd1d6e694c71f530783ee96c7b8ff1f89cfa
refs/heads/master
2022-02-19T00:28:44.461658
2019-09-21T09:59:11
2019-09-21T09:59:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
331
java
package com.example.mypage; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
[ "lhky0708@gmail.com" ]
lhky0708@gmail.com
f90006ee4a0fef0d87d4335b93f3b791bd4e8e79
0f1a73dc0329cead4fa60981c1c1eb141d758a5d
/kfs-parent/core/src/main/java/org/kuali/kfs/module/purap/businessobject/PurchasingCapitalAssetItem.java
c77f174193fc9f488a711ce1f3ad2a18ddefea8b
[]
no_license
r351574nc3/kfs-maven
20d9f1a65c6796e623c4845f6d68834c30732503
5f213604df361a874cdbba0de057d4cd5ea1da11
refs/heads/master
2016-09-06T15:07:01.034167
2012-06-01T07:40:46
2012-06-01T07:40:46
3,441,165
0
0
null
null
null
null
UTF-8
Java
false
false
2,270
java
/* * Copyright 2011 The Kuali Foundation. * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl2.php * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kuali.kfs.module.purap.businessobject; import org.kuali.kfs.integration.cab.CapitalAssetBuilderAssetTransactionType; import org.kuali.kfs.integration.purap.CapitalAssetSystem; import org.kuali.kfs.integration.purap.ItemCapitalAsset; import org.kuali.kfs.module.purap.document.PurchasingDocument; import org.kuali.rice.kns.bo.ExternalizableBusinessObject; public interface PurchasingCapitalAssetItem { public Integer getCapitalAssetItemIdentifier(); public void setCapitalAssetItemIdentifier(Integer capitalAssetItemIdentifier); public Integer getItemIdentifier(); public void setItemIdentifier(Integer itemIdentifier); public String getCapitalAssetTransactionTypeCode(); public void setCapitalAssetTransactionTypeCode(String capitalAssetTransactionTypeCode); public Integer getCapitalAssetSystemIdentifier(); public void setCapitalAssetSystemIdentifier(Integer capitalAssetSystemIdentifier); public CapitalAssetBuilderAssetTransactionType getCapitalAssetTransactionType(); public CapitalAssetSystem getPurchasingCapitalAssetSystem(); public void setPurchasingCapitalAssetSystem(CapitalAssetSystem purchasingCapitalAssetSystem); public PurchasingDocument getPurchasingDocument(); public void setPurchasingDocument(PurchasingDocument pd); public PurchasingItem getPurchasingItem(); public boolean isEmpty(); public ItemCapitalAsset getNewPurchasingItemCapitalAssetLine(); public ItemCapitalAsset getAndResetNewPurchasingItemCapitalAssetLine(); }
[ "r351574nc3@gmail.com" ]
r351574nc3@gmail.com
7599f11813fa8fd3c34a64fd51b6343b07672a80
b63985ba0191bb0fd44a3e2d2478776ca6cc8831
/src/main/java/com/zhaoxi/Open_source_Android/ui/adapter/TokenDetailAdapter.java
3dace10e567136f3e5b731d4274ef7bb81155965
[]
no_license
hpb-project/hpb-wallet-android
bd16996e0f0d186af782fae41804dead718ffb44
3bf24f0d7ab987ee09a9f235afa8d051d3d09da8
refs/heads/master
2022-04-09T04:30:47.922559
2020-03-05T14:56:22
2020-03-05T14:56:22
242,688,301
0
0
null
null
null
null
UTF-8
Java
false
false
4,993
java
package com.zhaoxi.Open_source_Android.ui.adapter; import android.content.Context; import android.support.annotation.NonNull; 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.TextView; import com.zhaoxi.Open_source_Android.DAppConstants; import com.zhaoxi.Open_source_Android.dapp.R; import com.zhaoxi.Open_source_Android.libs.utils.DateUtilSL; import com.zhaoxi.Open_source_Android.libs.utils.SlinUtil; import com.zhaoxi.Open_source_Android.libs.utils.StrUtil; import com.zhaoxi.Open_source_Android.net.bean.TranferRecordBean; import com.zhaoxi.Open_source_Android.ui.activity.TokenDetailActivity; import java.math.BigDecimal; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * create by fangz * create date:2019/9/5 * create time:7:58 */ public class TokenDetailAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private List<TranferRecordBean.TransferInfo> mDataList; private Context mContext; public TokenDetailAdapter(Context context,List<TranferRecordBean.TransferInfo> dataList) { this.mContext = context; this.mDataList = dataList; } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_token_detail_list_layout, parent, false); return new TokenItemViewHolder(itemView); } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { TokenItemViewHolder itemHolder = (TokenItemViewHolder) holder; final TranferRecordBean.TransferInfo entity = mDataList.get(position); itemHolder.mTokenFromAddress.setText(StrUtil.formatAddress(entity.getFromAccount())); itemHolder.mTokenToAddress.setText(StrUtil.formatAddress(entity.getToAccount())); String tokenSymbol = entity.getTokenSymbol(); String value = entity.getValue(); BigDecimal money = new BigDecimal(value); String strMoney = SlinUtil.formatNumFromWeiT(mContext,money,18); String tokenType = entity.getTokenType(); if (TokenDetailActivity.mWalletAddress.equals(entity.getFromAccount())) {//转出 itemHolder.mTokenDetailListName.setTextColor(mContext.getResources().getColor(R.color.color_E86A6A)); itemHolder.mAssetsStatusHead.setImageResource(R.mipmap.icon_roll_out_small); if (DAppConstants.TYPE_HRC_20.equals(tokenType)){ itemHolder.mTokenDetailListName.setText("-" + value + tokenSymbol); }else { itemHolder.mTokenDetailListName.setText("-" + strMoney + DAppConstants.TYPE_HPB); } } else { itemHolder.mTokenDetailListName.setTextColor(mContext.getResources().getColor(R.color.color_44C8A3)); itemHolder.mAssetsStatusHead.setImageResource(R.mipmap.icon_into_small); if (DAppConstants.TYPE_HRC_20.equals(tokenType)){ itemHolder.mTokenDetailListName.setText("+" + value + tokenSymbol); }else { itemHolder.mTokenDetailListName.setText("+" + strMoney + DAppConstants.TYPE_HPB); } } itemHolder.mTokenDetailListTime.setText(DateUtilSL.getTransferDate(mContext,entity.getTimestap(), 0)); itemHolder.mTokenDetailContainer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (onItemClickListener != null){ onItemClickListener.onItemClick(entity); } } }); } @Override public int getItemCount() { return mDataList.size(); } class TokenItemViewHolder extends RecyclerView.ViewHolder { @BindView(R.id.item_assets_status_head) ImageView mAssetsStatusHead; @BindView(R.id.item_main_token_detail_list_name) TextView mTokenDetailListName; @BindView(R.id.item_token_detail_list_time) TextView mTokenDetailListTime; @BindView(R.id.item_main_token_detail_list_from_address) TextView mTokenFromAddress; @BindView(R.id.item_main_token_detail_list_to_address) TextView mTokenToAddress; @BindView(R.id.item_assets_list_container) LinearLayout mTokenDetailContainer; public TokenItemViewHolder(View itemView) { super(itemView); ButterKnife.bind(this, itemView); } } private OnItemClickListener onItemClickListener; public void setOnItemClickListener(OnItemClickListener listener) { onItemClickListener = listener; } public interface OnItemClickListener { void onItemClick(TranferRecordBean.TransferInfo entity); } }
[ "loglos@qq.com" ]
loglos@qq.com
777f7a400f194b6544606b2c70ed338a032b17f1
c394ce540a41b009c778f899990f6ab4b583b36a
/src/main/java/com/irh/transaction/controllers/api/ApiRoleController.java
6923b1bfb10ddf6b17fef459e49b4cfa5cd63852
[]
no_license
IRH01/TransactionManager
8d3eb9891704e637657bc48b57bbdf38cb745a1b
54a6b7865af47e924493005b016ed927d75ea2bc
refs/heads/master
2020-12-30T15:30:53.402290
2017-09-30T06:30:14
2017-09-30T06:30:14
91,154,909
0
0
null
null
null
null
UTF-8
Java
false
false
4,758
java
package com.irh.transaction.controllers.api; import com.irh.transaction.WebHelper; import com.irh.transaction.controllers.BaseController; import com.irh.transaction.dto.search.NamedEntitySearchFilter; import com.irh.transaction.utils.exceptions.ApiException; import com.irh.transaction.utils.code.ApiResponse; import com.irh.transaction.model.account.Role; import com.irh.transaction.services.PermissionService; import com.irh.transaction.services.RoleService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Map; /** * The API controller to manage {@link Role}. * * <p> <b>Thread Safety:</b> This class is immutable and is thread safe. </p> * * @author Iritchie.ren * @version 1.0 */ @RestController @RequestMapping("/api/account/role") public class ApiRoleController extends BaseController{ /** * The {@link RoleService} instance. */ @Autowired private RoleService roleService; /** * The {@link PermissionService} instance. */ @Autowired private PermissionService permissionService; /** * Gets all permissions. * * @return the response containing the list of permissions. * @throws ApiException if any error occurs. */ @RequestMapping(value = "/permissions", method = RequestMethod.GET) public ApiResponse getPermissions() throws ApiException{ try{ return new ApiResponse(permissionService.findAll()); }catch(Exception ex){ throw WebHelper.logException(getLogger(), ApiRoleController.class.getName() + "#getPermissions()", new ApiException("Error occurred while processing the request.", ex)); } } /** * Saves the role. * * @param role the role to save. * @return the response containing the id of the saved role. * @throws ApiException if any error occurs. */ @RequestMapping(value = "/save", method = RequestMethod.POST) public ApiResponse save(@RequestBody Role role) throws ApiException{ try{ role.setHqId(getAccount().getHqId()); roleService.save(role); return new ApiResponse(role.getId()); }catch(Exception ex){ throw WebHelper.logException(getLogger(), ApiRoleController.class.getName() + "#save(Role)", new ApiException("Error occurred while processing the request.", ex)); } } /** * Updates the role. * * @param role the role to update. * @return the response. * @throws ApiException if any error occurs. */ @RequestMapping(value = "/update", method = RequestMethod.POST) public ApiResponse update(@RequestBody Role role) throws ApiException{ try{ roleService.update(role); return new ApiResponse(); }catch(Exception ex){ throw WebHelper.logException(getLogger(), ApiRoleController.class.getName() + "#update(Role)", new ApiException("Error occurred while processing the request.", ex)); } } /** * Gets the branch by id. * * @param id the role id. * @return the response containing the retrieved branch. * @throws ApiException if any error occurs. */ @RequestMapping(value = "/{id}", method = RequestMethod.GET) public ApiResponse get(@PathVariable long id) throws ApiException{ try{ return new ApiResponse(roleService.findOne(id)); }catch(Exception ex){ throw WebHelper.logException(getLogger(), ApiRoleController.class.getName() + "#get(long)", new ApiException("Error occurred while processing the request.", ex)); } } /** * Gets all roles of the current headquarter. * * @param params the request parameters. * @return the response containing the result. * @throws ApiException if any error occurs. */ @RequestMapping(value = "", method = RequestMethod.GET) public ApiResponse search(@RequestParam Map<String, String> params) throws ApiException{ try{ NamedEntitySearchFilter filter = new NamedEntitySearchFilter(); WebHelper.setSearchFilter(filter, params, getAccount()); return new ApiResponse(roleService.search(filter)); }catch(Exception ex){ throw WebHelper.logException(getLogger(), ApiRoleController.class.getName() + "#search(Map<String, String>)", new ApiException("Error occurred while processing the request.", ex)); } } }
[ "469656844@qq.com" ]
469656844@qq.com
e7e801dbf068020fc6b73443c667d59ac3656e83
2adb3b3cbdc34c873ec99397549573cc0a1c066c
/mediator/src/main/java/com/dhf/Application.java
be4694ae70b5870fb1a1949a60daf3be470d7df2
[]
no_license
haifeng9414/design-patterns
76e10e898713d0e1a21a5cc305c86d86e3cf162c
c80425a9663e8745eb63ddd17112170f16c3ccc2
refs/heads/master
2021-06-23T03:22:54.287854
2020-08-01T05:30:21
2020-08-01T05:30:21
227,389,328
0
0
null
2021-06-07T18:38:49
2019-12-11T14:47:37
Java
UTF-8
Java
false
false
822
java
package com.dhf; import com.dhf.mediator.*; public class Application { /** * Program entry point * * @param args command line args */ public static void main(String[] args) { // create party and members Party party = new PartyImpl(); Hobbit hobbit = new Hobbit(); Wizard wizard = new Wizard(); Rogue rogue = new Rogue(); Hunter hunter = new Hunter(); // add party members party.addMember(hobbit); party.addMember(wizard); party.addMember(rogue); party.addMember(hunter); // perform actions -> the other party members // are notified by the party hobbit.act(Action.ENEMY); wizard.act(Action.TALE); rogue.act(Action.GOLD); hunter.act(Action.HUNT); } }
[ "dong_hf@yeah.net" ]
dong_hf@yeah.net
7ecd01ee99aee1a09affa4aa2e5760586d79e4e8
145fdf32316efef980895e6b1b4c5ff9ce08deba
/src/main/java/org/jamocha/rating/fraj/package-info.java
e9aed3d30b288da8c04d16f30eb02b5381322743
[ "Apache-2.0" ]
permissive
RWTH-i5-IDSG/jamocha
ae876888c63b683b6b650607f6306f6589a63dcd
dbc5d48a647004b0334cafaba69e899cee0bb0e2
refs/heads/master
2021-05-04T10:37:53.523309
2016-12-16T16:22:45
2016-12-16T16:22:45
50,928,797
5
1
null
null
null
null
UTF-8
Java
false
false
749
java
/* * Copyright 2002-2016 The Jamocha 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.jamocha.org/ * * 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. */ /** * Contains the classes comprising Fabian's Rating Algorithm for Jamocha. * * @author Fabian Ohler <fabian.ohler1@rwth-aachen.de> */ package org.jamocha.rating.fraj;
[ "fabian.ohler1@rwth-aachen.de" ]
fabian.ohler1@rwth-aachen.de
cbe3828ddf07f721579caef74832184512ca798f
14ad378484d6f455153749eedc931b43d678e671
/src/main/java/si/inspired/security/AuthenticationSuccessListener.java
e8449786add1d5f20ee61a1a6f9d115ce7147968
[]
no_license
JavaEEPRO/service
e947cdeb14d6ac8d66122b0b50504f8aceba1f69
1174d26b0d9b4ff914ed6ac52037899144ebf33e
refs/heads/master
2022-11-18T15:48:54.632870
2020-07-11T16:27:49
2020-07-11T16:27:49
278,643,732
0
0
null
null
null
null
UTF-8
Java
false
false
940
java
package si.inspired.security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationListener; import org.springframework.security.authentication.event.AuthenticationSuccessEvent; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletRequest; @Component public class AuthenticationSuccessListener implements ApplicationListener<AuthenticationSuccessEvent> { @Autowired private HttpServletRequest request; @Autowired private LoginAttemptService loginAttemptService; @Override public void onApplicationEvent(final AuthenticationSuccessEvent e) { final String xfHeader = request.getHeader("X-Forwarded-For"); if (xfHeader == null) { loginAttemptService.loginSucceeded(request.getRemoteAddr()); } else { loginAttemptService.loginSucceeded(xfHeader.split(",")[0]); } } }
[ "j2eengineer@gmail.com" ]
j2eengineer@gmail.com
2619352478de1b520a3af22a2a2c5d40f218735e
7791b5baae5362ab998145bf4ca33082bbf9912b
/boot-core/src/main/java/com/meiya/springboot/service/privilege/SysPrivilegeServiceImpl.java
93774cd7b450861451bb0994ae9df978b18cae68
[]
no_license
webinglin/springboot-project
1e4380f5a7ce83c2072c29140c7ae4efaf43f4af
1141e81646919c05b22eb1fdbe0150390cf9217d
refs/heads/master
2021-04-05T00:01:25.685292
2020-04-15T07:09:10
2020-04-15T07:09:10
248,504,512
0
0
null
null
null
null
UTF-8
Java
false
false
3,526
java
package com.meiya.springboot.service.privilege; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.meiya.springboot.bean.*; import com.meiya.springboot.common.util.StringUtil; import com.meiya.springboot.constants.FieldConstants; import com.meiya.springboot.mapper.group.SysGroupRoleMapper; import com.meiya.springboot.mapper.privilege.SysPrivilegeMapper; import com.meiya.springboot.mapper.role.SysRolePrivilegeMapper; import com.meiya.springboot.mapper.user.SysUserGroupMapper; import com.meiya.springboot.mapper.user.SysUserRoleMapper; import org.apache.commons.collections.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; /** * @author linwb * @since 2020/3/18 */ @Service @Transactional(rollbackFor = Exception.class) public class SysPrivilegeServiceImpl implements SysPrivilegeService { @Resource private SysPrivilegeMapper sysPrivilegeMapper; @Resource private SysUserGroupMapper sysUserGroupMapper; @Resource private SysGroupRoleMapper sysGroupRoleMapper; @Resource private SysUserRoleMapper sysUserRoleMapper; @Resource private SysRolePrivilegeMapper sysRolePrivilegeMapper; @Override public List<SysPrivilege> queryPrivilegesByUserId(String userId) throws Exception { StringUtil.isBlank(userId,"用户ID为空"); // 查询用户所有的用户组 拥有的所有权限 Set<String> roleIdSet = queryUserGroupRoleIdSet(userId); if(CollectionUtils.isEmpty(roleIdSet)){ roleIdSet = new HashSet<>(); } // 查询用户所有的角色 Map<String,Object> selectMap = Collections.singletonMap(FieldConstants.USER_ID, userId); // 合并用户组关联的角色 和 用户直接关联的角色 roleIdSet.addAll(sysUserRoleMapper.selectByMap(selectMap).stream().map(SysUserRole::getRoleId).collect(Collectors.toSet())); // 根据角色ID查询所有的权限 QueryWrapper<SysRolePrivilege> rolePrivilegeQueryWrapper = new QueryWrapper<>(); rolePrivilegeQueryWrapper.in(FieldConstants.ROLE_ID, roleIdSet); Set<String> privilegeIdSet = sysRolePrivilegeMapper.selectList(rolePrivilegeQueryWrapper).stream().map(SysRolePrivilege::getPrivilegeId).collect(Collectors.toSet()); if(CollectionUtils.isEmpty(privilegeIdSet)){ return new ArrayList<>(); } // 查询所有的权限 return sysPrivilegeMapper.selectBatchIds(privilegeIdSet); } @Override public Set<String> queryUserGroupRoleIdSet(String userId) throws Exception { // 查询用户具备的所有用户组 Map<String,Object> selectMap = Collections.singletonMap(FieldConstants.USER_ID, userId); List<SysUserGroup> userGroupList = sysUserGroupMapper.selectByMap(selectMap); Set<String> groupIdSet = userGroupList.stream().map(SysUserGroup::getGroupId).collect(Collectors.toSet()); if(CollectionUtils.isEmpty(groupIdSet)){ return null; } // 查询用户组具备的角色 QueryWrapper<SysGroupRole> wrapper = new QueryWrapper<>(); wrapper.in(FieldConstants.GROUP_ID, groupIdSet); List<SysGroupRole> groupRoleList = sysGroupRoleMapper.selectList(wrapper); return groupRoleList.stream().map(SysGroupRole::getRoleId).collect(Collectors.toSet()); } }
[ "webinglin@163.com" ]
webinglin@163.com
78d52d34b163d34a75220d859f17f52503e79128
5ee8ed89f111b3d644ac3c933679f737b24d6b94
/CoreJavaPrograms/src/com/journaldev/java8/foreach/MyConsumer.java
18d8ce531fc5a58013c1647400dfbda624fd0f90
[]
no_license
vidhurraj147/CoreJavaPrograms
9132e0850ffe61dc8bd8d9e64e3bc996aa7c65af
05957bd27c3e02fcb10f2c592a15c771e5250602
refs/heads/master
2020-04-10T10:24:56.132507
2018-12-29T05:36:19
2018-12-29T05:36:19
160,965,579
0
0
null
null
null
null
UTF-8
Java
false
false
250
java
package com.journaldev.java8.foreach; import java.util.function.Consumer; public class MyConsumer implements Consumer<Integer>{ @Override public void accept(Integer t) { System.out.println("Class MyConsumer accept method "+t); } }
[ "Lenovo@LAPTOP-KKISTNP1.lan1" ]
Lenovo@LAPTOP-KKISTNP1.lan1
7d2390e347c5980541ae0a20e243a3be96157577
a19e099339b0aa790162b4b6a442fdaf8d362816
/src/main/java/com/cao/youth/api/v1/ActivityController.java
f0c92f253c5eff4ec4a113c5b09a67732d859ba4
[]
no_license
caoxuexi/youth-api
ed5f4ebd63fc047c107cbea1d107bded45191edb
7570689f268a0583ee4f920a35de1ac542a0cc14
refs/heads/master
2023-05-29T09:10:53.976074
2021-06-11T01:52:44
2021-06-11T01:52:44
317,266,469
2
0
null
null
null
null
UTF-8
Java
false
false
1,458
java
package com.cao.youth.api.v1; import com.cao.youth.exception.http.NotFoundException; import com.cao.youth.model.Activity; import com.cao.youth.service.ActivityService; import com.cao.youth.vo.ActivityCouponVO; import com.cao.youth.vo.ActivityPureVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author 曹学习 * @description ActivityController * @date 2020/8/28 23:46 */ @RequestMapping("activity") @RestController public class ActivityController { @Autowired private ActivityService activityService; @GetMapping("/name/{name}") public ActivityPureVO getHomeActivity(@PathVariable String name) { Activity activity = activityService.getByName(name); if (activity == null) { throw new NotFoundException(40001); } ActivityPureVO vo = new ActivityPureVO(activity); return vo; } @GetMapping("/name/{name}/with_coupon") public ActivityCouponVO getActivityWithCoupons(@PathVariable String name) { Activity activity = activityService.getByName(name); if (activity == null) { throw new NotFoundException(40001); } return new ActivityCouponVO(activity); } }
[ "969718359@qq.com" ]
969718359@qq.com
70a654085dfca2b1fc6447dd8443dc563f2adbb2
b56e9cd429bbf409104698759ecca9df1e779479
/src/test/java/hu/nive/ujratervezes/zarovizsga/people/PeopleTest.java
a3220fec14f1ec1b6277414639e22d19c5ed105b
[]
no_license
szendre1/zarovizsga-potvizsga
7307c529722266a1a72ce8d4ef461437c2cc949d
77bdcc43275552f947efcfa2f8e7e2c6cfb2e172
refs/heads/master
2023-04-07T21:47:45.254252
2021-04-15T12:14:23
2021-04-15T12:14:23
358,245,011
0
0
null
null
null
null
UTF-8
Java
false
false
383
java
//package hu.nive.ujratervezes.zarovizsga.people; // //import org.junit.jupiter.api.Test; // //import static org.junit.jupiter.api.Assertions.*; // //class PeopleTest { // // @Test // void getNumberOfMales() { // People people = new People(); // int males = people.getNumberOfMales("src/test/resources/people.csv"); // assertEquals(545, males); // } //}
[ "endre.szarka@gmail.com" ]
endre.szarka@gmail.com
876287915e3a169a209c071c5963ba3f7f0ff09f
327774afd16edd9a7af41eaa9f312c4758aeb143
/src/main/java/spring/mvc/roombooking/demo/configs/SpringSecurityConfig.java
610717daacc73690a5e31c419ae79bf8c4acbe2b
[]
no_license
OleksiiBondarr/springtest
150fa9e0ea30f6981bc771ceb1d5d219cb718a6c
d74b5d72b6ef15ba3dce2c08c44b6924af3b9d90
refs/heads/master
2020-09-16T05:06:31.060484
2019-11-26T22:56:26
2019-11-26T22:56:26
223,662,285
0
0
null
null
null
null
UTF-8
Java
false
false
1,979
java
package spring.mvc.roombooking.demo.configs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; @Configuration public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { private CustomAuthenticationProvider authProvider; @Autowired SpringSecurityConfig(CustomAuthenticationProvider authProvider) { this.authProvider = authProvider; } // Create 2 users for demo @Override protected void configure(AuthenticationManagerBuilder auth) { auth.authenticationProvider(authProvider); } // Secure the endpoins with HTTP Basic authentication @Override protected void configure(HttpSecurity http) throws Exception { http //HTTP Basic authentication .httpBasic() .and() .authorizeRequests() .antMatchers(HttpMethod.GET, "/users/**").authenticated() .antMatchers(HttpMethod.POST, "/users").hasAuthority("ADMIN") .antMatchers(HttpMethod.PUT, "/users/**").hasAnyAuthority("ADMIN") .antMatchers(HttpMethod.DELETE, "/users/**").hasAuthority("ADMIN") .antMatchers(HttpMethod.GET, "/rooms/**").authenticated() .antMatchers(HttpMethod.POST, "/rooms").hasAuthority("ADMIN") .antMatchers(HttpMethod.PUT, "/rooms/**").hasAnyAuthority("ADMIN") .antMatchers(HttpMethod.DELETE, "/rooms/**").hasAuthority("ADMIN") .and() .csrf().disable() .formLogin().disable(); } }
[ "aleks998@outlook.com" ]
aleks998@outlook.com
27f8e6cc2996dcefc217befff25224450336b3fc
127c6e6997d625f90167710f0879e0b74fb909c7
/classe projet/src/etudiant/Promo.java
1dbdfe4a5d06d91fc35dcce2ef20ed356b287759
[]
no_license
flo-mrc/Java
9f05a675c583d4678d2f0afdeefe3d01a611abf5
2e2750fe3df09ae6cb8498b27b12e48a2164234d
refs/heads/master
2021-04-12T11:47:17.174650
2018-03-30T06:45:27
2018-03-30T06:45:27
126,893,145
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package etudiant; import java.util.ArrayList; /** * @author Florian * */ public class Promo { private String annee; private String nom; private ArrayList<Etudiant> etudiants; public Promo() { this.etudiants = new ArrayList<Etudiant>(); } public String getAnnee() { return annee; } public void setAnnee(String annee) { this.annee = annee; } public String getNom() { return nom; } public void setNom(String nom) { this.nom = nom; } public ArrayList<Etudiant> getEtudiants() { return etudiants; } public void setEtudiants(ArrayList<Etudiant> etudiants) { this.etudiants = etudiants; } }
[ "florian.marco83@gmail.com" ]
florian.marco83@gmail.com
ae3d2e1298ceb5c882fccb999e2457a4ca73ea64
bee9ec2284d17c03a8cf1dad96404b6bbe7a9084
/src/com/company/ada/DNRPA.java
4659afafd5118be29b25e4417535d4ef20262cfc
[]
no_license
jesibelen/Integrador1
9ea707d52a4c4ef03a2fb96a722c37ab6b3cc7a4
a1aad1acc1e1c2a7eebec7d0afbafef793b28780
refs/heads/master
2023-05-03T13:11:48.116534
2021-05-22T01:22:18
2021-05-22T01:22:18
334,158,919
0
0
null
null
null
null
UTF-8
Java
false
false
1,624
java
package com.company.ada; import java.util.*; public class DNRPA { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); HelperDNRPA helperDNRPA= new HelperDNRPA(); Mensaje mensaje=new Mensaje(); RegSeccional regSec = new RegSeccional(); List<RegSeccional> seccionales =new ArrayList<>(); int opcion=1; //primero guardo mis seccionales regSec.guardarSeccionales(seccionales); helperDNRPA.registrarAutosPrueba(seccionales); mensaje.DarBienvenida(); while (opcion!=0) { mensaje.mostrarMenuPrincipal(); try{ System.out.print("Seleccione una opción [0-4]: "); opcion = scanner.nextInt(); switch (opcion) { case 1: helperDNRPA.darDeAltaAutomotor(seccionales,regSec); break; case 2: helperDNRPA.actualizarDatosPropietario(seccionales,regSec); break; case 3: helperDNRPA.listarTodoAutomotores(seccionales); break; case 4: helperDNRPA.listarPropietarioCamiones(seccionales); break; case 0: mensaje.salir(); break; default: System.out.println("Opcion incorrecta"); break; } }catch (InputMismatchException e){ System.out.println("ERROR: Solo ingresar números."); scanner.next(); } } } }
[ "jesica.salva2@gmail.com" ]
jesica.salva2@gmail.com
69b0b4d92fa7e1b23615bdc1a0ffb82a20d822af
0267e52fbbfc44b2d9643860d92c329b702d86a4
/app/src/main/java/com/example/fragment_min05/activites/StaticActivity.java
b892fda0971df035c573ba3264a7c173ecb1b74f
[]
no_license
PanjiAD/fragment-Min05
0c7643d585245ddf945ecc7b75a0e8023e0076c6
bbebf8d9984ce986221662dd9ada14dfde091cf0
refs/heads/master
2020-08-03T07:00:52.422721
2019-09-29T12:55:52
2019-09-29T12:55:52
211,662,480
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.example.fragment_min05.activites; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import com.example.fragment_min05.R; public class StaticActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_static); } }
[ "panjiawwaludi430@gmail.com" ]
panjiawwaludi430@gmail.com
de0c88abdd4ac2ad17e5de732944f25a79bf0e47
0da3c360bed49e947c8e33c274075dacfd30899b
/dependencies/alfalfaidl140711/eggidl/VOlib_0.1/classes/nvo_coords/CoordSpectralType.java
2ef9e669c9529571828c00454e58c0c18b4aca4d
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
drtobybrown/IDLstack
71e2bd540d9f36143017642f40eedd8443d03ebc
c83e7255b9c49321ef5f9b448d4cc4123675e5c0
refs/heads/master
2022-08-12T05:01:25.638206
2018-08-21T16:11:02
2018-08-21T16:11:02
61,335,604
0
0
null
null
null
null
UTF-8
Java
false
false
9,277
java
/** * CoordSpectralType.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2beta Mar 31, 2004 (12:47:03 EST) WSDL2Java emitter. */ package nvo_coords; public class CoordSpectralType implements java.io.Serializable { private java.lang.String name; private nvo_coords.CoordSpectralValueType coordValue; private nvo_coords.CoordSpectralValueType coordError; private nvo_coords.CoordSpectralValueType coordResolution; private nvo_coords.CoordSpectralValueType coordSize; private nvo_coords.CoordSpectralValueType coordPixsize; public CoordSpectralType() { } /** * Gets the name value for this CoordSpectralType. * * @return name */ public java.lang.String getName() { return name; } /** * Sets the name value for this CoordSpectralType. * * @param name */ public void setName(java.lang.String name) { this.name = name; } /** * Gets the coordValue value for this CoordSpectralType. * * @return coordValue */ public nvo_coords.CoordSpectralValueType getCoordValue() { return coordValue; } /** * Sets the coordValue value for this CoordSpectralType. * * @param coordValue */ public void setCoordValue(nvo_coords.CoordSpectralValueType coordValue) { this.coordValue = coordValue; } /** * Gets the coordError value for this CoordSpectralType. * * @return coordError */ public nvo_coords.CoordSpectralValueType getCoordError() { return coordError; } /** * Sets the coordError value for this CoordSpectralType. * * @param coordError */ public void setCoordError(nvo_coords.CoordSpectralValueType coordError) { this.coordError = coordError; } /** * Gets the coordResolution value for this CoordSpectralType. * * @return coordResolution */ public nvo_coords.CoordSpectralValueType getCoordResolution() { return coordResolution; } /** * Sets the coordResolution value for this CoordSpectralType. * * @param coordResolution */ public void setCoordResolution(nvo_coords.CoordSpectralValueType coordResolution) { this.coordResolution = coordResolution; } /** * Gets the coordSize value for this CoordSpectralType. * * @return coordSize */ public nvo_coords.CoordSpectralValueType getCoordSize() { return coordSize; } /** * Sets the coordSize value for this CoordSpectralType. * * @param coordSize */ public void setCoordSize(nvo_coords.CoordSpectralValueType coordSize) { this.coordSize = coordSize; } /** * Gets the coordPixsize value for this CoordSpectralType. * * @return coordPixsize */ public nvo_coords.CoordSpectralValueType getCoordPixsize() { return coordPixsize; } /** * Sets the coordPixsize value for this CoordSpectralType. * * @param coordPixsize */ public void setCoordPixsize(nvo_coords.CoordSpectralValueType coordPixsize) { this.coordPixsize = coordPixsize; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CoordSpectralType)) return false; CoordSpectralType other = (CoordSpectralType) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.name==null && other.getName()==null) || (this.name!=null && this.name.equals(other.getName()))) && ((this.coordValue==null && other.getCoordValue()==null) || (this.coordValue!=null && this.coordValue.equals(other.getCoordValue()))) && ((this.coordError==null && other.getCoordError()==null) || (this.coordError!=null && this.coordError.equals(other.getCoordError()))) && ((this.coordResolution==null && other.getCoordResolution()==null) || (this.coordResolution!=null && this.coordResolution.equals(other.getCoordResolution()))) && ((this.coordSize==null && other.getCoordSize()==null) || (this.coordSize!=null && this.coordSize.equals(other.getCoordSize()))) && ((this.coordPixsize==null && other.getCoordPixsize()==null) || (this.coordPixsize!=null && this.coordPixsize.equals(other.getCoordPixsize()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getName() != null) { _hashCode += getName().hashCode(); } if (getCoordValue() != null) { _hashCode += getCoordValue().hashCode(); } if (getCoordError() != null) { _hashCode += getCoordError().hashCode(); } if (getCoordResolution() != null) { _hashCode += getCoordResolution().hashCode(); } if (getCoordSize() != null) { _hashCode += getCoordSize().hashCode(); } if (getCoordPixsize() != null) { _hashCode += getCoordPixsize().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CoordSpectralType.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralType")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("name"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "Name")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("coordValue"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "CoordValue")); elemField.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralValueType")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("coordError"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "CoordError")); elemField.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralValueType")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("coordResolution"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "CoordResolution")); elemField.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralValueType")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("coordSize"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "CoordSize")); elemField.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralValueType")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("coordPixsize"); elemField.setXmlName(new javax.xml.namespace.QName("urn:nvo-coords", "CoordPixsize")); elemField.setXmlType(new javax.xml.namespace.QName("urn:nvo-coords", "coordSpectralValueType")); elemField.setMinOccurs(0); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "tobiashenrybrown@gmail.com" ]
tobiashenrybrown@gmail.com
efa080a040922b32e373a51133bba258a1a391c9
d6cf041192a5ab8c48c5030d01d64cb30c44ec7d
/src/main/java/com/desafiozup/DesafiozupApplication.java
abd3e912f8f8a6397918f4da0be6eb640774495d
[]
no_license
Robertoromg/api-rest-cadastro-conta-banco
1bc9bd0265b124e55f5cc4c22a08a0b091215126
6c234b9c1c111b33d485395c2ce88505717d569f
refs/heads/master
2023-03-03T01:58:43.642924
2021-02-06T22:06:28
2021-02-06T22:06:28
325,859,683
0
0
null
null
null
null
UTF-8
Java
false
false
396
java
package com.desafiozup; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; @ComponentScan @SpringBootApplication public class DesafiozupApplication { public static void main(String[] args) { SpringApplication.run(DesafiozupApplication.class, args); } }
[ "robertoro_mg@outlook.com" ]
robertoro_mg@outlook.com
4e4493c3f43ce17d0e4ed83f5c4c25dbfb108fbf
d318c56db7086b919ba70490383325fbedbe87bf
/article-service/src/main/java/com/ryan/cloud/kubernetes/article/service/ArticleService.java
d203cddf92a544aef7441d2a8f919cf0085aad05
[ "BSD-3-Clause" ]
permissive
SundyHu/spring-cloud-kubernetes-practice
b211a8bff9af3e9ac3ec7af6e5439aab7114c8d8
277e63c287f910c7d47d58127e7a9f099dfbe7bf
refs/heads/master
2023-03-19T08:18:13.258913
2021-03-06T08:12:45
2021-03-06T08:12:45
342,485,490
0
0
BSD-3-Clause
2021-03-06T08:12:46
2021-02-26T06:34:23
Java
UTF-8
Java
false
false
335
java
package com.ryan.cloud.kubernetes.article.service; import com.baomidou.mybatisplus.extension.service.IService; import com.ryan.cloud.kubernetes.article.model.Article; /** * ArticleService * * @author hkc * @version 1.0.0 * @date 2021-03-06 15:23 */ public interface ArticleService extends IService<Article> { }
[ "hs_18312833057@yeah.net" ]
hs_18312833057@yeah.net
288b99d243e0a9c89219c6b1743982b6f019e2c5
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_59_buggy/mutated/661/TokenQueue.java
79206c15913edd4907e1f349aa8b7729ae342d09
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,784
java
package org.jsoup.parser; import org.jsoup.helper.Validate; /** * A character queue with parsing helpers. * * @author Jonathan Hedley */ public class TokenQueue { private String queue; private int pos = 0; private static final Character ESC = '\\'; // escape char for chomp balanced. /** Create a new TokenQueue. @param data string of data to back queue. */ public TokenQueue(String data) { Validate.notNull(data); queue = data; } /** * Is the queue empty? * @return true if no data left in queue. */ public boolean isEmpty() { return remainingLength() == 0; } private int remainingLength() { return queue.length() - pos; } /** * Retrieves but does not remove the first character from the queue. * @return First character, or null if empty. */ public Character peek() { return isEmpty() ? null : queue.charAt(pos); } /** Add a character to the start of the queue (will be the next character retrieved). @param c character to add */ public void addFirst(Character c) { addFirst(c.toString()); } /** Add a string to the start of the queue. @param seq string to add. */ public void addFirst(String seq) { // not very performant, but an edge case queue = seq + queue.substring(pos); pos = 0; } /** * Tests if the next characters on the queue match the sequence. Case insensitive. * @param seq String to check queue for. * @return true if the next characters match. */ public boolean matches(String seq) { int count = seq.length(); if (count > remainingLength()) return false; while (--count >= 0) { if (Character.toLowerCase(seq.charAt(count)) != Character.toLowerCase(queue.charAt(pos+count))) return false; } return true; } /** * Case sensitive match test. * @param seq * @return */ public boolean matchesCS(String seq) { return queue.startsWith(seq, pos); } /** Tests if the next characters match any of the sequences. Case insensitive. @param seq @return */ public boolean matchesAny(String... seq) { for (String s : seq) { if (matches(s)) return true; } return false; } public boolean matchesAny(char... seq) { if (isEmpty()) return false; for (char c: seq) { if (queue.charAt(pos) == c) return true; } return false; } public boolean matchesStartTag() { // micro opt for matching "<x" return (remainingLength() >= 2 && queue.charAt(pos) == '<' && Character.isLetterOrDigit(queue.charAt(pos+1))); } /** * Tests if the queue matches the sequence (as with match), and if they do, removes the matched string from the * queue. * @param seq String to search for, and if found, remove from queue. * @return true if found and removed, false if not found. */ public boolean matchChomp(String seq) { if (matches(seq)) { pos += seq.length(); return true; } else { return false; } } /** Tests if queue starts with a whitespace character. @return if starts with whitespace */ public boolean matchesWhitespace() { return !isEmpty() && Character.isWhitespace(queue.charAt(pos)); } /** Test if the queue matches a word character (letter or digit). @return if matches a word character */ public boolean matchesWord() { return !isEmpty() && Character.isLetterOrDigit(queue.charAt(pos)); } /** * Drops the next character off the queue. */ public void advance() { if (!isEmpty()) pos++; } /** * Consume one character off queue. * @return first character on queue. */ public Character consume() { Character c = queue.charAt(pos); pos++; return c; } /** * Consumes the supplied sequence of the queue. If the queue does not start with the supplied sequence, will * throw an illegal state exception -- but you should be running match() against that condition. <p> Case insensitive. * @param seq sequence to remove from head of queue. */ public void consume(String seq) { if (!matches(seq)) throw new IllegalStateException("Queue did not match expected sequence"); int len = seq.length(); if (len > remainingLength()) throw new IllegalStateException("Queue not long enough to consume sequence"); pos += len; } /** * Pulls a string off the queue, up to but exclusive of the match sequence, or to the queue running out. * @param seq String to end on (and not include in return, but leave on queue). <b>Case sensitive.</b> * @return The matched data consumed from queue. */ public String consumeTo(String seq) { int offset = queue.indexOf(seq, pos); if (offset != -1) { String consumed = queue.substring(pos, offset); pos += consumed.length(); return consumed; } else { return remainder(); } } public String consumeToIgnoreCase(String seq) { int start = pos; String first = seq.substring(0, 1); boolean canScan = first.toLowerCase().equals(first.toUpperCase()); // if first is not cased, use index of while (!isEmpty() && !matches(seq)) { if (canScan) { int skip = queue.indexOf(first, pos) - pos; if (skip <= 0) pos++; else if (skip < 0) // no chance of finding, grab to end pos = queue.length() - 1; else pos += skip; } else pos++; } String data = queue.substring(start, start); return data; } /** Consumes to the first sequence provided, or to the end of the queue. Leaves the terminator on the queue. @param seq any number of terminators to consume to. <b>Case insensitive.</b> @return consumed string */ // todo: method name. not good that consumeTo cares for case, and consume to any doesn't. And the only use for this // is is a case sensitive time... public String consumeToAny(String... seq) { int start = pos; while (!isEmpty() && !matchesAny(seq)) { pos++; } String data = queue.substring(start, pos); return data; } /** * Pulls a string off the queue (like consumeTo), and then pulls off the matched string (but does not return it). * <p> * If the queue runs out of characters before finding the seq, will return as much as it can (and queue will go * isEmpty() == true). * @param seq String to match up to, and not include in return, and to pull off queue. <b>Case sensitive.</b> * @return Data matched from queue. */ public String chompTo(String seq) { String data = consumeTo(seq); matchChomp(seq); return data; } public String chompToIgnoreCase(String seq) { String data = consumeToIgnoreCase(seq); // case insensitive scan matchChomp(seq); return data; } /** * Pulls a balanced string off the queue. E.g. if queue is "(one (two) three) four", (,) will return "one (two) three", * and leave " four" on the queue. Unbalanced openers and closers can be escaped (with \). Those escapes will be left * in the returned string, which is suitable for regexes (where we need to preserve the escape), but unsuitable for * contains text strings; use unescape for that. * @param open opener * @param close closer * @return data matched from the queue */ public String chompBalanced(Character open, Character close) { StringBuilder accum = new StringBuilder(); int depth = 0; Character last = null; do { if (isEmpty()) break; Character c = consume(); if (last == null || !last.equals(ESC)) { if (c.equals(open)) depth++; else if (c.equals(close)) depth--; } if (depth > 0 && last != null) accum.append(c); // don't include the outer match pair in the return last = c; } while (depth > 0); return accum.toString(); } /** * Unescaped a \ escaped string. * @param in backslash escaped string * @return unescaped string */ public static String unescape(String in) { StringBuilder out = new StringBuilder(); Character last = null; for (Character c : in.toCharArray()) { if (c.equals(ESC)) { if (last != null && last.equals(ESC)) out.append(c); } else out.append(c); last = c; } return out.toString(); } /** * Pulls the next run of whitespace characters of the queue. */ public boolean consumeWhitespace() { boolean seen = false; while (matchesWhitespace()) { pos++; seen = true; } return seen; } /** * Retrieves the next run of word type (letter or digit) off the queue. * @return String of word characters from queue, or empty string if none. */ public String consumeWord() { int start = pos; while (matchesWord()) pos++; return queue.substring(start, pos); } /** * Consume an tag name off the queue (word or :, _, -) * * @return tag name */ public String consumeTagName() { int start = pos; while (!isEmpty() && (matchesWord() || matchesAny(':', '_', '-'))) pos++; return queue.substring(start, pos); } /** * Consume a CSS element selector (tag name, but | instead of : for namespaces, to not conflict with :pseudo selects). * * @return tag name */ public String consumeElementSelector() { int start = pos; while (!isEmpty() && (matchesWord() || matchesAny('|', '_', '-'))) pos++; return queue.substring(start, pos); } /** Consume a CSS identifier (ID or class) off the queue (letter, digit, -, _) http://www.w3.org/TR/CSS2/syndata.html#value-def-identifier @return identifier */ public String consumeCssIdentifier() { int start = pos; while (!isEmpty() && (matchesWord() || matchesAny('-', '_'))) pos++; return queue.substring(start, pos); } /** Consume an attribute key off the queue (letter, digit, -, _, :") @return attribute key */ public String consumeAttributeKey() { int start = pos; while (!isEmpty() && (matchesWord() || matchesAny('-', '_', ':'))) pos++; return queue.substring(start, pos); } /** Consume and return whatever is left on the queue. @return remained of queue. */ public String remainder() { StringBuilder accum = new StringBuilder(); while (!isEmpty()) { accum.append(consume()); } return accum.toString(); } public String toString() { return queue.substring(pos); } }
[ "justinwm@163.com" ]
justinwm@163.com