query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Queries whether should render the specified pass or not.
protected int shouldRenderPass(EntityLivingBase par1EntityLivingBase, int par2, float par3) { return this.func_82447_a((EntitySpiritWolf)par1EntityLivingBase, par2, par3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic final boolean canRenderInPass( int pass )\n\t{\n\t\tRenderers.currentRenderPass = pass;\n\n\t\t// We render during both passes\n\t\treturn true;\n\t}", "public boolean isPass() \n{\n\tif (this.pass) \n\t{\n\t\treturn true;\n\t}\n\telse \n\t{\n\t\treturn false;\n\t}\n}", "boolean hasPass();", "boolean hasPass();", "boolean pass();", "public static boolean isUserPassed() {\n return isUserPassed(user);\n }", "public abstract boolean isRenderRedirect();", "protected abstract Render render(Param param, int pass);", "public boolean isPassed() {\r\n\t\treturn passed;\r\n\t}", "public boolean hasPassed(){\n return hasPassed(0);\n }", "public abstract boolean isPassable();", "public boolean isPass() {\n return playerMove != null && playerMove.getTypeOfChoice() == TypeOfChoiceEnum.PASS;\n }", "public abstract boolean isRendered();", "Boolean isPassed();", "public void setPassed(boolean passed) {\r\n\t\tthis.passed = passed;\r\n\t}", "public boolean hasPassed()\n {\n return status == Status.PASSED || status == Status.SKIPPED;\n }", "Boolean checkPass(Customer customer, String pass);", "public void printResult(boolean result){\r\n if(result)\r\n System.out.println(\"Pass\");\r\n }", "public boolean hasPass() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasPass() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isRender()\r\n/* 284: */ {\r\n/* 285:307 */ if (this.tipoReporte.ordinal() == 1) {\r\n/* 286:308 */ this.render = true;\r\n/* 287: */ } else {\r\n/* 288:310 */ this.render = false;\r\n/* 289: */ }\r\n/* 290:311 */ return this.render;\r\n/* 291: */ }", "public abstract boolean isRenderRedirectAfterDispatch();", "public boolean hasPass() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasPass() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean isPass(int playerID){\n // if there have been three passes and the user passes then the middle is turn invisible\n if(numPass == 3 && turn == playerID){\n numPass++;\n // make sure turn goes back to 0 if player is 4\n if(turn == 3){\n turn = 0;\n }\n else{\n turn++;\n }\n gameStage++;\n middleVisible = false;\n return true;\n }\n\n // if numPass is not three or 7 then they can pass normally\n else if(numPass < 7 && numPass != 3 && turn == playerID){\n numPass++;\n // case for player four switching to player 1\n if(turn == 3){\n turn = 0;\n }\n else{\n turn++;\n }\n return true;\n }\n\n // if numPass is 7 then the user cannot pass\n else if(numPass == 7 && turn == playerID){\n return false;\n }\n return false;\n }", "private boolean passTurn() {\n\n\t\t// Return Boolean\n\t\tboolean ableToPassTurn = false;\n\n\t\tint playerOnTurn;\n\n\t\t// Get the playerID who is on turn\n\t\tplayerOnTurn = pTSM.playerOnTurn(gameID);\n\n\t\t// Check if the ID is equal to the playerID\n\t\ttry {\n\t\t\tif (playerOnTurn == this.userID && modelClass.gameIsWon(pTSM.getUsername(userID), gameID)) {\n\t\t\t\tthis.message = \"Het is niet jou beurt\";\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (playerOnTurn == this.userID) {\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t}\n\n\n\t\treturn ableToPassTurn;\n\t}", "private boolean checkPass(String enterPass) {\n JdbcConnection connection = JdbcConnection.getInstance();\n DaoFactory daoFactory = new RealDaoFactory(connection);\n List<User> users = daoFactory.createUserDao().findAll();\n for (User user : users) {\n if (user.getPasswordHash() == enterPass.hashCode()) {\n return true;\n }\n }\n return false;\n }", "public boolean isRendered() {\r\n\t\treturn rendered;\r\n\t}", "boolean hasPassCardsResponse();", "protected boolean passResults(Object bean) throws JellyTagException\n {\n return true;\n }", "@Override\n public void setToBeRendered(boolean arg0)\n {\n \n }", "public final boolean isRendered() {\n return rendered;\n }", "public boolean isPickingPass() {\n\t\treturn GLGraphicsUtils.isPickingPass(gl);\n\t}", "public boolean isPassable(byte height){\n\t\t\t\n\t\t\tswitch(this){\n\t\t\t\tcase FLY:\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t\tcase GROUND: {\n\t\t\t\t\tif(height > 0){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcase SWIM: {\n\t\t\t\t\tif(height == 0){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdefault: return false;\n\t\t\t}\n\t\t}", "@Column(name=\"pass\")\n\tpublic String getPass() {\n\t\treturn pass;\n\t}", "boolean isSetLastrunresult();", "private boolean valPassword(String pass){\n if (usuario.getPassword().equals(pass)){\n return true;\n }\n return false;\n }", "boolean hasContext();", "boolean hasContext();", "boolean hasQuery();", "public boolean strictMatches() { return strict_matches_cbmi.isSelected(); }", "public boolean isSetLoginPass() {\n return this.loginPass != null;\n }", "public int getPasses() {\n return passes;\n }", "public boolean isPassed(String _opt) {\r\n\t\tif(getOption(_opt)!=null){\r\n\t\t\tif(getOption(_opt).isPassed()){return true;}else{return false;}\r\n\t\t}else{\r\n\t\t\t//vuol dire che non è stato definito l'argomento richieso\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "boolean hasFeedback();", "public String getPass() {\n\t\treturn pass;\r\n\t}", "private boolean predicateCheck(Game game) {\n boolean showOnTextFilter;\n if (txtFilter.getText().isEmpty()) {\n showOnTextFilter = true;\n } else {\n showOnTextFilter = game.getName().toLowerCase().contains(txtFilter.getText().toLowerCase());\n }\n\n boolean showOnCheckBoxFilter;\n if (!cbFilterNonAchievement.isSelected()) {\n showOnCheckBoxFilter = true;\n } else {\n showOnCheckBoxFilter = game.getHasStats();\n }\n\n return showOnTextFilter && showOnCheckBoxFilter;\n }", "public static void PassResult(String passMessage) {\n\t\tLog.info(passMessage);\n\t\tReporter.log(passMessage);\n\t\tExtentManager.test.pass(passMessage);\n\n\t}", "public Short getCoursePassRequirePassExam() {\n\t\treturn coursePassRequirePassExam;\n\t}", "public static boolean doTestsPass() {\r\n // todo: implement more tests, please\r\n // feel free to make testing more elegant\r\n boolean testsPass = true;\r\n double result = power(2,-2);\r\n return testsPass && result==0.25;\r\n }", "Boolean getCompletelyCorrect();", "public boolean pass(String word);", "public boolean isRun() {\n if (!isValid()) {\n return false;\n }\n else {\n if (tiles.get(0).getColour() == tiles.get(1).getColour()) {\n return true;\n } else {\n return false;\n }\n }\n }", "@SideOnly(Side.CLIENT)\n boolean needsRenderUpdate(World world, BlockPos pos, IBlockState state, T tile);", "public boolean isRenderLookupCriteria() {\r\n return renderLookupCriteria;\r\n }", "boolean canRender(IModel model, Entity entity);", "public void setPass(String pass) {\n\t\tthis.pass = pass;\n\t}", "boolean canCrit();", "boolean getRendering(Long id) throws RemoteException;", "public boolean carryingPassengers() {\n\t\treturn carryingPassengers;\n\t}", "public boolean isSetPassport() {\n\t\treturn this.passport != null;\n\t}", "public TestCase pass();", "public String getCoursePassRequire() {\n\t\treturn coursePassRequire;\n\t}", "void pass() {\r\n if (m1 >=35 && m2>=35 && m3>=35) {\r\n System.out.println(\"pass\");\r\n } else {\r\n System.out.println(\"fail\");\r\n }\r\n }", "public void setPass(String aPass) {\n pass = aPass;\n }", "@Override\n public boolean isToBeRendered()\n {\n return true;\n }", "public Integer getPassStatus() {\n return passStatus;\n }", "public final void setRendered(final boolean rendered) {\n this.rendered = rendered;\n }", "boolean hasPipelineRunContext();", "public boolean isUsuarioPass(String user, String pass) {\n\t\t\n try{\n \t\tQuery q = this.entitymanager.createNamedQuery(\"Usuario.porNombrePass\");\n \t\tq.setParameter(\"nombre\", user);\n \t\tq.setParameter(\"pass\", pass);\n \t\tUsuario u = (Usuario) q.getSingleResult();\n \t\treturn u!=null;\n\t\t\t/*\n \t\tUsuario u=this.buscarUsuarioPorNombre(user);\n\t\t\tString p= u.getPassword();\n\t\t\tif(p.equals(pass)){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}*/\n \t}catch(Exception e){\n \t\treturn false;\n \t}\n\t}", "public void runPass(Pass pass) { pass.run(this); }", "public void runPass(Pass pass) { pass.run(this); }", "public static Boolean checkPass(String password) {\n // TODO: integrate with scs.ubbcluj.ro, send a dummy POST and check the response code\n return true;\n }", "protected boolean mustApplyLighting(DrawContext dc, ShapeAttributes activeAttrs)\n {\n return activeAttrs != null ? activeAttrs.isEnableLighting() : this.activeAttributes.isEnableLighting();\n }", "@Test\n public void AshortPass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new short pass\n onView(withId(R.id.newPassword)).perform(typeText(\"pa00\"));\n //close keyboard\n closeSoftKeyboard();\n //renter again the new short pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"pa00\"));\n //close keyboard\n closeSoftKeyboard();\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordChar))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordChar)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "boolean hasCollectResult();", "@Override\r\n public boolean isRendered() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n if (!context.getCurrentPhaseId().equals(PhaseId.RENDER_RESPONSE)) {\r\n Integer index = getView().getActiveRowIndex();\r\n return super.isRendered() && index != null && index > -1;\r\n }\r\n return super.isRendered();\r\n }", "public boolean is_allowed()\r\n\t{\r\n\t\tboolean allowed;\r\n\t\t\r\n\t\t// Compare hashes to see if they match\r\n\t\tif (hash.equals(query_hash))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Match successful!\");\r\n\t\t\tallowed = true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid credentials...\");\r\n\t\t\tallowed = false;\r\n\t\t}\r\n\t\t\r\n\t\t//if (fail_count >= 3)\r\n\t\t\t//allowed = false;\r\n\t\t\r\n\t\treturn allowed;\r\n\t}", "public String getPass() {\n return pass;\n }", "public String getPass() {\n return pass;\n }", "public boolean passed(){\n if (totalMark() == -1) {\n throw new IllegalArgumentException(\"Not enough marks to evaluate student\"); \n } else if (totalMark() >= 50){\n return true;\n }else{\n return false;\n }\n }", "@Test\n public void BnotMatchPass () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //enter correct past password\n onView(withId(R.id.oldPassword)).perform(typeText(\"00000000\"));\n //close keyboard\n closeSoftKeyboard();\n //enter new pass\n onView(withId(R.id.newPassword)).perform(typeText(\"serene00\"));\n //close keyboard\n closeSoftKeyboard();\n //enter diff new pass\n onView(withId(R.id.reNewPassword)).perform(typeText(\"passwoord77\"));\n //close keyboard\n closeSoftKeyboard();\n //click the save button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.passwordMatch))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.passwordMatch)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }", "public boolean canThink ()\n {\n return true;\n }", "private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "boolean hasPassword();", "public boolean checkAndIncrement() {\n\t\tsynchronized(lock) {\n\t\t\tif (passes == 0) {\n\t\t\t\tpasses++;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tpasses = 0;\n\t\t\treturn false;\n\t\t}\n\t}", "boolean result_is_boolean(DiagnosticChain diagnostics, Map<Object, Object> context);", "public boolean checkPass(String password){\r\n if (password.equals(this.password)){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "boolean render(final CoreGL gl, float deltaTime);", "boolean getPasswordValid();", "java.lang.String getPass();", "java.lang.String getPass();", "private void finalRenderToTexture() {\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t\tGL11.glColorMask(true, true, true, true);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP);\n\t\tGL11.glDepthMask(false);\n\t\tGL11.glEnable(GL11.GL_STENCIL_TEST);\n\n\t\t// ambient pass\n\t\tGL11.glStencilFunc(GL11.GL_NOTEQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 1);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\t// diffuse pass\n\t\tGL11.glStencilFunc(GL11.GL_EQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 0);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\tGL11.glDisable(GL11.GL_BLEND);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glDepthMask(true);\n\t\tGL11.glDisable(GL11.GL_STENCIL_TEST);\n\n\t\t// SCREEN POST PROCESSING\n\t\tscreenBuffer.copyPixels();\n\t}" ]
[ "0.72504854", "0.66439074", "0.63826567", "0.63826567", "0.6055308", "0.5752741", "0.5658031", "0.56251323", "0.560661", "0.5604034", "0.55590755", "0.5543458", "0.5442489", "0.5426689", "0.5413997", "0.53641886", "0.53613824", "0.5193841", "0.5161355", "0.5161355", "0.512203", "0.5122017", "0.5097392", "0.5097392", "0.5050003", "0.50285643", "0.50219244", "0.49840674", "0.4975368", "0.49632975", "0.49632767", "0.4962668", "0.4949244", "0.4935448", "0.49258354", "0.4910366", "0.48950636", "0.48856503", "0.48856503", "0.48736888", "0.48720786", "0.48401868", "0.48379248", "0.48193344", "0.4813982", "0.4799334", "0.47728297", "0.47618228", "0.47587356", "0.47584718", "0.47263098", "0.47045183", "0.47029373", "0.47019848", "0.4700812", "0.46916795", "0.4689783", "0.46879986", "0.4684717", "0.46737844", "0.4670042", "0.46504533", "0.46493754", "0.4648418", "0.4647937", "0.4645655", "0.4641299", "0.46386957", "0.46344897", "0.46317285", "0.46296293", "0.46296293", "0.46255705", "0.46254012", "0.4621441", "0.4615828", "0.46068615", "0.46035358", "0.4600227", "0.4600227", "0.4599662", "0.4590872", "0.45864147", "0.45846352", "0.4581576", "0.4581576", "0.4581576", "0.4581576", "0.4581576", "0.4581576", "0.4581576", "0.4581576", "0.45757404", "0.4565907", "0.45591667", "0.45569783", "0.4556918", "0.45560953", "0.45560953", "0.45521274" ]
0.6332103
4
Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args: entityLiving, partialTickTime
protected void preRenderCallback(EntityLivingBase par1EntityLivingBase, float par2){ GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void preRenderCallback(EntitySentientSpecter entitylivingbaseIn, float partialTickTime)\n {\n float f = 0.9375F;\n GlStateManager.scale(0.9375F, 0.9375F, 0.9375F);\n }", "public void afterRender(T entity, float partialTicks)\n {\n // No default behaviour\n }", "public void doRenderELB(AbstractClientPlayer entity, double x, double y, double z, float entityYaw, float partialTicks)\n\t{\n\t\tGlStateManager.pushMatrix();\n\t\tGlStateManager.disableCull();\n\t\tmainModel.swingProgress = getSwingProgress(entity, partialTicks);\n\t\tboolean shouldSit = entity.isRiding() && (entity.getRidingEntity() != null && entity.getRidingEntity().shouldRiderSit());\n\t\tmainModel.isRiding = shouldSit;\n\t\tmainModel.isChild = entity.isChild();\n\t\t\n\t\tItemStack head = entity.getItemStackFromSlot(EntityEquipmentSlot.HEAD);\n\t\tItemStack body = entity.getItemStackFromSlot(EntityEquipmentSlot.CHEST);\n\t\tItemStack legs = entity.getItemStackFromSlot(EntityEquipmentSlot.LEGS);\n\t\tItemStack shoes = entity.getItemStackFromSlot(EntityEquipmentSlot.FEET);\n\t\tItemStack heldItem = InventoryPlayer.isHotbar(entity.inventory.currentItem) ? entity.inventory.mainInventory.get(entity.inventory.currentItem) : null;\n\t\tItemStack offHand = entity.inventory.offHandInventory.get(0);\n\t\t\n\t\tif (doRobo)\n\t\t{\n\t\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.HEAD.getIndex(), ItemStack.EMPTY);\n\t\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.CHEST.getIndex(), ItemStack.EMPTY);\n\t\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.LEGS.getIndex(), ItemStack.EMPTY);\n\t\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.FEET.getIndex(), ItemStack.EMPTY);\n\t\t\tentity.inventory.mainInventory.set(entity.inventory.currentItem, ItemStack.EMPTY);\n\t\t\tentity.inventory.offHandInventory.set(0, ItemStack.EMPTY);\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tfloat f = interpolateRotation(entity.prevRenderYawOffset, entity.renderYawOffset, partialTicks);\n\t\t\tfloat f1 = interpolateRotation(entity.prevRotationYawHead, entity.rotationYawHead, partialTicks);\n\t\t\tfloat netHeadYaw = f1 - f;\n\t\t\t\n\t\t\tif ( shouldSit\n\t\t\t && entity.getRidingEntity() instanceof EntityLivingBase )\n\t\t\t{\n\t\t\t\tEntityLivingBase entitylivingbase = (EntityLivingBase) entity.getRidingEntity();\n\t\t\t\tf = interpolateRotation(entitylivingbase.prevRenderYawOffset, entitylivingbase.renderYawOffset, partialTicks);\n\t\t\t\tnetHeadYaw = f1 - f;\n\t\t\t\tfloat f3 = MathHelper.wrapDegrees(netHeadYaw);\n\t\t\t\t\n\t\t\t\tif (f3 < -85.0F)\n\t\t\t\t{\n\t\t\t\t\tf3 = -85.0F;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (f3 >= 85.0F)\n\t\t\t\t{\n\t\t\t\t\tf3 = 85.0F;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tf = f1 - f3;\n\t\t\t\t\n\t\t\t\tif (f3 * f3 > 2500.0F)\n\t\t\t\t{\n\t\t\t\t\tf += f3 * 0.2F;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnetHeadYaw = f1 - f;\n\t\t\t}\n\t\t\t\n\t\t\tfloat headPitch = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;\n\t\t\trenderLivingAt(entity, x, y, z);\n\t\t\tfloat ageInTicks = handleRotationFloat(entity, partialTicks);\n\t\t\tapplyRotations(entity, ageInTicks, f, partialTicks);\n\t\t\tfloat scaleFactor = prepareScale(entity, partialTicks);\n\t\t\tfloat limbSwingAmount = 0.0F;\n\t\t\tfloat limbSwing = 0.0F;\n\t\t\t\n\t\t\tif (!entity.isRiding())\n\t\t\t{\n\t\t\t\tlimbSwingAmount = entity.prevLimbSwingAmount + (entity.limbSwingAmount - entity.prevLimbSwingAmount) * partialTicks;\n\t\t\t\tlimbSwing = entity.limbSwing - entity.limbSwingAmount * (1.0F - partialTicks);\n\t\t\t\t\n\t\t\t\tif (entity.isChild())\n\t\t\t\t{\n\t\t\t\t\tlimbSwing *= 3.0F;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (limbSwingAmount > 1.0F)\n\t\t\t\t{\n\t\t\t\t\tlimbSwingAmount = 1.0F;\n\t\t\t\t}\n\t\t\t\tnetHeadYaw = f1 - f;\n\t\t\t}\n\t\t\t\n\t\t\tGlStateManager.enableAlpha();\n\t\t\tmainModel.setLivingAnimations(entity, limbSwing, limbSwingAmount, partialTicks);\n\t\t\tmainModel.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entity);\n\t\t\t\n\t\t\tif (renderOutlines)\n\t\t\t{\n\t\t\t\tboolean wasTeamColorChanged = setScoreTeamColor(entity);\n\t\t\t\tGlStateManager.enableColorMaterial();\n\t\t\t\tGlStateManager.enableOutlineMode(getTeamColor(entity));\n\t\t\t\t\n\t\t\t\tif (!renderMarker)\n\t\t\t\t{\n\t\t\t\t\trenderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!entity.isSpectator())\n\t\t\t\t{\n\t\t\t\t\trenderLayers(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scaleFactor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tGlStateManager.disableOutlineMode();\n\t\t\t\tGlStateManager.disableColorMaterial();\n\t\t\t\t\n\t\t\t\tif (wasTeamColorChanged)\n\t\t\t\t{\n\t\t\t\t\tunsetScoreTeamColor();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tboolean wasBrightnessChanged = setDoRenderBrightness(entity, partialTicks);\n\t\t\t\trenderModel(entity, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor);\n\t\t\t\tif (wasBrightnessChanged)\n\t\t\t\t{\n\t\t\t\t\tunsetBrightness();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tGlStateManager.depthMask(true);\n\t\t\t\t\n\t\t\t\tif (!entity.isSpectator())\n\t\t\t\t{\n\t\t\t\t\trenderLayers(entity, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scaleFactor);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tGlStateManager.disableRescaleNormal();\n\t\t}\n\t\tcatch (Exception exception)\n\t\t{\n\t\t\tCyberware.logger.error(\"Disabling custom render until next restart\");\n\t\t\tCyberwareConfig.ENABLE_CUSTOM_PLAYER_MODEL = false;\n\t\t\texception.printStackTrace();\n\t\t\tCyberware.logger.error(String.format(\"Exception while rendering %s with %s\",\n\t\t\t entity, this));\n\t\t}\n\t\t\n\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.HEAD.getIndex(), head);\n\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.CHEST.getIndex(), body);\n\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.LEGS.getIndex(), legs);\n\t\tentity.inventory.armorInventory.set(EntityEquipmentSlot.FEET.getIndex(), shoes);\n\t\tif (heldItem != null)\n\t\t{\n\t\t\tentity.inventory.mainInventory.set(entity.inventory.currentItem, heldItem);\n\t\t}\n\t\tentity.inventory.offHandInventory.set(0, offHand);\n\t\t\n//\t\tGlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);\n\t\tGlStateManager.enableTexture2D();\n\t\tGlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);\n\t\tGlStateManager.enableCull();\n\t\tGlStateManager.popMatrix();\n\t\t\n\t\t// From Render.class\n\t\tif (!renderOutlines)\n\t\t{\n\t\t\trenderName(entity, x, y, z);\n\t\t}\n\t\t// net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderLivingEvent.Post<>(entity, this, partialTicks, x, y, z));\n\t}", "public void beforeRender(EntityData<T> data, T entity, float partialTicks)\n {\n double entityX = entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks;\n double entityY = entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks;\n double entityZ = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks;\n\n Entity viewEntity = Minecraft.getMinecraft().getRenderViewEntity();\n double viewX = entityX, viewY = entityY, viewZ = entityZ;\n if (viewEntity != null)\n {\n // Checking in case of Main Menu or GUI rendering.\n viewX = viewEntity.prevPosX + (viewEntity.posX - viewEntity.prevPosX) * partialTicks;\n viewY = viewEntity.prevPosY + (viewEntity.posY - viewEntity.prevPosY) * partialTicks;\n viewZ = viewEntity.prevPosZ + (viewEntity.posZ - viewEntity.prevPosZ) * partialTicks;\n }\n GlStateManager.translate(entityX - viewX, entityY - viewY, entityZ - viewZ);\n GlStateManager.rotate(-interpolateRotation(entity.prevRenderYawOffset, entity.renderYawOffset, partialTicks), 0F, 1F, 0F);\n\n this.renderLocalAccessories(entity, data, partialTicks);\n\n float globalScale = entity.isChild() ? getChildScale() : 1;\n\n GlStateManager.translate(data.globalOffset.getX() * scale * globalScale,\n data.globalOffset.getY() * scale * globalScale,\n data.globalOffset.getZ() * scale * globalScale);\n GlStateManager.translate(0, entity.height / 2, 0);\n GlHelper.rotate(data.centerRotation.getSmooth());\n GlStateManager.translate(0, -entity.height / 2, 0);\n GlHelper.rotate(data.renderRotation.getSmooth());\n\n GlStateManager.translate(data.localOffset.getX() * scale * globalScale,\n data.localOffset.getY() * scale * globalScale,\n data.localOffset.getZ() * scale * globalScale);\n\n this.transformLocally(entity, data, partialTicks);\n\n GlStateManager.rotate(interpolateRotation(entity.prevRenderYawOffset, entity.renderYawOffset, partialTicks), 0F, 1F, 0F);\n GlStateManager.translate(viewX - entityX, viewY - entityY, viewZ - entityZ);\n }", "@Override\n public void doRender(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6, float par8, float par9)\n {\n if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(par1EntityLivingBase, this, par2, par4, par6))) return;\n GL11.glPushMatrix();\n GL11.glDisable(GL11.GL_CULL_FACE);\n this.mainModel.onGround = this.renderSwingProgress(par1EntityLivingBase, par9);\n\n if (this.renderPassModel != null)\n {\n this.renderPassModel.onGround = this.mainModel.onGround;\n }\n\n this.mainModel.isRiding = par1EntityLivingBase.isRiding();\n\n if (this.renderPassModel != null)\n {\n this.renderPassModel.isRiding = this.mainModel.isRiding;\n }\n\n this.mainModel.isChild = par1EntityLivingBase.isChild();\n\n if (this.renderPassModel != null)\n {\n this.renderPassModel.isChild = this.mainModel.isChild;\n }\n\n try\n {\n float f2 = this.interpolateRotation(par1EntityLivingBase.prevRenderYawOffset, par1EntityLivingBase.renderYawOffset, par9);\n float f3 = this.interpolateRotation(par1EntityLivingBase.prevRotationYawHead, par1EntityLivingBase.rotationYawHead, par9);\n float f4;\n\n float f5 = par1EntityLivingBase.prevRotationPitch + (par1EntityLivingBase.rotationPitch - par1EntityLivingBase.prevRotationPitch) * par9;\n this.renderLivingAt(par1EntityLivingBase, par2, par4, par6);\n f4 = this.handleRotationFloat(par1EntityLivingBase, par9);\n this.rotateCorpse(par1EntityLivingBase, f4, f2, par9);\n float f6 = 0.0625F;\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n GL11.glScalef(-1.0F, -1.0F, 1.0F);\n this.preRenderCallback(par1EntityLivingBase, par9);\n GL11.glTranslatef(0.0F, -24.0F * f6 - 0.0078125F, 0.0F);\n float f7 = par1EntityLivingBase.prevLimbSwingAmount + (par1EntityLivingBase.limbSwingAmount - par1EntityLivingBase.prevLimbSwingAmount) * par9;\n float f8 = par1EntityLivingBase.limbSwing - par1EntityLivingBase.limbSwingAmount * (1.0F - par9);\n\n if (f7 > 1.0F)\n {\n f7 = 1.0F;\n }\n\n GL11.glEnable(GL11.GL_ALPHA_TEST);\n //GL11.glEnable(GL11.GL_BLEND);\n \t//GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n this.mainModel.setLivingAnimations(par1EntityLivingBase, f8, f7, par9);\n this.renderModel(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n float f9;\n int i;\n float f10;\n float f11;\n\n /*\n for (int j = 0; j < 4; ++j)\n {\n i = this.shouldRenderPass(par1EntityLivingBase, j, par9);\n\n if (i > 0)\n {\n this.renderPassModel.setLivingAnimations(par1EntityLivingBase, f8, f7, par9);\n this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n\n if ((i & 240) == 16)\n {\n this.func_82408_c(par1EntityLivingBase, j, par9);\n this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n }\n\n if ((i & 15) == 15)\n {\n f9 = (float)par1EntityLivingBase.ticksExisted + par9;\n //this.bindTexture(RES_ITEM_GLINT);\n GL11.glEnable(GL11.GL_BLEND);\n f10 = 0.5F;\n GL11.glColor4f(f10, f10, f10, 1.0F);\n GL11.glDepthFunc(GL11.GL_EQUAL);\n GL11.glDepthMask(false);\n\n for (int k = 0; k < 2; ++k)\n {\n GL11.glDisable(GL11.GL_LIGHTING);\n f11 = 0.76F;\n GL11.glColor4f(0.5F * f11, 0.25F * f11, 0.8F * f11, 1.0F);\n \tGL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n //GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);\n GL11.glMatrixMode(GL11.GL_TEXTURE);\n GL11.glLoadIdentity();\n float f12 = f9 * (0.001F + (float)k * 0.003F) * 20.0F;\n float f13 = 0.33333334F;\n GL11.glScalef(f13, f13, f13);\n GL11.glRotatef(30.0F - (float)k * 60.0F, 0.0F, 0.0F, 1.0F);\n GL11.glTranslatef(0.0F, f12, 0.0F);\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n }\n\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n GL11.glMatrixMode(GL11.GL_TEXTURE);\n GL11.glDepthMask(true);\n GL11.glLoadIdentity();\n GL11.glMatrixMode(GL11.GL_MODELVIEW);\n GL11.glEnable(GL11.GL_LIGHTING);\n //GL11.glDisable(GL11.GL_BLEND);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n }\n\n GL11.glDisable(GL11.GL_BLEND);\n GL11.glEnable(GL11.GL_ALPHA_TEST);\n }\n }\n*/\n GL11.glDisable(GL11.GL_BLEND);\n \n GL11.glDepthMask(true);\n //this.renderEquippedItems(par1EntityLivingBase, par9);\n float f14 = par1EntityLivingBase.getBrightness(par9);\n i = this.getColorMultiplier(par1EntityLivingBase, f14, par9);\n OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);\n GL11.glDisable(GL11.GL_TEXTURE_2D);\n OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);\n\n // The red hurt animation.\n if ((i >> 24 & 255) > 0 || par1EntityLivingBase.hurtTime > 0 || par1EntityLivingBase.deathTime > 0)\n {\n GL11.glDisable(GL11.GL_TEXTURE_2D);\n GL11.glDisable(GL11.GL_ALPHA_TEST);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glDepthFunc(GL11.GL_EQUAL);\n\n if (par1EntityLivingBase.hurtTime > 0 || par1EntityLivingBase.deathTime > 0)\n {\n GL11.glColor4f(f14, 0.0F, 0.0F, 0.4F);\n this.mainModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n\n for (int l = 0; l < 4; ++l)\n {\n if (this.inheritRenderPass(par1EntityLivingBase, l, par9) >= 0)\n {\n GL11.glColor4f(f14, 0.0F, 0.0F, 0.4F);\n this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n }\n }\n }\n\n if ((i >> 24 & 255) > 0)\n {\n f9 = (float)(i >> 16 & 255) / 255.0F;\n f10 = (float)(i >> 8 & 255) / 255.0F;\n float f15 = (float)(i & 255) / 255.0F;\n f11 = (float)(i >> 24 & 255) / 255.0F;\n GL11.glColor4f(f9, f10, f15, f11);\n this.mainModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n\n for (int i1 = 0; i1 < 4; ++i1)\n {\n if (this.inheritRenderPass(par1EntityLivingBase, i1, par9) >= 0)\n {\n GL11.glColor4f(f9, f10, f15, f11);\n this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6);\n }\n }\n }\n\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n GL11.glDisable(GL11.GL_BLEND);\n GL11.glEnable(GL11.GL_ALPHA_TEST);\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n }\n\n GL11.glDisable(GL12.GL_RESCALE_NORMAL);\n }\n catch (Exception exception)\n {\n exception.printStackTrace();\n }\n\n OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glPopMatrix();\n this.passSpecialRender(par1EntityLivingBase, par2, par4, par6);\n MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(par1EntityLivingBase, this, par2, par4, par6));\n }", "public void renderEntities(Entity renderViewEntity, ICamera camera, float partialTicks) {\n }", "protected void renderLocalAccessories(T entity, EntityData<?> data, float partialTicks)\n {\n // No default behaviour\n }", "@Override\r\n\tprotected void preRenderCallback(EntityAngel entitylivingbaseIn, float partialTickTime)\r\n {\r\n GlStateManager.scale(0.8F, 0.8F, 0.8F);\r\n }", "public void customRendering(T entity, double x, double y, double z, float entityYaw, float partialTicks) {\n GL11.glRotatef(entity.rotationYaw, 0f, 1f, 0f);\n GL11.glRotatef(-entity.rotationPitch, 1f, 0f, 0f);\n\n // adjust \"stuck\" depth\n if(entity.inGround) {\n GL11.glTranslated(0, 0, -entity.getStuckDepth());\n }\n\n customCustomRendering(entity, x, y, z, entityYaw, partialTicks);\n\n // rotate it so it faces forward\n GL11.glRotatef(-90f, 0f, 1f, 0f);\n\n // rotate the projectile it so it faces upwards\n GL11.glRotatef(-45, 0f, 0f, 1f);\n }", "@SideOnly(Side.CLIENT)\n public abstract void render(EntityLivingBase entity, double x, double y, double z, float entityYaw, float partialTicks);", "@Override\n public void doRender(@Nonnull T entity, double x, double y, double z, float entityYaw, float partialTicks) {\n\n ITinkerProjectile handler = entity.getCapability(CapabilityTinkerProjectile.PROJECTILE_CAPABILITY, null);\n if(handler == null) {\n return;\n }\n ItemStack itemStack = handler.getItemStack();\n\n GL11.glPushMatrix();\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n\n // last step: translate from 0/0/0 to correct position in world\n GL11.glTranslated(x, y, z);\n // mkae it smaller\n GL11.glScalef(0.5F, 0.5F, 0.5F);\n\n customRendering(entity, x, y, z, entityYaw, partialTicks);\n\n // arrow shake\n float f11 = (float) entity.arrowShake - partialTicks;\n if(f11 > 0.0F) {\n float f12 = -MathHelper.sin(f11 * 3.0F) * f11;\n GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F);\n }\n\n if(renderManager == null || renderManager.renderEngine == null) {\n return;\n }\n\n // draw correct texture. not some weird block fragments.\n renderManager.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);\n\n if(!itemStack.isEmpty()) {\n Minecraft.getMinecraft().getRenderItem().renderItem(itemStack, ItemCameraTransforms.TransformType.NONE);\n }\n else {\n ItemStack dummy = new ItemStack(Items.STICK);\n Minecraft.getMinecraft().getRenderItem().renderItem(dummy, Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getMissingModel());\n }\n\n GL11.glDisable(GL12.GL_RESCALE_NORMAL);\n GL11.glPopMatrix();\n\n super.doRender(entity, x, y, z, entityYaw, partialTicks);\n }", "protected void customCustomRendering(T entity, double x, double y, double z, float entityYaw, float partialTicks) {}", "private void onModuleUpdate() {\n //!\n //! Calculate the initial time of the frame.\n //!\n mTime = GLFW.glfwGetTime();\n\n do {\n //!\n //! Render until the display is not active.\n //!\n onModuleRender(GLFW.glfwGetTime());\n } while (mDisplay.isActive());\n }", "public void onRenderTick() {\n updateLang();\n updateRenderEngine();\n }", "public void render(float partialTicks){\r\n\t\tif(blocks.size() > 0 && enabled){\r\n\t\t\tfor(int i = 0; i < blocks.size();i++){\r\n\t\t\t\tblocks.get(i).draw(partialTicks);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void livingTick() {\n super.livingTick();\n this.setMotion(Vector3d.ZERO);\n if (!this.isAIDisabled()) {\n this.prevRenderYawOffset = 0.0F;\n this.renderYawOffset = 0.0F;\n }\n\n }", "public static void drawPlayerModel(int x, int y, int scale, float yaw, float pitch, EntityLivingBase entity) {\r\n\t\tGL11.glEnable(GL11.GL_COLOR_MATERIAL);\r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glTranslatef(x + 76, y, 50.0F);\r\n\t\tGL11.glScalef(-scale, scale, scale);\r\n\t\tGL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);\r\n\t\tfloat f2 = entity.renderYawOffset;\r\n\t\tfloat f3 = entity.rotationYaw;\r\n\t\tfloat f4 = entity.rotationPitch;\r\n\t\tfloat f5 = entity.prevRotationYawHead;\r\n\t\tfloat f6 = entity.rotationYawHead;\r\n\t\tGL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);\r\n\t\tRenderHelper.enableStandardItemLighting();\r\n\t\tGL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);\r\n\t\tGL11.glRotatef(-((float) Math.atan(pitch / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F);\r\n\t\tentity.renderYawOffset = (float) Math.atan(yaw / 40.0F) * 20.0F;\r\n\t\tentity.rotationYaw = (float) Math.atan(yaw / 40.0F) * 40.0F;\r\n\t\tentity.rotationPitch = -((float) Math.atan(pitch / 40.0F)) * 20.0F;\r\n\t\tentity.rotationYawHead = entity.rotationYaw;\r\n\t\tentity.prevRotationYawHead = entity.rotationYaw;\r\n\t\tGL11.glTranslatef(0.0F, entity.yOffset, 0.0F);\r\n\t\tRenderManager.instance.playerViewY = 180.0F;\r\n\t\tRenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);\r\n\t\tentity.renderYawOffset = f2;\r\n\t\tentity.rotationYaw = f3;\r\n\t\tentity.rotationPitch = f4;\r\n\t\tentity.prevRotationYawHead = f5;\r\n\t\tentity.rotationYawHead = f6;\r\n\t\tGL11.glPopMatrix();\r\n\t\tRenderHelper.disableStandardItemLighting();\r\n\t\tGL11.glDisable(GL12.GL_RESCALE_NORMAL);\r\n\t\tOpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);\r\n\t\tGL11.glDisable(GL11.GL_TEXTURE_2D);\r\n\t\tOpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);\r\n\t}", "public static void onPreRenderShaders(float partialTicks) {\n\t\tMinecraftForge.EVENT_BUS.post(new PreRenderShadersEvent(partialTicks));\n\t}", "private void onModuleUpdate() {\n if (mTime == -1L) {\n mTime = System.currentTimeMillis();\n }\n\n //!\n //! Render until the display is not active.\n //!\n onModuleRender(System.currentTimeMillis());\n\n //!\n //! Request to render again.\n //!\n onAnimationRequest(this::onModuleUpdate);\n }", "public void onLivingUpdate()\n {\n this.updateArmSwingProgress();\n float var1 = this.getBrightness(1.0F);\n\n if (var1 > 0.5F)\n {\n this.entityAge += 2;\n }\n\n super.onLivingUpdate();\n }", "@Override\n public void onWorldRender(RenderEvent event) {\n GlStateManager.pushMatrix();\n mc.world.playerEntities.stream().filter(entityPlayer -> entityPlayer != mc.player).forEach(Chams::drawEntityOutline);\n mc.world.loadedEntityList.stream().filter(entity -> EntityUtil.isLiving(entity) && entity != mc.player).forEach(Chams::drawEntityOutline);\n// entityFBO.unbindFramebuffer();\n GlStateManager.popMatrix();\n// mc.getFramebuffer().bindFramebuffer(true);\n\n// entityFBO.framebufferRenderExt(mc.displayWidth, mc.displayHeight, false);\n\n GlStateManager.color(1,1,1);\n GlStateManager.enableBlend();\n }", "private void onUpdateFrame(FrameTime frameTime) {\n Frame frame = arFragment.getArSceneView().getArFrame();\n\n //In case there's no frame\n if (frame == null) {\n return;\n }\n\n //Used to Create Model at a certain Point on the Floor automatically\n if (frame.getCamera().getTrackingState() == TrackingState.TRACKING && !placed) {\n Pose pos = frame.getCamera().getPose().compose(Pose.makeTranslation(1f, 0f, -2.5f));\n\n //Anchor Node to set the Model in place\n Anchor anchor = arFragment.getArSceneView().getSession().createAnchor(pos);\n AnchorNode anchorNode = new AnchorNode(anchor);\n anchorNode.setParent(arFragment.getArSceneView().getScene());\n\n createModel(anchorNode, activeNode, activeRenderable);\n }\n }", "@Override\n\tprotected void applyRotations(EntityLiving entityLiving, float p_77043_2_, float rotationYaw, float partialTicks) {\n\t\tsuper.applyRotations(entityLiving, p_77043_2_, rotationYaw, partialTicks);\n\t}", "private void onModuleRender(long time) {\n //!\n //! Handle the render notification.\n //!\n mLifecycle.onRender((time - mTime) / 1000.0f);\n\n //!\n //! Update the new delta time.\n //!\n mTime = time;\n\n //!\n //! Update the render.\n //!\n //! NOTE: House-keeping of render component(s).\n //!\n mRender.onModuleUpdate();\n\n //!\n //! Update the display.\n //!\n //! NOTE: Will synchronise with the window.\n //!\n mDisplay.onModuleUpdate();\n }", "@SubscribeEvent\n public static void onLivingTick(LivingEvent.LivingUpdateEvent event) {\n \tLivingEntity entity = event.getEntityLiving();\n \tWorld world = entity.getEntityWorld();\n\n\t\tapplyFluidWalkingEnchants(world, entity);\n\t\tsuffocateInSpace(world, entity);\n\t\tdecreaseGravityOnLuna(world, entity);\n }", "private void onModuleRender(double time) {\n //!\n //! Handle the render notification.\n //!\n mLifecycle.onRender((float) (time - mTime));\n\n //!\n //! Update the new delta time.\n //!\n mTime = time;\n\n //!\n //! Update the render.\n //!\n //! NOTE: House-keeping of render component(s).\n //!\n mRender.onModuleUpdate();\n\n //!\n //! Update the display.\n //!\n //! NOTE: Will synchronise with the window.\n //!\n mDisplay.onModuleUpdate();\n }", "public void doRender(ModEntityTNTPrimed par1TNTPrimed, double x, double y, double z, float par5, float par6)\n {\n GL11.glPushMatrix();\n GL11.glTranslatef((float)x, (float)y, (float)z);\n float f2;\n\n if ((float)par1TNTPrimed.getFuse() - par6 + 1.0F < 10.0F)\n {\n f2 = 1.0F - ((float)par1TNTPrimed.getFuse() - par6 + 1.0F) / 10.0F;\n\n if (f2 < 0.0F)\n {\n f2 = 0.0F;\n }\n\n if (f2 > 1.0F)\n {\n f2 = 1.0F;\n }\n\n f2 *= f2;\n f2 *= f2;\n float f3 = 1.0F + f2 * 0.3F;\n GL11.glScalef(f3, f3, f3);\n }\n\n f2 = (1.0F - ((float)par1TNTPrimed.getFuse() - par6 + 1.0F) / 100.0F) * 0.8F;\n this.bindEntityTexture(par1TNTPrimed);\n this.blockRenderer.renderBlockAsItem(ModBlocks.modTNT[(par1TNTPrimed.getFuse() / 20) + 1], 0, par1TNTPrimed.getBrightness(par6));\n\n// if (par1TNTPrimed.getFuse() / 5 % 2 == 0)\n// {\n// GL11.glDisable(GL11.GL_TEXTURE_2D);\n// GL11.glDisable(GL11.GL_LIGHTING);\n// GL11.glEnable(GL11.GL_BLEND);\n// GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_ALPHA);\n// GL11.glColor4f(1.0F, 1.0F, 1.0F, f2);\n// this.blockRenderer.renderBlockAsItem(ModBlocks.modTNT[(par1TNTPrimed.getFuse() / 20) + 1], 0, 1.0F);\n// GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n// GL11.glDisable(GL11.GL_BLEND);\n// GL11.glEnable(GL11.GL_LIGHTING);\n// GL11.glEnable(GL11.GL_TEXTURE_2D);\n// }\n\n GL11.glPopMatrix();\n }", "public void doRender(EntityLiving entity, double x, double y, double z, float p_76986_8_, float partialTicks)\n {\n this.func_180579_a((EntityMaxZombie)entity, x, y, z, p_76986_8_, partialTicks);\n }", "protected void preRenderCallback(EntityLivingBase par1EntityLiving, float par2)\n {\n this.func_82438_a((EntityCrawlingHand)par1EntityLiving, par2);\n }", "public void onLivingUpdate()\n {\n super.onLivingUpdate();\n }", "public void present(float deltaTime) {\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\trenderer.setProjectionMatrix(gCamera.combined);\n\t\tbatch.setProjectionMatrix(gCamera.combined);\n\n\t\tbatch.disableBlending();\n\t\tbatch.enableBlending();\n\t\tswitch (curStep) {\n\t\t\tcase GAME_READY: presentReady(deltaTime); break;\n\t\t\tcase GAME_RUNNING: presentRunning(deltaTime); break;\n\t\t\tcase GAME_PAUSED: presentPaused(deltaTime); break;\n\t\t\tcase GAME_LEVEL_END: presentLevelEnd(deltaTime); break;\n\t\t\tcase GAME_OVER: presentOver(deltaTime); break;\t\n\t\t}\n\n\t\tstage.draw();\n\t}", "@Override\r\n\tpublic void beforeRender(float dt) {\n\r\n\t}", "public void render(){ \r\n\t\tGL11.glPushMatrix();\r\n\t\tGL11.glTranslatef(x, y, z);\r\n\t\tGL11.glColor4f(Color.x, Color.y, Color.z, (float)(Math.random())); //Color.vx\r\n\t\tVGO v=getModel();\r\n\t\tv.orientPlain(r);\r\n\t\tv.orient(base);\r\n\t\t\r\n\t\ttFling+=0.01f;\r\n\t\tif(tFling>5){\r\n\t\t\ttHide=tActive;\r\n\t\t\ttActive+=0.1f;\r\n\t\t\tif(tHide>=1){\r\n\t\t\t\ttHide=0f;\r\n\t\t\t\ttActive=0.1f;\r\n\t\t\t}\r\n\t\t\ttFling=0f;\r\n\t\t}\r\n\t\t\r\n\t\tv.render();//tHide,tActive,tFling,1);\r\n\t\tGL11.glPopMatrix();\r\n\t}", "@Override\n\tpublic void render(float deltaTime) {\n\t\t\n\t}", "public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale) {\n/* 64 */ AbstractChestHorse abstractchesthorse = (AbstractChestHorse)entityIn;\n/* 65 */ boolean flag = (!abstractchesthorse.isChild() && abstractchesthorse.func_190695_dh());\n/* 66 */ setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);\n/* */ \n/* 68 */ if (this.isChild) {\n/* */ \n/* 70 */ float f = 2.0F;\n/* 71 */ GlStateManager.pushMatrix();\n/* 72 */ GlStateManager.translate(0.0F, this.childYOffset * scale, this.childZOffset * scale);\n/* 73 */ GlStateManager.popMatrix();\n/* 74 */ GlStateManager.pushMatrix();\n/* 75 */ float f1 = 0.7F;\n/* 76 */ GlStateManager.scale(0.71428573F, 0.64935064F, 0.7936508F);\n/* 77 */ GlStateManager.translate(0.0F, 21.0F * scale, 0.22F);\n/* 78 */ this.head.render(scale);\n/* 79 */ GlStateManager.popMatrix();\n/* 80 */ GlStateManager.pushMatrix();\n/* 81 */ float f2 = 1.1F;\n/* 82 */ GlStateManager.scale(0.625F, 0.45454544F, 0.45454544F);\n/* 83 */ GlStateManager.translate(0.0F, 33.0F * scale, 0.0F);\n/* 84 */ this.body.render(scale);\n/* 85 */ GlStateManager.popMatrix();\n/* 86 */ GlStateManager.pushMatrix();\n/* 87 */ GlStateManager.scale(0.45454544F, 0.41322312F, 0.45454544F);\n/* 88 */ GlStateManager.translate(0.0F, 33.0F * scale, 0.0F);\n/* 89 */ this.leg1.render(scale);\n/* 90 */ this.leg2.render(scale);\n/* 91 */ this.leg3.render(scale);\n/* 92 */ this.leg4.render(scale);\n/* 93 */ GlStateManager.popMatrix();\n/* */ }\n/* */ else {\n/* */ \n/* 97 */ this.head.render(scale);\n/* 98 */ this.body.render(scale);\n/* 99 */ this.leg1.render(scale);\n/* 100 */ this.leg2.render(scale);\n/* 101 */ this.leg3.render(scale);\n/* 102 */ this.leg4.render(scale);\n/* */ } \n/* */ \n/* 105 */ if (flag) {\n/* */ \n/* 107 */ this.field_191226_i.render(scale);\n/* 108 */ this.field_191227_j.render(scale);\n/* */ } \n/* */ }", "@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0, 0, 0.2f, 1);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tupdate(delta);\n\t\tbatch.disableBlending();\n\t\tbatch.enableBlending();\n\t\tpresent(delta);\n\t\tsuper.render(delta);\n\t}", "public void renderTileEntityAt(TileGolemBuilder tile, double par2, double par4, double par6, float pt, int destroyStage) {\n/* 41 */ GL11.glPushMatrix();\n/* 42 */ GL11.glTranslatef((float)par2 + 0.5F, (float)par4, (float)par6 + 0.5F);\n/* 43 */ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n/* */ \n/* 45 */ func_147499_a(TEX);\n/* */ \n/* 47 */ if (destroyStage >= 0) {\n/* */ \n/* 49 */ func_147499_a(field_178460_a[destroyStage]);\n/* 50 */ GlStateManager.func_179128_n(5890);\n/* 51 */ GlStateManager.func_179094_E();\n/* 52 */ GlStateManager.func_179152_a(5.0F, 5.0F, 2.0F);\n/* 53 */ GlStateManager.func_179109_b(0.0625F, 0.0625F, 0.0625F);\n/* 54 */ GlStateManager.func_179128_n(5888);\n/* */ } else {\n/* 56 */ GL11.glMatrixMode(5890);\n/* 57 */ GL11.glLoadIdentity();\n/* 58 */ GL11.glScalef(1.0F, -1.0F, 1.0F);\n/* 59 */ GL11.glMatrixMode(5888);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 64 */ EnumFacing facing = BlockStateUtils.getFacing(tile.func_145832_p());\n/* 65 */ if (tile.func_145831_w() != null) {\n/* 66 */ switch (facing.ordinal()) { case 5:\n/* 67 */ GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); break;\n/* 68 */ case 4: GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); break;\n/* 69 */ case 3: GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);\n/* */ break; }\n/* */ \n/* */ \n/* */ \n/* */ }\n/* 75 */ this.model.renderAllExcept(new String[] { \"press\" });\n/* */ \n/* 77 */ GL11.glPushMatrix();\n/* 78 */ float h = tile.press;\n/* 79 */ double s = Math.sin(Math.toRadians(h)) * 0.625D;\n/* 80 */ GL11.glTranslated(0.0D, -s, 0.0D);\n/* 81 */ this.model.renderPart(\"press\");\n/* 82 */ GL11.glPopMatrix();\n/* */ \n/* 84 */ if (destroyStage >= 0) {\n/* */ \n/* 86 */ GlStateManager.func_179128_n(5890);\n/* 87 */ GlStateManager.func_179121_F();\n/* 88 */ GlStateManager.func_179128_n(5888);\n/* */ } else {\n/* 90 */ GL11.glMatrixMode(5890);\n/* 91 */ GL11.glLoadIdentity();\n/* 92 */ GL11.glScalef(1.0F, 1.0F, 1.0F);\n/* 93 */ GL11.glMatrixMode(5888);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 98 */ GL11.glTranslatef(-0.3125F, 0.625F, 1.3125F);\n/* 99 */ GL11.glRotatef(90.0F, -1.0F, 0.0F, 0.0F);\n/* 100 */ TextureAtlasSprite icon = Minecraft.func_71410_x().func_175602_ab().func_175023_a().func_178122_a(Blocks.field_150353_l.func_176223_P());\n/* 101 */ UtilsFX.renderQuadFromIcon(icon, 0.625F, 1.0F, 1.0F, 1.0F, 200, 771, 1.0F);\n/* */ \n/* 103 */ GL11.glPopMatrix();\n/* */ }", "public void doRender(EntityLivingBase entity, double x, double y, double z, float p_76986_8_, float partialTicks)\n {\n this.func_180579_a((EntityMaxZombie)entity, x, y, z, p_76986_8_, partialTicks);\n }", "public void fullRenderRefresh() {\n gameChanged = true;\n visionChanged = true;\n backgroundChanged = true;\n selectionChanged = true;\n movementChanged = true;\n }", "@Override\n public void onNewFrame(HeadTransform headTransform) {\n float[] mtx = new float[16];\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);\n surface.updateTexImage();\n surface.getTransformMatrix(mtx);\n }", "boolean render(final CoreGL gl, float deltaTime);", "public void onLivingUpdate()\n {\n if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild())\n {\n float var1 = this.getBrightness(100.0F);\n\n if (var1 > 0.5F && this.rand.nextFloat() * 30.0F < (var1 - 0.4F) * 2.0F && this.worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))\n {\n boolean var2 = true;\n ItemStack var3 = this.getEquipmentInSlot(4);\n\n if (var3 != null)\n {\n if (var3.isItemStackDamageable())\n {\n var3.setItemDamage(var3.getItemDamageForDisplay() + this.rand.nextInt(2));\n\n if (var3.getItemDamageForDisplay() >= var3.getMaxDamage())\n {\n this.renderBrokenItemStack(var3);\n this.setCurrentItemOrArmor(4, (ItemStack)null);\n }\n }\n\n var2 = false;\n }\n\n if (var2)\n {\n this.setFire(-99);\n }\n }\n }\n\n super.onLivingUpdate();\n }", "protected void tick() {\n\t\tentities.updateEntities();\n\t\tentities.lateUpdateEntities();\n\t\tentities.killUpdateEntities();\n\t\tif(Game.isServer) entities.updateRespawnEntities();\n\t}", "private void render(Vec3d playerPos) {\n GlStateManager.pushMatrix();\n GlStateManager.translated(- playerPos.getX(), - playerPos.getY(), - playerPos.getZ());//The render starts at the player, so we subtract the player coords and move the render to 0,0,0\n GlStateManager.callList(callList);\n GlStateManager.popMatrix();\n }", "@Override\n\tprotected void processEntity(Entity entity, float deltaTime) {\n\t\t\n\t}", "public void drawScreen(int mouseX, int mouseY, float partialTicks)\r\n\t{\r\n\r\n\t\tGL11.glDisable(GL11.GL_ALPHA_TEST);\r\n\t\tGL11.glEnable(GL11.GL_ALPHA_TEST);\r\n\t\tTessellator tessellator = Tessellator.getInstance();\r\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\r\n\t\tMinecraft.getMinecraft().getTextureManager().bindTexture(getRandomTexture());\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tbufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\r\n\t\tbufferbuilder.pos(0.0D, (double)this.height, 0.0D).tex(0, (double) (1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, (double)this.height, 0.0D).tex((double)1F, (double)(1F + (float)mouseX)).endVertex();\r\n\t\tbufferbuilder.pos((double)this.width, 0.0D, 0.0D).tex((double)1F , (double)mouseX).endVertex();\r\n\t\tbufferbuilder.pos(0, 0, 0).tex(0, mouseX).endVertex();\r\n\t\ttessellator.draw();\r\n\r\n\t\t//title textures + splash\r\n\t\tthis.mc.getTextureManager().bindTexture(MINECRAFT_TITLE_TEXTURES);\r\n\t\tGlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tint j = this.width / 2 - 137;\r\n\t\tif ((double)this.minceraftRoll < 1.0E-4D)\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 99, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99, 30, 129, 0, 27, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26, 30, 126, 0, 3, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 99 + 26 + 3, 30, 99, 0, 26, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthis.drawTexturedModalRect(j + 0, 30, 0, 0, 155, 44);\r\n\t\t\tthis.drawTexturedModalRect(j + 155, 30, 0, 45, 155, 44);\r\n\t\t}\r\n\t\tthis.mc.getTextureManager().bindTexture(field_194400_H);\r\n\t\tdrawModalRectWithCustomSizedTexture(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);\r\n\t\tGlStateManager.pushMatrix();\r\n\t\tGlStateManager.translate((float)(this.width / 2 + 90), 70.0F, 0.0F);\r\n\t\tGlStateManager.rotate(-20.0F, 0.0F, 0.0F, 1.0F);\r\n\t\tfloat f = 1.8F - MathHelper.abs(MathHelper.sin((float)(Minecraft.getSystemTime() % 1000L) / 1000.0F * ((float)Math.PI * 2F)) * 0.1F);\r\n\t\tf = f * 100.0F / (float)(this.fontRenderer.getStringWidth(this.splashText) + 32);\r\n\t\tGlStateManager.scale(f, f, f);\r\n\t\tthis.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, -256);\r\n\t\tGlStateManager.popMatrix();\r\n\t\t//End\r\n\r\n\t\tString s = \"Minecraft 1.12.2\";\r\n\r\n\t\tif (this.mc.isDemo())\r\n\t\t{\r\n\t\t\ts = s + \" Demo\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ts = s + (\"release\".equalsIgnoreCase(this.mc.getVersionType()) ? \"\" : \"/\" + this.mc.getVersionType());\r\n\t\t}\r\n\t\tthis.drawString(this.fontRenderer, \"Frame: \"+RandomTexture, this.width - this.fontRenderer.getStringWidth(\"Frame: \"+RandomTexture) - 2, this.height - 30, 16777215);\r\n\t\tthis.drawString(this.fontRenderer, \"Modified by Will0376\", this.width - this.fontRenderer.getStringWidth(\"Modified by Will0376\") - 2, this.height - 20, 16777215);\r\n\r\n\t\tList<String> brandings = Lists.reverse(FMLCommonHandler.instance().getBrandings(true));\r\n\t\tList<String> brdlist = new ArrayList<>();\r\n\t\tfor(int i = 0;i < brandings.size();i++){\r\n\t\t\tif(brandings.get(i).contains(\"MCP\")){\r\n\t\t\t}\r\n\t\t\telse if(brandings.get(i).contains(\"Forge\")){\r\n\t\t\t\tbrdlist.add(\"Forge:\"+(brandings.get(i).split(\"Forge\")[1]));\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tbrdlist.add(brandings.get(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int brdline = 0; brdline < brdlist.size(); brdline++)\r\n\t\t{\r\n\t\t\tString brd = brdlist.get(brdline);\r\n\t\t\tif (!Strings.isNullOrEmpty(brd))\r\n\t\t\t{\r\n\t\t\t\tthis.drawString(this.fontRenderer, brd, 2, this.height - ( 10 + brdline * (this.fontRenderer.FONT_HEIGHT + 1)), 16777215);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.drawString(this.fontRenderer, \"Copyright Mojang AB. Do not distribute!\", this.widthCopyrightRest, this.height - 10, -1);\r\n\r\n\r\n\t\tsuper.drawScreen(mouseX, mouseY, partialTicks);\r\n\t}", "@SideOnly(Side.CLIENT)\n boolean needsRenderUpdate(World world, BlockPos pos, IBlockState state, T tile);", "@Override\n\tpublic void render(Entity parEntity, float parTime, float parSwingSuppress, float par4, float parHeadAngleY, float parHeadAngleX, float par7)\n {\n \trenderElephant((EntityElephant) parEntity, parTime, parSwingSuppress, par4, parHeadAngleY, parHeadAngleX, par7);\n }", "public void renderLoop() {\n\t\tplayer.move(calculateVectorDirectionBetweenEyeAndCenter());\n\t\tcamera.move();\n\t\tm.setLookAt(camera.getPosition().x,\n\t\t\t\tcamera.getPosition().y + 10,\n\t\t\t\tcamera.getPosition().z,\n\t\t\t\tplayer.getPosition().x,\n\t\t\t\tplayer.getPosition().y + 10,\n\t\t\t\tplayer.getPosition().z,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).x,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).y,\n\t\t\t\tcalculateUpVectorOfCameraPosition(secondOrthogonalVector).z);\n\t\tm.get(fb);\n\n\t\tglLoadMatrixf(fb);\n\t\t\n\t\tglPushMatrix();\n\t\t\tupdateSpotLight();\n\t\t\tupdatePointLight();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglPolygonMode(GL_BACK, GL_FILL);\n\t\t\tglPolygonMode(GL_FRONT, GL_POINT);\n\t\t\tterrain.generateCave();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglPolygonMode(GL_FRONT, GL_FILL);\n\t\t\tterrain.generateGround();\n\t\tglPopMatrix();\n\n\t\tglPushMatrix();\n\t\t\tterrain.drawEnd();\n\t\tglPopMatrix();\n\t\t\n\t\tglPushMatrix();\n\t\t\tglTranslatef(player.getPosition().x, player.getPosition().y, player.getPosition().z);\n\t\t\tglRotatef(player.getRotY(), 0, 1, 0);\n\t\t\tplayer.getModel().draw(player.getMoveAngle());\n\t\tglPopMatrix();\n\t}", "protected void renderModel(EntityEnderPig p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)\n {\n \tif (p_77036_1_.getSaddled()) {\n \t\tthis.bindTexture(saddledPigTextures);\n \t\tGL11.glPushMatrix();\n \t\tGL11.glScaled(1.1, 1.1, 1.1);\n \t\tGL11.glTranslated(0, -0.08, 0);\n \t\tthis.mainModel.render(p_77036_1_, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);\n \t\tGL11.glPopMatrix();\n \t}\n \t\n this.bindEntityTexture(p_77036_1_);\n this.mainModel.render(p_77036_1_, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);\n\n if (p_77036_1_.hurtTime > 0)\n {\n GL11.glDepthFunc(GL11.GL_EQUAL);\n GL11.glDisable(GL11.GL_TEXTURE_2D);\n GL11.glEnable(GL11.GL_BLEND);\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);\n GL11.glColor4f(1.0F, 0.0F, 0.0F, 0.5F);\n this.mainModel.render(p_77036_1_, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);\n GL11.glEnable(GL11.GL_TEXTURE_2D);\n GL11.glDisable(GL11.GL_BLEND);\n GL11.glDepthFunc(GL11.GL_LEQUAL);\n }\n }", "private void finalRenderToTexture() {\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glCullFace(GL11.GL_BACK);\n\t\tGL11.glColorMask(true, true, true, true);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glStencilOp(GL11.GL_KEEP, GL11.GL_KEEP, GL11.GL_KEEP);\n\t\tGL11.glDepthMask(false);\n\t\tGL11.glEnable(GL11.GL_STENCIL_TEST);\n\n\t\t// ambient pass\n\t\tGL11.glStencilFunc(GL11.GL_NOTEQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 1);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\t// diffuse pass\n\t\tGL11.glStencilFunc(GL11.GL_EQUAL, 0, 0xff);\n\t\tphongShadowContext.uniform1f(\"ambientOnly\", 0);\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(phongShadowContext);\n\t\t}\n\n\t\tGL11.glDisable(GL11.GL_BLEND);\n\t\tGL11.glDepthFunc(GL11.GL_LEQUAL);\n\t\tGL11.glDepthMask(true);\n\t\tGL11.glDisable(GL11.GL_STENCIL_TEST);\n\n\t\t// SCREEN POST PROCESSING\n\t\tscreenBuffer.copyPixels();\n\t}", "public void markRenderModelsModified() {\n\t\t\n\t\t// TODO dispose of the VBOs!!!\n\t\trenderUnits = null;\n\t\t\n\t}", "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }", "protected void renderModel(EntityLivingBase p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)\n {\n this.renderModel((EntityEnderPig)p_77036_1_, p_77036_2_, p_77036_3_, p_77036_4_, p_77036_5_, p_77036_6_, p_77036_7_);\n }", "@Override\n public void render(float delta) {\n super.render(delta);\n stateTime += delta;\n loadingImage.setDrawable(loadingAnim.getKeyFrame(stateTime,true));\n switch (GameController.getInstance().getCurrentState()) {\n case PLAYING:\n //Game started\n xlpooLsionClient.setScreen(new ControlsScreen(xlpooLsionClient));\n break;\n case SERVER_FULL:\n xlpooLsionClient.setScreen(new ServerFullScreen(xlpooLsionClient));\n break;\n case LOST_CONNECTION:\n xlpooLsionClient.setScreen(new LostConnectionScreen(xlpooLsionClient));\n break;\n }\n }", "@Override\n public void render() {\n GUI.clearScreen();\n if (assetManager.update()) {\n switch (gameState) {\n case MENU:\n GUI.menuLoop();\n break;\n case PAUSE:\n case GAME:\n gameLoop();\n break;\n case LOAD:\n World.load();\n gameState = GameState.GAME;\n break;\n }\n } else {\n GUI.splashScreen(assetManager.getProgress());\n }\n DrawManager.end();\n }", "@Override\n\tpublic void render () \n\t{\t\t\n\t\t\n\t\tfloat deltaTime = Gdx.graphics.getDeltaTime();\n\t\t\n\t\t\n\t\t// TODO make a world component and consider design implications\n \n Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);\n\t\tfor(Entity operableEntity : mamaDukes)\n\t\t{\n\t\t\toperableEntity.Update(deltaTime);\n\t\t}\n\t\t \n\t\tIntrigueGraphicSys.flush();\n\t\t\n\t\tstage.act(deltaTime);\n\t\ttext.setText(\"FPS: \" + Gdx.graphics.getFramesPerSecond());\n\t\tstage.draw();\n\t}", "@Override\n protected void processEntity(Entity entity, float deltaTime) {\n final TransformComponent curTransform = Mapper.TRANSFORM.get(entity);\n final MovementComponent curMovement = Mapper.MOVEMENT.get(entity);\n\n // Store the real normal vector in a temporary object.\n // This vector requires that we normalize the normal vector and scale it to the move speed magnitude.\n Vector2 move_vec = new Vector2(curMovement.MOVEMENT_NORMAL).nor().scl((float)curMovement.moveSpeed * 60f * deltaTime);\n\n // Move and rotate the entity\n curTransform.POSITION.add(move_vec);\n curTransform.rotation += curMovement.rotSpeed * deltaTime;\n\n // Limit rotation to [0, 360) for easy printouts.\n if (curTransform.rotation >= 360)\n curTransform.rotation -= 360;\n if (curTransform.rotation < 0)\n curTransform.rotation += 360;\n }", "public void doRender(EntityEnderPig p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)\n {\n super.doRender((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);\n\n if (p_76986_1_.healingEnderCrystal != null)\n {\n float f2 = (float)p_76986_1_.healingEnderCrystal.innerRotation + p_76986_9_;\n float f3 = MathHelper.sin(f2 * 0.2F) / 2.0F + 0.5F;\n f3 = (f3 * f3 + f3) * 0.2F;\n float f4 = (float)(p_76986_1_.healingEnderCrystal.posX - p_76986_1_.posX - (p_76986_1_.prevPosX - p_76986_1_.posX) * (double)(1.0F - p_76986_9_));\n float f5 = (float)((double)f3 + p_76986_1_.healingEnderCrystal.posY - 1.0D - p_76986_1_.posY - (p_76986_1_.prevPosY - p_76986_1_.posY) * (double)(1.0F - p_76986_9_));\n float f6 = (float)(p_76986_1_.healingEnderCrystal.posZ - p_76986_1_.posZ - (p_76986_1_.prevPosZ - p_76986_1_.posZ) * (double)(1.0F - p_76986_9_));\n float f7 = MathHelper.sqrt_float(f4 * f4 + f6 * f6);\n float f8 = MathHelper.sqrt_float(f4 * f4 + f5 * f5 + f6 * f6);\n GL11.glPushMatrix();\n GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_ + 2.0F, (float)p_76986_6_);\n GL11.glRotatef((float)(-Math.atan2((double)f6, (double)f4)) * 180.0F / (float)Math.PI - 90.0F, 0.0F, 1.0F, 0.0F);\n GL11.glRotatef((float)(-Math.atan2((double)f7, (double)f5)) * 180.0F / (float)Math.PI - 90.0F, 1.0F, 0.0F, 0.0F);\n Tessellator tessellator = Tessellator.instance;\n RenderHelper.disableStandardItemLighting();\n GL11.glDisable(GL11.GL_CULL_FACE);\n this.bindTexture(enderDragonCrystalBeamTextures);\n GL11.glShadeModel(GL11.GL_SMOOTH);\n float f9 = 0.0F - ((float)p_76986_1_.ticksExisted + p_76986_9_) * 0.01F;\n float f10 = MathHelper.sqrt_float(f4 * f4 + f5 * f5 + f6 * f6) / 32.0F - ((float)p_76986_1_.ticksExisted + p_76986_9_) * 0.01F;\n tessellator.startDrawing(5);\n byte b0 = 8;\n\n for (int i = 0; i <= b0; ++i)\n {\n float f11 = MathHelper.sin((float)(i % b0) * (float)Math.PI * 2.0F / (float)b0) * 0.75F;\n float f12 = MathHelper.cos((float)(i % b0) * (float)Math.PI * 2.0F / (float)b0) * 0.75F;\n float f13 = (float)(i % b0) * 1.0F / (float)b0;\n tessellator.setColorOpaque_I(0);\n tessellator.addVertexWithUV((double)(f11 * 0.2F), (double)(f12 * 0.2F) + 1.5, 0.0D, (double)f13, (double)f10);\n tessellator.setColorOpaque_I(16777215);\n tessellator.addVertexWithUV((double)f11, (double)f12, (double)f8, (double)f13, (double)f9);\n }\n\n tessellator.draw();\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glShadeModel(GL11.GL_FLAT);\n RenderHelper.enableStandardItemLighting();\n GL11.glPopMatrix();\n }\n }", "@Override\n\tpublic void render(float delta) {\n\t\ttrainingBag.update();\n\t\ttimeLeft.setText(timeString + (30 - timer.getTotalElapsedTime()));\n\t\thits.setText(hitsString + (20 - trainingBag.getHealth()) + amountString);\n\t\t\n\t\tif(30 - timer.getTotalElapsedTime() < 1) {\n\t\t\teManager.notify(new ControllerEvent(ControllerEvents.SWAP_SCREEN, ScreenType.MAIN_UI));\n\t\t\teManager.notify(new MessageEvent(MessageEvents.POOP_MISTAKE, \"You failed!\", true));\n\t\t}\n\t\tif(trainingBag.getHealth() < 1)\n\t\t\teManager.notify(new ControllerEvent(ControllerEvents.SWAP_SCREEN, ScreenType.STAT_INCREASE_SCREEN));\n\t\t\t\n\t}", "@Override\n\tpublic void render(float delta) {\n\t\tGdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);\n\t\tGdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tcontroller.update(delta, elapsedTime);\n\t\trenderer.render();\n\t\telapsedTime += 1; // count elapsedTime for further control\n\t}", "public final void onWorldTick() {\n onTick();\n }", "@Override\n public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw,\n float headPitch, float scale) {\n this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);\n GlStateManager.pushMatrix();\n\n mainFrame.render(scale);\n\n GlStateManager.popMatrix();\n\n if (true) return;\n\n if (this.isChild) {\n float f = 2.0F;\n GlStateManager.scale(0.5F, 0.5F, 0.5F);\n GlStateManager.translate(0.0F, 24.0F * scale, 0.0F);\n this.bipedLeftLegwear.render(scale);\n this.bipedRightLegwear.render(scale);\n this.bipedLeftArmwear.render(scale);\n this.bipedRightArmwear.render(scale);\n this.bipedBodyWear.render(scale);\n } else {\n if (entityIn.isSneaking()) {\n GlStateManager.translate(0.0F, 0.2F, 0.0F);\n }\n\n this.bipedLeftLegwear.render(scale);\n this.bipedRightLegwear.render(scale);\n this.bipedLeftArmwear.render(scale);\n this.bipedRightArmwear.render(scale);\n this.bipedBodyWear.render(scale);\n }\n\n GlStateManager.popMatrix();\n }", "public void renderWorld(boolean renderWithLight);", "@Override\n\tpublic void render(ItemStack stack, float partialTick, TransformType camera)\n\t{\n\t\tMinecraft mc = Minecraft.getMinecraft();\n\n\t\tif(camera == TransformType.GUI)\n\t\t{\n\t\t\t/*\n\t\t\tGlStateManager.rotate(30F, 0F, 1F, 0F);\n\t\t\tGlStateManager.translate(0.3F, 0.8F, 0F);\n\t\t\tGlStateManager.scale(0.1F , -0.1F, 0.1F);\n\t\t\tthis.model.render(stack, partialTick, 1F);\n\t\t\t*/\n\t\t\tResourceLocation name = stack.getItem().getRegistryName();\n\t\t\tLambdaUtilities.RenderItem(new ModelResourceLocation(new ResourceLocation(name.getResourceDomain(), \"weapon/gui/\" + name.getResourcePath()), \"inventory\"), stack);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//GlStateManager.pushMatrix();\n\t\t\tmc.getTextureManager().bindTexture(texture);\n\t\t\t//GlStateManager.translate(0.5F, 0.8F, 0F);\n\t\t\t//GlStateManager.scale(0.08F, 0.08F, 0.08F);\n\t\t\t//GlStateManager.rotate(180F, 0F, 0F, 1F);\n\t\t\tGlStateManager.disableCull();\n\t\t\tthis.model.render(stack, partialTick, 1F);\n\t\t\t// TODO Pass using entity instead of player\n\t\t\tthis.model.setRotations(stack, partialTick);\n\t\t\tGlStateManager.enableCull();\n\t\t\t//GlStateManager.popMatrix();\n\t\t}\n\t}", "@Override\n public void livingTick() {\n super.livingTick();\n }", "public void render(float delta) {\n\t\tsuper.render(delta);\n\t\tworld.update();\n\t\trender.render();\n\t\t/*if (firstUpdate) {\n\t\t\trender.resetCamera();\n\t\t\tfirstUpdate = false;\n\t\t}*/\n\t}", "public void update() {\n\t\t//TODO: permanent solution to render mode switching (maybe command terminal)\n\t\tif(Input.getInstance().isKeyPushed(Keys.KEY_P)) {\n\t\t\ttestEntity.setActiveRenderComponent(RenderComponents.POINT_RENDERER_COMPONENT);\n\t\t\ttestEntity2.setActiveRenderComponent(RenderComponents.POINT_RENDERER_COMPONENT);\n\t\t}\n\t\tif(Input.getInstance().isKeyPushed(Keys.KEY_L)) {\n\t\t\ttestEntity.setActiveRenderComponent(RenderComponents.WIREFRAME_RENDERER_COMPONENT);\n\t\t\ttestEntity2.setActiveRenderComponent(RenderComponents.WIREFRAME_RENDERER_COMPONENT);\n\t\t}\n\t\tif(Input.getInstance().isKeyPushed(Keys.KEY_O)) {\n\t\t\ttestEntity.setActiveRenderComponent(RenderComponents.RENDERER_COMPONENT);\n\t\t\ttestEntity2.setActiveRenderComponent(RenderComponents.RENDERER_COMPONENT);\n\t\t}\n\t}", "@Override\n public void renderParticle(@Nonnull BufferBuilder buffer, @Nonnull Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ,\n float rotationXY, float rotationXZ) {\n buffer.setTranslation(-0.08 * facing.getDirectionVec().getX() * offset, -particleScale * height, -0.08 * facing.getDirectionVec().getZ() * offset);\n // Lie about rotation so that it always renders facing outwards from the machine\n super.renderParticle(buffer, entityIn, partialTicks, facing.getDirectionVec().getZ(), 1, facing.getDirectionVec().getX(), 0, 0);\n buffer.setTranslation(0, 0, 0);\n }", "@Override\n\tpublic void render() {\n\t\tGdx.gl.glClearColor(0, 0, 0, 0);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tworld.step(1f / 60f, 6, 2);\n\n\t\tgame.act();\n\t\tgame.render();\n\n\t}", "public void render() {\n\t\tRenderUtil.clearScreen();\n\t\t\n\t\tEntityShader.getInstance().updateLights(testLight);\n\t\t\n\t\ttestLight.render();\n\t\t\n\t\tsky.render();\n\t\t\t\t\n\t\ttestEntity.render();\t\t\n\t\ttestEntity2.render();\n\t\t\t\t\n\t\tSystem.out.println(\"Entity: \" + testEntity.getPositon().toString());\n\t\tSystem.out.println(\"Camera: \" + Camera.getInstance().getPosition().toString());\n\t\tSystem.out.println(\"Look: \" + Camera.getInstance().getForward().toString());\n\t\tSystem.out.println(\"Light: \" + testLight.getPosition().toString());\n\t\twindow.render();\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public void drawScreen(int mouseX, int mouseY, float renderPartialTicks) {\n drawDefaultBackground();\n\n drawGuiContainerBackgroundLayer(renderPartialTicks, mouseX, mouseY);\n GL11.glDisable(GL12.GL_RESCALE_NORMAL);\n RenderHelper.disableStandardItemLighting();\n GL11.glDisable(GL11.GL_LIGHTING);\n GL11.glDisable(GL11.GL_DEPTH_TEST);\n\n // GuiScreen code start\n int k;\n for (k = 0; k < this.buttonList.size(); ++k) {\n ((GuiButton) this.buttonList.get(k)).drawButton(this.mc, mouseX, mouseY);\n }\n\n for (k = 0; k < this.labelList.size(); ++k) {\n ((GuiLabel) this.labelList.get(k)).drawLabel(this.mc, mouseX, mouseY);\n }\n // GuiScreen code end\n\n RenderHelper.enableGUIStandardItemLighting();\n GL11.glPushMatrix();\n GL11.glTranslatef((float) guiLeft, (float) guiTop, 0.0F);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n GL11.glEnable(GL12.GL_RESCALE_NORMAL);\n OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) 240 / 1.0F, (float) 240 / 1.0F);\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n\n this.theSlot = getHoveredSlot(mouseX, mouseY);\n\n drawSlots(inventorySlots.inventorySlots, (this.theSlot == null) ? -1 : this.theSlot.slotNumber);\n\n // Forge: Force lighting to be disabled as there are some issue where\n // lighting would\n // incorrectly be applied based on items that are in the inventory.\n GL11.glDisable(GL11.GL_LIGHTING);\n this.drawGuiContainerForegroundLayer(mouseX, mouseY);\n GL11.glEnable(GL11.GL_LIGHTING);\n\n InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;\n ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;\n\n // Draw hold itemStack\n if (itemstack != null) {\n byte b0 = 8;\n int k1 = this.draggedStack == null ? 8 : 16;\n String format = null;\n\n if (this.draggedStack != null && this.isRightMouseClick) {\n itemstack = itemstack.copy();\n itemstack.stackSize = MathHelper.ceiling_float_int((float) itemstack.stackSize / 2.0F);\n } else if (this.dragSplitting && this.dragSplittingSlots.size() > 1) {\n itemstack = itemstack.copy();\n itemstack.stackSize = this.dragSplittingRemnant;\n\n if (itemstack.stackSize == 0) {\n format = \"\" + EnumChatFormatting.YELLOW + \"0\";\n }\n }\n\n this.drawItemStack(itemstack, mouseX - guiLeft - b0, mouseY - guiTop - k1, format);\n }\n\n if (this.returningStack != null) {\n float f1 = (float) (Minecraft.getSystemTime() - this.returningStackTime) / 100.0F;\n\n if (f1 >= 1.0F) {\n f1 = 1.0F;\n this.returningStack = null;\n }\n\n int k1 = this.returningStackDestSlot.xDisplayPosition - this.touchUpX;\n int j2 = this.returningStackDestSlot.yDisplayPosition - this.touchUpY;\n int l1 = this.touchUpX + (int) ((float) k1 * f1);\n int i2 = this.touchUpY + (int) ((float) j2 * f1);\n this.drawItemStack(this.returningStack, l1, i2, null);\n }\n\n GL11.glPopMatrix();\n\n // Render tooltips\n if (inventoryplayer.getItemStack() == null && this.theSlot != null && this.theSlot.getHasStack()) {\n ItemStack itemstack1 = this.theSlot.getStack();\n this.renderToolTip(itemstack1, mouseX, mouseY);\n }\n\n GL11.glEnable(GL11.GL_LIGHTING);\n GL11.glEnable(GL11.GL_DEPTH_TEST);\n RenderHelper.enableStandardItemLighting();\n }", "@Override\n public void dynamicLightTick()\n {\n if (this.world == null || !this.world.isClient())\n return;\n if (!this.removed) {\n this.lambdynlights_luminance = DynamicLightHandlers.getLuminanceFrom((BlockEntity) (Object) this);\n LambDynLights.updateTracking(this);\n\n if (!this.isDynamicLightEnabled()) {\n this.lambdynlights_lastLuminance = 0;\n }\n }\n }", "public void doRender(EntityNinjastar ninjastar, double transX, double transY, double transZ, float param5, float dir){\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n GlStateManager.pushMatrix();\n\n GlStateManager.translate((float) transX, (float) transY, (float) transZ);\n\n //moved\n GlStateManager.enableRescaleNormal();\n float scale = 0.75F;\n GlStateManager.scale(scale, scale, scale);\n\n GlStateManager.rotate(ninjastar.prevRotationYaw + (ninjastar.rotationYaw - ninjastar.prevRotationYaw) * dir - 90.0F, 0.0F, 1.0F, 0.0F);\n GlStateManager.rotate(ninjastar.getRandomTilt(), 1.0F, 0.0F, 0.0F);\n\n //moved\n bindEntityTexture(ninjastar);\n\n Tessellator tessellator = Tessellator.getInstance();\n WorldRenderer worldRenderer = tessellator.getWorldRenderer();\n\n// GlStateManager.enableRescaleNormal();\n\n// float scale = 0.05F;\n// GlStateManager.scale(scale, scale, scale);\n\n GL11.glNormal3f(0.0F, 0.0F, scale);\n\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n GlStateManager.rotate(100.0F, 1.0F, 0.0F, 0.0F);\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n //added\n this.renderItemNinjastar.renderItemModel(this.func_177082_d(ninjastar));\n\n GlStateManager.disableRescaleNormal();\n GlStateManager.popMatrix();\n\n super.doRender(ninjastar, transX, transY, transZ, param5, dir);\n\n }", "public void doRender(EntityMaxZombie entity, double x, double y, double z, float p_76986_8_, float partialTicks)\n {\n this.func_180579_a((EntityMaxZombie)entity, x, y, z, p_76986_8_, partialTicks);\n }", "private void renderHeldItem(EntityLivingBase entity, ItemStack itemStack, ItemCameraTransforms.TransformType transformType, EnumHandSide handSide, float ageInTicks, float scale) {\n/* 78 */ if (!itemStack.isEmpty()) {\n/* */ \n/* 80 */ GlStateManager.pushMatrix();\n/* */ \n/* 82 */ if (entity.isSneaking())\n/* */ {\n/* 84 */ GlStateManager.translate(0.0F, 0.2F, 0.0F);\n/* */ }\n/* */ \n/* 87 */ translateToHand(handSide, scale);\n/* 88 */ GlStateManager.rotate(-90.0F, 1.0F, 0.0F, 0.0F);\n/* 89 */ GlStateManager.rotate(180.0F, 0.0F, 1.0F, 0.0F);\n/* 90 */ boolean flag = (handSide == EnumHandSide.LEFT);\n/* */ \n/* 92 */ if (itemStack.getItem() == Items.BOOK) {\n/* 93 */ renderBook(ageInTicks);\n/* */ } else {\n/* 95 */ Minecraft.getMinecraft().getItemRenderer().renderItemSide(entity, itemStack, transformType, flag);\n/* */ } \n/* 97 */ GlStateManager.popMatrix();\n/* */ } \n/* */ }", "@Override\n public void draw(GameTime gameTime) {\n GL11.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\n if (GlobalState.instance.debugMode) {\n // Draw using the debug renderer\n debugRenderer.draw();\n }\n else {\n // Setup default rendering state\n BlendState.OPAQUE.set();\n DepthState.NONE.set();\n RasterizerState.CULL_NONE.set();\n\n // Draw using the full renderer\n renderer.draw();\n }\n }", "@Override\n\tpublic void tick() {\n\t\trenderer.render(this);\n\t}", "public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)\n {\n this.doRender((EntityBat)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);\n }", "@Override\n public void render() {\n\n renderer.prepWindowRender(globalGameData.getGameWindow());\n renderer.setRenderSpace(0,0,500,500);\n\n\n renderEnvironment(getMainCamera(),testPlayer.getPlayerEntity().getEntityView().getViewableRegions(), instancedGridMesh);\n renderer.enableTransparency();\n walkieTalkie.render(renderer,renderer.getRenderWidth());\n renderer.disableTransparency();\n\n\n\n renderer.setRenderSpace(500,0,500,500);\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderEnvironment(getMainCamera(),currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions(), instancedGridMesh);\n }\n\n renderer.setRenderSpace(1000,0,500,500);\n renderer.enableTransparency();\n renderer.render2DTextItems(debugItems, \"Default2D\");\n renderer.disableTransparency();\n\n /*\n if (currentPlayers.containsKey(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\"))) {\n renderer.setRenderSpace(500, 0, 500, 500);\n for (Region region : currentPlayers.get(UUID.fromString(\"087954ba-2b12-4215-9a90-f7b810797562\")).getEntityView().getViewableRegions()) {\n for (Block block : region.getBlocksArray()) {\n if (block instanceof CustomRenderBlock) {\n ((CustomRenderBlock) block).renderCustomBlock(renderer, camera);\n }\n }\n for (Entity entity : region.getEntities()) {\n entity.render(renderer, camera);\n }\n }\n }\n */\n\n\n //renderer.setRenderSpace(500,0,280,500);\n //SpriteItem spriteItem = new SpriteItem(AssetLoader.getTextureAsset(\"Noise\"),280,500,true);\n //spriteItem.setPosition(0,0,0);\n //renderer.render2DSpriteItem(spriteItem,\"Default2D\");\n //spriteItem.cleanup();\n\n\n\n /*\n renderer.getShader(\"DebugShader2D\").bind();\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, shaderTestBitmap.getId());\n glActiveTexture(GL_TEXTURE2);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect1.getId());\n glActiveTexture(GL_TEXTURE3);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect2.getId());\n glActiveTexture(GL_TEXTURE4);\n glBindTexture(GL_TEXTURE_2D, shaderTestEffect3.getId());\n renderer.getShader(\"DebugShader2D\").setUniform(\"bitmap\", 1);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect1\", 2);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect2\", 3);\n renderer.getShader(\"DebugShader2D\").setUniform(\"effect3\", 4);\n i++;\n i %= 600;\n float framePercent = i / 600.0f;\n renderer.getShader(\"DebugShader2D\").setUniform(\"frame\", framePercent);\n System.out.println(i);\n shaderTest.setPosition((float)gameInput.getMouseX(),(float)gameInput.getMouseY(),0);\n renderer.render2DSprite(shaderTest, \"DebugShader2D\");\n */\n\n\n\n\n\n }", "void updateRenderEngine() {\n if (renderEngine == null)\n renderEngine = this.game.p;\n }", "public void update(){\n\t\tdouble timeStep = (double) 1 / METERS_PER_X_TICKS;\n\t\t\n\t\tdouble newXVel = xVel + xAccel * timeStep;\n\t\tdouble newYVel = yVel + yAccel * timeStep;\n\t\t\n//\t\tdouble deltaX = timeStep * (xVel + newXVel) / 2;\n//\t\tdouble deltaY = timeStep * (yVel + newYVel) / 2;\n\t\t\n\t\tdouble deltaX = timeStep * xVel;\n\t\tdouble deltaY = timeStep * yVel;\n\t\t\n\t\txCoord += deltaX;\n\t\tyCoord += deltaY;\n\t\t\n\t\txVel = newXVel;\n\t\tyVel = newYVel;\n\t\t\n\t\t//record new location\n\t\tif(recordPath)\n\t\t\tmyEnviron.getEntityHistories().get(ID).add(new double[]{xCoord, yCoord, xVel, yVel});\n\t\t\n\t\tcontactBlock = null; // reset to the appropriate block during block collision process, if needed\n\t\tcontactBlockSideNum = -1;\n\t\tcontactBlockVertexNum = -1;\n\t\tlifetime++;\n\t}", "@Override\r\n public void preInit(FMLPreInitializationEvent e) {\n \tModBlocks.registerBlockModels();\r\n \tnet.minecraftforge.fml.client.registry.RenderingRegistry.registerEntityRenderingHandler(EntityTribeling.class, RenderTribeling.FACTORY);\r\n super.preInit(e);\r\n }", "private void updateAndRender(long deltaMillis) {\n currentState.update(deltaMillis / 1000f); \r\n //Double Buffering (reduce tearing)\r\n prepareGameImage();\r\n currentState.render(gameImage.getGraphics(), this.getWidth(), this.getHeight());\r\n renderGameImage(getGraphics());\r\n }", "@Override\n public void onRender(final long ellapsedTime, final double deltaTime) {\n // -- Important. Call render() on the post processing manager.\n //\n\n mEffects.render(ellapsedTime, deltaTime);\n }", "private void renderEntity(MapEntity entity) {\n\t\tdrawEntityTexture(entity);\n\t}", "@SubscribeEvent(receiveCanceled = true)\n\tpublic void onLivingUpdate(@Nonnull final LivingUpdateEvent event) {\n\t\tfinal Entity entity = event.getEntity();\n\t\tif (entity == null || !entity.getEntityWorld().isRemote)\n\t\t\treturn;\n\n\t\tfinal long start = System.nanoTime();\n\t\tfinal IEntityFX cap = CapabilityEntityFXData.getCapability(entity);\n\t\tif (cap != null) {\n\t\t\tfinal double distanceThreshold = ModOptions.effects.specialEffectRange\n\t\t\t\t\t* ModOptions.effects.specialEffectRange;\n\t\t\tfinal boolean inRange = entity.getDistanceSq(EnvironState.getPlayer()) <= distanceThreshold;\n\t\t\tfinal EntityEffectHandler handler = cap.get();\n\t\t\tif (handler != null && !inRange) {\n\t\t\t\tcap.clear();\n\t\t\t} else if (handler == null && inRange && entity.isEntityAlive()) {\n\t\t\t\tlibrary.create(entity).ifPresent(cap::set);\n\t\t\t} else if (handler != null) {\n\t\t\t\thandler.update();\n\t\t\t}\n\t\t}\n\n\t\tthis.nanos += (System.nanoTime() - start);\n\t}", "private void renderEngine() {\r\n GL11.glDisable(GL11.GL_LIGHTING);\r\n\r\n GL11.glEnable(GL11.GL_BLEND);\r\n GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);\r\n\r\n shotTexture.bind();\r\n engine.render();\r\n\r\n GL11.glDisable(GL11.GL_BLEND);\r\n }", "@Override\r\n public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)\r\n {\n \tif (f3 <= -180F) { f3 += 360F; }\r\n \telse if (f3 >= 180F) { f3 -= 360F; }\r\n \t\r\n \tGlStateManager.pushMatrix();\r\n \tGlStateManager.enableBlend();\r\n \tGlStateManager.blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA);\r\n \tGlStateManager.scale(this.scale, this.scale, this.scale);\r\n \tGlStateManager.translate(0F, this.offsetY, 0F);\r\n \t\r\n \t//main body\r\n \tsetRotationAngles(f, f1, f2, f3, f4, f5, entity);\r\n \tthis.BodyMain.render(f5);\r\n \t\r\n \t//light part\r\n \tGlStateManager.disableLighting();\r\n \tGlStateManager.enableCull();\r\n \tOpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240F, 240F);\r\n \tthis.GlowBodyMain.render(f5);\r\n \tGlStateManager.disableCull();\r\n \tGlStateManager.enableLighting();\r\n \t\r\n \tGlStateManager.disableBlend();\r\n \tGlStateManager.popMatrix();\r\n }", "public void doRender(EntityLiving p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)\n {\n this.doRender((EntityEnderPig)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);\n }", "@Override\n\tpublic void update(float deltaTime) {\n\t\t// Set camera to origin with zoom 10\n\t\twindow.setRelativeTransform(Transform.I.scaled(10.0f));\n\t\tworld.update(deltaTime);\n\n\t\tint numberOfCollisions = contactListener.getEntities().size();\n\t\tif (numberOfCollisions > 0) {\n\t\t\tballGraphics.setFillColor(Color.RED);\n\t\t}\n\n\t\t// The actual rendering will be done now, by the program loop\n\t\tballGraphics.draw(window);\n\t\tblockGraphics.draw(window);\n\t}", "public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }", "public void render(int mouseX, int mouseY, float partialTicks)\n {\n this.drawDefaultBackground();\n this.drawCenteredString(this.fontRenderer, I18n.format(\"selectWorld.edit.title\"), this.width / 2, 20, 16777215);\n this.drawString(this.fontRenderer, I18n.format(\"selectWorld.enterName\"), this.width / 2 - 100, 47, 10526880);\n this.nameEdit.func_146194_f();\n super.render(mouseX, mouseY, partialTicks);\n }", "private void updatePosition(FrameTime frameTime) {\n Vector3 desiredWorldPosition = this.desiredWorldPosition;\n if (desiredWorldPosition == null) {\n return;\n }\n\n Vector3 worldPosition = getTransformableNode().getWorldPosition();\n float lerpFactor = MathHelper.clamp(frameTime.getDeltaSeconds() * LERP_SPEED, 0, 1);\n worldPosition = Vector3.lerp(worldPosition, desiredWorldPosition, lerpFactor);\n\n float lengthDiff = Math.abs(Vector3.subtract(desiredWorldPosition, worldPosition).length());\n if (lengthDiff <= POSITION_LENGTH_THRESHOLD) {\n worldPosition = desiredWorldPosition;\n this.desiredWorldPosition = null;\n }\n\n getTransformableNode().setWorldPosition(worldPosition);\n }", "private void doBeforeUpdateModel(final PhaseEvent arg0) {\n\t}", "@Override\n\tpublic void render() {\n\t\tif(!paused){\n\t\t\t//Update the game world with time since last rendered frame\n\t\t\tworldController.update(Gdx.graphics.getDeltaTime());\n\t\t}\n\t\t\n\t\t//Set ClearColor to default color\n\t\tGdx.gl20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\n\t\t//Clear the screen\n\t\tGdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\t\n\t\t//Render the game world to the screen\n\t\tworldRenderer.render();\n\t}", "@Override\n public void preUpdate(GameState currentState) {\n if (window.isCloseRequested())\n engine.shutdown();\n if (glUtils != null) {\n glUtils.color(0.1960784314f, 0.3921568627f, 0.6588235294f, 1.0f);\n glUtils.clear(true, true);\n }\n }", "@Override protected void processEntity(Time time, Entity entity) {\n }", "@Override\n public void render() {\n sortEntities(Entity.getEntities());\n renderBackground();\n renderBattleState();\n if(selectedPc != null){\n MyGL2dRenderer.drawLabel(getSelectedPc().getCollisionBox().left - 4 * GameView.density() + cameraX,\n getSelectedPc().getCollisionBox().bottom - getSelectedPc().getCollisionBox().width() / 5 + cameraY,\n getSelectedPc().getCollisionBox().width() + 8 * GameView.density(),\n getSelectedPc().getCollisionBox().width() * 2 / 5,\n TextureData.selected_character_visual, 255);\n }\n if(!win){\n renderSpells();\n renderGold();\n }\n }", "public void regenerateEntity() {\n boolean isStopRepaint = parent.getStopRepaint();\n parent.setStopRepaint(true);\n\n entityName.setText(component.getName());\n innerRegenerate();\n\n if (!isStopRepaint) parent.goRepaint();\n\n updateHeight();\n }" ]
[ "0.68392295", "0.6717313", "0.64298844", "0.6402979", "0.63936275", "0.62400645", "0.6172357", "0.61009157", "0.6097884", "0.6052275", "0.59932417", "0.58739215", "0.5766924", "0.5721262", "0.57109845", "0.5701763", "0.569012", "0.56899184", "0.5632428", "0.5594924", "0.5559601", "0.5535015", "0.5531107", "0.5514919", "0.55135506", "0.54500276", "0.544914", "0.544535", "0.54032207", "0.5390325", "0.53654647", "0.5363913", "0.5342503", "0.5327287", "0.53209454", "0.53198254", "0.52924126", "0.5290747", "0.52867424", "0.5285654", "0.52765054", "0.5258933", "0.52524304", "0.52280265", "0.5217933", "0.5206622", "0.5203286", "0.52009535", "0.5192048", "0.51913255", "0.5172425", "0.51682097", "0.5141555", "0.51296663", "0.512364", "0.51060456", "0.5101244", "0.5092256", "0.5088238", "0.5085129", "0.5064204", "0.5055162", "0.50503105", "0.50484324", "0.5038873", "0.5028022", "0.50226295", "0.5019163", "0.50168186", "0.50061244", "0.4995588", "0.4988857", "0.49839315", "0.4972425", "0.4969396", "0.495809", "0.49505994", "0.49489096", "0.4946106", "0.49444672", "0.49403623", "0.4939259", "0.493867", "0.49367505", "0.49336025", "0.4929399", "0.49245736", "0.49094564", "0.49086636", "0.49070835", "0.49015242", "0.48821977", "0.48626497", "0.48595163", "0.48593068", "0.48500243", "0.48481673", "0.4845772", "0.48437092", "0.48263705" ]
0.50870687
59
This is overridden to allow transparent stuff to happen.
@Override public void doRender(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6, float par8, float par9) { if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(par1EntityLivingBase, this, par2, par4, par6))) return; GL11.glPushMatrix(); GL11.glDisable(GL11.GL_CULL_FACE); this.mainModel.onGround = this.renderSwingProgress(par1EntityLivingBase, par9); if (this.renderPassModel != null) { this.renderPassModel.onGround = this.mainModel.onGround; } this.mainModel.isRiding = par1EntityLivingBase.isRiding(); if (this.renderPassModel != null) { this.renderPassModel.isRiding = this.mainModel.isRiding; } this.mainModel.isChild = par1EntityLivingBase.isChild(); if (this.renderPassModel != null) { this.renderPassModel.isChild = this.mainModel.isChild; } try { float f2 = this.interpolateRotation(par1EntityLivingBase.prevRenderYawOffset, par1EntityLivingBase.renderYawOffset, par9); float f3 = this.interpolateRotation(par1EntityLivingBase.prevRotationYawHead, par1EntityLivingBase.rotationYawHead, par9); float f4; float f5 = par1EntityLivingBase.prevRotationPitch + (par1EntityLivingBase.rotationPitch - par1EntityLivingBase.prevRotationPitch) * par9; this.renderLivingAt(par1EntityLivingBase, par2, par4, par6); f4 = this.handleRotationFloat(par1EntityLivingBase, par9); this.rotateCorpse(par1EntityLivingBase, f4, f2, par9); float f6 = 0.0625F; GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glScalef(-1.0F, -1.0F, 1.0F); this.preRenderCallback(par1EntityLivingBase, par9); GL11.glTranslatef(0.0F, -24.0F * f6 - 0.0078125F, 0.0F); float f7 = par1EntityLivingBase.prevLimbSwingAmount + (par1EntityLivingBase.limbSwingAmount - par1EntityLivingBase.prevLimbSwingAmount) * par9; float f8 = par1EntityLivingBase.limbSwing - par1EntityLivingBase.limbSwingAmount * (1.0F - par9); if (f7 > 1.0F) { f7 = 1.0F; } GL11.glEnable(GL11.GL_ALPHA_TEST); //GL11.glEnable(GL11.GL_BLEND); //GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); this.mainModel.setLivingAnimations(par1EntityLivingBase, f8, f7, par9); this.renderModel(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); float f9; int i; float f10; float f11; /* for (int j = 0; j < 4; ++j) { i = this.shouldRenderPass(par1EntityLivingBase, j, par9); if (i > 0) { this.renderPassModel.setLivingAnimations(par1EntityLivingBase, f8, f7, par9); this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); if ((i & 240) == 16) { this.func_82408_c(par1EntityLivingBase, j, par9); this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); } if ((i & 15) == 15) { f9 = (float)par1EntityLivingBase.ticksExisted + par9; //this.bindTexture(RES_ITEM_GLINT); GL11.glEnable(GL11.GL_BLEND); f10 = 0.5F; GL11.glColor4f(f10, f10, f10, 1.0F); GL11.glDepthFunc(GL11.GL_EQUAL); GL11.glDepthMask(false); for (int k = 0; k < 2; ++k) { GL11.glDisable(GL11.GL_LIGHTING); f11 = 0.76F; GL11.glColor4f(0.5F * f11, 0.25F * f11, 0.8F * f11, 1.0F); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); //GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE); GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glLoadIdentity(); float f12 = f9 * (0.001F + (float)k * 0.003F) * 20.0F; float f13 = 0.33333334F; GL11.glScalef(f13, f13, f13); GL11.glRotatef(30.0F - (float)k * 60.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, f12, 0.0F); GL11.glMatrixMode(GL11.GL_MODELVIEW); this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); } GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glMatrixMode(GL11.GL_TEXTURE); GL11.glDepthMask(true); GL11.glLoadIdentity(); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glEnable(GL11.GL_LIGHTING); //GL11.glDisable(GL11.GL_BLEND); GL11.glDepthFunc(GL11.GL_LEQUAL); } GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); } } */ GL11.glDisable(GL11.GL_BLEND); GL11.glDepthMask(true); //this.renderEquippedItems(par1EntityLivingBase, par9); float f14 = par1EntityLivingBase.getBrightness(par9); i = this.getColorMultiplier(par1EntityLivingBase, f14, par9); OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glDisable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); // The red hurt animation. if ((i >> 24 & 255) > 0 || par1EntityLivingBase.hurtTime > 0 || par1EntityLivingBase.deathTime > 0) { GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glDepthFunc(GL11.GL_EQUAL); if (par1EntityLivingBase.hurtTime > 0 || par1EntityLivingBase.deathTime > 0) { GL11.glColor4f(f14, 0.0F, 0.0F, 0.4F); this.mainModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); for (int l = 0; l < 4; ++l) { if (this.inheritRenderPass(par1EntityLivingBase, l, par9) >= 0) { GL11.glColor4f(f14, 0.0F, 0.0F, 0.4F); this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); } } } if ((i >> 24 & 255) > 0) { f9 = (float)(i >> 16 & 255) / 255.0F; f10 = (float)(i >> 8 & 255) / 255.0F; float f15 = (float)(i & 255) / 255.0F; f11 = (float)(i >> 24 & 255) / 255.0F; GL11.glColor4f(f9, f10, f15, f11); this.mainModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); for (int i1 = 0; i1 < 4; ++i1) { if (this.inheritRenderPass(par1EntityLivingBase, i1, par9) >= 0) { GL11.glColor4f(f9, f10, f15, f11); this.renderPassModel.render(par1EntityLivingBase, f8, f7, f4, f3 - f2, f5, f6); } } } GL11.glDepthFunc(GL11.GL_LEQUAL); GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_TEXTURE_2D); } GL11.glDisable(GL12.GL_RESCALE_NORMAL); } catch (Exception exception) { exception.printStackTrace(); } OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit); GL11.glEnable(GL11.GL_TEXTURE_2D); OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit); GL11.glEnable(GL11.GL_CULL_FACE); GL11.glPopMatrix(); this.passSpecialRender(par1EntityLivingBase, par2, par4, par6); MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(par1EntityLivingBase, this, par2, par4, par6)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean isOpaque() {\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "private Unescaper() {\n\n\t}", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "protected boolean getTransparent() {\n\treturn isTransparent;\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void prot() {\n }", "protected boolean func_70041_e_() { return false; }", "private void m146649c() {\n if (this.f108106a) {\n getHolder().setFormat(-2);\n setZOrderOnTop(true);\n }\n getHolder().addCallback(this.f108110e);\n setAlpha(0.0f);\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "public final void mo51373a() {\n }", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public boolean isFrozen() {\n return true;\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "protected boolean func_70814_o() { return true; }", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo91720e() {\n super.mo91720e();\n }", "@Override\n public Object preProcess() {\n return null;\n }", "@Override\n public boolean c() {\n return false;\n }", "@Override\n\tpublic void setTransparency(float transparency) {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "@Override\r\n\tpublic void freeze() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void carDashboar() {\n\t\t\r\n\t}", "private TedCorrigendumHandler() {\n throw new AssertionError();\n }", "protected void additionalProcessing() {\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void swim() {\n\t\t\n\t}", "@Override\n public boolean shouldPaint() {\n return false;\n }", "@Override\n\tprotected void enterEffect() {\n\t\t\n\t}", "@Override\r\n\tpublic void exportThis()\r\n\t{\n\t\tsuper.exportThis();\r\n\t}", "private final void i() {\n }", "public boolean isOpaque() {\n return mOpaque;\n }", "public final void mo28153e() {\n super.mo28153e();\n try {\n this.f4965f = null;\n } catch (Exception unused) {\n } catch (Throwable th) {\n this.f4964e.mo28153e();\n throw th;\n }\n this.f4964e.mo28153e();\n }", "public final void mo91715d() {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private final void m90474c() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(2));\n popSelf();\n }", "protected void h() {}", "public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void e() {\n\n\t}", "private stendhal() {\n\t}", "public abstract void wrapup();", "public void method_6191() {\r\n super.method_6191();\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "protected AbstractGeneratedPrefsTransform() {\n\t\tsuper(false);\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n public void render() { super.render(); }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "public void referToSpecialist(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}", "@Override\n public void makeVisible() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "boolean isIgnorable() { return false; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public boolean d() {\n return false;\n }", "public boolean method_208() {\r\n return false;\r\n }", "protected abstract void switchOnCustom();", "private void m50366E() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "@Override\n public void preprocess() {\n }", "@Override\n public boolean isGoodForFrame()\n {\n return false;\n }", "private final void m90475d() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(1));\n popSelf();\n }", "default boolean isSpecial() { return false; }", "@Override\n\tpublic void anular() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo22963g(C7059Ec ec) {\n super.mo22963g(ec);\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void discardUnget() {\n\t\t\n\t}", "@Override\n\tpublic void catchPiece() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "private /* synthetic */ void m57187h() {\n this.f41189e = true;\n }", "@Override\n public boolean isSoft() {\n return true;\n }" ]
[ "0.6782364", "0.66514176", "0.6509575", "0.6252738", "0.6206375", "0.61939687", "0.6188789", "0.6188789", "0.6141817", "0.6122305", "0.6108997", "0.610759", "0.60477567", "0.601463", "0.5984016", "0.5975789", "0.5946111", "0.59255177", "0.5918011", "0.5910088", "0.5901404", "0.5901404", "0.58966213", "0.5890818", "0.5879021", "0.58785796", "0.58726716", "0.5864128", "0.58451116", "0.5828115", "0.5773922", "0.5744251", "0.5724769", "0.5698129", "0.5682474", "0.5674188", "0.56623334", "0.56531227", "0.56490123", "0.5648168", "0.5647413", "0.5647413", "0.5643046", "0.5621708", "0.561182", "0.5609457", "0.5608485", "0.5606303", "0.560553", "0.5590172", "0.55808866", "0.55792344", "0.5560226", "0.5557367", "0.55497944", "0.5543934", "0.5522408", "0.5520019", "0.5514361", "0.5512803", "0.55111754", "0.55111754", "0.55089235", "0.55074644", "0.55053043", "0.54874325", "0.5479072", "0.5478682", "0.54652166", "0.54646695", "0.54618865", "0.54616594", "0.54600394", "0.54547995", "0.5437079", "0.54318583", "0.5424581", "0.542228", "0.54220474", "0.5418224", "0.5416997", "0.541586", "0.54120195", "0.540257", "0.5395361", "0.5392993", "0.5386254", "0.5381466", "0.53655374", "0.53654957", "0.536436", "0.5357041", "0.53531885", "0.5348501", "0.5345769", "0.53437734", "0.53380644", "0.53363466", "0.53335184", "0.5331728", "0.5325615" ]
0.0
-1
Returns a rotation angle that is inbetween two other rotation angles. par1 and par2 are the angles between which to interpolate, par3 is probably a float between 0.0 and 1.0 that tells us where "between" the two angles we are. Example: par1 = 30, par2 = 50, par3 = 0.5, then return = 40
private float interpolateRotation(float par1, float par2, float par3) { float f3; for (f3 = par2 - par1; f3 < -180.0F; f3 += 360.0F) { ; } while (f3 >= 180.0F) { f3 -= 360.0F; } return par1 + par3 * f3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double betweenAngle(Coordinates a, Coordinates b, Coordinates origin);", "public double betweenAngle(Coordinates vectorA, Coordinates vectorB);", "public float calculateCelestialAngle(long par1, float par3)\n {\n return 0.5F;\n }", "public static float getAngleBetween(PVector p1, PVector p2) {\n // float angle = (float) Math.atan2(p2.y - p1.y, p2.x - p1.x);\n\n // Note: Raw values between point 1 and point 2 not valid, as they are are origin-based.\n PVector sub = PVector.sub(p2, p1);\n PVector xaxis = new PVector(1, 0);\n float angle = PVector.angleBetween(xaxis, sub);\n\n if (p2.y < p1.y) {\n angle = PApplet.TWO_PI - angle;\n }\n return angle;\n }", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_78106_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_78106_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_78106_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_78106_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_78106_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_78106_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_78106_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_78106_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_78106_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_78105_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_78105_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }", "public static float getAngle(float x1, float y1, float x2, float y2, float x3, float y3){\n\t\tfloat a2 = Vector2.len2(x3 - x2, y3 - y2);\n\t\tfloat b2 = Vector2.len2(x1 - x2, y1 - y2);\n\t\tfloat c2 = Vector2.len2(x3 - x1, y3 - y1);\n\t\tdouble aLen = Math.sqrt(a2);\n\t\tdouble bLen = Math.sqrt(b2);\n\t\t//c2 == a2 + b2 - (2 * aLen * bLen * x);\n\t\tdouble x = (a2 + b2 - c2) / (2 * aLen * bLen);\n\t\treturn (float) Math.acos(x) * MathUtils.radDeg;\n\t}", "void interpolateQuaternion(double q1w, double q1x, double q1y, double q1z, double q2w, double q2x, double q2y, double q2z, double[] out, double t) {\n\t\t\n\t\t//System.out.println(\"interpolateQuaternion 1 \"+q1w+\" \"+q1x+\" \"+q1y+\" \"+q1z);\n\t\t//System.out.println(\"interpolateQuaternion 2 \"+q2w+\" \"+q2x+\" \"+q2y+\" \"+q2z);\t\t\n\t\t//System.out.println(\"interpolateQuaternion t==\"+t);\n\t\t// Calculate angle between them.\n\t\tdouble cosHalfTheta = q1w * q2w + q1x * q2x + q1y * q2y + q1z * q2z;\n\t\t//System.out.println(\"cosHalfTheta==\"+cosHalfTheta);\n\t\t// if qa=qb or qa=-qb then theta = 0 and we can return qa\n\t\tif (Math.abs(cosHalfTheta) >= 1.0){\n\t\t\tout[0] = q1w; out[1] = q1x; out[2] = q1y; out[3] = q1z;\n\t\t\treturn;\n\t\t}\n\t\t// Calculate temporary values.\n\t\tdouble halfTheta = Math.acos(cosHalfTheta);\n\t\t\n\t\t// This is a workaround because the math is not right and I can't fix it - \n\t\t// prevents rover model from spinning around in the wrong direction, \n\t\t// in other words turning 358 degrees instead of 2 degrees.\n\t\tif (halfTheta > Math.PI/2) {\n\t\t\tif (t < 0.5) {\n\t\t\t\tout[0] = q1w;\n\t\t\t\tout[1] = q1x;\n\t\t\t\tout[2] = q1y;\n\t\t\t\tout[3] = q1z;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tout[0] = q2w;\n\t\t\t\tout[1] = q2x;\n\t\t\t\tout[2] = q2y;\n\t\t\t\tout[3] = q2z;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tdouble sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta*cosHalfTheta);\n\t\t//System.out.println(\"halfTheta==\"+halfTheta+\" sinHalfTheta==\"+sinHalfTheta);\n\t\t\n\t\t// if theta = 180 degrees then result is not fully defined\n\t\t// we could rotate around any axis normal to qa or qb\n\t\tif (Math.abs(sinHalfTheta) < 0.0001){\n\t\t\tout[0] = (q1w * 0.5 + q2w * 0.5);\n\t\t\tout[1] = (q1x * 0.5 + q2x * 0.5);\n\t\t\tout[2] = (q1y * 0.5 + q2y * 0.5);\n\t\t\tout[3] = (q1z * 0.5 + q2z * 0.5);\n\t\t\treturn;\n\t\t}\n\t\tdouble ratioA = Math.sin((1 - t) * halfTheta) / sinHalfTheta;\n\t\tdouble ratioB = Math.sin(t * halfTheta) / sinHalfTheta; \n\t\t//System.out.println(\"ratioA==\"+ratioA+\" ratioB==\"+ratioB);\n\t\t//calculate Quaternion.\n\t\tout[0] = (q1w * ratioA + q2w * ratioB);\n\t\tout[1] = (q1x * ratioA + q2x * ratioB);\n\t\tout[2] = (q1y * ratioA + q2y * ratioB);\n\t\tout[3] = (q1z * ratioA + q2z * ratioB);\n\t}", "public float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 0.0F;\n\t}", "public double getAngle(float x1, float y1, float x2, float y2) {\n\n double rad = Math.atan2(y1-y2,x2-x1) + Math.PI;\n return (rad*180/Math.PI + 180)%360;\n }", "@Override\n\tpublic float calculateCelestialAngle(long par1, float par3) {\n\t\treturn 2.0F;\n\t}", "public float calculateAngle(float x1, float y1, float x2, float y2) {\n float difX = x1 - x2;\n float difY = y1 - y2;\n float angle = (float)(180.0 / Math.PI * Math.atan2(difY, difX));\n if(angle < 0) {\n return 360 + angle;\n }\n return angle;\n }", "public static double getAngle(float x1, float y1, float x2, float y2) {\n\n double rad = Math.atan2(y1 - y2, x2 - x1) + Math.PI;\n return (rad * 180 / Math.PI + 180) % 360;\n }", "private static double getRotation(Position previous, Position current, Position next) {\n \t\tboolean prevAbove = false;\n \t\tboolean prevUnder = false;\n \t\tboolean prevLeft = false;\n \t\tboolean prevRight = false;\n \t\t\n \t\tboolean nextRight = false;\n \t\tboolean nextUnder = false;\n \t\tboolean nextLeft = false;\n \t\tboolean nextAbove = false;\n \t\t\n \t\t/*\n \t\t * Only calculate values if there is a previous\n \t\t * respective next position in.\n \t\t */\n \t\tif (previous != null) {\n \t\t\tprevAbove = previous.getRow() < current.getRow();\n \t\t\tprevUnder = previous.getRow() > current.getRow();\n \t\t\tprevLeft = previous.getCol() < current.getCol();\n \t\t\tprevRight = previous.getCol() > current.getCol();\n \t\t}\n \t\tif (next != null) {\n \t\t\tnextRight = next.getCol() > current.getCol();\n \t\t\tnextUnder = next.getRow() > current.getRow();\n \t\t\tnextLeft = next.getCol() < current.getCol();\n \t\t\tnextAbove = next.getRow() < current.getRow();\n \t\t}\n \t\t/*\n \t\t * If previous is null then only determine rotation based on \n \t\t * next position.\n \t\t * >> Path is always of length 2 at least, therefore no point can\n \t\t * have neither previous or next location.\n \t\t */\n \t\tif (previous == null) {\n \t\t\tif (nextAbove) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t} else if (nextUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn Math.PI;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn 0;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * If next is null then only determine rotation based on \n \t\t * previous position.\n \t\t */\n \t\tif (next == null) {\n \t\t\tif (prevAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevUnder) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * Return rotation based on where the previous and next locations are.\n \t\t */\n \t\tif (prevAbove) {\n \t\t\tif (nextUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t} else if (nextAbove) {\n \t\t\tif (prevUnder) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn Math.PI;\n \t\t\t}\n \t\t} else if (prevUnder) {\n \t\t\tif (nextAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (nextLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (nextRight) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t}\n \t\t} else if (nextUnder) {\n \t\t\tif (prevAbove) {\n \t\t\t\treturn Math.PI/2;\n \t\t\t} else if (prevLeft) {\n \t\t\t\treturn 0;\n \t\t\t} else if (prevRight) {\n \t\t\t\treturn 3*Math.PI/2;\n \t\t\t}\n \t\t}\n \t\t/*\n \t\t * Return 0 to make the compiler happy, will never run\n \t\t * unless previous == current || current == next which\n \t\t * is wrong usage.\n \t\t */\n \t\treturn 0;\n \t}", "private double getPolarAngle(double refX, double refY, double px, double py) {\n\t\tdouble tethaRadian = -1;\n\t\tif ((px - refX) > 0 && (refY - py) >= 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX));\n\t\t} else if ((px - refX) > 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + 2 * Math.PI;\n\t\t} else if ((px - refX) < 0) {\n\t\t\ttethaRadian = Math.atan((refY - py) / (px - refX)) + Math.PI;\n\t\t} else if ((px - refX) == 0 && (refY - py) > 0) {\n\t\t\ttethaRadian = Math.PI / 2;\n\t\t} else if ((px - refX) == 0 && (refY - py) < 0) {\n\t\t\ttethaRadian = 3 * Math.PI / 2;\n\t\t}\n\t\treturn tethaRadian;\n\t}", "public static int findAngle(float x0, float y0, float x1, float y1){\n\t\t\n\t\treturn (int)(Math.atan2(-(x1 - x0), -(y1 - y0))/Math.PI * 180) + 180;\n\t}", "private Vector3f rotate2(float angle, float t, Vector3f X, boolean lerpZ) {\n\t\tVector3f W = project(X, N);\n\t\tVector3f U = X.subtract(W);\n\t\tVector3f result = lerp(W, W.negate(), lerpZ ? t : 0);\n\t\tresult.addScaleLocal(U, (float) Math.cos(angle*t));\n\t\tresult.addScaleLocal(N.cross(U), -(float) Math.sin(angle*t));\n\t\treturn result;\n\t}", "public static double getAngle( GameObject one, GameObject two )\n {\n return Math.atan2( getDeltaY( one, two ), +getDeltaX( one, two ) );\n }", "private static double angulo(Point2D.Double p2,Point2D.Double p1){\n \t\n return Math.atan2(p2.x - p1.x, p2.y - p1.y);\n }", "double getAngle();", "double getAngle();", "public static float angleBetweenLines(float A1x,float A1y,float A2x,\n float A2y,float B1x,float B1y,float B2x, float B2y){\n float angle1 = (float)Math.atan2(A2y - A1y,A1x - A2x);\n float angle2 = (float)Math.atan2(B2y - B1y, B1x - B2x);\n\n float calculatedAngle = (float)Math.toDegrees(angle1 - angle2);\n if (calculatedAngle < 0 ){\n calculatedAngle +=360;\n }\n return calculatedAngle;\n }", "private static double polarTriangleArea(double tan1, double lng1, double tan2, double lng2) {\n double deltaLng = lng1 - lng2;\n double t = tan1 * tan2;\n return 2 * atan2(t * sin(deltaLng), 1 + t * cos(deltaLng));\n }", "static double angle(CvPoint a, CvPoint b, CvPoint c) {\n\t\t\n\t\tCvPoint vecAC = new CvPoint(a.x() - c.x(), a.y() - c.y());\n\t\tCvPoint vecBC = new CvPoint(b.x() - c.x(), b.y() - c.y());\n\n\t\tdouble q = (vecAC.x() * vecBC.x()) + (vecAC.y() * vecBC.y());\n\t\tdouble ac = Math.sqrt(Math.pow(vecAC.x(), 2) + Math.pow(vecAC.y(), 2));\n\t\tdouble cd = Math.sqrt(Math.pow(vecBC.x(), 2) + Math.pow(vecBC.y(), 2));\n\n\t\tdouble ang = q / Math.abs((ac * cd));\n\t\tdouble rad = Math.acos(ang);\n\t\tdouble rad2 = Math.toDegrees(rad);\n\n\t\treturn rad2;\n\t}", "private double angleForRegion(int region) {\n // start from angle 0, divide to the amount of regions with differences of 'angle_difference'\n EqualSegmentDivision angleDivision = EqualSegmentDivision\n .fromCenterSpacingAndAmount(0, ANGLE_DIFFERENCE, REGIONS);\n\n return angleDivision.middlePosition(region);\n }", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "public static double cal_angle_diff(double angle1, double angle2) {\n double a = Math.abs(angle1 - angle2);\n double b;\n if (angle1 > angle2) {\n b = 360 - angle1 + angle2;\n } else {\n b = 360 - angle2 + angle1;\n }\n if (a > b) {\n return b;\n } else {\n return a;\n }\n }", "public static double getAngle(double startAngle, double endAngle) {\n startAngle = normaliseAngle(startAngle);\n endAngle = normaliseAngle(endAngle);\n return Math.abs(Math.min(getAngle(startAngle, endAngle, true), getAngle(startAngle, endAngle, false)));\n }", "AngleSubtract createAngleSubtract();", "public double getAngle2() {\n\n // We experimentally determined the Z axis is the axis we want to use for heading angle.\n // We have to process the angle because the imu works in euler angles so the Z axis is\n // returned as 0 to +180 or 0 to -180 rolling back to -179 or +179 when rotation passes\n // 180 degrees. We detect this transition and track the total cumulative angle of rotation.\n\n Orientation angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\n\n\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n\n globalAngle += deltaAngle;\n\n lastAngles = angles;\n\n return (globalAngle);\n\n }", "public static double angle(ThreeVector v1,ThreeVector v2) {\r\n\t\tdouble a = (scalarProduct(v1,v2))/(v1.magnitude()*v2.magnitude());\r\n\t\tdouble b = Math.acos(a);\r\n\t\treturn Math.toDegrees(b);\r\n\t}", "public static float angleBetween(Vector2f v1, Vector2f v2)\n {\n return FastMath.acos(sameDirection(v1, v2)); // 0-pi\n }", "Angle createAngle();", "double lerp(double x, double a, double b);", "public static Double azimuth(Geometry pointA, Geometry pointB) {\n if (pointA == null || pointB == null) {\n return null;\n }\n if ((pointA instanceof Point) && (pointB instanceof Point)) {\n Double angle;\n double x0 = ((Point) pointA).getX();\n double y0 = ((Point) pointA).getY();\n double x1 = ((Point) pointB).getX();\n double y1 = ((Point) pointB).getY();\n\n if (x0 == x1) {\n if (y0 < y1) {\n angle = 0.0;\n } else if (y0 > y1) {\n angle = Math.PI;\n } else {\n angle = null;\n }\n } else if (y0 == y1) {\n if (x0 < x1) {\n angle = Math.PI / 2;\n } else if (x0 > x1) {\n angle = Math.PI + (Math.PI / 2);\n } else {\n angle = null;\n }\n } else if (x0 < x1) {\n if (y0 < y1) {\n angle = Math.atan(Math.abs(x0 - x1) / Math.abs(y0 - y1));\n } else { /* ( y0 > y1 ) - equality case handled above */\n angle = Math.atan(Math.abs(y0 - y1) / Math.abs(x0 - x1)) + (Math.PI / 2);\n }\n } else { /* ( x0 > x1 ) - equality case handled above */\n if (y0 > y1) {\n angle = Math.atan(Math.abs(x0 - x1) / Math.abs(y0 - y1)) + Math.PI;\n } else { /* ( y0 < y1 ) - equality case handled above */\n angle = Math.atan(Math.abs(y0 - y1) / Math.abs(x0 - x1)) + (Math.PI + (Math.PI / 2));\n }\n }\n return angle;\n }\n return null;\n }", "public double Angle2D(double x1, double y1, double x2, double y2)\n {\n double dtheta,theta1,theta2;\n\n theta1 = Math.atan2(y1,x1);\n theta2 = Math.atan2(y2,x2);\n dtheta = theta2 - theta1;\n while (dtheta > Math.PI)\n dtheta -= 2*Math.PI;\n while (dtheta < -Math.PI)\n dtheta += 2*Math.PI;\n\n return(dtheta);\n}", "AngleResource inclination();", "public static float angleBetweenVectors(Vector3 v1, Vector3 v2)\n\t{\n\t\tfloat v1_len = v1.len();\n\t\tif (v1_len == 0) return 0;\n\t\tfloat v2_len = v2.len();\n\t\tif (v2_len == 0) return 0;\n\n\t\tv3tmp1.set(v1);\n\t\tv3tmp2.set(v2);\n\t\tv3tmp1.scl(1f / v1_len);\n\t\tv3tmp2.scl(1f / v2_len);\n\n\t\tfloat dp_v1n_v2n = v3tmp1.dot(v3tmp2);\n\n\t\tfloat radians = (float)Math.acos(dp_v1n_v2n);\n\t\tif (Float.isNaN(radians)) {\n\t\t\tv3tmp1.add(v3tmp2);\n\t\t\tif (v3tmp1.len2() > 1) {\n\t\t\t\treturn 0;\n\t\t\t} else {\n\t\t\t\treturn 180;\n\t\t\t}\n\t\t}\n\t\treturn MathUtils.radiansToDegrees * radians;\n\t}", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public double getAngle();", "public double getAngle() {\n\treturn CVector.heading(v1, v2);\n }", "public double getStartAngle();", "public double findRotation(Point a, Point b) {\n\t\t// Find rotation in radians using acttan2.\n\t\tdouble rad = Math.atan2(a.y - b.y, a.x - b.x);\n\n\t\t// Remove negative rotation.\n\t\tif (rad < 0) {\n\t\t\trad += 2 * Math.PI;\n\t\t}\n\t\t\n\t\t// Convert the rotation to degrees.\n\t\treturn rad * (180 / Math.PI);\n\t}", "private double getParam(Point p1, Point p2, double[] v1, double[] v2){\n\t\tdouble r;\n\t\t\n\t\tdouble l = _highwayLength;\n\t\t\n\t\t// auxiliary variables\n\t\tdouble A = (Math.pow(v1[0] - v2[0], 2.0)) + (Math.pow(v1[1] - v2[1], 2.0));\n\t\tdouble B = (2 * (p1.posX - p2.posX) * (v1[0] - v2[0])) + (2 * (p1.posY - p2.posY) * (v1[1] - v2[1]));\n\t\tdouble C = (Math.pow(p1.posX - p2.posX, 2.0)) + (Math.pow(p1.posY - p2.posY, 2.0));\n\t\t\n\t\t// using pq formula to find r\n\t\tdouble phalf = B / (2 * A);\n\t\tdouble q = ((C - (l * l)) / A);\n\t\tdouble r1 = - phalf + Math.sqrt((phalf * phalf) - q);\n\t\tdouble r2 = - phalf - Math.sqrt((phalf * phalf) - q);\n\t\t\n\t\tif (r1 >= 0 && r1 <= 1) r = r1;\n\t\telse r = r2;\n\t\t\n\t\treturn r;\n\t}", "Point rotate (double angle, Point result);", "public double getAngle() {\n if (r == 0) {\n if (i == 0)\n return 0;// error?\n if (i > 0)\n return p2;\n else\n return -p2;\n }\n double d = Math.atan(i / r);\n if (r >= 0) {\n return d;\n }\n if (i >= 0)\n return Math.PI + d;\n return d + Math.PI;\n }", "private double calculateAngle(Point2D p, Point2D q)\n {\n return Math.atan2(q.getY() - p.getY(), q.getX() - p.getX());\n }", "public static double getOrient(Position p1, Position p2){\n\t\tdouble lat1 = p1.getLat();\n\t\tdouble lon1 = p1.getLon();\n\t\tdouble lat2 = p2.getLat();\n\t\tdouble lon2 = p2.getLon();\n\t\t\n\t\tdouble dLat = Math.toRadians(lat2-lat1);\n\t\tdouble dLon = Math.toRadians(lon2-lon1);\n\t\tlat1 = Math.toRadians(lat1);\n\t\tlat2 = Math.toRadians(lat2);\n\n\t\t// following code is from http://www.movable-type.co.uk/scripts/latlong.html\n\t\tdouble y = Math.sin(dLon) * Math.cos(lat2);\n\t\tdouble x = Math.cos(lat1)*Math.sin(lat2) - Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);\n\t\tdouble orient = Math.toDegrees(Math.atan2(y, x));\n\t\t//converting orient from a scale of -180 .. + 180 to 0-359 degrees\n\t\tdouble orient360 = (orient + 360) % 360;\n\t\treturn orient360;\n\t}", "private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}", "float calcRotate(float rotateDeg, float anglePerIn)\n {\n return rotateDeg / anglePerIn;\n }", "public static double getPointsAngle(Point center, Point p0, Point p1) {\n\n double p0c = Math.sqrt(Math.pow(center.getX()-p0.getX(),2)+\n Math.pow(center.getY()-p0.getY(),2)); // p0->c (b)\n double p1c = Math.sqrt(Math.pow(center.getX()-p1.getX(),2)+\n Math.pow(center.getY()-p1.getY(),2)); // p1->c (a)\n double p0p1 = Math.sqrt(Math.pow(p1.getX()-p0.getX(),2)+\n Math.pow(p1.getY()-p0.getY(),2)); // p0->p1 (c)\n\n return Math.acos((p1c*p1c+p0c*p0c-p0p1*p0p1)/(2*p1c*p0c));\n }", "Point rotate (double angle);", "public double getAcuteAngle( final LineXY line ) {\n\t\t// get the intersection point\n\t\tfinal PointXY p1 = PointXY.getIntersectionPoint( this, line );\n\t\tif( p1 == null ) {\n\t\t\tthrow new IllegalArgumentException( format( \"No intersection found\" ) );\n\t\t}\n\t\t\n\t\t// get the points of both lines\n\t\tfinal PointXY pa1 = this.getBeginPoint();\n\t\tfinal PointXY pa2 = this.getEndPoint();\n\t\tfinal PointXY pb1 = line.getBeginPoint();\n\t\tfinal PointXY pb2 = line.getEndPoint();\n\t\t\n\t\tfinal PointXY p2 = PointXY.getFarthestPoint( p1, pa1, pa2 );\n\t\tfinal PointXY p3 = PointXY.getFarthestPoint( p1, pb1, pb2 );\n\t\t\n\t\t// are both lines orthogonal?\n\t\tif( this.isOrthogonal() && line.isOrthogonal() ) {\n\t\t\treturn this.isParallelTo( line ) ? 0 : Math.PI;\n\t\t}\n\t\t\n\t\t// is the either line orthogonal?\n\t\telse if( this.isOrthogonal() || line.isOrthogonal() ) {\n\t\t\t// cos t = ( -a^2 + b^2 - c^2 ) / 2cb \n\t\t\tfinal double a = getDistance( p1, p2 );\n\t\t\tfinal double b = getDistance( p1, p3 );\n\t\t\tfinal double c = getDistance( p2, p3 );;\n\t\t\treturn acos( ( -pow(a, 2d) + pow(b, 2d) - pow(c, 2d) ) / ( 2d * c * b ) );\n\t\t}\n\t\t\n\t\t// both must be angular\n\t\telse {\n\t\t\t// tan t = ( m1 - m2 ) / ( 1 + m1 * m2 ); where m2 > m1\n\t\t\tdouble m1 = this.getSlope();\n\t\t\tdouble m2 = line.getSlope();\n\t\t\tif( m1 > m2 ) {\n\t\t\t\tfinal double mt = m1;\n\t\t\t\tm1 = m2;\n\t\t\t\tm2 = mt;\n\t\t\t}\n\t\t\t\n\t\t\t// compute the angle\n\t\t\treturn atan( ( m1 - m2 ) / ( 1 + m1 * m2 ) );\n\t\t}\n\t}", "private float calculateAngle() {\r\n\r\n\t\tdouble angleTemp = Math.atan2(Target.getY() - y, Target.getX() - x);\r\n\t\t// I needed to use wikipedia to get this i\r\n\t\t// did not learn this in math and needed\r\n\t\t// to use a couplle youtube tutorials to\r\n\t\t// find out how to do the math in java\r\n\t\t// aswell thank fully one had the exact\r\n\t\t// way of doing this\r\n\t\treturn (float) Math.toDegrees(angleTemp) + 90;\r\n\t}", "public static double getDiffAngle(double angle1, double angle2) {\r\n\t\t//acos(cos(a1-a2))=acos(cos(a1)*cos(a2)+sin(a1)*sin(a2))--trig identity\r\n\t\treturn Math.abs(Math.acos(Math.cos(angle1) * Math.cos(angle2) + Math.sin(angle1) * Math.sin(angle2)));\r\n\t}", "double adjust_angle_rotation(double angle) {\n double temp;\n temp=angle;\n if(temp>90) {\n temp=180-temp;\n }\n return temp;\n }", "public float getRollRad(float[] quat) {\n float x = quat[0];\n float y = quat[1];\n float z = quat[2];\n float w = quat[3];\n final int pole = getGimbalPole(quat);\n return (float) (pole == 0 ? Math.atan2((double) (2f * (w * z + y * x)), (double) (1f - 2f * (x * x + z * z))) : (float) pole * 2f\n * Math.atan2(y, w));\n }", "static double calculateAngle(Line2D line, ArrowEnd end) {\n \t\t// Translate the line to 0,0\n \t\tdouble x1 = line.getX1();\n \t\tdouble y1 = line.getY1();\n \t\tdouble x2 = line.getX2();\n \t\tdouble y2 = line.getY2();\n \t\tdouble opposite = y2-y1;\n \t\tdouble adjacent = x2-x1;\n \n \t\tdouble radians = Math.atan(opposite/adjacent);\n \n \t\tif (adjacent < 0) radians += Math.PI;\n \n \t\t// TODO: Flip for other end\n \t\treturn radians;\n \t}", "public void calculateAngleAndRotate(){\n\t\tdouble cumarea = 0;\n\t\tdouble sina = 0;\n\t\tdouble cosa = 0;\n\t\tdouble area, angle;\n\t\tfor (int n = 0; n < rt.size();n++) {\n\t\t\tarea = rt.getValueAsDouble(rt.getColumnIndex(\"Area\"),n);\n\t\t\tangle = 2*rt.getValueAsDouble(rt.getColumnIndex(\"Angle\"),n);\n\t\t\tsina = sina + area*Math.sin(angle*Math.PI/180);\n\t\t\tcosa = cosa + area*Math.cos(angle*Math.PI/180);\n\t\t\tcumarea = cumarea+area;\n\t\t}\n\t\taverageangle = Math.abs(0.5*(180/Math.PI)*Math.atan2(sina/cumarea,cosa/cumarea)); // this is the area weighted average angle\n\t\t// rotate the data \n\t\tIJ.run(ActiveImage,\"Select All\",\"\");\n\t\tActiveImageConverter.convertToGray32();\n\t\tIJ.run(ActiveImage,\"Macro...\", \"code=[v= x*sin(PI/180*\"+averageangle+\")+y*cos(PI/180*\"+averageangle+\")]\");\n\t\treturn;\n\t}", "public static double angle(Vector2d v1, Vector2d v2) {\n\t\tdouble angle1 = Math.atan2(v1.y, v1.x);\n\t\tdouble angle2 = Math.atan2(v2.y, v2.x);\n\t\tdouble angle = angle2 - angle1;\n\n\t\tif (angle < -Math.PI)\n\t\t\tangle = 2 * Math.PI + angle;\n\t\telse if (angle > Math.PI)\n\t\t\tangle = angle - 2 * Math.PI;\n\t\telse if (angle == Math.PI)\n\t\t\tangle = -Math.PI;\n\t\treturn angle;\n\t}", "public void rotate(float angle);", "public Coordinates inBetweenPoint(Coordinates a, Coordinates b, double ratio);", "@Override\n\tpublic float getInterpolation(float input) {\n\t\tdouble a = input * PI_3;\n\t\tdouble b = Math.sin(a) / a;\n\t\tdouble c = b * (input * -1 + 1);\n\t\treturn (float) c * -1 + 1;\n\n\t}", "private int orientation(Waypoint w1, Waypoint w3, Waypoint w2){\n\t\tdouble w1x = w1.getX();\n\t\tdouble w1y = w1.getY();\n\t\tdouble w2x = w2.getX();\n\t\tdouble w2y = w2.getY();\n\t\tdouble w3x = w3.getX();\n\t\tdouble w3y = w3.getY();\n\t\tdouble val = (w3y - w1y) * (w2x - w3x) - (w3x - w1x) * (w2y - w3y);\n\t\t\n\tif ( val == 0) //colinear\n\t\treturn 0;\n\t\n\treturn (val > 0) ? 1: 2; //clock or counterclock wise\n\t\n\t}", "@Override\r\n\tpublic void rotateAboutAxis(final double angle, final WB_Point3d p1,\r\n\t\t\tfinal WB_Point3d p2) {\r\n\r\n\t\tfinal WB_Transform raa = new WB_Transform();\r\n\t\traa.addRotateAboutAxis(angle, p1, p2.subToVector(p1));\r\n\r\n\t\traa.applySelf(this);\r\n\r\n\t}", "public double GetGPSBearing(double lat1,\n double lat2, double lon1,\n double lon2) {\n\n\n double currentLatitudeRadians = Math.toRadians(lat1);\n double destinationLatitudeRadians = Math.toRadians(lat2);\n double currentLongitudeRadians = Math.toRadians(lon1);\n double destinationLongitudeRadians = Math.toRadians(lon2);\n\n double y;\n y = Math.sin(destinationLongitudeRadians - currentLongitudeRadians) * Math.cos(destinationLatitudeRadians);\n double x;\n x = Math.cos(currentLatitudeRadians) * Math.sin(destinationLatitudeRadians) -\n Math.sin(currentLatitudeRadians) * Math.cos(destinationLatitudeRadians) * Math.cos(destinationLongitudeRadians - currentLongitudeRadians);\n double bearing = Math.atan2(y, x);\n\n\n return (bearing * 180 / Math.PI + 360) % 360;\n\n }", "public String polarRotation(double angle, double newAngle)\n {\n angle = angle + newAngle;\n \n String str = \"Rotated polar point:\" + angle;\n return str;\n }", "AngleSmaller createAngleSmaller();", "private float angleDistance(float from, float to) {\n float d = to - from;\n if (d > Math.PI) {\n return d - (float) Math.PI;\n }\n if (d < -Math.PI) {\n return d + (float) Math.PI;\n }\n return d;\n }", "private static int orientation(Coord p, Coord r, Coord q) \n { \n // See https://www.geeksforgeeks.org/orientation-3-ordered-points/ \n // for details of below formula. \n int val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); \n \n if (val == 0) return 0; // colinear \n \n return (val > 0)? 1: 2; // clock or counterclock wise \n }", "double getAngle(int id);", "public float getRoll(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float degreeReturn = (float) Math.toDegrees((double) getRollRad(newquat)); // +180 to return between 0 and 360\n\n //-90 to 180\n if (-90f <= degreeReturn && degreeReturn <= 180f) {\n return degreeReturn + 90f;\n } else {\n //-180 to -90\n return degreeReturn + 180 + 270;\n }\n }", "void getAngles(double[] values);", "private float findRotation()\r\n\t{\r\n\t\t//conditionals for all quadrants and axis\r\n\t\tif(tarX > 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY > 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 - Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX < 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 180 + Math.abs(rotation);\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY < 0)\r\n\t\t{\r\n\t\t\trotation = (float) Math.atan((tarY/tarX));\r\n\t\t\trotation = (float) ((rotation*180)/Math.PI);\r\n\t\t\trotation = 90 - Math.abs(rotation);\r\n\t\t\trotation = 270 + rotation;\r\n\t\t}\r\n\t\telse if(tarX > 0 && tarY == 0)\r\n\t\t\trotation = 0;\r\n\t\telse if(tarX == 0 && tarY > 0)\r\n\t\t\trotation = 90;\r\n\t\telse if(tarX < 0 && tarY == 0)\r\n\t\t\trotation = 180;\r\n\t\telse if(tarX == 0 && tarY < 0)\r\n\t\t\trotation = 270;\r\n\t\t\r\n\t\treturn (rotation - 90);\r\n\t}", "static double interpolateDouble(double x, double a, double b, double a1, double b1) {\n // assertTrue(a != b);\n // To get results that are accurate near both A and B, we interpolate starting from the closer\n // of the two points.\n if (Math.abs(a - x) <= Math.abs(b - x)) {\n return a1 + (b1 - a1) * (x - a) / (b - a);\n } else {\n return b1 + (a1 - b1) * (x - b) / (a - b);\n }\n }", "public int getGimbalPole(float[] quat) {\n float x = quat[0];\n float y = quat[1];\n float z = quat[2];\n float w = quat[3];\n final float t = y * x + z * w;\n return t > 0.499f ? 1 : (t < -0.499f ? -1 : 0);\n }", "public static double angle(Point2D a, Point2D b) {\n\t\t// TODO use dot product instead\n\t\tdouble ang = angle(b) - angle(a);\n\t\tif (ang <= Math.PI)\n\t\t\tang += 2 * Math.PI;\n\t\tif (ang >= Math.PI)\n\t\t\tang -= 2 * Math.PI;\n\t\treturn ang;\n\t}", "private double getAngle(){\n //Get a new angle measurement\n angles = imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n //Get the difference between current angle measurement and last angle measurement\n double deltaAngle = angles.firstAngle - lastAngles.firstAngle;\n\n //Process the angle to keep it within (-180,180)\n //(Once angle passes +180, it will rollback to -179, and vice versa)\n if (deltaAngle < -180)\n deltaAngle += 360;\n else if (deltaAngle > 180)\n deltaAngle -= 360;\n\n //Add the change in angle since last measurement (deltaAngle)\n //to the change in angle since last reset (globalAngle)\n globalAngle += deltaAngle;\n //Set last angle measurement to current angle measurement\n lastAngles = angles;\n\n return globalAngle;\n }", "Vec3 interpolate(float ticks);", "public static double getAngle(double startAngle, double endAngle, boolean counterClock) {\n startAngle = normaliseAngle(startAngle);\n endAngle = normaliseAngle(endAngle);\n if (counterClock) {\n return normaliseAngle(endAngle - startAngle);\n } else {\n return normaliseAngle(startAngle - endAngle);\n }\n }", "public double getFirstAngle(){\r\n\t\treturn Math.atan( \r\n\t\t\t\t(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t)\r\n\t\t\t\t/ (\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "protected float handleRotationFloat(EntityLivingBase par1EntityLivingBase, float par2)\n {\n return this.getTailRotation((EntitySpiritWolf)par1EntityLivingBase, par2);\n }", "public Quaternion orientationAlongSegment(Point beg, Point end) {\n\n // Use Apache vectors and matrices to do the math.\n\n Vector3D b = new Vector3D(beg.getX(), beg.getY(), beg.getZ());\n Vector3D e = new Vector3D(end.getX(), end.getY(), end.getZ());\n\n Vector3D vfwd = e.subtract(b);\n\n double len = vfwd.getNorm();\n if (len > 0)\n vfwd = vfwd.normalize();\n else\n vfwd = new Vector3D(1.0, 0.0, 0.0);\n\n Vector3D vdown = new Vector3D(0.0, 0.0, 1.0);\n Vector3D vright = new Vector3D(0.0, 1.0, 0.0);\n\n // Check that the direction of motion is not along the Z axis. In this\n // case the approach of taking the cross product with the world Z will\n // fail and we need to choose a different axis.\n double epsilon = 1.0e-3;\n if (Math.abs(vdown.dotProduct(vfwd)) < 1.0 - epsilon) {\n vright = vdown.crossProduct(vfwd);\n vdown = vfwd.crossProduct(vright);\n if (vdown.getZ() < 0) {\n vright = vright.negate();\n vdown = vfwd.crossProduct(vright);\n }\n }\n else {\n vdown = vfwd.crossProduct(vright);\n vright = vdown.crossProduct(vfwd);\n if (vright.getY() < 0) {\n vdown = vdown.negate();\n vright = vdown.crossProduct(vfwd);\n }\n }\n\n // Make sure all vectors are normalized\n vfwd = vfwd.normalize();\n vright = vright.normalize();\n vdown = vdown.normalize();\n\n // Construct a rotation matrix\n double dcm[][] = new double[3][3];\n dcm[0][0] = vfwd.getX(); dcm[0][1] = vright.getX(); dcm[0][2] = vdown.getX();\n dcm[1][0] = vfwd.getY(); dcm[1][1] = vright.getY(); dcm[1][2] = vdown.getY();\n dcm[2][0] = vfwd.getZ(); dcm[2][1] = vright.getZ(); dcm[2][2] = vdown.getZ();\n Rotation R = new Rotation(dcm, 1e-8);\n\n //Print the rotation matrix\n //double d[][] = R.getMatrix();\n //for (int row = 0; row < 3; row++) {\n // logger.info(\"\\nMatrix is \" +\n //\t\tFloat.toString((float)d[row][0]) + \" \" +\n //\t\tFloat.toString((float)d[row][1]) + \" \" +\n //\t\tFloat.toString((float)d[row][2]));\n //}\n\n return new Quaternion(-(float)R.getQ1(), -(float)R.getQ2(),\n -(float)R.getQ3(), (float)R.getQ0());\n }", "public static float getAngle(float x, float y)\n\t{\n\t\treturn MathUtils.atan2(y, x) * MathUtils.radiansToDegrees - 90;\n\t}", "public double getAngleAway(Point p) {\n if (Math.abs(p.getAngle() - getAngle()) <= 180)\n return p.getAngle() - getAngle();\n else if (p.getAngle() - getAngle() > 0)\n return p.getAngle() - getAngle() - 360;\n else\n return p.getAngle() - getAngle() + 360;\n }", "public static double calculateAngleInDegrees(Vector base, Vector target1, Vector target2) {\n Vector baseToTarget1 = target1.subtract(base);\n Vector baseToTarget1Direction = normalize(baseToTarget1);\n Vector baseToTarget2 = target2.subtract(base);\n Vector baseToTarget2Direction = normalize(baseToTarget2);\n double dotProduct = safeDotProduct(baseToTarget1Direction, baseToTarget2Direction);\n double angleInRadians = Math.acos(dotProduct);\n return Math.toDegrees(angleInRadians);\n }", "static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }", "public static float[] trilaterate(float[] p1, float r1, float[] p2, float r2, float[] p3, float r3) {\r\n float[] pos = new float[2];\r\n pos[0] = calcX(r1, r2, p2[0]);\r\n pos[1] = calcY(r1, r3, p3[0], p3[1], pos[0]);\r\n return pos;\r\n }", "public float getAngleForPoint(float x, float y) {\n /* 262 */\n MPPointF c = getCenterOffsets();\n /* */\n /* 264 */\n double tx = (x - c.x), ty = (y - c.y);\n /* 265 */\n double length = Math.sqrt(tx * tx + ty * ty);\n /* 266 */\n double r = Math.acos(ty / length);\n /* */\n /* 268 */\n float angle = (float) Math.toDegrees(r);\n /* */\n /* 270 */\n if (x > c.x) {\n /* 271 */\n angle = 360.0F - angle;\n /* */\n }\n /* */\n /* 274 */\n angle += 90.0F;\n /* */\n /* */\n /* 277 */\n if (angle > 360.0F) {\n /* 278 */\n angle -= 360.0F;\n /* */\n }\n /* 280 */\n MPPointF.recycleInstance(c);\n /* */\n /* 282 */\n return angle;\n /* */\n }", "public double absoluteBearing( double x1, double y1, double x2, double y2 )\n {\n double xo = x2 - x1;\n double yo = y2 - y1;\n double hyp = Point2D.distance( x1, y1, x2, y2 );\n double arcSin = Math.toDegrees( Math.asin( xo / hyp ) );\n double bearing = 0;\n\n if ( xo > 0 && yo > 0 )\n { // both pos: lower-Left\n bearing = arcSin;\n }\n else if ( xo < 0 && yo > 0 )\n { // x neg, y pos: lower-right\n bearing = 360 + arcSin; // arcsin is negative here, actually 360\n // -\n // ang\n }\n else if ( xo > 0 && yo < 0 )\n { // x pos, y neg: upper-left\n bearing = 180 - arcSin;\n }\n else if ( xo < 0 && yo < 0 )\n { // both neg: upper-right\n bearing = 180 - arcSin; // arcsin is negative here, actually 180\n // +\n // ang\n }\n\n return bearing;\n }", "private void calculateAngle(){\n for (Point point : points) {\n double d = Math.abs(point.x)+Math.abs(point.z);\n double angle = 0;\n\n if (point.x >= 0 && point.z >= 0){\n angle = point.z/d;\n } else if (point.x < 0 && point.z >= 0){\n angle = 2 - point.z/d;\n } else if (point.x < 0 && point.z <0){\n angle = 2 + Math.abs(point.z)/d;\n } else if (point.x >=0 && point.z < 0){\n angle = 4 - Math.abs(point.z)/d;\n }\n point.setAngle(angle);\n }\n Collections.sort(points);\n }", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntByReference particle1, IntByReference particle2, IntByReference particle3, IntByReference particle4, DoubleByReference length, DoubleByReference quadraticK);", "public static Quaternion slerp(Quaternion qa, Quaternion qb, double t) {\n \t// quaternion to return\n \tQuaternion qm = new Quaternion();\n \t// Calculate angle between them.\n \tdouble cosHalfTheta = qa.w * qb.w + qa.x * qb.x + qa.y * qb.y + qa.z * qb.z;\n \t// if qa=qb or qa=-qb then theta = 0 and we can return qa\n \tif (Math.abs(cosHalfTheta) >= 1.0){\n \t\tqm.w = qa.w;\n \t\tqm.x = qa.x;\n \t\tqm.y = qa.y;\n \t\tqm.z = qa.z;\n \t\treturn qm;\n \t}\n \t// Calculate temporary values.\n \tdouble halfTheta = Math.acos(cosHalfTheta);\n \tdouble sinHalfTheta = Math.sqrt(1.0 - cosHalfTheta*cosHalfTheta);\n \t// if theta = 180 degrees then result is not fully defined\n \t// we could rotate around any axis normal to qa or qb\n \tif (Math.abs(sinHalfTheta) < 0.001){ \n \t\tqm.w = (qa.w * 0.5f + qb.w * 0.5f);\n \t\tqm.x = (qa.x * 0.5f + qb.x * 0.5f);\n \t\tqm.y = (qa.y * 0.5f + qb.y * 0.5f);\n \t\tqm.z = (qa.z * 0.5f + qb.z * 0.5f);\n \t\treturn qm;\n \t}\n \tfloat ratioA = (float)(Math.sin((1 - t) * halfTheta) / sinHalfTheta);\n \tfloat ratioB = (float)(Math.sin(t * halfTheta) / sinHalfTheta); \n \t//calculate Quaternion.\n \tqm.w = (qa.w * ratioA + qb.w * ratioB);\n \tqm.x = (qa.x * ratioA + qb.x * ratioB);\n \tqm.y = (qa.y * ratioA + qb.y * ratioB);\n \tqm.z = (qa.z * ratioA + qb.z * ratioB);\n \treturn qm;\n }", "static double angle(PointDouble a, PointDouble o, PointDouble b) {\n Vec oa = vector(o, a), ob = vector(o, b);\n return Math.acos(dot(oa, ob) / (norm(oa) * norm(ob)));\n }", "public static Interval intersection(Interval in1, Interval in2){\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n char p1 = in1.getFEincluded();\r\n char p2 = in1.getSEincluded();\r\n char p3 = in2.getFEincluded();\r\n char p4 = in2.getSEincluded();\r\n \r\n if (a==c && b==d){\r\n if (a==b){\r\n if (p1=='[' && p3=='[' && p2==']' && p4==']'){\r\n return new Interval(in1);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,b,p1==p3?p1:'(',p2==p4?p2:')');\r\n }\r\n }else if (a<c && b<=c){\r\n if (b==c && p2==']' && p3=='['){\r\n return new Interval(b,b,p3,p2);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else if (a<=c && b<d){\r\n if (a==c){\r\n return new Interval(a,b,p1==p3?p1:'(',p2);\r\n }else{\r\n return new Interval(c,b,p3,p2);\r\n }\r\n }else if(a<c && b==d){\r\n return new Interval(c,b,p3,p2==p4?p2:')');\r\n }else if(a<=c && b>d){\r\n if (a==c){\r\n return new Interval(a,d,p1==p3?p1:'(',p4);\r\n }else{\r\n return new Interval(in2);\r\n }\r\n }else if (a>c && b<=d){\r\n if (b==d){\r\n return new Interval(a,b,p1,p2==p4?p2:')');\r\n }else{\r\n return new Interval(in1);\r\n }\r\n }else if (a<=d && b>d){\r\n if (a==d){\r\n if (p1=='[' && p4==']'){\r\n return new Interval(a,a,p1,p4);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,d,p1,p4);\r\n }\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)\n {\n super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);\n this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI);\n this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI);\n this.wolfTail.rotateAngleX = par3;\n }", "public void setAngle( double a ) { angle = a; }", "public Double getMinParallacticAngle(boolean includeSetup) {\n initCircumstances();\n return getMin(continuousPa((includeSetup ? circV : circS).get(Circumstance.PARALLACTIC_ANGLE)));\n }", "private double getAngle(double y, double x) {\n\t\tdouble angle = Math.atan2(y, x);\n\t\tif (angle < 0)\n\t\t\tangle += 2 * Math.PI;\n\t\treturn angle;\n\t}", "public static native void OpenMM_AmoebaInPlaneAngleForce_getAngleParameters(PointerByReference target, int index, IntBuffer particle1, IntBuffer particle2, IntBuffer particle3, IntBuffer particle4, DoubleBuffer length, DoubleBuffer quadraticK);", "public static float angleAtPlane(Vector3 v1, Vector3 v2, Vector3 normal)\n\t{\n\t\t// Get rotation between vectors in case where there is no plane\n\t\tfloat angle = angleBetweenVectors(v1, v2);\n\t\t// Check which side the rotation is\n\t\tv3tmp1.set(v1);\n\t\tv3tmp1.crs(v2);\n\t\tfloat dp = normal.dot(v3tmp1);\n\t\tif (dp < 0) {\n\t\t\tangle = -angle;\n\t\t}\n\t\treturn angle;\n\t}" ]
[ "0.6707381", "0.6194593", "0.61437815", "0.59563506", "0.5941784", "0.59084404", "0.58957344", "0.5836285", "0.5757889", "0.5725171", "0.55862796", "0.55531025", "0.54816103", "0.54223406", "0.5384145", "0.538298", "0.53667974", "0.5356822", "0.53238183", "0.53238183", "0.531808", "0.53021157", "0.52883166", "0.5284313", "0.5282444", "0.52803636", "0.5279654", "0.5265759", "0.5228699", "0.5223469", "0.52232105", "0.5222127", "0.5212975", "0.5196637", "0.5139795", "0.5135051", "0.5118366", "0.5103575", "0.50950456", "0.5078521", "0.5069515", "0.5064179", "0.5042393", "0.5018625", "0.50176746", "0.50025237", "0.4990993", "0.49895906", "0.4988618", "0.49791414", "0.4978994", "0.49580967", "0.49531278", "0.4949904", "0.49383512", "0.49192798", "0.49174213", "0.4916823", "0.49029863", "0.48942757", "0.48861918", "0.4867335", "0.48651236", "0.48621392", "0.48582935", "0.48581785", "0.4848877", "0.48432562", "0.48182765", "0.4787852", "0.47805682", "0.47801882", "0.47690994", "0.47670436", "0.47618854", "0.47591087", "0.47462618", "0.47406837", "0.47293803", "0.4719531", "0.47161797", "0.4712338", "0.47051057", "0.46995407", "0.46987212", "0.46930835", "0.46835554", "0.4679224", "0.46759188", "0.46751937", "0.46712235", "0.4669887", "0.4664507", "0.46569982", "0.46553373", "0.46491227", "0.46447563", "0.46378487", "0.46356922", "0.4616627" ]
0.7950173
0
Defines what float the third param in setRotationAngles of ModelBase is
protected float handleRotationFloat(EntityLivingBase par1EntityLivingBase, float par2) { return this.getTailRotation((EntitySpiritWolf)par1EntityLivingBase, par2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z)\n {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(Cuboid modelRenderer, float x, float y, float z) {\n modelRenderer.rotationPointX = x;\n modelRenderer.rotationPointY = y;\n modelRenderer.rotationPointZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n modelRenderer.rotateAngleX = x;\n modelRenderer.rotateAngleY = y;\n modelRenderer.rotateAngleZ = z;\n }", "public void setRotateAngle(RendererModel RendererModel, float x, float y, float z)\n\t{\n\t\tRendererModel.rotateAngleX = x;\n\t\tRendererModel.rotateAngleY = y;\n\t\tRendererModel.rotateAngleZ = z;\n\t}", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}", "public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {\n\t\tmodelRenderer.rotateAngleX = x;\n\t\tmodelRenderer.rotateAngleY = y;\n\t\tmodelRenderer.rotateAngleZ = z;\n\t}", "public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)\n {\n }", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)\n {\n ModelRenderer[] var8 = this.squidTentacles;\n int var9 = var8.length;\n\n for (int var10 = 0; var10 < var9; ++var10)\n {\n ModelRenderer var11 = var8[var10];\n var11.rotateAngleX = par3;\n }\n }", "public void setRotation(float rotation){\n\t\tmBearing = rotation;\n\t}", "public float getRotation()\n {\n return rotation;\n }", "@Override\npublic void setAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n}", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity)\n {\n super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity);\n this.wolfHeadMain.rotateAngleX = par5 / (180F / (float)Math.PI);\n this.wolfHeadMain.rotateAngleY = par4 / (180F / (float)Math.PI);\n this.wolfTail.rotateAngleX = par3;\n }", "void setRotation (DMatrix3C R);", "public void setAngle( double a ) { angle = a; }", "public void setRotateAngle(Cuboid model, float x, float y, float z) {\n model.pitch = x;\n model.yaw = y;\n model.roll = z;\n }", "public double getRotation();", "public void setAngle(float angle){\n\n\t}", "void setAngle(double angle);", "public void setRotationAngles(float par1, float par2, float par3, float par4, float par5, float par6)\n {\n float f = par3 * (float)Math.PI * -0.1F;\n\n for (int i = 0; i < 4; i++)\n {\n field_78106_a[i].rotationPointY = -2F + MathHelper.cos(((float)(i * 2) + par3) * 0.25F);\n field_78106_a[i].rotationPointX = MathHelper.cos(f) * 9F;\n field_78106_a[i].rotationPointZ = MathHelper.sin(f) * 9F;\n f += ((float)Math.PI / 2F);\n }\n\n f = ((float)Math.PI / 4F) + par3 * (float)Math.PI * 0.03F;\n\n for (int j = 4; j < 8; j++)\n {\n field_78106_a[j].rotationPointY = 2.0F + MathHelper.cos(((float)(j * 2) + par3) * 0.25F);\n field_78106_a[j].rotationPointX = MathHelper.cos(f) * 7F;\n field_78106_a[j].rotationPointZ = MathHelper.sin(f) * 7F;\n f += ((float)Math.PI / 2F);\n }\n\n f = 0.4712389F + par3 * (float)Math.PI * -0.05F;\n\n for (int k = 8; k < 12; k++)\n {\n field_78106_a[k].rotationPointY = 11F + MathHelper.cos(((float)k * 1.5F + par3) * 0.5F);\n field_78106_a[k].rotationPointX = MathHelper.cos(f) * 5F;\n field_78106_a[k].rotationPointZ = MathHelper.sin(f) * 5F;\n f += ((float)Math.PI / 2F);\n }\n\n field_78105_b.rotateAngleY = par4 / (180F / (float)Math.PI);\n field_78105_b.rotateAngleX = par5 / (180F / (float)Math.PI);\n }", "public static double rotation()\r\n\t{\r\n\t\treturn -(mxp.getAngle()/45);\r\n\t}", "public void setRotation(int degree) {\n\trotation = degree;\n}", "public String getUnitOfViewAngle() {\n \treturn \"degrees\";\n }", "public float getOrientacion() { return orientacion; }", "public void setAngle(final float angle);", "public void setRotationAngle(float angle) {\n /* 360 */\n this.mRawRotationAngle = angle;\n /* 361 */\n this.mRotationAngle = Utils.getNormalizedAngle(this.mRawRotationAngle);\n /* */\n }", "public void updateRenderAngles() {\n }", "public float getBaseRotation() {\n return this.baseRotation;\n }", "public void setCameraAngles(float x, float y, float z, float w) {\n\t\tthis.qx=x;\n\t\tthis.qy=y;\n\t\tthis.qz=z;\n\t\tthis.qw=w;\n\t}", "public int getAngle(){\n\t\tif(!resetCoordinates()&&robot.imu1.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu1.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.ZYX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(!resetCoordinates()&&robot.imu.isGyroCalibrated()){\n\t\t\trobot.angles=robot.imu.getAngularOrientation(AxesReference.INTRINSIC, AxesOrder.YZX, AngleUnit.DEGREES);\n\t\t\tdouble currentAngle=robot.angles.firstAngle;\n\t\t\tint finalAngle= robot.startingAngle+(int)Math.round(currentAngle);\n\t\t\tif(finalAngle<0){\n\t\t\t\treturn 360+finalAngle;\n\t\t\t}\n\t\t\treturn finalAngle;\n\n\t\t}\n\t\telse if(resetCoordinates()){\n\t\t\tdouble oldAngle = robot.rotation.thirdAngle;\n\t\t\tdouble posAngle = oldAngle;\n\t\t\tint finalAngle;\n\t\t\tif (oldAngle < 0) posAngle = 360 - Math.abs(oldAngle);\n\t\t\tif((int) (Math.round(posAngle)) - 45 < 0){\n\t\t\t\tfinalAngle = 360-(int)Math.round(posAngle);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfinalAngle = (int) (Math.round(posAngle)) - 45;\n\t\t\t}\n\t\t\treturn finalAngle;\n\t\t}\n\t\telse{\n\t\t\treturn 10000;\n\t\t}\n\t}", "@Override\n\tpublic void setOrientation(float orientation) {\n\t\t\n\t}", "public float getOrientation() {\n return this.orientation + this.baseRotation;\n }", "void setAngles(double[] values);", "public DynamicModelPart setRotation(float[] rotation) {\n this.rotation = rotation;\n return this;\n }", "public abstract double getOrientation();", "public int getCameraSensorRotation();", "public double getAngle() { return angle; }", "int getRotationDegrees() {\n return rotationDegrees;\n }", "public void setAngle(float angle) {\n this.angle = angle;\n float cos = (float) Math.cos(angle);\n float sin = (float) Math.sin(angle);\n m00 = cos;\n m01 = sin;\n m10 = -sin;\n m11 = cos;\n }", "public float getRotation() {\n\t\treturn rotation;\n\t}", "public float getAngle() {\n return angle;\n }", "public float getPitchAngle() { return PitchAngle; }", "public float getRotationAngle() {\n return this.mRotationAngle;\n }", "void setRotations(Vec2 rotations);", "public float getRotation() {\n return this.rotation;\n }", "public float getTargetRotation ()\n {\n return _targetRotation;\n }", "public void updateOrientationAngles() {\n // Update rotation matrix, which is needed to update orientation angles.\n //mSensorManager.getRotationMatrix(mRotationMatrix, null,\n // mAccelerometerReading, mMagnetometerReading);\n\n // \"mRotationMatrix\" now has up-to-date information.\n\n mSensorManager.getOrientation(mRotationMatrix, mOrientationAngles);\n\n // \"mOrientationAngles\" now has up-to-date information.\n\n mGLView.updateScene(mOrientationAngles[0],mOrientationAngles[1],mOrientationAngles[2]);\n }", "public double getAngle();", "public double getRot() {\n return this.rot;\n }", "public int getRotation() {\n\treturn rotation;\n\t//return rotation;\n}", "public void setDeviceRotation(int rotation);", "double getAngle();", "double getAngle();", "@Override\n public void reAngle() {\n }", "public float getBaseVerticalViewAngle() {\n \treturn mCamera.getParameters().getVerticalViewAngle();\n }", "public float getAngle() {\n return angle;\n }", "@Override\n // float limbSwing(par1), float limbSwingAmount(par2), float ageInTicks(par3), float netHeadYaw(par4), float headPitch(par5), float scaleFactor(par6), Entity entityIn(par7):\n public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)\n {\n EntityFamiliar entityFamiliar = (EntityFamiliar)entityIn;\n\n if (entityFamiliar.isCharging())\n {\n if (entityFamiliar.getPrimaryHand() == EnumHandSide.RIGHT)\n {\n this.armRight.rotateAngleX = 3.7699115F;\n }\n else\n {\n this.armLeft.rotateAngleX = 3.7699115F;\n }\n }\n \n // RightArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 2.0F * par2 * 0.5F;\n this.armRight.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 2.0F * limbSwingAmount * 0.5F;\n\n // LeftArm.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 2.0F * par2 * 0.5F;\n this.armLeft.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 2.0F * limbSwingAmount * 0.5F;\n \n // RightArm.rotateAngleZ = 0.0F;\n this.armRight.rotateAngleZ = 0.0F;\n \n // LeftArm.rotateAngleZ = 0.0F;\n this.armLeft.rotateAngleZ = 0.0F;\n \n // Wings (from EntityVex):\n this.wingRight.rotationPointZ = 2.0F;\n this.wingLeft.rotationPointZ = 2.0F;\n this.wingRight.rotationPointY = 1.0F;\n this.wingLeft.rotationPointY = 1.0F;\n this.wingRight.rotateAngleY = 0.47123894F + MathHelper.cos(ageInTicks * 0.8F) * (float)Math.PI * 0.05F;\n this.wingLeft.rotateAngleY = -this.wingRight.rotateAngleY;\n this.wingLeft.rotateAngleZ = -0.47123894F;\n this.wingLeft.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleX = 0.47123894F;\n this.wingRight.rotateAngleZ = 0.47123894F;\n\n // Head.rotateAngleY = par5 (headPitch) / (180F / (float)Math.PI);\n this.head.rotateAngleX = headPitch / (180F / (float)Math.PI);\n\n // Head.rotateAngleY = par4 (netHeadYaw) / (180F / (float)Math.PI);\n this.head.rotateAngleY = netHeadYaw / (180F / (float)Math.PI);\n\n // Tentacles (using spider model):\n //float f = ((float)Math.PI / 4F);\n this.tentacleFrontLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleZ = ((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleZ = -0.58119464F;\n this.tentacleBackMid.rotateAngleZ = 0.58119464F;\n this.tentacleBackLeft.rotateAngleZ = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleZ = ((float)Math.PI / 4F);\n //float f1 = -0.0F;\n //float f2 = 0.3926991F;\n this.tentacleFrontLeft.rotateAngleY = ((float)Math.PI / 4F);\n this.tentacleFrontRight.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleFrontMid.rotateAngleY = 0.3926991F;\n this.tentacleBackMid.rotateAngleY = -0.3926991F;\n this.tentacleBackLeft.rotateAngleY = -((float)Math.PI / 4F);\n this.tentacleBackRight.rotateAngleY = ((float)Math.PI / 4F);\n float f3 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + 0.0F) * 0.4F) * limbSwingAmount;\n float f4 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f5 = -(MathHelper.cos(limbSwing * 0.6662F * 2.0F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n float f6 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + 0.0F) * 0.4F) * limbSwingAmount;\n float f7 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + (float)Math.PI) * 0.4F) * limbSwingAmount;\n float f8 = Math.abs(MathHelper.sin(limbSwing * 0.6662F + ((float)Math.PI * 3F / 2F)) * 0.4F) * limbSwingAmount;\n this.tentacleFrontLeft.rotateAngleY += f3;\n this.tentacleFrontRight.rotateAngleY += -f3;\n this.tentacleFrontMid.rotateAngleY += f4;\n this.tentacleBackMid.rotateAngleY += -f4;\n this.tentacleBackLeft.rotateAngleY += f5;\n this.tentacleBackRight.rotateAngleY += -f5;\n this.tentacleFrontLeft.rotateAngleZ += f6;\n this.tentacleFrontRight.rotateAngleZ += -f6;\n this.tentacleFrontMid.rotateAngleZ += f7;\n this.tentacleBackMid.rotateAngleZ += -f7;\n this.tentacleBackLeft.rotateAngleZ += f8;\n this.tentacleBackRight.rotateAngleZ += -f8;\n }", "float getYaw();", "float getYaw();", "int getSensorRotationDegrees();", "public float getAngle() {\n return mAngle;\n }", "private void setRotation()\n\t{\n\t\tGL11.glPushMatrix();\n\t\tGL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);\n\t}", "@Override\r\n\tpublic void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks,\r\n\t\t\tfloat netHeadYaw, float headPitch) {\n\t}", "public double getRotationAngle() {\n\t\treturn _rotationAngle;\n\t}", "public void setRotation(int rotation) {\r\n\t\tthis.rotation = rotation;\r\n\t}", "@Override\n\tpublic void setRotationAngles(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n\t}", "public void setRotationAngles(float parTime, float parSwingSuppress, float par3, float parHeadAngleY, float parHeadAngleX, float par6, EntityElephant parEntity)\n {\n \t// return rotation point in case there was previous rearing animation\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault, headRotPointZDefault);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault, bodyRotPointZDefault);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault, legFrontRightRotPointZDefault);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault, legFrontLeftRotPointZDefault);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault, childHeadRotPointZDefault);\n\n head.rotateAngleX = degToRad(parHeadAngleX);\n head.rotateAngleY = degToRad(parHeadAngleY);\n childHead.rotateAngleX = degToRad(parHeadAngleX);\n childHead.rotateAngleY = degToRad(parHeadAngleY);\n body.rotateAngleX = ((float)Math.PI / 2F);\n // swingSuppress goes to 0 when still so gates the movement\n legRearRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n legRearLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontRight.rotateAngleX = MathHelper.cos(parTime * 0.6662F + (float)Math.PI) * 1.4F * parSwingSuppress;\n legFrontLeft.rotateAngleX = MathHelper.cos(parTime * 0.6662F) * 1.4F * parSwingSuppress;\n trunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n childTrunk1.rotateAngleX = MathHelper.cos(degToRad(parEntity.ticksExisted*7)) * degToRad(15);\n trunk2.rotateAngleX = trunk1.rotateAngleX * 3;\n\n // flick ears\n ear1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n ear2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n childEar1.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(15);\n childEar2.rotateAngleY = (float) Math.pow(MathHelper.cos(degToRad(parEntity.ticksExisted*3)), 6) * degToRad(-15);\n\n // raise trunk if in water \n if (parEntity.isInWater())\n {\n \ttrunk1.rotateAngleX = degToRad(-150);\n \ttrunk2.rotateAngleX = degToRad(-20);\n \tchildTrunk1.rotateAngleX = degToRad(-150);\n }\n \n // perform rearing animation if appropriate\n if (parEntity.isRearing())\n {\n \tint rearingCounter = parEntity.getRearingCounter();\n// \t// DEBUG\n// \tSystem.out.println(\"ModelElephant entity is rearing with rearing counter = \"+rearingCounter);\n \t\n \t// move retain connection between body parts, hind legs stay where they were\n \thead.setRotationPoint(headRotPointXDefault, headRotPointYDefault+rearingOffsetCycle[rearingCounter][0], headRotPointZDefault+rearingOffsetCycle[rearingCounter][1]);\n body.setRotationPoint(bodyRotPointXDefault, bodyRotPointYDefault+rearingOffsetCycle[rearingCounter][2], bodyRotPointZDefault+rearingOffsetCycle[rearingCounter][3]);\n legFrontRight.setRotationPoint(legFrontRightRotPointXDefault, legFrontRightRotPointYDefault+rearingOffsetCycle[rearingCounter][4], legFrontRightRotPointZDefault+rearingOffsetCycle[rearingCounter][5]);\n legFrontLeft.setRotationPoint(legFrontLeftRotPointXDefault, legFrontLeftRotPointYDefault+rearingOffsetCycle[rearingCounter][6], legFrontLeftRotPointZDefault+rearingOffsetCycle[rearingCounter][7]);\n childHead.setRotationPoint(childHeadRotPointXDefault, childHeadRotPointYDefault+rearingOffsetCycle[rearingCounter][8], childHeadRotPointZDefault+rearingOffsetCycle[rearingCounter][9]);\n \n // rotate for rearing\n \tbody.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n head.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \tchildHead.rotateAngleX += degToRad(rearingAngleCycle[rearingCounter][0]);\n \ttrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \ttrunk2.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][2]);\n \tchildTrunk1.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][1]);\n \tlegFrontRight.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n \tlegFrontLeft.rotateAngleX = degToRad(rearingAngleCycle[rearingCounter][0]);\n }\n }", "public void setRotationAngle(double angle) {\n if (angle >= MIN_ROTATION_ANGLE && angle <= MAX_ROTATION_ANGLE) {\n rotationAngle = angle;\n }\n }", "public double getAngle () {\n return super.getAngle() % 360D;\n }", "public double getYawAngle () {\n return gyro.getAngle() * Math.PI / 180; //Convert the angle to radians.\n }", "public float getBaseHorizontalViewAngle() {\n \treturn mCamera.getParameters().getHorizontalViewAngle();\n }", "@Override\n\tpublic float getOrientation() {\n\t\treturn body.getAngle();\n\t}", "DMatrix3C getRotation();", "public int getAngle() {\r\n return angle;\r\n }", "public void setAngle(float _angle) {\n\t\tthis.angle = _angle;\n\t}", "public double getRotation1() {\n return rotation1;\n }", "int getStartRotationDegree();", "public float getRawRotationAngle() {\n return this.mRawRotationAngle;\n }", "public void setRotation(double rotation)\r\n\t{\r\n\t\t// AutoCAD's angle of rotation is opposite to SVG so\r\n\t\t// we have to convert it.\r\n\t\t// AutoCAD's angles are in radians and turn in the opposite\r\n\t\t// direction to SVG's.\r\n\r\n\t\tRotation = svgUtility.trimDouble(-rotation % 360.0);\r\n\t}", "public void setRotationAngle(float mAngle) {\n mPolygonShapeSpec.setRotation(mAngle);\n rebuildPolygon();\n invalidate();\n }", "public double getAngle(){\n\t\treturn this.angle;\n\t}", "public float getAngle() {\n if(vectorAngle < 0 )\n return (float) Math.toDegrees(Math.atan(longComponent / latComponent));\n else\n return vectorAngle;\n\n }", "@Override\n\tpublic void setRotationAngles(PlayerEntity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){\n\n\t}", "@Override\n public void setOrientation(float x, float y, float z) {\n String degreeString = getString(R.string.motion_orientation_degree);\n /*orientationX.setText(String.format(degreeString, x));\n orientationY.setText(String.format(degreeString, y));\n orientationZ.setText(String.format(degreeString, z));\n*/\n if (gdxAdapter != null) {\n gdxAdapter.setOrientation(x, y, z);\n }\n }", "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.LEFT_5){\n\t\t\t\tfb5.turnLeftBy(2);\n\t\t\t\tangle = (angle+360+5)%360;\n\t\t\t}\n\t\t}", "public int getAngle(){\n\t\treturn (int)angle;\n\t}", "public double getAngle() {\n return angle;\n }", "public double getAngle() {\n return angle;\n }", "public int getRotation() {\r\n\t\treturn rotation;\r\n\t}" ]
[ "0.6821111", "0.6665894", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6592024", "0.6545773", "0.6517089", "0.6517089", "0.6517089", "0.6517089", "0.6517089", "0.64916384", "0.63971424", "0.63687134", "0.632049", "0.62751347", "0.62551916", "0.6229838", "0.6221925", "0.6191899", "0.61570674", "0.6152391", "0.60468173", "0.6038338", "0.60310423", "0.60248554", "0.600764", "0.60005033", "0.5988968", "0.5974399", "0.59484446", "0.5930668", "0.5927051", "0.59223974", "0.5919925", "0.5913355", "0.5909196", "0.5905432", "0.5892075", "0.5888955", "0.588716", "0.58792657", "0.58757126", "0.5869298", "0.5866071", "0.58646923", "0.584561", "0.5843805", "0.5839406", "0.58343387", "0.5824344", "0.5813047", "0.58118075", "0.5798093", "0.57863784", "0.5772157", "0.5772157", "0.5770736", "0.57668835", "0.5763368", "0.57459706", "0.57442486", "0.57442486", "0.5734828", "0.57265073", "0.572584", "0.57220197", "0.5719141", "0.5715878", "0.57080513", "0.5705712", "0.5701035", "0.5694694", "0.56847245", "0.5673534", "0.56691563", "0.5664133", "0.56487095", "0.56485546", "0.56477445", "0.5643864", "0.5633179", "0.56197876", "0.56150144", "0.5606709", "0.5594011", "0.5585774", "0.5566898", "0.5563815", "0.5559574", "0.5554936", "0.5554936", "0.5552211" ]
0.0
-1
Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
protected ResourceLocation getEntityTexture(Entity par1Entity) { return this.func_110914_a((EntitySpiritWolf)par1Entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ResourceLocation getEntityTexture(T entity) {\n return MINECART_TEXTURES;\n }", "@Override\n\tprotected ResourceLocation getEntityTexture(Entity entity) {\n\t\treturn texture;\n\t}", "@Override\n\t\tprotected ResourceLocation getEntityTexture(EntityLivingBase entity) {\n\t\t\treturn texture;\n\t\t}", "protected ResourceLocation getEntityTexture(EntityBat entity)\n {\n return BAT_TEXTURES;\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityBat)p_110775_1_);\n }", "@Nullable\n Identifier getTexture(Entity entity);", "protected ResourceLocation getEntityTexture(T entity) {\n\t\treturn ORECART_TEXTURES;\n\t}", "protected ResourceLocation getEntityTexture(EntitySentientSpecter entity)\n {\n return texture;\n }", "@Override\n public ResourceLocation getTextureLocation(DroneEntity entity) {\n return entity.isAttacking() ? mobShootingTexture : mobTexture;\n }", "protected ResourceLocation getEntityTexture(EntitySquid entity)\n {\n return SQUID_TEXTURES;\n }", "@Overwrite\n protected ResourceLocation getEntityTexture(EntityItem entityItem) {\n ItemStack itemStack = ItemUtils.changeRenderTarget(entityItem.getEntityItem());\n return this.renderManager.renderEngine.getResourceLocation(itemStack.getItemSpriteNumber());\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture0((EntityEnderPig)p_110775_1_);\n }", "protected ResourceLocation getEntityTexture(Entity p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "protected ResourceLocation getEntityTexture(Entity entity)\n {\n return this.func_180578_a((EntityMaxZombie)entity);\n }", "protected ResourceLocation getEntityTexture(Entity par1Entity)\n {\n return this.getCaveSpiderTextures((EntityCaveSpider)par1Entity);\n }", "protected ResourceLocation getEntityTexture(Entity par1Entity)\n {\n return this.getCowTextures((EntityCow)par1Entity);\n }", "protected ResourceLocation getEntityTexture(EntityLiving entity)\n {\n return this.func_180578_a((EntityMaxZombie)entity);\n }", "@Override\r\n\tprotected ResourceLocation getEntityTexture(EntityAngel entity)\r\n {\r\n return ANGEL_TEXTURE;\r\n }", "protected ResourceLocation getEntityTexture(EntityBat p_110775_1_)\n {\n return batTextures;\n }", "protected ResourceLocation getEntityTexture0(EntityEnderPig p_110775_1_)\n {\n return enderPigTextures;\n }", "protected ResourceLocation getEntityTexture(EntityZombie p_110775_1_)\n {\n return this.getEntityTexture((EntityMegaZombie)p_110775_1_);\n }", "public TextureReference getTexture() {\r\n\t\treturn texture;\r\n\t}", "protected ResourceLocation getEntityTexture(EntityMegaZombie p_110775_1_)\n {\n return zombieTextures;\n }", "public Texture getWorldTexture() {\n return frameBuffer.getTexture(0);\n }", "@Override\n\tpublic int getTexture() {\n\t\treturn 0;\n\t}", "public Texture getTexture() {\n\t\treturn region;\n\t}", "public float[] getTextureCoords() {\r\n\t\treturn textureCoords;\r\n\t}", "public String getTexture(){\n\t\treturn texture;\n\t}", "public E3DVector2F getTextureCoordB(){\r\n return vertices[1].getTextureCoord();\r\n }", "public TextureRegion getTexture() {\n \treturn texture;\n }", "TextureAtlas.AtlasRegion getTexture(FileHandle textureFile);", "public int getTextureID() {\n return textureID;\n }", "public INTexture2D getTexture()\n {\n return this.texture.clone();\n }", "public E3DVector2F getTextureCoordC(){\r\n return vertices[2].getTextureCoord();\r\n }", "public String getNormalTexture() {\n return normalTexture;\n }", "@Override\n\tpublic String getTexture() {\n\t\treturn type.getTextureString();\n\t}", "public abstract TextureObject getTexture();", "public E3DVector2F getTextureCoordA(){\r\n return vertices[0].getTextureCoord();\r\n }", "public int getId() {\r\n \t\r\n \treturn textureId;\r\n }", "@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}", "private void renderEntity(MapEntity entity) {\n\t\tdrawEntityTexture(entity);\n\t}", "private void drawEntity(Entity ent) {\n\t\tSprite entSprite = getSprite(ent.getName());\n\t\t\n\t\tglBindTexture(GL_TEXTURE_2D, entSprite.getTexture().getTextureID());\n\t\t\n\t\t// draw entity\n\t\tglBegin(GL_QUADS);\n\t\t{\n\t\t\tglTexCoord2f(0, 0);\n\t\t\tglVertex2d(ent.getX(), ent.getY());\n\t\t\tglTexCoord2f(1, 0);\n\t\t\tglVertex2d(ent.getX() + entSprite.getWidth(), ent.getY());\n\t\t\tglTexCoord2f(1, 1);\n\t\t\tglVertex2d(ent.getX() + entSprite.getWidth(), ent.getY() + entSprite.getHeight());\n\t\t\tglTexCoord2f(0, 1);\n\t\t\tglVertex2d(ent.getX(), ent.getY() + entSprite.getHeight());\n\t\t}\n\t\tglEnd();\n\t\t\n\t\tglBindTexture(GL_TEXTURE_2D, 0);\n\t}", "public float[] getHitTexCoord();", "public SbVec4f\ngetObjectTextureCoords(final SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n return multVecMatrix4(getImageToObject(node), imageTexCoords);\n}", "public TextureRegion getTextureRegion() {\n\t\treturn textureRegion;\n\t}", "@Nonnull\n Texture getWorldMap();", "public Texture getTexture() {\n\t\tPixmap pixmap = null;\n\t\t\n\t\ttry {\n\t\t\tpixmap = new Pixmap(responseBytes, 0, responseBytes.length);\n\t\t} catch (Exception e) {\n\t\t\tGdx.app.error(\"WWW\", \"Cannot get texture: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tfinal int originalWidth = pixmap.getWidth();\n\t\tfinal int originalHeight = pixmap.getHeight();\n\t\tint width = MathUtils.nextPowerOfTwo(pixmap.getWidth());\n\t\tint height = MathUtils.nextPowerOfTwo(pixmap.getHeight());\n\n\t\tint deltaX = (int) ((width - originalWidth) / 2f);\n\t\tint deltaY = (int) ((height - originalHeight) / 2f);\n\n\t\tfinal Pixmap potPixmap = new Pixmap(width, height, pixmap.getFormat());\n\t\tpotPixmap.drawPixmap(pixmap, deltaX, deltaY, 0, 0, pixmap.getWidth(), pixmap.getHeight());\n\t\tpixmap.dispose();\n\t\tTexture texture = new Texture(potPixmap);\n\t\tpotPixmap.dispose();\n\t\treturn texture;\n\t}", "public float getTextureYOffset() {\n\t\tint row = index / texture.getNumberOfRows();\n\t\treturn (float) row / (float) texture.getNumberOfRows();\n\t}", "public TextureComponent2D getTexture(int side)\n {\n return texture[side];\n }", "public ByteBuffer getTextureCoordsBuffer() {\n return texCoordsBuf;\n }", "public float getTextureOffsetY() {\r\n\t\treturn textureY;\r\n\t}", "@Override\n public void loadTexture() {\n\n }", "public int getTextureId() {\n return mTangoCameraTexture == null ? -1 : mTangoCameraTexture.getTextureId();\n }", "public float getTextureOffsetX() {\r\n\t\treturn textureX;\r\n\t}", "public E3DVector2F getTextureCoordDetail0B(){\r\n return vertices[1].getTextureCoordDetail0();\r\n }", "@Override\n\tpublic String getTextureFile() \n\t{\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "@Override\n\tpublic String getTextureFile() {\n\t\treturn \"/reactioncraft/rcs/Blocks.png\";\n\t}", "public Location getCurrentLocation() { return entity.getLocation(); }", "public Texture getImage(){\n\t\treturn images[0];\t\t\n\t}", "String getTextureName();", "protected int getTextureIndex() {\n/* 83 */ return getData() & 0x7;\n/* */ }", "public E3DVector2F getTextureCoordDetail0A(){\r\n return vertices[0].getTextureCoordDetail0();\r\n }", "Texture getIcon();", "public AbstractEntity getEntity() {\n if (entityClass == null) {\n return null;\n }\n try {\n AbstractEntity ent = entityClass.newInstance();\n if (value > -1) {\n ent.setSpriteValue(value);\n }\n return ent;\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(CursorInfo.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "private Bounds getTextureBounds() {\n\t\tfinal float boundsWidth = 2 * OFFSET_X;\n\t\tfinal float boundsHeight = 2 * OFFSET_Y;\n\t\t\n\t\t//Get the center point of the player, then subtract by offset\n\t\tfinal float x = (activePlayer.getX() + activePlayer.getWidth() / 2f) \n\t\t\t\t/ activePlayer.getScaleX() - OFFSET_X;\n\t\tfinal float y = (activePlayer.getY() - activePlayer.getHeight() / 2f) \n\t\t\t\t/ activePlayer.getScaleY() + OFFSET_Y + 1;\n\t\t\n\t\treturn new Bounds(x, y, boundsWidth, boundsHeight);\n\t}", "public E3DVector2F getTextureCoordDetail0C(){\r\n return vertices[2].getTextureCoordDetail0();\r\n }", "protected void customCustomRendering(T entity, double x, double y, double z, float entityYaw, float partialTicks) {}", "static Vector getEntityPosition(Entity entity, Object nmsEntity) {\n if(entity instanceof Hanging) {\n Object blockPosition = ReflectUtils.getField(nmsEntity, \"blockPosition\");\n return MathUtils.moveToCenterOfBlock(ReflectUtils.blockPositionToVector(blockPosition));\n } else {\n return entity.getLocation().toVector();\n }\n }", "public Entity getEntity() {\n\t\treturn entity;\n\t}", "@Override\n\tpublic Entity getEntity() {\n\t\treturn entity;\n\t}", "public float getTextureXOffset() {\n\t\tint column = index % texture.getNumberOfRows();\n\t\treturn (float) column / (float) texture.getNumberOfRows();\n\t}", "public Entity getEntityOn(int x, int y) {\n\t\tfor (int s = 0; s < entities.size(); s++) {\n\t\t\tEntity i = entities.get(s);\n\t\t\tif (i.getX() >> 4 == x >> 4 && i.getY() >> 4 == y >> 4)\n\t\t\t\treturn i;\n\t\t}\n\t\treturn null;\n\n\t}", "public interface Entity {\r\n\r\n /**\r\n * Gets the initial (relative, map) position of the entity.\r\n * \r\n * @return the initial position of the player\r\n */\r\n Pair<Integer, Integer> getInitialPosition();\r\n\r\n /**\r\n * Gets the position of the entity on screen (absolute, pixel).\r\n * \r\n * @return entity current position on screen\r\n */\r\n Pair<Integer, Integer> getPosition();\r\n\r\n /**\r\n * Sets the position of the entity on screen.\r\n * Can be used to change an absolute position (that is grid locked because they're a multiple of a value) \r\n * to a specific position and place an object everywhere you want\r\n * \r\n * Please check {@link TestEntity} for an in-depth explanation of how this works.\r\n * \r\n * @param position defines the entity position on screen\r\n */\r\n void setPosition(Pair<Integer, Integer> position);\r\n\r\n /**\r\n * Gets the hitbox of the entity (a Rectangle if it's solid, null otherwise).\r\n * \r\n * @return the collision box of the entity.\r\n */\r\n Rectangle getCollisionBox();\r\n\r\n /**\r\n * Gets the path of the image that will be used by the view. \r\n * \r\n * @return the path where the image of the entity is located\r\n */\r\n String getImagePath();\r\n\r\n /**\r\n * Sets the path of the image that will be used by the view.\r\n * \r\n * @param path the path where the image of the entity is located\r\n */\r\n void setImagePath(String path);\r\n\r\n /**\r\n * Method that defines if the entity is destroyed or not.\r\n * \r\n * @return true if destroyed, false otherwise\r\n */\r\n boolean isDestroyed();\r\n\r\n /**\r\n * Sets the status of the entity (true if destroyed, false otherwise).\r\n * \r\n * @param destroyed defines if the entity has been destroyed or not\r\n */\r\n void setStatus(boolean destroyed);\r\n\r\n /**\r\n * Gets the entity width.\r\n * \r\n * @return entity width\r\n */\r\n int getWidth();\r\n\r\n /**\r\n * Sets the new entity width.\r\n * \r\n * @param width defines the new entity width\r\n */\r\n void setWidth(int width);\r\n\r\n /**\r\n * Gets the entity height.\r\n * \r\n * @return entity height\r\n */\r\n int getHeight();\r\n\r\n /**\r\n * Sets the new entity height.\r\n * \r\n * @param height defines the new entity width\r\n */\r\n void setHeight(int height);\r\n\r\n /**\r\n * Return the state of the block, if it is solid or not.\r\n * @return true if entity is solid, false otherwise.\r\n */\r\n boolean isSolid();\r\n\r\n /**\r\n * Sets the score value of the entity.\r\n * \r\n * @param scoreValue defines the value that will be given (added) to players score when the entity is destroyed\r\n */\r\n void setScoreValue(int scoreValue);\r\n\r\n /**\r\n * Gets the score value of the entity.\r\n * \r\n * @return a score value that defines the value of the entity\r\n */\r\n int getScoreValue();\r\n}", "public Texture getTexture(int i)\n {\n return mTextures.elementAt(i);\n }", "public String getNomTexture() {\n\t\treturn nomTexture;\n\t}", "public final String getEntity() {\n\t\treturn entity;\n\t}", "public TextureCoord2D texFor (final Point3 point) {\n\n if (point == null)throw new IllegalArgumentException(\"The Point cannot be null!\");\n\n\n double teta = Math.acos(point.y);\n double phi = Math.atan2(point.x, point.z);\n\n return new TextureCoord2D(phi / (Math.PI*2), -teta/Math.PI);\n }", "public static Texture getTex(int type)\n {\n switch(type)\n {\n case FIREBALL:\n return JTactics.assets.fireball;\n case DEFEND:\n return JTactics.assets.shield;\n case SPIRIT_BURST:\n return JTactics.assets.boulder;\n case INVINCIBILITY:\n return JTactics.assets.starPower;\n }\n return null;\n }", "public int getTextureCoordsCount() {\n \tif (texCoordsBuf == null)\n \t\treturn 0;\n \treturn texCoordsBuf.asFloatBuffer().limit()/2;\n }", "public void render(T tileEntity, double x, double y, double z, IBlockState state, World world, BufferBuilder buffer);", "public MapEntity getEntity() {\n\t\treturn _entity;\n\t}", "public void onUpdateTextureCoordinates() {\n getVertexBufferObject().onUpdateTextureCoordinates(this);\n }", "public static float[] createQuadTextureCoords() {\n float[] tex = new float[]{0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f};\n return tex;\n }", "public Entity(String ref,int x,int y) {\n\t\tthis.sprite = SpriteStore.get().getSprite(ref);\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}", "com.google.cloud.videointelligence.v1p2beta1.Entity getEntity();", "void spawnEntityAt(String typeName, int x, int y);", "public E getEntity() {\n return this.entity;\n }", "public Vertice getTextureVertice(int i) {\n\t\treturn textureVertices.get(i);\n\t}", "public String getEntityURI() {\r\n\t\treturn entityURI;\r\n\t}", "public Texture getCurrentFrame(){\n\t\treturn images[currentFrame];\n\t}", "private TextureAtlasSprite getActiveTexture() {\n TextureAtlasSprite activeTexture = Minecraft.getMinecraft().getTextureMapBlocks().getMissingSprite();\n if (texture instanceof TextureBase.Sprite) {\n TextureBase.Sprite sprite = (TextureBase.Sprite) texture;\n activeTexture = sprite.icon;\n } else if (texture instanceof TextureBase.Proxy) {\n TextureBase.Proxy proxySprite = (TextureBase.Proxy) texture;\n if (proxySprite.base instanceof TextureBase.Sprite) {\n activeTexture = ((TextureBase.Sprite) proxySprite.base).icon;\n }\n }\n\n return activeTexture;\n }", "@Override\n\tpublic final Image getImage() {\n\t\treturn this.getSprite().getImage();\n\t}", "void glBindTexture(int target, int texture);", "private void renderTex() {\n final float\n w = xdim(),\n h = ydim(),\n x = xpos(),\n y = ypos() ;\n GL11.glBegin(GL11.GL_QUADS) ;\n GL11.glTexCoord2f(0, 0) ;\n GL11.glVertex2f(x, y + (h / 2)) ;\n GL11.glTexCoord2f(0, 1) ;\n GL11.glVertex2f(x + (w / 2), y + h) ;\n GL11.glTexCoord2f(1, 1) ;\n GL11.glVertex2f(x + w, y + (h / 2)) ;\n GL11.glTexCoord2f(1, 0) ;\n GL11.glVertex2f(x + (w / 2), y) ;\n GL11.glEnd() ;\n }", "SurfaceTexture mo17006a();", "public String toString() {\n return \"Entity(coordinates: \" + this.coordinates + \", icon: \" + this.icon\n + \")\";\n }", "private void renderSprite(RenderEntity ent) {\n float radius = ent.radius;\n boolean useAxis = (ent.flags & RenderEntity.FLAG_SPRITE_AXIS) == RenderEntity.FLAG_SPRITE_AXIS;\n if(useAxis) {\n left.set(ent.axis[0]);\n up.set(ent.axis[1]);\n } else {\n left.set(view.ViewAxis[1]);\n up.set(view.ViewAxis[2]);\n }\n left.scale(radius);\n up.scale(-radius);\n\n float s1 = 0, t1 = 0, s2 = 1, t2 = 1;\n \n if(ent.mat != null && ent.mat.getTexture() != null) {\n Vector2f texSize = ent.mat.getTextureSize();\n Vector2f texOffset = ent.mat.getTextureOffset(ent.frame);\n s1 = texOffset.x;\n t1 = texOffset.y;\n s2 = s1 + texSize.x;\n t2 = t1 + texSize.y;\n } \n \n boolean rendernow = !r_batchsprites.isTrue() || currentRenderFlags != RF_POSTDEFERRED;\n if(rendernow) {\n // Setup render state\n if(ent.mat != null && ent.mat.getTexture() != null) {\n // Grab texture offsets from material\n ent.mat.getTexture().Bind();\n if(ent.mat.blendmode == CubeMaterial.BlendMode.ONE) {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n }\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n Ref.ResMan.getWhiteTexture().Bind();\n }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(false); // dont write to depth\n\n AddQuadStampExt(ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n\n // clear renderstate\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(true);\n } else {\n // add to polygon batch and render later\n polyBatcher.addSpriteCall(ent);\n ByteBuffer dst = polyBatcher.getMappedBuffer();\n writeQuadStamp(dst, ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n }\n }", "public static Location getTargetedLocation(LivingEntity entity, double range) {\r\n\t\treturn getTargetedLocation(entity, range, new ArrayList<Material>());\r\n\t}", "public Entity getEntity() {\n\t\treturn DodgeBlawk.getDataManager().getEntity(getId());\n\t}", "int getNumberOfTextureCoordinates();" ]
[ "0.79711044", "0.79647213", "0.77431685", "0.76755387", "0.7663328", "0.7662696", "0.76282084", "0.7539709", "0.7494344", "0.74855477", "0.74532026", "0.7426665", "0.7415517", "0.7409871", "0.7359664", "0.73163766", "0.7268569", "0.7265952", "0.72362345", "0.6902283", "0.67212033", "0.6488528", "0.64690506", "0.6399159", "0.639486", "0.6373105", "0.63567764", "0.63050234", "0.62712044", "0.6238192", "0.6201666", "0.616258", "0.61465025", "0.6124884", "0.6124507", "0.6106078", "0.6100531", "0.60957575", "0.5988981", "0.5969918", "0.5947927", "0.59261173", "0.59042954", "0.58720154", "0.5812166", "0.58069634", "0.5798538", "0.5775293", "0.5765466", "0.57473075", "0.5714788", "0.56643796", "0.56397796", "0.5632979", "0.562469", "0.56105614", "0.55951107", "0.5579314", "0.55670196", "0.5531265", "0.5503321", "0.5481377", "0.54755193", "0.5449897", "0.5421758", "0.541293", "0.53859836", "0.5376246", "0.537556", "0.5342175", "0.53389007", "0.53378755", "0.5322751", "0.53171796", "0.53114027", "0.5306448", "0.5298264", "0.5289986", "0.5281294", "0.528096", "0.5277367", "0.52676463", "0.5235021", "0.5230391", "0.5228324", "0.52226835", "0.52218366", "0.52152944", "0.5210727", "0.5207836", "0.51951665", "0.5191909", "0.5191221", "0.518287", "0.5180192", "0.5178469", "0.51724994", "0.5157424", "0.5144878", "0.5144301" ]
0.73242056
15
METHOD 1: From home page, navigate to OpenHouses > Schedule page
public void goToOpenHousesSchedulePage() throws InterruptedException { log.info("***** START TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****"); WebElement openHouses = driver.findElement(parser.getObjectLocator("openHouses")); openHouses.click(); log.info("LEFT NAVBAR: CLICKED ON OPENHOUSES"); WebElement schedule = driver.findElement(parser.getObjectLocator("schedule")); schedule.click(); log.info("LEFT NAVBAR: CLICKED ON SCHEDULE"); Thread.sleep(1000); log.info("***** END TC: GO TO OPEN HOUSE > SCHEDULE PAGE *****"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showSchedule(View view) {\n Intent intent = new Intent(this, DisplaySchedule.class);\n startActivity(intent);\n }", "public void launchMySchedule(View view) {\n\t\tIntent intent = new Intent(this, SessionDBActivity.class);\n\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, SessionDBActivity.MY_SESSIONS);\n\t\tstartActivity(intent);\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tString index() {\n\t\tif (StringUtil.isNullOrEmpty(configuration.getHue().getIp())\n\t\t\t\t|| StringUtil.isNullOrEmpty(configuration.getHue().getUser())) {\n\t\t\treturn \"redirect:/setup\";\n\t\t}\n\n\t\treturn \"redirect:/dailySchedules\";\n\t}", "public ScheduleMeetingPage() {\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "@Then(\"I land on datepicker page\")\n public void i_land_on_datepicker_page() {\n System.out.println(\" landing page\");\n }", "public void gotoHome(){ application.gotoHome(); }", "public boolean clickScheduleAWebinarLink(){\n\t\tif(util.clickElementByLinkText(\"Schedule a Webinar\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> Schedule A Webinar link clicked successfully..................\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void launchCompleteSchedule(View view) {\n\t\tIntent intent = new Intent(this, SessionDBActivity.class);\n\t\tintent.putExtra(android.content.Intent.EXTRA_TEXT, SessionDBActivity.ALL_SESSIONS);\n\t\tstartActivity(intent);\n\t}", "public void openHomePage() {\n\t\tlogger.info(\"Opening Home Page\");\n\t\tdriver.get(ReadPropertyFile.getConfigPropertyVal(\"homePageURL\"));\n\t\t\n\t}", "HtmlPage clickDateLink();", "public void navigateToHomePage() {\n\t\n\t\t\tScreenShot screen = new ScreenShot();\n\n\t\t\t// Utilize the driver and invoke the chrome browser\n\t\t\tdriver.get(\" https://www.progressive.com/\");\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// Wait for page to be loaded\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t\t// Take a Screenshot\n\t\t\tscreen.takeSnapShot(driver, \"Progressive Insurance HomePage\");\n\t\t\t\n\t\t\tclickAutoInsurance();\t\n\t\t\n\t\t}", "public void goTo() { // Navigate to home page\n\t\tBrowser.goTo(url);\n\t}", "@When(\"^the user open Automation Home page$\")\r\n\tpublic void the_user_open_Automation_Home_page() throws Throwable {\n\t w.Homepage1();\r\n\t}", "@Then(\"^navigate to hotel page$\")\r\n\tpublic void navigate_to_hotel_page() throws Exception {\n\t\tdriver.navigate().to(\"file:///D:/complete%20training%20data/JEE/2018/Java%20Full%20Stack/Module%203/hotelBooking/hotelbooking.html\");\r\n\t\tThread.sleep(2000);\r\n\t//driver.close();\r\n\t}", "public KPAUISignOnFccPage clickAppointmentsLink(){\n getMakeAnAppointmentLink().click();\n return new KPAUISignOnFccPage(driver);\n }", "@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}", "@BeforeMethod(description = \"Before method: navigation to the Web application\")\n public void navigateToSite()\n {\n HTMLReport htmlReport = new HTMLReport();\n TodoMVCWorkFlow flow = new TodoMVCWorkFlow();\n htmlReport.log(\"STARTING BeforeMethod\");\n htmlReport.logINFO(\"Navigation to site TodoMVC\");\n flow.navigate();\n }", "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "public abstract void maintenanceSchedule() ;", "public HomeSection enterUrl(){\r\n\t\tGlobal.driver.get(CONSTANT.proUrl);\r\n\t\treturn new HomeSection();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(\"com.calendar.TODOLIST\"));\n\t\t\t}", "public void Navigate_to_Registration_Page(){\n\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Tab_Home_Screen_Link_Text);\n Assert.assertTrue(getRegistrationTab_InHomeScreen().getText().equals(StringUtils.Registration_Tab_Text));\n getRegistrationTab_InHomeScreen().click();\n waitForVisibilityOfElement(RegistrationPageLocator.Registration_Form_Submit_Button);\n\n }", "public LandingPage navigateToApplication(){\n\t\tString url = action.getProperties(\"URL\");\n\t\taction.OpenURl(url).Waitforpageload();\n\t\treturn this;\n\t}", "public void navigateToHomePage()\n\t {\n\t if(getAdvertisementbtn().isPresent())\n\t getAdvertisementbtn().click();\n\t }", "public void navigateToDashboard() {\n String currentUrl = driver.getCurrentUrl();\n if(!currentUrl.contains(DashboardPageAddress)) {\n driver.navigate().to(baseUrl + DashboardPageAddress);\n }\n }", "@Test\n public void selenium(){\n LandingPage landingPage = new LandingPage();\n landingPage.setDriver(driver);\n landingPage\n .assertTitle()\n .clickFindMeeting()\n .assertTitle()\n .search(\"10011\")\n .printFirstLocation()\n .printFirstDistance()\n .clickOnLocation()\n .assertLocationMatches()\n .printTodaysHours();\n }", "@Override\n\tpublic void seeRoute() {\n\t\tRoute route = game.getIncidentRoutes();\n\t\tSystem.out.println(route);\n\t\tSystem.out.println(\"Total sailing days required is \"+ game.calculateSailingDays(route)+\" days\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"Choose your actions: \");\n\t\t\tSystem.out.println(\"(1) Go back!\");\n\t\t\tSystem.out.println(\"(2) Set Sail\");\n\t\t\ttry { \n\t\t\t\tint selectedAction = scanner.nextInt();\n\t\t\t\tif (selectedAction <= 2 && selectedAction > 0) {\n\t\t\t\tstate = true;\n\t\t\t\tif (selectedAction == 1) {\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (game.isIslandReachable(route)) {\n\t\t\t\t\t\tif (game.checkMyShipHealth()) {\n\t\t\t\t\t\t\tgame.payCrew(route);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"You should repair your ship first!\" + \"\\n\" + \"you will be redirected to store at your current Island\" + \"\\n\");\n\t\t\t\t\t\t\tgame.repairMyShip();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"This Island is not accessible because you don't have enough days left, you can choose other Island\");\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Then(\"I land on the datepicker page\")\n public void i_land_on_the_datepicker_page() {\n System.out.println(\"inside date picker landing page\");\n }", "public void goHome();", "@Test(priority=3)\n\t\tpublic void HouseAccount_Method_OpenPage() throws Exception\n\t\t{\n\t\t\tdriver.get(Utility.getProperty(\"baseURL\")+Utility.getProperty(\"store_Id\")+\"houseAccount\");\n\t\t\tThread.sleep(5000);\n\t\t\t//Check House Account page opened or not\n\t\t\tif(driver.findElement(By.xpath(\"//a[.='HouseAccount']\")).getText().equalsIgnoreCase(\"HouseAccount\"))\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.PASS,\"House Account page loaded Successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttest.log(LogStatus.FAIL,\"House Account page loaded Failed\");\n\t\t\t}\n\t\t\t\n\t\t}", "@GetMapping(\"/Scheduling\")\r\n\tpublic String getScheduling(Model model) {\r\n\t\tList<Scheduling> scheduling = schedulingService.getSchedules();\r\n\t\tmodel.addAttribute(\"scheduling\", scheduling);\r\n\t\treturn \"scheduling\";\r\n\t}", "protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}", "public void startScheduling() {\n new Thread(new Runnable() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(30000);\n Calendar c = Calendar.getInstance();\n int min = c.get(Calendar.MINUTE);\n if (((min % 10) == 0) || (min == 0)) {\n boolean action = getLightOnWhenMovementDetectedSchedule().getCurrentSchedule();\n if (action) {\n configureSwitchOnWhenMovement(true);\n } else {\n configureSwitchOnWhenMovement(false);\n }\n action = getLightSchedule().getCurrentSchedule();\n if (action) {\n switchOn();\n } else {\n switchOff();\n }\n saveHistoryData();\n }\n Thread.sleep(30000);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteHomeConnectionException e) {\n e.printStackTrace();\n } catch (RemoteHomeManagerException e) {\n e.printStackTrace();\n }\n }\n }\n }).start(); \n }", "public static void viewWeekSchedule() {\n\t\tWeek w = new Week();\n\t\t\n\t\tprintWeekTitles();\n\t\tint weekID = Utility.askInt(\"\\nSelect week to view: \");\n\t\tw = aweek.get(weekID);\n\t\t\n\t\tviewWeek(w);\n\t\t\n\t}", "public SiteVisitsPageSteps addVisitScheduleForSite() throws Exception {\n\n\t\tassertPageLoad();\n\n\t\twaiter().until(ExpectedConditions.visibilityOfElementLocated(By.id(\"toolBarTable\")));\n\t\tgetLinkControl(\"Add a new activity\").click();\n\t\tassertPageLoad();\n\n\t\tString visitScheduleName = \"SQV Visit - \" + RandomData.dateTime_yyyyMMddHHmmss();\n\t\tthis.getTestData().put(\"visitScheduleName\", visitScheduleName);\n\n\t\t//TODO: IE SPECIFIC - SendKeys is inconsistent in entering value for IE browser. Modified with JS script as workaround until rca/ fix\n\t\t//getTextboxControl(\"name\").enterValue(visitScheduleName);\n\t\t((JavascriptExecutor) driver()).executeScript(String.format(\"document.getElementById('name').value='\" + visitScheduleName + \"';\"));\n\n\t\tgetDropdownControl(\"category_cb\").enterValue(getTestData().get(\"Category\"));\n\n\t\tclickSaveAndClose();\n\t\t//TODO: IE SPECIFIC - \"Save and Close\" does not navigate to the visits page when performed in IE. Added hack - To be fixed.\n\t\tif(System.getProperty(\"browser\").equalsIgnoreCase(\"ie\")){\n\t\t\tgetLinkControl(\"Back to previous view\").click();\n\t\t\tassertPageLoad();\n\t\t}\n\n\t\treturn new SiteVisitsPageSteps(getConfig(), getAgent(), getTestData());\n\t}", "public Boolean scheduleWebinar(HashMap<String, String> mapTestData){\r\n\t\tBoolean retValue=false;\r\n\t\ttry{\r\n\t\t\tString webinarTitle=mapTestData.get(\"Webinar Title\");\r\n\t\t\tString description=mapTestData.get(\"Description\");\r\n\t\t\t//String type=mapTestData.get(\"Webinar Type\");\r\n\t\t\tint daysToStart=Integer.parseInt(mapTestData.get(\"No Of Days to Start\"));\r\n\t\t\tLog.info(\"Day to start: \"+daysToStart);\r\n\t\t\tString startTime=mapTestData.get(\"Start Time\");\r\n\t\t\tLog.info(\"Start Time: \"+startTime);\r\n\t\t\tString startTimeAMPM=mapTestData.get(\"Start Time AMPM\");\r\n\t\t\tLog.info(\"Start Time AMPM: \"+startTimeAMPM);\r\n\t\t\tString endTime=mapTestData.get(\"End Time\");\r\n\t\t\tLog.info(\"End Time: \"+endTime);\r\n\t\t\tString endTimeAMPM=mapTestData.get(\"End Time AMPM\");\r\n\t\t\tLog.info(\"Start Time AMPM: \"+endTimeAMPM);\r\n\t\t\tString timeZone=mapTestData.get(\"Time Zone\");\r\n\t\t\tLog.info(\"Time Zone: \"+timeZone);\r\n\t\t\tString language=mapTestData.get(\"Language\");\r\n\t\t\tLog.info(\"Language: \"+language);\r\n\t\t\t//Verify if My Webinar page is displayed after login\r\n\t\t\tMyWebinarPage objMyWebinar=new MyWebinarPage(driver);\r\n\t\t\tif(objMyWebinar.verifyMyWebinarPage()){\r\n\t\t\t\t//click Schedule Webinar link \r\n\t\t\t\tobjMyWebinar.clickScheduleWebinar();\r\n\t\t\t\t//verify if Schedule Webinar page is displayed\r\n\t\t\t\tScheduleWebinarPage objSchdWebinar=new ScheduleWebinarPage(driver);\r\n\t\t\t\tif(objSchdWebinar.verifyScheduleWebinarPage()){\r\n\t\t\t\t\t//Fill the schedule webinar form\r\n\t\t\t\t\tobjSchdWebinar.enterWebinarTitle(webinarTitle);\r\n\t\t\t\t\tobjSchdWebinar.enterDescription(description);\r\n\t\t\t\t\t//Logic for date selector starts here\r\n\t\t\t\t\tobjSchdWebinar.openStartDatePicker();\r\n\t\t\t\t\tobjSchdWebinar.verifyStartDatePicker();\r\n\t\t\t\t\tString currMonth=objSchdWebinar.getMonth();\r\n\t\t\t\t\tLog.info(\"Current Month in the calendar: \"+currMonth);\r\n\t\t\t\t\tobjDate=new DateFormats();\r\n\t\t\t\t\tString webinarStartDay=objDate.getStartDay(daysToStart);\r\n\t\t\t\t\tString webinarStartMonth=objDate.getStartMonth(daysToStart);\r\n\t\t\t\t\t//If webinar date falls in current month\r\n\t\t\t\t\tif(currMonth.equalsIgnoreCase(webinarStartMonth)){\r\n\t\t\t\t\t\tLog.info(\"Months are same in calendar & calculated:\"+currMonth+\" \"+webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickRequiredDate(webinarStartDay);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t//If webinar date falls in upcoming months\r\n\t\t\t\t\t\tLog.info(\"Months are different in calendar & calculated:\"+currMonth+\" \"+webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickNextMonth(webinarStartMonth);\r\n\t\t\t\t\t\tobjSchdWebinar.clickRequiredDate(webinarStartDay);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Logic for date selector ends here\r\n\t\t\t\t\tobjSchdWebinar.enterStartTime(startTime, startTimeAMPM);\r\n\t\t\t\t\tobjSchdWebinar.enterEndTime(endTime, endTimeAMPM);\r\n\t\t\t\t\tobjSchdWebinar.selectTimeZone(timeZone);\r\n\t\t\t\t\tobjSchdWebinar.selectLanguage(language);\r\n\t\t\t\t\tobjSchdWebinar.clickSchedule();\r\n\t\t\t\t\tretValue=true;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tLog.info(\"Home Page not loaded properly\");\r\n\t\t\t\t\tretValue=false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tLog.info(\"My Webinar Page not loaded properly\");\r\n\t\t\t\tretValue=false;\r\n\t\t\t}\r\n\t\t\treturn retValue;\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.error(\"Exception in scheduleWebinar:\",e);\r\n\t\t\tretValue=false;\r\n\t\t\treturn retValue;\r\n\t\t}\r\n\t}", "public void gotoAdminLogin(){ application.gotoAdminLogin(); }", "public void showemplist() throws Exception {\n\t\t Log.info(\"*******started execution of showemplist() in TC_hrms_102***********\");\n\t\tActions action = new Actions(g.driver);\n\t\taction.moveToElement(g.driver.findElement(By.linkText(\"PIM\"))).perform();\n\t\tThread.sleep(3000);\n\t\t\n\t\t//clicking on addemployee submenu link\n\t\tg.driver.findElement(By.id(\"menu_pim_viewEmployeeList\")).click();\n\t\tThread.sleep(3000);\n\t\tSystem.out.println(\"Clicked on Employee List submenu\");\n\t\t Log.info(\"*******end of execution of showemplist() in TC_hrms_102***********\");\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tIntent Intent=new Intent(MainPage.this,TimeTable1.class);\r\n\t\t\t\tstartActivity(Intent);\r\n\t\t\t}", "public static void ShowCreateSchedule(){\n ToggleVisibility(CreateSchedule.window);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent ViewSchedule= new Intent(getBaseContext(),ViewSchedule.class);\n\t\t\t\tViewSchedule.putExtras(bundle);\n\t\t\t\tstartActivity(ViewSchedule);\n\t\t\t}", "public void openEmployeesPage() {\n // Navigate to HumanResources > Employees through the left menu\n driver.findElement(By.cssSelector(\"div.group-items>fuse-nav-vertical-collapsable:nth-child(5)\")).click();\n driver.findElement(By.cssSelector(\"fuse-nav-vertical-collapsable:nth-child(5)>div.children>fuse-nav-vertical-item:nth-child(2)\")).click();\n }", "@Given(\"^user launch on dashboard page$\")\r\n\tpublic void user_launch_on_dashboard_page() {\r\n\t\tdashboarpage.validatelandedondashboarpage();\r\n\t}", "public void gotoCoachLogin(){ application.gotoCoachLogin(); }", "@Given(\"I am on the Home Page\")\n public void i_am_on_the_home_page(){\n i_logged_into_Tenant_Manager_Project_list_page();\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(\"com.calendar.SYNCHRONOUS\"));\n\t\t\t}", "public void generateSchedule(){\n\t\t\n\t}", "@RequestMapping(value = \"/makeAppointment\", method = RequestMethod.GET)\n public String makeAppointment()\n {\n return \"makeAppointment\";\n }", "public void openHomeDepotAppln() throws Exception {\n\t\t\n\t\tString envUrl = dataHelper\n\t\t\t\t.getCommonData(CommonDataColumn.EnvironmentUrl);\n\n\t\ttry {\n\n\t\t\tdriver.manage().deleteAllCookies();\n\t\t\tdriver.get(envUrl);\n\t\t\tdriver.manage().window().maximize();\n\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\twh.handleAlert();\n\t\t}\n\t\t\n\t\tif (isConsumerHomePage()) {\n\t\t\treport.addReportStep(\"Open browser and enter HomeDepot URL\",\n\t\t\t\t\t\"Home page displayed successfully\", StepResult.PASS);\n\t\t} else {\n\t\t\treport.addReportStep(\"Open browser and enter HomeDepot URL\",\n\t\t\t\t\t\"Home page was not displayed successfully\", StepResult.FAIL);\n\t\t}\n\t}", "private void redirectToLandingPage(){\n\t\tappInjector.getAppService().getLoggedInUser(new SimpleAsyncCallback<UserDo>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(UserDo loggedInUser) {\n\t\t\t\tAppClientFactory.setLoggedInUser(loggedInUser);\n\t\t\t\tUcCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tHomeCBundle.INSTANCE.css().ensureInjected();\n\t\t\t\tAppClientFactory.getInjector().getWrapPresenter().get().setLoginData(loggedInUser);\n\t\t\t\tif (AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.STUDENT)){\n\t\t\t\t\t\n\t\t\t\t}else if(AppClientFactory.getPlaceManager().getCurrentPlaceRequest().getNameToken().equalsIgnoreCase(PlaceTokens.SHELF)){\n\t\t\t\t\tAppClientFactory.fireEvent(new DisplayNoCollectionEvent());\n\t\t\t\t}else{\n\t\t\t\t\tMap<String, String> params = new HashMap<String,String>();\n\t\t\t\t\tparams.put(\"loginEvent\", \"true\");\n\t\t\t\t\tappInjector.getPlaceManager().revealPlace(PlaceTokens.HOME, params);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void testStart(){\n\t\tstart.click();\n\t\tString cururl = driver.getCurrentUrl();\n\t\tint index = cururl.indexOf('s');\n\t\tString starturl = cururl.substring(index+2, cururl.length());\n\t\tAssert.assertEquals(starturl, curmeetingid);\n\t}", "public void gotoReservaRoundTrip(){\n try {\n FXMLReservaRoundTripController verReservaRT = (FXMLReservaRoundTripController) replaceSceneContent(\"FXMLReservaRoundTrip.fxml\");\n verReservaRT.setApp(this);\n verReservaRT.setText(cityO, cityD, depDate, depDate2);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@FXML\r\n void onActionSchedule(ActionEvent event) throws IOException {\r\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/Appointments.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }", "private void navigateToDefaultView() {\n\t\tif (navigator!=null && \"\".equals(navigator.getState())) {\n\t\t\t// TODO: switch the view to the \"dashboard\" view\n\t\t}\n\t}", "public void gotoReservaOneWay(){\n try {\n FXMLReservaOneWayController verReservaOW = (FXMLReservaOneWayController) replaceSceneContent(\"FXMLReservaOneWay.fxml\");\n verReservaOW.setApp(this);\n verReservaOW.setText(cityO, cityD, depDate);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent ManageSchedule= new Intent(getBaseContext(),ManageSchedule.class);\n\t\t\t\tManageSchedule.putExtras(bundle);\n\t\t\t\tstartActivity(ManageSchedule);\n\t\t\t\t\n\t\t\t}", "@PermitAll\n public void cmdShowSchedule(User teller) {\n command.sendQuietly(\"qtell {0} {1}\", teller, \"Current Schedule:\\\\n\");\n Collection<Game> games = tournamentService.findAllGames();\n for (Game game : games) {\n int boardNum = game.boardNumber;\n String whiteStatus = (game.whitePlayer.isOnline()) ? \"\" : \" ?\";\n String whitePlayer = game.whitePlayer.getHandle();\n String blackStatus = (game.blackPlayer.isOnline()) ? \"\" : \" ?\";\n String blackPlayer = game.blackPlayer.getHandle();\n String gameStatus = game.getStatusString();\n String msg = String.format(\"Board %2d: %18s%2s %18s%2s %s\", boardNum, whitePlayer, whiteStatus, blackPlayer, blackStatus, gameStatus);\n command.sendQuietly(\"qtell {0} {1}\", teller, msg);\n }\n command.sendQuietly(\"qtell {0}\", teller);\n }", "public Home clickonHome()\n\t{\n\t\tdriver.findElement(By.xpath(home_xpath)).click();\n\t\treturn new Home(driver);\n\t}", "private void loadDashboard() {\n Intent navigationIntent = new Intent(this, DashboardActivity.class);\n navigationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(navigationIntent);\n }", "public void goToMainMenuReservations() throws IOException {\n ApplicationDisplay.changeScene(\"/MainMenuReservations.fxml\");\n }", "public void clickHome(){\n try{\n Thread.sleep(500);\n new WebDriverWait(this.driver, 15)\n .until(ExpectedConditions.elementToBeClickable(this.home)).click();\n } catch (Exception e){\n System.out.println(e.getMessage());\n }\n }", "@FXML\r\n\tpublic void goToMain() {\r\n\t\tViewNavigator.loadScene(\"Welcome to WatchPlace\", ViewNavigator.HOME_SCENE);\r\n\t}", "public void angelHomePage()\r\n\t{\r\n\t\tResultUtil.report(\"INFO\", \"AngelHomePage > angelHomePage\", driver);\r\n\t\tswitchFrameToAngelContent();\r\n\t\tif(Element.verify(\"Logged in Message\", driver, \"XPATH\", \"//span[@class='pageTitleSpan' and text()='Home']\"))\r\n\t\t{\r\n\t\t\tResultUtil.report(\"PASS\", \"Successfully logged in\", driver);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tResultUtil.report(\"FAIL\", \"Login failed\", driver);\r\n\t\t}\t\t\r\n\t}", "public void gotoDetailSalesOrder() {\n\t}", "@When(\"^Navigate to \\\"([^\\\"]*)\\\" Site$\")\r\n\tpublic void navigate_to_Site(String arg1) throws Throwable {\n\t\tdriver = DriverManager.getDriver();\r\n\t\tdriver.get(arg1);\r\n\t\tSystem.out.println(\"Launched Mercury Tours Site\");\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(this, add_schedule_Activity.class);\n startActivity(intent);\n }", "public KPAUIHealthPlansPage openHealthPlansPage(){\n getShopHealthPlansLink().click();\n return new KPAUIHealthPlansPage(driver);\n }", "public void validateDailySchedule(String wfName,String schedulename,String scheduleDescrip,String startMonth,String startYear,String startdate,\r\n\t\tString endMonth,String endYear,String enddate,String scheduleType,String timezone,String Hrs,String Mins) throws Exception {\n\t\tloginpageta.login(prop.getProperty(\"username_TA\"), prop.getProperty(\"password_TA\"));\r\n\t\tReporter.log(\"User logged in successfully\",true);\r\n\t\twait.until(ExpectedConditions.visibilityOf(workflowsTab));\r\n\t\tJavascriptExecutor js_tenant = (JavascriptExecutor) driver;\r\n\t\tjs_tenant.executeScript(\"arguments[0].click();\", workflowsTab);\r\n\t\tReporter.log(\"Workflows Tab is clicked\",true);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(schedulerTab));\r\n\t\tJavascriptExecutor js1 = (JavascriptExecutor) driver;\r\n\t\tjs1.executeScript(\"arguments[0].click();\", schedulerTab);\r\n\t\tReporter.log(\"Scheduler tab clicked\",true);\r\n\t\tThread.sleep(2000);\r\n\t\tJavascriptExecutor js2 = (JavascriptExecutor) driver;\r\n\t\tjs2.executeScript(\"arguments[0].click();\", addNewBtn);\r\n\t\tReporter.log(\"Add new Button clicked\",true);\r\n\t\tThread.sleep(5000);\r\n\t\tReporter.log(\"Schedule form details started\",true);\r\n\t\tworkflowDrpdwn.click();\r\n\t\tWebElement search_wfName=driver.findElement(By.xpath(\"//label[contains(text(),'\"+wfName+\"')]/span\"));\r\n\t\tsearch_wfName.click();\r\n\t\tThread.sleep(3000);\r\n\t\tscheduleName.sendKeys(schedulename);\r\n\t\tThread.sleep(2000);\r\n\t\tdescription.sendKeys(scheduleDescrip);\r\n\t\tThread.sleep(3000);\r\n\t\tstartDate.click();\r\n\t\tThread.sleep(2000);\r\n\t\tSelect start_month_picker=new Select(monthDrpdown);\r\n\t\tstart_month_picker.selectByVisibleText(startMonth);\r\n\t\tSelect start_year_picker=new Select(yearDrpdown);\r\n\t\tstart_year_picker.selectByVisibleText(startYear);\r\n\t\tThread.sleep(2000);\r\n\t\tWebElement start_day_picker=driver.findElement(By.xpath(\"//tbody/tr/td/a[text()='\"+startdate+\"']\"));\r\n\t\tstart_day_picker.click();\r\n\t\t//Thread.sleep(5000);\r\n\t\t//doneBtn.click();\r\n\t\tThread.sleep(10000);\r\n\t\tendDate.click();\r\n\t\tThread.sleep(2000);\r\n\t\tSelect end_month_picker=new Select(monthDrpdown);\r\n\t\tend_month_picker.selectByVisibleText(endMonth);\r\n\t\tSelect end_year_picker=new Select(yearDrpdown);\r\n\t\tend_year_picker.selectByVisibleText(endYear);\r\n\t\tThread.sleep(2000);\r\n\t\tWebElement end_day_picker=driver.findElement(By.xpath(\"//tbody/tr/td/a[text()='\"+enddate+\"']\"));\r\n\t\tend_day_picker.click();\r\n\t\tThread.sleep(5000);\r\n\t//doneBtn.click();\r\n\t\tSelect schedule=new Select(scheduleTypeDrpdown);\r\n\t\tschedule.selectByVisibleText(scheduleType);\r\n\t\tThread.sleep(2000);\r\n\t\tSelect timezone_drpdown=new Select(timeZone);\r\n\t\ttimezone_drpdown.selectByVisibleText(timezone);\r\n\t\tThread.sleep(2000);\r\n\t\tscheduleHRS.sendKeys(Hrs);\r\n\t\tThread.sleep(2000);\r\n\t\tscheduleMins.sendKeys(Mins);\r\n\t\tThread.sleep(2000);\r\n\t\tsubmitBtn.click();\r\n\t\tReporter.log(\"Schedule submitted\",true);\r\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\r\n\t\tString actual_message = actual_Msg.getText();\r\n\t\tString expected_message = Messages.scheduleCreation;\r\n\t\tReporter.log(\"Actual Success Msg:\" + actual_message,true);\r\n\t\tReporter.log(\"Expected Success Msg:\" + expected_message,true);\r\n\t\tAssert.assertEquals(actual_message,expected_message, \"Schedule not created\");\r\n\t\tReporter.log(\"Schedule created successfully\",true);\r\n\t/*\twait.until(ExpectedConditions.visibilityOf(requestTab));\r\n\t\tJavascriptExecutor js_tenant5 = (JavascriptExecutor) driver;\r\n\t\tjs_tenant5.executeScript(\"arguments[0].click();\", requestTab);\r\n\t\t//requestTab.click();\r\n\t\tReporter.log(\"Request tab clicked and validate if it is present in table\",true);\r\n\t\tWebElement req=driver.findElement(By.xpath(\"//tbody[@class='tbody-stripped']/tr/td[2]\"));\r\n\t\tString req_wf=req.getText();\r\n\t\tAssert.assertEquals(req_wf, wfName,\"Workflow request not created,schedule fail \");\r\n\t\tReporter.log(\"Workflow is scheduled and validated in the table\");*/\r\n\t\tinformationpageta.validateSignOut();\r\n\t}", "public void startTestCalendar (View view) {\n Intent intent= new Intent();\n intent.setAction(\"com.example.myfirstapp_withsplashscreen.TEST_CALENDAR\");\n sendBroadcast(intent);\n }", "public void LoadedHomePage()\r\n {\r\n //Generating Alert Using Javascript Executor\r\n if (driver instanceof JavascriptExecutor) \r\n ((JavascriptExecutor) driver).executeScript(\"alert('Loaded Home Page');\");\r\n \r\n WaitTime(2000);\r\n driver.switchTo().alert().accept();\r\n driver.switchTo().defaultContent();\r\n }", "public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}", "HtmlPage clickSiteLink();", "@Given(\"^user in the home page of Southall travel$\")\n public void user_in_the_home_page_of_Southall_travel() throws Throwable {\n }", "@Given(\"^that the user is on Emirates.com$\")\n\tpublic void navigate_to_emirates_home_page() throws InterruptedException, IOException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:/Users/Manmeet Kaur/Downloads/chromedriver_win32/chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.emirates.com/ae/english/\");\n\t\tdriver.manage().window().maximize();\n\t}", "public void Placement_BySession_PageNav() {\n\t\t\t\n\t\t\t\n\t\t\tControls.hoverclick(By.linkText(\"Placements\"), By.linkText(\"By Session\"));\n\t\t\tControls.dynemicwait(By.xpath(\"//*[@id=\\\"mainBody\\\"]/div[3]/div[2]/div/div[1]/div[2]\"));\n\t\t\t\n\t\t\t\n\t\t\tif(Controls.GetText(By.xpath(placementProp.getProperty(\"title.xpath\"))).trim().equalsIgnoreCase(\"By Session\"))\n\t\t\t{\n\t\t\t\tReports.log(Status.PASS, \"Page is redirected on Placement 'By Session' page successfully\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tReports.log(Status.FAIL, \"Page is redirected on incorrect page\");\n\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t\n\t\t}", "void clickOnRefreshButton() {\n\t\tSeleniumUtility.clickOnElement(driver, homepageVehiclePlanning.buttonTagRefreshButtonHomepageVehiclePlanning);\n\t}", "public void displayHome() {\n\t\tclearBackStack();\n\t\tselectItemById(KestrelWeatherDrawerFactory.MAP_OVERVIEW, getLeftDrawerList());\n\t}", "public void locationPlanner(View view) {\n Intent intent = new Intent(TravelPlanner.this, ScheduleTabSwitch.class);\n\n PlanGenerator planGenerator = new PlanGenerator();\n\n SQLiteHelper db = new SQLiteHelper(this);\n db.getWritableDatabase();\n planGenerator.generatePlan(db.getCurrentPlan(), dp.getYear(), dp.getMonth(), dp.getDayOfMonth());\n Plan currentPlan = planGenerator.getGeneratedPlan();\n\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n int month = java.util.Calendar.getInstance().get(java.util.Calendar.MONTH);\n int day = java.util.Calendar.getInstance().get(java.util.Calendar.DATE);\n if(db.getPlan(currentPlan.getDate()) == null) {\n if(curDate[0] < year || (curDate[0] == year && curDate[1] < month) ||\n (curDate[0] == year && curDate[1] == month && curDate[2] < day))\n Toast.makeText(TravelPlanner.this, \"Invalid date!\", Toast.LENGTH_SHORT).show();\n else if(currentPlan.getLocationCount() == 0)\n Toast.makeText(TravelPlanner.this, \"Empty Plan!\", Toast.LENGTH_SHORT).show();\n else {\n db.addPlan(currentPlan);\n List<Location> list2 = db.getCurrentPlan();\n for (Location l : list2)\n db.deleteLocationFromCurrentPlan(l);\n db.close();\n int[] date = curDate;\n intent.putExtra(\"locationList\", currentPlan.getlocationList());\n intent.putExtra(\"date\", date);\n startActivity(intent);\n }\n }\n else {\n Toast.makeText(TravelPlanner.this, \"Plan already exists!\", Toast.LENGTH_SHORT).show();\n }\n\n }", "HtmlPage clickSiteName();", "@Test\r\n public void testHomePageButton() {\r\n WicketTester tester = new WicketTester(new GreenometerApplication());\r\n tester.startPage(StopLightPage.class);\r\n tester.assertRenderedPage(StopLightPage.class);\r\n\r\n tester.clickLink(\"HomePageButton\", false);\r\n tester.assertRenderedPage(GreenOMeterPage.class);\r\n }", "public void clickDashboardLink() {\n this.action.click(this.dashboardLink);\n }", "private void setupOpenHoursListView() {\n }", "@Test(priority = 1)\n\tpublic void homePageRedirection() {\n\t\tlogger = extent.startTest(\"Flight Booking\");\n\t\tlog.info(\"Starting Redirection validation\");\n\t\thome.isRedirectionCorrect();\n\t\tlog.info(\"Redirection is on the correct page\");\n\t\tlog.info(\"Starting the homepage testing\");\n\t}", "public void home() {\n\t\tUserUI ui = new UserUI();\n\t\tui.start();\n\t}", "public void ClickAgentInformationPage() {\r\n\t\tagentinfo.click();\r\n\t\t\tLog(\"Clicked the \\\"Agent Information\\\" button on the Birthdays page\");\r\n\t}", "@Test\n\tpublic void homepage()\n\t{\n\t//WebDriver driver = null;\n\t\t//Welcome_MurcuryTours wt=PageFactory.initElements(driver,Welcome_MurcuryTours.class);\n\t\tWelcome_MurcuryTours wt=PageFactory.initElements(driver, Welcome_MurcuryTours.class);\n\twt.signOn();\n\tdriver.navigate().back();\n\twt.register();\n\t\n\t}", "@Override\r\n\tpublic void doInitialSchedules() {\n\t}", "public void viewListofHomes() {\n\t\ttry {\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Failed to get list of homes\");\n\t\t\tSystem.out.println(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to get list of homes\");\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(openTimetable);\n\t\t\t\t//setContentView(R.layout.activity_timetable__gui);\n\t\t\t}", "public interface ScheduleService {\n BasicSchedule getBasicScheduleByHostelIdAndRoomType(long hostelId, RoomType type);\n\n /**\n * 获得最近一年的酒店基本计划\n *\n * @param hostelId\n * @return\n */\n List<BasicSchedule> getBasisSchedulesByHostelId(long hostelId);\n\n void modifyBasisSchedule(BasicSchedule basicSchedule);\n\n /**\n * 获得最近一年的酒店特殊计划\n *\n * @param hostelId\n * @return\n */\n List<SpecialSchedule> getSpecialScheduleByHostelId(long hostelId);\n\n void modifySpecialSchedule(SpecialSchedule specialSchedule);\n\n void addSpecialSchedule(SpecialSchedule specialSchedule);\n\n void deleteSpecialSchedule(SpecialSchedule specialSchedule);\n\n SpecialSchedule getSpecialSchedule(long hostelId, RoomType roomType, Date date);\n}", "protected void openWebPage() {\n\t\tEseoTest.driver.get(Configuration.getString(\"website_address\"));\n\t\t//Assert.assertEquals(\"Web page title does not appear correct.\", Configuration.getString(\"login_title\"),\n\t\t\t//\tEseoTest.driver.getTitle());\t\t\n\t\tAssert.assertEquals(\"Browser title bar does not appear correct.\",Configuration.getString(\"homepage_title\"),EseoTest.driver.getTitle());\n\t\tAssert.assertEquals(\"Site title does not appear correct.\",Configuration.getString(\"blog_title\"),EseoTest.driver.findElement(By.tagName(\"h1\")).getText());\n\t\tAssert.assertEquals(\"Site description does not appear correct.\",Configuration.getString(\"blog_description\"),EseoTest.driver.findElement(By.tagName(\"p\")).getText());\n\t\tAssert.assertTrue(\"Log in item does not appear correct.\",EseoTest.driver.findElement(By.linkText(Configuration.getString(\"mainmenu_login_item\"))).isDisplayed());\n\t}", "public void clickOnHome() {\n\t\twait.waitForStableDom(250);\n\t\tisElementDisplayed(\"link_home\");\n\t\twait.waitForElementToBeClickable(element(\"link_home\"));\n\t\texecuteJavascript(\"document.getElementById('doctor-home').getElementsByTagName('i')[0].click();\");\n//\t\t element(\"link_home\").click();\n\t\tlogMessage(\"user clicks on Home\");\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent(getActivity(), AgendaActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\r\n intent.addCategory(Intent.CATEGORY_DEFAULT);\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK /*| Intent.FLAG_ACTIVITY_CLEAR_TASK*/\r\n /* | Intent.FLAG_ACTIVITY_TASK_ON_HOME*/);\r\n intent.setDataAndType(Uri.parse(\"content://com.android.calendar/\"), \"time/epoch\");\r\n mContext.startActivity(intent);\r\n// if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){\r\n// mContext.startActivity(new Intent(AlarmClock.ACTION_SHOW_ALARMS));\r\n// }else {\r\n// mContext.startActivity(new Intent(AlarmClock.ACTION_SET_ALARM));\r\n// }\r\n }", "ConferenceScheduleBuilderService startLunch();", "@Given(\"^I am on the Home page$\")\n public void iAmOnTheHomePage() throws Throwable {\n home.isPageOpened();\n //throw new PendingException();\n }", "@Test\n\tpublic void testScheduleAppointment() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/app1\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200, response.getStatusCodeValue());\n\t}", "public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }", "public void clickOnExploreEuropeLink() throws Exception {\n\t\tif (TestBase.flag_Mob) {\n\t\t\tscrollDown();\n\t\t\tclickUsingJavaScript(HomePageLocators.getExploreEuropeLnk());\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public String home()\n\t{\n\t\treturn SUCCESS;\n\t}" ]
[ "0.6739115", "0.6204467", "0.6092732", "0.6047274", "0.6035716", "0.5985838", "0.59834594", "0.59656286", "0.5914174", "0.5895082", "0.58644456", "0.57920873", "0.5784169", "0.57774484", "0.57504106", "0.5741535", "0.57389957", "0.57214856", "0.5715761", "0.5696286", "0.5690977", "0.5675064", "0.56738436", "0.5656338", "0.56492597", "0.5648096", "0.56384486", "0.5634797", "0.5618331", "0.56107426", "0.5590112", "0.5586228", "0.55850095", "0.55786955", "0.5565483", "0.55626136", "0.5559987", "0.555013", "0.5538854", "0.55181265", "0.5508801", "0.5504852", "0.5504404", "0.5504334", "0.54967815", "0.5480812", "0.5471372", "0.5466073", "0.54543513", "0.5440781", "0.5424978", "0.5416031", "0.5406614", "0.54057586", "0.53998154", "0.5398148", "0.53979594", "0.5395087", "0.5391346", "0.5390453", "0.5389291", "0.5387805", "0.5381909", "0.5374335", "0.5367356", "0.53538144", "0.5349182", "0.53484374", "0.5346017", "0.5341905", "0.5332035", "0.5327572", "0.53231514", "0.5320998", "0.53112346", "0.5303719", "0.5303713", "0.5294922", "0.5292604", "0.52902895", "0.52860713", "0.5283631", "0.528315", "0.5282247", "0.5274034", "0.5269921", "0.52687293", "0.52627087", "0.5259054", "0.52495855", "0.52479106", "0.5242084", "0.52418697", "0.523997", "0.5238108", "0.52316564", "0.523069", "0.52285707", "0.5226041", "0.52257967" ]
0.7596525
0
/ Create a class : RandomNameGenerator Step1: Ask user to enter his/her name //john walker Step2: Delete the spaces in the username//johnwalker Step3: Check if the username is already taken//list("sam","johnmary","johnwalker","johnwalker523463146") Step4: If there the username is not taken, then print: This username is available Step5: If the username is already taken, then print This username is already taken Step6: Then generate a random number, add to the name, and Print the new username
public static void main(String[] args) { //Create a list List<String> userList = new ArrayList<>(); userList.add("John Walker"); userList.add("John Marry"); userList.add("samawalton"); userList.add("Juliebrown"); String myName="John Walker"; for(String name:userList) { if(name.equalsIgnoreCase(name)) { System.out.println("This username is already taken: " + myName.toLowerCase().replace(" ", "")); break; }else { System.out.println("This username is avaiblable"); break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String createUsername() {\r\n\t\tboolean complete = false;\r\n\t\tString username = \"\";\r\n\t\t\r\n\t\twhile(complete == false) {\r\n\t\t\tSystem.out.println(\"Please type a username (no spaces):\");\r\n\t\t\tusername = scan.nextLine();\r\n\t\t\t//us.checkExit(username);\r\n\t\t\t\r\n\t\t\tif(us.checkUniqueUsername(username) == false) {\r\n\t\t\t\tSystem.out.println(\"Username is taken, try again, partner.\");\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if(username.contains(\" \")) {\r\n\t\t\t\tSystem.out.println(\"Invalid username - contains space(s)\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tcomplete = true;\r\n\t\t}//While1\r\n\t\t\r\n\t\treturn username;\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tfinal String letters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*\";\n\n\t\t// b. have a random number generator\n\n\t\tRandom rand = new Random();\n\n\t\t// c. use the random generator to get the charAt a random location based on the\n\t\t// number of characters\n\n\t\tchar char1 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char2 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char3 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char4 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char5 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char6 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char7 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char8 = letters.charAt(rand.nextInt(letters.length()));\n\t\t// d. concatenate the characters together to get the word\n\n\t\tSystem.out.println(\"\" + char1 + char2 + char3 + char4 + char5 + char6 + char7 + char8);\n\t\tSystem.out.println(String.valueOf(char1)+String.valueOf(char2)+String.valueOf(char3)+String.valueOf(char4)+String.valueOf(char5)+String.valueOf(char6)+String.valueOf(char7)+String.valueOf(char8));\n\t\t\t\t\n\n\t\t\n\t\t\n\t\t//Build a username generator absed on lastname and firstname inputs from the user\n\t\t//Conditions: \n\t\t//\t\t\tNo more than 1 username can include either the whole first or last name\n\t\t//\t\t\tAt least 1 username should include numbers\n\t\t//\t\t\tThere needs to be a random component in at least 2 name generations\n\t\t//\t\t\tThe usernames should adhere to the characteristics of typical usernames\n\t\t\n\t\tfinal String numbers = \"1234567890.\";\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Type in your first name > \");\n\t\tString fName = scan.nextLine();\n\t\tSystem.out.println(\"Type in your last name > \");\n\t\tString lName = scan.nextLine();\n\t\t\n\t\tString part1 = fName.toLowerCase().substring(0, rand.nextInt(fName.length()));\n\t\tString part2 = lName.toLowerCase().substring(0, rand.nextInt(lName.length()));\n\t\t\n\t\tSystem.out.println(\"A possible username \" + part1+part2);\n\t\t\n\t\tString part3 = String.valueOf(numbers.charAt(rand.nextInt(numbers.length())));\n\t\tString part4 = String.valueOf(numbers.charAt(rand.nextInt(numbers.length())));\n\t\t\n\t\tSystem.out.println(\"A possible username \" + part1+part2+part3+part4);\n\t\t\n\t\t//Take inputs and Build a decision tree that decides whether to issue a loan or not\n\t\t\n\t\t//https://www.brcommunity.com/images/articles/b624-2full.png\n\t\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tList<String> str = new ArrayList<>();\n\t\tRandom random = new Random();\n\t\tint number = random.nextInt(1001);\n\t\tstr.add(\"David\");\n\t\tstr.add(\"Yusuf\");\n\t\tstr.add(\"Mustafa\");\n\t\tstr.add(\"Yusa\");\n\t\tstr.add(\"Enes\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter your name: \");\n\t\tString name = scan.nextLine().trim();\n\t\tname = name.replaceAll(\" \", \"\");\n\t\tif(str.contains(name)) {\n\t\t\tString name1 = name +number;\n\t\t\tSystem.out.println(\"You can use \"+name+\" as \"+name1);\n\t\t}else {\n\t\t\tSystem.out.println(\"You can use \"+name+\" as you entered as a username\");\n\t\t}\n\t\tscan.close();\n\t}", "public String generateUsername(String firstname, String lastname) throws SQLException, ClassNotFoundException {\n\t\t//Setup the connection if it does not already exist\n\t\tif(database == null)\n\t\t\tdatabase = new DatabaseHandler();\n\t\t//Sanitize firstname and last name just to be safe\n\t\tString generated = Sanitizer.sanitizeInput(firstname.substring(0,2) + lastname.substring(0,4));\n\t\tStatement findUsernameIfExists;\n \tResultSet Result;\n \tfindUsernameIfExists = database.getConnection().createStatement();\n \t//Loop until we find a username that does not exist.\n \twhile(true) {\n \t//query the database for the generated username\n String query = \"SELECT username FROM personnel WHERE username= \" + generated + \";\";\n \tResult = findUsernameIfExists.executeQuery(query);\n \t//if that username is not occupied then return it to the callee\n \tif(Result.wasNull())\n \t\treturn generated.toLowerCase(); // we only return if we find a unique username\n \telse\n \t{\n \t\t//otherwise mess with it.\n \t\tRandom rand = new Random();\n \t\t//pick a random position to switch the character\n \t\tint position = rand.nextInt(6);\n \t\t//pick a random character to switch with\n \t\tchar c = (char)(rand.nextInt(26) + 'a');\n \t\tchar[] cs = generated.toCharArray();\n \t\t//change the character from a random position with a new random character\n \t\tcs[position] = c;\n \t\tgenerated = new String(cs);\n \t}\n \t//and then check again if that exists.\n \t}\n\t}", "private String getRandomName(){\n return rndString.nextString();\n }", "public String createName() {\r\n\r\n boolean donePickingName = false;\r\n String inputName =\"\";\r\n \r\n while (donePickingName == false) {\r\n System.out.println(\"\\nWHAT IS YOUR NAME?\");\r\n System.out.print(\"NAME: \");\r\n inputName = scan.next();\r\n \r\n System.out.println(\"You chose \" + \"'\" + inputName + \"'\" + \" as your name.\\n\");\r\n System.out.println(\"Hello \" + inputName + \"!\");\r\n System.out.println(\"This will be your name through the whole game, do you want to keep it?\\n\"\r\n + \"YES/NO\");\r\n System.out.print(\"ACTION: \");\r\n\r\n String actionInput;\r\n actionInput = scan.next().substring(0, 1);\r\n\r\n if (actionInput.equalsIgnoreCase(\"n\")) {\r\n donePickingName = false;\r\n }\r\n if (actionInput.equalsIgnoreCase(\"y\")) {\r\n System.out.println(\"\\nYou chose to keep your name\");\r\n donePickingName = true;\r\n } else {\r\n System.out.println(\"\\n'\" + actionInput + \"'\" + \" is not a valid option... Try again.\");\r\n }\r\n \r\n }\r\n return inputName;\r\n }", "private String checkName(String name){\n\n if(name.isBlank()){\n name = \"guest\";\n }\n int i = 1;\n if(users.contains(name)) {\n while (users.contains(name + i)) {\n i++;\n }\n name+=i;\n }\n return name;\n }", "public void registerplayerName()\n { \n boolean repeat = true;\n while (repeat)\n {\n playerName = getUserStringInput(\"Please input your name\");\n if (playerName.trim().length() >= 3 && playerName.trim().length() <= 10)\n {\n String playName = playerName;\n setPlayerName(playName);\n repeat = false;\n }\n else\n {\n System.out.println(\"Sorry, you enter incorrect,please input between 3 to 10 characters\");\n repeat = true;\n }\n }\n }", "private static void RecommendedUserNames(String first, String last) {\n\t\tString [][] usernames = new String [2][2];\n\t\tint [] RandomNumbers = new int [4];\n\t\tfor (int i=0; i < 4; i++) {\n\t\t\tRandomNumbers[i]=(int)(Math.random()*100);\n\t\t}\n\t\tint k = 0;\n\t\tSystem.out.println(\"Choose a unique username, some of the recommended ones for you are below\");\n\t\tfor (int i = 0; i < 2; i++)\n\t\t\tfor (int j = 0; j < 2; j++) {\n\t\t\t\tif (k%2==0) usernames[i][j] = first+last+RandomNumbers[k];\n\t\t\t\telse usernames[i][j] = last+first+RandomNumbers[k];\n\t\t\t\tk++;\n\t\t\t\tSystem.out.println(usernames[i][j]+ \" \");\n\t\t\t}\n\t\tSystem.out.println();\n\t}", "private String createFakeName() {\n final int firstLowercaseLetterAscii = 97;\n final int lowercaseLetterRange = 25;\n\n // Maximum length random name = 20\n final int minNameLength = 4;\n int randomNameLength = (random.nextInt(17)) + minNameLength;\n\n // Algorithm to generate the random name\n StringBuilder randomName = new StringBuilder();\n for (int i = 0; i < randomNameLength; i++) {\n char randChar = (char) (random.nextInt(lowercaseLetterRange + 1) + firstLowercaseLetterAscii);\n randomName.append(randChar);\n }\n return randomName.toString();\n }", "public String setUserName(){\n String userName = \"\";\n while(userName.isBlank()) {\n System.out.print(\"Please Enter UserName: \");\n userName = supplyString.get();\n }\n return userName.trim();\n }", "public static void printUsername() {\n\t\tSystem.out.println(\"Enter the username\");\n\t\tString username = Utility.SCANNER.nextLine();\n\t\tint length = username.length();\n\t\tif(length > 3) {\n\t\t\tSystem.out.println(\"Hello \"+username+\", How are you?\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid username\");\n\t\t}\n\t}", "private String getRandName() {\n int firstName = (int)(Math.random() * listFirstNames.length);\n String fName = listFirstNames[firstName].trim();\n int lastName = (int)(Math.random() * listLastNames.length);\n String lName = listLastNames[lastName].trim();\n return ( fName + \" \" + lName ); \n }", "static void usernameChoose(){\n\t\tString[] testList = Fixer.fixingList(userList);\r\n\t\tuserList = testList;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\t//boolean to keep the while loop open when attempting to create a username\r\n\t\tboolean validName = false;\r\n\t\twhile (!validName) {\r\n\t\tSystem.out.println(\"Please choose a Username\");\r\n\t\tString appAttempt = input.nextLine();\r\n\t\t\r\n\t\t//searching the Users and Applicants file for the username to avoid duplicates\r\n\t\tfor (int i = 0; i < userNum; i++) {\r\n\t\t\tString[] userSplit = userList[i].split(\":\");\r\n\t\t\tfor (int j = 0; j < appNum; j++) {\r\n\t\t\tString[] appSplit = appList[j].split(\":\");\r\n\t\t\t//if the username appears in the Users file\r\n\t\t\tif (appAttempt.equals(userSplit[1])) {\r\n\t\t\t\tSystem.out.println(\"Username already taken.\\nPlease choose a different Username\");\r\n\t\t\t\tappAttempt = input.nextLine();\r\n\t\t\t}\r\n\t\t\t//if the username appears in the Applicants file\r\n\t\t\telse if (appAttempt.equals(appSplit[1])) {\r\n\t\t\t\tSystem.out.println(\"Username already taken.\\nPlease choose a different Username\");\r\n\t\t\t\tappAttempt = input.nextLine();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//setting validname to true to end the loop if the above two if statements don't happen\r\n\t\tvalidName = true;\r\n\t\t}\r\n\t\t//same while loop being controlled by a boolean\r\n\t\tboolean passLengthOkay = false;\r\n\t\twhile (!passLengthOkay) {\r\n\t\t//choosing a password. Only requirement is 6-10 characters, but there could be more to improve security\r\n\t\tSystem.out.println(\"Please choose a Password with 6 to 10 characters:\");\r\n\t\tString password = input.nextLine();\r\n\t\t//again, seeing if the password is too long or short\r\n\t\t\tif (password.length()>10) {\r\n\t\t\t\tSystem.out.println(\"This password is too long; try again.\");\r\n\t\t\t}\r\n\t\t\telse if (password.length()<6) {\r\n\t\t\t\tSystem.out.println(\"This password is too short; try again\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//for just a touch of security, the hashcode of the password is multiplied by a VERY big prime number, then the product\r\n\t\t\t\t//is divided by another large prime number, with the remainder being stored in the database.\r\n\t\t\t\tint passint = password.hashCode();\r\n\t\t\t\tint encryption = (passint*500003477)%1009747;\r\n\t\t\t\t//standard things banks ask when opening an account\r\n\t\t\t\tSystem.out.println(\"UCF requires an initial deposit of $25; how much would you like to deposit?\");\r\n\t\t\t\tString initDepo = input.nextLine();\r\n\t\t\t\tint initDeposit = Integer.parseInt(initDepo);\r\n\t\t\t\tSystem.out.println(\"UCF requires you to provide your full first and last name:\");\r\n\t\t\t\tString fullname = input.nextLine();\r\n\t\t\t\t//initialize the jointApply method, for applying for joint accounts\r\n\t\t\t\tboolean joint = jointApply();\r\n\t\t\t\t//all applicants are not approve AND not denied, shocking I know\r\n\t\t\t\tboolean approved = false;\r\n\t\t\t\tboolean denied = false;\r\n\t\t\t\t//to ensure each user has a unique ID, the lengths of both files are added together and used as the user ID\r\n\t\t\t\tint appID = appNum + userNum;\r\n//\t\t\t\tApplicants a = new Applicants(appID,appAttempt,joint, encryption,approved);\r\n\t\t\t\t//logging the creation of the new account\r\n\t\t\t\tlogger.info(\"Application for account made by \" + fullname);\r\n\t\t\t\t//adding the new applicant to the end of the applicants text file\r\n\t\t\t\tio.writeOutputStreamContents(System.getProperty(\"line.separator\") + \r\n\t\t\t\t\t\tappID + \":\" + appAttempt + \":\" + joint + \":\" + encryption+ \":\" + \r\n\t\t\t\t\t\tapproved + \":\" + denied + \":\" + initDeposit + \":\" + fullname, \"Applicants.txt\");\r\n\t\t\t\t//getting out of the while loop\r\n\t\t\t\tpassLengthOkay=true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public static String getName(){\r\n String name = \"\";\r\n do{\r\n System.out.println(\"Please enter your name and press enter\");\r\n name = sc.nextLine();\r\n name = name.trim(); \r\n if(name.equals(\"\")){\r\n System.out.println(\"Error: Please put in name\");\r\n }\r\n }while(name.equals(\"\")); \r\n return name;\r\n }", "public String generateFullName() {\n\n\t\tString fullName;\n\t\tfullName = firstNames.get(roll.nextInt(firstNames.size()));\n\t\tfullName += \" \" + lastNames.get(roll.nextInt(lastNames.size()));\n\t\treturn fullName;\n\t}", "public void getNames() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name: \");\n\t\twhile (sc.hasNextLine()) {\n\t\t\tString name = sc.nextLine();\n\t\t\tif (name.equals(\"\")) {\n\t\t\t\t//User is finished.\n\t\t\t\tSystem.out.println(\"Exiting the program\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tgetSimilarNames(name);\n\t\t\t\tSystem.out.println(\"Please enter a name: \");\n\t\t\t}\n\t\t}\n\t}", "public String checkUsername() {\n String username = \"\"; // Create username\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n username = checkEmpty(\"Account\"); // Call method to check input of username\n boolean isExist = false; // Check exist username\n for (Account acc : accounts) {\n // If username is exist, print out error\n if (username.equals(acc.getUsername())) {\n System.out.println(\"This account has already existed\");\n System.out.print(\"Try another account: \");\n isExist = true;\n }\n }\n // If username not exist then return username\n if (!isExist) {\n return username;\n }\n }\n return username; // Return username\n }", "static String getRandomAgentName() {\n\n if (_names.isEmpty() && count == 0) {\n initializeNames();\n count++;\n }\n int i = (int) (Math.random() * _names.size());\n String name = \"\";\n try {\n name = _names.remove(i);\n } catch (Exception e) {\n System.out.println(\"NS Error: No more names to hand out.\");\n }\n\n return name;\n }", "public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}", "public static void userName() {\n System.out.println(\"Please enter your name: \");\n String name = sc.nextLine(); \n System.out.println(\"Hello, \" + name);\n }", "public static void main(String[] args) {\n NameGenerator n = new NameGenerator(true);\n // System.out.println(\"Random Names:\");\n // for (int i = 0; i < 10; i++) {\n // System.out.println(n.newName());\n // }\n // System.out.println();\n // System.out.println(\"Planet Names:\");\n // for (int i = 0; i < 10; i++) {\n // System.out.println(n.newPlanetName());\n // }\n for (int i = 0; i < 10; i++) {\n System.out.println();\n String system = n.newName();\n System.out.printf(\"System: %s, Planets:%n\", system);\n for (String p: n.planetNames(5, system)) {\n System.out.println(p);\n }\n }\n // System.out.println();\n // System.out.println(\"Human Names:\");\n // for (int i = 0; i < 10; i++) {\n // System.out.println(n.newHumanName());\n // }\n\n }", "public static String getValidation(String message) { // Example of using Method Overloading\r\n\r\n Scanner reader = new Scanner(System.in); // Create a Scanner object\r\n String input = null;\r\n int charIsNotSpace = 0;\r\n\r\n do {\r\n System.out.print(message);\r\n\r\n while (!reader.hasNextLine()) { // I think that the program never enters this while because .hasNextLine identifies\r\n System.out.print(\"Please enter a valid name with at least 3 characters\"); // any type of input as a valid\r\n reader.next(); // value, including \"enter\" and space, but it is like this in the \"PPT Input Validation\"\r\n }\r\n\r\n input = reader.nextLine();\r\n\r\n for (int i=0; i < input.length(); i++) { // checks if at least three characters are not space\r\n if (input.charAt(i) != ' ') {\r\n charIsNotSpace ++;\r\n }\r\n }\r\n\r\n } while (input == null || input.equals(\"\") || input.length() < 3 || charIsNotSpace < 3); //While the input value is not a null value or empty string or least 3 characters.\r\n\r\n // Loop used to capitalize the first letter of the name and without using any other auxiliary class, such as the StringBuilder\r\n String letter = \"\";\r\n String capitalizedName = \"\";\r\n boolean isFirstLetter;\r\n for (int i=0; i < input.length(); i++) {\r\n\r\n isFirstLetter = false;\r\n\r\n if (i == 0) {\r\n while (input.charAt(i) == ' ') { // Ignores spaces that the user typed before the first letter of the name\r\n i++;\r\n }\r\n isFirstLetter = true;\r\n }\r\n\r\n if (input.charAt(i) == ' ' && (i+1) < input.length()) {\r\n if (input.charAt(i) == ' ' && input.charAt(i + 1) == ' ') {\r\n letter = \"\";\r\n } else {\r\n letter += \" \" + input.charAt(i + 1);\r\n capitalizedName += letter.toUpperCase();\r\n i++;\r\n letter = \"\";\r\n }\r\n }\r\n else if (isFirstLetter == true) {\r\n letter += input.charAt(i);\r\n capitalizedName += letter.toUpperCase();\r\n letter = \"\";\r\n }\r\n else if (input.charAt(i) != ' ') {\r\n letter += input.charAt(i);\r\n capitalizedName += letter.toLowerCase();\r\n letter = \"\";\r\n }\r\n }\r\n\r\n return capitalizedName;\r\n }", "public String getRandomName() {\n\t\t\n\t\tRandom r = new Random();\n\t\t\n\t\t//pick a firstname and surname based on length of array\n\t\tString fname = firstName[r.nextInt(firstName.length)];\n\t\tString sname = surName[r.nextInt(surName.length)];\n\t\t\n\t\treturn ( fname + \" \" + sname);\n\t\t\n\t}", "private void registerUser() throws FileNotFoundException, IOException\r\n\t{\r\n\t\tString username;\r\n\t\tString password;\r\n\t\tString fname;\r\n\t\tString lname;\r\n\t\tint attempt = 0;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tRandom random = new Random();\r\n\t\t\r\n\t\t//PrintWriter wrapped around a BufferedWriter that is wrapped around a FileWriter\r\n\t\t//used to write on a file\r\n\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"UserAccount.txt\", true)));\t//true allows appending\r\n\t\t\r\n\t\t//gets user's first and last name\r\n\t\tSystem.out.println(\"Enter your first name: \");\r\n\t\tfname = input.nextLine();\r\n\t\tSystem.out.println(\"Enter your last name: \");\r\n\t\tlname = input.nextLine();\r\n\t\t\r\n\t\t//gets user's desired username\r\n\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\tusername = input.nextLine();\r\n\t\tattempt++;\r\n\t\twhile (checkUserExists(username) != -1)\t\t//username already exists\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nThat username already exists\");\r\n\t\t\tif (attempt == 2)\t\t//generate random username with 8 characters after 2 attempts\r\n\t\t\t{\r\n\t\t\t\tif (lname.length() < 6)\t\t\t\t//if last name has less than six characters\r\n\t\t\t\t\tusername = lname;\r\n\t\t\t\telse\t\t\t\t\t\t\t\t//else if last name has six characters or greater\r\n\t\t\t\t\tusername = lname.substring(0, 6);\r\n\t\t\t\tfor (int i = username.length(); i < 8; i++)\t\t\t//loop runs until username has 8 characters\r\n\t\t\t\t\tusername += random.nextInt(9) + 1;\t\t\t\t//concatenate random number between 0 - 9 to the username\r\n\t\t\t\tSystem.out.println(\"A randomly generated username has been chosen for you.\");\r\n\t\t\t\tSystem.out.println(\"Your username is \" + username);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Enter desired username: \");\r\n\t\t\t\tusername = input.nextLine();\r\n\t\t\t\tattempt++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpw.println(username);\r\n\t\tuserAccounts[0][numOfUsers] = username;\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t//get user's password\r\n\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\tpassword = input.nextLine();\r\n\t\twhile (password.length() < 8)\t\t\t//continues to loop until pass is at least 8 characters long\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nPassword must be at least eight characters long\");\r\n\t\t\tSystem.out.println(\"Enter password (Must be 8 characters long): \");\r\n\t\t\tpassword = input.nextLine();\r\n\t\t}\r\n\t\tpw.println(password);\r\n\t\tuserAccounts[1][numOfUsers] = password;\r\n\t\tnumOfUsers++;\r\n\t\tpw.close();\r\n\t}", "public static String generateRandomUsername() {\n final String randomFirst = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomSecond = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomThird = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n String userName = randomFirst + randomSecond + randomThird;\n\n userName = userName.substring(0, 10) + \"@ngetestmail.com\";\n\n return userName;\n }", "public NameGenerator() {\n this.rand = new Random();\n }", "public static void main(String[] args) {\n\t\tint numberRandom = (int)((Math.random() * 10) + 1);\n\t\t\n\t\t// creer un scanner, et rentrer une chiffre\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"entrez un nombre\");\n\t\tint numberUser = scan.nextInt();\n\t\t\n\t\t//tant que le nombre est faux, on en essaye un autre\n\t\twhile (numberUser != numberRandom) {\n\t\t\tSystem.out.println(\"entrez de nouveau un nombre\");\n\t\t\tnumberUser = scan.nextInt();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"vous avez gagne!\");\n\n\t}", "@Override\n\tpublic void setupName(GameEnvironment incomingGame) {\n\t\tthis.game = incomingGame;\n\t\tboolean state = true;\n\t\twhile(state == true) {\n\t\t\tSystem.out.println(\"Hey mate! What is your name?\");\n\t\t\ttry {\n\t\t\t\tString name = scanner.nextLine();\n\t\t\t\tif (name.matches(NAME_REGEX)) {\n\t\t\t\t\tstate = false;\n\t\t\t\t\tgame.setName(name);\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(NAME_REQUIREMENTS);\n\t\t\t\t}\n\t\t\t} catch(Exception e){\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t}\n\t}", "static public String hobNameGen(){\n int i = rand.nextInt(8);\n String hName = name[i];\n return hName;\n }", "private static void promptName() {\n\t\tSystem.out.print(\"Please enter a name: \");\n\t}", "public static void main(String[] args) {\n Scanner name =new Scanner(System.in);\r\n String Name=name.next();\r\n for (int i=0;i<=15;i++)\r\n {\r\n \t System.out.println(Name);\r\n }\r\n\t}", "public static void main(String[] args) {\n String username = \"\";\n if (args.length != 0) {\n username = args[0]; \n // If username, ensure proper case\n String[] userNamePropCase = username.split(\"\\\\s+\");\n username = \"\";\n for (int i = 0; i < userNamePropCase.length; i++) {\n if (i != 0) {\n username += \" \";\n } \n char firstLetter = userNamePropCase[i].charAt(0);\n firstLetter = Character.toUpperCase(firstLetter);\n System.out.printf(\"first letter: %c\\n\", firstLetter);\n String restOfName = userNamePropCase[i].substring(1, userNamePropCase[i].length());\n username += (firstLetter + restOfName);\n }\n System.out.printf(\"Hello, %s!\\n\", username);\n } else {\n System.out.println(\"Hello, Chris!\");\n }\n }", "public void setUsername(String name)\r\n {\r\n int index = -1;\r\n //Check if the new username is not already taken before setting the new username\r\n if(usernamesTaken.indexOf(name) == -1)\r\n {\r\n index = usernamesTaken.indexOf(this.username);\r\n usernamesTaken.set(index, name);\r\n this.username = name;\r\n }\r\n else\r\n {\r\n //Outouts a warning message\r\n System.out.println(\"WARNING: This username is already taken\");\r\n }//end if \r\n }", "String generateUniqueName();", "private void addStudentParticulars() throws Exception {\n String gender = \"MALE\";\n Student student = new Student();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Please enter the student's username:\");\n String username = sc.nextLine();\n while((!username.matches(\"^[a-zA-Z0-9]+$\"))||(username.length()!=7))\n {\n if (username.length()!=7)\n System.out.println(\"Input characters only can have 7 characters.\");\n else\n System.out.println(\"Only alphanumeric allowed\");\n System.out.println(\"\\nPlease enter the student's username:\");\n username = sc.nextLine();\n }\n username = username.toUpperCase();\n\n\n while((this.studentMgr.readSingleStudent(username).getName())!=null){\n\n System.out.println(\"Username already exist\");\n System.out.println(\"\\n***********What would you like to do next ?***********\");\n System.out.println(\" Student Information \");\n System.out.println(\"______________________________________________________\\n\");\n System.out.println(\"|1. Add another student |\");\n System.out.println(\"|2. Update information for this student |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"|0. Return to admin menu page |\");\n System.out.println(\"|----------------------------------------------------|\");\n System.out.println(\"______________________________________________________\");\n\n //sc.nextLine();\n int choice;\n do {\n while (!sc.hasNextInt()) {\n System.out.println(\"Invalid input! Please enter your choice:\");\n sc.next();\n }\n choice = sc.nextInt();\n if((choice < 0) || (choice > 2))\n System.out.println(\"Invalid input! Please enter your choice:\");\n } while ((choice < 0) || (choice > 2));\n if(choice == 1){\n System.out.println(\"Please enter the student's username:\");\n username = sc.nextLine();\n while(!username.matches(\"^[a-zA-Z0-9]+$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter the student's username:\");\n username = sc.nextLine();\n }\n username = username.toUpperCase();\n student.setName(username);\n }\n else if(choice ==2){\n this.nameExist = username;\n this.updStudentParticulars();\n }\n else\n return;\n\n }\n\n student.setUsername(username);\n \n\n System.out.println(\"Please enter \"+username+\"'s student name:\");\n String name = sc.nextLine();\n while(!name.matches(\"^[ A-Za-z]+$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter \"+username+\"'s student name:\");\n name = sc.nextLine();\n }\n name = name.toUpperCase();\n student.setName(name);\n\n\n System.out.println(\"Please enter \"+username+\"'s password:\");\n String password = sc.nextLine();\n student.setPassword(password);\n\n\n\n //matric num\n System.out.println(\"Please enter \"+username+\"'s matric num (A1234567B):\");\n String matricNum = sc.nextLine();\n while(!matricNum.matches(\"[a-zA-Z]\\\\d{7}[a-zA-Z]\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter \"+username+\"'s matric num (A1234567B):\");\n matricNum = sc.nextLine();\n }\n matricNum = matricNum.toUpperCase();\n student.setMatricNumber(matricNum);\n\n //gender\n System.out.println(\"Please enter \"+username+\"'s gender, M or F?\");\n char genderChar = sc.next().charAt(0);\n while((Character.toUpperCase(genderChar)!='M')&&(Character.toUpperCase(genderChar)!='F'))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter \"+username+\"'s gender, M or F?\");\n genderChar = sc.next().charAt(0);\n }\n sc.nextLine();\n genderChar = Character.toUpperCase(genderChar);\n if(genderChar=='F')\n gender = \"FEMALE\";\n\n student.setGender(gender);\n\n //nationality\n System.out.println(\"Please enter \"+username+\"'s nationality :\");\n String nationality = sc.nextLine();\n while(!nationality.matches(\"^[a-zA-Z]*$\"))\n {\n System.out.println(\"Invalid input! Please enter again!\");\n System.out.println(\"Please enter \"+username+\"'s nationality: \");\n nationality = sc.nextLine();\n }\n nationality = nationality.toUpperCase();\n\n student.setNationality(nationality);\n\n\n adminManager.addStudent(student);\n System.out.println(\"Add student successfully!\\n\");\n printAllStudentInDB();\n //add student information\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint choice=0;\r\n\t\tint pin;\r\n\t\t\r\n\t\t\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tRandom rand=new Random();\r\n\t\tdo\r\n\t\t{\r\n\t\t\tSystem.out.println(\"1. Create User \");\r\n\t\t\tSystem.out.println(\"2. Login \");\r\n\t\t\tSystem.out.println(\"3. Exit \");\r\n\t\t\tSystem.out.println(\"Enter a choice : \");\r\n\t\t\tchoice=sc.nextInt();\r\n\t\t\t//sc.nextLine();\r\n\t\t\tif(choice==1)\r\n\t\t\t{\r\n\t\t\t\tString name,phone,mail,lname;\r\n\t\t\t\tob[noAcc]=new Accountss();\r\n\t\t\t\tSystem.out.println(\"Enter the details...\");\r\n\t\t\t\tSystem.out.println(\"Enter the Name \t\t: \");\r\n\t\t\t\tname=sc.next();\r\n\t\t\t\tif(noAcc!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(ob[i].name.toString().equals(name))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"\\n Enter your Last Name :\");\r\n\t\t\t\t\t\t\tlname=sc.next();\r\n\t\t\t\t\t\t\tname=name+lname;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tob[noAcc].name=new StringBuffer(name);\r\n\t\t\t\tSystem.out.println(\"Enter the Phone Number : \");\r\n\t\t\t\tphone=sc.next();\r\n\t\t\t\tint flag=1;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tflag=1;\r\n\t\t\t\t\tif(phone.length()!=10)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSystem.out.println(\"Phone Number Must Contains 10 digit.. Enter a new Number\");\r\n\t\t\t\t\t\tphone=sc.next();\r\n\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t\tif(ob[i].phone.toString().equals(phone))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Phone Number Already Exists.. Enter a new Number\");\r\n\t\t\t\t\t\t\tphone=sc.next();\r\n\t\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}while(flag!=1);\r\n\t\t\t\tob[noAcc].phone=new StringBuffer(phone);\r\n\t\t\t\tSystem.out.println(\"Enter the Mail : \");\r\n\t\t\t\tmail=sc.next();\r\n\t\t\t\t\r\n\t\t\t\tdo {\r\n\t\t\t\t\tflag=1;\r\n\t\t\t\t\tif(!mail.contains(\"@\")||!mail.contains(\".\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Not a valid Email ID.. Enter a new Mail ID\");\r\n\t\t\t\t\t\tmail=sc.next();\r\n\t\t\t\t\t\tflag=0;\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t\t\tif(ob[i].mail.toString().equals(mail))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Mail ID Already Exists.. Enter a new Mail ID\");\r\n\t\t\t\t\t\t\tmail=sc.next();\r\n\t\t\t\t\t\t\tflag=0;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}while(flag!=1);\r\n\t\t\t\tob[noAcc].mail=new StringBuffer(mail);\t\t\t\r\n\t\t\t\tSystem.out.println(\"Enter the Address : \");\r\n\t\t\t\tob[noAcc].addr=new StringBuffer(sc.nextLine());\r\n\t\t\t\tsc.nextLine();\r\n\t\t\t\tob[noAcc].accNo+=noAcc;\r\n\t\t\t\tSystem.out.println(\"Account Number is : \"+ob[noAcc].accNo);\r\n\t\t\t\tpin=rand.nextInt(8999)+1000;\r\n\t\t\t\tSystem.out.println(\"Generated PIN = \"+pin);\r\n\t\t\t\tob[noAcc].pin=pin;\r\n\t\t\t\tnoAcc++;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(choice==2)\r\n\t\t\t{\r\n\t\t\t\tint pin_number;\r\n\t\t\t\tint id=-1;\r\n\t\t\t\t//do{\r\n\t\t\t\tSystem.out.println(\"Enter the Account Number : \");\r\n\t\t\t\tint accNo=sc.nextInt();\r\n\t\t\t\tfor(int i=0;i<noAcc;i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif((ob[i].accNo)==accNo)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tid=i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(id==-1)\r\n\t\t\t\t\tSystem.out.println(\"Account not Found...\");\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Enter the Pin : \");\r\n\t\t\t\t\tpin_number=sc.nextInt();\r\n\t\t\t\t\tif(pin_number==ob[id].pin)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Account Found..\");\r\n\t\t\t\t\t\tOptions(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tSystem.out.println(\"Incorrect PIN...\");\r\n\t\t\t\t\t\tid=-1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t//}while(id!=-1);\r\n\t\t\t}\r\n\t\t\telse if(choice==3)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Have a nice Day :D\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid Choice...\");\r\n\t\t\t}\r\n\r\n\t\t}while(choice!=3);\r\n\t\tsc.close();\r\n\t}", "public static void main (String[] args){\n System.out.println(\"What is your name?\");\n Scanner console = new Scanner(System.in);\n String first = console.next();\n String subfirst = first.substring(1);\n String last = console.next();\n String sublast = last.substring(1);\n\n name(first, subfirst);\n name(last, sublast);\n\n\n }", "public static String generateName() {\n return new Generex(PatternValidator.NAME_PATTERN).random();\n }", "private String randomName() {\n\n String name = this.names.get(intRandom(names.size() - 1));\n return name;\n }", "public static String getRandomName() {\n String name =\n names[RandomNumberGenerator.getRandomInt(0, names.length - 1)] + \" \"\n + nameSuffixes[RandomNumberGenerator.getRandomInt(0, nameSuffixes.length - 1)];\n return name.trim();\n }", "public static void createUsername(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeeUsername = \"\";\n\t\tdo {\n\t\t\temployeeUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (!newEmp.setUsername(employeeUsername)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong employee name, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeeUsername));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/username.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeeUsername + \", \");\n\t\toutputFile.close();\n\t}", "public String generateStarterName() {\n\t\treturn starterName.get(roll.nextInt(starterName.size()));\n\t}", "public void createUser(String chosen)\n {\n String role = chosen;\n boolean valid = false;\n String name = \"\";\n String username = \"\";\n String email = \"\";\n String gender = \"\";\n String password = \"\";\n ArrayList<String> skillsets = new ArrayList<String>();\n \n Scanner answer = new Scanner(System.in);\n while(!valid)\n {\n System.out.println();\n System.out.print(\"\\t\\t >> Please insert your name : \");\n name = answer.nextLine().trim();\n valid = validation.checkNoBlank(name);\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your username : \");\n username = answer.nextLine().trim();\n valid = validation.checkNoBlank(username);\n boolean existance = validation.checkUserNameExistance(username, userList);\n if (existance == true)\n {\n valid = false;\n System.out.println();\n System.out.println(\"\\t\\t !! This username is already exist, please choose another one\");\n System.out.println();\n }\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your gender(male/female) : \");\n gender = answer.nextLine().trim();\n valid = validation.checkGenderAnswer(gender);\n }\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please insert your email : \");\n email = answer.nextLine().trim();\n valid = validation.checkNoBlank(email);\n }\n \n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please set your password : \");\n password = answer.nextLine().trim();\n valid = validation.checkNoBlank(password);\n }\n \n if(role.equals(\"2\"))\n {\n String decision = \"y\";\n String tmpSkill = \"\";\n while(decision.equals(\"y\"))\n {\n valid = false;\n while(!valid)\n {\n System.out.print(\"\\t\\t >> Please set your skillsets: \");\n tmpSkill = answer.nextLine().trim();\n valid = validation.checkNoBlank(tmpSkill);\n valid = validation.checkNoSkill(tmpSkill, skillsets);\n }\n skillsets.add(tmpSkill);\n System.out.print(\"\\t\\t >> Would you like to input another skill?(y/n)\");\n decision = answer.nextLine().trim();\n decision = decision.substring(0, 1);\n while(!decision.equals(\"n\") && !decision.equals(\"y\"))\n {\n System.out.print(\"\\t\\t >> Input wrong! Please input y for yes or n for no: \");;\n decision = answer.nextLine().trim();\n decision = decision.substring(0,1);\n }\n }\n createJobSeeker(name,username,gender,email,password,skillsets);\n }\n else\n if (role.equals(\"1\"))\n {\n System.out.println(\"\\t\\t >> Please input your company name:\");\n String companyName = answer.nextLine();\n System.out.println(\"\\t\\t >> Please input your location:\");\n String location = answer.nextLine();\n createJobRecruiter(name, username, gender, email, password, companyName, location);\n }\n \n }", "public void setNames(){\n System.out.println();\n System.out.println(\"Welcome! Please set your username!\");\n for(int i = 0; i < players.size(); i ++){\n Player player = players.get(i);\n player.rename(\"Dealer Jack\");\n for(int j = 0; j < i; j ++){\n while(player.getName().equals(players.get(j).getName())){\n System.out.println(\"Username taken! Please enter another name!\");\n player.setName(\"player\" + (i + 1));\n player.rename(\"Dealer Jack\");\n }\n }\n }\n }", "public String printNewUsernamePrompt() {\n return \"Please enter new username: \";\n }", "private static String getName(){\r\n\t\treturn new StringBuilder(input.next()).substring(0,3);\r\n\t}", "public void setUserName(String UserName){\r\n\t\tString UsrName = getValue(UserName);\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\");\r\n\r\n\t\tDate date = new Date();\r\n\r\n\t\tString ldDate=(String) dateFormat.format(date);\r\n\r\n\t\t//String USR = getValue(Username);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+UsrName);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Username should be entered in Login\");\r\n\t\ttry{\r\n\t\t\tif((countrygroup_username).contains(countries.get(countrycount))){\r\n\t\t\t\tsendKeys(locator_split(\"txtRegistrationUniqueUsername\"), UsrName+ldDate);\t\r\n\t\t\t\tSystem.out.println(\"User Name is entered\");\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Username is entered in username field\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Username is not applicable to \" + country);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Username is not entered in Login field with WebElement \"+elementProperties.getProperty(\"txtUserName\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"txtRegistrationUniqueUsername\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "public static void main(String [] arg){\n\t\tUser user1 = new User(\"Joachim Holger Waldemar Christian\");\n\t\tSystem.out.println(user1);\n\t\t\n\t\tUser user2 = new User(\"Ib Bo\");\n\t\tSystem.out.println(user2);\n\t\t\n\t\tUser user3 = new User(\"Åge Bøgeskov\");\n\t\tSystem.out.println(user3);\n\n\t\t// Til test af opg. 1b \n\t\tSystem.out.println(user1.makeUserName());\n\t\tSystem.out.println(user2.makeUserName());\n\t\tSystem.out.println(user3.makeUserName());\n\n\t}", "private void nameturn1() {\n \tplayerturn = randplayerstart%2;\n \tSystem.out.println(\"random geneator:\"+randplayerstart);\n \tif (playerturn%2==0) {\n \t\tplayername=namePlayer1;\n \t}\n \telse { playername=namePlayer2;}\n }", "public void decideName()\n {\n System.out.println(\"What do want your newly tamed WIND dragon to be named?\");\n String name = new String(input.nextLine());\n \n setName(name);\n }", "public String nameValidate() {\r\n String regex = \"[a-zA-Z]{1,10}\";\r\n\r\n // create user input\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n while (true) {\r\n System.out.print(\"Enter the name: \");\r\n String input = scanner.nextLine();\r\n // check if user enter a string between 1-10\r\n if (input.matches(regex)) {\r\n return input;\r\n } else {\r\n System.out.println(\"Please enter a correct name, name's length should between 1 and 10.\");\r\n }\r\n }\r\n\r\n }", "private static String getUserName(){\r\n Scanner in = new Scanner(System.in);\r\n System.out.print(\"What is your character's name?\");\r\n return in.nextLine();\r\n }", "private static String getRegattaName() {\n\t\tString name = \"\";\n\n\t\tSystem.out.println(\"\\nPlease enter a name for the regatta...\");\n\t\tdo {\n\t\t\tSystem.out.print(\">>\\t\");\n\t\t\tname = keyboard.nextLine().trim();\n\t\t\tif(\"exit\".equals(name)) goodbye();\n\t\t} while(!isValidRegattaName(name) || name.length() == 0);\n\n\t\treturn name;\n\t}", "public void setPlayerName()\r\n\t{\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter your name: \");\r\n\t\tname = in.nextLine();\r\n\t}", "public static ArrayList<String> nameInput() {\r\n\t\tString name = \"initialized\";\r\n\t\twhile(name.length() > 0) {\r\n\t\tSystem.out.println(\"Enter name: \");\r\n\t\tname = input.nextLine();\r\n\t\tnames.add(name);\r\n\t\t}\r\n\t\treturn names;\r\n\t}", "public String generateName(long chatID) throws SQLException {\n Set<String> userNames = chatdao.getUserNames(chatID);\n int size = userNames.size();\n Set<String> randomNames = userdao.getNUsernames(size + 1);\n String randomName = \"\";\n\n randomName = generateRandomName(randomNames, userNames, true);\n return randomName;\n }", "public static void main(String[] args) {\n\r\n\r\n Scanner scan = new Scanner(System.in);\r\n String word = scan.next();\r\n String separator = scan.next();\r\n int count = scan.nextInt();\r\n\r\n\r\n String name = \"\";\r\n for (int i = 1; i <= count; i++) {\r\n\r\n name = name +word + separator ;\r\n\r\n if (i == count) {\r\n\r\n System.out.print(name.substring(0, name.length()-separator.length() ));\r\n } else {\r\n continue;\r\n }\r\n\r\n }\r\n }", "public String randomName() {\n return RandomStringUtils.randomAlphabetic( 10 );\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner scan=new Scanner(System.in);\n\t\tint a=1;\n\t\twhile(a<6) {\n\t\t\t\t\n\t\tSystem.out.print(\"Please enter your name\");\n\t\tString name=scan.nextLine();\n\t\tSystem.out.println(\"Good afternoon \"+name);\n\t\ta++;\n\t\t}\n\t}", "public void registration() {\n\t\tSystem.out.print(\"Enter Name : \");\r\n\t\tthis.name=scan.nextLine();\r\n\t\tSystem.out.print(\"Enter Age : \");\r\n\t\tthis.age=scan.nextInt();\r\n\t\tSystem.out.print(\"Enter Gender : \");\r\n\t\tthis.gender=scan.next().charAt(0);\r\n\t\tscan.nextLine();\r\n\t\tSystem.out.print(\"Enter Price : \");\r\n\t\tthis.price=scan.nextDouble();\r\n\t\tSystem.out.print(\"Enter Quantity : \");\r\n\t\tthis.quantity=scan.nextInt();\t\r\n\t\tSystem.out.println(\"Register Successfully\");\r\n\t}", "@Test (priority = 0)\n public void test001createUserWithUserNameOnlyTest() {\n close();\n login();\n\n checkLoginIsPerformed();\n //create user with filled user name only\n createUser(SIMPLE_USER_NAME, new HashMap<String, String>());\n checkOperationStatusOk(\"Save (GUI)\");\n\n //search for the created in users list\n searchForElement(SIMPLE_USER_NAME);\n $(By.linkText(SIMPLE_USER_NAME)).shouldBe(visible).click();\n }", "private String randomSurname() {\n\n String surname = this.surnames.get(intRandom(surnames.size() - 1));\n return surname;\n }", "public static String generatePatientName(){\n\n\t\tString retName = \"\";\t// return this string\n\n\t\t// Seed random generator\n\t\tRandom generator = new Random();\n\n\t\tint length = getRandomBetween(5,6);\n\n\t\t// CVCCVC or VCCVCV\n\t\tif(getRandomBetween(1,2) < 2)\n\t\t{\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomVowel();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tif (length >= 5) { retName += getRandomVowel(); }\n\t\t\tif (length >= 6) { retName += getRandomConsonant(); }\n\t\t}\n\t\telse\n\t\t{\n\t\t\tretName += getRandomVowel();\n\t\t\tretName = retName.toUpperCase();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomConsonant();\n\t\t\tretName += getRandomVowel();\n\t\t\tif (length >= 5) { retName += getRandomConsonant(); }\n\t\t\tif (length >= 6) { retName += getRandomVowel(); }\n\t\t}\n\n\t\treturn retName;\n\t}", "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}", "public static void SetPlayerNames () {\n for (int i = 0; i < player_count; i++) {\r\n\r\n // PROMPT THE USER\r\n System.out.print(\"Player \" + (i+1) + \", enter your name: \");\r\n\r\n // INSTANTIATE A NEW PLAYER USING THE NAME THAT'S PROVIDED\r\n player[i] = new Player(input.nextLine());\r\n\r\n // IF THE PLAYER DOESN'T ENTER A NAME, CALL THEM \"BIG BRAIN\"\r\n if (player[i].name.length() == 0) {\r\n player[i].name = \"Big Brain\";\r\n System.out.println(\"Uh, OK...\");\r\n }\r\n\r\n }\r\n\r\n // MAKE SOME SPACE...\r\n System.out.println();\r\n }", "public static String startGame() {\n Scanner scan = new Scanner(System.in);\n System.out.print(\"Enter your name:\");\n String playerName = scan.nextLine();\n if(playerName.isEmpty()) {\n playerName = \"Player 1\";\n System.out.println(\"Somehow you failed to type your own name in...\");\n System.out.print(\"I'll just call you Player 1 :)\\n\\n\");\n }\n System.out.print(\"WELCOME to the High/Low Game \" + playerName + \"!\\n\\n\");\n System.out.print(\"The objective of this game is to determine the randomly generated number between 0 & 100\\n\");\n System.out.println(\"When prompted for a guess, enter an integer and NOTHING else.\");\n System.out.println(\"Upon your guess, the game will return high if your guess was higher than the number,\");\n System.out.println(\"and low if your guess was lower than the number.\");\n System.out.println(\"The goal is to eventually figure out the exact number... shouldn't be too hard right?\");\n System.out.print(\".\\n.\\n.\\nGOOD LUCK!\\n\");\n return playerName;\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter fullname:\");\n\t\tString name = input.nextLine();\n\t\tinput.close();\n\t\t\n\t\t//find the index of the space between first and last names\n\t\tint spaceIndex = name.indexOf(\" \");\n\t\t//Gives the value from index 0 until spaceIndex \n\t\tString firstName = name.substring(0, spaceIndex);\n\t\t//Gives the value from spaceIndex + 1 until the last index of lastName\n\t\tString lastName = name.substring(spaceIndex + 1);\n\t\t\n\t\t\n\t\ttheNameSong(firstName);\n\t\ttheNameSong(lastName);\n\t}", "private String insertDirector()\n {\n boolean valid = false; \n String director = \"\";\n Scanner console = new Scanner(System.in);\n \n while (!valid)\n {\n System.out.print(\"\\t\\tPlease insert the movies' director name: \");\n director = console.nextLine().trim();\n valid = validation.checkNoBlank(director);\n }\n \n return director;\n }", "private String generateName() {\n\t\tString ret = \"\";\n\n\t\t// Create names, middle names and last names to randomize\n\t\tString[] names = { \"MARCIA\", \"TIAGO\", \"JULIO\", \"ANGELA\", \"FABIO\",\n\t\t\t\t\"EDIRLEI\", \"RODRIGO\", \"FLAVIO\", \"CARLOS\", \"ANDRE\", \"LUCAS\",\n\t\t\t\t\"EDUARDO\", \"GEOVANI\", \"GIULIA\", \"PIETRO\", \"MARIA\", \"SOPHIA\",\n\t\t\t\t\"ELISA\", \"JOANA\", \"CAUE\", \"SABRINA\", \"KEVIN\", \"GOKU\", \"HENRY\",\n\t\t\t\t\"HUGO\", \"VITOR\", \"EMANUEL\", \"LUIZ\", \"HEITOR\", \"MURILO\", \"LORENZO\" };\n\t\tString[] midNames = { \"LIMA\", \"FREITAS\", \"VIEIRA\", \"DIAS\", \"CRUZ\",\n\t\t\t\t\"MELO\", \"CHAGAS\", \"OLIVEIRA\", \"ROSA\", \"AMORIN\", \"ANTUNES\", \"BEPLER\",\n\t\t\t\t\"BERTO\", \"BERGLER\", \"BOGO\", \"BONETTO\", \"BONFIM\", \"BRITO\", \"BRUNELLI\",\n\t\t\t\t\"BUSO\", \"CADORI\", \"CASTILHO\", \"CASTRO\", \"CHAGAS\", \"CROSS\" };\n\t\tString[] lastNames = { \"OLIVEIRA\", \"BRASIL\", \"GONCALVES\", \"MARTINS\",\n\t\t\t\t\"MATTOS\", \"SILVA\", \"SOUZA\", \"BORGES\", \"FAUST\", \"FARIA\", \"FEIDER\",\n\t\t\t\t\"FILLA\", \"FONSECA\", \"GASPAROTO\", \"GERMANA\", \"GESSER\", \"HELFER\",\n\t\t\t\t\"HERING\", \"HESSMANN\", \"MAYER\", \"NECKEL\", \"NEVES\", \"NERCOLINI\"};\n\n\t\t// util.Random = Allowed, RIGHT?\n\t\tret = names[(new Random()).nextInt(31)] + \" \"\n\t\t\t\t+ midNames[(new Random()).nextInt(25)] + \" \"\n\t\t\t\t+ lastNames[(new Random()).nextInt(23)];\n\t\treturn ret;\n\t}", "public static String getUserName(Scanner read) {\n System.out.println(\"Welcome to Rock Paper Scissors. I, the computer, will be your opponent.\");\n System.out.print(\"Please type in your name and press return: \");\n return read.nextLine();\n }", "public static void main(String[] args) {\nString name;\nScanner s=new Scanner(System.in);\n\tSystem.out.println(\"Please enter your first name: \");\n\tname=s.next();\n\tSystem.out.println(name+\", Welcome\");}", "public String generateToken(String username) {\n\t\tString token = username;\n\t\tLong l = Math.round(Math.random()*9);\n\t\ttoken = token + l.toString();\n\t\treturn token;\n\t}", "public static void main(String[] args){\n Scanner input = new Scanner(System.in);\n \n int nameLength = 0;\n String answer = \"\";\n boolean flag = true; //true that character is a letter\n \n //check if the name is more than 1 character long\n while(nameLength < 2){\n \n System.out.println(\"What is your name?\");\n \n //get answer from console\n answer = input.next();\n \n //now check if each character is a letter\n while(flag){\n\n //use a for-loop because we know how many letters it has\n for(int index = 0; index < answer.length(); index++){\n\n //check if the character is a letter or number\n if(!Character.isLetter(answer.charAt(index))){ //if it's not a letter\n flag = true;\n System.out.println(\"Please enter in a name that only has letters!\");\n answer = input.next();\n break; //gets out of current loop\n }//end if\n else{\n flag = false;\n }\n }//end of for-loop\n\n //if no non-letters were found, exit while loop\n if(!flag){\n flag = true;\n break;\n }\n } //end of while\n \n //check if name is less than 2 characters\n if(answer.length() < 2){\n System.out.println(\"Please enter in a name that is at least \"\n + \"two letters\");\n }\n \n nameLength = answer.length(); //update length of answer\n \n } //end while loop\n \n if(nameLength >= 2 && flag){\n System.out.println(\"Welcome, \" + answer);\n }\n \n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Type your name: \");\n String name = scanner.nextLine();\n int i = 0;\n while((i<3)&& name.length()>3){\n\n System.out.println((i+1)+\". \"+\"character: \" + name.charAt(i));\n i++;\n }\n\n }", "@When(\"^The user enter the username$\")\n\tpublic void the_user_enter_the_username() throws Throwable {\n\t\t\n\t lpw.username_textbox();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint num;\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tJname jk = new Jname();\r\n\t\t\r\n\t\t//System.out.println(\"Enter the other name:\");\r\n\t\t//oname = sc.nextLine();\r\n\t\t\r\n\t\tjk.Dname();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public void guessName()\n\t{\n\t\tSystem.out.println(\"Who do you think it is?\");\n\t\tguessName = scan.nextLine();\n\t\tif(guessName.equals(name))\n\t\t{\n\t\t\tSystem.out.println(\"Congratulations, you are correct!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"You are incorrect\");\n\t\t\tSystem.out.println(\"The correct answer was \" + name);\n\t\t}\n\t}", "String getNewName();", "public String generateLogin(String firstName, String lastName) {\n Character firstLetter = firstName.charAt(0);\n String login = transliteration(firstLetter.toString());\n login += transliteration(lastName);\n usersLogins = userRepository.findUsersWithPartOfLogin(login).stream().map(user -> user.getLogin()).collect(Collectors.toCollection(ArrayList::new));\n int possibleEndingOfLogin = 0;\n if (usersLogins.contains(login))\n do{\n possibleEndingOfLogin++;\n }while (usersLogins.contains(login + possibleEndingOfLogin));\n return possibleEndingOfLogin != 0 ? login + possibleEndingOfLogin : login;\n }", "@java.lang.Override\r\n public String askName() {\r\n Hello.display(\"Welcome! What is your name?\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.next();\r\n return name;\r\n }", "public String setUserFirstName(){\n String firstName = \"\";\n while(firstName.isBlank()) {\n System.out.print(\"Please Enter First Name: \");\n firstName = supplyString.get();\n }\n return firstName.trim();\n }", "public Namer(boolean unique) {\r\n randomizer = new Random();\r\n if(unique) {\r\n previousNames = new HashSet();\r\n maxNames = calculateMaxNames();\r\n }\r\n else {\r\n previousNames = null;\r\n maxNames = -1;\r\n }\r\n }", "public static void main(String[] args) {\n String name[]= {\"Liam\", \"Emma\", \"Noah\", \"Olivia\", \"William\"};\n Scanner input= new Scanner(System.in);\n System.out.println(\" please enter a name: \");\n String user= input.next();\n System.out.println(\" please enter a index number: \");\n int number= input.nextInt();\n for (int i = 0; i < name.length ; i++) {\n if(number==i){\n name[i]=user;\n\n }\n\n }\n System.out.println(Arrays.toString(name));\n }", "String printName(String input);", "public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}", "private static String makeName(int len, Random r) {\n StringBuffer sb = new StringBuffer();\n sb.append(start.get(r.nextInt(start.size())));\n while (sb.length() < len)\n sb.append(part.get(r.nextInt(part.size())));\n return sb.toString();\n }", "public String setUserLastName(){\n String lastName = \"\";\n while(lastName.isBlank()) {\n System.out.print(\"Please Enter Last Name: \");\n lastName = supplyString.get();\n }\n return lastName.trim();\n }", "public String getRandomCustName() {\n\t\tString generatedCustName = RandomStringUtils.randomAlphanumeric(Integer.valueOf(custNameLimit));\n\t\tlog.info(\"generatedCustName: \" + generatedCustName);\n\t\treturn generatedCustName;\n\t}", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "public void addUser()\r\n\t{\r\n\t\tsc.nextLine(); \r\n\t\tSystem.out.print(\"Please enter your username: \");\r\n\t\tString username=sc.nextLine();\r\n\t\tusername=username.trim();\r\n\t\tString password=\"\",repassword=\"\";\r\n\t\tboolean flag=false;\r\n\t\twhile(!flag)\r\n\t\t{\r\n\t\t\tboolean validpassword=false;\r\n\t\t\twhile(!validpassword)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Please enter your password: \");\r\n\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\tif(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.print(\"Please re-enter your password: \");\r\n\t\t\trepassword=sc.nextLine();\r\n\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\tif(!flag)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tString hash_password=hashfunction(password); \r\n\t\tSystem.out.print(\"Please enter your full name: \");\r\n\t\tString fullname=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your email address: \");\r\n\t\tString email=sc.nextLine();\r\n\t\tSystem.out.print(\"Please enter your Phone number: \");\r\n\t\tlong phone_number=sc.nextLong();\r\n\t\tString last_login=java.time.LocalDate.now().toString();\r\n\t\tuser_records.add(new User(username,hash_password,fullname,email,phone_number,0,last_login,false));\r\n\t\tSystem.out.println(\"Record added successfully!\");\r\n\t}", "public void checkUserName(String userName, String playerType) throws Exception{\r\n\t\t\r\n\t\tboolean check = false;\r\n\t\tSystem.out.println(\"Checking Username\");\r\n\t\tFile file = new File(filePath);\r\n\t\tif(file.exists()) {\r\n\t\t\tScanner in = new Scanner(file);\r\n\t\t\t//if a user with the same name is found, then choose different name\r\n\t\t\twhile(in.hasNextLine()) {\r\n\t\t\t\tif(userName.equals(in.nextLine())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tcheck = true;\r\n\t\t\t\t\tSystem.out.println(\"Username found\");\r\n\t\t\t\t\tsetuName(userName);\r\n\t\t\t\t\tif(Main.playerNum == 2)\r\n\t\t\t\t\t\tMain.resultLabel2.setText(userName);\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMain.resultLabel1.setText(userName);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tsetNameSame(check, userName, playerType) ;\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tString m1=\"\";\r\n\t\tint pos=1;\r\n\t\tint neg=0;\r\n\r\n\tfor(int i=0;i<=4;i++)\r\n\t{\t\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\t//System.out.println(\"please enter name\");\r\n\t\tString s=sc.nextLine();\r\n\r\n\t\tif(s!=null && s!=\"\")\r\n\t\t{\r\n\t\t\t//m1=m1.concat(s+\" \");\r\n\t\t\tm1=s+\" \"+m1;\r\n\t\t//\tSystem.out.println(m1+\" after concating the string\");\r\n\t\t\tString[] m10=m1.split(\" \");\r\n\t\t\tint len=m10.length;\r\n\t\t\t//System.out.println(m10[len-2]);\r\n\t\tif(m10[0].equals(m10[len-2]))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"they are both same families \"+m1);\r\n\t\t\tpos=pos+1;\r\n\t\t\tSystem.out.println(\"in family 1 member \"+i+\" \"+s);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"both are different family names\");\r\n\t\t\tneg=neg-1;\r\n\t\t\tSystem.out.println(\"in family 2 member \"+i+\" \"+s);\r\n\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//throw an exception if name is empty\r\n\t\t}\r\n\t\r\n\t} \r\n\tSystem.out.println(pos+\" \"+neg);\r\n\tint count=pos+neg;\r\n\tSystem.out.println(\"total number families are \"+count);\r\n\t}", "public void setNameofRenter(String usrName) throws Exception{\n\n\t\t/*\n\t\t * Input is invalid if an empty String is passed in.\n\t\t */\n\t\tif(usrName.length() == 0){\n\t\t\tthrow new Exception();\n\t\t}\n\t\tnameofRenter = usrName;\n\t}", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "private void generarNombre() {\r\n\t\tthis.nombre = NOMBRES[(int) (Math.random() * NOMBRES.length)];\r\n\t}", "private static Registrant makeNewRegistrantFromUserInput() {\n\t\tString input_name = getResponseTo(\"Enter registant's first and Last name: \");\r\n\t\tRegistrant new_Registrant = new Registrant(input_name);\r\n\t\treturn new_Registrant;\r\n\t}", "@Given(\"With a valid user with user name {string}\")\n\tpublic void we_have_a_valid_user_with_user_name(String userName) {\n\t\tthis.storeUserName = userName;\n\t}", "@When(\"^user should enter the valid username in the loginpage$\")\n\tpublic void user_should_enter_the_valid_username_in_the_loginpage() throws Throwable {\n\t inputValuestoElement(pa.getAp().getUsernamedisplay(), \"Srini1010\");\n\t}", "public static void main(String[] args) {\n Scanner myOdj = new Scanner(System.in );\n System .out.println(\" Enter your name\");\n\n String userName = myOdj.nextLine();\n System.out.println (\" hi \" + userName);\n\n \n }" ]
[ "0.73062795", "0.72010267", "0.7194189", "0.67247105", "0.66462874", "0.66101557", "0.66025066", "0.6588563", "0.6566017", "0.64423674", "0.64384234", "0.6380018", "0.6340342", "0.62377673", "0.6227234", "0.6219644", "0.62101597", "0.6199687", "0.618638", "0.6182067", "0.61741114", "0.6167875", "0.61503065", "0.61389214", "0.6132461", "0.6114362", "0.60769415", "0.60703474", "0.6050728", "0.60419154", "0.6033214", "0.6031927", "0.60187507", "0.60136807", "0.6009167", "0.60082877", "0.60043716", "0.6001648", "0.600077", "0.599398", "0.5990707", "0.59901947", "0.59745455", "0.59678304", "0.5965125", "0.5955614", "0.595526", "0.5939429", "0.5930511", "0.592801", "0.5918427", "0.5912521", "0.59023863", "0.5892387", "0.5880856", "0.5859839", "0.5846492", "0.5839602", "0.5834369", "0.5820496", "0.58152056", "0.5812228", "0.5786486", "0.5784003", "0.57804585", "0.57673055", "0.57584465", "0.574088", "0.5725041", "0.57178813", "0.57107294", "0.5705638", "0.56918114", "0.56915253", "0.5688032", "0.566735", "0.56535035", "0.56511885", "0.5648895", "0.56344074", "0.5626523", "0.5625681", "0.5618807", "0.5615414", "0.5611688", "0.5605059", "0.5593551", "0.55901664", "0.5585269", "0.558516", "0.55848336", "0.55848294", "0.5579526", "0.5579092", "0.557529", "0.55694103", "0.556835", "0.5565218", "0.5558773", "0.5555853" ]
0.64546293
9
sets the fill and state of the unit
public Burnt(Unit u) { super(u); setFill(COLOR); state = BURNT_STATE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFill(boolean fill);", "public void setFillArea(boolean b)\r\n/* 34: */ {\r\n/* 35: 26 */ this.fillArea = b;repaint();\r\n/* 36: */ }", "@Override\n public void toggleFill() {\n // empty bc mock\n }", "public void setFill(RMFill aFill)\n{\n if(RMUtils.equals(getFill(), aFill)) return; // If value already set, just return\n repaint(); // Register repaint\n if(_fill!=null) _fill.removePropertyChangeListener(this);\n firePropertyChange(\"Fill\", _fill, _fill = aFill, -1); // Set value and fire PropertyChange\n if(_fill!=null) _fill.addPropertyChangeListener(this);\n}", "public void setFill(boolean b){\n\t\tthis.fill = b;\n\t}", "public abstract void setFilled(boolean filled);", "public void setFill(boolean fill) {\n isFilled = fill;\n }", "@Override\n public void fill() {\n graphicsEnvironmentImpl.fill(canvas);\n }", "public void setFill(boolean fill) {\n\t\t_fill = fill;\n\t\tnotifyObs(this);\n\t}", "public void setFilled(boolean filled) {\r\n this.filled = filled;\r\n }", "public void setFilled(boolean filled) \n\t{\n\t\tthis.filled = filled;\n\t}", "public void setFilled(boolean filled) {\n this.filled = filled;\n }", "public abstract void drawFill();", "public void setFilled ( boolean flag ) {\r\n\t\tfill_flag = flag;\r\n\t}", "public void setUnit(Unit u)\r\n {\r\n display.setUnit(u);\r\n selectedIndex = -1;\r\n }", "private void fillAll() {\n this.fill_M0();\n this.fill_W();\n this.fill_C();\n }", "public void setUnit () {\n\t\tdouble f = factor;\n\t\t/* Transform the value as a part of Unit */\n\t\tif (Double.isNaN(value)) return;\n\t\tif ((mksa&_log) != 0) {\n\t\t\tif ((mksa&_mag) != 0) value *= -2.5;\n\t\t\tfactor *= AstroMath.dexp(value);\n\t\t\tvalue = 0;\n\t\t}\n\t\telse {\n\t\t\tfactor *= value;\n\t\t\tvalue = 1.;\n\t\t}\n\t\t// Transform also the symbol\n\t\tif (f != factor) {\n\t\t\tif (symbol == null) symbol = edf(factor);\n\t\t\telse symbol = edf(factor) + toExpr(symbol);\n\t\t}\n\t}", "@Override\n public void fillRectangle(int x, int y, int width, int height) {\n Rectangle2D rect = new Rectangle2D.Float(x + transX, y + transY, width - 1, height - 1);\n\n checkState();\n getGraphics2D().setPaint(getColor(getSWTGraphics().getBackgroundColor()));\n getGraphics2D().fill(rect);\n }", "@Override\n public void reset() {\n this.posx = 0;\n this.posy = 0;\n this.rad = 0;\n this.property = new Property();\n this.property.setColor(new Color(Color.BLUE));\n }", "private void resetUnitSprite() {\r\n\t\tswitch (GameManager.getInstance().getSelectedUnit()) {\r\n\t\tcase 0:\r\n\t\t\tGameManager.getInstance().setSelectedUnit(3);\r\n\t\t\tbreak;\r\n\r\n\t\tcase 1:\r\n\t\t\tUnit1SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 2:\r\n\t\t\tUnit2SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(2);\r\n\t\tcase 3:\r\n\t\t\tUnit3SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(3);\r\n\t\tcase 4:\r\n\t\t\tUnit4SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 5:\r\n\t\t\tUnit5SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\tcase 6:\r\n\t\t\tUnit6SelectionSprite.setCurrentTileIndex(1);\r\n\t\t\t// GameManager.getInstance().setSelectedUnit(1);\r\n\t\t}\r\n\t}", "public Fill() { }", "public void setFill(boolean fill) {\r\n if (fill) {\r\n \tmPaint.setStyle(Paint.Style.FILL);\r\n }else{\r\n \tmPaint.setStyle(Paint.Style.STROKE);\r\n }\r\n }", "public void setUnit(Unit unit) {\r\n\t\tthis.unit = unit;\r\n\t}", "@Override\n public void fill(GL2 gl) {\n super.draw(gl);\n }", "@Override\n public void fill(GL2 gl) {\n draw(gl);\n }", "public void setFillStyle(STYLE style);", "public RMFill getFill() { return _fill; }", "public void setFillLevel(final double fill) {\n\t\t_fillGrade = fill;\n\t}", "public FlexyDemoSettlingTank(String name, int fillLowPerc, int fillHighPerc, int fillIdealPerc) {\n super(name, fillLowPerc, fillHighPerc, fillIdealPerc);\n }", "private void resetFill(Graphics2D graphic) {\n if (LOGGER.isLoggable(Level.FINER)) {\n LOGGER.finer(\"reseting the graphics\");\n }\n \n graphic.setComposite(DEFAULT_COMPOSITE);\n }", "public void fillShape(Shape shape);", "public void setUnit(Unit newUnit){\r\n tacUnit = newUnit;\r\n }", "public void setAreaColor(Color c)\r\n/* 53: */ {\r\n/* 54: 37 */ this.areaColor = c;repaint();\r\n/* 55: */ }", "private void drawFill(Graphics2D g2, boolean pressed, int x, int y, int w, int h)\r\n/* 114: */ {\r\n/* 115: */ Color lowerRight;\r\n/* 116: */ Color upperLeft;\r\n/* 117: */ Color lowerRight;\r\n/* 118:158 */ if (pressed)\r\n/* 119: */ {\r\n/* 120:159 */ Color upperLeft = MetalLookAndFeel.getControlShadow();\r\n/* 121:160 */ lowerRight = PlasticLookAndFeel.getControlHighlight();\r\n/* 122: */ }\r\n/* 123: */ else\r\n/* 124: */ {\r\n/* 125:162 */ upperLeft = PlasticLookAndFeel.getControl();\r\n/* 126:163 */ lowerRight = PlasticLookAndFeel.getControlHighlight().brighter();\r\n/* 127: */ }\r\n/* 128:165 */ g2.setPaint(new GradientPaint(x, y, upperLeft, x + w, y + h, lowerRight));\r\n/* 129:166 */ g2.fillRect(x, y, w, h);\r\n/* 130: */ }", "@Override\n public void draw(GL2 gl) {\n super.fill(gl);\n }", "@Override\n public void draw(GL2 gl) {\n super.fill(gl);\n }", "public void setFillEnabled(boolean fillEnabled){\n this.fillEnabled = fillEnabled;\n refreshTheView();\n }", "void setBlue(int x, int y, int value);", "private void drawFill(Graphics2D g2, boolean pressed, int x, int y, int w, int h)\r\n/* 218: */ {\r\n/* 219: */ Color lowerRight;\r\n/* 220: */ Color upperLeft;\r\n/* 221: */ Color lowerRight;\r\n/* 222:250 */ if (pressed)\r\n/* 223: */ {\r\n/* 224:251 */ Color upperLeft = MetalLookAndFeel.getControlShadow();\r\n/* 225:252 */ lowerRight = PlasticLookAndFeel.getControlHighlight();\r\n/* 226: */ }\r\n/* 227: */ else\r\n/* 228: */ {\r\n/* 229:254 */ upperLeft = PlasticLookAndFeel.getControl();\r\n/* 230:255 */ lowerRight = PlasticLookAndFeel.getControlHighlight().brighter();\r\n/* 231: */ }\r\n/* 232:257 */ g2.setPaint(new GradientPaint(x, y, upperLeft, x + w, y + h, lowerRight));\r\n/* 233:258 */ g2.fillOval(x, y, w, h);\r\n/* 234: */ }", "public void setShape(ChamberShape theShape) {\n mySize = theShape;\n setExits();\n }", "public boolean getFill(){\n\t\treturn this.fill;\n\t}", "void setEmpty() {\n this.lo = 1;\n this.hi = 0;\n }", "public void setUnit(Length units) {\n unit = units;\n }", "public void setColor(RMColor aColor)\n{\n // Set color\n if(aColor==null) setFill(null);\n else if(getFill()==null) setFill(new RMFill(aColor));\n else getFill().setColor(aColor);\n}", "public void setFillArea(boolean fillArea) {\n\t\tthis.fillArea = fillArea;\n\t}", "boolean getFill();", "private void setGridBagConstraints(int row, int col, int fill\n\t\t\t, double weightx, double weighty, int width, int height) {\n\t\tc.weightx = weightx;\n\t\tc.weighty = weighty;\n\t\tc.fill = fill;\n\t\tc.gridx = col;\n\t\tc.gridy = row;\n\t\tc.gridwidth = width;\n\t\tc.gridheight = height;\n\t\t// Reset the insets each time, we use it a few times so this\n\t\t// will undo any times we do it.\n\t\tc.insets = new Insets(0, 0, 0, 0);\n\t}", "public void reset() {\n\t\txD = x;\n\t\tyD = y;\n\t\taction = 0;\n\t\tdir2 = dir;\n\t\tvisibleToEnemy = false;\n\t\tselected = false;\n\t\t\n\t\tif (UNIT_R == true) {\n\t\t\t// dir = 0;\n\t\t} else if (UNIT_G == true) {\n\t\t\t// dir = 180 / 2 / 3.14;\n\t\t}\n\t}", "void updateDrawing() {\n filling = modelRoot.getCDraw().getFilling(this);\n dirtyBufF = true;\n tooltip = modelRoot.getCDraw().getTooltip(this);\n dirtyBufT = true;\n title = modelRoot.getCDraw().getTitle(this);\n dirtyBufTitle = true;\n colorTitle = modelRoot.getCDraw().getTitleColor(this);\n dirtyBufCT = true;\n }", "public void setVariablesFromValue() {\n\t\tif (this.value < .05) {\n\t\t\tthis.diameter = 10;\n\t\t\t// White\n\t\t\tthis.r = 255;\n\t\t\tthis.g= 255;\n\t\t\tthis.b = 255;\n\t\t} else if (this.value < .2) {\n\t\t\tthis.diameter = 20;\n\t\t\t// Gold\n\t\t\tthis.r = 245;\n\t\t\tthis.g = 171;\n\t\t\tthis.b = 53;\n\t\t} else if (this.value < 1) {\n\t\t\tthis.diameter = 40;\n\t\t\t// Turquoise\n\t\t\tthis.r = 3;\n\t\t\tthis.g= 201;\n\t\t\tthis.b = 169;\n\t\t} else if (this.value < 2) {\n\t\t\tthis.diameter = 80;\n\t\t\t// Burgundy\n\t\t\tthis.r = 192;\n\t\t\tthis.g= 57;\n\t\t\tthis.b = 43;\n\t\t}else if (this.value < 5) {\n\t\t\tthis.diameter = 100;\n\t\t\t// Purple\n\t\t\tthis.r = 155;\n\t\t\tthis.g= 89;\n\t\t\tthis.b = 182;\n\t\t}else if (this.value < 20) {\n\t\t\tthis.diameter = 150;\n\t\t\t// Steel Blue\n\t\t\tthis.r = 75;\n\t\t\tthis.g= 119;\n\t\t\tthis.b = 190;\n\t\t}else {\n\t\t\tthis.diameter = 200;\n\t\t\t// Pink\n\t\t\tthis.r = 210;\n\t\t\tthis.g= 82;\n\t\t\tthis.b = 127;\n\t\t}\n\t}", "public void fillRectangle(RectangleShape rectangle);", "public Unit() {\n\t\tthis.set();\n\t}", "public void setToOriginals(){\n\t\t//set all occupied nodes as empty\n\t\tif(nodeStatus == Status.occupied){\n\t\t\tsetAsEmpty();\n\t\t}\n\t\t//if the node had a unit end on it, reset that value\n\t\tif(ended == true){\n\t\t\tended=false;\n\t\t}\n\t\tf=0;\n\t\tg=0;\n\t\th=0;\n\t}", "private void setFillIndex() {\n\t\tint t = this.fillgingIndex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tthis.fillgingIndex = 0;\n\t\t\tsetComponentsOfIndex();\n\t\t} else {\n\t\t\tthis.fillgingIndex = t;\n\t\t}\n\n\t}", "public void fill(Shape s)\r\n\t{\r\n\t\t// draw a rectangle with these proportions\r\n\t\tif (s instanceof RectangularShape)\r\n\t\t{\r\n\t\t\tRectangularShape rect = (RectangularShape) s;\r\n\t\t\tg.fillRect((int) rect.getX(), (int) rect.getY(), (int) rect.getWidth(),\r\n\t\t\t\t\t(int) rect.getHeight());\r\n\t\t}\r\n\t\t// else\r\n\t\t// System.out.println(\"fill for this shape not supported\");\r\n\t}", "public void fill(Element el)\n {\n fill(el.getColor());\n }", "public void fill(Color color)\n {\n Graphics2D g = (Graphics2D)getGraphics();\n g.setColor(color);\n g.fillRect(0, 0, width, height);\n }", "public void setFillGradient(Gradient gradient);", "public void setUnit(String unit);", "private void setShape(ChamberShape theShape) {\n mySize = theShape;\n createDoorsFromExits();\n }", "public final native void setFill(Colour colour) /*-{\n\t\tthis.setFill([email protected]::toString()());\n\t}-*/;", "void setStone(int x, int y, int color);", "@Override\n public void fillRect(double x, double y, double width, double height) {\n graphicsEnvironmentImpl.fillRect(canvas, x, y, width, height);\n }", "public final void set (Unit u) {\t\t// Just copy the instance\n\t\tmksa = u.mksa ;\n\t\tsymbol = u.symbol ;\n\t\tvalue = u.value ;\n\t\tfactor = u.factor ;\n\t\toffset = u.offset ;\n\t}", "public void setUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType.Enum unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIT$6);\n }\n target.setEnumValue(unit);\n }\n }", "public void setHorizontalFill(boolean hfill) {\n this.hfill = hfill;\n }", "public void setAsEmpty(){\n\t\tnodeStatus = Status.empty;\n\t\tunitNum=-1;\n\t}", "public void setActiveUnit( int index )\n {\n setGeometry( geometries.get( index ) );\n \n setAppearance( appearances.get( index ) );\n \n activeUnit = index;\n }", "public void assignShape() {\n\t\t\n\t}", "@Override\n public void init() {\n head.setFill(getColor());\n body.setFill(getColor());\n update();\n }", "public void fillColor() {\n\t\tSystem.out.println(\"Blue color\");\n\t}", "@Override\n public void setTestUnit() {\n sorcererAnima = new Sorcerer(50, 2, field.getCell(0, 0));\n }", "public abstract void setEmpty(AwtCell empty);", "public Builder setUnit(final Unit value) {\n _unit = value;\n return this;\n }", "private void setUp()\n {\n path = new Path();\n drawPaint = new Paint();\n brushSize = getResources().getInteger(R.integer.medium_size);\n lastBrushSize = brushSize;\n //initialize paint color\n drawPaint.setColor(paintColor);\n drawPaint.setAntiAlias(true);\n drawPaint.setStrokeWidth(brushSize);\n drawPaint.setStyle(Paint.Style.STROKE);\n drawPaint.setStrokeJoin(Paint.Join.ROUND);\n drawPaint.setStrokeCap(Paint.Cap.ROUND);\n //initialize canvas background\n canvasPaint = new Paint(Paint.DITHER_FLAG);\n }", "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "private void set(){\n resetBuffer();\n }", "@Override\n public void setRectangle() {\n switch (direction){\n case 0:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 2:\n rectangle.setLocation((int)x+5,(int)y+8);\n break;\n case 1:\n rectangle.setLocation((int)x+13,(int)y+8);\n break;\n case 3:\n rectangle.setLocation((int)x+2,(int)y+8);\n break;\n }\n\n }", "void setGreen(int x, int y, int value);", "@Override\n\tpublic void setPersonal_4_HalfGaugeMeter() \n\t{\n\t\tbgColor = METER_SCALE_COLOR;\n\t}", "void setCurrentFillColour(Color colour) {\n int colourIndex = shapes.size();\n fillColours.set(colourIndex, colour);\n currentFillColour = colour;\n writeFile.writeFill(colour);\n }", "public void reset() {\r\n this.x = resetX;\r\n this.y = resetY;\r\n state = 0;\r\n }", "public void fillMode1Rect(int x0, int y0, int width, int height, int color) {\n assert ((x0 >= 0) && (x0 < 320)) && ((y0 >= 0) && (y0 < 200)) && ((color >= 0) && (color < 4));\n assert (((x0 + width) <= 320) && ((y0 + height) <= 200));\n\n int x1 = x0 + width;\n int y1 = y0 + height;\n for (int y = y0; y < y1; y++) {\n for (int x = x0; x < x1; x++) {\n int pos = y * 80 + (x >>> 2);\n screenBuffer[pos] = (byte) packPixelMode1(screenBuffer[pos], x & 0x03, color);\n }\n }\n }", "@Focus\n\tpublic void setFocus() \n\t{\n\t\t\tfor(int r = Board.LENGTH - 1; r >= 0; r--)\n\t\t\t{\t\n\t\t\t\t\tfor(int c=0;c<Board.LENGTH;c++)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tsquares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(((Square) squares[r][c+1].getData()).isLegal())//It returns the legal attribute wrong\n\t\t\t\t\t\t{squares[r][c+1].setBackground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));}\n\t\t\t\t\t\t\n\t\t\t\t\t\tPiece piece = ((Square) squares[r][c+1].getData()).getPiece();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(piece == null)\t\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(IconHandler.getBlankIcon());\t\t\t\t\t\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tsquares[r][c+1].setImage(piece.getIcon());\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t}\t\t\n\t}", "protected abstract void setCell(int x, int y, boolean state);", "public void setColor(int color) {\n/* 77 */ this.color = color;\n/* 78 */ this.paint.setColor(this.color);\n/* */ }", "public void setDef(float def);", "public void begin() {\n\t\tg.setColor(bgColor);\n\t\tg.fillRect(0, 0, width, height);\n\t\tg.setColor(Color.black);\n\t}", "protected abstract void fillRect(final float x, final float y,\n final float width, final float height);", "private native void setflat(float flat, int i_hdl);", "public void resetColor(){\n myRectangle.setFill(PADDLE_COLOR);\n }", "public void xsetUnit(gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType unit)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType target = null;\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().find_element_user(UNIT$6, 0);\n if (target == null)\n {\n target = (gov.weather.graphical.xml.dwmlgen.schema.dwml_xsd.UnitType)get_store().add_element_user(UNIT$6);\n }\n target.set(unit);\n }\n }", "public void fill(Color color){\n fill(color.rgba());\n }", "public void fillRect(int x, int y, int width, int height);", "public ResetAction() {\n width = height = mines = 0;\n }", "public void setBlockColor(Color color) {\n rectangle.setFill(color);\n int a = 0;\n }", "public void setUnitOnBoard(Unit unit, int x, int y) {\n\t\tPosition pos = new Position(x, y);\n\t\tunitsOnBoard.put(pos, unit);\n\t\tunitPossitions.put(unit.getId(), pos);\n\t}", "public void setSelectedUnit(Unit unit) {\r\n\t\tmapPanel.setSelectedUnit(unit);\r\n\t\tmapPanel.repaint();\r\n\t}", "@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }", "public void fillBlock(TYPE typeOfBlock){\n isFull=true;\n type=typeOfBlock;\n return;\n }" ]
[ "0.69530964", "0.6848056", "0.6765736", "0.6657122", "0.66411346", "0.6625414", "0.6530441", "0.6418008", "0.6284109", "0.6262226", "0.6197001", "0.61736906", "0.6102765", "0.60717875", "0.6012154", "0.59263855", "0.59223163", "0.59010136", "0.5872638", "0.5850993", "0.5847041", "0.5807842", "0.57869595", "0.5786586", "0.5776724", "0.5767452", "0.57535964", "0.57278687", "0.5710291", "0.5697905", "0.5696335", "0.56943864", "0.5692848", "0.5689257", "0.5674651", "0.5674651", "0.56498164", "0.56280637", "0.5622209", "0.56167406", "0.5586145", "0.5583154", "0.5576574", "0.5571526", "0.5570614", "0.55631524", "0.55464923", "0.55317086", "0.5518658", "0.5515669", "0.55109686", "0.55051345", "0.54947776", "0.5492973", "0.5491355", "0.5486095", "0.54856294", "0.548358", "0.5483005", "0.54826266", "0.54771286", "0.5451519", "0.5449227", "0.54392797", "0.54390794", "0.54312193", "0.5426709", "0.5417804", "0.5414556", "0.54143", "0.5390998", "0.5390256", "0.53861165", "0.5384874", "0.53721666", "0.5369946", "0.53643185", "0.5352935", "0.5346505", "0.53411776", "0.53356296", "0.53260374", "0.5325097", "0.53110534", "0.5311028", "0.53016615", "0.52972144", "0.52949226", "0.5281886", "0.5275482", "0.52749914", "0.5274115", "0.5264988", "0.52617526", "0.5257225", "0.5256335", "0.5252635", "0.5250953", "0.52425796", "0.5241312" ]
0.5486712
55
Does the actual sending of the message.
private void doSend(Message message, boolean toAdmin) throws IllegalArgumentException, IOException { // Could perform basic checks to save on RPCs in case of missing args etc. // I'm not doing this on purpose, to make sure the semantics of the two // implementations stay the same. // The benefit of not doing basic checks here is that we will pick up // changes in semantics (ie from address can now also be the logged-in user) // for free. MailMessage.Builder msgProto = MailMessage.newBuilder(); if (message.getSender() != null) { msgProto.setSender(message.getSender()); } if (message.getTo() != null) { msgProto.addAllTo(message.getTo()); } if (message.getCc() != null) { msgProto.addAllCc(message.getCc()); } if (message.getBcc() != null) { msgProto.addAllBcc(message.getBcc()); } if (message.getReplyTo() != null) { msgProto.setReplyTo(message.getReplyTo()); } if (message.getSubject() != null) { msgProto.setSubject(message.getSubject()); } if (message.getTextBody() != null) { msgProto.setTextBody(message.getTextBody()); } if (message.getHtmlBody() != null) { msgProto.setHtmlBody(message.getHtmlBody()); } if (message.getAmpHtmlBody() != null) { msgProto.setAmpHtmlBody(message.getAmpHtmlBody()); } if (message.getAttachments() != null) { for (Attachment attach : message.getAttachments()) { MailAttachment.Builder attachProto = MailAttachment.newBuilder(); attachProto.setFileName(attach.getFileName()); attachProto.setData(ByteString.copyFrom(attach.getData())); String contentId = attach.getContentID(); if (contentId != null) { attachProto.setContentID(contentId); } msgProto.addAttachment(attachProto); } } if (message.getHeaders() != null) { for (Header header : message.getHeaders()) { msgProto.addHeader( MailHeader.newBuilder().setName(header.getName()).setValue(header.getValue())); } } byte[] msgBytes = msgProto.buildPartial().toByteArray(); try { // Returns VoidProto -- just ignore the return value. if (toAdmin) { ApiProxy.makeSyncCall(PACKAGE, "SendToAdmins", msgBytes); } else { ApiProxy.makeSyncCall(PACKAGE, "Send", msgBytes); } } catch (ApiProxy.ApplicationException ex) { // Pass all the error details straight through (same as python). switch (ErrorCode.forNumber(ex.getApplicationError())) { case BAD_REQUEST: throw new IllegalArgumentException("Bad Request: " + ex.getErrorDetail()); case UNAUTHORIZED_SENDER: throw new IllegalArgumentException("Unauthorized Sender: " + ex.getErrorDetail()); case INVALID_ATTACHMENT_TYPE: throw new IllegalArgumentException("Invalid Attachment Type: " + ex.getErrorDetail()); case INVALID_HEADER_NAME: throw new IllegalArgumentException("Invalid Header Name: " + ex.getErrorDetail()); case INTERNAL_ERROR: default: throw new IOException(ex.getErrorDetail()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void send() {\n\t}", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "@Override\n\tpublic void send() {\n\t\tSystem.out.println(\"this is send\");\n\t}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void send(Message msg);", "@Override\n\tpublic void send(String msg) {\n\t}", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "@Override\r\n\tpublic boolean send(String msg) {\n \ttry {\r\n \t\tsendMessage(msg);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "void messageSent();", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "void send();", "void sendMessage() {\n\n\t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "private void sendMsg()\n {\n try {\n spauldingApp.println(\"AckRequest.sendMsg() - sending request to nodeID= \" + node.getNodeID() + \" ...\");\n this.nbrTransmits++;\n //spauldingApp.eventLogger.writeMsgSentPing(fetchReqMsg);\n spauldingApp.getMoteIF().send(node.getNodeID(), requestMsg);\n } catch (Exception e) {\n spauldingApp.println(\"ERROR: Can't send message: \" + e);\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void send() throws Exception {\n\t\t\r\n\t}", "public void messageSent(Message m) {\n\t\t\r\n\t}", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "protected abstract void send(final IMessageWrapper message, final ISender sender);", "void send(String message);", "@Override\n\tpublic void sendMsg(String msg) {\n\n\t}", "void send() throws ImsException;", "@Override\n\tpublic void send(IMessage sending) throws RPCException {\n\t\t\n\t}", "@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}", "@Override\n\tpublic void messageSent(IoSession arg0, Object arg1) throws Exception {\n\n\t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}", "@Override\n public void run() {\n send();\n }", "public abstract void send(String message) throws IOException;", "public boolean SendingMessage() {\n \t\t\treturn false;\n \t\t}", "public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }", "@Override\n\tpublic String execute() throws Exception {\n\t\treturn \"send\";\n\t}", "@Override\n public void run() {\n if (this.clientInterfaceTCP.getConnected())\n this.clientInterfaceTCP.sendString(this.messageToSend);\n }", "protected void sendMessage() throws IOException {\r\n\t\tif (smscListener != null) {\r\n\t\t\tint procCount = processors.count();\r\n\t\t\tif (procCount > 0) {\r\n\t\t\t\tString client;\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tlistClients();\r\n\t\t\t\tif (procCount > 1) {\r\n\t\t\t\t\tSystem.out.print(\"Type name of the destination> \");\r\n\t\t\t\t\tclient = keyboard.readLine();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(0);\r\n\t\t\t\t\tclient = proc.getSystemId();\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tif (proc.getSystemId().equals(client)) {\r\n\t\t\t\t\t\tif (proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Type the message> \");\r\n\t\t\t\t\t\t\tString message = keyboard.readLine();\r\n\t\t\t\t\t\t\tDeliverSM request = new DeliverSM();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\trequest.setShortMessage(message);\r\n\t\t\t\t\t\t\t\tproc.serverRequest(request);\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sent.\");\r\n\t\t\t\t\t\t\t} catch (WrongLengthOfStringException e) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Message sending failed\");\r\n\t\t\t\t\t\t\t\tevent.write(e, \"\");\r\n\t\t\t\t\t\t\t} catch (IOException ioe) {\r\n\t\t\t\t\t\t\t} catch (PDUException pe) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println(\"This session is inactive.\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }", "@Override\n\tpublic void sendSMS() {\n\t\tSystem.out.println(\"Logic B\" + \" Send By: \" + getVendorName());\n\t}", "private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }", "public void send_message(){\n logical_clock++;\n System.out.println(\"Send Message Clock:\" +logical_clock);\n encrypt(logical_clock);\n\n }", "public void sendMessage(String message) {}", "Message sendAndWait();", "private void sendMessage() throws Exception {\n\t\tGetTimestamp(\"Sending Message: \");\n\t\tString inputMessage;\n\t\tinputMessage = input.nextLine();\n\t\tString tosend = encrypt(clientkey, inputMessage);\n\t\t\n\t\tJSONObject RESPONSE = new JSONObject();\n\t\tRESPONSE.put(\"payload\",tosend);\n\t\tSystem.out.println(RESPONSE);\n\t\t\n\t\tpw.println(tosend);\n\t\tpw.flush();\n\t\tSystem.out.println(\"Message sent to the client : \" + inputMessage);\n\t\tif (inputMessage.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"sending close command\");\n\t\t\tcloseConnection();\n\t\t} else {\n\t\t\tgetMessage();\n\t\t}\n\t}", "public void messageSent() {\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesSent, this.getClass()), this\n\t\t.getMessageType(), 1);\n\tTrackedMessage.accumulateMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.bytesSent, this.getClass()), this\n\t\t.getMessageType(), TrackedMessage.objectSize(this));\n }", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "private void sendMessage() {\n\n // Get the right Prefix\n String prefix = null;\n\n if ( !messageGroup.getPrefix().equalsIgnoreCase(\"\") ) {\n prefix = messageGroup.getPrefix();\n } else {\n prefix = Announcer.getInstance().getConfig().getString(\"Settings.Prefix\");\n }\n\n Announcer.getInstance().getCaller().sendAnnouncment( messageGroup, prefix, counter);\n\n counter();\n\n }", "public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}", "public synchronized void send() throws RemoteException {\n\n if (this.temperatureQueue.isEmpty()) {\n //logger.log(Level.INFO, \"Nothing to send, bailing.\");\n return;\n }\n\n for (TemperatureMessage message : this.temperatureQueue) {\n // TODO\n // lookup the node and deliver the message.\n\n TemperatureNode destinationNode = owner.lookupNode(message.getDestination());\n if (destinationNode == null) {\n // Classic comment; this should never happen.\n System.out.println(\"Refusing to send to null node \" + message.getDestination());\n return;\n }\n destinationNode.sendMeasurement(message);\n this.owner.incrementVectorClock();\n //System.out.println(this.owner.ID() + \"Sent a message to \" + destinationNode.ID());\n\n }\n\n temperatureQueue.clear();\n }", "public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }", "@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Benchmark\n @BenchmarkMode(Mode.Throughput)\n public void send()\n {\n _sender1.send(_account);\n }", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void sendMessage() {\n if (mRecipientAddress == null) {\n if (mDevices.getSelectedItem() == null) {\n mStatusText.append(\"Please select a device to message.\\n\");\n return;\n }\n if (mMessage.getText() == null || mMessage.getText().toString().equals(\"\")) {\n mStatusText.append(\"Please enter a message to send.\\n\");\n return;\n }\n }\n WifiDirectClientAsyncTask t = new WifiDirectClientAsyncTask(this, mMessage.getText().toString());\n if (Build.VERSION.SDK_INT>=Build.VERSION_CODES.HONEYCOMB)\n t.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n else\n t.execute();\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to client => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "@Override\n public void sendMessage(String from, String to, Message message){\n this.sendingPolicy.sendViaPolicy(from, to, message);\n //local persistence\n updateMessage(message);\n }", "@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "public void sendMessage ( String message ) {\n\t\texecute ( handle -> handle.sendMessage ( message ) );\n\t}", "public int sendMsg () {\n\t\tSimpleMessage msg;\n\t\t\n\t\tmsg = router.poll(); // Get message at the head of router\n\t\t\n\t\t//Get sender and receiver to pass it to the transport layer\n\t\tNode sender = msg.sender;\n\t\tNode receiver = msg.receiver;\n\t\t\n\t\t// Send message\t\t\n\t\t((Transport)sender.getProtocol(FastConfig.getTransport(pid))).\n\t\tsend(\n\t\t\tsender,\n\t\t\treceiver,\n\t\t\tmsg,\n\t\t\tpid);\n\t\t\t\t\n\t\treturn msg.size;\n\t}", "@Override\n\tpublic void sendMsg(MsgVO mvo) {\n\t\tsession.insert(namespace + \".sendMsg\", mvo);\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\tsender.send();\n\t\tsender.send(123);\n\t}", "public void send(Object data) {\n\t\t//do nothing - override to do something\n\t}", "public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }", "void sendMessage(String msg);", "private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "synchronized void sendMessage(Message message) throws IOException {\n socketOutput.reset();\n socketOutput.writeObject(message);\n socketOutput.flush();\n }", "@Override\n\tpublic void SendMessage() {\n\t\tSystem.out.println( phoneName+\"'s SendMessage.\" );\n\t}", "private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}", "public void send(Serializable msg) throws IOException;", "public void sendMessage(String message);", "@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}", "@Override\n\tpublic void directSendMessage(TransactionMessage transactionMessage) {\n\t\t\n\t}", "public void send(ECPacket message)\n\t{\n\t\tif (FMLCommonHandler.instance().getEffectiveSide().isClient())\n\t\t{\n\t\t\tthis.sendToServer(message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.sendToAll(message);\n\t\t}\n\t}", "public void send(Message message) {\n\t\tthis.clockSer.addTS(this.localName);\n\t\t((TimeStampedMessage)message).setMsgTS(this.clockSer.getTs().makeCopy());\nSystem.out.println(\"TS add by 1\");\n\n\t\ttry {\n\t\t\tparseConfig();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmessage.set_source(localName);\n\t\tmessage.set_seqNum(currSeqNum++);\n\t\t\t\t\n\t\tRule rule = null;\n\t\tif((rule = matchRule(message, RuleType.SEND)) != null) {\n\t\t\tif(rule.getAction().equals(\"drop\")) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\telse if(rule.getAction().equals(\"duplicate\")) {\n\t\t\t\tMessage dupMsg = message.makeCopy();\n\t\t\t\tdupMsg.set_duplicate(true);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/* Send 'message' and 'dupMsg' */\n\t\t\t\tdoSend(message);\n\t\t\t\t/* update the timestamp */\n\t\t\t\tthis.clockSer.addTS(this.localName);\n\t\t\t\t((TimeStampedMessage)dupMsg).setMsgTS(this.clockSer.getTs().makeCopy());\nSystem.out.println(\"TS add by 1\");\n\t\t\t\tdoSend(dupMsg);\n\t\t\t\t\n\t\t\t\t/* We need to send delayed messages after new message.\n\t\t\t\t * This was clarified in Live session by Professor.\n\t\t\t\t */\n\t\t\t\tfor(Message m : delaySendQueue) {\n\t\t\t\t\tdoSend(m);\n\t\t\t\t}\n\t\t\t\tdelaySendQueue.clear();\n\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(rule.getAction().equals(\"delay\")) {\n\t\t\t\tdelaySendQueue.add(message);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"We get a wierd message here!\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdoSend(message);\n\t\t\t\n\t\t\t/* We need to send delayed messages after new message.\n\t\t\t * This was clarified in Live session by Professor.\n\t\t\t */\n\t\t\tfor(Message m : delaySendQueue) {\n\t\t\t\tdoSend(m);\n\t\t\t}\n\t\t\tdelaySendQueue.clear();\n\t\t}\n\t\t\n\t}", "public void sendRawMessage ( UUID sender , String message ) {\n\t\texecute ( handle -> handle.sendRawMessage ( sender , message ) );\n\t}", "public abstract void sendMessage(String message);", "void process(ToSend m) {\n ByteBuffer requestBuffer = buildMsg(m.state.ordinal(), m.leader, m.zxid, m.electionEpoch, m.peerEpoch, m.configData);\n\n manager.toSend(m.sid, requestBuffer);\n\n }", "private void sendMessage(ChatMessage msg) throws IOException {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n sOutput.close();\n sInput.close();\n e.printStackTrace();\n }\n //sOutput.flush();\n }", "@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}", "private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "public synchronized void sendMessage(CfAction actionToSend){\n\t\t\tcfCommnicationBridge.sendAction(actionToSend);\n\t}", "@Override\n\tpublic void execute() {\n\t\tcmdReceiver.send();\n\t}", "public void send(Object message) {\n try {\n if (message.equals(startTurnMessage)) {\n myTurn = true;\n }\n else if (message.equals(endTurnMessage)) {\n myTurn = false;\n }\n else {\n socketOut.reset();\n socketOut.writeObject(message);\n socketOut.flush();\n }\n } catch (IOException | NullPointerException e) {\n e.printStackTrace();\n }\n }", "private void send(Object o) {\n\t\ttry {\n\t\t\tSystem.out.println(\"02. -> Sending (\" + o +\") to the client.\");\n\t\t\tthis.os.writeObject(o);\n\t\t\tthis.os.flush();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX.\" + e.getStackTrace());\n\t\t}\n\t}", "public void run()\r\n\t\t{\n\t\t\ttheVMKClient.sendMessageToServer(m);\r\n\t\t}", "protected void sendMessage(Message message) {\n\t\tif(mHandler != null) {\n\t\t\tmHandler.sendMessage(message);\n\t\t} else {\n\t\t\thandleMessage(message);\n\t\t}\n\t}", "public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }", "public boolean message( Who sender, Message msg ) throws Exception;", "public abstract void sendToChain(String mesg);", "private void send(Object o) {\r\n try {\r\n System.out.println(\"02. -> Sending (\" + o +\") to the client.\");\r\n this.os.writeObject(o);\r\n this.os.flush();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX.\" + e.getStackTrace());\r\n }\r\n }", "void send(IMessage message, IChannel channel);", "public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }", "@Override\r\n\tpublic void send(JT808ProtocalPack message) throws Exception {\n\r\n\t}", "private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}", "public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void send(DuDuMessage message, Object sessionToken) {\n\t\t\n\t}", "@Override\n public void sendMessage(Message<M> message) {\n long vertexId = message.getReceiver();\n Queue<Message<M>> sendQueue = sendQueues.get(vertexId);\n if (sendQueue == null) {\n sendQueue = new LinkedList<>();\n sendQueues.put(vertexId, sendQueue);\n }\n\n Message<M> initial = sendQueue.peek();\n if (combiner != null && initial != null) {\n initial = sendQueue.poll();\n M value = combiner.combine(initial.getValue(), message.getValue());\n message.setValue(value);\n }\n sendQueue.offer(message);\n\n if (sendQueue.size() > sendThreshold) {\n sendMessages(sendQueue);\n }\n }", "public void process(PlainMessage msg) throws IOException {\n relay(msg);\n }", "public void send(String msg) throws CcException\n {\n commWriter.send(msg);\n }", "void sendMessage(Message m) throws IOException {\n String msg = m.toString();\n\n buffer = msg.getBytes(\"Windows-1256\");\n toServer = new DatagramPacket(buffer, buffer.length,\n InetAddress.getByName(sendGroup), port);\n if (m.getType() == Message.DATA) {\n manager.mManager.addMessage(m);\n }\n\n System.out.println(getName() + \"-->\" + m);\n serverSocket.send(toServer);\n }" ]
[ "0.79142195", "0.7679207", "0.76249784", "0.7539628", "0.7459911", "0.7430748", "0.74270386", "0.72873944", "0.72773296", "0.7267377", "0.7178729", "0.71455944", "0.71442395", "0.7105907", "0.704085", "0.70269537", "0.6992767", "0.6974188", "0.6966563", "0.69509625", "0.6941266", "0.69286174", "0.6908917", "0.6908917", "0.68665254", "0.6829291", "0.6789669", "0.6786581", "0.6776081", "0.6761614", "0.67513186", "0.6746827", "0.67379206", "0.67365545", "0.6736282", "0.6736143", "0.6734913", "0.6731864", "0.67301506", "0.6725403", "0.6721653", "0.67165565", "0.67018646", "0.6696473", "0.6679299", "0.6676435", "0.6671395", "0.66705906", "0.666715", "0.66582155", "0.6627272", "0.66222864", "0.66178876", "0.6616341", "0.65993136", "0.65808547", "0.658075", "0.65741163", "0.6554007", "0.6552673", "0.65440124", "0.6543855", "0.6536237", "0.65278524", "0.65245694", "0.65225023", "0.65161246", "0.65055776", "0.6502844", "0.649881", "0.64785385", "0.6454429", "0.6449786", "0.6441429", "0.64394873", "0.6438552", "0.6437592", "0.6433965", "0.64338374", "0.6425544", "0.6425156", "0.64204127", "0.641693", "0.64165425", "0.64020985", "0.64001524", "0.63999104", "0.6399803", "0.6398656", "0.63984466", "0.6395684", "0.63951397", "0.6394159", "0.63865227", "0.63862944", "0.63849235", "0.6383746", "0.6383472", "0.63834375", "0.63792276", "0.63738614" ]
0.0
-1
Default constructor for objects of the Component Class
public CityscapeComponent(int x) { numOfBuildings = x; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component() {\n }", "defaultConstructor(){}", "void DefaultConstructor(){}", "public ComponentsFactory() {\n\t\tsuper();\n\t}", "public Component() {\n\t\tlocation = new Point(0, 0);\n\t\tsize = new Dimension(100, 80);\n\t\tproperties = new LinkedHashMap<>();\n\t\tsubJobContainer= new LinkedHashMap<>();\n\t\tleftPortCount = 0;\n\t\trightPortCount = 0;\n\t\tbottomPortCount = 0;\n\t\tinputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\n\t\tinputLinks = new ArrayList<Link>();\n\t\toutputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\t\toutputLinks = new ArrayList<Link>();\n\t\tinputportTerminals = new ArrayList<String>();\n\t\toutputPortTerminals = new ArrayList<String>();\n\t\twatcherTerminals = new HashMap();\n\t\tnewInstance = true;\n\t\tvalidityStatus = ValidityStatus.WARN.name();\n\t\tcomponentName = DynamicClassProcessor.INSTANCE.getClazzName(this\n\t\t\t\t.getClass());\n\n\t\tcomponentLabel = new ComponentLabel(componentName);\n\t\tcomponentLabelMargin = 16;\n\n\t\tprefix = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\t\n\t\tdefaultPrefix=XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\tinitPortSettings();\n\t\ttoolTipErrorMessages = new LinkedHashMap<>();\n\t\tstatus = ComponentExecutionStatus.BLANK;\n\t}", "public LifeComponent() {\n // call other constructor with null param\n this(null);\n }", "public ConverterComponent() {\n\t}", "public ComponentMover() {\n\t}", "public DeviceSelectionComponentBase() {\n initComponents();\n }", "public ValidationComponent ()\n\t\t{\n\t\t}", "public DetailComponent() {\n this(\"\", (Component[]) null);\n }", "public ComponentDescriptor() {\r\n\t\t// initialize empty collections\r\n\t\tconstructorParametersTypes = new LinkedList<List<Class<?>>>();\r\n//\t\trequiredProperties = new HashMap<String, MetaProperty>();\r\n//\t\toptionalProperties = new HashMap<String, MetaProperty>();\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "protected XComponent(J component) {\n if (component == null)\n throw new IllegalArgumentException(\"Component to be decorated cannot be null.\");\n this.component = component;\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "Component createComponent();", "Component createComponent();", "public Constructor(){\n\t\t\n\t}", "public PackageComponent() {\r\n this(\"UntitledPackage\");\r\n }", "public Library() {\r\n initComponents();\r\n }", "private Composite() {\n }", "@Override\r\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "@Override\n public void initComponent() {\n }", "public DemoComponentManager() {\n this(PROJECT_ROOT_PATH, DEFAULT_EFFECTS_PATHS, DEFAULT_CALCULATORS_PATHS);\n }", "public ObjectFactory() {\r\n\t}", "public ObjectFactory() {\n\t}", "private Default()\n {}", "public Widget() {\n /*\n * THIS - You can use the \"this\" keyword as a method too, which will call the appropriate\n * constructor. This lets you reuse the initialization code you have written in a different\n * constructor.\n */\n this(\"Widget\");\n }", "private UI()\n {\n this(null, null);\n }", "public Basic() {}", "public VComponente() {\n initComponents();\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public AlgorithmDesign() {\n initComponents();\n }", "public StatusComponent()\n {\n }", "public ExampleComponent(Component parent) {\n super(parent);\n }", "public Curso() {\r\n }", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public xo() {\n initComponents();\n }", "private void initcomponent() {\n\r\n\t}", "protected AbstractAggregateComponent() {\n\t\tsuper();\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "Composite() {\n\n\t}", "@DISPID(-2147417603)\n @PropGet\n com4j.Com4jObject constructor();", "private SingleObject()\r\n {\r\n }", "public Property() {\n this(0, 0, 0, 0);\n }", "public GuiComponent(String componentName) {\n\t\tsuper(componentName);\n\t}", "public CarFuelPanel() {\n this(false, null);\n }", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Mouse() {\n\t\tthis(null);\n\t}", "public Genio() {\n initComponents();\n }", "public Implementor(){}", "protected CayenneWidgetFactory() {\n super();\n }" ]
[ "0.8323128", "0.74630386", "0.73409", "0.7277135", "0.7228105", "0.71976095", "0.7184612", "0.70406204", "0.682758", "0.68124384", "0.6805517", "0.68043864", "0.6774173", "0.67443705", "0.67318714", "0.67290974", "0.67290974", "0.6720151", "0.66934747", "0.66435814", "0.6640381", "0.65734774", "0.6559813", "0.6559813", "0.65279675", "0.6512679", "0.6503565", "0.6492822", "0.6492713", "0.6476002", "0.6403953", "0.6401087", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.6400939", "0.63994384", "0.6396931", "0.6396488", "0.6387873", "0.6387672", "0.6386821", "0.63787323", "0.6373809", "0.6370726", "0.63655466", "0.6361309", "0.6359947", "0.6354454", "0.63519377", "0.6346268", "0.6340516", "0.6330121", "0.6329469", "0.6329112", "0.63282853", "0.6325288" ]
0.0
-1
An observer interface to be implemented by observers who want to be notified when this task completes.
public interface Observer { void logoutSuccessful(Response response); void logoutUnsuccessful(Response response); void handleException(Exception ex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface TaskListener {\n void onFinished(boolean result);\n }", "void onTaskCompleted(TaskResult taskResult);", "public interface TaskCompleted {\n\tvoid onTaskComplete(String response, String type);\n}", "void onTaskComplete(T result);", "public interface OnTaskCompleted {\n void onTaskCompleted();\n}", "@Override\r\n public void tasksFinished()\r\n {\n }", "public void completeTask() {\n completed = true;\n }", "void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }", "@Override\n protected void succeeded() {\n eventService.publish(new TaskEndedEvent(this));\n\n }", "public void notifyAsyncTaskDone();", "public void onCompleted() {\n\t\t\n\t\t }", "@Override\n\t\tpublic void onCompleted() {\n\t\t}", "public interface OnAsyncTaskCompleted {\n /**\n * On task completed.\n *\n * @param o the object will be return by the asynctask\n */\n void onTaskCompleted(Object o);\n}", "@Override\n public void onCompleted() {\n }", "@Override\n public void onCompleted() {\n }", "public void onCompletedImpl() {\n }", "void onTaskFinished(A finishedTask, R result);", "public interface AsyncTaskCompleteListener<T> {\n\n public void onTaskComplete(T result);\n}", "@Override\r\n\t\t\tpublic void onCompleted() {\n\r\n\t\t\t}", "interface AsyncTaskCompleteListener<T> {\n\n /**\n * Invoked when the AsyncTask has completed its execution.\n * @param result The resulting object from the AsyncTask.\n */\n void onTaskComplete(T result);\n}", "public interface AsyncTaskListener {\n\n void finishedTask(String joke, Exception e);\n}", "public interface OnTaskCompleted {\n\n void onTaskCompleted(String s);\n}", "@Override\n public void onTaskComplete(String result) {\n\n //TODO\n\n }", "@Override\n public void onTaskDone(Object... values) {\n }", "public void updateTask() {}", "public interface AsyncTaskListener {\n\n public void onTaskComplete(String result);\n\n}", "public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}", "void onTaskCompleted(T t, boolean succeed) {\n metrics.markCompletion(t, succeed);\n for (CompletableTask.Listener<T> listener : listeners) {\n listener.onComplete(t, succeed);\n }\n }", "public interface TaskCallback\n{\n void done();\n}", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n }", "public interface TaskDelegate {\n /*\n Notifies an activity of an async method's completion\n */\n public void taskCompletionResult(ArrayList<String> result);\n}", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "@Override\n\tpublic void onTaskDone(String result) {\n\t\t\n\t}", "public interface ASyncTaskListener {\n public void onThreadFinished(Object result);\n}", "public interface TaskDelegate {\n public void taskComplete(Object object);\n}", "public interface AsyncTaskListener<A extends AsyncTask, R> {\n /**\n * Method called when an AsyncTask reaches completion\n *\n * @param finishedTask The task that reached completion.\n * @param result The result for the task.\n */\n void onTaskFinished(A finishedTask, R result);\n}", "public void finishTask() {\n\t\t\n\t}", "public interface OnAsyncTaskCompleted {\n void onTaskCompleted(boolean status);\n}", "public interface TaskCallback {\n\n void onStart();\n\n void onComplete();\n\n void onSuccess();\n\n void onFailure(Exception e);\n }", "public interface TaskCallback<T> {\n void onFinish(T result);\n}", "void Finished(Task task, Action<TResult> lastFinishedAction);", "@Override\r\n\tvoid execute(Runnable task);", "@Override\n\tpublic void onFinal(Task task) {\n\n\t}", "public abstract Task markAsDone();", "void finish(Task task);", "public void taskFinished(BuildEvent event) {\n }", "void onTaskResult(TaskInfo mTaskInfo);", "public interface OnResponseTaskCompleted {\n /**\n * Called when the task completes with or without error.\n *\n * @param request Original sent request.\n * @param response Response to the request. Can be null.\n * @param ohex OHException thrown on server, null otherwise.\n * @param data Data registered to the task on which this method calls back.\n */\n void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data);\n }", "@Override\n public void completeTask(@NonNull String taskId) {\n }", "public void onTaskCompletion(Task<?> task)\n {\n m_RunningTasks.remove(task);\n }", "@Override\n\tpublic void onEvent() {\n\t\tSystem.out.println(\"Performing callback after synchronous task!\");\n\t}", "@Override\n public void execute(final Task<T> task) {\n }", "interface OnTaskCompleted {\n void onFetchMoviesCompleted(Movie[] movies);\n}", "public interface OnFinishedListener<T> {\n\n void onFinished(T result);\n}", "public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}", "public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}", "public interface TaskLoadedCallback {\n void onTaskDone(Object... values);\n}", "@Override\n public void onCompleted() {\n responseObserver.onCompleted();\n }", "@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}", "@Override\n public void run() {\n task.run();\n }", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "void addDoneTask(Task task);", "public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}", "@Override\n\t\tpublic void onTaskComplete(Vehicle vh) {\n\t\t\tVehicleActivity.this.onTaskCompleteCreateOrUpdate(vh);\n\t\t}", "@Override\n protected void onPostExecute(String result) {\n mListener.onTaskCompleted(result);\n }", "public void notifyObservers() {\n\t\tfor(ElevatorObserver obs: observers) {\n\t\t\tobs.elevatorDidFinishTask(this);\n\t\t}\n\t}", "void onCompleted(T response);", "public interface OnDownloadAsyncTask {\n void onComplete(Book book);\n }", "@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }", "public interface OnStudentsListTaskCompleted {\n void onTaskCompleted(ArrayList<Student> strings);\n}", "public interface Task<T> extends Callable<T> {\n\n String getTaskName();\n void onComplete(T result);\n\n}", "void onTaskComplete(MediaDownloadTask mediaDownloadTask);", "public interface OnActionFinishedListener<TResult> {\n /* will be called for each Action (which in a Task action chain by continuation) finished its execution\n */\n void Finished(Task task, Action<TResult> lastFinishedAction);\n}", "public interface TaskProgressListener<P> {\n\n void onProgressUpdate(P progress);\n}", "@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}", "public interface MovieListener<T> {\n public void onTaskComplete(T result);\n}", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);//Run the generic code that should be ran when the task is complete\n onCompleteListener.onAsyncTaskComplete(result);//Run the code that should occur when the task is complete\n }", "protected void handleCompletedTask(Future<Task> task)\n {\n m_RunningTasks.remove(task);\n\n }", "void onTaskProgress(ProgressInfo progressInfo);", "public interface AsyncResponce {\n\n /// Cette classe permet de realiser une callback dans une Async Task en overidant cette classe\n void ComputeResult(Object result);\n}", "@Override\r\n\tpublic void doTask() {\n\t}", "void onNewTaskComplete(String name, String notes, int position);", "public interface DownloadTaskListener {\n\n void onStart(String taskId, long completeBytes, long totalBytes);\n\n\n void onProgress(String taskId, long currentBytes, long totalBytes);\n\n\n void onPause(String taskId, long currentBytes, long totalBytes);\n\n\n void onFinish(String taskId, File file);\n\n\n void onFailure(String taskId, String error_msg);\n}", "@Override\n\t\tpublic void onTaskComplete(Vehicle vh) {\n\t\t\tVehicleActivity.this.onTaskCompleteDelete(vh);\n\t\t}", "public interface IUploadImageTask {\n public void OnTaskCompleted(UploadImageResult result);\n}", "public interface GetUnfinishedSummaryListener {\n void onTaskEnded(PartyDetails data);\n}", "private void notifyTaskCompletion(BackgroundTaskResult result)\n {\n //Use the activity reference to update the UI only\n //if it is available.\n if (null != activity) {\n BaseController controller = getController();\n if (controller != null && controller instanceof BackgroundTaskListener) {\n ((BackgroundTaskListener)controller).onBackgroundTaskCompleted(result);\n }\n updateOnActivityAttach = false;\n }\n else {\n updateOnActivityAttach = true;\n }\n }", "@Override\n public boolean complete(boolean succeed) {\n if (completed.compareAndSet(false, true)) {\n onTaskCompleted(task, succeed);\n return true;\n }\n return false;\n }", "@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}", "interface AsyncTaskCompleteListenerXml<T> {\n public void onTaskCompleteXml(T result);\n}", "public void onComplete(T result);", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }" ]
[ "0.73517203", "0.71210665", "0.7101161", "0.7003658", "0.6944547", "0.6858034", "0.68041617", "0.6781953", "0.67576313", "0.67480516", "0.67369723", "0.6730978", "0.6687175", "0.6677769", "0.6677769", "0.66394776", "0.6603913", "0.65847194", "0.65804166", "0.6570854", "0.6566511", "0.65397817", "0.6528265", "0.65281856", "0.6519573", "0.65082496", "0.6479619", "0.6435187", "0.64256096", "0.6420478", "0.6420478", "0.64198923", "0.6419131", "0.64062905", "0.6393286", "0.63897413", "0.6368373", "0.63663733", "0.63053465", "0.62913615", "0.6252145", "0.62480396", "0.6239359", "0.6235725", "0.6231392", "0.6214322", "0.6188102", "0.6177906", "0.61715406", "0.6169361", "0.61383116", "0.61377764", "0.6134365", "0.61341834", "0.61226785", "0.61055857", "0.60889274", "0.60889274", "0.6079484", "0.6071303", "0.6070681", "0.60530907", "0.6052974", "0.6045275", "0.60370725", "0.6034706", "0.6032193", "0.60276", "0.6025774", "0.60223716", "0.60067135", "0.6000358", "0.59978443", "0.59972024", "0.5995917", "0.5991428", "0.59845686", "0.598453", "0.59817106", "0.5972167", "0.5966489", "0.5955049", "0.593634", "0.59161156", "0.5914791", "0.59071076", "0.5906117", "0.5900837", "0.5899403", "0.58983964", "0.58948547", "0.5888042", "0.5877252", "0.5877252", "0.5877252", "0.5877252", "0.5877252", "0.5877252", "0.5877252", "0.5877252", "0.5877252" ]
0.0
-1
Create this object from an input text line.
private Line(String inLine) { // Save the input line. this.lineText = inLine; // Get the number of fields in the line. int nFields = labels.length; // Normally, this will work. this.fields = TabbedLineReader.this.splitLine(inLine); // If the number of fields is wrong, we have to adjust. if (this.fields.length != nFields) { // Copy the old array and create a new one of the proper length. String[] buffer = this.fields; this.fields = new String[nFields]; // Transfer the strings one by one, padding if necessary. for (int i = 0; i < nFields; i++) { if (i < buffer.length) { this.fields[i] = buffer[i]; } else { this.fields[i] = ""; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract T parseLine(String inputLine);", "public Record(String line)\t// create a record from a line\n\t{\n\t\tint i;\n\t\trecordMap = new HashMap<>(); \n\t\tStringTokenizer st = new StringTokenizer(line, DELIMITER);\n\n\t\tfor (i=0; i < NUMBER_OF_FIELDS; i++)\n\t\t{\n\t\t\trecordMap.put(i, new Field(FIELD_TYPES[i], FIELD_LABELS[i], st.nextToken()));\n\t\t}\t\t\n\t}", "public Task(String line) throws ParseException {\r\n\t\tthis.content = line;\r\n\t\tparseTask(line);\r\n\t}", "protected abstract void parse(String line);", "public Tuple(String textLine) {\n this(textLine, defaultDelimiter);\n }", "public TextLine(String text) {\n\t\tthis.text = text.toString();\n\t}", "public static Reindeer PARSE(String line) {\n String[] bits = line.split(\" \");\n return new Reindeer(bits[0], Integer.parseInt(bits[3]), Integer.parseInt(bits[6]), Integer.parseInt(bits[13]));\n }", "public static Line fromText(String data) {\n\t\tif (data == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tString[] dats = data.trim().split(\" \");\n\t\tif (dats.length != 7) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\ttry {\n\t\t\tint x1 = Integer.parseInt(dats[0].trim());\n\t\t\tint y1 = Integer.parseInt(dats[1].trim());\n\t\t\tint x2 = Integer.parseInt(dats[2].trim());\n\t\t\tint y2 = Integer.parseInt(dats[3].trim());\n\t\t\tint r = Integer.parseInt(dats[4].trim());\n\t\t\tint g = Integer.parseInt(dats[5].trim());\n\t\t\tint b = Integer.parseInt(dats[6].trim());\n\t\t\treturn new Line(\"Line\", x1, y1, x2, y2, new Color(r, g, b), null);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t}", "public GetParse(String line){\r\n\r\n Inline = line;\r\n this.parseWord(line);\r\n }", "public TFRule createTFRuleFromLine(String line) {\n\n line = removeTailComment(line);\n\n //skip blank lines or comments\n line = line.trim();\n\n try (Scanner rowScanner = new Scanner(line)) {\n rowScanner.useDelimiter(\",\");\n\n SensorData lhsExt = null;\n SensorData rhsExt = null;\n\n int[] lhsInt = null;\n String action = \"\\0\";\n\n double conf = -1.0;\n\n String lhsIntData = rowScanner.next().trim();\n\n try {\n lhsInt = getLHSIntFromString(lhsIntData);\n lhsExt = getSDFromString(rowScanner.next().trim());\n action = rowScanner.next().trim();\n rhsExt = getSDFromString(rowScanner.next().trim());\n String dblStr = rowScanner.next().trim();\n conf = Double.parseDouble(dblStr);\n } catch(InputMismatchException ime) {\n System.err.println(\"oh no!\");\n }\n\n return new TFRule(this.agent, action.charAt(0), lhsInt, lhsExt, rhsExt, conf);\n }\n }", "public Event (String eventline){\r\n\t\t\t//String delims = \"[ +]\";\r\n\r\n\t\t\tString[] tokens = eventline.split(\" +\");\r\n\t\t\tdate = Integer.parseInt(tokens[0]);\r\n\t\t\tticket = Integer.parseInt(tokens[1]);\r\n\t\t\tname = tokens[2];\r\n\t\t\toriginal = eventline;\r\n\t\t}", "public Item(String line) {\n\t\tString components[] = line.split(\":\",2);\n\t\tif(components.length != 2) {\n\t\t\t//System.err.println(\"Couldn't parse item! Original line: \"+line);\n\t\t\treturn;\n\t\t}\n\t\tthis.identifier = components[0].trim();\n\t\tthis.title = components[1].trim();\n\t}", "public ExpenseEntity parse(String line);", "public LineTokenizer(String str)\n {\n m_str = str;\n m_length = str.length();\n m_nextIndex = 0;\n }", "private static Process createProcessFromInput(String inputLine){\n int resA, resB, resC, neededA, neededB, neededC;\n\n inputLine = inputLine.replaceAll(\"\\\\[|\\\\]\", \"\"); //remove brackets\n String[] resourceInfo = inputLine.split(\" \");\n\n resA = Integer.parseInt(resourceInfo[0]);\n resB = Integer.parseInt(resourceInfo[1]);\n resC = Integer.parseInt(resourceInfo[2]);\n neededA = Integer.parseInt(resourceInfo[3]);\n neededB = Integer.parseInt(resourceInfo[4]);\n neededC = Integer.parseInt(resourceInfo[5]);\n\n int[] processInfo = {resA, resB,resC, neededA,neededB,neededC};\n return new Process(processInfo);\n }", "public Transaction(String transactionLine){\r\n\t\t\t//String delims = \"[\\\\s+]\";\r\n\t\t\tString[] tokens = transactionLine.split(\" +\");\r\n\t\t\tif (tokens[0].equals(\"\")){\r\n\t\t\t\tid = 00;\r\n\t\t\t}else{\r\n\t\t\t\tid = Integer.parseInt(tokens[0]);\r\n\t\t\t}\r\n\t\t\tif (id == 0){\r\n\t\t\t\tdate = 0;\r\n\t\t\t\tticket = 0;\r\n\t\t\t\tname = \"\";\r\n\t\t\t}else{\r\n\t\t\t\tdate = Integer.parseInt(tokens[2]);\r\n\t\t\t\tticket = Integer.parseInt(tokens[3]);\r\n\t\t\t\tname = tokens[1];\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\r\n\t }", "public static Classification parseLine(String line) {\r\n\t\tScanner s = new Scanner(line);\r\n\t\tClassification c = new Classification();\r\n\t\tif (s.hasNext()) {\r\n\t\t\tc.imageUUID = s.nextInt();\r\n\t\t\ts.nextInt();\r\n\t\t\tc.speciesName = s.next();\r\n\t\t}\r\n\t\ts.close();\r\n\t\treturn c;\r\n\r\n\t}", "protected abstract E createEntity(String line);", "public void parseInput(Scanner sc, String inputLine) {\n String[] input = inputLine.split(\",\");\n assert(input[0].equals(\"R\"));\n this.warehouseID = Integer.parseInt(input[1]);\n this.districtID = Integer.parseInt(input[2]);\n this.customerID = Integer.parseInt(input[3]);\n }", "public Task processContent (String txtLine) throws MonicaException {\n String[] content = txtLine.split(\" \\\\| \");\n String taskType = content[0];\n int taskStatus = Integer.parseInt(content[1]);\n String taskDescription = content[2];\n DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern(\"HHmm, dd MMM yyyy\");\n\n switch(taskType) {\n case \"D\":\n String deadlineTime = content[3];\n return new Deadline(taskDescription, taskStatus,\n LocalDateTime.parse(deadlineTime, dateTimeFormat));\n case \"E\":\n String eventTime = content[3];\n return new Event(taskDescription, taskStatus,\n LocalDateTime.parse(eventTime, dateTimeFormat));\n case \"T\":\n return new Todo(taskDescription, taskStatus);\n default:\n throw new MonicaException(taskType + \" is an invalid text type.\");\n }\n }", "public Lines(CharSequence text) {\n Parameters.notNull(\"text\", text);\n this.text = text;\n initLines();\n }", "@Override\n\tpublic LSystemBuilder configureFromText(String[] lines) {\n\t\tfor(int i = 0; i < lines.length; i++) {\n\t\t\tif(lines[i].equals(\"\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(lines[i].startsWith(ORIGIN)) {\n\t\t\t\tparseOrigin(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(ANGLE)) {\n\t\t\t\tparseAngle(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(UNIT_LENGTH_DEGREE_SCALER)) {\n\t\t\t\tparseUnitLengthDegreeScaler(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(UNIT_LENGTH)) {\n\t\t\t\tparseUnitLength(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(COMMAND)) {\n\t\t\t\tparseCommand(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(AXIOM)) {\n\t\t\t\tparseAxiom(lines[i]);\n\t\t\t}\n\t\t\telse if(lines[i].startsWith(PRODUCTION)) {\n\t\t\t\tparseProduction(lines[i]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalArgumentException(\"Invalid configuration line\");\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "protected void parseLine(String dataLine) {\n String[] line = dataLine.split(\",\");\n if (validater(line)) {\n try {\n Route route =\n new Route(\n line[airline],\n Integer.parseInt(line[airlineID]),\n line[sourceAirport],\n Integer.parseInt(line[sourceAirportID]),\n line[destinationAirport],\n Integer.parseInt(line[destinationAirportID]),\n line[codeshare],\n Integer.parseInt(line[stops]),\n line[equipment].split(\" \"));\n addRoute(route);\n } catch (Exception e) {\n errorCounter(11);\n }\n }\n }", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "public void setLine(String line) throws ParseException {\r\n\t\tthis.content = line;\r\n\t\tparseTask(line);\r\n\t}", "public TreeItem(StringBuffer text) throws DataFormatException, IOException {\n\t\tthis(text, 0);\n\t\tStreamTokenizer st = new StreamTokenizer(new StringReader(text.toString()));\n\t\tsetTokenizerNoWhitespace(st);\n\t\twhile (st.nextToken() != StreamTokenizer.TT_EOF)\n\t\t\tthrow new DataFormatException(\" Unexpected token \"+text.toString());\n\t\tsetNumNodes();\n\t}", "public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }", "private void handleImportLines(String inputLineString ){\n String [] splitInputLine = inputLineString.split(\",\");\n String command = splitInputLine[0];\n String name = \"\";\n String date = \"\";\n String department = \"\";\n\n double pay = 0;\n int role = 0;\n\n if(splitInputLine.length == ADDPARTFULLCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n\n }else if(splitInputLine.length == ADDMANAGECOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n role = Integer.parseInt(splitInputLine[5]);\n }else if(splitInputLine.length == OTHEREXPECTEDCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n }\n\n if(command.equals(\"P\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Parttime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"F\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Fulltime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"M\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Management(newEmployeeProfile, pay, role);\n company.add(newEmployee);\n }\n }", "private ProductRecord parseLine(String line) {\n\t\tString[] splittedLine = splitAndTrim(line);\n\t\t\n\t\tString name = splittedLine[0];\n\t\tString id = splittedLine[1];\n\t\tint price = Integer.parseInt(splittedLine[2]);\n\t\tint currentStock = Integer.parseInt(splittedLine[3]);\n\t\tint minStock = Integer.parseInt(splittedLine[4]);\n\t\t\n\t\t// Parse memo if exist.\n\t\tString memo = null;\n\t\tif (splittedLine.length >= 6) memo = splittedLine[5];\n\t\t\n\t\t// Get category from product id.\n\t\tString category;\n\t\tint categoryInt = Integer.parseInt(id.split(\"-\")[0]);\n\t\tswitch (categoryInt) {\n\t\tcase 1:\n\t\t\tcategory = \"Food\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcategory = \"Office\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcategory = \"Misc.\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcategory = \"Health\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcategory = \"Clothing\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcategory = \"Etc\";\n\t\t}\n\t\t\n\t\treturn new ProductRecord(name, id, category, price, currentStock, minStock, memo);\n\t}", "public abstract void fromString(String s, String context);", "public TagParser(String input, TaskList lines) {\n this.input = input;\n this.lines = lines;\n }", "public Line(){\n\t\t\n\t}", "public Customer(String s) {\r\n\t\tString [] sr = s.split(\",\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(sr.length == 3)\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.seqNo = Integer.parseInt(sr[0].trim());\r\n\t\t\t\t\tthis.name = sr[1].trim();\r\n\t\t\t\t\tthis.parcelID = sr[2].trim();\r\n\t\t\t\t}\r\n\t\t\t\tcatch(NumberFormatException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Error in input file. Cannot convert to int\" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"Error in input file. To few parts\" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new CustomerStringFormatException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(CustomerStringFormatException cfse)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"String format error: Cannot convert string to Customer.\");\r\n\t\t}\r\n\t}", "public abstract Object parseRecord(String input);", "public QuestionTF(String line, int lineNumber) {\n\t\tif (this.validate(line, lineNumber)) {\n\t\t\tthis.loadData(line);\n\t\t}\n\t}", "public Input(String input) {\n\t\tString[] in = input.split(\"\\n\");\n\t\tif (in.length < 1 || in.length % 2 != 1) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Input(String input): the number of input lines should be odd and contain at least 1 line\");\n\t\t}\n\t\tString[] lineSplit;\n\t\tPosition roverPos = null;\n\t\tDirection dir = null;\n\t\tList<Move> moves = null;\n\t\tPosition upperRightCorner = null;\n\t\tLinkedHashMap<Rover, List<Move>> rovers = new LinkedHashMap<Rover, List<Move>>();\n\t\tfor (int i = 0; i < in.length; i++) {\n\t\t\ttry {\n\t\t\t\tif (i == 0) {\n\t\t\t\t\tlineSplit = in[i].split(\"\\\\s+\");\n\t\t\t\t\tupperRightCorner = new Position(\n\t\t\t\t\t\t\tInteger.parseInt(lineSplit[0]),\n\t\t\t\t\t\t\tInteger.parseInt(lineSplit[1]));\n\t\t\t\t} else {\n\t\t\t\t\tif (roverPos == null) {\n\t\t\t\t\t\tlineSplit = in[i].split(\"\\\\s+\");\n\t\t\t\t\t\troverPos = new Position(Integer.parseInt(lineSplit[0]),\n\t\t\t\t\t\t\t\tInteger.parseInt(lineSplit[1]));\n\t\t\t\t\t\tdir = Direction.getDirection(lineSplit[2].charAt(0));\n\t\t\t\t\t} else if (moves == null) {\n\t\t\t\t\t\tlineSplit = in[i].split(\"\");\n\t\t\t\t\t\tmoves = new ArrayList<Move>();\n\t\t\t\t\t\tfor (String moveStr : lineSplit) {\n\t\t\t\t\t\t\tmoves.add(Move.getMove(moveStr.charAt(0)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (roverPos != null && moves != null) {\n\t\t\t\t\t\tRover rover = new Rover(roverPos, dir);\n\t\t\t\t\t\trovers.put(rover, moves);\n\t\t\t\t\t\troverPos = null;\n\t\t\t\t\t\tdir = null;\n\t\t\t\t\t\tmoves = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"Input(String input): An error occured during parsing string: \"\n\t\t\t\t\t\t\t\t+ in[i]);\n\t\t\t}\n\t\t}\n\t\tmUpperRightCorner = upperRightCorner;\n\t\tmRovers = rovers;\n\t}", "protected abstract DataTypes[] processLine(MutableCharArrayString line);", "protected void processLine(String line){}", "public Parse(String str)\r\n {\r\n super(str);\r\n }", "static public Employee getEmployeeFromString(String lineRead){\n\t\tString[] newEmployee = lineRead.split(\",\");\n\t\tString name = newEmployee[0];\n\t\tFloat number = Float.parseFloat(newEmployee[1]);\n\t\tDepartment department = Department.valueOf(newEmployee[2]);\n\t\tEmployee finalEmployee = new Employee(name, number, department);\n\t\treturn finalEmployee;\n\t}", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length == 2 && \"attributes\".equals(lineElements[0]) && \"{\".equals(lineElements[1])) {\n SubgraphAttributeDefLineParser contAttrDefLineParser = new SubgraphAttributeDefLineParser(container);\n PopulateDB.parseBlock(parseState, contAttrDefLineParser);\n } else if (lineElements.length == 3 && \"subgraph\".equals(lineElements[0]) && \"{\".equals(lineElements[2])) {\n int subgID = Integer.parseInt(lineElements[1]);\n SubgraphLineParser subgraphLineParser = new SubgraphLineParser(container, subgID);\n PopulateDB.parseBlock(parseState, subgraphLineParser);\n } else {\n throw new IllegalArgumentException(\"Bad attributes or subgraph definition\");\n }\n }", "public RequestLine(String rawRequestLine) {\n\t\tparseRequestLine(rawRequestLine);\n\t}", "Object create(InputSource is) throws IOException, SAXException, ParserConfigurationException;", "public TextFlow() {\n this(new String());\n }", "public StringInputSource(String s) {\n _index = 0;\n _input = s;\n }", "public void setFromLine(String str) {\n StringTokenizer initialLine = new StringTokenizer(str, \":\");\n\n this.node = initialLine.nextToken().trim();\n //Get the next token\n String token = initialLine.nextToken();\n\n //Here, we try if we can cast the token to a double.\n // If so, then the node had not output links. Else, we get them and then get the page rank\n try {\n this.pageRank = Double.valueOf(token);\n } catch (NumberFormatException e) {\n this.setOutputLink(token.split(\",\"));\n }\n\n if (this.outputLink != null)\n this.pageRank = Double.valueOf(initialLine.nextToken());\n else\n this.outputLink = new Vector<String>();\n }", "public static LineMatcher createStringLineMatcher(String str) {\n return new LineMatcher(LineReader.createStringLineReader(str));\n }", "public Affettatore(String str) {\n this (str, \" \\t\\n\\r\\f\");\n }", "protected void processLine(String aLine){\n\t\t \t\t String temp=aLine.substring(0, 7);\n\t\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t\t \t\t int ID=Integer.parseInt(temp);\n\t \t\t String name=aLine.substring(7, 12);\n\t \t\t //int forget=;//epoch\n\t \t\t temp=aLine.substring(31, 42);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t double a=Double.parseDouble(temp);//TODO determine what the scale of simulation should be\n\t \t\t temp=aLine.substring(42, 53);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t double e=Double.parseDouble(temp);\n\t \t\t \n\t \t\t asteriod newBody=new asteriod(a,e);//TODO find asteriodal angular shit\n\t \t\t \n\t \t\t double temp2;\n\t \t\t //54 to 63 for inclination\n\t \t\t temp=aLine.substring(54,63);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.Inclination=Math.toRadians(temp2);\n\t \t\t //64 for argument of periapsis\n\t \t\t temp=aLine.substring(63, 74);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.ArgPeriapsis=Math.toRadians(temp2);\n\t \t\t //Longitude of ascending node\n\t \t\t temp=aLine.substring(73, 84);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.LongAscenNode=Math.toRadians(temp2);\n\t \t\t //Mean Anommally/PHI\n\t \t\t temp=aLine.substring(83,96);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t temp2=Math.toRadians(temp2);\n\t \t\t newBody.meanAnomaly0=temp2;\n\t \t\t \n\t \t\t temp=aLine.substring(95,100);\n\t \t\t temp=temp.replaceAll(\"[^\\\\d.]\", \"\");\n\t \t\t temp2=Double.parseDouble(temp);\n\t \t\t newBody.H=temp2;\n\t \t\t \n\t \t\t newBody.ID=ID;\n\t \t\t newBody.name=name;\n\t \t\t newBody.setType();\n\t \t\t runnerMain.bodies.add(newBody);\n\t \t\t System.out.println(\"e:\"+newBody.eccentricity+\" ID:\"+ID+\" name: \"+name+\" LongAsnNd: \"+newBody.LongAscenNode+\" Peri: \"+newBody.ArgPeriapsis+\" MeanAn0: \"+newBody.meanAnomaly0);\n\t\t }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public static Line CreateLine(String id) { return new MyLine(id); }", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "private void processLine(String line1) {\n StringTokenizer tVal = new StringTokenizer(line1);\n int yearOf = Integer.parseInt((tVal.nextToken()));\n List chosenYear = yearOf == 2014 ? employeeSalary_2014:\n employeeSalary_2015;\n String employeeTypeE = tVal.nextToken();\n String employeeName = tVal.nextToken();\n Integer employeeMonthlySalary =\n Integer.parseInt(tVal.nextToken());\n Employee newEmployee = null;\n if (employeeTypeE.equals(\"Salesman\")) {\n Integer salesmanCommission=\n Integer.parseInt(tVal.nextToken());\n\n newEmployee = new Salesman(employeeName, employeeMonthlySalary, salesmanCommission);\n\n }\n else if (employeeTypeE.equals(\"Executive\")) {\n Integer stockPrice= Integer.parseInt(tVal.nextToken());\n newEmployee = new Executive(employeeName, employeeMonthlySalary, stockPrice);\n }\n else {\n newEmployee = new Employee(employeeName, employeeMonthlySalary);\n }\n chosenYear.add(newEmployee);\n }", "public Line getLine(String targetLine);", "public Parser(String[] userInput) {\n this.command = userInput[0];\n if (userInput.length > 1) {\n this.description = userInput[1];\n }\n }", "public TextFlow(String s) {\n text = s;\n }", "T transform(String line);", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "@Nonnull\n @SuppressWarnings(\"unchecked\")\n public static <T extends Word> T parse(Type type, String line) {\n\n String[] parsedParts = line.split(\"[ ]*,[ ]*\");\n ArrayList<String> parts = new ArrayList<>(parsedParts.length);\n for (String part : parsedParts) {\n parts.add(part.replace('_',' '));\n }\n\n Preconditions.checkState(parts.size() > 0, \"Did not find word with attributes: {}\", line);\n LOGGER.trace(\"Parsing type={} with line={}\", type, line);\n final T word;\n switch(type) {\n case Pronoun:\n word = (T)new Pronoun(parts);\n break;\n\n case Conjunction:\n word = (T)new Conjunction(parts);\n break;\n\n case Noun:\n word = (T)new Noun(parts);\n break;\n\n case Adjective:\n word = (T)new Adjective(parts);\n break;\n\n case Verb:\n word = (T)new Verb(parts);\n break;\n\n case Adverb:\n word = (T)new Adverb(parts);\n break;\n\n case Preposition:\n word = (T)new Preposition(parts);\n break;\n\n default:\n word = (T)new Text(parts);\n }\n return word;\n }", "Line createLine();", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "public static LogDataParser praseLogRequestLine(String line)\n\t\t\tthrows NumberFormatException, PatternSyntaxException, PatternNotMatchedException {\n\t\tPATTERN = Pattern.compile(LOG_LINE_ENTRY_PATTERN);\n\t\tMatcher matcher = PATTERN.matcher(line);\n\t\tif (!matcher.find()) {\n\t\t\tthrow new PatternNotMatchedException(\"Cannot parse \" + line);\n\t\t}\n\t\treturn new LogDataParser(matcher.group(1), matcher.group(9));\n\t}", "public Building(String[] line){\n setId(Integer.parseInt(line[0]));\n setRank(Integer.parseInt(line[1]));\n setName(line[2]);\n setCity(line[3]);\n setCountry(line[4]);\n setHeight_m(Double.parseDouble(line[5]));\n setHeight_ft(Double.parseDouble(line[6]));\n setFloors(line[7]);\n setBuild(line[8]);\n setArchitect(line[9]);\n setArchitectual_style(line[10]);\n setCost(line[11]);\n setMaterial(line[12]);\n setLongitude(line[13]);\n setLatitude(line[14]);\n // setImage(line[15]);\n\n }", "public Tokenizer(Reader input) {\n this(input, false);\n }", "public PlantID(String line){\r\n\t\tScanner sc = new Scanner(line);\r\n\t\tthis.id = sc.next();\r\n\t\tthis.name = (sc.next()+\" \" +sc.next());\r\n\t\tsc.close();\r\n\t}", "public void parse(String line)\n\t{\n\t\tif(line.length() == 0)\n\t\t\treturn;\n\t\tif(line.startsWith(\";\"))\n\t\t\treturn;\n\t\tline = line.toUpperCase();\n\t\t\n\t\tif(Utils.isCommand(line)){\n\t\t\texecuteCommand(line);\n\t\t\treturn;\n\t\t}\n\t\t//line syntax = <TYPE> <NAME> = {EXPR}\n\t\tStringBuilder build = new StringBuilder();\n\t\tString name = \"\";\n\t\tString type = \"\";\n\t\tint i = 0;\n\t\t//check if the line starts with a letter, we expect a Type declaration, made of letters :P\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\t\n\t\t\n\t\tchar c = line.charAt(i); //current character to analyze.\n\t\t\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\t//build.append(c);\n\t\t\tc = line.charAt(i); \t\n\t\t\ti++;\t\t\n\t\t}\n\t\t//space char expected before the type declaration.\n\t\tif(!Utils.isSpace(c) && i < line.length())\n\t\t\terror(\"INVALID CHARACTER \\\" \" + c + \"\\\" \");\n\t\t\n\t\t//here we obtain the type.\n\t\t//String t = build.toString();\n\t\tString t = line.substring(0, i-1);\n\t\tif(Utils.isValidType(t))\n\t\t{\n\t\t\ttype = t;\n\t\t}\n\t\telse\n\t\t\terror(t + \" IS NOT A VALID TYPE.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\t\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//if name is not present, but the index reached the \" = \" sign, throw an Exception.\n\t\tif(line.charAt(i) == '=')\n\t\t\terror(\"NAME NOT FOUND, WHAT THE HECK ARE YOU TIPYING???\");\n\t\t\n\t\t//Names MUST start with a letter.\n\t\tif(!Utils.isLetter(line.charAt(i)))\n\t\t\terror(\"LETTER EXPECTED, NOT \" + line.charAt(i));\n\t\t\n\t\t//update the c char.\n\t\tc = line.charAt(i);\n\t\t\n\t\t//now we must obtain the name token.\n\t\twhile(i < line.length() && Utils.isLetter(c))\n\t\t{\n\t\t\tbuild.append(c);\n\t\t\ti++;\n\t\t\tc = line.charAt(i); \t\t\t\n\t\t}\n\t\t//here we have reached the edge of the name, this MUST be followed by a space char.\n\t\tif(i < line.length() && Utils.isSpace(c))\n\t\t{\n\t\t\tString n = build.toString();\n\t\t\tif(t.length() > 8)\n\t\t\t\terror(\"NAME LENGTH CAN'T BE GREATER THAN 8 CHARS\");\n\t\t\tif(t.length() == 8)\n\t\t\t\tSystem.out.println(\"name token hit the length limit, please use short names.\");\n\t\t\tname = n;\n\t\t}\n\t\telse\n\t\t\terror(\"ERROR IN CHARACTER \\\" \" + c + \" \\\", SPACE EXPECTED.\");\n\t\t\n\t\t//re-init stringbuilder.\n\t\tbuild = new StringBuilder();\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//here we expect a \" = \" character.\n\t\tif(line.charAt(i) != '=')\n\t\t\terror(\"MISSING \\\" = \\\" SIMBOL\");\n\t\t\n\t\t//advance to next char, idk why, but without this, the compiler crashes.\n\t\ti++;\n\t\t\n\t\t//ignore all whitespace chars.\n\t\twhile(i < line.length() && Utils.isSpace(line.charAt(i)))\n\t\t\ti++;\n\t\t\n\t\t//get expr text.\n\t\tString e = line.substring(i);\n\t\t//solve any reference to other vars, only for basic types.\n\t\tif(Utils.containRefs(e) && Utils.isBasicType(type))\n\t\t\te = solveRefs(e);\n\t\te = e.trim();\n\t\tif(type.equals(\"INTEGER\"))\n\t\t\tints.add(new Int(name, solveMath(e)));\n\t\tif(type.equals(\"STRING\"))\n\t\t\tstrs.add(new Str(name,e));\n\t\tif(type.equals(\"BOOLEAN\"))\n\t\t\tbools.add(new Bool(name,Boolean.parseBoolean(e)));\n\t\tif(Utils.isFuncType(type))\n\t\t{}\n\t\tif(Utils.isCallType(type))\n\t\t{\n\t\t\tExecutable ex = null;\n\t\t\tif(type.equals(\"CALLX\"))\t\n\t\t\t\tex = solveCallx(name, e);\n\t\t\tif(type.equals(\"RETURN\"))\n\t\t\t\tex = solveReturn(name, e);\n\t\t\texecution.executionList.add(ex);\n\t\t}\n\t\tlnumber += 10;\n\t\tlines.add(line);\n\t}", "protected TextLine genText (String str, Text text, TextLine line, Context context) {\n\t\tTextLine tLine = line;\n\t\tString[] parts = str.split(\"\\\\n\");\n\t\tbyte charset = TextParams.ROMAN;\n\t\tbyte size = TextParams.ILIAD_SCHOLIA_FONT_SIZE;\n\n\t\tString part = parts[0];\n\t\tpart = part.replaceAll(\"\\\\s+\", \" \");\n\t\tTextRun run = new TextRun(part, charset, size);\n\t\tif (context.bold) run.setBold();\n\t\tif (context.italic) run.setItalic();\n\t\ttLine.appendRun(run);\n\n\t\tif(parts.length > 1) {\n\t\t\ttext.copyLine(tLine);\n\t\t\tfor(int i =1;i<parts.length;i++) {\n\t\t\t\tpart = parts[i];\n\t\t\t\tpart = part.replaceAll(\"\\\\s+\", \" \");\n\t\t\t\ttLine = new TextLine();\n\t\t\t\trun = new TextRun(part, charset, size);\n\t\t\t\tif (context.bold) run.setBold();\n\t\t\t\tif (context.italic) run.setItalic();\n\t\t\t\ttLine.appendRun(run);\n\t\t\t\tif(i<parts.length -1) {\n\t\t\t\t\ttext.copyLine(tLine);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tLine;\n\t}", "public BasicLineParser() {\n/* 99 */ this(null);\n/* */ }", "public Tuple(String textLine, String delimiter) {\n if (delimiter == null) {\n delimiter = defaultDelimiter;\n }\n \n fields = new ArrayList<Datum>(numFields) ;\n int delimSize = delimiter.length() ;\n boolean done = false ;\n \n int lastIdx = 0 ;\n \n while (!done) {\n int newIdx = textLine.indexOf(delimiter, lastIdx) ;\n if (newIdx != (-1)) {\n String token = textLine.substring(lastIdx, newIdx) ;\n fields.add(new DataAtom(token));\n lastIdx = newIdx + delimSize ;\n }\n else {\n String token = textLine.substring(lastIdx) ;\n fields.add(new DataAtom(token));\n done = true ;\n }\n }\n\n numFields = fields.size();\n }", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "public Record(String[] input){\r\n\t\tsetData(input);\r\n\t}", "public abstract T parse(String str);", "public Point(String str) {\n String[] parsed = str.substring(1,-1).split(\" \");\n setName(parsed[0]);\n setX(Integer.parseInt(parsed[1]));\n setY(Integer.parseInt(parsed[2]));\n }", "public Parser(String filter, String order, int filterLine, int orderLine) {\n this.filter = filter;\n this.order = order;\n this.filterLine = filterLine;\n this.orderLine = orderLine;\n }", "public Entry buildEntry(String line) {\n\t\tlog.debug(\"line : \" + line);\n\t\t\n\t\tEntry entry = new Entry();\n\t\ttry {\n\t\t\tString[] strList = line.split(\",\");\n\t\t\tint length = strList.length;\n\t\t\t//Checking for phone number values\n\t\t\tif (length == 5)\n\t\t\t{\n\t\t\t\tif(FlatFileUtil.isPhone(strList[2]))\n\t\t\t\t{\n\t\t\t\t\tlog.debug(\"LastName, FirstName, (703)-711-0996, Blue, 11013 - format\");\n\t\t\t\t\tentry.setLastname(strList[0].trim());\n\t\t\t\t\tentry.setFirstname(strList[1].trim());\n\t\t\t\t\tentry.setPhonenumber(strList[2].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t\t\tentry.setColor(strList[3].trim());\n\t\t\t\t\tentry.setZipcode(strList[4].trim());\n\t\t\t\t\t\n\t\t\t\t}else if(FlatFileUtil.isPhone(strList[3])) {\n\t\t\t\t\tlog.debug(\"FirstName, LastName, 12023, 636 121 1111, Yellow - format\");\n\t\t\t\t\tentry.setFirstname(strList[0].trim());\n\t\t\t\t\tentry.setLastname(strList[1].trim());\n\t\t\t\t\tentry.setZipcode(strList[2].trim());\n\t\t\t\t\tentry.setPhonenumber(strList[3].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t\t\tentry.setColor(strList[4].trim());\n\t\t\t\t}\n\t\t\t} else if (length == 4) { \n\t\t\t\tlog.debug(\"FirstName LastName, Purple, 14537, 713 905 0383 - format\");\n\t\t\t\tString[] nameStrList = strList[0].split(\" \");\n\t\t\t\tentry.setFirstname(nameStrList[0].trim());\n\t\t\t\tentry.setLastname(nameStrList[1].trim());\n\t\t\t\tentry.setColor(strList[1].trim());\n\t\t\t\tentry.setZipcode(strList[2].trim());\n\t\t\t\tentry.setPhonenumber(strList[3].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t}\n\t\t} catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn entry;\n\t}", "public LyricSentence (String str) {\n this(str, 0);\n }", "public Vector createVector(String line) throws VectorException {\r\n\t\tVector vector = new Vector();\r\n\t\tString[] arr = line.split(\",\");\r\n\t\t\r\n\t\tfor(String s : arr) {\r\n\t\t\ttry {\r\n\t\t\t\tvalidateInteger(line);\r\n\t\t\t\tInteger i = Integer.parseInt(s);\r\n\t\t\t\tvector.addItem(i);\r\n\t\t\t\t\r\n\t\t\t}catch(NumberFormatException e) {\r\n\t\t\t\tthrow new VectorException(\"Value must be an number of Integer type\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn vector;\r\n\t}", "public TextlineModel(int x, int y, int width, int height, int rotation, String textIn) {\n\t\tthis();\n\t\tobox = new OrientedBox(x, y, width, height, rotation);\n\t\tocclusions = new ArrayList();\n\t\twordOffsets = new ArrayList();\n\t\tsetText(textIn);\n\t}", "public Transformer(String input) throws Exception {\n // Remove spaces\n String inputReplaced = input.replace(\", \", \",\");\n inputReplaced = inputReplaced.replace(\" ,\", \",\");\n while (inputReplaced.length() != input.length()) {\n input = inputReplaced;\n inputReplaced = input.replace(\", \", \",\");\n inputReplaced = inputReplaced.replace(\" ,\", \",\");\n }\n input = input.replace(\":\", \",\");\n\n // Make sure the input uses the correct format\n if (!input.matches(\"^([a-z]|[A-Z]|[ ])+,.*$\"))\n throw new Exception(\"Bad formatting! Transformer \" + input + \" does not start with a valid name\");\n if (!input.matches(\"^.*,([aAdD]|([aA]utobots)|([dD]ecepticons)),.*$\"))\n throw new Exception(\"Bad formatting! Transformer \" + input + \" does not have a valid team\");\n if (!input.matches(\"^.*(,(10|[1-9])){8}$\"))\n throw new Exception(\"Bad formatting! Transformer \" + input + \" does not have valid specs\");\n\n // Build the transformer\n String[] inputArray = input.split(\",\");\n name = inputArray[NAME];\n team = inputArray[TEAM].matches(\"([aA]|[aA]utobots)\") ? \"Autobots\" : \"Decepticons\";\n\n int[] specs = new int[8];\n for (int i = 0; i < specs.length; i++)\n specs[i] = Integer.parseInt(inputArray[i + 2]);\n\n strength = specs[0];\n rank = specs[4];\n courage = specs[5];\n skill = specs[7];\n overall = specs[1] + specs[2] + specs[3] + specs[6];\n }", "public Readln(String id)\n {\n this.id = id;\n }", "public AddDeadlineCommand(String line) {\n this.line = line;\n }", "protected Command(String input, String[] data) {\n this.setInput(input);\n this.setData(data);\n }", "List<Object> parse(String inputLine) {\n List<Object> lo = new ArrayList<>();\n int lineLength = inputLine.length();\n for (int i = 0; i < lineLength; i++) {\n char c = inputLine.charAt(i);\n //creator of constant:\n if (isPartOfNumber(c)) {\n String constantValue = \"\";\n for (; i < lineLength; i++) {\n c = inputLine.charAt(i);\n if (!isPartOfNumber(c)) {\n break;\n }\n constantValue += c;\n }\n //assign constant\n lo.add(new Constant(Double.parseDouble(constantValue)));\n if (i == lineLength) {\n break;\n }\n }\n switch (c) {\n case '(':\n lo.add(Brackets.OPENING);\n break;\n case ')':\n lo.add(Brackets.CLOSING);\n break;\n case '²':\n lo.add(Operators.SQUARE);\n break;\n case '√':\n lo.add(Operators.SQUARE_ROOT);\n break;\n case '÷':\n lo.add(Operators.DIVIDE);\n break;\n case '×':\n lo.add(Operators.MULTIPLY);\n break;\n case '%':\n lo.add(Operators.PERCENTAGE);\n break;\n case '+':\n lo.add(Operators.ADD);\n break;\n case '−':\n lo.add(Operators.SUBTRACT);\n break;\n default:\n throw new IllegalArgumentException(\"Unknown symbol used as input string\");\n }\n }\n return lo;\n }", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public SentenceItem(String parse){\n\t\tString[] split = pattern.split(parse);\n\t\tthis.origWord = split[0];\n\t\tthis.word = split[1].replaceAll(\"[,.:]\", \"\");\n\t\tthis.POS = split[2];\n\t}", "public TreeItem(BufferedReader br) throws DataFormatException, IOException {\n\t\tsuper(br);\n\t}", "public Term(String t) {\n this.t = t;\n \n RepCheck();\n }", "static MyProduct getMyProduct(String line) {\n // Assuming that the input data is 'valid', we can tokenize each line to three String literals.\n // These tokens correspond to product ID, units sold, and revenue.\n String[] tokens = line.split(\",\");\n MyProduct.Builder prodBuilder = MyProduct.newBuilder();\n\n // You can \"set\" the value of a field like this:\n prodBuilder.setId(tokens[0]);\n\n // You can chain multiple calls to setters, too.\n prodBuilder.setUnitsSold(Integer.parseInt(tokens[1])).setRevenue(Integer.parseInt(tokens[2]));\n\n // 'build()' will create a new object based on the values set in the builder object.\n return prodBuilder.build();\n }", "public SyntaxParser(final String input, @NotNull final InstructionSet instructionSet) {\n this(input, instructionSet, 0, CharInputStream.END_OF_FILE);\n }", "private void parseCommand(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString commandString;\n\t\tif(tokens.length == 4) {\n\t\t\tcommandString = tokens[2] + \" \" + tokens[3];\n\t\t}\n\t\telse if(tokens.length == 3) {\n\t\t\tcommandString = tokens[2];\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\"Invalid command argument\");\n\t\t}\n\t\tthis.registerCommand(tokens[1].charAt(0), commandString);\n\t}", "public Pre(String Text)\r\n {\r\n this(); \r\n if( Text != null)\r\n add(Text);\r\n }", "abstract protected T getRecordFromLine(String line) throws DataImportException ;", "public Text(String text)\n {\n super(text);\n initialize();\n }", "public static void initialize_parameters(String line) {\n\t\tString word[] = line.split(\" \");\n\t\tif (word[0].equals(\"access_token\")) {\n\t\t\taccess_token = new String(word[1]);\n\t\t} else if (word[0].equals(\"host\")) {\n\t\t\thost = new String(word[1]);\n\t\t} else if (word[0].equals(\"port\")) {\n\t\t\tport = new String(word[1]);\n\t\t} else if (word[0].equals(\"cache\")) {\n\t\t\tcache = new String(word[1]);\n\t\t}\n\t}", "public Constraint(String cnline)\n {\n// PrintStream stdout = System.out;\n// stdout.printf(\"Constraint: line: %s\\n\", cnline);\n\tString[] cnArray = cnline.split(\" \");\n\tif (cnArray.length != 2) {\n\t debug.error(\"Invalid constraint: '%s'\", cnline);\n\t}\n\n\tthis.name = cnArray[0].toLowerCase();;\n\tthis.mf = Scoring.mf2int(cnArray[1].charAt(0));\n }", "public Item(String input) {\n name = input;\n }", "public static Product convertToProduct(String line) {\n String[] row = line.split(\",\");\n Product item = new Product();\n String thisLine;\n for (int i = 0; i < row.length; i++) {\n switch (i) {\n case (0):\n item.category = row[i];\n break;\n case (1):\n item.name = row[i];\n break;\n case (2):\n thisLine = row[i];\n if (thisLine.contains(\"\\\"\")){\n thisLine +=row[++i];\n item.price = Double.parseDouble(thisLine.replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\").replaceAll(\",\",\"\"));\n item.stockNum = Integer.parseInt(row[++i]);\n break;\n }else {\n item.price = Double.parseDouble(row[i].replaceAll(\"\\\\$\", \"\").replaceAll(\"\\\"\", \"\"));\n }\n break;\n case (3):\n item.stockNum = Integer.parseInt(row[i]);\n }\n }\n\n item.id = createID();\n return item;\n }", "public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "Yylex(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }" ]
[ "0.72347903", "0.65409195", "0.6513213", "0.6483493", "0.63738245", "0.6293196", "0.6235588", "0.6223051", "0.621782", "0.6216289", "0.6184636", "0.61698806", "0.61626947", "0.6151395", "0.61206675", "0.61093473", "0.6051739", "0.60344225", "0.6027103", "0.59344083", "0.5924964", "0.5890202", "0.58234465", "0.5803855", "0.5792348", "0.5791938", "0.5778556", "0.57625663", "0.5743578", "0.5736291", "0.5718389", "0.57139826", "0.5708674", "0.5696767", "0.56867504", "0.5681057", "0.5679767", "0.5674759", "0.563555", "0.56102526", "0.5575526", "0.5570498", "0.5559008", "0.55477697", "0.55412006", "0.55386215", "0.5534355", "0.55299723", "0.55176675", "0.55108374", "0.5507652", "0.5505088", "0.54915446", "0.5475218", "0.54644257", "0.5461444", "0.5457305", "0.545719", "0.54522187", "0.54421103", "0.5435552", "0.5435327", "0.54325116", "0.5421705", "0.54091406", "0.54085296", "0.54038507", "0.54024804", "0.540103", "0.5393396", "0.5379979", "0.5373989", "0.5362641", "0.53479254", "0.53428715", "0.5315257", "0.53037953", "0.5293468", "0.5288051", "0.52769023", "0.5274566", "0.5271739", "0.52708846", "0.52636087", "0.52565235", "0.5250999", "0.52503455", "0.52301794", "0.5228385", "0.5210382", "0.5207047", "0.52025014", "0.52022046", "0.52004504", "0.5194796", "0.519363", "0.5188942", "0.5188891", "0.5186468", "0.5183775" ]
0.6968682
1
Open a tabbedline reader for a file.
public TabbedLineReader(File inFile) throws IOException { this.openFile(inFile, '\t'); this.readHeader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }", "public FileTableEntry open(String filename, String mode)\n\t{\n\t\tFileTableEntry ftEnt = filetable.falloc(filename, mode);\n\n\t\t//checking mode for writing\n\t\tif (ftEnt != null) {\n\t\t\tif (mode.equals(\"w\")) {\n\t\t\t\tif(!deallocAllBlocks(ftEnt)) {\n\t\t\t\t\tftEnt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (mode.equals(\"a\")) {\n\t\t\t\tftEnt.seekPtr = ftEnt.inode.length;\n\t\t\t}\n\t\t}\n\t\treturn ftEnt;\n\t}", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "public Tab createOpenEditorTab(long fileId, boolean useSearch) {\n Tab retTab = new Tab();\n long ref = 0;\n StringBuilder tabId = new StringBuilder();\n for (Tab tab : editorTabSet.getTabs()) {\n if (tab.getAttributeAsLong(\"ref\") == fileId) {\n ref = tab.getAttributeAsLong(\"ref\");\n tabId.append(tab.getAttributeAsString(\"UniqueId\"));\n editorTabSet.selectTab(tabId.toString());\n if (useSearch) {\n search.selectSearchResultModel(tab);\n return null;\n } else {\n return tab;\n }\n }\n }\n\n if (ref == 0) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result == null) {\n SC.warn(\"File not found.\");\n return;\n }\n\n tabId.append(HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\"));\n String tabName = result.getName();\n retTab.setTitle(getTabImgTitle(tabName, result.getExtension()));\n retTab.setCanClose(true);\n retTab.setID(tabId.toString());\n String path = result.getFullPath().replaceAll(\"(.*)/\" + result.getName() + \"\\\\.\" + result.getExtensionStr() + \"$\", \"$1\");\n retTab.setPrompt(path);\n retTab.setPane(new Layout());\n retTab.setAttribute(\"ref\", fileId);\n retTab.setAttribute(\"UniqueId\", tabId.toString());\n retTab.setAttribute(\"Extension\", result.getExtension().getValue());\n retTab.setAttribute(\"TabName\", tabName);\n createView(retTab, result, new PostProcessHandler() {\n @Override\n public void execute() {\n if (useSearch) {\n search.selectSearchResultModel(retTab);\n }\n }\n });\n }\n });\n return retTab;\n }\n return retTab;\n }", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "CompletableFuture<Optional<FutureLineStorage>> open(String fileName);", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "public void open() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfc.showOpenDialog(null);\n\t\ttry {\n\t\t\tfr = new FileReader(fc.getSelectedFile().getAbsolutePath());\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t//make sure textArea is empty\n\t\t\ttextArea.setText(\"\");\n\t\t\t//loop to read all lines in file\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\ttextArea.append(br.readLine() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "void open(String fileName);", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "public void readtabs(File f) {\r\n \tString str = new String();\r\n try{\r\n BufferedReader br = new BufferedReader(new FileReader(f.getAbsolutePath()));\r\n str = br.readLine();\r\n \r\n while((str = br.readLine()) != null){\r\n //str = str.replaceAll(\";\", \"\");\r\n String info[] = str.split(\";\");\r\n if(f.getName().equals(\"mdl_chat_messages.txt\")){\r\n \t//chat message id; chatid; userid; groupid; system; message; timestamp;\r\n \tmobileact ma = new mobileact(info[2].trim(), info[6].trim(), \"Chat Message\", info[5]);\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_forum_posts.txt\")){\r\n \t//id; discussion; parent; userid; created; modified; mailed; subject; message; \r\n \t//messageformat; messagetrust; attachment; totalscore; mailnow; \r\n \tmobileact ma = new mobileact(info[3].trim(), info[5].trim(), \"Forum Posts\", info[8].trim());\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_quiz_attempts.txt\")){\r\n \t//id; quiz; userid; attempt; uniqueid; layout; currentpage; \r\n \t//preview; state; timestart; timefinish; timemodified; timecheckstate; \r\n \t//sumgrades; needsupgradetonewqe; \r\n \tmobileact ma = new mobileact(info[2].trim(), info[11].trim(), \"Attempt Quiz\", info[8].trim());\r\n \tmobact.add(ma);\r\n }\r\n }\r\n br.close();\r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(null, \"read moodle log file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public static void openFile(File file) {\r\n try {\r\n System.out.println(file.toPath().toAbsolutePath());\r\n Runtime.getRuntime().exec(\"explorer /select,\" + file.toPath().toAbsolutePath());\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n }", "public CharReader( String fileName )\n throws FileNotFoundException\n {\n lineNumberReader = new LineNumberReader(\n new FileReader( fileName ) );\n this.fileName = fileName;\n }", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public InstanceReader(String filename) throws FileNotFoundException{\n this.reader = new FileReader(filename);\n }", "private DatasetFileLines load(DatasetDescription dataset, ExcelFileReader reader,\n File file) throws IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = null;\n try\n {\n int index = Integer.parseInt(excelSheet);\n lines = reader.readLines(index); // will throw exception if index is out of range\n } catch (NumberFormatException ex)\n {\n lines = reader.readLines(excelSheet);\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "public static TeaFileReader getReader(String fileFormat) {\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tif(ff.equals(fileFormat)) {\r\n\t\t\t\treturn ff.reader;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Default. Should never happen :)\r\n\t\treturn new TextReader();\r\n\t}", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "public void open(String filePath) {\n\t\tcmd = new OpenCommand(editor, filePath);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "public static BufferedReader getFileBufferReader(String fileAddress)\n\t\t\tthrows FileNotFoundException {\n\t\treturn new BufferedReader(new FileReader(fileAddress));\n\t}", "public static BufferedReader getReader(String fileName) throws IOException {\n return getReader(getPath(fileName));\n }", "public void openEditor(FileTreeNode selectedNode, VMResource resource, PostProcessHandler handler) {\n String tabId = selectedNode.getAttribute(\"UniqueId\");\n\n for (Tab tab : editorTabSet.getTabs()) {\n long ref = tab.getAttributeAsLong(\"ref\");\n if (resource.getId() == ref) {\n tabId = tab.getAttributeAsString(\"UniqueId\");\n if (tabId.contains(\"_historyEditor\")) {\n tabId = tabId.substring(0, tabId.lastIndexOf(\"_historyEditor\"));\n }\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n break;\n }\n }\n if (null == tabId || \"\".equals(tabId)) {\n tabId = HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\");\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n }\n String tabName = resource.getName();\n Tab tab = editorTabSet.getTab(tabId);\n if (tab == null) {\n tab = new Tab();\n Extension extension = ((VMFile) resource).getExtension();\n String extensionStr = ((VMFile) resource).getExtensionStr();\n tab.setTitle(getTabImgTitle(tabName, extension));\n tab.setCanClose(true);\n tab.setID(tabId);\n tab.setPrompt(tree.getParentPath(selectedNode));\n tab.setAttribute(\"ref\", resource.getId());\n tab.setAttribute(\"UniqueId\", tabId);\n tab.setAttribute(\"Extension\", extensionStr);\n tab.setAttribute(\"TabName\", tabName);\n createView(tab, (VMFile) resource, handler);\n } else {\n editorTabSet.selectTab(tabId);\n }\n }", "public void openFile(File selectedFile) {\n System.err.println(\"selected: \" + selectedFile);\n }", "public static IndexReader open(File path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "public Reader getReader(String filename) throws FileNotFoundException {\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(filename);\n\t\t\treturn new InputStreamReader(inputStream, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new IllegalStateException(\"Unable to read input\", e);\n\t\t}\n\t}", "public StreamReader(File file) {\r\n\t\tthis.setFile(file);\r\n\t}", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "private BufferedReader getBufferedReader(String filename) {\n\t\tBufferedReader retval;\n\t\ttry{\n\t\t\tretval = createReader(filename);\n\t\t\tif (retval != null) {\n\t\t\t\treturn retval;\n\t\t\t} else {\n\t\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t}\n\t\treturn null;\n\t}", "public void openFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\t if(choose.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile selectedFile = choose.getSelectedFile();\n\t\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\t\tScanner readFile = new Scanner(selectedFile);\n\t\t\t\t\tif(!frame.textArea.getText().isEmpty()) {\n\t\t\t\t\t\tframe.textArea.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t\twhile(readFile.hasNext()) {\n\t\t\t\t\t\tString currentLine = readFile.nextLine();\n\t\t\t\t\t\tframe.textArea.append(currentLine+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tframe.setTitle(selectedFile.getName()+\"-Text Editor\");\n\t\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t\t\treadFile.close();\n\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File Not Found\");\n\t\t\t\t}\n\n\t\t }\n\t}", "public ReversedLinesFileReader(File file, int blockSize, String encoding) throws IOException {\n/* 165 */ this(file, blockSize, Charsets.toCharset(encoding));\n/* */ }", "public static BufferedReader getBufferedReader(String filePath) {\r\n\r\n BufferedReader bufferedReader = null;\r\n try {\r\n bufferedReader = Files.newBufferedReader(Paths.get(filePath), Charset.defaultCharset());\r\n } catch (IOException ex) {\r\n Logger.getLogger(FileUtility.class.getName()).log(Level.SEVERE, \"Error in readLine\", ex);\r\n }\r\n return bufferedReader;\r\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "public static BufferedReader getFileBufferReader(File file)\n\t\t\tthrows FileNotFoundException {\n\t\treturn new BufferedReader(new FileReader(file));\n\t}", "public void addTab(String filename) {\n\t\t\n\t\tMinLFile nminl = new MinLFile(filename);\n\t\tJComponent panel = nminl;\n\t\t\n\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\tfilename);\t\t\n\t\ttabbedPane.setMnemonicAt(0, 0);\n\t}", "public BfReader(String filename) throws FileNotFoundException {\n\t\ttry {\n\t\t\treader = new RandomAccessFile(filename, \"r\");\n\t\t\tmarks = new Stack<>();\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new FileNotFoundException(filename);\n\t\t}\n\t}", "public void\topen(File path) throws IOException;", "public void openFile(Path file) {\n openFiles(new ArrayList<>(List.of(file)));\n }", "public void cmdRead(String filename, boolean doEcho) {\n try {\n \tfilename = getFilenameToOpen(filename);\n \t\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n // read from file, echo each line as it is read\n Readline fReadline;\n \n if (Options.quiet || !doEcho)\n\t\t\t\tfReadline = LineInput.getStreamReadline(reader, false, \"\");\n else\n\t\t\t\tfReadline = LineInput.getStreamReadline(reader, true, getRelativeFileNameOfCurrentFile() + \"> \");\n fReadlineStack.push(fReadline);\n \n } catch (FileNotFoundException e) {\n Log.error(\"File `\" + filename + \"' not found.\");\n }\n }", "private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}", "@OnThread(Tag.Swing)\n public static void openFile(File file)\n {\n try {\n if (Desktop.isDesktopSupported()) {\n Desktop desktop = Desktop.getDesktop();\n desktop.open(file);\n }\n else {\n throw new RuntimeException(\n \"Cannot open editor for the file, because the Desktop class is not supported on this platform.\");\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "@FXML\n\tpublic void openFile() {\n\t\tFileChooser openFileChooser = new FileChooser();\n\t\topenFileChooser.setInitialDirectory(userWorkspace);\n\t\topenFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\tfile = openFileChooser.showOpenDialog(ap.getScene().getWindow());\n\n\t\tuserText.clear();\n\n\t\tif (file != null) {\n\t\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\twriteToUserText();\n\t\t\t}\n\t\t}\n\t}", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public ObjReader(String filename){\n file = filename;\n }", "public TabixReader(final String filename, final String indexFileName) throws IOException {\n\t\tthis.filename = filename;\n\t\tmFp = new BlockCompressedInputStream(new File(filename));\n\t\tBlockCompressedInputStream is = new BlockCompressedInputStream(new File(filename + \".tbi\"));\n\t\ttabix = readHeader(is);\n\t\tconf = tabix.config;\n\t\tis.close();\n\t}", "public static BufferedReader getReader(Path path) throws IOException {\n return Files.newBufferedReader(path);\n }", "public void handleOpenFile (File inFile) {\n openFile (inFile);\n }", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "public void openFileInEditor(String filename) throws PartInitException{\n\t\tString path = DataManager.getCurrentPath() + slash + filename;\n\t\tajdtHandler.openFileInEditorView(path);\n\t}", "@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }", "void open(String fileName) throws IOException, ParserConfigurationException, SAXException;", "public void openFile(String file)\n\t{\n\t\tthis.file=file;\n\t\tSystem.out.println(\"file has been opened\");\n\t}", "private void openSavedTabs(){\n\t\tList<String> filenames = new ArrayList<String>();\r\n\t\tint i = 0;\t\t\r\n\t\twhile(propertiesMemento.get(\"tab\" + i) != null){\r\n\t\t\tfilenames.add((String) propertiesMemento.get(\"tab\" + i));\r\n\t\t\ti++;\t\t\t\r\n\t\t}\r\n\r\n\t\tfor(String filename: filenames){\r\n\t\t\tlogger.info(\"Looking for:\" + filename);\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\t//JOptionPane.showMessageDialog(null, \"Cannot find \" + filename, \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t// Simply ignore KIS\r\n\t\t\t\tlogger.info(\"Cannot find file \" + filename + \" so not load it as tab\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tString content = FileLoader.loadFile(filename);\r\n\t\t\t\t// If the application can't open one of the recorded tabs then drop out trying to load them.\r\n\t\t\t\tif(!openSavedTab(content)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static BufferedReader getReader(File file) throws IOException {\n return getReader(file.toPath());\n }", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "public FastaReader(String fileName) throws IOException{\n\t\tthis(new FileInputStream(fileName));\n\t}", "private void openDocumentInTab(EditableDocument doc) {\n\t\t\ttabs.getCurrentTextPane().setStyledDocument(doc.getDocument());\n\t\t}", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public Record openMainRecord()\n {\n if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null)\n return this.getRecord(BookingLine.BOOKING_LINE_FILE);\n return new BookingLine(this);\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public Instances openARFF(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\tthis.dataset = new Instances(new BufferedReader(new FileReader(path)));\n\t\t}\n\t\tcatch(IOException ex)\n\t\t{\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn this.dataset;\n\t}", "public void loadFile() {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tString filename = JOptionPane.showInputDialog(null,\"Enter the filename.\");\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\n\t\t\tMinLFile nminl = new MinLFile(filename);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\n\t\t\t\t\n\t\t\t\tnminl.CodeArea.setText(\"\");\n\t\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tDocument doc = nminl.CodeArea.getDocument();\n\t\t\t\t\ttry {\n\t\t\t\t\tdoc.insertString(doc.getLength(), str, null);\n\t\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\n\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\n\t\t\t\n\t\t\tJComponent panel = nminl;\n\t\t\t\n\t\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\t\tfilename);\t\t\n\t\t\ttabbedPane.setMnemonicAt(0, 0);\n\t\t}\t\n\t}", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}", "RandomAccessFile openInputFile(String fileName) {\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"fileName = \" + fileName);\n RandomAccessFile file = null;\n try {\n file = new RandomAccessFile(fileName, \"r\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"success: file opened for read\");\n } catch (Exception e) {\n ec.processError(e, thisClass, \"openInputFile\", \"\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"error: file opened for read\");\n } // try-catch\n return file;\n }", "public int open(String filename)\n {\n return open(filename, i_hdl); \n }", "File openFile();", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static IndexReader open(String path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }", "public void fromFile(String fileName)\n {\n //definir dados\n int i;\n int j;\n int lin;\n int col;\n String linha;\n FILE arquivo;\n\n arquivo = new FILE(FILE.INPUT, fileName);\n\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se dimensoes validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho invalido. \");\n } //end\n else\n {\n //verificar se arquivo e' valido\n if( arquivo == null )\n {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end\n else\n {\n //ler a primeira linha do arquivo\n linha = arquivo.readln();\n\n //verificar se ha' dados\n if( linha == null )\n {\n IO.println(\"ERRO: Arquivo vazio. \");\n } //end\n else\n {\n linha = arquivo.readln();\n for( i = 0; i < lin; i++)\n {\n for( j = 0; j < col; j++)\n {\n //ler linha do arquivo\n linha = arquivo.readln();\n table[ i ][ j ] = linha;\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n }", "public void openFile(@NotNull final String path) {\n openFile(fm -> fm.load(path));\n }", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "public void loadFile(File f) {\n Controller.INSTANCE.run(() -> {\n int iterations = 0;\n StringBuffer buffer = new StringBuffer();\n\n\n try (FileInputStream fis = new FileInputStream(f);\n BufferedInputStream bis = new BufferedInputStream(fis) ) {\n while ( (bis.available() > 0) && (iterations < charThreshold)) {\n iterations++;\n buffer.append((char)bis.read());\n }\n fullContent.add(buffer.toString());\n loadBlock(0);\n //System.out.println(\"Finished first set at \"+ iterations + \" iterations\");\n myEstimatedLoad = EstimatedLoad.MEDIUM;\n while (bis.available() > 0) {\n iterations = 0;\n buffer = new StringBuffer();\n while ((bis.available() > 0) && (iterations < charThreshold)) {\n iterations++;\n buffer.append((char) bis.read());\n }\n fullContent.add(buffer.toString());\n //System.out.println(\"Finished another set at \"+iterations+ \" iterations\");\n synchronized (mine) {\n if (mine.getParentEditor().isClosed())\n return Unit.INSTANCE; //check if this tab is closed. if it is, wrap up\n }\n }\n }\n catch ( Exception e ) {\n System.out.println(\"Failed to load file\");\n e.printStackTrace();\n }\n return Unit.INSTANCE;\n });\n }", "private BufferedReader getBufferedReader(final String fileName)\n throws UnsupportedEncodingException {\n InputStream configStream = Thread.currentThread().\n getContextClassLoader().getResourceAsStream(fileName);\n return new BufferedReader(new InputStreamReader(configStream, \"UTF-8\"));\n }", "public void openTab(String tabName){\r\n\r\n\t\tTabView selectedTabView = new TabView(this);\r\n\t\ttabViews.add(selectedTabView);\r\n\t\t\r\n\t\t\r\n\t\tif(tabName == null){ // If a new tab..\r\n\t\t\t// Ensure that there isn't already a model with that name\r\n\t\t\twhile(propertiesMemento.getTabNames().contains(tabName) || tabName == null){\r\n\t\t\t\ttabName = \"New Model \" + newModelIndex;\r\n\t\t\t\tnewModelIndex++;\r\n\t\t\t}\r\n\t\t}\r\n logger.info(\"Adding tab:\" + tabName);\r\n\r\n\t\t// Just resizes and doesn't scroll - so don't need the scroll pane\r\n\t\t/*JScrollPane scrollPane = new JScrollPane(selectedTabView, \r\n \t\t\t\t\t\t\t\t JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, \r\n \t\t\t\t\t\t\t\t JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.getVerticalScrollBar().setUnitIncrement(20);\r\n tabbedPane.addTab(tabName, scrollPane);*/\r\n\r\n\t\ttabbedPane.addTab(tabName, selectedTabView);\r\n\r\n currentView = selectedTabView;\r\n tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);\r\n setTabName(tabName);\r\n\t\t\t\t\r\n tabbedPane.setTabComponentAt(tabbedPane.getSelectedIndex(), \r\n\t\t\t\t new TabButtonComponent(propertiesMemento.getImageDir(), this, currentView));\r\n \r\n // Add Mouse motion Listener \r\n currentView.addMouseMotionListener(currentView);\r\n currentView.addMouseListener(currentView);\r\n\r\n // Record the tab in the memento\r\n propertiesMemento.addTabRecord(tabName);\r\n \r\n setTabButtons(true);\r\n \r\n setStatusBarText(\"Ready\");\r\n\r\n requestFocusInWindow();\r\n\t}", "public void initFromRows(String filename) throws IOException {\n long numLines = Util.getNumLinesOfFile(filename);\n if (numLines != this.numRows) {\n throw new IllegalStateException(\n String.format(\"Rows file has %d lines, expecting %d\", numLines, this.numRows)\n );\n }\n\n // Read from file\n BufferedReader br = new BufferedReader(new FileReader(filename));\n initFromRows(new FileLineIterator(br));\n br.close();\n }", "private static BufferedReader getFileContents(String path) throws FileNotFoundException{\n\t\tFile file = new File(path);\n\t\treturn new BufferedReader(new FileReader(file));\t\n\t}" ]
[ "0.70902634", "0.6382468", "0.6190194", "0.581856", "0.57619363", "0.5743366", "0.5737598", "0.5730091", "0.56345665", "0.5619399", "0.54855907", "0.54702324", "0.54468584", "0.5400529", "0.5340299", "0.53287095", "0.5281722", "0.52763504", "0.5243414", "0.522529", "0.51936376", "0.5162217", "0.5160925", "0.5132754", "0.5126933", "0.5119706", "0.51106316", "0.5101204", "0.51009977", "0.50933105", "0.50721526", "0.50624466", "0.5048231", "0.5043787", "0.50162405", "0.5003605", "0.49654847", "0.4965064", "0.49608308", "0.49598798", "0.49502477", "0.4949636", "0.4943487", "0.4929556", "0.49238878", "0.48997292", "0.48981303", "0.48855022", "0.48727837", "0.4865221", "0.48607212", "0.4851824", "0.48422402", "0.48400703", "0.4832052", "0.48260617", "0.48247698", "0.48182878", "0.4812024", "0.48113316", "0.48104843", "0.48075977", "0.48041585", "0.4800274", "0.47897732", "0.47822487", "0.47765952", "0.47740036", "0.47718626", "0.47715786", "0.47643408", "0.4760137", "0.4758167", "0.47569326", "0.47566926", "0.47558835", "0.47494766", "0.4747289", "0.47428143", "0.47319654", "0.47174358", "0.47169378", "0.47161898", "0.4705301", "0.47011715", "0.46938986", "0.4683642", "0.46834186", "0.46831903", "0.46802682", "0.46733278", "0.46681064", "0.46638992", "0.46612883", "0.46566555", "0.46406162", "0.46366742", "0.4634792", "0.46229613", "0.46227968" ]
0.70027286
1
Open a tabbedline reader for a file with a nonstandard delimiter.
public TabbedLineReader(File inFile, char delimiter) throws IOException { this.openFile(inFile, delimiter); this.readHeader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public CsvReader(String filename, String seperator) {\n\t\tthis.seperator = seperator;\n\t\treadFile(filename, true);\n\t}", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "String getLineDelimiter(int line) throws BadLocationException;", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "public NoEscapeDSVTableReader(Scanner source, char cellDelim, char rowDelim)\n {\n this.source = source;\n this.source.useDelimiter(Character.toString(rowDelim));\n this.cellDelim = Character.toString(cellDelim);\n }", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public ReversedLinesFileReader(File file, int blockSize, String encoding) throws IOException {\n/* 165 */ this(file, blockSize, Charsets.toCharset(encoding));\n/* */ }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "public static TeaFileReader getReader(String fileFormat) {\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tif(ff.equals(fileFormat)) {\r\n\t\t\t\treturn ff.reader;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Default. Should never happen :)\r\n\t\treturn new TextReader();\r\n\t}", "public Reader openReader(boolean ignoreEncodingErrors) throws IOException {\n throw new UnsupportedOperationException();\n }", "@Test(timeout=100)\r\n\tpublic void testConstructorWithFilename() throws IOException {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tString filename = file.getAbsolutePath();\r\n\t\t//System.out.println(\"test: new CSVReader(\"+filename+\")\");\r\n\t\tCSVReader csv = new CSVReader(filename);\r\n\t\tassertTrue(\"Open with filename \"+filename, csv.hasNext());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertTrue(csv.hasNext());\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertFalse(csv.hasNext());\r\n\t}", "private DatasetFileLines load(DatasetDescription dataset, ExcelFileReader reader,\n File file) throws IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = null;\n try\n {\n int index = Integer.parseInt(excelSheet);\n lines = reader.readLines(index); // will throw exception if index is out of range\n } catch (NumberFormatException ex)\n {\n lines = reader.readLines(excelSheet);\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public void testFileWithDosEol()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_dos_eol.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "public CharReader( String fileName )\n throws FileNotFoundException\n {\n lineNumberReader = new LineNumberReader(\n new FileReader( fileName ) );\n this.fileName = fileName;\n }", "public TabTokenizer(String str) {\n\t\tthis(str, FIRST_DELIMITERS,\tSECOND_DELIMITERS);\n\t}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "public static LinkedList<Patient> TSVImport(String str) {\n\t\treturn TSVImport(new File(str));\n\t}", "public ReversedLinesFileReader(File file, int blockSize, Charset encoding) throws IOException {\n/* 96 */ this.blockSize = blockSize;\n/* 97 */ this.encoding = encoding;\n/* */ \n/* */ \n/* 100 */ Charset charset = Charsets.toCharset(encoding);\n/* 101 */ CharsetEncoder charsetEncoder = charset.newEncoder();\n/* 102 */ float maxBytesPerChar = charsetEncoder.maxBytesPerChar();\n/* 103 */ if (maxBytesPerChar == 1.0F)\n/* */ \n/* 105 */ { this.byteDecrement = 1; }\n/* 106 */ else if (charset == Charsets.UTF_8)\n/* */ \n/* */ { \n/* 109 */ this.byteDecrement = 1; }\n/* 110 */ else if (charset == Charset.forName(\"Shift_JIS\") || charset == Charset.forName(\"windows-31j\") || charset == Charset.forName(\"x-windows-949\") || charset == Charset.forName(\"gbk\") || charset == Charset.forName(\"x-windows-950\"))\n/* */ \n/* */ { \n/* */ \n/* */ \n/* */ \n/* 116 */ this.byteDecrement = 1; }\n/* 117 */ else if (charset == Charsets.UTF_16BE || charset == Charsets.UTF_16LE)\n/* */ \n/* */ { \n/* 120 */ this.byteDecrement = 2; }\n/* 121 */ else { if (charset == Charsets.UTF_16) {\n/* 122 */ throw new UnsupportedEncodingException(\"For UTF-16, you need to specify the byte order (use UTF-16BE or UTF-16LE)\");\n/* */ }\n/* */ \n/* 125 */ throw new UnsupportedEncodingException(\"Encoding \" + encoding + \" is not supported yet (feel free to \" + \"submit a patch)\"); }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 130 */ this.newLineSequences = new byte[][] { \"\\r\\n\".getBytes(encoding), \"\\n\".getBytes(encoding), \"\\r\".getBytes(encoding) };\n/* */ \n/* 132 */ this.avoidNewlineSplitBufferSize = (this.newLineSequences[0]).length;\n/* */ \n/* */ \n/* 135 */ this.randomAccessFile = new RandomAccessFile(file, \"r\");\n/* 136 */ this.totalByteLength = this.randomAccessFile.length();\n/* 137 */ int lastBlockLength = (int)(this.totalByteLength % blockSize);\n/* 138 */ if (lastBlockLength > 0) {\n/* 139 */ this.totalBlockCount = this.totalByteLength / blockSize + 1L;\n/* */ } else {\n/* 141 */ this.totalBlockCount = this.totalByteLength / blockSize;\n/* 142 */ if (this.totalByteLength > 0L) {\n/* 143 */ lastBlockLength = blockSize;\n/* */ }\n/* */ } \n/* 146 */ this.currentFilePart = new FilePart(this.totalBlockCount, lastBlockLength, null);\n/* */ }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "private CSVReaderHeaderAware getCSVReader(File file)\n throws IOException {\n FileReader fileReader;\n CSVReaderHeaderAware rowReader;\n try {\n fileReader = new FileReader(file);\n try {\n rowReader = new CSVReaderHeaderAware(fileReader);\n } catch (IOException exception) {\n System.out.println(\"IO ERROR ON CSV READ\");\n throw exception;\n }\n } catch (FileNotFoundException exception) {\n System.out.println(\"CSV FILE NOT FOUND\");\n throw exception;\n }\n return rowReader;\n }", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "public void initFromRows(String filename) throws IOException {\n long numLines = Util.getNumLinesOfFile(filename);\n if (numLines != this.numRows) {\n throw new IllegalStateException(\n String.format(\"Rows file has %d lines, expecting %d\", numLines, this.numRows)\n );\n }\n\n // Read from file\n BufferedReader br = new BufferedReader(new FileReader(filename));\n initFromRows(new FileLineIterator(br));\n br.close();\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "StreamReader underlyingReader();", "public void setDefaultExtractLineSeparator (String linesep);", "protected void handleReaderImport(Reader in, JTextComponent c, boolean useRead)\n throws BadLocationException, IOException {\n if (useRead) {\n int startPosition = c.getSelectionStart();\n int endPosition = c.getSelectionEnd();\n int length = endPosition - startPosition;\n EditorKit kit = c.getUI().getEditorKit(c);\n Document doc = c.getDocument();\n if (length > 0) {\n doc.remove(startPosition, length);\n }\n kit.read(in, doc, startPosition);\n } else {\n char[] buff = new char[1024];\n int nch;\n boolean lastWasCR = false;\n int last;\n StringBuilder sbuff = null;\n\n // Read in a block at a time, mapping \\r\\n to \\n, as well as single\n // \\r to \\n.\n while ((nch = in.read(buff, 0, buff.length)) != -1) {\n if (sbuff == null) {\n sbuff = new StringBuilder(nch);\n }\n last = 0;\n for(int counter = 0; counter < nch; counter++) {\n switch(buff[counter]) {\n case '\\r':\n if (lastWasCR) {\n if (counter == 0) {\n sbuff.append('\\n');\n } else {\n buff[counter - 1] = '\\n';\n }\n } else {\n lastWasCR = true;\n }\n break;\n case '\\n':\n if (lastWasCR) {\n if (counter > (last + 1)) {\n sbuff.append(buff, last, counter - last - 1);\n }\n // else nothing to do, can skip \\r, next write will\n // write \\n\n lastWasCR = false;\n last = counter;\n }\n break;\n default:\n if (lastWasCR) {\n if (counter == 0) {\n sbuff.append('\\n');\n } else {\n buff[counter - 1] = '\\n';\n }\n lastWasCR = false;\n }\n break;\n }\n }\n if (last < nch) {\n if (lastWasCR) {\n if (last < (nch - 1)) {\n sbuff.append(buff, last, nch - last - 1);\n }\n } else {\n sbuff.append(buff, last, nch - last);\n }\n }\n }\n if (lastWasCR) {\n sbuff.append('\\n');\n }\n c.replaceSelection(sbuff != null ? sbuff.toString() : \"\");\n }\n }", "public WhitespaceTokenizer(Reader r)\n/* */ {\n/* 88 */ this(r, false);\n/* */ }", "@Override\n\t\tpublic RecordReader<LongWritable, Text> getRecordReader(\n\t\t\t\tInputSplit genericSplit, JobConf job, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\treporter.setStatus(genericSplit.toString());\n\t\t\treturn new MyRecordReader(job, (FileSplit) genericSplit);\n\t\t}", "public abstract char getCustomDelimiter();", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "@Test\n public void givenStateCensusAnalyserFile_WhenImproperDelimiter_ReturnsException() {\n\n String CSV_FILE_PATH = \"src/test/resources/StateCensusData.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "public void testFileWithEmptyLines()\n {\n try {\n SalesFile t = new SalesFile(\"samples/data/in/base_with_empty_lines.dat\", AppConfig.fieldDelimiter);\n t.read();\n assertEquals(t.getTotalSalesman(), 2);\n assertEquals(t.getTotalCustomers(), 2);\n assertEquals(t.getMostExpensiveSaleId(), \"10\");\n assertEquals(t.getWorstSalesman(), \"Renato\");\n } catch(RecordInvalidTokenException ex) {\n assertTrue(\"This file is well formed, but something is wrong!\", false);\n } catch(FileNotFoundException e) {\n assertTrue(\"File must exist to complete the test!\", false);\n } catch(IOException e) {\n assertTrue(\"IO exception!\", false);\n }\n }", "public SqlFileParser(String filename) {\n try {\n this.reader = new BufferedReader(new FileReader(filename));\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"file not found \" + filename);\n }\n }", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public abstract T readDataFile(String fileLine);", "protected DatasetFileLines load(final DatasetDescription dataset, final CsvReader reader,\n final File file) throws ParserException, ParsingException, IllegalArgumentException,\n IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = new ArrayList<String[]>();\n while (reader.readRecord())\n {\n lines.add(reader.getValues());\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "static CsvParser getCsvParser(){\n CsvParserSettings settings = new CsvParserSettings();\n settings.getFormat().setLineSeparator(\"\\n\");\n return new CsvParser(settings);\n }", "public JackTokenizer(File inputFile, FileReader freader){\r\n\t\tfile = inputFile;\r\n\t\treader = freader;\r\n\t\tclassdot = false;\r\n\t\tdotSymbol = false;\r\n\t\tclassdot_Str=null;\r\n\t\tisSymbol = false;\r\n\t\tinit();\r\n\t\t//advanceToNextCommand();\r\n\t}", "public InputReader() throws FileNotFoundException, TransformerConfigurationException {\n this.csvlocation = System.getProperty(Static.SYSYEM_PROPERTY_FILE);\n this.templatelocation = System.getProperty(Static.SYSTEM_PROPERTY_TEMPLATE_FILE);\n init();\n }", "public TextfileReader() throws IOException {\n getText();\n }", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "protected abstract Operation parseLine(File baseDir, String line, int lineNum) throws IOException;", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "@Test(timeout=100)\r\n\tpublic void testSetDelimiter() {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\tString [] r3 = {\"Obama\",\"1 Pennsylvania Ave\",\"[email protected]\"};\r\n\t\t// default delimiter\r\n\t\twriteArrayToLine(r1);\r\n\t\t// change delimiter\r\n\t\tdelim = ':';\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tcsv.setDelimiter(delim);\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t}", "public TabTokenizer(String str, String firstDelimiters) {\n\t\tthis(str, firstDelimiters,\tSECOND_DELIMITERS);\n\t}", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader( getInstream() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public NewTextLineCodecFactory(String charset,String encodingDelimiter, String decodingDelimiter){\n\t\tsuper(Charset.forName(charset),encodingDelimiter,decodingDelimiter);\n\t}", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "public ReversedLinesFileReader(File file, Charset charset) throws IOException {\n/* 78 */ this(file, 4096, charset);\n/* */ }", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test023() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"\\r\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 43, 43);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n // Undeclared exception!\n try { \n javaParserTokenManager0.getNextToken();\n fail(\"Expecting exception: Error\");\n \n } catch(Error e) {\n //\n // Lexical error at line 43, column 44. Encountered: \\\"\\\\r\\\" (13), after : \\\"\\\\\\\"\\\"\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.JavaParserTokenManager\", e);\n }\n }", "private LineTokenizer createIdentityCard2LineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer.setNames(new String[] { \"IdCard2Id\", \"IdCard2Number\", \"IdCard2Type\",\"IdCard2HolderName\",\"IdCard2IssuedOn\",\"IdCard2IssuedBy\",\"IdCard2expDate\",\"IdCard2addressId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "TokenReader reader(TokenType tokenType);", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "PTB2TextLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}", "public CSVReader(String filename) {\r\n try {\r\n File inFile = new File(filename);\r\n Scanner scanner = new Scanner(inFile);\r\n boolean hasNumberOfCountries = false;\r\n boolean hasYearLabels = false;\r\n while (scanner.hasNextLine()) {\r\n String nextLine = scanner.nextLine();\r\n if (nextLine.startsWith(\"Number of countries\")) {\r\n int numberOfCountries = Integer.parseInt(nextLine.split(\",\")[1]);\r\n countryNames = new String[numberOfCountries];\r\n cellularDataTable = new double[numberOfCountries][];\r\n countryIndex = 0;\r\n hasNumberOfCountries = true;\r\n continue;\r\n }\r\n if (nextLine.startsWith(\"Country Name\")) {\r\n parseYearLabels(nextLine);\r\n hasYearLabels = true;\r\n continue;\r\n }\r\n if (hasNumberOfCountries && hasYearLabels) {\r\n // if both number of countries and year labels are found, proceed to parse data\r\n if (!nextLine.isEmpty()) {\r\n parseCountryData(nextLine);\r\n }\r\n }\r\n }\r\n if (!hasNumberOfCountries || !hasYearLabels) {\r\n System.out.println(\"Invalid file: missing Number of countries or Year labels, exiting program\");\r\n System.exit(0);\r\n }\r\n scanner.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"File \" + filename + \" not found, exiting program\");\r\n System.exit(0);\r\n }\r\n }", "public TxtReader() {\n numberOfCharacters = getNumberOfCharacters();\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public abstract String getLine(int lineNumber);", "@Test\n public void givenStateCode_WhenImproperDelimiter_ReturnExceptionFileNotFound() {\n String CSV_FILE_PATH = \"src/test/resources/StateCode.csv\";\n try {\n indianCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.INDIA, CSV_FILE_PATH);\n } catch (CSVBuilderException e) {\n Assert.assertEquals(CSVBuilderException.TypeOfException.INCORRECT_DELIMITER_HEADER_EXCEPTION, e.typeOfException);\n }\n }", "public void newst()\r\n\t{\r\n\t\ttry {\r\n\t\t\tst = new StringTokenizer(file.readLine());\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public NodeKind getKind() {\n return NodeKind.LINE_TERMINATOR;\n }", "public String getDefaultExtractLineSeparator ();", "public void setDefaultSourceLineSeparator (String linesep);", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "@Override\n public RecordReader<NullWritable, Text> createRecordReader(\n InputSplit split, TaskAttemptContext context) throws IOException {\n\n if (!(split instanceof CombineFileSplit)) {\n throw new IllegalArgumentException(\"split must be a CombineFileSplit\");\n }\n return new CombineFileRecordReader<NullWritable, Text>((CombineFileSplit) split, context, WholeFileRecordReader.class);\n }", "@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "@Test\n\tpublic void testUTF8WithoutBom() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_NO_BOM_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "public BibFileFormatter(String indent) {\n this.indent = indent;\n }", "public TreeItem(BufferedReader br) throws DataFormatException, IOException {\n\t\tsuper(br);\n\t}" ]
[ "0.65788555", "0.6575059", "0.63933074", "0.6383264", "0.6275157", "0.6151454", "0.6042806", "0.58825815", "0.58140767", "0.57127666", "0.570155", "0.55510163", "0.54593956", "0.5451066", "0.54155546", "0.5319303", "0.5272515", "0.524926", "0.5226897", "0.5199907", "0.51266396", "0.512116", "0.50569266", "0.49672863", "0.49513635", "0.48958468", "0.4876884", "0.48448575", "0.48268324", "0.4825833", "0.48162934", "0.48065946", "0.4747775", "0.47098067", "0.47082546", "0.4683192", "0.467917", "0.467681", "0.46681464", "0.4634773", "0.46251106", "0.46179447", "0.46084762", "0.4605141", "0.46013808", "0.45987976", "0.4597789", "0.45957416", "0.45939168", "0.45884073", "0.45868728", "0.4581424", "0.45809036", "0.45780393", "0.4559086", "0.45508254", "0.45444575", "0.45414907", "0.45368135", "0.45211095", "0.45193958", "0.4518582", "0.45110402", "0.45091888", "0.450371", "0.44964537", "0.4480125", "0.44800904", "0.44796705", "0.44746816", "0.44670784", "0.44620755", "0.4460437", "0.4458024", "0.4427048", "0.44265923", "0.44229427", "0.442159", "0.44201764", "0.44150937", "0.43984848", "0.4396563", "0.43903303", "0.43899527", "0.43887147", "0.4383045", "0.43807247", "0.4377243", "0.43642294", "0.43574262", "0.43458375", "0.43447912", "0.43441743", "0.43421698", "0.4330797", "0.43276364", "0.43251315", "0.4321156", "0.43193907", "0.43187168" ]
0.6613241
0
Open a file for tabbed line reading.
private void openFile(File inFile, char delimiter) throws IOException { this.delim = delimiter; this.stream = new FileInputStream(inFile); this.reader = new LineReader(this.stream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public static void openFile(File file) {\r\n try {\r\n System.out.println(file.toPath().toAbsolutePath());\r\n Runtime.getRuntime().exec(\"explorer /select,\" + file.toPath().toAbsolutePath());\r\n } catch (IOException ex) {\r\n System.out.println(ex);\r\n }\r\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public FileTableEntry open(String filename, String mode)\n\t{\n\t\tFileTableEntry ftEnt = filetable.falloc(filename, mode);\n\n\t\t//checking mode for writing\n\t\tif (ftEnt != null) {\n\t\t\tif (mode.equals(\"w\")) {\n\t\t\t\tif(!deallocAllBlocks(ftEnt)) {\n\t\t\t\t\tftEnt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (mode.equals(\"a\")) {\n\t\t\t\tftEnt.seekPtr = ftEnt.inode.length;\n\t\t\t}\n\t\t}\n\t\treturn ftEnt;\n\t}", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "CompletableFuture<Optional<FutureLineStorage>> open(String fileName);", "public void openFile(File selectedFile) {\n System.err.println(\"selected: \" + selectedFile);\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "public void readtabs(File f) {\r\n \tString str = new String();\r\n try{\r\n BufferedReader br = new BufferedReader(new FileReader(f.getAbsolutePath()));\r\n str = br.readLine();\r\n \r\n while((str = br.readLine()) != null){\r\n //str = str.replaceAll(\";\", \"\");\r\n String info[] = str.split(\";\");\r\n if(f.getName().equals(\"mdl_chat_messages.txt\")){\r\n \t//chat message id; chatid; userid; groupid; system; message; timestamp;\r\n \tmobileact ma = new mobileact(info[2].trim(), info[6].trim(), \"Chat Message\", info[5]);\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_forum_posts.txt\")){\r\n \t//id; discussion; parent; userid; created; modified; mailed; subject; message; \r\n \t//messageformat; messagetrust; attachment; totalscore; mailnow; \r\n \tmobileact ma = new mobileact(info[3].trim(), info[5].trim(), \"Forum Posts\", info[8].trim());\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_quiz_attempts.txt\")){\r\n \t//id; quiz; userid; attempt; uniqueid; layout; currentpage; \r\n \t//preview; state; timestart; timefinish; timemodified; timecheckstate; \r\n \t//sumgrades; needsupgradetonewqe; \r\n \tmobileact ma = new mobileact(info[2].trim(), info[11].trim(), \"Attempt Quiz\", info[8].trim());\r\n \tmobact.add(ma);\r\n }\r\n }\r\n br.close();\r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(null, \"read moodle log file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public void openFile(Path file) {\n openFiles(new ArrayList<>(List.of(file)));\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "@OnThread(Tag.Swing)\n public static void openFile(File file)\n {\n try {\n if (Desktop.isDesktopSupported()) {\n Desktop desktop = Desktop.getDesktop();\n desktop.open(file);\n }\n else {\n throw new RuntimeException(\n \"Cannot open editor for the file, because the Desktop class is not supported on this platform.\");\n }\n }\n catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public abstract void open(BufferedReader br) throws IOException;", "public static void readLargeFileByLine(File file) throws IOException {\n\n try (LineIterator it = FileUtils.lineIterator(file, \"UTF-8\")) {\n while (it.hasNext()) {\n String line = it.nextLine();\n // do something with line\n }\n }\n }", "void open(String fileName);", "public void openFile(String file)\n\t{\n\t\tthis.file=file;\n\t\tSystem.out.println(\"file has been opened\");\n\t}", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@FXML\n\tpublic void openFile() {\n\t\tFileChooser openFileChooser = new FileChooser();\n\t\topenFileChooser.setInitialDirectory(userWorkspace);\n\t\topenFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\tfile = openFileChooser.showOpenDialog(ap.getScene().getWindow());\n\n\t\tuserText.clear();\n\n\t\tif (file != null) {\n\t\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\twriteToUserText();\n\t\t\t}\n\t\t}\n\t}", "public void\topen(File path) throws IOException;", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public static void addLines(File f) throws Exception\n {\n PrintStream out = new PrintStream(\"temp_2.txt\");\n BufferedReader b = new BufferedReader(new FileReader(f));\n\n int length = -1;\n while(b.ready())\n {\n String line = b.readLine();\n if(line.endsWith(\"\\t\")) {\n out.println(line + \"0\");\n length = line.split(\"\\t\").length;\n }\n else {\n length = line.split(\"\\t\").length+1;\n out.println(line + \"\\t0\");\n }\n }\n for(int i = 0; i < length;i++)\n {\n if(i==length-1)\n out.println(\"0\");\n else\n out.print(\"0\\t\");\n }\n out.flush();\n out.close();\n b.close();\n }", "public void open() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfc.showOpenDialog(null);\n\t\ttry {\n\t\t\tfr = new FileReader(fc.getSelectedFile().getAbsolutePath());\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t//make sure textArea is empty\n\t\t\ttextArea.setText(\"\");\n\t\t\t//loop to read all lines in file\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\ttextArea.append(br.readLine() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public void open (File file)\n\t{\n\t\topen (file, false);\n\t}", "public CharReader( String fileName )\n throws FileNotFoundException\n {\n lineNumberReader = new LineNumberReader(\n new FileReader( fileName ) );\n this.fileName = fileName;\n }", "public void open(String filePath) {\n\t\tcmd = new OpenCommand(editor, filePath);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public void fromFile(String fileName)\n {\n //definir dados\n int i;\n int j;\n int lin;\n int col;\n String linha;\n FILE arquivo;\n\n arquivo = new FILE(FILE.INPUT, fileName);\n\n //obter dimensoes\n lin = lines();\n col = columns();\n\n //verificar se dimensoes validas\n if( lin <= 0 || col <= 0 )\n {\n IO.println(\"ERRO: Tamanho invalido. \");\n } //end\n else\n {\n //verificar se arquivo e' valido\n if( arquivo == null )\n {\n IO.println(\"ERRO: Arquivo invalido. \");\n } //end\n else\n {\n //ler a primeira linha do arquivo\n linha = arquivo.readln();\n\n //verificar se ha' dados\n if( linha == null )\n {\n IO.println(\"ERRO: Arquivo vazio. \");\n } //end\n else\n {\n linha = arquivo.readln();\n for( i = 0; i < lin; i++)\n {\n for( j = 0; j < col; j++)\n {\n //ler linha do arquivo\n linha = arquivo.readln();\n table[ i ][ j ] = linha;\n } //end repetir\n } //end repetir\n //fechar arquivo (indispensavel)\n arquivo.close();\n } //end se\n } //end se\n } //end se\n }", "public void addTab(String filename) {\n\t\t\n\t\tMinLFile nminl = new MinLFile(filename);\n\t\tJComponent panel = nminl;\n\t\t\n\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\tfilename);\t\t\n\t\ttabbedPane.setMnemonicAt(0, 0);\n\t}", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "public Tab createOpenEditorTab(long fileId, boolean useSearch) {\n Tab retTab = new Tab();\n long ref = 0;\n StringBuilder tabId = new StringBuilder();\n for (Tab tab : editorTabSet.getTabs()) {\n if (tab.getAttributeAsLong(\"ref\") == fileId) {\n ref = tab.getAttributeAsLong(\"ref\");\n tabId.append(tab.getAttributeAsString(\"UniqueId\"));\n editorTabSet.selectTab(tabId.toString());\n if (useSearch) {\n search.selectSearchResultModel(tab);\n return null;\n } else {\n return tab;\n }\n }\n }\n\n if (ref == 0) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result == null) {\n SC.warn(\"File not found.\");\n return;\n }\n\n tabId.append(HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\"));\n String tabName = result.getName();\n retTab.setTitle(getTabImgTitle(tabName, result.getExtension()));\n retTab.setCanClose(true);\n retTab.setID(tabId.toString());\n String path = result.getFullPath().replaceAll(\"(.*)/\" + result.getName() + \"\\\\.\" + result.getExtensionStr() + \"$\", \"$1\");\n retTab.setPrompt(path);\n retTab.setPane(new Layout());\n retTab.setAttribute(\"ref\", fileId);\n retTab.setAttribute(\"UniqueId\", tabId.toString());\n retTab.setAttribute(\"Extension\", result.getExtension().getValue());\n retTab.setAttribute(\"TabName\", tabName);\n createView(retTab, result, new PostProcessHandler() {\n @Override\n public void execute() {\n if (useSearch) {\n search.selectSearchResultModel(retTab);\n }\n }\n });\n }\n });\n return retTab;\n }\n return retTab;\n }", "public void open(String file) {\n try {\n Desktop.getDesktop().open(new File(file));\n } catch (IOException error) {\n System.err.println(error.getMessage());\n }\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public ParcelFileDescriptor open(File file) {\n return ParcelFileDescriptor.open(file, 268435456);\n }", "public void openFile() {\n\t\tJFileChooser choose = new JFileChooser();\n\t\t if(choose.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile selectedFile = choose.getSelectedFile();\n\t\t\t\t\tdir=choose.getCurrentDirectory().toString();\n\t\t\t\t\tScanner readFile = new Scanner(selectedFile);\n\t\t\t\t\tif(!frame.textArea.getText().isEmpty()) {\n\t\t\t\t\t\tframe.textArea.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t\twhile(readFile.hasNext()) {\n\t\t\t\t\t\tString currentLine = readFile.nextLine();\n\t\t\t\t\t\tframe.textArea.append(currentLine+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tframe.setTitle(selectedFile.getName()+\"-Text Editor\");\n\t\t\t\t\tframe.originalText=frame.textArea.getText();\n\t\t\t\t\treadFile.close();\n\t\t\t\t} catch (FileNotFoundException ex) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File Not Found\");\n\t\t\t\t}\n\n\t\t }\n\t}", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\n\t\t\t\t\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static List<Polyomino> openFile() {\n \tString basePath = new File(\"\").getAbsolutePath();\n Path path = Paths.get(basePath, \"polyominoesINF421.txt\");\n Charset charset = Charset.forName(\"UTF-8\");\n List<Polyomino> polyominos = new LinkedList<Polyomino>();\n\t\ttry {\n\t\t\tList<String> lines = Files.readAllLines(path, charset);\n\t\t\tfor (String line : lines) {\n\t\t\t\tpolyominos.add(new Polyomino(line));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n return polyominos;\n }", "public void loadFile(File f) {\n Controller.INSTANCE.run(() -> {\n int iterations = 0;\n StringBuffer buffer = new StringBuffer();\n\n\n try (FileInputStream fis = new FileInputStream(f);\n BufferedInputStream bis = new BufferedInputStream(fis) ) {\n while ( (bis.available() > 0) && (iterations < charThreshold)) {\n iterations++;\n buffer.append((char)bis.read());\n }\n fullContent.add(buffer.toString());\n loadBlock(0);\n //System.out.println(\"Finished first set at \"+ iterations + \" iterations\");\n myEstimatedLoad = EstimatedLoad.MEDIUM;\n while (bis.available() > 0) {\n iterations = 0;\n buffer = new StringBuffer();\n while ((bis.available() > 0) && (iterations < charThreshold)) {\n iterations++;\n buffer.append((char) bis.read());\n }\n fullContent.add(buffer.toString());\n //System.out.println(\"Finished another set at \"+iterations+ \" iterations\");\n synchronized (mine) {\n if (mine.getParentEditor().isClosed())\n return Unit.INSTANCE; //check if this tab is closed. if it is, wrap up\n }\n }\n }\n catch ( Exception e ) {\n System.out.println(\"Failed to load file\");\n e.printStackTrace();\n }\n return Unit.INSTANCE;\n });\n }", "void openFile() {\n\t\tJFileChooser fileChooser = new JFileChooser(desktopPath);\n\t\tint returnVal = fileChooser.showOpenDialog(null);\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n \tString filePath = fileChooser.getSelectedFile().getPath();\n File file = new File(filePath);\n textEditor.setText(\"\");\n try {\n \tScanner in = new Scanner(file);\n \twhile(in.hasNextLine()) {\n \t\ttextEditor.append(in.nextLine()+'\\n');\n \t}\n \tin.close();\n \ttextAreaChanged = false;\n \tsavedFilePath = filePath;\n } catch (Exception ex) {\n \terrorTextArea.setForeground(Color.RED);\n\t\t\t\terrorTextArea.setText(\"Error loding file\");\n\t\t\t}\n }\n\t}", "private void openSavedTabs(){\n\t\tList<String> filenames = new ArrayList<String>();\r\n\t\tint i = 0;\t\t\r\n\t\twhile(propertiesMemento.get(\"tab\" + i) != null){\r\n\t\t\tfilenames.add((String) propertiesMemento.get(\"tab\" + i));\r\n\t\t\ti++;\t\t\t\r\n\t\t}\r\n\r\n\t\tfor(String filename: filenames){\r\n\t\t\tlogger.info(\"Looking for:\" + filename);\r\n\t\t\tFile file = new File(filename);\r\n\t\t\tif(!file.exists()){\r\n\t\t\t\t//JOptionPane.showMessageDialog(null, \"Cannot find \" + filename, \"Warning\", JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t// Simply ignore KIS\r\n\t\t\t\tlogger.info(\"Cannot find file \" + filename + \" so not load it as tab\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tString content = FileLoader.loadFile(filename);\r\n\t\t\t\t// If the application can't open one of the recorded tabs then drop out trying to load them.\r\n\t\t\t\tif(!openSavedTab(content)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "public void handleOpenFile (File inFile) {\n openFile (inFile);\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "public void openFile(@NotNull final String path) {\n openFile(fm -> fm.load(path));\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "File openFile();", "@Test\n public void testGetLine()\n {\n System.out.println(\"getLine\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n final Token next = token.getNext();\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n assertEquals(\"{\", next.getValue());\n }", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "public static void openFile(File file) throws IOException {\n\n\t\tif (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.OPEN))\n\t\t\tDesktop.getDesktop().open(file);\n\t}", "public int open(String filename)\n {\n return open(filename, i_hdl); \n }", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "public static BufferedReader getFileBufferReader(File file)\n\t\t\tthrows FileNotFoundException {\n\t\treturn new BufferedReader(new FileReader(file));\n\t}", "public void readFile(String file) throws FileNotFoundException {\n\t\tsc = new Scanner(new File(file));\n\t\tString firstLine = sc.nextLine();\n\t\tString [] breakFirstLine = firstLine.split(\" \");\n\t\tvillages = Integer.parseInt(breakFirstLine[0]);\n\t\tlines = Integer.parseInt(breakFirstLine[1]);\n\t\tSystem.out.println(\"villages: \" + villages + \"\\nlines: \" + lines);\n\t\tString line = \"\"; // current line\n\t\twhile(sc.hasNextLine()) { \n\t\t\tline = sc.nextLine();\n\t\t\tSystem.out.println(line);\n\t\t\tString[] breaks = line.split(\" \");\n\t\t\tString city1 = breaks[0];\n\t\t\tString city2 = breaks[1];\n\t\t\tString col = breaks[2];\n\t\t\tcolor = color(col);\n\t\t\tString route = breaks[3];\n\t\t\ttransit = transit(route);\n\t\t\tVillage a = new Village(city1);\n\t\t\tVillage b = new Village(city2);\n\t\t\t\n\t\t\tEdge e = new Edge(a, b, transit, color);\n\t\t\ta.addEdge(e);\n\t\t\tb.addEdge(e);\n\t\t\tg.addEdge(e);\n\t\t\t\n\t\t\tvertices.add(a);\n\t\t\tlast_transit = transit;\n\t\t\tlast_color = color;\n\t\t}\n\t}", "public void open (File file, boolean suppressStyling)\n\t{\n\t\tthis.file = file;\n\t\tif (editor.open (file, suppressStyling))\n\t\t\tgetRootPane().putClientProperty (\"Window.documentFile\", file);\n\t\telse this.file = null;\n\t\teditor.grabFocus();\n\t\tmodel = null;\n\t\tupdate();\n\t}", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "private void openDocumentInTab(EditableDocument doc) {\n\t\t\ttabs.getCurrentTextPane().setStyledDocument(doc.getDocument());\n\t\t}", "public static BufferedReader getFileBufferReader(String fileAddress)\n\t\t\tthrows FileNotFoundException {\n\t\treturn new BufferedReader(new FileReader(fileAddress));\n\t}", "private DatasetFileLines load(DatasetDescription dataset, ExcelFileReader reader,\n File file) throws IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = null;\n try\n {\n int index = Integer.parseInt(excelSheet);\n lines = reader.readLines(index); // will throw exception if index is out of range\n } catch (NumberFormatException ex)\n {\n lines = reader.readLines(excelSheet);\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "@FXML\n private void openFile() {\n try {\n \tFile file = new File(filmTable.getSelectionModel().getSelectedItem().getLocation());\n desktop.open(file);\n } catch (IOException ex) {\n \tex.printStackTrace();\n }\n }", "@Override\n public void open(File file)\n {\n MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();\n if (!mim.addMaze(file))\n JOptionPane.showMessageDialog(this, \"<html>Unable to load \" +\n \"<br />\" +\n file.getAbsolutePath() +\n \"</html\", \"Maze Open Error\", JOptionPane.ERROR_MESSAGE);\n\n }", "public boolean openFile(final File file)\n {\n BufferedReader bufferedReader = null;\n\n try\n {\n bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n final StringBuilder stringBuilder = new StringBuilder();\n String line = bufferedReader.readLine();\n\n while(line != null)\n {\n stringBuilder.append(line);\n line = bufferedReader.readLine();\n\n if(line != null)\n {\n stringBuilder.append('\\n');\n }\n }\n\n this.componentEditor.setText(stringBuilder.toString());\n this.currentFile = file;\n this.preferences.setValue(CompilerEditorPanel.PREFERENCE_LAST_FILE, this.currentFile);\n this.preferences.setValue(CompilerEditorPanel.PREFERENCE_LAST_DIRECTORY, this.currentFile.getParentFile());\n this.fileChooser.setStartDirectory(this.currentFile.getParentFile());\n this.title.setText(UtilText.concatenate(\"--\", this.currentFile.getAbsolutePath(), \"--\"));\n return true;\n }\n catch(final Exception exception)\n {\n Debug.printException(exception, \"Failed to load : \" + file.getAbsolutePath());\n this.printMessage(UtilText.concatenate(\"Failed to load file at :\\n\", file.getAbsolutePath(), \"\\nBecause :\\n\", UtilEditor.extractMessage(exception)));\n return false;\n }\n finally\n {\n if(bufferedReader != null)\n {\n try\n {\n bufferedReader.close();\n }\n catch(final Exception ignored)\n {\n }\n }\n }\n }", "private String fileReadOneLine(String fname) {\n BufferedReader br;\n String line = null;\n\n try {\n br = new BufferedReader(new FileReader(fname), 512);\n try {\n line = br.readLine();\n } finally {\n br.close();\n }\n } catch (Exception e) {\n Log.e(TAG, \"Exception when reading /sys/* file\", e);\n }\n return line;\n }", "public void initFromRows(String filename) throws IOException {\n long numLines = Util.getNumLinesOfFile(filename);\n if (numLines != this.numRows) {\n throw new IllegalStateException(\n String.format(\"Rows file has %d lines, expecting %d\", numLines, this.numRows)\n );\n }\n\n // Read from file\n BufferedReader br = new BufferedReader(new FileReader(filename));\n initFromRows(new FileLineIterator(br));\n br.close();\n }", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "public void openTab(String tabName){\r\n\r\n\t\tTabView selectedTabView = new TabView(this);\r\n\t\ttabViews.add(selectedTabView);\r\n\t\t\r\n\t\t\r\n\t\tif(tabName == null){ // If a new tab..\r\n\t\t\t// Ensure that there isn't already a model with that name\r\n\t\t\twhile(propertiesMemento.getTabNames().contains(tabName) || tabName == null){\r\n\t\t\t\ttabName = \"New Model \" + newModelIndex;\r\n\t\t\t\tnewModelIndex++;\r\n\t\t\t}\r\n\t\t}\r\n logger.info(\"Adding tab:\" + tabName);\r\n\r\n\t\t// Just resizes and doesn't scroll - so don't need the scroll pane\r\n\t\t/*JScrollPane scrollPane = new JScrollPane(selectedTabView, \r\n \t\t\t\t\t\t\t\t JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, \r\n \t\t\t\t\t\t\t\t JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.getVerticalScrollBar().setUnitIncrement(20);\r\n tabbedPane.addTab(tabName, scrollPane);*/\r\n\r\n\t\ttabbedPane.addTab(tabName, selectedTabView);\r\n\r\n currentView = selectedTabView;\r\n tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);\r\n setTabName(tabName);\r\n\t\t\t\t\r\n tabbedPane.setTabComponentAt(tabbedPane.getSelectedIndex(), \r\n\t\t\t\t new TabButtonComponent(propertiesMemento.getImageDir(), this, currentView));\r\n \r\n // Add Mouse motion Listener \r\n currentView.addMouseMotionListener(currentView);\r\n currentView.addMouseListener(currentView);\r\n\r\n // Record the tab in the memento\r\n propertiesMemento.addTabRecord(tabName);\r\n \r\n setTabButtons(true);\r\n \r\n setStatusBarText(\"Ready\");\r\n\r\n requestFocusInWindow();\r\n\t}", "public static IndexReader open(File path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }", "void open(String fileName) throws IOException, ParserConfigurationException, SAXException;", "public abstract String getLine(int lineNumber);", "public ReversedLinesFileReader(File file, Charset charset) throws IOException {\n/* 78 */ this(file, 4096, charset);\n/* */ }", "public static LineMatcher createFileLineMatcher(Path path) {\n return new LineMatcher(LineReader.createFileLineReader(path));\n }", "public Record openMainRecord()\n {\n if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null)\n return this.getRecord(BookingLine.BOOKING_LINE_FILE);\n return new BookingLine(this);\n }", "public static void open() {\n JFileChooser fileChooser;\n String fileContent;\n String path = FileLoader.loadFile(\"path.txt\");\n if (path != null) {\n fileChooser = new JFileChooser(path);\n } else {\n fileChooser = new JFileChooser((FileSystemView.getFileSystemView().getHomeDirectory()));\n }\n\n fileChooser.setDialogTitle(\"Select text file\");\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"Text files\",\"mytxt\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setAcceptAllFileFilterUsed(true);\n\n if (fileChooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n path = fileChooser.getSelectedFile().getParent();\n FileLoader.saveFile(\"path.txt\", path, false);\n fileContent = FileLoader.loadFile(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.setFileName(fileChooser.getSelectedFile().getAbsolutePath());\n TextEditor.getTextArea().setText(fileContent);\n }\n }", "private void createSingleTab(String text, Path path) {\r\n\t\tif (text == null) {\r\n\t\t\ttext = \"\";\r\n\t\t}\r\n\t\t\r\n\t\tJTextArea txtArea = new JTextArea(text);\r\n\t\ttxtArea.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprivate void changeIcon() {\r\n\t\t\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), redIcon);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtArea.addCaretListener(new CaretListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void caretUpdate(CaretEvent e) {\r\n\t\t\t\tlengthLab.setText(\"Length: \"+txtArea.getText().length());\r\n\t\t\t\t\r\n\t\t\t\tint offset = txtArea.getCaretPosition();\r\n\t int line= 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tline = txtArea.getLineOfOffset(offset);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tlnLab.setText(\"Ln: \"+(line+1));\r\n\t\t\t\t\r\n\t\t\t\tint col = 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcol = offset - txtArea.getLineStartOffset(line);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tcolLab.setText(\"Col: \"+ (col+1));\r\n\t\t\t\t\r\n\t\t\t\tint sel = Math.abs(txtArea.getSelectionStart() - txtArea.getSelectionEnd());\t\r\n\t\t\t\tselLab.setText(\"sel: \"+sel);\r\n\t\t\t\tfor (JMenuItem i : toggable) {\r\n\t\t\t\t\tboolean enabled;\r\n\t\t\t\t\tenabled = sel != 0;\r\n\t\t\t\t\ti.setEnabled(enabled);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJScrollPane scrPane = new JScrollPane(txtArea);\r\n\t\tif (path == null) {\t//create empty tab\t\r\n\t\t\tString name = \"New \" + (count +1);\r\n\t\t\ttabbedPane.addTab(name, greenIcon, scrPane, \"\");\r\n\t\t\tcount++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttabbedPane.addTab(path.getFileName().toString(), greenIcon, scrPane, path.toString());\r\n\t\tcount++;\r\n\t}", "public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}", "public void printFileOnconsole(File file, int tabs,int lenghtOfDirectory) throws DirectoryException{\r\n\t\tSystem.out.println(\"file ->\" + file);\r\n\t\tString fileName = file.getName();\r\n\t\tString[] split = fileName.split(HelperContstants.DELIMETER);\r\n\t\tfor (int i = 0; i < tabs; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t\tSystem.out.println(\"- Document: \" + file.getName() + \" - Extension: .\" + split[split.length - 1] + \" - URL: \"\r\n\t\t\t\t+ file.getAbsolutePath().substring(lenghtOfDirectory));\r\n\t}", "RandomAccessFile openInputFile(String fileName) {\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"fileName = \" + fileName);\n RandomAccessFile file = null;\n try {\n file = new RandomAccessFile(fileName, \"r\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"success: file opened for read\");\n } catch (Exception e) {\n ec.processError(e, thisClass, \"openInputFile\", \"\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"error: file opened for read\");\n } // try-catch\n return file;\n }", "private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}", "public ReversedLinesFileReader(File file, int blockSize, String encoding) throws IOException {\n/* 165 */ this(file, blockSize, Charsets.toCharset(encoding));\n/* */ }", "public void openEditor(FileTreeNode selectedNode, VMResource resource, PostProcessHandler handler) {\n String tabId = selectedNode.getAttribute(\"UniqueId\");\n\n for (Tab tab : editorTabSet.getTabs()) {\n long ref = tab.getAttributeAsLong(\"ref\");\n if (resource.getId() == ref) {\n tabId = tab.getAttributeAsString(\"UniqueId\");\n if (tabId.contains(\"_historyEditor\")) {\n tabId = tabId.substring(0, tabId.lastIndexOf(\"_historyEditor\"));\n }\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n break;\n }\n }\n if (null == tabId || \"\".equals(tabId)) {\n tabId = HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\");\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n }\n String tabName = resource.getName();\n Tab tab = editorTabSet.getTab(tabId);\n if (tab == null) {\n tab = new Tab();\n Extension extension = ((VMFile) resource).getExtension();\n String extensionStr = ((VMFile) resource).getExtensionStr();\n tab.setTitle(getTabImgTitle(tabName, extension));\n tab.setCanClose(true);\n tab.setID(tabId);\n tab.setPrompt(tree.getParentPath(selectedNode));\n tab.setAttribute(\"ref\", resource.getId());\n tab.setAttribute(\"UniqueId\", tabId);\n tab.setAttribute(\"Extension\", extensionStr);\n tab.setAttribute(\"TabName\", tabName);\n createView(tab, (VMFile) resource, handler);\n } else {\n editorTabSet.selectTab(tabId);\n }\n }", "public static List<String> readLineFromFile(File file) {\r\n List<String> result = new ArrayList<String>();\r\n LineNumberReader lnr = null;\r\n try {\r\n lnr = new LineNumberReader(new BufferedReader(\r\n new InputStreamReader(new FileInputStream(file), Charset\r\n .defaultCharset().name())));\r\n for (String line = lnr.readLine(); line != null; line = lnr\r\n .readLine()) {\r\n result.add(line);\r\n }\r\n } catch (Exception e) {\r\n throw new RuntimeException(e);\r\n } finally {\r\n if (lnr != null) {\r\n try {\r\n lnr.close();\r\n } catch (IOException e) {\r\n throw new RuntimeException(e);\r\n }\r\n }\r\n }\r\n return result;\r\n }", "TraceList read(File file) throws IOException;", "private static int lines(String file) {\n\t\tint lineCount = 0;\ntry{\n \t\tFileReader fr = new FileReader(file);\n \t\t LineNumberReader lnr = new LineNumberReader(fr);\n \t\t while (lnr.readLine() != null){\n \t\t \tlineCount++;\n \t }\n \t lnr.close(); \n \t\t} catch (FileNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\nreturn lineCount;\n\n\t\t\n\t}" ]
[ "0.68638515", "0.68627876", "0.5973487", "0.5906908", "0.5841699", "0.5796502", "0.5712542", "0.57008994", "0.5631041", "0.5625296", "0.55292755", "0.55236757", "0.54276586", "0.53376335", "0.53110254", "0.5304894", "0.52761793", "0.52653074", "0.5252482", "0.523683", "0.5214061", "0.52002144", "0.5166437", "0.515621", "0.5153872", "0.5143532", "0.514024", "0.5130025", "0.51168317", "0.5115773", "0.5091296", "0.5083554", "0.5072619", "0.5054529", "0.5043634", "0.5042203", "0.5036365", "0.50331724", "0.49920788", "0.49762684", "0.49680024", "0.49656734", "0.49581608", "0.49544", "0.4954315", "0.4941139", "0.4937434", "0.4934275", "0.49341586", "0.49302545", "0.49273258", "0.49204445", "0.49187684", "0.49034876", "0.48922786", "0.48807997", "0.488039", "0.48628932", "0.48554403", "0.48414215", "0.48353618", "0.4834618", "0.48231813", "0.48210785", "0.4820298", "0.48014265", "0.48001894", "0.4796612", "0.47921464", "0.47883537", "0.47785395", "0.47728574", "0.4770491", "0.47616443", "0.47527477", "0.47448716", "0.47440735", "0.47427565", "0.47358137", "0.47350448", "0.47285867", "0.47247007", "0.47163028", "0.47161686", "0.46987504", "0.46931967", "0.46913597", "0.46824527", "0.46813193", "0.46763292", "0.46737888", "0.46617767", "0.4642", "0.46265283", "0.4626277", "0.46257976", "0.46133032", "0.4606525", "0.46048146", "0.45903212" ]
0.5180637
22
Open a tabbedline reader for a headerless file.
public TabbedLineReader(File inFile, int fields) throws IOException { this.openFile(inFile, '\t'); this.clearLabels(fields); this.readAhead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "private CSVReaderHeaderAware getCSVReader(File file)\n throws IOException {\n FileReader fileReader;\n CSVReaderHeaderAware rowReader;\n try {\n fileReader = new FileReader(file);\n try {\n rowReader = new CSVReaderHeaderAware(fileReader);\n } catch (IOException exception) {\n System.out.println(\"IO ERROR ON CSV READ\");\n throw exception;\n }\n } catch (FileNotFoundException exception) {\n System.out.println(\"CSV FILE NOT FOUND\");\n throw exception;\n }\n return rowReader;\n }", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public abstract boolean isFirstLineHeader();", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }", "@Override\n\tpublic BctsJobHeader read() throws Exception {\n\t\treturn fileReder();\n\t}", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "static void printHeader(String fn, PrintWriter out) throws IOException\n{\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0) continue;\n\t\tif(line.charAt(0) == '#') out.println(line);\n\t\telse break;\n\t}\n}", "public XL(String fileName, String sheetName, boolean hasHeader) throws IOException, IllegalAccessException {\n this(fileName, sheetName);\n hasHeaderRow = hasHeader;\n\n String log = MessageFormat.format(\"Opened file {0} and currentSheet {1} with header {2}\", fileName, sheetName, hasHeader);\n Reporter.log(log, true);\n }", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public FileHeader(RandomAccessFile rafShp_) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(false); \n }", "public void setupDataTableHeader() {\r\n\t\tif (this.dataTableTabItem != null && !this.dataTableTabItem.isDisposed()) this.dataTableTabItem.setHeader();\r\n\t}", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "VcfReader(VcfParser parser, LineReader reader, VcfHeader header) throws IOException {\n mParser = parser;\n mIn = reader;\n mHeader = header;\n mNumSamples = mHeader.getNumberOfSamples();\n setNext();\n }", "public TabixReader(final String filename, final String indexFileName) throws IOException {\n\t\tthis.filename = filename;\n\t\tmFp = new BlockCompressedInputStream(new File(filename));\n\t\tBlockCompressedInputStream is = new BlockCompressedInputStream(new File(filename + \".tbi\"));\n\t\ttabix = readHeader(is);\n\t\tconf = tabix.config;\n\t\tis.close();\n\t}", "public List<VCFFilterHeaderLine> headerLines();", "abstract protected boolean isHeaderLine(String line);", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "private void skipHeader() throws IOException {\n // The header contains two dashed lines; the data begins\n // immediately after the second dashed line...\n //\n readToDashedLine();\n readToDashedLine();\n }", "public APEHeader(final File file) {\n m_pIO = file;\n }", "protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }", "public void addTab(String filename) {\n\t\t\n\t\tMinLFile nminl = new MinLFile(filename);\n\t\tJComponent panel = nminl;\n\t\t\n\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\tfilename);\t\t\n\t\ttabbedPane.setMnemonicAt(0, 0);\n\t}", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "public FileHeader(RandomAccessFile rafShp_, boolean newHeader) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(newHeader); \n }", "private void addHeaders(){\n\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n TextView item = new TextView(this);\n item.setText(\"Recipe\");\n item.setWidth(320);\n item.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n item.setTextColor(Color.WHITE);\n item.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n item.setPadding(5, 5, 5, 0);\n tr.addView(item); // Adding textView to tablerow.\n\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n\n }", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public void headerRecord(RecordInput recordInput) {\n }", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "void open(String fileName);", "public Record openMainRecord()\n {\n if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null)\n return this.getRecord(BookingLine.BOOKING_LINE_FILE);\n return new BookingLine(this);\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "public TabularROD(final String name, ArrayList<String> header, GenomeLoc loc) {\n this(name);\n this.header = header;\n this.loc = loc;\n requireGoodHeader(this.header);\n }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "public static DataHeader readDataHeader(ArchiveFileBuffer buffer, CtrlInfoReader info) throws Exception\n {\n final File file = buffer.getFile();\n final long offset = buffer.offset();\n\n // first part of data file header:\n // 4 bytes directory_offset (skipped)\n // \" next_offset (offset of next entry in its file)\n // \" prev_offset (offset of previous entry in its file)\n // \" cur_offset (used by FileAllocator writing file)\n // \" num_samples (number of samples in the buffer)\n // \" ctrl_info_offset (offset in this file of control info header (units, limits, etc.))\n // \" buff_size (bytes allocated for this entry, including header)\n // \" buff_free (number of un-used, allocated bytes for this header)\n // 2 bytes DbrType (type of data stored in buffer)\n // 2 bytes DbrCount (count of values for each buffer element, i.e. 1 for scalar types, >1 for array types)\n // 4 bytes padding (used to align the period)\n // 8 bytes (double) period\n // 8 bytes (epicsTimeStamp) begin_time\n // \" next_file_time\n // \" end_time\n // char [40] prev_file\n // char [40] next_file\n // --> Total of 152 bytes in data header\n buffer.skip(4);\n final long nextOffset = buffer.getUnsignedInt();\n buffer.skip(4);\n buffer.skip(4);\n final long numSamples = buffer.getUnsignedInt();\n final long ctrlInfoOffset = buffer.getUnsignedInt();\n final long buff_size = buffer.getUnsignedInt();\n final long buff_free = buffer.getUnsignedInt();\n final short dbrTypeCode = buffer.getShort();\n final short dbrCount = buffer.getShort();\n buffer.skip(4);\n buffer.skip(8);\n final Instant beginTime = buffer.getEpicsTime();\n final Instant nextTime = buffer.getEpicsTime();\n final Instant endTime = buffer.getEpicsTime();\n\n buffer.skip(40);\n final byte nameBytes [] = new byte [40];\n buffer.get(nameBytes);\n\n if (!info.isOffset(ctrlInfoOffset))\n info = new CtrlInfoReader(ctrlInfoOffset);\n final DbrType dbrType = DbrType.forValue(dbrTypeCode);\n\n // compute amount of data in this data file entry: (bytes allocated) - (bytes free) - (bytes in header)\n final long buffDataSize = buff_size - buff_free - 152;\n System.out.println(buffDataSize);\n\n // Size of samples:\n // 12 bytes for status/severity/timestamp,\n // padding, value, padding\n final long dbr_size = 12 + dbrType.padding + dbrCount * dbrType.valueSize + dbrType.getValuePad(dbrCount);\n final long expected = dbr_size * numSamples;\n System.out.println(dbr_size);\n System.out.println(expected);\n\n if (expected != buffDataSize)\n throw new Exception(\"Expected \" + expected + \" byte buffer, got \" + buffDataSize);\n\n String nextFilename = nextOffset != 0 ? new String(nameBytes).split(\"\\0\", 2)[0] : \"*\";\n File nextFile = new File(buffer.getFile().getParentFile(), nextFilename);\n\n logger.log(Level.FINE, \"Datablock\\n\" +\n \"Buffer : '\" + file + \"' @ 0x\" + Long.toHexString(offset) + \"\\n\" +\n \"Time : \" + beginTime + \"\\n\" +\n \"... : \" + endTime);\n\n return new DataHeader(file, offset, nextFile, nextOffset, nextTime, info, dbrType, dbrCount, numSamples);\n }", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final R label) throws IOException {\n this.path = path;\n this.reader = Files.newBufferedReader(path);\n this.csvClient = new CsvClientImpl<>(this.reader, clazz);\n this.csvClient.setQuote(quoteSymbol);\n this.csvClient.setSeparator(separator);\n this.csvClient.setEscape(escapeSymbol);\n this.csvClient.setUseHeader(header);\n this.table = new Table<>(label);\n }", "CompletableFuture<Optional<FutureLineStorage>> open(String fileName);", "static Extractor byTabs() {\n\t\t\treturn Splitter.TAB_EXTRACTOR;\n\t\t}", "private boolean open() {\r\n\t\tfor ( int i = 0; i < _headerObject._filenames.length; ++i) {\r\n\t\t\tFileObject fileObject = ( FileObject)_headerObject._fileObjectMap.get( _headerObject._filenames[ i]);\r\n\t\t\tif ( null == fileObject)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\tif ( !fileObject.open())\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private ChangedFile getChangedFile(FileHeader header) {\n ChangedFile cf =new ChangedFile(header);\n List<? extends HunkHeader> hunks = header.getHunks();\n for (HunkHeader hunkHeader : hunks) {\n EditList var16 = hunkHeader.toEditList();\n cf.chunks = this.getChunks(var16);\n }\n cf.setLines();\n return cf;\n }", "static void processHeader(Scanner s, PrintWriter w) throws Exception {\n for (int i = 0; i < 4; i++) {\n w.println(s.nextLine());\n }\n }", "@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"SF_SWITCH_FALLTHROUGH\", justification = \"Intentional\")\n private static Reader pickReaderVersion(Path path, FSDataInputStreamWrapper fsdis, long size,\n CacheConfig cacheConf, HFileSystem hfs, Configuration conf) throws IOException {\n FixedFileTrailer trailer = null;\n try {\n boolean isHBaseChecksum = fsdis.shouldUseHBaseChecksum();\n assert !isHBaseChecksum; // Initially we must read with FS checksum.\n trailer = FixedFileTrailer.readFromStream(fsdis.getStream(isHBaseChecksum), size);\n switch (trailer.getMajorVersion()) {\n case 2:\n return new HFileReaderV2(path, trailer, fsdis, size, cacheConf, hfs, conf);\n case 3:\n return new HFileReaderV3(path, trailer, fsdis, size, cacheConf, hfs, conf);\n default:\n throw new IllegalArgumentException(\"Invalid HFile version \" + trailer.getMajorVersion());\n }\n } catch (Throwable t) {\n try {\n fsdis.close();\n } catch (Throwable t2) {\n LOG.warn(\"Error closing fsdis FSDataInputStreamWrapper\", t2);\n }\n throw new CorruptHFileException(\"Problem reading HFile Trailer from file \" + path, t);\n }\n }", "public Tab createOpenEditorTab(long fileId, boolean useSearch) {\n Tab retTab = new Tab();\n long ref = 0;\n StringBuilder tabId = new StringBuilder();\n for (Tab tab : editorTabSet.getTabs()) {\n if (tab.getAttributeAsLong(\"ref\") == fileId) {\n ref = tab.getAttributeAsLong(\"ref\");\n tabId.append(tab.getAttributeAsString(\"UniqueId\"));\n editorTabSet.selectTab(tabId.toString());\n if (useSearch) {\n search.selectSearchResultModel(tab);\n return null;\n } else {\n return tab;\n }\n }\n }\n\n if (ref == 0) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result == null) {\n SC.warn(\"File not found.\");\n return;\n }\n\n tabId.append(HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\"));\n String tabName = result.getName();\n retTab.setTitle(getTabImgTitle(tabName, result.getExtension()));\n retTab.setCanClose(true);\n retTab.setID(tabId.toString());\n String path = result.getFullPath().replaceAll(\"(.*)/\" + result.getName() + \"\\\\.\" + result.getExtensionStr() + \"$\", \"$1\");\n retTab.setPrompt(path);\n retTab.setPane(new Layout());\n retTab.setAttribute(\"ref\", fileId);\n retTab.setAttribute(\"UniqueId\", tabId.toString());\n retTab.setAttribute(\"Extension\", result.getExtension().getValue());\n retTab.setAttribute(\"TabName\", tabName);\n createView(retTab, result, new PostProcessHandler() {\n @Override\n public void execute() {\n if (useSearch) {\n search.selectSearchResultModel(retTab);\n }\n }\n });\n }\n });\n return retTab;\n }\n return retTab;\n }", "private FileReader openLabelsFile() {\n FileReader file = null;\n try {\n file = new FileReader(riaaLabelsFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n return file;\n }", "private void addHeader(Section catPart) throws BadElementException, IOException{\r\n PdfPTable header = new PdfPTable(1);\r\n PdfPCell c = new PdfPCell(Image.getInstance(\"res/brandogredninglogo.png\"));\r\n c.setBackgroundColor(COLOR_BLUE);\r\n //c.setBorderColor(BaseColor.RED);\r\n header.setHeaderRows(0);\r\n header.addCell(c);\r\n header.setWidthPercentage(100.0f);\r\n \r\n catPart.add(header);\r\n }", "public void setupHistoTableHeader() {\r\n\t\tif (this.histoTableTabItem != null && !this.histoTableTabItem.isDisposed()) this.histoTableTabItem.setHeader();\r\n\t}", "public final void rule__OpenCSV__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1369:1: ( ( 'header' ) )\n // InternalCsv.g:1370:1: ( 'header' )\n {\n // InternalCsv.g:1370:1: ( 'header' )\n // InternalCsv.g:1371:2: 'header'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n match(input,21,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public abstract String getHeaderRow();", "private void initRowHeaders() {\n TableColumn aColumn = jTable1.getColumnModel().getColumn(0);\n TableCellRenderer aRenderer = jTable1.getTableHeader().getDefaultRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch !\");\n aColumn = jTable1.getColumnModel().getColumn(0);\n aRenderer = aColumn.getHeaderRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch Aouch !\");\n // System.exit(3);\n exitForm(null);\n }\n }\n Component aComponent = aRenderer.getTableCellRendererComponent(jTable1, aColumn.getHeaderValue(), false, false, -1, 0);\n aFont = aComponent.getFont();\n aBackground = aComponent.getBackground();\n aForeground = aComponent.getForeground();\n\n border = (Border) UIManager.getDefaults().get(\"TableHeader.cellBorder\");\n insets = border.getBorderInsets(jTable1.getTableHeader());\n metrics = jTable1.getFontMetrics(aFont);\n }", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "@Test\n\tpublic void testBadHeaders() {\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( null ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \" \" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"A random string\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section: Conveyor System\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section:\" ) );\n\t}", "@Test(timeout=100)\r\n\tpublic void testConstructorWithFilename() throws IOException {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tString filename = file.getAbsolutePath();\r\n\t\t//System.out.println(\"test: new CSVReader(\"+filename+\")\");\r\n\t\tCSVReader csv = new CSVReader(filename);\r\n\t\tassertTrue(\"Open with filename \"+filename, csv.hasNext());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertTrue(csv.hasNext());\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertFalse(csv.hasNext());\r\n\t}", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}", "public FileTableEntry open(String filename, String mode)\n\t{\n\t\tFileTableEntry ftEnt = filetable.falloc(filename, mode);\n\n\t\t//checking mode for writing\n\t\tif (ftEnt != null) {\n\t\t\tif (mode.equals(\"w\")) {\n\t\t\t\tif(!deallocAllBlocks(ftEnt)) {\n\t\t\t\t\tftEnt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (mode.equals(\"a\")) {\n\t\t\t\tftEnt.seekPtr = ftEnt.inode.length;\n\t\t\t}\n\t\t}\n\t\treturn ftEnt;\n\t}", "public void visit(Header n){\r\n\t\tif(tempNode.notifyNode().equals(\"Header\")){\r\n\t\t\ttempNode = nodeList.get(sequence);\r\n\t\t\tArrayList<Token> tokenList = tempNode.getTokenList();\r\n\t\t\tString tmp =\"\";\r\n\t\t\tfor(int i=0;i<tempNode.getTokenListSize();i++){\r\n\t\t\t\tvisit(tokenList.get(i));\r\n\t\t\t}\r\n\r\n\t\t\tif(tokenList.size()<1)\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+\"</h\"+tempNode.htype+\">\";\r\n\t\t\telse\r\n\t\t\ttmp = \"<h\"+tempNode.htype+\">\"+line+\"</h\"+tempNode.htype+\">\";\r\n\t\t\tline = tmp;\r\n\t\t}\r\n\t }", "private void createTableHeaderFile(final Class Class_, final String simpleName) throws IOException{\n final SessionFactory SessionFactory = HibernateUtil.getSingleton().getSessionFactoryLocal();\n final ClassMetadata classMetadata = SessionFactory.getClassMetadata(Class_);\n final String[] propertyNames = classMetadata.getPropertyNames();\n \n //Get the content file\n final String contentFileTableHeader = this.getContentTableHeader(simpleName,propertyNames); \n \n //Create the path\n final String className = simpleName + \"sTableHeader\"; \n final String tableHeaderPath = \"../era_views/src/main/java/com/era/views/tables/headers\";\n final String finalClassPath = tableHeaderPath + \"/\" + className + \".java\";\n \n //If the file exists delete it\n final File File = new File(finalClassPath); \n if(File.exists()){\n File.delete();\n }\n \n //Create the file\n File.createNewFile();\n \n //Write to the file\n try ( //Write the class\n FileWriter writer = new FileWriter(File)) { \n writer.write(contentFileTableHeader);\n }\n }", "public void addHeaders() {\n TableLayout tl = findViewById(R.id.table);\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n if (!haverford) {\n tr.addView(getTextView(0, \"Leave Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n } else {\n tr.addView(getTextView(0, \"Leave Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n }\n tl.addView(tr, getTblLayoutParams());\n }", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "public FileHeader(String objectTypeName, String formatTypeName,\r\n int version, char delimiter)\r\n throws InputDataFileException\r\n {\r\n try\r\n {\r\n // Ensure object type name is given\r\n Assertion.assertMsg(objectTypeName != null &&\r\n objectTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No object type name given.\");\r\n\r\n // Ensure format type name is given\r\n Assertion.assertMsg(formatTypeName != null &&\r\n formatTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No format type name given.\");\r\n\r\n // Copy data to object\r\n mObjectTypeName = objectTypeName;\r\n mFormatTypeName = formatTypeName;\r\n mVersion = version;\r\n mDelimiter = new Character(delimiter);\r\n }\r\n catch (AssertionException e)\r\n {\r\n throw new InputDataFileException(e.getMessage());\r\n }\r\n }", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "private Cursor createHeaderCursorFor(int section) {\n MatrixCursor matrixCursor = new MatrixCursor(getHeaderColumns());\n matrixCursor.addRow(new Object[]{ -1L, \"\", 0L, 0L, 0, \"\", section });\n return matrixCursor;\n }", "private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }", "private void createSingleTab(String text, Path path) {\r\n\t\tif (text == null) {\r\n\t\t\ttext = \"\";\r\n\t\t}\r\n\t\t\r\n\t\tJTextArea txtArea = new JTextArea(text);\r\n\t\ttxtArea.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprivate void changeIcon() {\r\n\t\t\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), redIcon);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtArea.addCaretListener(new CaretListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void caretUpdate(CaretEvent e) {\r\n\t\t\t\tlengthLab.setText(\"Length: \"+txtArea.getText().length());\r\n\t\t\t\t\r\n\t\t\t\tint offset = txtArea.getCaretPosition();\r\n\t int line= 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tline = txtArea.getLineOfOffset(offset);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tlnLab.setText(\"Ln: \"+(line+1));\r\n\t\t\t\t\r\n\t\t\t\tint col = 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcol = offset - txtArea.getLineStartOffset(line);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tcolLab.setText(\"Col: \"+ (col+1));\r\n\t\t\t\t\r\n\t\t\t\tint sel = Math.abs(txtArea.getSelectionStart() - txtArea.getSelectionEnd());\t\r\n\t\t\t\tselLab.setText(\"sel: \"+sel);\r\n\t\t\t\tfor (JMenuItem i : toggable) {\r\n\t\t\t\t\tboolean enabled;\r\n\t\t\t\t\tenabled = sel != 0;\r\n\t\t\t\t\ti.setEnabled(enabled);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJScrollPane scrPane = new JScrollPane(txtArea);\r\n\t\tif (path == null) {\t//create empty tab\t\r\n\t\t\tString name = \"New \" + (count +1);\r\n\t\t\ttabbedPane.addTab(name, greenIcon, scrPane, \"\");\r\n\t\t\tcount++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttabbedPane.addTab(path.getFileName().toString(), greenIcon, scrPane, path.toString());\r\n\t\tcount++;\r\n\t}", "public boolean isHeaderFile(String ext);", "public void\nprintHir( String pHeader );", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "VcfReader(VcfParser parser, BrLineReader in) throws IOException {\n this(parser, in, parser.parseHeader(in));\n }", "public boolean parseLine(final Object headerObj, final String[] parts) throws IOException {\n header = (ArrayList<String>)(headerObj);\n \n //System.out.printf(\"parts [len=%d] is '%s'%n\", parts.length, Utils.join(\":\", parts));\n \n if ( parts.length == 0 || COMMENT_PATTERN.matcher(parts[0]).matches() || HEADER_PATTERN.matcher(parts[0]).matches() )\n return false;\n \n if (header.size() != parts.length) {\n throw new IOException(String.format(\"Header length %d not equal to Tabular parts length %d\", header.size(), parts.length));\n }\n \n for ( int i = 0; i < parts.length; i++ ) {\n put(header.get(i), parts[i]);\n }\n \n if ( printRecordsParsed ) System.out.printf(\"Parsed %d records %s%n\", ++parsedRecords, this);\n \n return true;\n }", "private ConfigurationHTMLPrinter doHeaderRow() {\n println(\"<tr>\").incrementIndent();\n doHeaderCell(\"Name\");\n doHeaderCell(\"Default value\");\n doHeaderCell(\"Aliases\");\n doHeaderCell(\"Value type\");\n doHeaderCell(\"Description\");\n return decrementIndent().println(\"</tr>\");\n }", "public CharReader( String fileName )\n throws FileNotFoundException\n {\n lineNumberReader = new LineNumberReader(\n new FileReader( fileName ) );\n this.fileName = fileName;\n }", "private BufferedReader getBufferedReader(String filename) {\n\t\tBufferedReader retval;\n\t\ttry{\n\t\t\tretval = createReader(filename);\n\t\t\tif (retval != null) {\n\t\t\t\treturn retval;\n\t\t\t} else {\n\t\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t}\n\t\treturn null;\n\t}", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "abstract public void header();", "void open();" ]
[ "0.6500458", "0.6332155", "0.6306409", "0.57528794", "0.56268567", "0.54846656", "0.542011", "0.5415252", "0.5410696", "0.5373447", "0.5370039", "0.5362915", "0.5325438", "0.5324873", "0.5294071", "0.5074397", "0.50470537", "0.49387053", "0.49299073", "0.49289027", "0.4912312", "0.490038", "0.48947802", "0.48766774", "0.48574919", "0.4844923", "0.48392302", "0.48378184", "0.48343047", "0.48250175", "0.47975278", "0.47722843", "0.47485444", "0.4737447", "0.47305483", "0.47053266", "0.47005823", "0.46969256", "0.4689774", "0.46872336", "0.4678182", "0.46772358", "0.46485806", "0.4632452", "0.46108568", "0.46083897", "0.45911705", "0.45720604", "0.4569201", "0.45633465", "0.45586482", "0.4555695", "0.4552669", "0.45405176", "0.45384553", "0.45375705", "0.4536095", "0.4533113", "0.4532784", "0.45311266", "0.45300114", "0.45222774", "0.4516829", "0.451579", "0.45155463", "0.45154524", "0.45022103", "0.44952923", "0.44892547", "0.44826818", "0.44733536", "0.4471573", "0.44464132", "0.44386122", "0.44372547", "0.44315082", "0.44283557", "0.44234678", "0.44230118", "0.44183785", "0.44180274", "0.44141167", "0.44036388", "0.4395301", "0.4380202", "0.43772358", "0.437267", "0.43664303", "0.43563688", "0.43493673", "0.43492997", "0.43481958", "0.43449402", "0.43437612", "0.43426028", "0.43422735", "0.4341506", "0.43348324", "0.43335736", "0.433085" ]
0.5837086
3
Open a tabbedline reader for a headerless stream.
public TabbedLineReader(InputStream inStream, int fields) throws IOException { this.openFile(inStream, '\t'); this.clearLabels(fields); this.readAhead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "VcfReader(VcfParser parser, LineReader reader, VcfHeader header) throws IOException {\n mParser = parser;\n mIn = reader;\n mHeader = header;\n mNumSamples = mHeader.getNumberOfSamples();\n setNext();\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public abstract boolean isFirstLineHeader();", "static void processHeader(Scanner s, PrintWriter w) throws Exception {\n for (int i = 0; i < 4; i++) {\n w.println(s.nextLine());\n }\n }", "private List readHeadings( PushbackInputStream stream ) throws IOException {\n List headings = new ArrayList();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n done = true;\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n headings.add( readString( stream ) );\n break;\n case END:\n done = true;\n break;\n default:\n stream.unread( c );\n headings.add( readToken( stream ) );\n }\n }\n return headings;\n }", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "private CSVReaderHeaderAware getCSVReader(File file)\n throws IOException {\n FileReader fileReader;\n CSVReaderHeaderAware rowReader;\n try {\n fileReader = new FileReader(file);\n try {\n rowReader = new CSVReaderHeaderAware(fileReader);\n } catch (IOException exception) {\n System.out.println(\"IO ERROR ON CSV READ\");\n throw exception;\n }\n } catch (FileNotFoundException exception) {\n System.out.println(\"CSV FILE NOT FOUND\");\n throw exception;\n }\n return rowReader;\n }", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "StreamReader underlyingReader();", "@Test\n public void testBothStreams() throws Exception {\n\n URL url = Thread.currentThread().getContextClassLoader().getResource(\"test.csv\");\n BufferedCsvInputStream is = new BufferedCsvInputStream(new FileReader(new File(url.getFile())));\n File testFile = new File(\"test-review.csv\");\n BufferedCsvOutputStream os = new BufferedCsvOutputStream(new FileWriter(testFile));\n\n // first line shown\n String[] line = is.readNextLine();\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first line\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'previous line' click\n String[] prevLine = os.goToPreviousLine(); // get first line again\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, prevLine);\n line = is.readPreviousLine();\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first again\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, os.writeLine(line)); // write second line\n line = is.readNextLine(); // get third line\n Assert.assertArrayEquals(new String[]{\"no\", \"p\"}, line);\n\n is.close();\n os.close(); // close to write the rest\n testFile.deleteOnExit();\n }", "protected void initializeHeader() throws PiaRuntimeException, IOException{\n try{\n super.initializeHeader();\n if( firstLineOk && headersObj == null ){\n\t// someone just give us the first line\n\theadersObj = new Headers();\n }\n }catch(PiaRuntimeException e){\n throw e;\n }catch(IOException ioe){\n throw ioe;\n }\n }", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final R label) throws IOException {\n this.path = path;\n this.reader = Files.newBufferedReader(path);\n this.csvClient = new CsvClientImpl<>(this.reader, clazz);\n this.csvClient.setQuote(quoteSymbol);\n this.csvClient.setSeparator(separator);\n this.csvClient.setEscape(escapeSymbol);\n this.csvClient.setUseHeader(header);\n this.table = new Table<>(label);\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "@Override\n\t\tprotected void readStreamHeader() throws IOException {\n\t\t}", "static int readHeaders(InputStream stream, String [] aHeaders) throws IOException\n {\n boolean bEmptyLine = false;\n int iIndex;\n int iNumElements = aHeaders.length;\n \n for(iIndex=0; !bEmptyLine && (iIndex <= iNumElements); iIndex+=2)\n {\n String sThisLine = readLine(stream).trim();\n int iLength = sThisLine.length();\n \n if (iLength == 0)\n {\n bEmptyLine = true;\n }\n else\n {\n int iSeparator = sThisLine.indexOf(\":\");\n if (-1 != iSeparator)\n {\n aHeaders[iIndex] = sThisLine.substring(0, iSeparator).trim();\n aHeaders[iIndex+1] = sThisLine.substring(iSeparator+1).trim();\n //System.out.println(\"Read: \" + aHeaders[iIndex] + \": \" + aHeaders[iIndex+1]);\n }\n else\n {\n // I couldn't make out anything\n aHeaders[iIndex] = sThisLine;\n aHeaders[iIndex+1] = null;\n //System.out.println(\"Read-: \" + aHeaders[iIndex]);\n }\n }\n }\n \n return (iIndex > iNumElements) ? -1 : iIndex;\n }", "public List<VCFFilterHeaderLine> headerLines();", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "private BufferedReader\n\tgetStreamReader(\n\t\tInputStream\tinputStream)\n\t{\n\t\treturn(new BufferedReader(new InputStreamReader(inputStream)));\n\t}", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "VcfReader(VcfParser parser, BrLineReader in) throws IOException {\n this(parser, in, parser.parseHeader(in));\n }", "public StreamReader() {}", "public void setupDataTableHeader() {\r\n\t\tif (this.dataTableTabItem != null && !this.dataTableTabItem.isDisposed()) this.dataTableTabItem.setHeader();\r\n\t}", "private void skipHeader() throws IOException {\n // The header contains two dashed lines; the data begins\n // immediately after the second dashed line...\n //\n readToDashedLine();\n readToDashedLine();\n }", "public void headerRecord(RecordInput recordInput) {\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "@Override\n\tpublic BctsJobHeader read() throws Exception {\n\t\treturn fileReder();\n\t}", "private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "abstract protected boolean isHeaderLine(String line);", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "@Nullable\n public EPGMGraphHead readLine(\n @Nonnull SortedKeyValueIterator<Key, Value> source\n ) throws IOException {\n if (!source.hasTop()) {\n return null;\n }\n\n EPGMGraphHead row = new EPGMGraphHead();\n row.setId(GradoopId.fromString(source.getTopKey().getRow().toString()));\n while (source.hasTop()) {\n Key key = source.getTopKey();\n Value value = source.getTopValue();\n\n if (!Objects.equals(row.getId().toString(), key.getRow().toString())) {\n break;\n }\n\n switch (key.getColumnFamily().toString()) {\n case AccumuloTables.KEY.LABEL:\n row.setLabel(value.toString());\n break;\n case AccumuloTables.KEY.PROPERTY:\n row.setProperty(key.getColumnQualifier().toString(),\n PropertyValue.fromRawBytes(value.get()));\n break;\n default:\n break;\n }\n source.next();\n }\n\n return row;\n }", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "private NetFlowReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n in = inputStream;\n bufferLength = buffer;\n ignoreCorrupt = ignoreCorruptFile;\n byte[] metadata = null;\n WrappedByteBuf buf = null;\n\n try {\n metadata = new byte[METADATA_LENGTH];\n in.read(metadata, 0, METADATA_LENGTH);\n\n // Parse metadata, byte order does not really matter, so we go for big endian. Metadata contains\n // magic numbers to verify consistency of the NetFlow file, byte order encoded as either 1 or 2,\n // and stream version which affects header parsing (currently only 1 and 3 are supported).\n buf = WrappedByteBuf.init(metadata, ByteOrder.BIG_ENDIAN);\n short magic1 = buf.getUnsignedByte(0);\n short magic2 = buf.getUnsignedByte(1);\n short order = buf.getUnsignedByte(2);\n short stream = buf.getUnsignedByte(3);\n\n // Verify consistency of NetFlow file, also this ensures that we are at the beginning of the\n // input stream\n if (magic1 != HEADER_MAGIC1 || magic2 != HEADER_MAGIC2) {\n throw new IOException(\"Corrupt NetFlow file. Wrong magic number\");\n }\n\n // Resolve byte order, last case corresponds to incorrect reading from buffer\n if (order == HEADER_BIG_ENDIAN) {\n byteOrder = ByteOrder.BIG_ENDIAN;\n } else if (order == HEADER_LITTLE_ENDIAN) {\n byteOrder = ByteOrder.LITTLE_ENDIAN;\n } else {\n throw new IOException(\"Could not recognize byte order \" + order);\n }\n\n streamVersion = stream;\n\n // Check stream version\n ensureStreamVersion();\n\n // Read header\n header = getHeader();\n } catch (IOException err) {\n if (ignoreCorrupt) {\n // we subsume exception and log warning. Set header to null\n log.warn(\"Failed to initialize reader, ignoreCorruptFile=\" + ignoreCorrupt +\n \", error=\" + err);\n header = new CorruptNetFlowHeader();\n } else {\n throw err;\n }\n } finally {\n metadata = null;\n buf = null;\n }\n }", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public BufferedReader getBufferedReader(InputStream inputStream) throws UnsupportedEncodingException {\n return new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n }", "public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public Record openMainRecord()\n {\n if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null)\n return this.getRecord(BookingLine.BOOKING_LINE_FILE);\n return new BookingLine(this);\n }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "public void openCSVStream() {\n\t\ttry {\n\t\t\twriter = new CSVWriter(new FileWriter(getCSVFolder() + File.separator + getFileName() + \".csv\"), ',');\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public TabularROD(final String name, ArrayList<String> header, GenomeLoc loc) {\n this(name);\n this.header = header;\n this.loc = loc;\n requireGoodHeader(this.header);\n }", "public static NetFlowReader prepareReader(DataInputStream inputStream) throws IOException {\n return prepareReader(inputStream, RecordBuffer.BUFFER_LENGTH_2, false);\n }", "@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }", "public boolean parseLine(final Object headerObj, final String[] parts) throws IOException {\n header = (ArrayList<String>)(headerObj);\n \n //System.out.printf(\"parts [len=%d] is '%s'%n\", parts.length, Utils.join(\":\", parts));\n \n if ( parts.length == 0 || COMMENT_PATTERN.matcher(parts[0]).matches() || HEADER_PATTERN.matcher(parts[0]).matches() )\n return false;\n \n if (header.size() != parts.length) {\n throw new IOException(String.format(\"Header length %d not equal to Tabular parts length %d\", header.size(), parts.length));\n }\n \n for ( int i = 0; i < parts.length; i++ ) {\n put(header.get(i), parts[i]);\n }\n \n if ( printRecordsParsed ) System.out.printf(\"Parsed %d records %s%n\", ++parsedRecords, this);\n \n return true;\n }", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "public final void rule__OpenCSV__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1369:1: ( ( 'header' ) )\n // InternalCsv.g:1370:1: ( 'header' )\n {\n // InternalCsv.g:1370:1: ( 'header' )\n // InternalCsv.g:1371:2: 'header'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n match(input,21,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "public FileHeader(RandomAccessFile rafShp_) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(false); \n }", "public abstract String getHeaderRow();", "private void addHeaders(){\n\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n TextView item = new TextView(this);\n item.setText(\"Recipe\");\n item.setWidth(320);\n item.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n item.setTextColor(Color.WHITE);\n item.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n item.setPadding(5, 5, 5, 0);\n tr.addView(item); // Adding textView to tablerow.\n\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n\n }", "private Cursor createHeaderCursorFor(int section) {\n MatrixCursor matrixCursor = new MatrixCursor(getHeaderColumns());\n matrixCursor.addRow(new Object[]{ -1L, \"\", 0L, 0L, 0, \"\", section });\n return matrixCursor;\n }", "@Override\n public IRecord procHeader(IRecord r) {\n return r;\n }", "void open();", "void open();", "void open();", "public void open() throws IOException;", "IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;", "@Override\n public IRecord procHeader(IRecord r)\n {\n return r;\n }", "public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n return new NetFlowReader(inputStream, buffer, ignoreCorruptFile);\n }", "public String headerLine() {\n return headerLine;\n }", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public FileHeader(RandomAccessFile rafShp_, boolean newHeader) throws IOException {\n\n rafShp = rafShp_; \n\n initHeader(newHeader); \n }", "public XL(String fileName, String sheetName, boolean hasHeader) throws IOException, IllegalAccessException {\n this(fileName, sheetName);\n hasHeaderRow = hasHeader;\n\n String log = MessageFormat.format(\"Opened file {0} and currentSheet {1} with header {2}\", fileName, sheetName, hasHeader);\n Reporter.log(log, true);\n }", "public interface CsvParser extends Iterator<CsvLine>, Closeable {\n}", "public void openStartTag() throws XMLStreamException {\n write(HtmlObject.HtmlMarkUp.OPEN_BRACKER);\n }", "public static BufferedReader newBufferedReader(Path path) throws IOException {\n BufferedReader br = null;\n if(path.toFile().getName().endsWith(\".gz\")) {\n br = new BufferedReader(new InputStreamReader(new GZIPInputStream(new FileInputStream(path.toFile()))));\n }else {\n br = Files.newBufferedReader(path, Charset.defaultCharset());\n }\n return br;\n }", "public Reader openReader(boolean ignoreEncodingErrors) throws IOException {\n throw new UnsupportedOperationException();\n }", "private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }", "@Override\n\tpublic RecordReader<Text, ArchiveReader> getRecordReader(InputSplit arg0,\n\t\t\tJobConf arg1, Reporter arg2) throws IOException {\n\t\ttry {\n\t\t\treturn new WARCFileRecordReader(arg0, arg1);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "@Override\n protected TokenStreamComponents createComponents(String fieldName, Reader reader) {\n KiteTokenizer source = new KiteTokenizer(reader);\n return new TokenStreamComponents(source, new KiteTokenFilter(source));\n }", "public void start (BufferedReader br) throws IOException {\n\t\treader=br;\n\t\tnextLine = reader.readLine();\n\t}", "public void openReader(){\r\n handle = -1;\r\n try {\r\n cardReader = new ACR120U();\r\n } catch (java.lang.UnsatisfiedLinkError e) {\r\n e.printStackTrace();\r\n System.err.println(\"Are you sure the DLL is installed???\");\r\n message = \"DLL Installation problem.\";\r\n return;\r\n }\r\n handle = cardReader.open(ACR120U.ACR120_USB1); \r\n if (handle < 0){\r\n //message = \"Error opening reader [port may be in use or reader not in binary mode]\";\r\n message = \"No reader found\";\r\n System.err.println(message);\r\n return;\r\n }\r\n message = \"Device opened.\";\r\n }", "public void opened();" ]
[ "0.6794105", "0.6107841", "0.5970063", "0.59552723", "0.59551865", "0.5892039", "0.5445992", "0.53770024", "0.52747273", "0.5213705", "0.51697546", "0.50838363", "0.5080996", "0.5068599", "0.50617313", "0.5061576", "0.49950635", "0.49809197", "0.49781868", "0.49770927", "0.49703825", "0.4946539", "0.4906325", "0.48462802", "0.4841279", "0.481644", "0.48062178", "0.47760716", "0.4754419", "0.4711973", "0.4710466", "0.47003958", "0.46980336", "0.46827072", "0.46781945", "0.46765283", "0.46712053", "0.46490654", "0.463435", "0.46261132", "0.4624567", "0.4620998", "0.46158516", "0.46156046", "0.45992416", "0.4573062", "0.45630246", "0.4552813", "0.45434612", "0.45391273", "0.45327863", "0.4525544", "0.45213652", "0.4520632", "0.4515427", "0.45099923", "0.45062858", "0.45024368", "0.44964504", "0.44870135", "0.4479266", "0.44790903", "0.44711897", "0.44709224", "0.4467756", "0.44442412", "0.4442726", "0.444033", "0.44232875", "0.44107437", "0.44055566", "0.4403931", "0.43949053", "0.43857563", "0.4384418", "0.43811765", "0.43765736", "0.4376248", "0.43730178", "0.43730178", "0.43730178", "0.43647566", "0.43623355", "0.4353238", "0.43377095", "0.43339798", "0.43317598", "0.43250808", "0.4322485", "0.43193457", "0.4317482", "0.43163788", "0.4303487", "0.4300927", "0.42983195", "0.42875037", "0.42850295", "0.42847294", "0.42825365", "0.42821234" ]
0.62638676
1
Open a tabbedline reader for a headerless stream with a nonstandard delimiter
public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException { this.openFile(inStream, delimiter); this.clearLabels(fields); this.readAhead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "private void skipHeader() throws IOException {\n // The header contains two dashed lines; the data begins\n // immediately after the second dashed line...\n //\n readToDashedLine();\n readToDashedLine();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public NoEscapeDSVTableReader(Scanner source, char cellDelim, char rowDelim)\n {\n this.source = source;\n this.source.useDelimiter(Character.toString(rowDelim));\n this.cellDelim = Character.toString(cellDelim);\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "String getLineDelimiter(int line) throws BadLocationException;", "static void processHeader(Scanner s, PrintWriter w) throws Exception {\n for (int i = 0; i < 4; i++) {\n w.println(s.nextLine());\n }\n }", "private LineTokenizer createIdentityCard2LineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer.setNames(new String[] { \"IdCard2Id\", \"IdCard2Number\", \"IdCard2Type\",\"IdCard2HolderName\",\"IdCard2IssuedOn\",\"IdCard2IssuedBy\",\"IdCard2expDate\",\"IdCard2addressId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final R label) throws IOException {\n this.path = path;\n this.reader = Files.newBufferedReader(path);\n this.csvClient = new CsvClientImpl<>(this.reader, clazz);\n this.csvClient.setQuote(quoteSymbol);\n this.csvClient.setSeparator(separator);\n this.csvClient.setEscape(escapeSymbol);\n this.csvClient.setUseHeader(header);\n this.table = new Table<>(label);\n }", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "public abstract boolean isFirstLineHeader();", "StreamReader underlyingReader();", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "private List readHeadings( PushbackInputStream stream ) throws IOException {\n List headings = new ArrayList();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n done = true;\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n headings.add( readString( stream ) );\n break;\n case END:\n done = true;\n break;\n default:\n stream.unread( c );\n headings.add( readToken( stream ) );\n }\n }\n return headings;\n }", "abstract protected boolean isHeaderLine(String line);", "private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "@Test\n\tpublic void testBadHeaders() {\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( null ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \" \" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"A random string\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section: Conveyor System\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section:\" ) );\n\t}", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }", "public abstract void open(BufferedReader br) throws IOException;", "public WhitespaceTokenizer(Reader r)\n/* */ {\n/* 88 */ this(r, false);\n/* */ }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "static int readHeaders(InputStream stream, String [] aHeaders) throws IOException\n {\n boolean bEmptyLine = false;\n int iIndex;\n int iNumElements = aHeaders.length;\n \n for(iIndex=0; !bEmptyLine && (iIndex <= iNumElements); iIndex+=2)\n {\n String sThisLine = readLine(stream).trim();\n int iLength = sThisLine.length();\n \n if (iLength == 0)\n {\n bEmptyLine = true;\n }\n else\n {\n int iSeparator = sThisLine.indexOf(\":\");\n if (-1 != iSeparator)\n {\n aHeaders[iIndex] = sThisLine.substring(0, iSeparator).trim();\n aHeaders[iIndex+1] = sThisLine.substring(iSeparator+1).trim();\n //System.out.println(\"Read: \" + aHeaders[iIndex] + \": \" + aHeaders[iIndex+1]);\n }\n else\n {\n // I couldn't make out anything\n aHeaders[iIndex] = sThisLine;\n aHeaders[iIndex+1] = null;\n //System.out.println(\"Read-: \" + aHeaders[iIndex]);\n }\n }\n }\n \n return (iIndex > iNumElements) ? -1 : iIndex;\n }", "@Test(timeout=100)\r\n\tpublic void testSetDelimiter() {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\tString [] r3 = {\"Obama\",\"1 Pennsylvania Ave\",\"[email protected]\"};\r\n\t\t// default delimiter\r\n\t\twriteArrayToLine(r1);\r\n\t\t// change delimiter\r\n\t\tdelim = ':';\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tcsv.setDelimiter(delim);\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t}", "public interface CsvParser extends Iterator<CsvLine>, Closeable {\n}", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n StringReader stringReader0 = new StringReader(\"import\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 381, 381);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(5, javaCharStream0.bufpos);\n assertEquals(386, javaCharStream0.getColumn());\n }", "@Override\n public StreamHeader getHeader() throws Exception {\n return header;\n }", "public LineByLineDataParser(DataDescription dataDescription) {\n super(dataDescription);\n buf.clear();\n }", "private CSVReaderHeaderAware getCSVReader(File file)\n throws IOException {\n FileReader fileReader;\n CSVReaderHeaderAware rowReader;\n try {\n fileReader = new FileReader(file);\n try {\n rowReader = new CSVReaderHeaderAware(fileReader);\n } catch (IOException exception) {\n System.out.println(\"IO ERROR ON CSV READ\");\n throw exception;\n }\n } catch (FileNotFoundException exception) {\n System.out.println(\"CSV FILE NOT FOUND\");\n throw exception;\n }\n return rowReader;\n }", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "private Token nextTokenWithWhites() throws IOException {\n\t\tString lexemaActual = \"\";\n\t\t// Si hay lexemas en el buffer, leemos de ahi\n\t\tif (!bufferLocal.esVacia()) {\n\t\t\treturn bufferLocal.extraer();\n\t\t} else {\n\t\t\t// Si no, leemos del Stream\t\t\t\t\t\n\t\t\tint lexema = tokens.nextToken();\n\t\t\tswitch (lexema) {\n\t\t\t\tcase StreamTokenizer.TT_WORD: \n\t\t\t\t\tlexemaActual = tokens.sval; \n\t\t\t\t\tbreak;\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tlexemaActual = \"fin\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlexemaActual = String.valueOf((char)tokens.ttype);\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\t// Sumamos una linea en caso de haber salto de linea\n\t\t\tif (lexemaActual.equals(\"\\n\")) \n\t\t\t\tnumeroLinea++;\t\t\t\n\t\t}\n\t\treturn new Token(lexemaActual,this.numeroLinea);\n\t}", "@Test\n public void testBothStreams() throws Exception {\n\n URL url = Thread.currentThread().getContextClassLoader().getResource(\"test.csv\");\n BufferedCsvInputStream is = new BufferedCsvInputStream(new FileReader(new File(url.getFile())));\n File testFile = new File(\"test-review.csv\");\n BufferedCsvOutputStream os = new BufferedCsvOutputStream(new FileWriter(testFile));\n\n // first line shown\n String[] line = is.readNextLine();\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first line\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'previous line' click\n String[] prevLine = os.goToPreviousLine(); // get first line again\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, prevLine);\n line = is.readPreviousLine();\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first again\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, os.writeLine(line)); // write second line\n line = is.readNextLine(); // get third line\n Assert.assertArrayEquals(new String[]{\"no\", \"p\"}, line);\n\n is.close();\n os.close(); // close to write the rest\n testFile.deleteOnExit();\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getColumn();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(1, int0);\n }", "VcfReader(VcfParser parser, LineReader reader, VcfHeader header) throws IOException {\n mParser = parser;\n mIn = reader;\n mHeader = header;\n mNumSamples = mHeader.getNumberOfSamples();\n setNext();\n }", "@Test\n public void testIncludeHeaderCSV() throws Throwable {\n testIncludeHeaderCSV(false);\n }", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "static CsvParser getCsvParser(){\n CsvParserSettings settings = new CsvParserSettings();\n settings.getFormat().setLineSeparator(\"\\n\");\n return new CsvParser(settings);\n }", "TokenReader reader(TokenType tokenType);", "public TabTokenizer(String str) {\n\t\tthis(str, FIRST_DELIMITERS,\tSECOND_DELIMITERS);\n\t}", "static void printHeader(String fn, PrintWriter out) throws IOException\n{\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0) continue;\n\t\tif(line.charAt(0) == '#') out.println(line);\n\t\telse break;\n\t}\n}", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "public CsvReader(String filename, String seperator) {\n\t\tthis.seperator = seperator;\n\t\treadFile(filename, true);\n\t}", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Test(timeout = 4000)\n public void test018() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{H}R}D';ZHm5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n int int0 = javaCharStream0.getLine();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, int0);\n }", "public FileHeader(String objectTypeName, String formatTypeName,\r\n int version, char delimiter)\r\n throws InputDataFileException\r\n {\r\n try\r\n {\r\n // Ensure object type name is given\r\n Assertion.assertMsg(objectTypeName != null &&\r\n objectTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No object type name given.\");\r\n\r\n // Ensure format type name is given\r\n Assertion.assertMsg(formatTypeName != null &&\r\n formatTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No format type name given.\");\r\n\r\n // Copy data to object\r\n mObjectTypeName = objectTypeName;\r\n mFormatTypeName = formatTypeName;\r\n mVersion = version;\r\n mDelimiter = new Character(delimiter);\r\n }\r\n catch (AssertionException e)\r\n {\r\n throw new InputDataFileException(e.getMessage());\r\n }\r\n }", "public abstract char getCustomDelimiter();", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }", "@Test(expected=RuntimeException.class)\n public void missingPartOfHeader(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invalid_for_testing.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();}", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "public TabTokenizer(String str, String firstDelimiters) {\n\t\tthis(str, firstDelimiters,\tSECOND_DELIMITERS);\n\t}", "public StreamReader() {}", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~f'\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.getBeginColumn());\n assertEquals(1, javaCharStream0.getEndColumn());\n }", "@Test\n public void usingCRDelimiterWithSmallestBufferSize() throws Exception {\n conf.set(IO_FILE_BUFFER_SIZE_KEY, \"1\");\n\n try (BZip2TextFileWriter writer = new BZip2TextFileWriter(tempFile, conf)) {\n writer.writeManyRecords(BLOCK_SIZE - 50, 999, CR);\n writer.writeRecord(100, CR);\n writer.writeRecord(10, CR);\n writer.writeRecord(10, CR);\n writer.writeRecord(10, CR);\n }\n assertRecordCountsPerSplit(tempFile, new long[] {1000, 3});\n }", "@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final IPathLabelMapper<R> mapper)\n throws IOException {\n this(path, separator, quoteSymbol, escapeSymbol, header, clazz, mapper.map(path));\n }", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "String getDelimiter();", "@Override\n \tprotected void writeHeader(BufferedWriter out, DataHolder dh) throws IOException {\n \t\tout.write(COMMENT_PREFIX);\n \t\tint imax = dh.size();\n \t\tfor (int i = 0; i < imax; i++) {\n \t\t\tout.write(dh.getName(i) + \"\\t\");\n \t\t}\n \t\tout.write(\"\\n\");\n \t}", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "@Override\n DBO consume(String csv) throws TransformerException;", "@Override\n\tpublic BctsJobHeader read() throws Exception {\n\t\treturn fileReder();\n\t}", "HostsLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public abstract String getHeaderRow();", "private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }", "@Test(timeout = 4000)\n public void test002() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(1);\n javaCharStream0.BeginToken();\n javaCharStream0.AdjustBuffSize();\n javaCharStream0.adjustBeginLineColumn(1, 1);\n assertEquals(0, javaCharStream0.bufpos);\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader( getInstream() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "public void setDefaultExtractLineSeparator (String linesep);", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "public static NetFlowReader prepareReader(DataInputStream inputStream) throws IOException {\n return prepareReader(inputStream, RecordBuffer.BUFFER_LENGTH_2, false);\n }", "private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }" ]
[ "0.6802586", "0.6602905", "0.61679095", "0.6083005", "0.60384166", "0.603162", "0.5998351", "0.58798957", "0.5861993", "0.58296484", "0.569045", "0.55914736", "0.55319756", "0.55263036", "0.54953134", "0.549203", "0.5486767", "0.5469775", "0.5466762", "0.5378749", "0.52985066", "0.52878076", "0.524024", "0.5231373", "0.52181953", "0.5179463", "0.51793677", "0.5179228", "0.517575", "0.5146657", "0.5118595", "0.50744253", "0.49954632", "0.49802002", "0.49781588", "0.4971936", "0.49715844", "0.49676242", "0.49643573", "0.49497172", "0.4948602", "0.49429473", "0.49306804", "0.490668", "0.4890998", "0.4878179", "0.4871151", "0.48661166", "0.48650178", "0.48520038", "0.48464617", "0.48455593", "0.4842058", "0.48415914", "0.48395163", "0.4836815", "0.4836195", "0.4814122", "0.48017812", "0.47900748", "0.47873884", "0.4776006", "0.4767393", "0.4763954", "0.47630522", "0.47605538", "0.47487393", "0.47453693", "0.47349232", "0.47342765", "0.4734014", "0.47307062", "0.47304326", "0.47301024", "0.47277987", "0.47088045", "0.47058973", "0.4701035", "0.47009307", "0.4695253", "0.4694207", "0.468952", "0.46888584", "0.46830183", "0.46825272", "0.46734416", "0.4672074", "0.4668585", "0.46649718", "0.4664818", "0.4662155", "0.46596184", "0.46511024", "0.4648581", "0.4642274", "0.46344236", "0.46277273", "0.46265334", "0.46245414", "0.46158087" ]
0.66363126
1
Open an input stream for tabbed line reading.
private void openFile(InputStream inStream, char delimiter) throws IOException { this.delim = delimiter; this.stream = inStream; this.reader = new LineReader(inStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public LineProducer ( FileIterator input )\n {\n // Store the input on object creation in the global linesInput \n this.linesInput = input ;\n }", "public abstract void open(BufferedReader br) throws IOException;", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "public static Queue<String> linesFromInput(SimpleReader input) {\n assert input != null : \"Violation of: input is not null\";\n assert input.isOpen() : \"Violation of: input.is_open\";\n\n Queue<String> lines = new Queue1L<String>();\n while (!input.atEOS()) {\n String text = input.nextLine(); // reads next line\n lines.enqueue(text);\n\n }\n return lines;\n }", "public void inputFromStream(BufferedReader dis) throws IOException {\n String line = dis.readLine();\n setFile(line);\n int lines = Str.strToInt(dis.readLine());\n if (lines != 0) {\n lineNos = new int[lines];\n for (int i = 0; i < lineNos.length; ++i) {\n lineNos[i] = Str.strToInt(dis.readLine());\n }\n }\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "private BufferedReader\n\tgetStreamReader(\n\t\tInputStream\tinputStream)\n\t{\n\t\treturn(new BufferedReader(new InputStreamReader(inputStream)));\n\t}", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "@Test\n public void testBothStreams() throws Exception {\n\n URL url = Thread.currentThread().getContextClassLoader().getResource(\"test.csv\");\n BufferedCsvInputStream is = new BufferedCsvInputStream(new FileReader(new File(url.getFile())));\n File testFile = new File(\"test-review.csv\");\n BufferedCsvOutputStream os = new BufferedCsvOutputStream(new FileWriter(testFile));\n\n // first line shown\n String[] line = is.readNextLine();\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first line\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'previous line' click\n String[] prevLine = os.goToPreviousLine(); // get first line again\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, prevLine);\n line = is.readPreviousLine();\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first again\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, os.writeLine(line)); // write second line\n line = is.readNextLine(); // get third line\n Assert.assertArrayEquals(new String[]{\"no\", \"p\"}, line);\n\n is.close();\n os.close(); // close to write the rest\n testFile.deleteOnExit();\n }", "@NotNull InputStream openInputStream() throws IOException;", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "InputStream openStream() throws IOException;", "private String eatLine( InputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "public StreamReader() {}", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "StreamReader underlyingReader();", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void openForInput () \n throws IOException {\n this.dict = new DataDictionary();\n openForInput (dict);\n }", "public BufferedReader getBufferedReader(InputStream inputStream) throws UnsupportedEncodingException {\n return new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n }", "public abstract InputStream openStream(String str);", "public ImportTableDescription withInputFormat(InputFormat inputFormat) {\n this.inputFormat = inputFormat.toString();\n return this;\n }", "@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}", "public static void Input(){\n try{\n prepareReader();\n String linea=\"\";\n while((linea = br.readLine()) != null){\n System.out.println(linea);\n }\n br.close();\n System.out.println(\"-------------------------------------------------\");\n }catch (Exception e){\n System.err.println(\"Error al leer del buffer\");\n }\n }", "public void openForInput (RecordDefinition recDef) \n throws IOException {\n openForInput (recDef.getDict());\n }", "private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "protected abstract InputStream getTableInputStream() throws IOException;", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public ImportTableDescription withInputFormat(String inputFormat) {\n setInputFormat(inputFormat);\n return this;\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public void start(InputStream in, String path);", "public PklFileReader(InputStream inputStream)\r\n\t{\r\n\t\tsetInputStream(inputStream);\r\n\t}", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public MiniLexer(java.io.InputStream in, Handler handler) {\r\n this(new java.io.InputStreamReader(in), handler);\r\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public String getLine();", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "String readLine() throws IOException\n\t{\n\t\tString line = null;\n\t\tif (haveStreams())\n\t\t\tline = m_in.readLine();\n\t\telse\n\t\t\tline = keyboardReadLine();\n\n\t\tsetCurrentLine(line);\n\t\treturn line;\n\t}", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "@Test\n public void testNextLineText() {\n System.out.println(\"nextLineText\");\n System.out.println(\"nextLineText@no line terminators in the file.\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n assertEquals(0, instance.position());\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.nextLineText();\n assertEquals(expResult, result);\n assertEquals(11, instance.position());\n }\n }", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static Scanner openInput(String fname){\n\t Scanner infile = null;\n\t try {\n\t infile = new Scanner(new File(fname));\n\t } catch(FileNotFoundException e) {\n\t System.out.printf(\"Cannot open file '%s' for input\\n\", fname);\n\t System.exit(0);\n\t }\n\t return infile;\n\t }", "public int getLine();", "public int getLine();", "public int getLine();", "public Reading1(BufferedReader in, PrintStream out) { // agrego al constructor conversation\n\t\tthis.in = in;\n\t\tthis.out = out;\n\t}", "public static Stream<List<String>> parse(InputStream in) {\n BufferedReader br = UTF8IoUtils.readerFromStream(in);\n return br.lines().map(CSVUtils::parseLine);\n }", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public StreamInputSplit() {\n // No-op\n }", "public Tokenizer(Reader input) {\n this(input, false);\n }", "public ModemReader (InputStream inputStream) {\n\t\t\tthis.inputStream = inputStream;\n\t\t\tsetResultStrings (null);\n\t\t}", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }", "public ImportTableDescription withInputFormatOptions(InputFormatOptions inputFormatOptions) {\n setInputFormatOptions(inputFormatOptions);\n return this;\n }", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "public FileCommandInput(File inputFile) throws FileNotFoundException {\n Validate.notNull(inputFile, \"Input can't be NULL\");\n this.in = new LineNumberReader(new FileReader(inputFile));\n }", "@Test\n public void testGetLine()\n {\n System.out.println(\"getLine\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n final Token next = token.getNext();\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n assertEquals(\"{\", next.getValue());\n }", "public abstract String getLine(int lineNumber);", "private void openLogFileForInput(String filename) throws Exception {\n // TODO Auto-generated method stub\n if (objectInputStream != null) {\n objectInputStream.close();\n objectInputStream = null;\n fileInputStream = null;\n }\n\n if (new File(filename).exists()) {\n fileInputStream = new FileInputStream(filename);\n objectInputStream = new ObjectInputStream(fileInputStream);\n inputLogFilename = filename;\n } else {\n throw new Exception(\"File \" + filename + \" does not exist \");\n }\n }", "public void open() throws IOException;", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }" ]
[ "0.71735567", "0.71133435", "0.6552595", "0.63703483", "0.6249787", "0.61698854", "0.5575974", "0.5565577", "0.5463304", "0.5437308", "0.53318036", "0.52893734", "0.52378756", "0.5228855", "0.5220531", "0.5218287", "0.51517564", "0.51118815", "0.5089516", "0.506657", "0.503675", "0.50266635", "0.5014656", "0.50020987", "0.49818397", "0.4980977", "0.49484402", "0.48650253", "0.48448902", "0.4844441", "0.4832018", "0.4827311", "0.48245484", "0.4786685", "0.47834566", "0.47827137", "0.47745392", "0.47640508", "0.47631252", "0.47577825", "0.47549206", "0.47275424", "0.47087687", "0.4695535", "0.46920875", "0.4691605", "0.46819004", "0.46634516", "0.46623534", "0.4647352", "0.464705", "0.46286047", "0.46206325", "0.46149656", "0.46112072", "0.4607057", "0.45919916", "0.45516214", "0.45504442", "0.45474872", "0.45436987", "0.4533793", "0.45304996", "0.45265993", "0.45265993", "0.45260024", "0.45188653", "0.45181668", "0.45018634", "0.44951624", "0.4484425", "0.44781682", "0.44752973", "0.4473381", "0.44435835", "0.44381443", "0.443799", "0.44183862", "0.44134182", "0.44134182", "0.44134182", "0.44123864", "0.4411303", "0.43989474", "0.43941477", "0.4394005", "0.4393223", "0.43909878", "0.43872124", "0.43859297", "0.437784", "0.43759048", "0.43707672", "0.43705565", "0.43649554", "0.43624336", "0.43602762", "0.43567052", "0.43531778", "0.43426788" ]
0.5418587
10
Open a tabbedline reader for an input stream with a nonstandard delimiter.
public TabbedLineReader(InputStream inStream, char delimiter) throws IOException { this.openFile(inStream, delimiter); this.readHeader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public NoEscapeDSVTableReader(Scanner source, char cellDelim, char rowDelim)\n {\n this.source = source;\n this.source.useDelimiter(Character.toString(rowDelim));\n this.cellDelim = Character.toString(cellDelim);\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "StreamReader underlyingReader();", "String getLineDelimiter(int line) throws BadLocationException;", "public abstract void open(BufferedReader br) throws IOException;", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "public Reader openReader(boolean ignoreEncodingErrors) throws IOException {\n throw new UnsupportedOperationException();\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "public StreamReader() {}", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "PTB2TextLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "public CsvReader(String filename, String seperator) {\n\t\tthis.seperator = seperator;\n\t\treadFile(filename, true);\n\t}", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "_TurtleLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public BufferedReader getBufferedReader(InputStream inputStream) throws UnsupportedEncodingException {\n return new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n }", "@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}", "protected void handleReaderImport(Reader in, JTextComponent c, boolean useRead)\n throws BadLocationException, IOException {\n if (useRead) {\n int startPosition = c.getSelectionStart();\n int endPosition = c.getSelectionEnd();\n int length = endPosition - startPosition;\n EditorKit kit = c.getUI().getEditorKit(c);\n Document doc = c.getDocument();\n if (length > 0) {\n doc.remove(startPosition, length);\n }\n kit.read(in, doc, startPosition);\n } else {\n char[] buff = new char[1024];\n int nch;\n boolean lastWasCR = false;\n int last;\n StringBuilder sbuff = null;\n\n // Read in a block at a time, mapping \\r\\n to \\n, as well as single\n // \\r to \\n.\n while ((nch = in.read(buff, 0, buff.length)) != -1) {\n if (sbuff == null) {\n sbuff = new StringBuilder(nch);\n }\n last = 0;\n for(int counter = 0; counter < nch; counter++) {\n switch(buff[counter]) {\n case '\\r':\n if (lastWasCR) {\n if (counter == 0) {\n sbuff.append('\\n');\n } else {\n buff[counter - 1] = '\\n';\n }\n } else {\n lastWasCR = true;\n }\n break;\n case '\\n':\n if (lastWasCR) {\n if (counter > (last + 1)) {\n sbuff.append(buff, last, counter - last - 1);\n }\n // else nothing to do, can skip \\r, next write will\n // write \\n\n lastWasCR = false;\n last = counter;\n }\n break;\n default:\n if (lastWasCR) {\n if (counter == 0) {\n sbuff.append('\\n');\n } else {\n buff[counter - 1] = '\\n';\n }\n lastWasCR = false;\n }\n break;\n }\n }\n if (last < nch) {\n if (lastWasCR) {\n if (last < (nch - 1)) {\n sbuff.append(buff, last, nch - last - 1);\n }\n } else {\n sbuff.append(buff, last, nch - last);\n }\n }\n }\n if (lastWasCR) {\n sbuff.append('\\n');\n }\n c.replaceSelection(sbuff != null ? sbuff.toString() : \"\");\n }\n }", "public _DtdLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "@Test(timeout=100)\r\n\tpublic void testSetDelimiter() {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\tString [] r3 = {\"Obama\",\"1 Pennsylvania Ave\",\"[email protected]\"};\r\n\t\t// default delimiter\r\n\t\twriteArrayToLine(r1);\r\n\t\t// change delimiter\r\n\t\tdelim = ':';\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tcsv.setDelimiter(delim);\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t}", "private BufferedReader\n\tgetStreamReader(\n\t\tInputStream\tinputStream)\n\t{\n\t\treturn(new BufferedReader(new InputStreamReader(inputStream)));\n\t}", "public TabTokenizer(String str) {\n\t\tthis(str, FIRST_DELIMITERS,\tSECOND_DELIMITERS);\n\t}", "public StreamInputSplit() {\n // No-op\n }", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "public Tokenizer(Reader input) {\n this(input, false);\n }", "@Override\n\t\tpublic RecordReader<LongWritable, Text> getRecordReader(\n\t\t\t\tInputSplit genericSplit, JobConf job, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\treporter.setStatus(genericSplit.toString());\n\t\t\treturn new MyRecordReader(job, (FileSplit) genericSplit);\n\t\t}", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "protected AbstractCSVParser(TokenStream input) {\n super(input);\n }", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader( getInstream() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "TokenReader reader(TokenType tokenType);", "public static NetFlowReader prepareReader(DataInputStream inputStream) throws IOException {\n return prepareReader(inputStream, RecordBuffer.BUFFER_LENGTH_2, false);\n }", "public Analizador_Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public WhitespaceTokenizer(Reader r)\n/* */ {\n/* 88 */ this(r, false);\n/* */ }", "public InputReader() throws FileNotFoundException, TransformerConfigurationException {\n this.csvlocation = System.getProperty(Static.SYSYEM_PROPERTY_FILE);\n this.templatelocation = System.getProperty(Static.SYSTEM_PROPERTY_TEMPLATE_FILE);\n init();\n }", "private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\n public Token nextToken(\n PushbackReader r, int cin, Tokenizer t)\n throws IOException {\n\n int i = 0;\n charbuf[i++] = (char) cin;\n int c;\n do {\n c = r.read();\n if (c < 0) {\n c = cin;\n }\n checkBufLength(i);\n charbuf[i++] = (char) c;\n } while (c != cin);\n\n String sval = copyValueOf(charbuf, 0, i);\n return new Token(TT_QUOTED, sval, 0);\n }", "protected AbstractCSVParser(TokenStream input, RecognizerSharedState state) {\n super(input, state);\n }", "public AnalisadorLexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public abstract String inReadLine() throws JVMIOException;", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "Lexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public LineByLineDataParser(DataDescription dataDescription) {\n super(dataDescription);\n buf.clear();\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "protected abstract Reader getReader() throws IOException;", "public static NetFlowReader prepareReader(\n DataInputStream inputStream,\n int buffer,\n boolean ignoreCorruptFile) throws IOException {\n return new NetFlowReader(inputStream, buffer, ignoreCorruptFile);\n }", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "HostsLexer(java.io.Reader in) {\n this.zzReader = in;\n }", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "public AnalizadorLexico2(java.io.Reader in) {\n this.zzReader = in;\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }", "private LineTokenizer createIdentityCard2LineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer.setNames(new String[] { \"IdCard2Id\", \"IdCard2Number\", \"IdCard2Type\",\"IdCard2HolderName\",\"IdCard2IssuedOn\",\"IdCard2IssuedBy\",\"IdCard2expDate\",\"IdCard2addressId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "public NewTextLineCodecFactory(String charset,String encodingDelimiter, String decodingDelimiter){\n\t\tsuper(Charset.forName(charset),encodingDelimiter,decodingDelimiter);\n\t}", "@Test\n public void testOutputDelimitedStream() throws Throwable {\n testOutputDelimited(true);\n }", "public Scanner(InputStream inStream)\n {\n in = new BufferedReader(new InputStreamReader(inStream));\n eof = false;\n getNextChar();\n }", "public PasitoScanner(java.io.Reader in) {\n this.yy_reader = in;\n }", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "static CsvParser getCsvParser(){\n CsvParserSettings settings = new CsvParserSettings();\n settings.getFormat().setLineSeparator(\"\\n\");\n return new CsvParser(settings);\n }", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "private Token scanNewlineSeparator() {\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n c = in.read();\n return new Token(\"\\n\", TokenType.SEPARATOR, pos);\n }", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public abstract RecordReader<K , V> createRecordReader(InputSplit inputSplit) throws IOException, SfsFileDoesNotExistException;", "public static LinkedList<Patient> TSVImport(String str) {\n\t\treturn TSVImport(new File(str));\n\t}", "public MiniLexer(java.io.Reader in, Handler handler) {\r\n super(handler);\n this.zzReader = in;\r\n }", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n StringReader stringReader0 = new StringReader(\"b|}T=mM,PuM8AP|}\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 10, 0, 0);\n char char0 = javaCharStream0.BeginToken();\n assertEquals('b', char0);\n \n int int0 = javaCharStream0.getEndLine();\n assertEquals(10, javaCharStream0.getBeginLine());\n assertEquals(10, int0);\n assertEquals(0, javaCharStream0.getColumn());\n }" ]
[ "0.6934418", "0.67698306", "0.6514672", "0.63905627", "0.6211919", "0.61656415", "0.61177444", "0.60939336", "0.6030892", "0.582675", "0.58249277", "0.56337625", "0.54397047", "0.52356553", "0.5229972", "0.52008694", "0.51589155", "0.51546186", "0.51428956", "0.5076612", "0.50360894", "0.5023383", "0.5006975", "0.49877378", "0.49699664", "0.49672955", "0.49616724", "0.49579775", "0.49376088", "0.4924526", "0.49210832", "0.48796278", "0.48753673", "0.48716256", "0.48678157", "0.48359668", "0.48346978", "0.48268682", "0.48185426", "0.48157153", "0.48050195", "0.4779112", "0.47786123", "0.47784925", "0.4777978", "0.4770418", "0.4767111", "0.47659546", "0.47595608", "0.47562343", "0.4754418", "0.4754392", "0.47533247", "0.47518617", "0.4745022", "0.4739016", "0.47301373", "0.47232115", "0.47120976", "0.47101226", "0.4706954", "0.47063804", "0.46909824", "0.46886095", "0.46859825", "0.46859825", "0.46795985", "0.46791852", "0.46787912", "0.4676178", "0.46707535", "0.4669348", "0.4667476", "0.46572235", "0.4653586", "0.46530253", "0.4652934", "0.4646601", "0.46456358", "0.46435985", "0.4642064", "0.4629719", "0.46280923", "0.46201998", "0.46161336", "0.4593412", "0.45875427", "0.45865348", "0.45804647", "0.4577342", "0.45745027", "0.45637816", "0.45637816", "0.45623553", "0.45560834", "0.45473364", "0.45399716", "0.45384055", "0.45383662", "0.45324153" ]
0.7038387
0
Open a tabbedline reader for an input stream.
public TabbedLineReader(InputStream inStream) throws IOException { this.openFile(inStream, '\t'); this.readHeader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public abstract void open(BufferedReader br) throws IOException;", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "private BufferedReader\n\tgetStreamReader(\n\t\tInputStream\tinputStream)\n\t{\n\t\treturn(new BufferedReader(new InputStreamReader(inputStream)));\n\t}", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public BufferedReader getBufferedReader(InputStream inputStream) throws UnsupportedEncodingException {\n return new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n }", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "StreamReader underlyingReader();", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "public SqlFileParser(InputStream stream) {\n this.reader = new BufferedReader(new InputStreamReader(stream));\n }", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public static Queue<String> linesFromInput(SimpleReader input) {\n assert input != null : \"Violation of: input is not null\";\n assert input.isOpen() : \"Violation of: input.is_open\";\n\n Queue<String> lines = new Queue1L<String>();\n while (!input.atEOS()) {\n String text = input.nextLine(); // reads next line\n lines.enqueue(text);\n\n }\n return lines;\n }", "public LineProducer ( FileIterator input )\n {\n // Store the input on object creation in the global linesInput \n this.linesInput = input ;\n }", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "public StreamReader() {}", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "public static BufferedReader asReader(String name) throws IOException {\n ClassLoader classLoader = Reflection.getCallerClass(3).getClassLoader();\n return new BufferedReader(new InputStreamReader(asStream(name, classLoader), UTF_8));\n }", "public void inputFromStream(BufferedReader dis) throws IOException {\n String line = dis.readLine();\n setFile(line);\n int lines = Str.strToInt(dis.readLine());\n if (lines != 0) {\n lineNos = new int[lines];\n for (int i = 0; i < lineNos.length; ++i) {\n lineNos[i] = Str.strToInt(dis.readLine());\n }\n }\n }", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public abstract InputStream openStream(String str);", "public FastaReader(InputStream ins) throws IOException{\n\t\tsuper(ins);\n\t}", "@NotNull InputStream openInputStream() throws IOException;", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }", "PTB2TextLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static BufferedReader getReader(InputStream in) {\n try {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));\n } catch(Throwable ignored) {\n }\n return null;\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "InputStream openStream() throws IOException;", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "@Test\n public void testBothStreams() throws Exception {\n\n URL url = Thread.currentThread().getContextClassLoader().getResource(\"test.csv\");\n BufferedCsvInputStream is = new BufferedCsvInputStream(new FileReader(new File(url.getFile())));\n File testFile = new File(\"test-review.csv\");\n BufferedCsvOutputStream os = new BufferedCsvOutputStream(new FileWriter(testFile));\n\n // first line shown\n String[] line = is.readNextLine();\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first line\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'previous line' click\n String[] prevLine = os.goToPreviousLine(); // get first line again\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, prevLine);\n line = is.readPreviousLine();\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first again\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, os.writeLine(line)); // write second line\n line = is.readNextLine(); // get third line\n Assert.assertArrayEquals(new String[]{\"no\", \"p\"}, line);\n\n is.close();\n os.close(); // close to write the rest\n testFile.deleteOnExit();\n }", "private static BufferedReader newReader(URL url) throws IOException {\n return newReader(url.openConnection().getInputStream());\n }", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "public PklFileReader(InputStream inputStream)\r\n\t{\r\n\t\tsetInputStream(inputStream);\r\n\t}", "public Reader getReader() {\n return in;\n }", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public Reading1(BufferedReader in, PrintStream out) { // agrego al constructor conversation\n\t\tthis.in = in;\n\t\tthis.out = out;\n\t}", "public ModemReader (InputStream inputStream) {\n\t\t\tthis.inputStream = inputStream;\n\t\t\tsetResultStrings (null);\n\t\t}", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "BaseReader (final String buffer, final int mode) {\n if (buffer == null) {\n return;\n }\n m_sb = new StringBuffer ();\n m_charBuf = new StringBuffer ();\n m_mode = mode;\n m_nbLines = 1;\n m_debugMode = (mode & DEBUG) == DEBUG;\n if ((mode & BUFFER) == BUFFER) {\n createFromString (buffer);\n } else {\n if ((mode & ASYNC) == ASYNC) {\n new Thread () {\n public void run () {\n openUrl (buffer);\n MiniPlayer.wakeUpCanvas();\n }\n }.start ();\n } else {\n openUrl (buffer);\n }\n }\n }", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "@Override\n\tpublic RecordReader<NullWritable, Text> createRecordReader(InputSplit split, TaskAttemptContext context)\n\t\t\tthrows IOException {\n\t\tCustomRecordReader reader = new CustomRecordReader();\n\t\t\n\t\ttry {\n\t\t\treader.initialize(split, context);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn reader;\n\t}", "public void openForInput (RecordDefinition recDef) \n throws IOException {\n openForInput (recDef.getDict());\n }", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "public RecordReader getRecordReader( InputSplit split, JobConf job, Reporter reporter ) throws IOException\n {\n MultiInputSplit multiSplit = (MultiInputSplit) split;\n JobConf currentConf = mergeConf( job, multiSplit.config, true );\n \n return currentConf.getInputFormat().getRecordReader( multiSplit.inputSplit, currentConf, reporter );\n }", "public static void Input(){\n try{\n prepareReader();\n String linea=\"\";\n while((linea = br.readLine()) != null){\n System.out.println(linea);\n }\n br.close();\n System.out.println(\"-------------------------------------------------\");\n }catch (Exception e){\n System.err.println(\"Error al leer del buffer\");\n }\n }", "public Tokenizer(Reader input) {\n this(input, false);\n }", "public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }", "@Override\n protected void validatePipeInput(TabbedLineReader inputStream) throws IOException {\n int col1idx = inputStream.findField(this.col1Name);\n int col2idx = inputStream.findField(this.col2Name);\n // Create the pair list.\n this.pairs = new GenomePairList();\n // Now read the genome ID pairs.\n log.info(\"Reading genome pairs.\");\n for (var line : inputStream) {\n String g1 = line.get(col1idx);\n String g2 = line.get(col2idx);\n this.pairs.addPair(g1, g2);\n }\n log.info(\"{} genome pairs to process.\", this.pairs.size());\n }", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public MiniLexer(java.io.InputStream in, Handler handler) {\r\n this(new java.io.InputStreamReader(in), handler);\r\n }", "public Record openMainRecord()\n {\n if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null)\n return this.getRecord(BookingLine.BOOKING_LINE_FILE);\n return new BookingLine(this);\n }", "public Reader openHttp2Reader(URL url) throws IOException {\r\n return new InputStreamReader(openHttpEntity(url).getContent());\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(new InputStreamReader(input));\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "public Reader setInputReader(Reader in) {\n\t\treturn m_parser.setInputReader(in);\n\t}", "protected abstract InputStream getTableInputStream() throws IOException;", "public ImportTableDescription withInputFormat(InputFormat inputFormat) {\n this.inputFormat = inputFormat.toString();\n return this;\n }", "@Override\n\t\tpublic RecordReader<LongWritable, Text> getRecordReader(\n\t\t\t\tInputSplit genericSplit, JobConf job, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\treporter.setStatus(genericSplit.toString());\n\t\t\treturn new MyRecordReader(job, (FileSplit) genericSplit);\n\t\t}", "public static BufferedReader getReader(Path path) throws IOException {\n return Files.newBufferedReader(path);\n }", "public void openForInput () \n throws IOException {\n this.dict = new DataDictionary();\n openForInput (dict);\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "static void init(InputStream input) {\r\n reader = new BufferedReader(\r\n new InputStreamReader(input) );\r\n tokenizer = new StringTokenizer(\"\");\r\n }", "protected abstract Reader getReader() throws IOException;", "public void start (BufferedReader br) throws IOException {\n\t\treader=br;\n\t\tnextLine = reader.readLine();\n\t}", "static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input) );\n tokenizer = new StringTokenizer(\"\");\n }", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public void readFromStream(Reader r) throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(r);\n\t\tlines=new ArrayList();\n\n\t\twhile(true) {\n\t\t\tString input=br.readLine();\n\t\t\tif(input==null)\n\t\t\t\tbreak;\n\t\t\tlines.add(input);\n\t\t}\n\t}", "FrenchLexer(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public ReaderInputStream(Reader reader) {\n if (reader == null) {\n throw new IllegalArgumentException(\"reader must not be null\");\n }\n in = reader;\n }", "@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }" ]
[ "0.73127407", "0.6738341", "0.64136404", "0.6386158", "0.6380669", "0.60854405", "0.59524286", "0.59191084", "0.56639457", "0.5626891", "0.5544767", "0.5362268", "0.5328285", "0.5317863", "0.53082925", "0.52806175", "0.5266762", "0.52484244", "0.5217593", "0.5185191", "0.516716", "0.5164219", "0.5160682", "0.5086592", "0.5078409", "0.50769514", "0.5065142", "0.5049341", "0.50472355", "0.50441295", "0.49927995", "0.49482423", "0.49220762", "0.49035156", "0.489619", "0.48950803", "0.48908067", "0.48820904", "0.48735496", "0.48689234", "0.48638916", "0.4863001", "0.48570824", "0.4848557", "0.47979996", "0.47832343", "0.4769963", "0.47698113", "0.47671732", "0.4766669", "0.4765014", "0.47588605", "0.47588605", "0.473379", "0.473086", "0.47262472", "0.4723317", "0.4712899", "0.47079238", "0.46883878", "0.46816787", "0.46786156", "0.46688718", "0.46497688", "0.46449232", "0.46399212", "0.46385577", "0.46346465", "0.46271208", "0.4624063", "0.46219623", "0.46199167", "0.4618187", "0.46031743", "0.45894456", "0.4574017", "0.45735654", "0.45703313", "0.4555363", "0.45449322", "0.4544558", "0.45380574", "0.4537389", "0.4528685", "0.4523422", "0.45224953", "0.45203277", "0.45196941", "0.45155624", "0.45144525", "0.45035297", "0.45035297", "0.45017436", "0.45014644", "0.44992173", "0.4497259", "0.44886768", "0.44855165", "0.44823772", "0.44809034" ]
0.7312518
1
Open a tabbed line reader to read a file, or optionally the standard input.
public TabbedLineReader openInput(File inFile) throws IOException { TabbedLineReader retVal; if (inFile == null) { log.info("Input will be taken from the standard input."); retVal = new TabbedLineReader(System.in); } else if (! inFile.canRead()) throw new FileNotFoundException("Input file " + inFile + " is not found or is unreadable."); else { log.info("Input will be read from {}.", inFile); retVal = new TabbedLineReader(inFile); } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public abstract void open(BufferedReader br) throws IOException;", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "Auditorium(java.util.Scanner input, java.io.File file){\r\n\t\t\r\n\t\tString line = input.next(); // read in next line from file // or nextLine()\r\n\t\tboolean flag = true;\r\n\t\tcolumns = line.length();\r\n\t\twhile(line != \"\" && flag != false) {\r\n\t\t\trows++; // increment number of rows\r\n\t\t\tif (!input.hasNext())\r\n\t\t\t\tflag = false;\r\n\t\t\tparseLine(line, rows, columns); // send line, array, and rows to a parse function\r\n\t\t\tif(input.hasNext())\r\n\t\t\t\tline = input.next(); //read in next line\r\n\t\t}\r\n\t}", "public static BufferedReader openBufferedReader(String pathOrUrl) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(openInputStream(pathOrUrl)));\n return reader;\n }", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public StatDataFileReader createReaderInstance() throws IOException{\n return createReaderInstance(null);\n }", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void cmdRead(String filename, boolean doEcho) {\n try {\n \tfilename = getFilenameToOpen(filename);\n \t\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n // read from file, echo each line as it is read\n Readline fReadline;\n \n if (Options.quiet || !doEcho)\n\t\t\t\tfReadline = LineInput.getStreamReadline(reader, false, \"\");\n else\n\t\t\t\tfReadline = LineInput.getStreamReadline(reader, true, getRelativeFileNameOfCurrentFile() + \"> \");\n fReadlineStack.push(fReadline);\n \n } catch (FileNotFoundException e) {\n Log.error(\"File `\" + filename + \"' not found.\");\n }\n }", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "public FileCommandInput(File inputFile) throws FileNotFoundException {\n Validate.notNull(inputFile, \"Input can't be NULL\");\n this.in = new LineNumberReader(new FileReader(inputFile));\n }", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "public static Scanner openInput(String fname){\n\t Scanner infile = null;\n\t try {\n\t infile = new Scanner(new File(fname));\n\t } catch(FileNotFoundException e) {\n\t System.out.printf(\"Cannot open file '%s' for input\\n\", fname);\n\t System.exit(0);\n\t }\n\t return infile;\n\t }", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public static TeaFileReader getReader(String fileFormat) {\r\n\t\tfor(FileFormats ff : FileFormats.values()) {\r\n\t\t\tif(ff.equals(fileFormat)) {\r\n\t\t\t\treturn ff.reader;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Default. Should never happen :)\r\n\t\treturn new TextReader();\r\n\t}", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\tFile filename = new File(\"D://normal.txt\");\r\n\t\tFileInputStream fstream = new FileInputStream(filename);\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\t\r\n\t}", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public static BufferedReader getReader(String fileName) throws IOException {\n return getReader(getPath(fileName));\n }", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "CompletableFuture<Optional<FutureLineStorage>> open(String fileName);", "public static BufferedReader asReader(String name) throws IOException {\n ClassLoader classLoader = Reflection.getCallerClass(3).getClassLoader();\n return new BufferedReader(new InputStreamReader(asStream(name, classLoader), UTF_8));\n }", "RandomAccessFile openInputFile(String fileName) {\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"fileName = \" + fileName);\n RandomAccessFile file = null;\n try {\n file = new RandomAccessFile(fileName, \"r\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"success: file opened for read\");\n } catch (Exception e) {\n ec.processError(e, thisClass, \"openInputFile\", \"\");\n if (dbg) System.out.println(\"<br>\" + thisClass + \".openInputFile: \" +\n \"error: file opened for read\");\n } // try-catch\n return file;\n }", "StreamReader underlyingReader();", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "private BufferedReader getBufferedReader(String filename) {\n\t\tBufferedReader retval;\n\t\ttry{\n\t\t\tretval = createReader(filename);\n\t\t\tif (retval != null) {\n\t\t\t\treturn retval;\n\t\t\t} else {\n\t\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t\t}\n\t\t}catch(NullPointerException e){\n\t\t\tDebug.error(\"Jay3DModel\", \"Unable to load file: \" + filename);\n\t\t}\n\t\treturn null;\n\t}", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "private DatasetFileLines load(DatasetDescription dataset, ExcelFileReader reader,\n File file) throws IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = null;\n try\n {\n int index = Integer.parseInt(excelSheet);\n lines = reader.readLines(index); // will throw exception if index is out of range\n } catch (NumberFormatException ex)\n {\n lines = reader.readLines(excelSheet);\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "public InputReader(File file){\n try {\n inputStream = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n instantiate();\n assert(invariant());\n }", "public MyInputStream(String fileName)\n {\n try\n {\n in = new BufferedReader\n (new FileReader(fileName));\n }\n catch (FileNotFoundException e)\n {throw new MyInputException(e.getMessage());}\n }", "public abstract T readDataFile(String fileLine);", "public static BufferedReader getFileBufferReader(String fileAddress)\n\t\t\tthrows FileNotFoundException {\n\t\treturn new BufferedReader(new FileReader(fileAddress));\n\t}", "public static BufferedReader getReader(Path path) throws IOException {\n return Files.newBufferedReader(path);\n }", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "public void initFromRows(String filename) throws IOException {\n long numLines = Util.getNumLinesOfFile(filename);\n if (numLines != this.numRows) {\n throw new IllegalStateException(\n String.format(\"Rows file has %d lines, expecting %d\", numLines, this.numRows)\n );\n }\n\n // Read from file\n BufferedReader br = new BufferedReader(new FileReader(filename));\n initFromRows(new FileLineIterator(br));\n br.close();\n }", "public BufferedReader2(Reader in, int sz)\r\n\t{\r\n\t\tsuper(in, sz);\r\n\t}", "public CharReader( String fileName )\n throws FileNotFoundException\n {\n lineNumberReader = new LineNumberReader(\n new FileReader( fileName ) );\n this.fileName = fileName;\n }", "public FastqReader(BufferedReader in)\n\t{\n\t\ttheBufferedReader = in;\n\t}", "public Reader getReader(String filename) throws FileNotFoundException {\n\t\ttry {\n\t\t\tInputStream inputStream = new FileInputStream(filename);\n\t\t\treturn new InputStreamReader(inputStream, \"UTF-8\");\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\tthrow new IllegalStateException(\"Unable to read input\", e);\n\t\t}\n\t}", "public LineProducer ( FileIterator input )\n {\n // Store the input on object creation in the global linesInput \n this.linesInput = input ;\n }", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }", "void open(String fileName);", "@SneakyThrows\n public Reader reader() {\n return new FileReader(this.temp);\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public FastaReader(String fileName) throws IOException{\n\t\tthis(new FileInputStream(fileName));\n\t}", "public InputReader() throws FileNotFoundException, TransformerConfigurationException {\n this.csvlocation = System.getProperty(Static.SYSYEM_PROPERTY_FILE);\n this.templatelocation = System.getProperty(Static.SYSTEM_PROPERTY_TEMPLATE_FILE);\n init();\n }", "@Test(timeout=100)\r\n\tpublic void testConstructorWithFilename() throws IOException {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tString filename = file.getAbsolutePath();\r\n\t\t//System.out.println(\"test: new CSVReader(\"+filename+\")\");\r\n\t\tCSVReader csv = new CSVReader(filename);\r\n\t\tassertTrue(\"Open with filename \"+filename, csv.hasNext());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertTrue(csv.hasNext());\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertFalse(csv.hasNext());\r\n\t}", "public RecordReader getRecordReader( InputSplit split, JobConf job, Reporter reporter ) throws IOException\n {\n MultiInputSplit multiSplit = (MultiInputSplit) split;\n JobConf currentConf = mergeConf( job, multiSplit.config, true );\n \n return currentConf.getInputFormat().getRecordReader( multiSplit.inputSplit, currentConf, reporter );\n }", "public FileTableEntry open(String filename, String mode)\n\t{\n\t\tFileTableEntry ftEnt = filetable.falloc(filename, mode);\n\n\t\t//checking mode for writing\n\t\tif (ftEnt != null) {\n\t\t\tif (mode.equals(\"w\")) {\n\t\t\t\tif(!deallocAllBlocks(ftEnt)) {\n\t\t\t\t\tftEnt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (mode.equals(\"a\")) {\n\t\t\t\tftEnt.seekPtr = ftEnt.inode.length;\n\t\t\t}\n\t\t}\n\t\treturn ftEnt;\n\t}", "@FunctionalInterface\n protected interface StreamReader<ReaderType> {\n void accept(RevisionDataInput input, ReaderType target) throws IOException;\n }", "public void openForInput (RecordDefinition recDef) \n throws IOException {\n openForInput (recDef.getDict());\n }", "private static BufferedReader newReader(InputStream stream) {\n return new BufferedReader(new InputStreamReader(stream));\n }", "public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }", "private static Scanner openFile(){\n\n System.out.println(\"Enter the input file name: \");\n Scanner kb = new Scanner(System.in);\n String fileName = kb.nextLine();\n try{\n return new Scanner(new File(fileName));\n }\n catch (Exception e){\n System.out.printf(\"Open Failed: \\n%s\\n\", e.toString());\n System.out.println(\"Please re-enter the filename.\");\n return openFile();\n }\n }", "public synchronized void open()\n throws LineUnavailableException, IllegalArgumentException, IllegalStateException, SecurityException\n {\n if (!open) {\n line.open(format);\n open = true;\n reset = true;\n }\n }", "public StreamIn(Reader fd, String filename, PrintStream err)\r\n\t{\r\n\t\tthis.fd = fd;\r\n\t\tthis.filename = filename;\r\n\t\tthis.syserr = err;\r\n\t\t\r\n\t\t/* initialize character slots */\r\n\t\tthisc = 0;\r\n\t thisc = getC();\t/* current */\r\n\t holdc = 0;\t/* next, if look ahead */\r\n\t lastc = 0;\t/* previous */\r\n\r\n\t /* initialize scan buffers */\r\n\t buffer = new byte[2][BUFSIZE];\r\n\t currentbuf = 0;\r\n\t bufpos = 0;\r\n\t prvsize = 0;\r\n\t cursize = 0;\r\n\t}", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "public void open() {\n\t\tJFileChooser fc = new JFileChooser(\"./\");\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfc.showOpenDialog(null);\n\t\ttry {\n\t\t\tfr = new FileReader(fc.getSelectedFile().getAbsolutePath());\n\t\t\tbr = new BufferedReader(fr);\n\t\t\t//make sure textArea is empty\n\t\t\ttextArea.setText(\"\");\n\t\t\t//loop to read all lines in file\n\t\t\twhile(br.readLine() != null) {\n\t\t\t\ttextArea.append(br.readLine() + \"\\n\");\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tie.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t\tfr.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public StreamReader() {}", "@Provides\r\n public DataInput provideInputReader() {\r\n DataInput input = null;\r\n final Reader inRdr = inReader;\r\n if ((inRdr != null) && (inputFormat != null)) {\r\n if (\"csv\".equalsIgnoreCase(inputFormat))\r\n input = new CSVDataInput(inRdr);\r\n else if (\"json\".equalsIgnoreCase(inputFormat))\r\n input = new JSONDataInput(inRdr);\r\n else\r\n throw new IllegalArgumentException(\"Input format \"\r\n + inputFormat + \" not supported.\"\r\n + \" Valid types are csv, json\");\r\n input.verboseOptions(verboseStream, verbose);\r\n }\r\n return input;\r\n }", "@Override\n\t\tpublic RecordReader<LongWritable, Text> getRecordReader(\n\t\t\t\tInputSplit genericSplit, JobConf job, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\treporter.setStatus(genericSplit.toString());\n\t\t\treturn new MyRecordReader(job, (FileSplit) genericSplit);\n\t\t}", "public static BufferedReader getBufferedReader(String filePath) {\r\n\r\n BufferedReader bufferedReader = null;\r\n try {\r\n bufferedReader = Files.newBufferedReader(Paths.get(filePath), Charset.defaultCharset());\r\n } catch (IOException ex) {\r\n Logger.getLogger(FileUtility.class.getName()).log(Level.SEVERE, \"Error in readLine\", ex);\r\n }\r\n return bufferedReader;\r\n }", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "private BufferedReader\n\tgetStreamReader(\n\t\tInputStream\tinputStream)\n\t{\n\t\treturn(new BufferedReader(new InputStreamReader(inputStream)));\n\t}", "public static BufferedReader getReader(InputStream in) {\n try {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));\n } catch(Throwable ignored) {\n }\n return null;\n }", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "public static BufferedReader get(Reader in) {\n if(in == null || in instanceof BufferedReader) {\n return (BufferedReader)in;\n }\n return new BufferedReader(in);\n }", "public InstanceReader(String filename) throws FileNotFoundException{\n this.reader = new FileReader(filename);\n }", "public InputStream readFile( String fileName, FileType type );", "private BufferedReader abrirArquivoLeitura() throws FileNotFoundException {\n\t\tBufferedReader file = null;\n\t\tfile = new BufferedReader(new FileReader(caminho));\n\t\treturn file;\n\t}", "public static void main(String[] args) throws IOException {\n\n\t\t\n\t\tFileReader fr = new FileReader(\"G:\\\\buf.txt\");\n\t\t\n\t\tMyBufferedReader bufr = new MyBufferedReader(fr);\n\t\t\n\t\tString len = null;\n\t\t\n\t\twhile((len = bufr.myReadLine()) != null){\n\t\t\tSystem.out.println(len);\n\t\t}\n\t\t\n\t\tbufr.myclose();\n\t}", "public static void main (String[] args) throws IOException\n {\n Scanner fileScan, lineScan;\n String fileName;\n\n Scanner scan = new Scanner(System.in);\n\n System.out.print (\"Enter the name of the input file: \");\n fileName = scan.nextLine();\n fileScan = new Scanner(new File(fileName));\n\n // Read and process each line of the file\n\n\n\n\n }", "public static BufferedInputStream getInput(String fileName) throws IOException {\n return getInput(getPath(fileName));\n }", "public CsvReader(String filename, String seperator) {\n\t\tthis.seperator = seperator;\n\t\treadFile(filename, true);\n\t}", "public StreamReader(File file) {\r\n\t\tthis.setFile(file);\r\n\t}", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "protected abstract Reader getReader() throws IOException;" ]
[ "0.65447116", "0.6325499", "0.57132506", "0.5706704", "0.5684978", "0.56542766", "0.56542766", "0.5619859", "0.5602057", "0.5523603", "0.54900545", "0.54859424", "0.5483005", "0.54302925", "0.5352948", "0.53031904", "0.5250596", "0.5177034", "0.5173052", "0.51238394", "0.5075502", "0.50695217", "0.50684667", "0.5049437", "0.50448817", "0.50214344", "0.50067186", "0.49864027", "0.49785435", "0.49639383", "0.4960139", "0.48825252", "0.48418003", "0.48177686", "0.47622007", "0.47575778", "0.47349143", "0.472443", "0.47229576", "0.4721654", "0.47181323", "0.471786", "0.47008628", "0.46971422", "0.46941254", "0.46869662", "0.46855888", "0.46746704", "0.46737805", "0.46652725", "0.46473324", "0.46462062", "0.4641189", "0.46394295", "0.46379793", "0.462945", "0.46186247", "0.4609573", "0.46077257", "0.46007502", "0.45872334", "0.45845276", "0.45772555", "0.45752856", "0.45684844", "0.45612538", "0.45599714", "0.4558372", "0.45527774", "0.4546577", "0.4537568", "0.45351568", "0.45294917", "0.4525362", "0.45232677", "0.45193288", "0.45192608", "0.45020485", "0.45005405", "0.44716397", "0.44636443", "0.44565046", "0.44549006", "0.44540113", "0.445245", "0.445132", "0.443894", "0.4430438", "0.44274995", "0.44264135", "0.44240868", "0.442282", "0.44205812", "0.44189698", "0.44177026", "0.44143334", "0.44135436", "0.441151", "0.44036913", "0.4402045" ]
0.7746607
0
Open a tabbed line reader to read a list of strings.
public TabbedLineReader(List<String> strings) { this.stream = null; this.reader = strings.iterator(); this.delim = '\t'; this.readHeader(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public static List<String> readLines(final Reader input) throws IOException {\n final BufferedReader reader = new BufferedReader(input);\n final List<String> list = new ArrayList<String>();\n String line = reader.readLine();\n while (line != null) {\n list.add(line);\n line = reader.readLine();\n }\n return list;\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public static LinkedList<Patient> TSVImport(String str) {\n\t\treturn TSVImport(new File(str));\n\t}", "public static List<String> readLines(BufferedReader reader) throws IOException {\n List<String> lines = new ArrayList();\n eachLine(reader, lines);\n return lines;\n }", "List<String> getLines();", "public void setRows(List<String> rowNames);", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public void readViolationList (BufferedReader reader) {\n String line = \"\";\n try {\n reader.readLine();\n reader.readLine();\n while ((line = reader.readLine()) != null) {\n addToViolationList(line);\n }\n } catch (Exception e) {\n }\n }", "public interface Reader {\n public List<String> readAllLines();\n}", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void readListFromFile() {\n // clear existing list\n if (listArr == null || listArr.size() > 0) {\n listArr = new ArrayList<>();\n }\n\n try {\n Scanner scan = new Scanner(openFileInput(LIST_FILENAME));\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n listArr.add(line);\n }\n\n if (listAdapter != null) {\n listAdapter.notifyDataSetChanged();\n }\n\n } catch (IOException ioe) {\n Log.e(\"ReadListFromFile\", ioe.toString());\n }\n\n }", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "public static List<String> readLines(final InputStream input) throws IOException {\n return readLines(input, Charset.defaultCharset());\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public void openList() {\n\t\tString title = resourceManager.getString(\"process.view.list.title\");\n\t\tint indexOfTab = tabbedPane.indexOfTab(title);\n\t\tif (indexOfTab >= 0) {\n\t\t\ttabbedPane.setSelectedIndex(indexOfTab);\n\t\t} else {\n\t\t\tlView = new ListView(this, resourceManager);\n\t\t\ttabbedPane.addTab(title, lView);\n\n\t\t\ttabbedPane.setTabComponentAt(tabbedPane.indexOfTab(title),\n\t\t\t\t\tnew ButtonTabComponent(tabbedPane, this, lView,\n\t\t\t\t\t\t\tresourceManager));\n\t\t\tindexOfTab = tabbedPane.indexOfTab(title);\n\t\t\ttabbedPane.setSelectedIndex(indexOfTab);\n\t\t\tloadListView();\n\t\t}\n\t}", "public static void read6() {\n List<String> list = new ArrayList<>();\n\n try (BufferedReader br = Files.newBufferedReader(Paths.get(filePath))) {\n\n //br returns as stream and convert it into a List\n list = br.lines().collect(Collectors.toList());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n list.forEach(System.out::println);\n }", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "public ListReader(String stop) {\n this.stop = stop;\n ListItemReader r = new ListItemReader();\n r.setListReader(this);\n r.setStop(stop);\n this.reader = r;\n this.seperator = new TextReader(\",\");\n }", "public static List<String> readIn(String filename) throws Exception {\r\n Path filePath = new File(filename).toPath();\r\n Charset charset = Charset.defaultCharset(); \r\n List<String> stringList = Files.readAllLines(filePath, charset);\r\n\r\n return stringList;\r\n }", "public static Stream<List<String>> parse(InputStream in) {\n BufferedReader br = UTF8IoUtils.readerFromStream(in);\n return br.lines().map(CSVUtils::parseLine);\n }", "static List<Student> loadStudentList(InputStream in) {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))\n .lines()\n .skip(1)\n .map(Student::fromCsv)\n .collect(Collectors.toList());\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "public static LinkedList<Patient> CSVImport(String str) {\n\t\treturn CSVImport(new File(str));\n\t}", "public static Queue<String> linesFromInput(SimpleReader input) {\n assert input != null : \"Violation of: input is not null\";\n assert input.isOpen() : \"Violation of: input.is_open\";\n\n Queue<String> lines = new Queue1L<String>();\n while (!input.atEOS()) {\n String text = input.nextLine(); // reads next line\n lines.enqueue(text);\n\n }\n return lines;\n }", "ArrayList<String> getLines();", "private static List<StudentRecord> convert(List<String> lines) {\n\t\tObjects.requireNonNull(lines);\n\t\t\n\t\tArrayList<StudentRecord> result = new ArrayList<>(lines.size());\n\t\t\n\t\tfor(String data : lines) {\n\t\t\tif(data.length() == 0) continue; //preskoci prazne linije\n\t\t\tScanner sc = new Scanner(data);\n\t\t\tsc.useDelimiter(\"\\t\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tresult.add(new StudentRecord(sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next()));\n\t\t\t}catch(NoSuchElementException e) {\n\t\t\t\tsc.close();\n\t\t\t\tthrow new NoSuchElementException(\"Data not formatted correctly.\");\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public List<String> getRows();", "@Override\n public void importFromFile(SpreadsheetTable focusOwner, UIController uiController) {\n\n List<List<String>> listString = null;\n try {\n listString = readFile();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(ImportExportTextLinkStrategy.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (listString.isEmpty()) {\n return;\n }\n\n int initrow = focusOwner.getSelectedRow();\n int initCol = focusOwner.getSelectedColumn();\n int start = 0;\n if (this.header) {\n start++;\n }\n \n this.selectedCells = new Cell[listString.size()][listString.get(0).size()];\n \n for (int i = start; i < listString.size(); i++, initrow++) {\n for (int j = 0; j < listString.get(i).size(); j++, initCol++) {\n try {\n uiController.getActiveSpreadsheet().getCell(initCol, initrow).setContent(listString.get(i).get(j));\n \n this.selectedCells[i][j] = uiController.getActiveSpreadsheet().getCell(initCol, initrow);\n \n } catch (FormulaCompilationException ex) {\n Logger.getLogger(ImportExportTextLinkStrategy.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n initCol = focusOwner.getSelectedColumn();\n }\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public static List<String> readLines(final InputStream input, final String encoding) throws IOException {\n return readLines(input, Charset.forName(encoding));\n }", "public void readFromFile() {\n //reading text from file\n\n try {\n Scanner scanner = new Scanner(openFileInput(\"myTextFile.txt\"));\n\n while(scanner.hasNextLine()){\n\n String line = scanner.nextLine();\n\n String[] lines = line.split(\"\\t\");\n\n System.out.println(lines[0] + \" \" + lines[1]);\n\n toDoBean newTask = new toDoBean(lines[0], lines[1], 0);\n // System.out.println(line);\n sendList.add(newTask);\n\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setReaderToArray(){\n try{\n String client, number = null;\n\n File reader = new File(\"clientFile/clientInfo.txt\");\n\n Scanner scn = new Scanner(reader);\n scn.useDelimiter(\",\");\n\n while(scn.hasNext()){\n number = scn.next();\n client = scn.next();\n\n clientList.add(client + \" - \" + number);\n }\n scn.close();\n }catch (FileNotFoundException exception){\n System.out.println(\"An error occurred.\");\n }\n }", "public void readFromStream(Reader r) throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(r);\n\t\tlines=new ArrayList();\n\n\t\twhile(true) {\n\t\t\tString input=br.readLine();\n\t\t\tif(input==null)\n\t\t\t\tbreak;\n\t\t\tlines.add(input);\n\t\t}\n\t}", "public GenericLineByLineParser(InputStreamReader reader) {\n this.br = new BufferedReader(reader);\n }", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "private static String[] readLines(InputStream f) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(f, \"US-ASCII\"));\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tString line;\n\t\twhile ((line = r.readLine()) != null)\n\t\t\tlines.add(line);\n\t\treturn lines.toArray(new String[0]);\n\t}", "public List<Products> readFile(BufferedReader reader, List<Products> productList) throws IOException {\n\t\tif (null == reader) {\n\t\t\treader = new BufferedReader(new FileReader(FileHandelling.RECORDS_FILE));\n\t\t} else {\n\t\t\tString line;\n\t\t\tProducts products = new Products();\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] temp = line.split(\",\");\n\t\t\t\tproducts = new Products();\n\t\t\t\tproducts.setId(Integer.parseInt(temp[0]));\n\t\t\t\tproducts.setName(temp[1]);\n\t\t\t\tproducts.setBrand(temp[2]);\n\t\t\t\tproducts.setPrice(Float.parseFloat(temp[3]));\n\t\t\t\tproductList.add(products);\n\t\t\t}\n\n\t\t}\n\t\treturn productList;\n\t}", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "private String[] readFile(BufferedReader reader) throws IOException {\r\n // Read each line in the file, add it to the ArrayList lines\r\n ArrayList<String> lines = new ArrayList<String>();\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n lines.add(line);\r\n }\r\n reader.close();\r\n // Convert the list to an array of type String and return\r\n String[] ret = new String[1];\r\n return (lines.toArray(ret));\r\n }", "java.util.List<String>\n getRowsList();", "public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t//Set the variable to the number of lines in the text file through the function in this class that is defined below\n\t\tnumberOfLines = readLines();\n\t\t//Creates an array of strings with size of how many lines of data there are in the file\n\t\tString[] textData = new String[numberOfLines];\n\t\t\n\t\t//Loop to read the lines from the text file for the song data\n\t\tfor (int i = 0; i < numberOfLines; i++)\n\t\t{\n\t\t\t//Read data from song file and into the string list\n\t\t\ttextData[i] = textReader.readLine();\n\t\t}\n\t\t\n\t\t//Close the BufferedReader that was opened\n\t\ttextReader.close();\n\t\t\n\t\t//Return the read data from the text file in the form of a string array\n\t\treturn textData;\n\t}", "public void fillList (File file) throws FileNotFoundException {\n\t\tif (!file.getName().endsWith(\".srt\")) {\n\t\t\tthrow new IllegalArgumentException(\"Only .srt files supported\");\n\t\t}\n\n\t\t//create file reader tied to the .srt file, used JUST to count the # of lines\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e; //let it propogate up\n\t\t}\n\n\t\tint numOfBlocks = countNumberOfStringBlocks();\n\t\t\n\t\t//don't directly copy into stringList, as there could be errors reading file.\n\t\t//don't want to overwrite current stringList until entire file is read succesfully.\n\t\tStringBlock[] stringListBuffer = new StringBlock[numOfBlocks];\t\t//instantiate the array of stringblocks to the size needed\n\t\t//end of file reached during countNumberOfStringBlocks();\n\t\t\n\t\treader.close();\n\t\t\n\t\tcurrentLineNum = 0;\n\t\t//return reader back to top of the file, to begin parsing/storing chunks\n\t\ttry {\n\t\t\treader = new Scanner(file);\n\t\t} catch(FileNotFoundException e) {\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\tStringBlock stringBlock;\n\t\tint index = 0;\n\t\t\n\t\t//read in stringblocks, and store them in order\n\t\ttry{\n\t\t\twhile ((stringBlock = parseNextStringBlock()) != null) {\n\t\t\t\tstringListBuffer[index] = stringBlock;\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t//end of file reached successfully\n\t\t\t\n\t\t\tstringList = stringListBuffer;\n\t\t} catch (IllegalStateException e) {\n\t\t\tthrow e; //let it propogate all the way up to the method where the file is selected\n\t\t}\n\t\t\n\t\t//close reader\n\t\treader.close();\n\t}", "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "List<Line> getLines();", "public void readIn(ArrayList<String> lines, int idx){\n\t\tfor (int i=idx+1;i<lines.size();i++){\n\t\t\tString[] parts = lines.get(i).split(\" \");\n\t\t\tif (parts[0].charAt(0) != '-'){\n\t\t\t\ti = lines.size();\n\t\t\t}\n\t\t\tswitch (parts[0]){\n\t\t\t\tcase \"-TileID:\":\n\t\t\t\t\tthis.setTile(Game.getInstance().getTileContained(Integer.parseInt(parts[1])));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-Chance:\":\n\t\t\t\t\tthis.chance = Integer.parseInt(parts[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }\n return listBefore;\n }", "private DatasetFileLines load(DatasetDescription dataset, ExcelFileReader reader,\n File file) throws IOException\n {\n assert reader != null : \"Unspecified reader\";\n\n List<String[]> lines = null;\n try\n {\n int index = Integer.parseInt(excelSheet);\n lines = reader.readLines(index); // will throw exception if index is out of range\n } catch (NumberFormatException ex)\n {\n lines = reader.readLines(excelSheet);\n }\n return new DatasetFileLines(file, dataset.getDataSetCode(), lines, ignoreTrailingEmptyCells);\n }", "List<String[]> readAll();", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "public static LinkedList<String> readLinesAsLinkedList(String path) {\n return new LinkedList<>(readLines(path));\n }", "default String[][] txtReader(String fileString) {\n\t\ttry {\n\t\t\tScanner myReader = new Scanner(new File(fileString));\n\t\t\tArrayList<String[]> lines = new ArrayList<>();\n\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString[] splitted = myReader.nextLine().split(\" \");\n\t\t\t\tlines.add(splitted);\n\t\t\t}\n\n\t\t\tString[][] result = new String[lines.size()][];\n\t\t\tfor (int i = 0; i < result.length; i++) {\n\t\t\t\tresult[i] = lines.get(i);\n\t\t\t}\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file is not occurred \" + e.getMessage());\n\t\t}\n\t\treturn null;\n\n\t}", "public ArrayList<String> createArray(BufferedReader reader) {\n ArrayList<String> s = new ArrayList<String>();\n try {\n\n for (String x = reader.readLine(); x != null; x = reader.readLine()) {\n s.add(x);\n }\n\n }catch (IOException e)\n {}\n return s;\n }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }", "public ArrayList<String> createStringArray() throws Exception {\n ArrayList<String> stringsFromFile = new ArrayList<>();\n while (reader.hasNext()) {\n stringsFromFile.add(reader.nextLine());\n }\n return stringsFromFile;\n }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public void readtabs(File f) {\r\n \tString str = new String();\r\n try{\r\n BufferedReader br = new BufferedReader(new FileReader(f.getAbsolutePath()));\r\n str = br.readLine();\r\n \r\n while((str = br.readLine()) != null){\r\n //str = str.replaceAll(\";\", \"\");\r\n String info[] = str.split(\";\");\r\n if(f.getName().equals(\"mdl_chat_messages.txt\")){\r\n \t//chat message id; chatid; userid; groupid; system; message; timestamp;\r\n \tmobileact ma = new mobileact(info[2].trim(), info[6].trim(), \"Chat Message\", info[5]);\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_forum_posts.txt\")){\r\n \t//id; discussion; parent; userid; created; modified; mailed; subject; message; \r\n \t//messageformat; messagetrust; attachment; totalscore; mailnow; \r\n \tmobileact ma = new mobileact(info[3].trim(), info[5].trim(), \"Forum Posts\", info[8].trim());\r\n \tmobact.add(ma);\r\n }else if(f.getName().equals(\"mdl_quiz_attempts.txt\")){\r\n \t//id; quiz; userid; attempt; uniqueid; layout; currentpage; \r\n \t//preview; state; timestart; timefinish; timemodified; timecheckstate; \r\n \t//sumgrades; needsupgradetonewqe; \r\n \tmobileact ma = new mobileact(info[2].trim(), info[11].trim(), \"Attempt Quiz\", info[8].trim());\r\n \tmobact.add(ma);\r\n }\r\n }\r\n br.close();\r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(null, \"read moodle log file failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public ArrayList<String[]> read(String s) throws IOException,\n\t\t\tFileNotFoundException {\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\n\t\tFileReader fr = new FileReader(s);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString[] row = new String[6];\n\t\tString line;\n\t\twhile (true) {\n\t\t\tline = br.readLine();\n\t\t\tif (line == null) {\n\t\t\t\tbr.close();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\trow = line.split(\",\");\n\t\t\tresult.add(row);\n\t\t}\n\t}", "private static ListOfString readListAndClose(final ILogger aLogger,\r\n final ResultSet aResultSet) {\r\n if (aResultSet==null) return null;\r\n ListOfString r;\r\n if (!moveNext(aLogger, aResultSet)) {\r\n r= new ListOfString();\r\n } else {\r\n r= getRowAsList(aLogger, aResultSet);\r\n }\r\n close(aLogger, aResultSet);\r\n return r;\r\n }", "public static List<String> readLines(final InputStream input, final Charset encoding) throws IOException {\n final InputStreamReader reader = new InputStreamReader(input, encoding);\n return readLines(reader);\n }", "@Test(timeout=100)\r\n\tpublic void testConstructorWithFilename() throws IOException {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tString filename = file.getAbsolutePath();\r\n\t\t//System.out.println(\"test: new CSVReader(\"+filename+\")\");\r\n\t\tCSVReader csv = new CSVReader(filename);\r\n\t\tassertTrue(\"Open with filename \"+filename, csv.hasNext());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertTrue(csv.hasNext());\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertFalse(csv.hasNext());\r\n\t}", "private String[] readLine(BufferedReader r) throws IOException\r\n\t{\r\n\t\tSystem.out.print(\"> \");\r\n\t\tfinal String line = r.readLine();\r\n\t\treturn line != null ? split(line) : null;\r\n\t}", "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "List<ThingPackage> parseLines(List<String> line);", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "private void readStringCells( InputStream istrm ) throws IOException {\n PushbackInputStream stream =\n new PushbackInputStream( new BufferedInputStream( istrm ) );\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n endRow();\n break;\n case '#':\n if ( rows.size() == 0 ) {\n comments.add( eatLine( stream ) );\n }\n else {\n eatLine( stream );\n }\n endRow();\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n addCell( readString( stream ) );\n break;\n case END:\n done = true;\n endRow();\n break;\n default:\n stream.unread( c );\n addCell( readToken( stream ) );\n }\n }\n stream.close();\n }", "public static ArrayList<String> readLines(String fileName){\n\t\treturn read(fileName, false);\n\t}", "private static List<String> loadGenericDfFile(String file) throws IOException{\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file), \"UTF-8\"));\n\t\ttry {\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tlines.add(str);\n\t\t\t}\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\n\t\treturn lines;\n\t}", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "void loadSet() {\n int returnVal = fc.showOpenDialog(this);\n if (returnVal != JFileChooser.APPROVE_OPTION) {\n System.out.println(\"Open command cancelled by user.\");\n return;\n }\n file = fc.getSelectedFile();\n System.out.println(\"Opening: \" + file.getName());\n closeAllTabs();\n try {\n FileInputStream fis = new FileInputStream(file);\n ObjectInputStream ois = new ObjectInputStream(fis);\n //loopButton.setSelected( ois.readObject() ); \n ArrayList l = (ArrayList) ois.readObject();\n System.out.println(\"read \"+l.size()+\" thingies\");\n ois.close();\n for(int i=0; i<l.size(); i++) {\n HashMap m = (HashMap) l.get(i);\n openNewTab();\n getCurrentTab().paste(m);\n }\n } catch(Exception e) {\n System.out.println(\"Open error \"+e);\n }\n }", "static List<String> readLines(InputStream in) throws IOException {\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\t\tString line = null;\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "public static ObservableList<JobSheet> readingDB() throws IOException {\n\n ObservableList<JobSheet> sheet = FXCollections.observableArrayList();\n\n Scanner scan = new Scanner(new File(System.getProperty(\"user.dir\") + \"/src/jobSheet/jobSheetDB.txt\"));\n scan.useDelimiter(\"[,\\n]\");\n\n while (scan.hasNext()) {\n\n sheet.add(new JobSheet(scan.next(), scan.next(), scan.next(), scan.next()));\n }\n scan.close();\n\n return sheet;\n }", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using a programmer-managed byte-array\n\t\ttry (FileInputStream in = new FileInputStream(inFileStr)) {\n\t\t\tstartTime = System.nanoTime();\n\t\t\tbyte[] byteArray = new byte[bufferSize];\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(byteArray)) != -1) {\n\t\t\t\tsnippets.add(new String(byteArray));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader( getInstream() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static List<Polyomino> openFile() {\n \tString basePath = new File(\"\").getAbsolutePath();\n Path path = Paths.get(basePath, \"polyominoesINF421.txt\");\n Charset charset = Charset.forName(\"UTF-8\");\n List<Polyomino> polyominos = new LinkedList<Polyomino>();\n\t\ttry {\n\t\t\tList<String> lines = Files.readAllLines(path, charset);\n\t\t\tfor (String line : lines) {\n\t\t\t\tpolyominos.add(new Polyomino(line));\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n return polyominos;\n }", "public List<String> readFileIntoList(String filepath) throws IOException;", "abstract public boolean loadModelFromString(List<String> lines);", "@Override\n\tpublic void ReadTextFile() {\n\t\t// Using Buffered Stream I/O\n\t\ttry (BufferedInputStream in = new BufferedInputStream(new FileInputStream(inFileStr))) {\n\t\t\tbyte[] contents = new byte[bufferSize];\n\t\t\tstartTime = System.nanoTime();\n\t\t\tint bytesCount;\n\t\t\twhile ((bytesCount = in.read(contents)) != -1) {\n\t\t\t\tsnippets.add(new String(contents));\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public String[] buildEntries(String a) {\n try {\n File file = new File(a);\n Scanner input = new Scanner(file);\n while (input.hasNextLine()) {\n String line=input.nextLine();\n String name=line.substring(line.indexOf(\"\\t\"));\n name=name.substring(0,name.lastIndexOf(\"H\"));\n name=name.substring(0,name.lastIndexOf(\"\\t\"));\n int entries=Integer.parseInt(line.substring(line.lastIndexOf(\"\\t\")+1,line.lastIndexOf(\"E\")));\n while (entries>0) {\n entryList.add(name);\n entries--;\n System.out.println(\"Added: \"+name);\n }\n}\n return drawBE(entryList,a);\n }\n catch(FileNotFoundException b) {\n System.out.println(\"Error, no entries\"); \n String ret[] = new String[6];\n ret[0]=\"NOFILE\";\n return ret;\n }\n }", "private static List<String> stringToList(String string) {\n\t // Create a tokenize that uses \\t as the delim, and reports\n\t // both the words and the delimeters.\n\t\tStringTokenizer tokenizer = new StringTokenizer(string, \"\\t\", true);\n\t\tList<String> row = new ArrayList<String>();\n\t\tString elem = null;\n\t\tString last = null;\n\t\twhile(tokenizer.hasMoreTokens()) {\n\t\t\tlast = elem;\n\t\t\telem = tokenizer.nextToken();\n\t\t\tif (!elem.equals(\"\\t\")) row.add(elem);\n\t\t\telse if (last.equals(\"\\t\")) row.add(\"\");\n\t\t\t// We need to track the 'last' state so we can treat\n\t\t\t// two tabs in a row as an empty string column.\n\t\t}\n\t\tif (elem.equals(\"\\t\")) row.add(\"\"); // tricky: notice final element\n\t\t\n\t\treturn(row);\n\t}", "public static List<List<String>> readFile() {\r\n List<List<String>> out = new ArrayList<>();\r\n File dir = new File(\"./tmp/data\");\r\n dir.mkdirs();\r\n File f = new File(dir, \"storage.txt\");\r\n try {\r\n f.createNewFile();\r\n Scanner s = new Scanner(f);\r\n while (s.hasNext()) {\r\n String[] tokens = s.nextLine().split(\"%%%\");\r\n List<String> tokenss = new ArrayList<>(Arrays.asList(tokens));\r\n out.add(tokenss);\r\n }\r\n return out;\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public static List<String> readListOfStringsFromFile(String filePath) throws IOException {\n List<String> list = new ArrayList<>();\n Files.lines(Paths.get(filePath), StandardCharsets.UTF_8).forEach(list::add);\n return list;\n }", "public static ArrayList<String[]> open() {\r\n int r = file.showOpenDialog(null);\r\n ArrayList<String> data = new ArrayList<>();\r\n String line = \"\";\r\n ArrayList<String[]> datosF = new ArrayList<String[]>();\r\n\r\n if (r == JFileChooser.APPROVE_OPTION) {\r\n arch = file.getSelectedFile();\r\n ruta = arch.getAbsolutePath();\r\n System.out.println(\"\\nArchivo a utilizar: \" + arch.getAbsolutePath());\r\n try {\r\n FileReader read = new FileReader(ruta);\r\n BufferedReader read1 = new BufferedReader(read);\r\n data.add(read1.readLine());\r\n while ((line = read1.readLine()) != null) {\r\n line = line.toLowerCase();\r\n data.add(line);\r\n }\r\n } catch (ArithmeticException | IOException | NumberFormatException e) {\r\n System.out.println(e.toString());\r\n }\r\n }\r\n\r\n for (int i = 0; i < data.size(); i++) {\r\n String[] l = data.get(i).toLowerCase().split(\" \");\r\n datosF.add(l);\r\n }\r\n return datosF;\r\n }", "public static List<String> readColumn(File inFile, String string) throws IOException {\n List<String> retVal = new ArrayList<String>(100);\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int inCol = inStream.findField(string);\n for (TabbedLineReader.Line line : inStream)\n retVal.add(line.get(inCol));\n }\n return retVal;\n }", "TraceList read(File file) throws IOException;", "public abstract void open(BufferedReader br) throws IOException;", "public SqlFileList(String filename) throws IOException {\n\n BufferedReader br = new BufferedReader(new FileReader(filename));\n String s, trimmed;\n StringTokenizer st;\n int ctr = 0;\n\n while ((s = br.readLine()) != null) {\n ctr++;\n\n trimmed = s.replaceFirst(\"#.*\", \"\").trim(); // Remove comments.\n\n if (trimmed.length() < 1) {\n continue; // Skip blank and comment lines\n }\n\n st = new StringTokenizer(trimmed);\n\n if (st.countTokens() < 2) {\n throw new IOException(\"Bad line no. \" + ctr\n + \" in list file '\" + filename\n + \"'\");\n }\n\n add(new TestSqlFile(st.nextToken(), st.nextToken(\"\")));\n }\n\n br.close();\n }", "static List<String> fileReader(String fileName){\n \n \n //Read a file and store the content in a string array.\n File f = new File(fileName);\n BufferedReader reader = null;\n String tempString = null;\n List<String> fileContent = new ArrayList<String>();\n //String[] fileContent = null;\n //int i = 0;\n \n try {\n reader = new BufferedReader(new FileReader(f));\n while ((tempString = reader.readLine()) != null){\n //while ((fileContent[i] = reader.readLine()) != null){\n fileContent.add(tempString);\n //i++;\n }\n reader.close();\n } catch (FileNotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n finally{\n if (reader != null){\n try{\n reader.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }\n }\n \n return fileContent;\n \n }", "public String[] readLines() {\n\t\tVector linesVector = new Vector(); ;\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader b = new BufferedReader(fr);\n\t\t\tboolean eof = false;\n\t\t\twhile (!eof) {\n\t\t\t\tString line = b.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t} else {\n\t\t\t\t\tlinesVector.add(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\tb.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new IllegalArgumentException(\"File \" + file.getName() +\n\t\t\t\t\" is unreadable : \" + e.toString());\n\t\t}\n\t\tString[] lines = new String[linesVector.size()];\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tlines[i] = (String) (linesVector.get(i));\n\t\t}\n\t\treturn lines;\n\t}", "public abstract List<UIReader> getReaderList();", "public void readRestaurantDetail (BufferedReader reader) {\n\n\n try {\n // Each line of CSV will be stored in this String\n String line = \"\";\n reader.readLine();\n int id = 0;\n while ((line = reader.readLine()) != null) {\n// count++;\n\n // line will be split by \",\", into an array of String\n String[] eachDetailsOfRestaurant = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n\n // Restaurant object created with the tracking number and name.\n Restaurant restaurant = new Restaurant(eachDetailsOfRestaurant[0], eachDetailsOfRestaurant[1], id);\n\n// Log.e(\"checking..............\", count.toString() + \" \" + restaurant.getName());\n\n // Converting coordinates to double and creating Location object\n for (int i = 0; i < eachDetailsOfRestaurant.length; i++) {\n Log.e(TAG, \"\" + i + \":\" + eachDetailsOfRestaurant[i]);\n }\n Double latitude = Double.parseDouble(eachDetailsOfRestaurant[5]);\n Double longitude = Double.parseDouble(eachDetailsOfRestaurant[6]);\n Location location = new Location(eachDetailsOfRestaurant[2], eachDetailsOfRestaurant[3], latitude, longitude);\n\n // Setting Location of the restaurant and adding to the Arraylist\n restaurant.setLocation(location);\n restaurants.add(restaurant);\n id++;\n }\n Collections.sort(restaurants);\n } catch (IOException e) {\n// e.printStackTrace();\n }\n }" ]
[ "0.55146515", "0.539271", "0.5336371", "0.53304684", "0.5284387", "0.5213921", "0.5208221", "0.51530474", "0.51492125", "0.5147524", "0.5112839", "0.50474674", "0.5046461", "0.4976058", "0.49724358", "0.4959578", "0.4946258", "0.49429014", "0.49297255", "0.49214575", "0.49157223", "0.48996535", "0.48987985", "0.4895544", "0.4870226", "0.48653176", "0.48649484", "0.48601392", "0.48487645", "0.48467797", "0.48426858", "0.48405656", "0.48346034", "0.48282135", "0.48180625", "0.48108622", "0.48091337", "0.48061877", "0.48054698", "0.480347", "0.47857878", "0.47760102", "0.47697678", "0.47646758", "0.47587284", "0.47547007", "0.4753201", "0.47357163", "0.47356433", "0.47220778", "0.47143286", "0.47035947", "0.46959135", "0.46938127", "0.4670354", "0.46619007", "0.46590725", "0.4657267", "0.46553057", "0.46500593", "0.46488625", "0.46389672", "0.4638649", "0.463765", "0.46332857", "0.46191472", "0.46155998", "0.4614795", "0.46051574", "0.46042097", "0.46017778", "0.4600282", "0.45994386", "0.45992458", "0.45935798", "0.45893225", "0.45869476", "0.45778552", "0.45763117", "0.45736843", "0.45708498", "0.45696914", "0.4568392", "0.45638967", "0.45609987", "0.45467773", "0.45387936", "0.4530957", "0.45299712", "0.45287153", "0.4494003", "0.44931716", "0.44917575", "0.4489012", "0.44788596", "0.44694048", "0.44673303", "0.44519925", "0.4450967", "0.4441009" ]
0.7116868
0
Open a tabbedline reader for a headerless file with an alternate delimiter
public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException { this.openFile(inFile, delimiter); this.clearLabels(fields); this.readAhead(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TabbedLineReader(InputStream inStream, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(File inFile, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream) throws IOException {\n this.openFile(inStream, '\\t');\n this.readHeader();\n }", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "protected ReaderContext<FSDataInputStream> createDelimitedReaderContext()\n {\n return new ReaderContext.ReadAheadLineReaderContext<FSDataInputStream>();\n }", "private void openFile(InputStream inStream, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = inStream;\n this.reader = new LineReader(inStream);\n }", "private void skipHeader() throws IOException {\n // The header contains two dashed lines; the data begins\n // immediately after the second dashed line...\n //\n readToDashedLine();\n readToDashedLine();\n }", "String getLineDelimiter(int line) throws BadLocationException;", "private void openFile(File inFile, char delimiter) throws IOException {\n this.delim = delimiter;\n this.stream = new FileInputStream(inFile);\n this.reader = new LineReader(this.stream);\n }", "public abstract boolean isFirstLineHeader();", "static void headerFormat(FileWriter fw) throws IOException { \r\n\t\t//fw.append(\"\\n\");\r\n\t\tfw.append(\"levelId\");\r\n fw.append(',');\r\n fw.append(\"rideName\");\r\n fw.append(',');\r\n fw.append(\"ridestartEndLocation\");\r\n fw.append(',');\r\n fw.append(\"rideData\");\r\n fw.append('\\n');\r\n\t}", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public CSVFileReader(String fileName, BufferedReader br, char sep)\n {\n super(sep);\n this.fileName = fileName;\n in = br;\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "private CSVReaderHeaderAware getCSVReader(File file)\n throws IOException {\n FileReader fileReader;\n CSVReaderHeaderAware rowReader;\n try {\n fileReader = new FileReader(file);\n try {\n rowReader = new CSVReaderHeaderAware(fileReader);\n } catch (IOException exception) {\n System.out.println(\"IO ERROR ON CSV READ\");\n throw exception;\n }\n } catch (FileNotFoundException exception) {\n System.out.println(\"CSV FILE NOT FOUND\");\n throw exception;\n }\n return rowReader;\n }", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "private void setupHeader(final String filePath) throws IOException{\n\t\tFile headerFile = new File(filePath);\n\t\tString dataString = new String();\n\t\tBufferedReader reader = new BufferedReader(new FileReader(headerFile));\n\t\twhile((dataString = reader.readLine()) != null){\n\t\t\theaderText.append(dataString);\n\t\t\theaderText.append(System.lineSeparator());\n\t\t}\n\t\treader.close();\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "static void printHeader(String fn, PrintWriter out) throws IOException\n{\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0) continue;\n\t\tif(line.charAt(0) == '#') out.println(line);\n\t\telse break;\n\t}\n}", "private void openAndReadFile() throws IOException {\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textreader = new BufferedReader(fr);\n\t\tString line;\n\t\tString[] parsedLine;\n\t\twhile ((line = textreader.readLine()) != null) {\n\t\t\tparsedLine = pattern.split(line);\n\t\t\tif (parsedLine.length == 2) {\n\t\t\t\tfileData.put(parsedLine[0], parsedLine[1]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Couldn't read line \" + line + \" in \" + path);\n\t\t\t}\n\t\t}\n\t\ttextreader.close();\n\t\tfr.close();\n\t}", "private LineTokenizer createIdentityCard2LineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer.setNames(new String[] { \"IdCard2Id\", \"IdCard2Number\", \"IdCard2Type\",\"IdCard2HolderName\",\"IdCard2IssuedOn\",\"IdCard2IssuedBy\",\"IdCard2expDate\",\"IdCard2addressId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final R label) throws IOException {\n this.path = path;\n this.reader = Files.newBufferedReader(path);\n this.csvClient = new CsvClientImpl<>(this.reader, clazz);\n this.csvClient.setQuote(quoteSymbol);\n this.csvClient.setSeparator(separator);\n this.csvClient.setEscape(escapeSymbol);\n this.csvClient.setUseHeader(header);\n this.table = new Table<>(label);\n }", "@Test\n public void testIncludeHeaderDelimited() throws Throwable {\n testIncludeHeaderDelimited(false);\n }", "@Override\n public void startRows(int depth) throws IOException {\n this.write(this.getNewline()+this.makeTabs(depth)+\"<rows>\");\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "public CsvReader(String filename, String seperator) {\n\t\tthis.seperator = seperator;\n\t\treadFile(filename, true);\n\t}", "private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }", "abstract protected boolean isHeaderLine(String line);", "public FileHeader(String objectTypeName, String formatTypeName,\r\n int version, char delimiter)\r\n throws InputDataFileException\r\n {\r\n try\r\n {\r\n // Ensure object type name is given\r\n Assertion.assertMsg(objectTypeName != null &&\r\n objectTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No object type name given.\");\r\n\r\n // Ensure format type name is given\r\n Assertion.assertMsg(formatTypeName != null &&\r\n formatTypeName.length() > 0,\r\n \"Error creating FileHeader instance: \" +\r\n \"No format type name given.\");\r\n\r\n // Copy data to object\r\n mObjectTypeName = objectTypeName;\r\n mFormatTypeName = formatTypeName;\r\n mVersion = version;\r\n mDelimiter = new Character(delimiter);\r\n }\r\n catch (AssertionException e)\r\n {\r\n throw new InputDataFileException(e.getMessage());\r\n }\r\n }", "static void processHeader(Scanner s, PrintWriter w) throws Exception {\n for (int i = 0; i < 4; i++) {\n w.println(s.nextLine());\n }\n }", "public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public TabTokenizer(String str, String firstDelimiters) {\n\t\tthis(str, firstDelimiters,\tSECOND_DELIMITERS);\n\t}", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "@Override\n \tprotected void writeHeader(BufferedWriter out, DataHolder dh) throws IOException {\n \t\tout.write(COMMENT_PREFIX);\n \t\tint imax = dh.size();\n \t\tfor (int i = 0; i < imax; i++) {\n \t\t\tout.write(dh.getName(i) + \"\\t\");\n \t\t}\n \t\tout.write(\"\\n\");\n \t}", "public static DataHeader readDataHeader(ArchiveFileBuffer buffer, CtrlInfoReader info) throws Exception\n {\n final File file = buffer.getFile();\n final long offset = buffer.offset();\n\n // first part of data file header:\n // 4 bytes directory_offset (skipped)\n // \" next_offset (offset of next entry in its file)\n // \" prev_offset (offset of previous entry in its file)\n // \" cur_offset (used by FileAllocator writing file)\n // \" num_samples (number of samples in the buffer)\n // \" ctrl_info_offset (offset in this file of control info header (units, limits, etc.))\n // \" buff_size (bytes allocated for this entry, including header)\n // \" buff_free (number of un-used, allocated bytes for this header)\n // 2 bytes DbrType (type of data stored in buffer)\n // 2 bytes DbrCount (count of values for each buffer element, i.e. 1 for scalar types, >1 for array types)\n // 4 bytes padding (used to align the period)\n // 8 bytes (double) period\n // 8 bytes (epicsTimeStamp) begin_time\n // \" next_file_time\n // \" end_time\n // char [40] prev_file\n // char [40] next_file\n // --> Total of 152 bytes in data header\n buffer.skip(4);\n final long nextOffset = buffer.getUnsignedInt();\n buffer.skip(4);\n buffer.skip(4);\n final long numSamples = buffer.getUnsignedInt();\n final long ctrlInfoOffset = buffer.getUnsignedInt();\n final long buff_size = buffer.getUnsignedInt();\n final long buff_free = buffer.getUnsignedInt();\n final short dbrTypeCode = buffer.getShort();\n final short dbrCount = buffer.getShort();\n buffer.skip(4);\n buffer.skip(8);\n final Instant beginTime = buffer.getEpicsTime();\n final Instant nextTime = buffer.getEpicsTime();\n final Instant endTime = buffer.getEpicsTime();\n\n buffer.skip(40);\n final byte nameBytes [] = new byte [40];\n buffer.get(nameBytes);\n\n if (!info.isOffset(ctrlInfoOffset))\n info = new CtrlInfoReader(ctrlInfoOffset);\n final DbrType dbrType = DbrType.forValue(dbrTypeCode);\n\n // compute amount of data in this data file entry: (bytes allocated) - (bytes free) - (bytes in header)\n final long buffDataSize = buff_size - buff_free - 152;\n System.out.println(buffDataSize);\n\n // Size of samples:\n // 12 bytes for status/severity/timestamp,\n // padding, value, padding\n final long dbr_size = 12 + dbrType.padding + dbrCount * dbrType.valueSize + dbrType.getValuePad(dbrCount);\n final long expected = dbr_size * numSamples;\n System.out.println(dbr_size);\n System.out.println(expected);\n\n if (expected != buffDataSize)\n throw new Exception(\"Expected \" + expected + \" byte buffer, got \" + buffDataSize);\n\n String nextFilename = nextOffset != 0 ? new String(nameBytes).split(\"\\0\", 2)[0] : \"*\";\n File nextFile = new File(buffer.getFile().getParentFile(), nextFilename);\n\n logger.log(Level.FINE, \"Datablock\\n\" +\n \"Buffer : '\" + file + \"' @ 0x\" + Long.toHexString(offset) + \"\\n\" +\n \"Time : \" + beginTime + \"\\n\" +\n \"... : \" + endTime);\n\n return new DataHeader(file, offset, nextFile, nextOffset, nextTime, info, dbrType, dbrCount, numSamples);\n }", "@Override\n\tpublic BctsJobHeader read() throws Exception {\n\t\treturn fileReder();\n\t}", "public fileReaderDesignated() throws FileNotFoundException{\n\t\tBufferedReader in=new BufferedReader(new FileReader(fileName));\n\t\ttry {\n\t\t\treadLargerTextFile(fileName);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "VcfReader(VcfParser parser, LineReader reader, VcfHeader header) throws IOException {\n mParser = parser;\n mIn = reader;\n mHeader = header;\n mNumSamples = mHeader.getNumberOfSamples();\n setNext();\n }", "@Test(timeout=100)\r\n\tpublic void testConstructorWithFilename() throws IOException {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\tout.close();\r\n\t\t\r\n\t\tString filename = file.getAbsolutePath();\r\n\t\t//System.out.println(\"test: new CSVReader(\"+filename+\")\");\r\n\t\tCSVReader csv = new CSVReader(filename);\r\n\t\tassertTrue(\"Open with filename \"+filename, csv.hasNext());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertTrue(csv.hasNext());\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertFalse(csv.hasNext());\r\n\t}", "public static FileReader getReader() {\n return new CsvFileReader();\n }", "public List<VCFFilterHeaderLine> headerLines();", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "@Test\n\tpublic void testBadHeaders() {\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( null ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \" \" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"A random string\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section: Conveyor System\" ) );\n\t\tassertNull( SectionHeaderTokenizer.checkLineForSectionHeader( \"Section:\" ) );\n\t}", "public abstract String getHeaderRow();", "@Test(expected=RuntimeException.class)\n public void missingPartOfHeader(){\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/invalid_for_testing.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();}", "private static BufferedReader getTagsFileBufferedReader() throws IOException {\n File tagFile = PATH.toFile();\n if(!tagFile.isFile() && !tagFile.createNewFile())\n throw new IOException(\"Could not create: \" + tagFile.getAbsolutePath());\n\n return Files.newBufferedReader(PATH);\n }", "public NoEscapeDSVTableReader(Scanner source, char cellDelim, char rowDelim)\n {\n this.source = source;\n this.source.useDelimiter(Character.toString(rowDelim));\n this.cellDelim = Character.toString(cellDelim);\n }", "public TabTokenizer(String str) {\n\t\tthis(str, FIRST_DELIMITERS,\tSECOND_DELIMITERS);\n\t}", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "public abstract String getFirstLine();", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "private List readHeadings( PushbackInputStream stream ) throws IOException {\n List headings = new ArrayList();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n done = true;\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n headings.add( readString( stream ) );\n break;\n case END:\n done = true;\n break;\n default:\n stream.unread( c );\n headings.add( readToken( stream ) );\n }\n }\n return headings;\n }", "public void headerRecord(RecordInput recordInput) {\n }", "public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}", "public TabixReader(final String filename, final String indexFileName) throws IOException {\n\t\tthis.filename = filename;\n\t\tmFp = new BlockCompressedInputStream(new File(filename));\n\t\tBlockCompressedInputStream is = new BlockCompressedInputStream(new File(filename + \".tbi\"));\n\t\ttabix = readHeader(is);\n\t\tconf = tabix.config;\n\t\tis.close();\n\t}", "String getDelimiter();", "public final void rule__OpenCSV__Group__5__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:1369:1: ( ( 'header' ) )\n // InternalCsv.g:1370:1: ( 'header' )\n {\n // InternalCsv.g:1370:1: ( 'header' )\n // InternalCsv.g:1371:2: 'header'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n match(input,21,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpenCSVAccess().getHeaderKeyword_5()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "private void writeCsvHeader(String h1, String h2, String h3,String h4,String h5) throws IOException\r\n {\r\n \t String line = String.format(\"%s,%s,%s,%s,%s\\n\",h1,h2,h3,h4,h5);\r\n \t writer.write(line);\r\n }", "@Override\n public void parseFile(String id, Reader reader) throws Exception {\n lineNr = 0;\n BufferedReader fin = null;\n if (reader instanceof BufferedReader) {\n fin = (BufferedReader) reader;\n } else {\n fin = new BufferedReader(reader);\n }\n try {\n while (fin.ready()) {\n String sStr = nextLine(fin);\n if (sStr == null) {\n return;\n }\n if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+data;\\\\s*$\") || sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+characters;\\\\s*$\")) {\n m_alignment = parseDataBlock(fin);\n m_alignment.setID(id);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+calibration;\\\\s*$\")) {\n traitSet = parseCalibrationsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+assumptions;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+sets;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+mrbayes;\\\\s*$\")) {\n parseAssumptionsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+taxa;\\\\s*$\")) {\n parseSATaxaBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+trees;\\\\s*$\")) {\n parseSATreesBlock(fin);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new Exception(\"Around line \" + lineNr + \"\\n\" + e.getMessage());\n }\n }", "public interface CsvParser extends Iterator<CsvLine>, Closeable {\n}", "@Test\n public void testBothStreams() throws Exception {\n\n URL url = Thread.currentThread().getContextClassLoader().getResource(\"test.csv\");\n BufferedCsvInputStream is = new BufferedCsvInputStream(new FileReader(new File(url.getFile())));\n File testFile = new File(\"test-review.csv\");\n BufferedCsvOutputStream os = new BufferedCsvOutputStream(new FileWriter(testFile));\n\n // first line shown\n String[] line = is.readNextLine();\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first line\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'previous line' click\n String[] prevLine = os.goToPreviousLine(); // get first line again\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, prevLine);\n line = is.readPreviousLine();\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"abc\", \"def\", \"ghi\"}, os.writeLine(line)); // write first again\n line = is.readNextLine(); // get second line\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, line);\n // 'next line' click\n Assert.assertArrayEquals(new String[]{\"j\", \"k\", \"l\", \"m\"}, os.writeLine(line)); // write second line\n line = is.readNextLine(); // get third line\n Assert.assertArrayEquals(new String[]{\"no\", \"p\"}, line);\n\n is.close();\n os.close(); // close to write the rest\n testFile.deleteOnExit();\n }", "private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }", "StreamReader underlyingReader();", "public void parseFile() throws IOException {\r\n\t\tFileInputStream inputStream = new FileInputStream(FILE_PATH);\r\n\t\tScanner sc = new Scanner(inputStream, \"UTF-8\");\r\n\r\n\t\tString line = \"\";\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tif(line.indexOf(comment_char)==0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(header == true) {\r\n//\t\t\tline = sc.nextLine();\r\n\t\t\tString[] linee = line.split(delimiter);\r\n\t\t\tthis.fieldNames = linee;\r\n\t\t\tfor(int i = 0; i < linee.length; i++) {\r\n\t\t\t\tcolumnMapping.put(linee[i], i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tdf.add(line.split(delimiter, -1));\r\n//\t\t\tif(df.get(df.size()-1).length != this.fieldNames.length) {\r\n//\t\t\t\tSystem.out.println(this.FILE_PATH);\r\n//\t\t\t\tSystem.out.println(String.join(\" \", df.get(df.size()-1)));\r\n//\t\t\t}\r\n\t\t\tfor(int i = 0; i < df.get(df.size()-1).length; i++) {\r\n\t\t\t\tif(df.get(df.size()-1)[i].equals(\"\")) {\r\n\t\t\t\t\tdf.get(df.size()-1)[i] = \"0\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t\tsc.close();\t\r\n\t}", "abstract E createSplit(RandomAccessFile raf, long length) throws IOException;", "static int readHeaders(InputStream stream, String [] aHeaders) throws IOException\n {\n boolean bEmptyLine = false;\n int iIndex;\n int iNumElements = aHeaders.length;\n \n for(iIndex=0; !bEmptyLine && (iIndex <= iNumElements); iIndex+=2)\n {\n String sThisLine = readLine(stream).trim();\n int iLength = sThisLine.length();\n \n if (iLength == 0)\n {\n bEmptyLine = true;\n }\n else\n {\n int iSeparator = sThisLine.indexOf(\":\");\n if (-1 != iSeparator)\n {\n aHeaders[iIndex] = sThisLine.substring(0, iSeparator).trim();\n aHeaders[iIndex+1] = sThisLine.substring(iSeparator+1).trim();\n //System.out.println(\"Read: \" + aHeaders[iIndex] + \": \" + aHeaders[iIndex+1]);\n }\n else\n {\n // I couldn't make out anything\n aHeaders[iIndex] = sThisLine;\n aHeaders[iIndex+1] = null;\n //System.out.println(\"Read-: \" + aHeaders[iIndex]);\n }\n }\n }\n \n return (iIndex > iNumElements) ? -1 : iIndex;\n }", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n if (mode == RECORD_READER_MODE.FIXED_WIDTH_RECORD) {\n readerContext = createFixedWidthReaderContext();\n } else {\n readerContext = createDelimitedReaderContext();\n }\n }", "static Extractor byTabs() {\n\t\t\treturn Splitter.TAB_EXTRACTOR;\n\t\t}", "public void setDefaultExtractLineSeparator (String linesep);", "public abstract StatDataFileReader createReaderInstance(Object extension)\n throws IOException;", "public JackTokenizer(File inputFile, FileReader freader){\r\n\t\tfile = inputFile;\r\n\t\treader = freader;\r\n\t\tclassdot = false;\r\n\t\tdotSymbol = false;\r\n\t\tclassdot_Str=null;\r\n\t\tisSymbol = false;\r\n\t\tinit();\r\n\t\t//advanceToNextCommand();\r\n\t}", "public boolean parseLine(final Object headerObj, final String[] parts) throws IOException {\n header = (ArrayList<String>)(headerObj);\n \n //System.out.printf(\"parts [len=%d] is '%s'%n\", parts.length, Utils.join(\":\", parts));\n \n if ( parts.length == 0 || COMMENT_PATTERN.matcher(parts[0]).matches() || HEADER_PATTERN.matcher(parts[0]).matches() )\n return false;\n \n if (header.size() != parts.length) {\n throw new IOException(String.format(\"Header length %d not equal to Tabular parts length %d\", header.size(), parts.length));\n }\n \n for ( int i = 0; i < parts.length; i++ ) {\n put(header.get(i), parts[i]);\n }\n \n if ( printRecordsParsed ) System.out.printf(\"Parsed %d records %s%n\", ++parsedRecords, this);\n \n return true;\n }", "public void setExtractLineSeparator (String linesep);", "@Test\n public void testIncludeHeaderCSV() throws Throwable {\n testIncludeHeaderCSV(false);\n }", "private Iterable<CSVRecord> obtainCsvIterable()\n throws FileNotFoundException, IOException {\n return CSVFormat.RFC4180\n .withFirstRecordAsHeader()\n .parse(this.fileReader);\n\n }", "public CsvTableReaderProducerStage(final Path path, final char separator, final char quoteSymbol,\n final char escapeSymbol, final boolean header, final Class<T> clazz, final IPathLabelMapper<R> mapper)\n throws IOException {\n this(path, separator, quoteSymbol, escapeSymbol, header, clazz, mapper.map(path));\n }", "private void init(){\r\n\t\t// already checked that this is a valid file and reader\r\n\t\ttokenizer = new StreamTokenizer(reader);\r\n\t\ttokenizer.slashSlashComments(true);\r\n\t\ttokenizer.slashStarComments(true);\r\n\t\ttokenizer.wordChars('_', '_');\r\n\t\ttokenizer.wordChars('.', '.');\r\n\t\ttokenizer.ordinaryChar('/');\r\n\t\ttokenizer.ordinaryChar('-');\r\n\t\tfillKeywords();\r\n\t\t//tokenChoose = new TokenChooser();\r\n\t}", "public abstract String getLine(int lineNumber);", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "protected TabTokenizer(String str, String firstDelimiters, String secondDelimiters) {\n\t\tthis.str =\tstr;\n\t\tthis.firstDelimiters=firstDelimiters;\n\t\tthis.secondDelimiters=secondDelimiters;\n\t\tmax = str.length()-1;\n\t}", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }" ]
[ "0.6523944", "0.65223503", "0.64153224", "0.6388016", "0.6300437", "0.58676386", "0.58676296", "0.58630764", "0.5847065", "0.5829178", "0.57215583", "0.5668676", "0.5657486", "0.5538823", "0.54350436", "0.54074925", "0.5404112", "0.5402318", "0.538704", "0.5381536", "0.5279366", "0.52373457", "0.5212216", "0.5208473", "0.5095237", "0.5092308", "0.5087391", "0.508603", "0.5076678", "0.50601256", "0.5054753", "0.5032102", "0.50209427", "0.50001264", "0.49895555", "0.4989177", "0.4958844", "0.49577832", "0.49542803", "0.49453473", "0.49388787", "0.4889997", "0.48632774", "0.48033136", "0.48016578", "0.47908685", "0.47757572", "0.47752717", "0.4757618", "0.4756921", "0.47525275", "0.4735559", "0.47197092", "0.47155562", "0.47130653", "0.47092694", "0.47048146", "0.47044188", "0.46916866", "0.46782085", "0.46698037", "0.4655547", "0.46462837", "0.46412688", "0.46383", "0.46312374", "0.46192324", "0.4614002", "0.46060476", "0.46009985", "0.45969257", "0.4587406", "0.45854947", "0.45773438", "0.45700774", "0.456269", "0.4559287", "0.45582324", "0.45486847", "0.45470944", "0.45460784", "0.4544054", "0.45353475", "0.45320895", "0.45242667", "0.4521716", "0.45165157", "0.45157555", "0.4514158", "0.45137775", "0.45123664", "0.45087537", "0.45084828", "0.4504879", "0.4504369", "0.45001402", "0.4498775", "0.44915953", "0.4490405", "0.44895303" ]
0.6285665
5
Read in the header record and create the array of field labels.
protected void readHeader() { // Denote no lines have been read. this.lineCount = 0; // Read the header. if (! this.reader.hasNext()) { // Here the entire file is empty. Insure we get EOF on the first read. this.nextLine = null; } else { this.headerLine = this.reader.next(); // Parse the header line into labels and normalize them to lower case. this.labels = this.splitLine(headerLine); // Set up to return the first data line. this.readAhead(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "public String fieldHeader(int fld_i) { return flds[fld_i]; }", "public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}", "private void readFields() throws IOException, ClassFormatException {\n final int fields_count = dataInputStream.readUnsignedShort();\n fields = new Field[fields_count];\n for (int i = 0; i < fields_count; i++) {\n fields[i] = new Field(dataInputStream, constant_pool);\n }\n }", "public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "private void parseHeader() throws IOException {\n\n\t\t// ////////////////////////////////////////////////////////////\n\t\t// Administrative header info\n\t\t// ////////////////////////////////////////////////////////////\n\n\t\t// First 10 bytes reserved for preamble\n\t\tbyte[] sixBytes = new byte[6];\n\t\tkeyBuffer.get(sixBytes, 0, 6);\n\t\tlogger.log(new String(sixBytes) + \"\\n\"); // says adac01\n\n\t\ttry {\n\n\t\t\tshort labels = keyBuffer.getShort();\n\t\t\tlogger.log(Integer.toString(labels)); // Number of labels in header\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Number of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sub-headers\n\t\t\tlogger.log(Integer.toString(keyBuffer.get())); // Unused byte\n\n\t\t\t// For each header field available.. get them\n\t\t\tfor (short i = 0; i < labels; i++) {\n\n\t\t\t\t// Attempt to find the next key...\n\t\t\t\t// ...the keynum (description)\n\t\t\t\t// ...the offset to the value\n\t\t\t\tADACKey key = getKeys();\n\t\t\t\tswitch (key.getDataType()) {\n\n\t\t\t\tcase ADACDictionary.BYTE:\n\n\t\t\t\t\tkeyList.add(new ByteKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.SHORT:\n\n\t\t\t\t\tkeyList.add(new ShortKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.INT:\n\n\t\t\t\t\tkeyList.add(new IntKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.FLOAT:\n\n\t\t\t\t\tkeyList.add(new FloatKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase ADACDictionary.EXTRAS:\n\n\t\t\t\t\tkeyList.add(new ExtrasKvp(this, key));\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"ADAC Decoder\", \"Failed to retrieve ADAC image file header. \" + \"Is this an ADAC image file?\");\n\t\t}\n\t}", "public List<Label> getHeaderLabels() {\r\n return headerLabels;\r\n }", "public VicarBinaryLabel getBinaryHeader() throws IOException;", "public String getHeaderNames(){return header.namesText;}", "private void addRecordHeader()\n {\n addIndent();\n openStartTag(RECORD);\n addSpace();\n addKeyValuePair(RECORD_PROFILE_ID, \"\" + m_recProf.getId());\n addSpace();\n addKeyValuePair(SEQ_NUM, \"SN\" + m_seqNum++);\n closeTag();\n }", "public void headerRecord(RecordInput recordInput) {\n }", "private void readHeader(byte[] content){\n StringBuilder header = new StringBuilder();\n char c;\n int j = 0;\n for (int i = 0; i < 3; ++i){\n c = (char) content[j];\n header.append(c);\n ++j;\n if(c == '#')--i;\n while((c = (char) content[j]) != '\\n') {\n header.append(c);\n ++j;\n }\n header.append(c);\n ++j;\n }\n this.header = header.toString();\n this.headerSize = header.length();\n\n j = 0;\n for(int i = 0; i < 3; ++i){\n c = header.charAt(j);\n if(c == '#'){\n while(header.charAt(j) != '\\n')++j;\n ++j;\n --i;\n } else{\n if(i == 0){\n while(header.charAt(j) != '\\n')++j;\n ++j;\n } else if(i==1){\n StringBuilder width = new StringBuilder();\n StringBuilder height = new StringBuilder();\n while(c != ' '){\n width.append(c);\n ++j;\n c = header.charAt(j);\n }\n ++j;\n c = header.charAt(j);\n while(c != '\\n' && c != '#' && c != ' '){\n height.append(c);\n ++j;\n c = header.charAt(j);\n }\n while(header.charAt(j)!='\\n')++j;\n ++j;\n this.width = Integer.parseInt(width.toString());\n this.height = Integer.parseInt(height.toString());\n } else {\n StringBuilder resolution = new StringBuilder();\n while(c != '\\n'){\n resolution.append(c);\n ++j;\n c = header.charAt(j);\n }\n this.resolution = Integer.parseInt(resolution.toString());\n }\n }\n }\n }", "private void populateFieldArray() \r\n\t{\r\n\t\tInteger fieldId;\r\n\t\t/** get input column names which is populated based on the input file\r\n\t\t * format specified in the command file */\r\n\t\tString [] inputColNames = getInputColNames();\r\n\t\tint arrLength; /** Number of columns in the input file*/\r\n\t\tif (null == inputColNames)\r\n\t\t{\r\n\t\t\t/** set array length 2 for two default columns (probeset and chip description)*/\r\n\t\t\tarrLength = 2; \r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/** Basic Probeset ID and description fields are present for all files \r\n\t\t\t * but the other supplementary information like accession number, unigene and\r\n\t\t\t * entrezgene ids may be present one or many based on the file format */\r\n\t\t\tarrLength = 2 + inputColNames.length; /** add other columns*/\r\n\t\t}\r\n\t\t/** Field array base elements are Probeset and Chip_Desc plus any of acc_no, ugid, & locusid/organism */\r\n\t\tfieldIndexArray = new int [arrLength];\r\n\t\t\r\n\t\t/** Now 0th field in input file is probeset*/\r\n\t\tfieldIndexArray[0] = ((Integer) fieldIdTable.get(\"CIN_PROBESET\")).intValue();\r\n\t\t\r\n\t\tif (inputColNames != null) \r\n\t\t{\r\n\t\t\t/** get the field ids for all column names*/\r\n\t\t\tfor (int i=0; i< inputColNames.length; i++)\r\n\t\t\t{\r\n\t\t\t\t/** Pick up the column from the list of inout columns as obtained based on\r\n\t\t\t\t * the input file format. Then fetch its ID from the FieldIdTable */\r\n\t\t\t\tfieldId = (Integer) fieldIdTable.get(inputColNames[i].toUpperCase());\r\n\t\t\t\tif (null == fieldId)\r\n\t\t\t\t{\r\n\t\t\t\t\t/** no such column name allowed*/\r\n\t\t\t\t\tLogger.log(\"Column name \" + inputColNames[i] + \" is not a valid name\",Logger.WARNING);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/** add the field id to the index array. Thus fieldIndexArray will have all the \r\n\t\t\t\t\t * column names depending on the file format*/\r\n\t\t\t\t\tfieldIndexArray[1+i] = fieldId.intValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t/** ChipDesc field is the last column in the input file. First we have added the default first field\r\n\t\t * as probeset id , then all the middle fields based on the file format and now the last default\r\n\t\t * field which is chipdescription */\r\n\t\tfieldIndexArray[fieldIndexArray.length-1] = ((Integer) fieldIdTable.get(\"CIN_CHIP_DESCRIPTION\")).intValue();\r\n\t\tLogger.log(\"populateFieldArray complete \",Logger.DEBUG);\r\n\t}", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }", "abstract public FieldNames getFieldNames();", "public Vector getFieldLabels() {\n\treturn _vcFieldLabels;\n }", "String[] getHeader(String key);", "private static HeaderData readHeader(byte[] data) throws UnknownHostException {\n\t\tInetAddress ip = InetAddress.getByAddress(Arrays.copyOfRange(data, 4, 8));\n\t\t\n\t\tString label = new String(Arrays.copyOfRange(data, 0, 4), Charset.forName(\"UTF-8\"));\n\n\t\tint port = 0;\n\t\tport += data[8] << 24 & 0xFF000000;\n\t\tport += data[9] << 16 & 0xFF0000;\n\t\tport += data[10] << 8 & 0xFF00;\n\t\tport += data[11] & 0xFF;\n\t\t\n\t\treturn new HeaderData(label, ip, port);\n\t}", "private void readHeader() throws IOException {\n\n header = new byte[ShapeConst.SHAPE_FILE_HEADER_LENGTH];\n\n /*\n * Make sure we're at the beginning of the file\n */\n rafShp.seek(0); \n\n rafShp.read(header, 0, ShapeConst.SHAPE_FILE_HEADER_LENGTH);\n\n int fileCode = ByteUtils.readBEInt(header, 0);\n\n if (fileCode != ShapeConst.SHAPE_FILE_CODE) {\n\n throw new IOException(\"Invalid file code, \" + \"probably not a shape file\");\n\n }\n\n fileVersion = ByteUtils.readLEInt(header, 28);\n\n if (fileVersion != ShapeConst.SHAPE_FILE_VERSION) {\n\n throw new IOException(\"Unable to read shape files with version \" +\n fileVersion);\n\n }\n\n fileLength = ByteUtils.readBEInt(header, 24);\n\n /* \n * convert from 16-bit words to 8-bit bytes\n */\n fileLength *= 2;\n\n fileShapeType = ByteUtils.readLEInt(header, 32);\n\n /*\n * read ESRIBoundingBox and convert to SHPEnvelope\n */\n fileMBR = new SHPEnvelope(ShapeUtils.readBox(header, 36));\n\n }", "@Override\n\tprotected String getFields()\n\t{\n\t\tString fields = \" HBLNM, HBCFR, HBCFL, HBRNM, HBDLM \";\n\t\treturn fields;\n\t}", "private void addHeader() {\n \n \t\t// StartNr; Namn; #Varv; Totaltid; Varv1; Varv2; Varv3; Start;\n \t\t// Varvning1; Varvning2; Mål\n \n \t\tsb.append(\"Plac; StartNr; Namn; #Varv; Totaltid; \");\n \t\tfor (int i = 0; i < maxNbrOfLaps; i++) {\n \t\t\tsb.append(\"Varv\");\n \t\t\tsb.append(i + 1 + \"; \");\n \t\t}\n \t\tsb.append(\"\\n\");\n \t}", "public String[] getFieldNames();", "@Override\n\tpublic void readFields(DataInput in) throws IOException {\n\t\tword = in.readUTF();\n\t\ttitle = in.readUTF();\n\t}", "protected byte[] readRecordData(RecordHeader header) throws IOException {\n byte[] buf = new byte[header.dataCount];\n file.seek(header.dataPointer);\n file.readFully(buf);\n return buf;\n }", "@Override\r\n\tpublic void loadHeader() {\n\r\n\t}", "private NetworkHeader(List<String> fields) {\r\n lineData = makeDataMap(fields);\r\n HeaderMaps headerMap = getHeaderMap(1);\r\n for (String header : lineData.keySet()) {\r\n String name = headerMap.headerName(header);\r\n if (mainHeaders.contains(header)) {\r\n mainKeys.put(header, name);\r\n if (name.toLowerCase().startsWith(\"wert\", 2) && (header.startsWith(\"lat\") || header.startsWith(\"lon\"))) {\r\n crsHint = \"germany\";\r\n }\r\n } else if (channelPattern.matcher(name).matches()) {\r\n channelMap.put(header, 0);\r\n sectorData.add(header);\r\n } else {\r\n sectorData.add(header);\r\n }\r\n }\r\n is3G = headerMap.headers.keySet().contains(\"gsm_ne\");\r\n }", "public Object initialize(final File source) throws FileNotFoundException {\n List<String> header = null;\n int linesLookedAt = 0;\n xReadLines reader = new xReadLines(source);\n \n for ( String line : reader ) {\n Matcher m = HEADER_PATTERN.matcher(line);\n if ( m.matches() ) {\n //System.out.printf(\"Found a header line: %s%n\", line);\n header = new ArrayList<String>(Arrays.asList(line.split(DELIMITER_REGEX)));\n //System.out.printf(\"HEADER IS %s%n\", Utils.join(\":\", header));\n }\n \n if ( linesLookedAt++ > MAX_LINES_TO_LOOK_FOR_HEADER )\n break;\n }\n \n // check that we found the header\n if ( header != null ) {\n logger.debug(String.format(\"HEADER IS %s%n\", Utils.join(\":\", header)));\n } else {\n // use the indexes as the header fields\n logger.debug(\"USING INDEXES FOR ROD HEADER\");\n // reset if necessary\n if ( !reader.hasNext() )\n reader = new xReadLines(source);\n header = new ArrayList<String>();\n int tokens = reader.next().split(DELIMITER_REGEX).length;\n for ( int i = 0; i < tokens; i++)\n header.add(Integer.toString(i));\n }\n \n return header;\n }", "public void read_data_header(byte[] buffer) throws IOException {\r\n ByteArrayInputStream byte_in = new ByteArrayInputStream(buffer);\r\n DataInputStream in = new DataInputStream(byte_in);\r\n int _dimension = in.readInt();\r\n this.setDimension(_dimension);\r\n in.close();\r\n byte_in.close();\r\n }", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "public List<VCFFilterHeaderLine> headerLines();", "public void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }", "private void initMetadata() throws IOException {\n \n // start by reading the file header\n in.seek(0);\n byte[] toRead = new byte[4];\n in.read(toRead);\n long order = batoi(toRead); // byte ordering\n little = toRead[2] != 0xff || toRead[3] != 0xff;\n metadata.put(\"Byte Order\", new Boolean(little));\n \n in.skipBytes(4);\n in.read(toRead);\n long version = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Version\", new Long(version));\n \n byte[] er = new byte[2];\n in.read(er);\n short count = DataTools.bytesToShort(er, little);\n metadata.put(\"Count\", new Short(count));\n \n in.skipBytes(2);\n \n in.read(toRead);\n long offset = DataTools.bytesToLong(toRead, little);\n \n // skip to first tag\n in.seek(offset);\n \n // read in each tag and its data\n \n for (int i=0; i<count; i++) {\n in.read(er);\n short tag = DataTools.bytesToShort(er, little);\n in.skipBytes(2);\n \n in.read(toRead);\n offset = DataTools.bytesToLong(toRead, little);\n \n in.read(toRead);\n long fmt = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Format\", new Long(fmt));\n \n in.read(toRead);\n long numBytes = DataTools.bytesToLong(toRead, little);\n metadata.put(\"NumBytes\", new Long(numBytes));\n \n if (tag == 67 || tag == 68) {\n byte[] b = new byte[1];\n in.read(b);\n boolean isOpenlab2;\n if (b[0] == '0') isOpenlab2 = false;\n else isOpenlab2 = true;\n metadata.put(\"isOpenlab2\", new Boolean(isOpenlab2));\n \n in.skipBytes(2);\n in.read(er);\n short layerId = DataTools.bytesToShort(er, little);\n metadata.put(\"LayerID\", new Short(layerId));\n \n in.read(er);\n short layerType = DataTools.bytesToShort(er, little);\n metadata.put(\"LayerType\", new Short(layerType));\n \n in.read(er);\n short bitDepth = DataTools.bytesToShort(er, little);\n metadata.put(\"BitDepth\", new Short(bitDepth));\n \n in.read(er);\n short opacity = DataTools.bytesToShort(er, little);\n metadata.put(\"Opacity\", new Short(opacity));\n \n // not sure how many bytes to skip here\n in.skipBytes(10);\n \n in.read(toRead);\n long type = DataTools.bytesToLong(toRead, little);\n metadata.put(\"ImageType\", new Long(type));\n \n // not sure how many bytes to skip\n in.skipBytes(10);\n \n in.read(toRead);\n long timestamp = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Timestamp\", new Long(timestamp));\n \n in.skipBytes(2);\n \n if (isOpenlab2 == true) {\n byte[] layerName = new byte[127];\n in.read(layerName);\n metadata.put(\"LayerName\", new String(layerName));\n \n in.read(toRead);\n long timestampMS = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Timestamp-MS\", new Long(timestampMS));\n \n in.skipBytes(1);\n byte[] notes = new byte[118];\n in.read(notes);\n metadata.put(\"Notes\", new String(notes));\n }\n else in.skipBytes(123);\n }\n else if (tag == 69) {\n in.read(toRead);\n long platform = DataTools.bytesToLong(toRead, little);\n metadata.put(\"Platform\", new Long(platform));\n \n in.read(er);\n short units = DataTools.bytesToShort(er, little);\n metadata.put(\"Units\", new Short(units));\n \n in.read(er);\n short imageId = DataTools.bytesToShort(er, little);\n metadata.put(\"ID\", new Short(imageId));\n in.skipBytes(1);\n \n byte[] toRead2 = new byte[8];\n double xOrigin = DataTools.readDouble(in, little);\n metadata.put(\"XOrigin\", new Double(xOrigin));\n double yOrigin = DataTools.readDouble(in, little);\n metadata.put(\"YOrigin\", new Double(yOrigin));\n double xScale = DataTools.readDouble(in, little);\n metadata.put(\"XScale\", new Double(xScale));\n double yScale = DataTools.readDouble(in, little);\n metadata.put(\"YScale\", new Double(yScale));\n in.skipBytes(1);\n \n byte[] other = new byte[31];\n in.read(other);\n metadata.put(\"Other\", new String(other));\n }\n \n // Initialize OME metadata\n \n if (ome != null) {\n OMETools.setBigEndian(ome, !little);\n if (metadata.get(\"BitDepth\") != null) {\n int bitDepth = ((Integer) metadata.get(\"BitDepth\")).intValue();\n String type;\n \n if (bitDepth <= 8) type = \"int8\";\n else if (bitDepth <= 16) type = \"int16\";\n else type = \"int32\";\n \n OMETools.setPixelType(ome, type);\n }\n if (metadata.get(\"Timestamp\") != null) {\n OMETools.setCreationDate(ome, (String) metadata.get(\"Timestamp\"));\n }\n \n if (metadata.get(\"XOrigin\") != null) {\n Double xOrigin = (Double) metadata.get(\"XOrigin\");\n OMETools.setStageX(ome, xOrigin.floatValue());\n }\n \n if (metadata.get(\"YOrigin\") != null) {\n Double yOrigin = (Double) metadata.get(\"YOrigin\");\n OMETools.setStageY(ome, yOrigin.floatValue());\n }\n \n if (metadata.get(\"XScale\") != null) {\n Double xScale = (Double) metadata.get(\"XScale\");\n OMETools.setPixelSizeX(ome, xScale.floatValue());\n }\n \n if (metadata.get(\"YScale\") != null) {\n Double yScale = (Double) metadata.get(\"YScale\");\n OMETools.setPixelSizeY(ome, yScale.floatValue());\n }\n }\n in.seek(offset);\n }\n }", "private void populateHeaders (String[] entries) {\n header.clear();\n\n if (entries != null) {\n for (String entry : entries) {\n header.add(entry);\n }\n\n/* for (int i = header.size(); i < nbOfColumns; i++) {\n header.add(\"\");\n }*/\n } else {\n for (int i = 1; i < nbOfColumns + 1; i++) {\n header.add(\"Column\" + i);\n }\n }\n }", "public String getField(String fieldName){\r\n\t\tString split[] = currentLine.split(Constants.SPLIT_MARK);\r\n\t\tif (mapHeader.get(fieldName) == -1 || mapHeader.get(fieldName) >= split.length) \r\n\t\t\treturn Integer.toString(Constants.UNKNOWN);\r\n\t\tif (split[mapHeader.get(fieldName)].equals(\"\")) \r\n\t\t\treturn Integer.toString(Constants.UNKNOWN);\r\n\t\treturn split[mapHeader.get(fieldName)];\r\n\t}", "private DecoderState readHeaders(ByteBuf in) {\n\n DecoderState nextState = DecoderState.READ_HEADERS;\n String line;\n\n // Read as long as we haven't reached the end of the headers (i.e.\n // the next state) and we have full lines to read.\n while (nextState == DecoderState.READ_HEADERS && (line = readLine(in))\n != null) {\n\n if (line.isEmpty()) {\n nextState = DecoderState.READ_BODY;\n }\n else {\n int pos = line.indexOf(COLON_CHAR);\n if (pos > 0) {\n String key = line.substring(0, pos);\n\n // The spec defines that only the first occurrance of a header\n // should be preserved in a single frame.\n if (!headers.getHeaderNames().contains(key)) {\n\n // Move past the colon delimiter.\n pos++;\n\n // Extract the value and decode header value as per the spec. Is\n // there a faster way to do this than a bunch of individual\n // replaces?\n String value = pos >= line.length() ? null : line.substring(pos).\n replace(OCTET_92_92, OCTET_92)\n .replace(OCTET_92_99, OCTET_58)\n .replace(OCTET_92_110, OCTET_10)\n .replace(OCTET_92_114, OCTET_13);\n\n headers.put(key, value);\n }\n }\n else {\n // Invalid frame. A header must contain a ':'.\n throw new CorruptedFrameException(\"Header must contain a name and \"\n + \"value separated by a colon character.\");\n }\n }\n }\n\n return nextState;\n }", "com.google.protobuf.ByteString\n getField1818Bytes();", "private void parseHeader()\n throws IOException {\n\n while (headerPending) {\n\n // check if we have a complete line\n int eol = -1;\n while (eol < 0) {\n for (int i = 0; (eol < 0) && (i < nEncoded); ++i) {\n if (encoded[i] == '\\n') {\n eol = i;\n }\n } \n if (eol < 0) {\n // we don't have enough characters\n if (readEncodedBytes() < 0) {\n throw new IOException(\"missing uuencode header\");\n }\n }\n }\n \n if (eol == 0) {\n eol = 1;\n System.arraycopy(encoded, eol, encoded, 0, nEncoded - eol);\n nEncoded -= 1;\n } else\n if ((eol < 4) || (encoded[0] != 'b') || (encoded[1] != 'e')\n || (encoded[2] != 'g') || (encoded[3] != 'i') || (encoded[4] != 'n')) {\n // this is not the header line, skip it\n \t//System.out.println(\"eol:\" + eol);\n \t//System.out.println(\"srcpos: \" + (eol + 1) + \" \" + (nEncoded - eol));\n System.arraycopy(encoded, eol + 1, encoded, 0,\n nEncoded - eol);\n nEncoded -= eol;\n } else {\n\n // skip the whitespace characters\n int i = 5;\n while ((i < eol) && Character.isWhitespace((char) encoded[i])) {\n ++i;\n }\n\n if (((i + 2) < eol)\n && (encoded[i] >= '0') && (encoded[i] <= '7')\n && (encoded[i+1] >= '0') && (encoded[i+1] <= '7')\n && (encoded[i+2] >= '0') && (encoded[i+2] <= '7')) {\n \n // store the permissions\n userPerms = encoded[i] - '0';\n groupPerms = encoded[i+1] - '0';\n othersPerms = encoded[i+2] - '0';\n\n // in order to allow space in file names, uudecode as provided in\n // version 4.3.x of the GNU sharutils package uses a single space\n // between permissions and file name\n if (encoded[i+3] == ' ') {\n i += 4;\n\n // store the file name (which may contain space characters)\n StringBuffer buffer = new StringBuffer();\n while (i < eol) {\n buffer.append((char) encoded[i++]);\n }\n name = buffer.toString();\n\n // set up state for data decoding\n headerPending = false;\n System.arraycopy(encoded, eol + 1, encoded, 0, nEncoded - eol);\n nEncoded -= eol;\n firstQuantum = 1;\n current = 0;\n return;\n\n }\n }\n\n throw new IOException(\"malformed uuencode header\");\n\n }\n\n }\n\n }", "public abstract void readFields(DataInput in) throws IOException;", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "IAudioHeader readHeader(InputStream inputStream) throws AudioReaderException, InvalidFormatException;", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public static DataHeader readDataHeader(ArchiveFileBuffer buffer, CtrlInfoReader info) throws Exception\n {\n final File file = buffer.getFile();\n final long offset = buffer.offset();\n\n // first part of data file header:\n // 4 bytes directory_offset (skipped)\n // \" next_offset (offset of next entry in its file)\n // \" prev_offset (offset of previous entry in its file)\n // \" cur_offset (used by FileAllocator writing file)\n // \" num_samples (number of samples in the buffer)\n // \" ctrl_info_offset (offset in this file of control info header (units, limits, etc.))\n // \" buff_size (bytes allocated for this entry, including header)\n // \" buff_free (number of un-used, allocated bytes for this header)\n // 2 bytes DbrType (type of data stored in buffer)\n // 2 bytes DbrCount (count of values for each buffer element, i.e. 1 for scalar types, >1 for array types)\n // 4 bytes padding (used to align the period)\n // 8 bytes (double) period\n // 8 bytes (epicsTimeStamp) begin_time\n // \" next_file_time\n // \" end_time\n // char [40] prev_file\n // char [40] next_file\n // --> Total of 152 bytes in data header\n buffer.skip(4);\n final long nextOffset = buffer.getUnsignedInt();\n buffer.skip(4);\n buffer.skip(4);\n final long numSamples = buffer.getUnsignedInt();\n final long ctrlInfoOffset = buffer.getUnsignedInt();\n final long buff_size = buffer.getUnsignedInt();\n final long buff_free = buffer.getUnsignedInt();\n final short dbrTypeCode = buffer.getShort();\n final short dbrCount = buffer.getShort();\n buffer.skip(4);\n buffer.skip(8);\n final Instant beginTime = buffer.getEpicsTime();\n final Instant nextTime = buffer.getEpicsTime();\n final Instant endTime = buffer.getEpicsTime();\n\n buffer.skip(40);\n final byte nameBytes [] = new byte [40];\n buffer.get(nameBytes);\n\n if (!info.isOffset(ctrlInfoOffset))\n info = new CtrlInfoReader(ctrlInfoOffset);\n final DbrType dbrType = DbrType.forValue(dbrTypeCode);\n\n // compute amount of data in this data file entry: (bytes allocated) - (bytes free) - (bytes in header)\n final long buffDataSize = buff_size - buff_free - 152;\n System.out.println(buffDataSize);\n\n // Size of samples:\n // 12 bytes for status/severity/timestamp,\n // padding, value, padding\n final long dbr_size = 12 + dbrType.padding + dbrCount * dbrType.valueSize + dbrType.getValuePad(dbrCount);\n final long expected = dbr_size * numSamples;\n System.out.println(dbr_size);\n System.out.println(expected);\n\n if (expected != buffDataSize)\n throw new Exception(\"Expected \" + expected + \" byte buffer, got \" + buffDataSize);\n\n String nextFilename = nextOffset != 0 ? new String(nameBytes).split(\"\\0\", 2)[0] : \"*\";\n File nextFile = new File(buffer.getFile().getParentFile(), nextFilename);\n\n logger.log(Level.FINE, \"Datablock\\n\" +\n \"Buffer : '\" + file + \"' @ 0x\" + Long.toHexString(offset) + \"\\n\" +\n \"Time : \" + beginTime + \"\\n\" +\n \"... : \" + endTime);\n\n return new DataHeader(file, offset, nextFile, nextOffset, nextTime, info, dbrType, dbrCount, numSamples);\n }", "default List<String> getinputfilehdrs(String filename){\n List<String> headerlist = new ArrayList<>();\r\n return headerlist;\r\n }", "private void initializeKnownHeaders() {\r\n needParceHeader = true;\r\n \r\n addMainHeader(\"city\", getPossibleHeaders(DataLoadPreferences.NH_CITY));\r\n addMainHeader(\"msc\", getPossibleHeaders(DataLoadPreferences.NH_MSC));\r\n addMainHeader(\"bsc\", getPossibleHeaders(DataLoadPreferences.NH_BSC));\r\n addMainIdentityHeader(\"site\", getPossibleHeaders(DataLoadPreferences.NH_SITE));\r\n addMainIdentityHeader(\"sector\", getPossibleHeaders(DataLoadPreferences.NH_SECTOR));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_CI, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_CI));\r\n addMainHeader(INeoConstants.PROPERTY_SECTOR_LAC, getPossibleHeaders(DataLoadPreferences.NH_SECTOR_LAC));\r\n addMainHeader(INeoConstants.PROPERTY_LAT_NAME, getPossibleHeaders(DataLoadPreferences.NH_LATITUDE));\r\n addMainHeader(INeoConstants.PROPERTY_LON_NAME, getPossibleHeaders(DataLoadPreferences.NH_LONGITUDE));\r\n // Stop statistics collection for properties we will not save to the sector\r\n addNonDataHeaders(1, mainHeaders);\r\n \r\n // force String types on some risky headers (sometimes these look like integers)\r\n useMapper(1, \"site\", new StringMapper());\r\n useMapper(1, \"sector\", new StringMapper());\r\n \r\n // Known headers that are sector data properties\r\n addKnownHeader(1, \"beamwidth\", getPossibleHeaders(DataLoadPreferences.NH_BEAMWIDTH), false);\r\n addKnownHeader(1, \"azimuth\", getPossibleHeaders(DataLoadPreferences.NH_AZIMUTH), false);\r\n }", "public /*override*/ void LoadRecordData(BinaryReader bamlBinaryReader) \r\n {\r\n TypeId = bamlBinaryReader.ReadInt16(); \r\n RuntimeName = bamlBinaryReader.ReadString(); \r\n }", "protected void readIndexHead(byte[] head) {\n \t\tByteArray ba = new ByteArray(head, ByteArray.READ);\n \t\tIDLookups = new ArrayList<IDLookup>();\n \t\ttry {\n \t\t\tlastPageID = ba.readInt();\n \t\t\tba.readInt();\n \t\t\tba.readInt();\n \t\t\tint numMovies = ba.readInt();\n \t\t\tScanner sc = new Scanner(new File(inputFilename + \"_index\"));\n \t\t\tfor(int currentMovie = 0; currentMovie < numMovies; currentMovie++)\n \t\t\t\tIDLookups.add(new IDLookup(sc.nextInt(), sc.nextInt()));\n \t\t\t/* for(IDLookup l : IDLookups)\n \t\t\t\tSystem.out.println(\"read \" + l.MovieID + \" page \" + l.PageID); */\n \t\t\tsc.close();\n \t\t} catch (IOException e) { System.err.println(\"IOException in readIndexHead: \" + inputFilename); }\n \t\tCollections.sort(IDLookups); /* theoretically unnecessary if we load the movies in ID order but I'm not chancing an error here */\n \t}", "public List<byte[]> getHeader() {\n\t\treturn this.fileHeader;\n\t}", "@Test\n public void validHeaderTest(){\n //test for a complete header with some missing values\n Header h;\n SimpleReader sr = new SimpleReader();\n String fileForLexer = sr.FileToString(\"sample_abc/piece1.abc\");\n abcLexer lex = new abcLexer(fileForLexer);\n abcParser parser = new abcParser(lex);\n h=parser.parseHeader();\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getTitle(),\"PieceNo.1\");\n assertEquals(h.getComposer(),\"Unknown\");//uses a default value\n assertEquals(h.getIndex(),\"1\");\n assertEquals(h.getMeter(),\"4/4\");\n assertEquals(h.getNoteLength(),\"1/4\");\n assertEquals(h.getTempo(),\"140\");\n assertEquals(h.getKey(),\"C\");\n }", "public ArrayStr getRecordLabels() {\n return new ArrayStr(opensimSimulationJNI.ExpressionBasedPointToPointForce_getRecordLabels(swigCPtr, this), true);\n }", "public Hashtable getFields() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tif (myData.record!=null)\n\t\t{\n\t\t\tHashtable table;\n\t\t\ttry\n\t\t\t{\n\t\t\t\ttable=myData.record.getFields();\n\t\t\t\tHashtable fields=new Hashtable();\n\t\t\t\tEnumeration enumeration=table.keys();\n\t\t\t\twhile (enumeration.hasMoreElements())\n\t\t\t\t{\n\t\t\t\t\tString name=(String)enumeration.nextElement();\n\t\t\t\t\tfields.put(name,new LVObject(table.get(name)));\n\t\t\t\t}\n\t\t\t\treturn fields;\n\t\t\t}\n\t\t\tcatch (LDBException e) { setStatus(e); }\n\t\t}\n\t\telse if (myData.spec!=null)\n\t\t{\n\t\t\tHashtable table=new Hashtable();\n\t\t\tEnumeration enumeration=myData.spec.getFields().keys();\n\t\t\twhile (enumeration.hasMoreElements())\n\t\t\t\ttable.put(enumeration.nextElement(),new LVObject());\n\t\t\treturn table;\n\t\t}\n\t\treturn new Hashtable();\n\t}", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "com.google.protobuf.ByteString\n getField1843Bytes();", "private NetFlowHeader prepareHeader() throws IOException {\n NetFlowHeader internalHeader;\n int numBytesRead = 0;\n int lenRead = 0;\n WrappedByteBuf buf;\n byte[] headerArray;\n\n // Read header depending on stream version (different from flow version)\n if (streamVersion == 1) {\n // Version 1 has static header\n // TODO: verify header size for stream version 1\n lenRead = NetFlowHeader.S1_HEADER_SIZE - METADATA_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder);\n } else {\n // Version 3 with dynamic header size\n headerArray = new byte[HEADER_OFFSET_LENGTH];\n numBytesRead = in.read(headerArray, 0, HEADER_OFFSET_LENGTH);\n if (numBytesRead != HEADER_OFFSET_LENGTH) {\n throw new UnsupportedOperationException(\"Short read while loading header offset\");\n }\n\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n int headerSize = (int)buf.getUnsignedInt(0);\n if (headerSize <= 0) {\n throw new UnsupportedOperationException(\"Failed to load header of size \" + headerSize);\n }\n\n // Actual header length, determine how many bytes to read\n lenRead = headerSize - METADATA_LENGTH - HEADER_OFFSET_LENGTH;\n internalHeader = new NetFlowHeader(streamVersion, byteOrder, headerSize);\n }\n\n // allocate buffer for length to read\n headerArray = new byte[lenRead];\n numBytesRead = in.read(headerArray, 0, lenRead);\n if (numBytesRead != lenRead) {\n throw new UnsupportedOperationException(\"Short read while loading header data\");\n }\n // build buffer\n buf = WrappedByteBuf.init(headerArray, byteOrder);\n\n // resolve stream version (either 1 or 3)\n if (streamVersion == 1) {\n internalHeader.setFlowVersion((short)buf.getUnsignedShort(0));\n internalHeader.setStartCapture(buf.getUnsignedInt(2));\n internalHeader.setEndCapture(buf.getUnsignedInt(6));\n internalHeader.setHeaderFlags(buf.getUnsignedInt(10));\n internalHeader.setRotation(buf.getUnsignedInt(14));\n internalHeader.setNumFlows(buf.getUnsignedInt(18));\n internalHeader.setNumDropped(buf.getUnsignedInt(22));\n internalHeader.setNumMisordered(buf.getUnsignedInt(26));\n // Read hostname fixed bytes\n byte[] hostnameBytes = new byte[NetFlowHeader.S1_HEADER_HN_LEN];\n buf.getBytes(30, hostnameBytes, 0, hostnameBytes.length);\n internalHeader.setHostname(new String(hostnameBytes));\n // Read comments fixed bytes\n byte[] commentsBytes = new byte[NetFlowHeader.S1_HEADER_CMNT_LEN];\n buf.getBytes(30 + hostnameBytes.length, commentsBytes, 0, commentsBytes.length);\n internalHeader.setComments(new String(commentsBytes));\n\n // Dereference arrays\n hostnameBytes = null;\n commentsBytes = null;\n } else {\n // Resolve TLV (type-length value)\n // Set decode pointer to first tlv\n int dp = 0;\n int left = lenRead;\n // Smallest TLV is 2+2+0 (null TLV)\n // tlv_t - TLV type, tlv_l - TLV length, tlv_v - TLV value\n int tlv_t = 0;\n int tlv_l = 0;\n int tlv_v = 0;\n\n // Byte array for holding Strings\n byte[] pr;\n\n while (left >= 4) {\n // Parse type, store in host byte order\n tlv_t = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse len, store in host byte order\n tlv_l = buf.getUnsignedShort(dp);\n dp += 2;\n left -= 2;\n\n // Parse val\n tlv_v = dp;\n\n // Point decode buffer at next tlv\n dp += tlv_l;\n left -= tlv_l;\n\n // TLV length check\n if (left < 0) {\n break;\n }\n\n switch(tlv_t) {\n // FT_TLV_VENDOR\n case 0x1:\n internalHeader.setVendor(buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_EX_VER\n case 0x2:\n internalHeader.setFlowVersion((short) buf.getUnsignedShort(tlv_v));\n break;\n // FT_TLV_AGG_VER\n case 0x3:\n internalHeader.setAggVersion(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_AGG_METHOD\n case 0x4:\n internalHeader.setAggMethod(buf.getUnsignedByte(tlv_v));\n break;\n // FT_TLV_EXPORTER_IP\n case 0x5:\n internalHeader.setExporterIP(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_START\n case 0x6:\n internalHeader.setStartCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_END\n case 0x7:\n internalHeader.setEndCapture(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_HEADER_FLAGS\n case 0x8:\n internalHeader.setHeaderFlags(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_ROT_SCHEDULE\n case 0x9:\n internalHeader.setRotation(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_COUNT\n case 0xA:\n internalHeader.setNumFlows(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_LOST\n case 0xB:\n internalHeader.setNumDropped(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_FLOW_MISORDERED\n case 0xC:\n internalHeader.setNumMisordered(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_PKT_CORRUPT\n case 0xD:\n internalHeader.setNumCorrupt(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_SEQ_RESET\n case 0xE:\n internalHeader.setSeqReset(buf.getUnsignedInt(tlv_v));\n break;\n // FT_TLV_CAP_HOSTNAME\n case 0xF:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setHostname(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_COMMENTS\n case 0x10:\n pr = new byte[tlv_l];\n buf.getBytes(tlv_v, pr, 0, pr.length);\n // Expected null-terminated string\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setComments(new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_NAME\n case 0x11:\n // uint32_t, uint16_t, string:\n // - IP address of device\n // - ifIndex of interface\n // - interface name\n long ip = buf.getUnsignedInt(tlv_v);\n int ifIndex = buf.getUnsignedShort(tlv_v + 4);\n pr = new byte[tlv_l - 4 - 2];\n buf.getBytes(tlv_v + 4 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n internalHeader.setInterfaceName(ip, ifIndex, new String(pr, 0, pr.length - 1));\n break;\n // FT_TLV_IF_ALIAS\n case 0x12:\n // uint32_t, uint16_t, uint16_t, string:\n // - IP address of device\n // - ifIndex count\n // - ifIndex of interface (count times)\n // - alias name\n long aliasIP = buf.getUnsignedInt(tlv_v);\n int aliasIfIndexCnt = buf.getUnsignedShort(tlv_v + 4);\n int aliasIfIndex = buf.getUnsignedShort(tlv_v + 4 + 2);\n pr = new byte[tlv_l - 4 - 2 - 2];\n buf.getBytes(tlv_v + 4 + 2 + 2, pr, 0, pr.length);\n if (pr[pr.length - 1] != 0) {\n throw new UnsupportedOperationException(\"Char sequence is not null-terminated\");\n }\n\n internalHeader.setInterfaceAlias(aliasIP, aliasIfIndexCnt, aliasIfIndex,\n new String(pr, 0, pr.length - 1));\n break;\n // Case 0x0\n default:\n break;\n }\n }\n buf = null;\n pr = null;\n }\n return internalHeader;\n }", "public void testHeaders() {\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset59.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertFalse(JdkUtil.LogEventType.UNKNOWN.toString() + \" collector identified.\",\n jvmRun.getEventTypes().contains(LogEventType.UNKNOWN));\n Assert.assertEquals(\"Event type count not correct.\", 3, jvmRun.getEventTypes().size());\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_COMMAND_LINE_FLAGS.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_COMMAND_LINE_FLAGS));\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_MEMORY.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_MEMORY));\n Assert.assertTrue(JdkUtil.LogEventType.HEADER_VERSION.toString() + \" not identified.\",\n jvmRun.getEventTypes().contains(LogEventType.HEADER_VERSION));\n Assert.assertTrue(Analysis.WARN_EXPLICIT_GC_DISABLED + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_EXPLICIT_GC_DISABLED));\n }", "@Override\n\tpublic void readFields(DataInput in) throws IOException {\n\t\tbytes = in.readInt();\n\t\tbuffer = new byte[bytes];\n\t\tint num = 0;\t\t\n\t\twhile(num < bytes){\n\t\t\tbuffer[num] = in.readByte();\n\t\t\tnum++;\n\t\t}\n\t}", "public byte[] getLabelBytes() {\n int labelBytesLength = readInt(this.bytes, 0);\n return Arrays.copyOfRange(this.bytes, 4, 4 + labelBytesLength);\n }", "private DefaultListModel<String> loadCapturedHeaders(){\r\n\t\tif(FileData.getFileModel(FileType.CAPTURED) != null) {\r\n\t\t\tfor(String header : FileData.getFileModel(FileType.CAPTURED).getFileContents().getHeaderNames()) {\r\n\t\t\t\tthis.capturedHeaderModel.addElement(header);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tthis.capturedHeaderModel.clear();\r\n\t\t}\r\n\t\treturn this.capturedHeaderModel;\r\n\t}", "com.google.protobuf.ByteString\n getField1848Bytes();", "private List readHeadings( PushbackInputStream stream ) throws IOException {\n List headings = new ArrayList();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n done = true;\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n headings.add( readString( stream ) );\n break;\n case END:\n done = true;\n break;\n default:\n stream.unread( c );\n headings.add( readToken( stream ) );\n }\n }\n return headings;\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "private AupLabelTrack readLabelTrack(XMLStreamReader reader) throws XMLStreamException {\n\t\tAupLabelTrack labelTrack = new AupLabelTrack();\n\t\twhile(reader.hasNext()) {\n\t\t\treader.next();\n\t\t\tif(reader.isEndElement() && reader.getLocalName().equals(\"labeltrack\")) {\n\t\t\t\tbreak;\n\t\t\t}else if(reader.isStartElement() && reader.getLocalName().equals(\"label\")) {\n\t\t\t\tString title = null;\n\t\t\t\tString t = null;\n\t\t\t\tString t1 = null;\n\t\t\t\tfor (int i = 0; i < reader.getAttributeCount(); i++) {\n\t\t\t\t\tString name = reader.getAttributeName(i).getLocalPart();\n\t\t\t\t\tif(name.equals(\"t\")) {\n\t\t\t\t\t\tt = reader.getAttributeValue(i);\n\t\t\t\t\t}else if(name.equals(\"t1\")) {\n\t\t\t\t\t\tt1 = reader.getAttributeValue(i);\n\t\t\t\t\t}else if(name.equals(\"title\")) {\n\t\t\t\t\t\ttitle = reader.getAttributeValue(i);\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tAupLabel label = new AupLabel(t,t1,title,mTransformer);\n\t\t\t\tlabelTrack.add(label);\n\t\t\t}\n\t\t}\n\t\treturn labelTrack;\n\t}", "private void initRowHeaders() {\n TableColumn aColumn = jTable1.getColumnModel().getColumn(0);\n TableCellRenderer aRenderer = jTable1.getTableHeader().getDefaultRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch !\");\n aColumn = jTable1.getColumnModel().getColumn(0);\n aRenderer = aColumn.getHeaderRenderer();\n if (aRenderer == null) {\n System.out.println(\" Aouch Aouch !\");\n // System.exit(3);\n exitForm(null);\n }\n }\n Component aComponent = aRenderer.getTableCellRendererComponent(jTable1, aColumn.getHeaderValue(), false, false, -1, 0);\n aFont = aComponent.getFont();\n aBackground = aComponent.getBackground();\n aForeground = aComponent.getForeground();\n\n border = (Border) UIManager.getDefaults().get(\"TableHeader.cellBorder\");\n insets = border.getBorderInsets(jTable1.getTableHeader());\n metrics = jTable1.getFontMetrics(aFont);\n }", "private String[] getHeaderColumns() {\n int length = CallLogQuery._PROJECTION.length;\n String[] columns = new String[length + 1];\n System.arraycopy(CallLogQuery._PROJECTION, 0, columns, 0, length);\n columns[length] = CallLogQuery.SECTION_NAME;\n return columns;\n }", "private void _readHeader() throws PicoException, IOException {\n if (!_open)\n return;\n\n // Save the current position and move to the start of the header.\n long pos = _backing.getFilePointer();\n _backing.seek(PicoStructure.HEAD_START);\n\n // Read the header from the file. We read the fixed length portion\n // here, up through the start of the key.\n byte[] _fixedhdr = new byte[(int) PicoStructure.FIXED_HEADER_LENGTH];\n int length = _backing.read(_fixedhdr);\n\n // Make sure we have enough bytes for the magic string.\n if (length < PicoStructure.MAGIC_LENGTH - PicoStructure.MAGIC_OFFSET) {\n // The magic string was not present. This cannot be a Pico wrapper\n // file.\n throw new PicoException(\"File too short; missing magic string.\");\n }\n\n // Process the fixed portion of the header. After calling this the\n // key is allocated, but not populated.\n _head = PicoHeader.getHeader(_fixedhdr);\n\n // The hash is valid because we just read it from the file and nothing\n // has yet been written. All write methods must invalidate the hash.\n _hashvalid = true;\n\n // Go and read the key, now that we know its length. Note that we read\n // it directly into the array returned by getKey.\n length = _backing.read(_head.getKey());\n\n // Make sure we have the complete key. The only bad case is that the\n // file ends before the key is complete.\n if (length != _head.getKey().length) {\n throw new PicoException(\"File too short; incomplete key.\");\n }\n\n // Move to the original position in the file.\n _backing.seek(pos);\n\n // Ka-presto! The header has been read. Life is good.\n }", "Collection<String> getHeaderNames();", "int[] getHeader(DataInputStream dataInputStream) throws IOException {\n dataInputStream.readShort();\t//Reads ID\r\n dataInputStream.readShort();\t//Reads flags\r\n dataInputStream.readShort();\t//Reads Questions\r\n short answers = dataInputStream.readShort();\r\n short authoritative = dataInputStream.readShort();\r\n short additional = dataInputStream.readShort();\r\n\r\n String hostName = getHostByName(dataInputStream);\r\n dataInputStream.readInt();\r\n\r\n int[] output = new int[3];\r\n output[0] = (int)answers;\r\n output[1] = (int)authoritative;\r\n output[2] = (int)additional;\r\n return output;\r\n }", "public String[][] getRecord() {\n String fileName = \"dt-data.txt\";\n // This will reference one line at a time\n String line = null;\n int j = 0;\n\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader =\n new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n String[] array = line.split(\", \");\n for (int i = 0; i <= 8; i++) {\n record[j][i] = array[i];\n }\n j++;\n }\n\n // Always close files.\n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n // Or we could just do this:\n // ex.printStackTrace();\n }\n return record;\n }", "public List<Map<String, Map<String, Object>>> getHeader(){\n return headerDescription;\n }", "private synchronized void readContent(RecordInputStream s) throws IOException {\r\n originalNamesToFixedNames.clear();\r\n fixedNamesToOriginalNames.clear();\r\n \r\n int nEntries = s.readIntCompressed();\r\n for (int i = 0; i < nEntries; i++) {\r\n String originalName = s.readUTF();\r\n String fixedName = s.readUTF();\r\n originalNamesToFixedNames.put(originalName, fixedName);\r\n fixedNamesToOriginalNames.put(fixedName, originalName);\r\n }\r\n }", "public DetailsFileHeaderTemplate() {\n\t\tsuper(ID_HEADER_LABEL, DESCRIPTION_HEADER_LABEL, OCCURRENCES_HEADER_LABEL);\n\t}", "@Override\n\tpublic void readFields(DataInput arg0) throws IOException {\n\t\tthis.country.set(arg0.readUTF());\n\t\tthis.tag.set(arg0.readUTF());\n\t}", "private String getHeaders(int index, int myArrayLength) {\n\t\t\n\t\tString myHeaders[] = new String[myArrayLength];\n\t\t\n\t\tmyHeaders[0] = \"Elements\";\n\t\tmyHeaders[1] = \" \";\n\t\tmyHeaders[2] = \"Lineal Search\";\n\t\tmyHeaders[3] = \" \";\n\t\tmyHeaders[4] = \"Binary Search\";\n\t\t\n\t\treturn myHeaders[index];\n\t\t\n\t}", "public DNSHeader (BigEndianDecoder decoder)\n {\n\n this.id = decoder.decodeShort();\n this.flag = decoder.decodeShort();\n this.questionCount = decoder.decodeShort();\n this.answerCount = decoder.decodeShort();\n this.nameServerCount = decoder.decodeShort();\n this.additionalFullRRCount = decoder.decodeShort();\n\n }", "public String[] getHeaders()\n\t{\n\t\tString[] lines = this.header.split(\"\\\\r\\\\n\");\n\t\treturn lines;\n\t}", "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "public void readFields(DataInput in) throws IOException {\n\t\tfirstName.readFields(in);\n\t\tlastName.readFields(in);\n\t}", "private void readObject(java.io.ObjectInputStream s)\r\n throws java.io.IOException, ClassNotFoundException {\r\n // Read in any hidden serialization magic\r\n s.defaultReadObject();\r\n\r\n // Read in size\r\n int size = s.readInt();\r\n\r\n // Initialize header\r\n//INSTRUMENTATION BEGIN\r\n //header = new Entry(null, null, null);\r\n header = new Entry(null, null, null, this);\r\n//INSTRUMENTATION END\r\n header.next = header.previous = header;\r\n\r\n // Read in all elements in the proper order.\r\n for (int i = 0; i < size; i++)\r\n add(s.readObject());\r\n }", "com.google.protobuf.ByteString\n getField1078Bytes();", "@Override\n public IRecord procHeader(IRecord r) {\n return r;\n }", "public void setHeaderLabel() {\n\t\t\tlblGameBoard\n\t\t\t\t\t.setText(LABEL);\n\t}", "public boolean readHeader(final boolean loadTagBuffer) throws IOException {\r\n int[] extents;\r\n String type, // type of data; there are 7, see FileInfoDicom\r\n name; // string representing the tag\r\n\r\n boolean endianess = FileBase.LITTLE_ENDIAN; // all DICOM files start as little endian (tags 0002)\r\n boolean flag = true;\r\n\r\n if (loadTagBuffer == true) {\r\n loadTagBuffer();\r\n }\r\n\r\n String strValue = null;\r\n Object data = null;\r\n FileDicomSQ sq = null;\r\n\r\n try {\r\n extents = new int[2];\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n throw new IOException(\"Out of Memory in FileDicom.readHeader\");\r\n }\r\n\r\n metaGroupLength = 0;\r\n elementLength = 0;\r\n fileInfo.setEndianess(endianess);\r\n\r\n skipBytes(ID_OFFSET); // Find \"DICM\" tag\r\n\r\n // In v. 3.0, within the ID_OFFSET is general header information that\r\n // is not encoded into data elements and not present in DICOM v. 2.0.\r\n // However, it is optional.\r\n\r\n if ( !getString(4).equals(\"DICM\")) {\r\n fileInfo.containsDICM = false;\r\n seek(0); // set file pointer to zero\r\n }\r\n\r\n fileInfo.setDataType(ModelStorageBase.SHORT); // Default file type\r\n\r\n final FileDicomTagTable tagTable = fileInfo.getTagTable();\r\n\r\n while (flag == true) {\r\n\r\n int bPtrOld = bPtr;\r\n boolean isPrivate = false;\r\n if (fileInfo.containsDICM) {\r\n\r\n // endianess is defined in a tag and set here, after the transfer\r\n // syntax group has been read in\r\n if (getFilePointer() >= (ID_OFFSET + 4 + metaGroupLength)) {\r\n endianess = fileInfo.getEndianess();\r\n // Preferences.debug(\"endianess = \" + endianess + \"\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n } else {\r\n\r\n if (getFilePointer() >= metaGroupLength) {\r\n endianess = fileInfo.getEndianess();\r\n }\r\n }\r\n\r\n // ******* Gets the next element\r\n getNextElement(endianess); // gets group, element, length\r\n name = convertGroupElement(groupWord, elementWord);\r\n\r\n if (name.equals(\"2005,140F\")) {\r\n System.out.println(\"Begin debug analysis.\");\r\n }\r\n\r\n final FileDicomKey key = new FileDicomKey(name);\r\n int tagVM;\r\n\r\n // Preferences.debug(\"group = \" + groupWord + \" element = \" + elementWord + \" length = \" +\r\n // elementLength + \"\\n\", Preferences.DEBUG_FILEIO);\r\n\r\n if ( (fileInfo.vr_type == FileInfoDicom.IMPLICIT) || (groupWord == 2)) {\r\n\r\n // implicit VR means VR is based on tag as defined in dictionary\r\n type = DicomDictionary.getType(key);\r\n tagVM = DicomDictionary.getVM(key);\r\n\r\n // the tag was not found in the dictionary..\r\n if (type == null) {\r\n type = \"typeUnknown\";\r\n tagVM = 0;\r\n }\r\n } else { // Explicit VR\r\n // System.err.println(\"Working with explicit: \"+key);\r\n\r\n type = FileDicomTagInfo.getType(new String(vr));\r\n\r\n if ( !DicomDictionary.containsTag(key)) { // a private tag\r\n tagVM = 0;\r\n isPrivate = true;\r\n } else { // not a private tag\r\n\r\n final FileDicomTagInfo info = DicomDictionary.getInfo(key);\r\n // this is required if DicomDictionary contains wild card characters\r\n info.setKey(key);\r\n tagVM = info.getValueMultiplicity();\r\n }\r\n }\r\n\r\n if ( (elementWord == 0) && (elementLength == 0)) { // End of file\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Unexpected end of file: \" + fileName\r\n + \" Unable to load image.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n if ( (getFilePointer() & 1) != 0) { // The file location pointer is at an odd byte number\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Error: Input file corrupted. Unable to load image.\");\r\n }\r\n\r\n // System.err.println(\"name: \"+ name + \" , len: \" + Integer.toString(elementLength, 0x10));\r\n System.err.println(\"ERROR CAUSED BY READING IMAGE ON ODD BYTE\");\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n\r\n try {\r\n bPtrOld = bPtr;\r\n if (type.equals(\"typeString\")) {\r\n strValue = getString(elementLength);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\") && !name.equals(\"0028,1202\")\r\n && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n data = getByte(tagVM, elementLength, endianess);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n data = getShort(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeInt\")) {\r\n data = getInteger(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeFloat\")) {\r\n data = getFloat(tagVM, elementLength, endianess);\r\n } else if (type.equals(\"typeDouble\")) {\r\n data = getDouble(tagVM, elementLength, endianess);\r\n }\r\n // (type == \"typeUnknown\" && elementLength == -1) Implicit sequence tag if not in DICOM dictionary.\r\n else if (type.equals(\"typeSequence\") || ( (type == \"typeUnknown\") && (elementLength == -1))) {\r\n final int len = elementLength;\r\n\r\n // save these values because they'll change as the sequence is read in below.\r\n Preferences.debug(\"Sequence Tags: (\" + name + \"); length = \" + len + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n sq = (FileDicomSQ) getSequence(endianess, len, name);\r\n sequenceTags.put(key, sq);\r\n // System.err.print( \"SEQUENCE DONE: Sequence Tags: (\" + key + \")\"+\" \"+type);\r\n // Integer.toString(len, 0x10) + \"\\n\");\r\n\r\n try {\r\n\r\n } catch (final NullPointerException e) {\r\n System.err.println(\"Null pointer exception while setting value. Trying to put new tag.\");\r\n }\r\n Preferences.debug(\"Finished sequence tags.\\n\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n // check if private\r\n if (isPrivate) {\r\n if (type.equals(\"typeString\")) {\r\n privateTags.put(key, strValue);\r\n } else if ( !type.equals(\"typeSequence\")) {\r\n privateTags.put(key, data);\r\n } else {\r\n privateTags.put(key, sq);\r\n }\r\n }\r\n\r\n // check if should anonymize, note user can specify private tags to anonymize\r\n if (tagExistInAnonymizeTagIDs(key.toString())) {\r\n\r\n // System.out.print(\"Writing \"+key+\"\\t\");\r\n\r\n final long raPtrOld = raFile.getFilePointer();\r\n if (type.equals(\"typeString\")) {\r\n\r\n // System.out.println(strValue);\r\n anonymizeTags.put(key, strValue);\r\n String anonStr = \"\";\r\n if (key.equals(\"0008,0014\") || key.equals(\"0008,0018\") || key.equals(\"0020,000E\")\r\n || key.equals(\"0020,000D\") || key.equals(\"0020,0010\") || key.equals(\"0020,0052\")) {\r\n final Random r = new Random();\r\n\r\n for (int i = 0; i < strValue.length(); i++) {\r\n if (strValue.charAt(i) == '.') {\r\n anonStr = anonStr + \".\";\r\n } else if (key.equals(\"0008,0018\")) {\r\n anonStr = anonStr + r.nextInt(10);\r\n } else {\r\n anonStr = anonStr + \"1\";\r\n }\r\n }\r\n } else {\r\n for (int i = 0; i < strValue.length(); i++) {\r\n anonStr = anonStr + \"X\";\r\n }\r\n }\r\n\r\n raFile.seek(bPtrOld);\r\n raFile.writeBytes(anonStr); // non-anon would be strValue\r\n raFile.seek(raPtrOld);\r\n System.out.println(\"Writing \" + strValue + \" to \" + bPtrOld + \". Returned raPtr to \"\r\n + raPtrOld);\r\n } else if (type.equals(\"otherByteString\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"otherWordString\") && !name.equals(\"0028,1201\")\r\n && !name.equals(\"0028,1202\") && !name.equals(\"0028,1203\")) {\r\n\r\n if ( !name.equals(FileDicomInner.IMAGE_TAG)) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n final byte[] b = new byte[ ((Byte[]) data).length];\r\n for (int i = 0; i < b.length; i++) {\r\n b[i] = 0;\r\n }\r\n raFile.seek(bPtrOld);\r\n raFile.write(b);\r\n raFile.seek(raPtrOld);\r\n }\r\n } else if (type.equals(\"typeShort\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Short || data instanceof Integer) {\r\n writeShort((short) 0, endianess);\r\n } else if (data instanceof Short[] || data instanceof Integer[]) {\r\n if (data instanceof Integer[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Short[]) data).length; i++) {\r\n writeShort((short) 0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeInt\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Integer) {\r\n writeInt(0, endianess);\r\n } else if (data instanceof Integer[]) {\r\n for (int i = 0; i < ((Integer[]) data).length; i++) {\r\n writeInt(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeFloat\")) {\r\n // System.out.println(data);\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Float) {\r\n writeFloat(0, endianess);\r\n } else if (data instanceof Float[] || data instanceof Double[]) {\r\n if (data instanceof Double[]) {\r\n System.err.println(\"Unusual data type encountered\");\r\n }\r\n for (int i = 0; i < ((Float[]) data).length; i++) {\r\n writeFloat(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n } else if (type.equals(\"typeDouble\")) {\r\n anonymizeTags.put(key, data);\r\n\r\n raFile.seek(bPtrOld);\r\n if (data instanceof Double) {\r\n writeDouble(0, endianess);\r\n } else if (data instanceof Double[]) {\r\n for (int i = 0; i < ((Double[]) data).length; i++) {\r\n writeDouble(0, endianess);\r\n }\r\n } else {\r\n System.err.println(\"Data corruption\");\r\n }\r\n raFile.seek(raPtrOld);\r\n }\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory in FileDicom.readHeader\");\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory in FileDicom.readHeader\\n\", Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException();\r\n }\r\n\r\n if (name.equals(\"0002,0000\")) { // length of the transfer syntax group\r\n\r\n if (data != null) {\r\n metaGroupLength = ((Integer) (data)).intValue() + 12; // 12 is the length of 0002,0000 tag\r\n }\r\n\r\n Preferences.debug(\"metalength = \" + metaGroupLength + \" location \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else if (name.equals(\"0018,602C\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 0);\r\n } else if (name.equals(\"0018,602E\")) {\r\n fileInfo.setUnitsOfMeasure(FileInfoBase.CENTIMETERS, 1);\r\n } else if (name.equals(\"0002,0010\")) {\r\n\r\n // Transfer Syntax UID: DICOM part 10 page 13, part 5 p. 42-48, Part 6 p. 53\r\n // 1.2.840.10008.1.2 Implicit VR Little Endian (Default)\r\n // 1.2.840.10008.1.2.1 Explicit VR Little Endian\r\n // 1.2.840.10008.1.2.2 Explicit VR Big Endian\r\n // 1.2.840.10008.1.2.4.50 8-bit Lossy JPEG (JPEG Coding Process 1)\r\n // 1.2.840.10008.1.2.4.51 12-bit Lossy JPEG (JPEG Coding Process 4)\r\n // 1.2.840.10008.1.2.4.57 Lossless JPEG Non-hierarchical (JPEG Coding Process 14)\r\n // we should bounce out if we don't support this transfer syntax\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.IMPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.1\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().equals(\"1.2.840.10008.1.2.2\")) {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Explicit VR - Big Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.BIG_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = false;\r\n } else if (strValue.trim().startsWith(\"1.2.840.10008.1.2.4.\")) { // JPEG\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue\r\n + \" Implicit VR - Little Endian \\n\", Preferences.DEBUG_FILEIO);\r\n\r\n fileInfo.setEndianess(FileBase.LITTLE_ENDIAN);\r\n fileInfo.vr_type = FileInfoDicom.EXPLICIT;\r\n encapsulated = true;\r\n\r\n if (strValue.trim().equals(\"1.2.840.10008.1.2.4.57\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.58\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.65\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.66\")\r\n || strValue.trim().equals(\"1.2.840.10008.1.2.4.70\")) {\r\n lossy = false;\r\n } else {\r\n lossy = true;\r\n }\r\n } else {\r\n Preferences.debug(\"File Dicom: readHeader - Transfer Syntax = \" + strValue + \" unknown!\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"MIPAV does not support transfer syntax:\\n\" + strValue);\r\n }\r\n\r\n flag = false; // break loop\r\n\r\n return false; // couldn't read it!\r\n }\r\n } else if (name.equals(FileDicomInner.IMAGE_TAG)) { // && elementLength!=0) { // The image.\r\n System.out.println(\"Reading \" + name + \" image data\");\r\n // This complicated code determines whether or not the offset is correct for the image.\r\n // For that to be true, (height * width * pixel spacing) + the present offset should equal\r\n // the length of the file. If not, 4 might need to be added (I don't know why). If not again,\r\n // the function returns false.\r\n\r\n final int imageLength = extents[0] * extents[1] * fileInfo.bitsAllocated / 8;\r\n\r\n Preferences.debug(\"File Dicom: readHeader - Data tag = \" + FileDicomInner.IMAGE_TAG + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - imageLength = \" + imageLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n Preferences.debug(\"File Dicom: readHeader - getFilePointer = \" + getFilePointer() + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n } else {\r\n fileInfo.displayType = fileInfo.getDataType();\r\n }\r\n\r\n if ( !encapsulated) {\r\n // System.err.println( \"\\n\" +\r\n // Long.toString(getFilePointer()) + \" \" +\r\n // Long.toString(raFile.length()) +\r\n // \" image length = \" + imageLength );\r\n\r\n long fileEnd;\r\n\r\n if (loadTagBuffer == true) {\r\n fileEnd = raFile.length();\r\n } else {\r\n fileEnd = fLength;\r\n }\r\n\r\n if ( (imageLength + getFilePointer()) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer()); // Mark where the image is\r\n }\r\n // I think the extra 4 bytes is for explicit tags!!\r\n // see Part 5 page 27 1998\r\n else if ( (imageLength + getFilePointer() + 4) <= fileEnd) {\r\n fileInfo.setOffset(getFilePointer() + 4);\r\n } else {\r\n\r\n // Preferences.debug( \"File Dicom: readHeader: xDim = \" + extents[0] + \" yDim = \" +\r\n // extents[1] +\r\n // \" Bits allocated = \" + fileInfo.bitsAllocated, 2);\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Image not at expected offset.\");\r\n }\r\n\r\n throw new IOException(\"Error while reading header\");\r\n }\r\n } else { // encapsulated\r\n fileInfo.setOffset( (getFilePointer() - 12));\r\n }\r\n\r\n fileInfo.setExtents(extents);\r\n flag = false; // break loop\r\n } else if (type.equals(\"typeUnknown\")) { // Private tag, may not be reading in correctly.\r\n\r\n try {\r\n\r\n // set the value if the tag is in the dictionary (which means it isn't private..) or has already\r\n // been put into the tag table without a value (private tag with explicit vr)\r\n if (DicomDictionary.containsTag(key) || tagTable.containsTag(key)) {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note unknown data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n } else {\r\n final Object obj = readUnknownData();\r\n Preferences.debug(\"Note private data (\" + key + \"):\\t\" + obj + \"\\t\" + elementLength);\r\n privateTags.put(key, obj);\r\n\r\n // tagTable\r\n // .putPrivateTagValue(new FileDicomTagInfo(key, null, tagVM, \"PrivateTag\", \"Private Tag\"));\r\n\r\n // tagTable.setValue(key, readUnknownData(), elementLength);\r\n\r\n Preferences.debug(\"Group = \" + groupWord + \" element = \" + elementWord + \" Type unknown\"\r\n + \"; value = \" + strValue + \"; element length = \" + elementLength + \"\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n } catch (final OutOfMemoryError e) {\r\n\r\n if ( !isQuiet()) {\r\n MipavUtil.displayError(\"Out of memory error while reading \\\"\" + fileName\r\n + \"\\\".\\nThis may not be a DICOM image.\");\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n } else {\r\n Preferences.debug(\"Out of memory storing unknown tags in FileDicom.readHeader\\n\",\r\n Preferences.DEBUG_FILEIO);\r\n }\r\n\r\n e.printStackTrace();\r\n\r\n throw new IOException(\"Out of memory storing unknown tags in FileDicom.readHeader\");\r\n } catch (final NullPointerException npe) {\r\n System.err.println(\"name: \" + name);\r\n System.err.print(\"no hashtable? \");\r\n System.err.println(tagTable == null);\r\n throw npe;\r\n }\r\n }\r\n }\r\n // Done reading tags\r\n\r\n String photometricInterp = null;\r\n\r\n if (tagTable.getValue(\"0028,0004\") != null) {\r\n fileInfo.photometricInterp = ((String) (tagTable.getValue(\"0028,0004\"))).trim();\r\n photometricInterp = fileInfo.photometricInterp.trim();\r\n }\r\n\r\n if (photometricInterp == null) { // Default to MONOCROME2 and hope for the best\r\n photometricInterp = new String(\"MONOCHROME2\");\r\n }\r\n\r\n if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.BYTE);\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.USHORT);\r\n fileInfo.displayType = ModelStorageBase.USHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n } else if ( (photometricInterp.equals(\"MONOCHROME1\") || photometricInterp.equals(\"MONOCHROME2\"))\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.SIGNED_PIXEL_REP) && (fileInfo.bitsAllocated > 8)) {\r\n fileInfo.setDataType(ModelStorageBase.SHORT);\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n fileInfo.bytesPerPixel = 2;\r\n }\r\n // add something for RGB DICOM images - search on this !!!!\r\n else if (photometricInterp.equals(\"RGB\") && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"YBR_FULL_422\") && (fileInfo.bitsAllocated == 8) && encapsulated) {\r\n fileInfo.setDataType(ModelStorageBase.ARGB);\r\n fileInfo.displayType = ModelStorageBase.ARGB;\r\n fileInfo.bytesPerPixel = 3;\r\n\r\n if (tagTable.getValue(\"0028,0006\") != null) {\r\n fileInfo.planarConfig = ((Short) (tagTable.getValue(\"0028,0006\"))).shortValue();\r\n } else {\r\n fileInfo.planarConfig = 0; // rgb, rgb, rgb\r\n }\r\n } else if (photometricInterp.equals(\"PALETTE COLOR\")\r\n && (fileInfo.pixelRepresentation == FileInfoDicom.UNSIGNED_PIXEL_REP)\r\n && (fileInfo.bitsAllocated == 8)) {\r\n fileInfo.setDataType(ModelStorageBase.UBYTE);\r\n fileInfo.displayType = ModelStorageBase.UBYTE;\r\n fileInfo.bytesPerPixel = 1;\r\n\r\n final int[] dimExtents = new int[2];\r\n dimExtents[0] = 4;\r\n dimExtents[1] = 256;\r\n lut = new ModelLUT(ModelLUT.GRAY, 256, dimExtents);\r\n\r\n for (int q = 0; q < dimExtents[1]; q++) {\r\n lut.set(0, q, 1); // the alpha channel is preloaded.\r\n }\r\n // sets the LUT to exist; we wait for the pallete tags to\r\n // describe what the lut should actually look like.\r\n } else {\r\n Preferences.debug(\"File DICOM: readImage() - Unsupported pixel Representation\",\r\n Preferences.DEBUG_FILEIO);\r\n\r\n if (raFile != null) {\r\n raFile.close();\r\n }\r\n\r\n return false;\r\n }\r\n\r\n if (fileInfo.getModality() == FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY) {\r\n fileInfo.displayType = ModelStorageBase.FLOAT;\r\n // a bit of a hack - indicates Model image should be reallocated to float for PET image the data is\r\n // stored\r\n // as 2 bytes (short) but is \"normalized\" using the slope parameter required for PET images (intercept\r\n // always 0 for PET).\r\n }\r\n\r\n if ( ( (fileInfo.getDataType() == ModelStorageBase.UBYTE) || (fileInfo.getDataType() == ModelStorageBase.USHORT))\r\n && (fileInfo.getRescaleIntercept() < 0)) {\r\n // this performs a similar method as the pet adjustment for float images stored on disk as short to read\r\n // in\r\n // signed byte and signed short images stored on disk as unsigned byte or unsigned short with a negative\r\n // rescale intercept\r\n if (fileInfo.getDataType() == ModelStorageBase.UBYTE) {\r\n fileInfo.displayType = ModelStorageBase.BYTE;\r\n } else if (fileInfo.getDataType() == ModelStorageBase.USHORT) {\r\n fileInfo.displayType = ModelStorageBase.SHORT;\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1201\") != null) {\r\n // red channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1201\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(1, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1202\") != null) {\r\n\r\n // green channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1202\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(2, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n }\r\n\r\n if (tagTable.getValue(\"0028,1203\") != null) {\r\n\r\n // blue channel LUT\r\n final FileDicomTag tag = tagTable.get(new FileDicomKey(\"0028,1203\"));\r\n final Object[] values = tag.getValueList();\r\n final int lutVals = values.length;\r\n\r\n // load LUT.\r\n if (values instanceof Byte[]) {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Byte) values[qq]).intValue());\r\n }\r\n } else {\r\n\r\n for (int qq = 0; qq < lutVals; qq++) {\r\n lut.set(3, qq, ((Short) values[qq]).intValue());\r\n }\r\n }\r\n\r\n // here we make the lut indexed because we know that\r\n // all the LUT tags are in the LUT.\r\n lut.makeIndexedLUT(null);\r\n }\r\n\r\n hasHeaderBeenRead = true;\r\n\r\n if ( (loadTagBuffer == true) && (raFile != null)) {\r\n raFile.close();\r\n }\r\n\r\n return true;\r\n }", "@Override\n public IRecord procHeader(IRecord r)\n {\n return r;\n }", "com.google.protobuf.ByteString\n getField1301Bytes();", "public Sample load(BufferedReader r) throws IOException {\n\tString line = r.readLine();\n\tif (line==null || !line.startsWith(\"HEADER:\"))\n\t throw new WrongFiletypeException(); // no HEADER: found\n\n\t// new sample, with given filename\n\tSample s = new Sample();\n\n\t// don't know end, yet\n\tYear end = null;\n\tint length = -1;\n\n\t// metadata\n\tfor (;;) {\n\t // read a line\n\t line = r.readLine();\n\n\t // got to data, stop\n\t if (line.startsWith(\"DATA:\"))\n\t\tbreak;\n\n\t // parse line as \"variable = value\", and put into s.meta\n\t int i = line.indexOf(\"=\");\n\t if (i == -1)\n\t\tthrow new WrongFiletypeException();\n\t String tag = line.substring(0, i);\n\t String value = line.substring(i+1);\n\n\t // got end-date.\n\t if (tag.equals(\"DateEnd\"))\n\t\tend = new Year(value);\n\t \n\t if (tag.equals(\"Length\"))\n\t \tlength = Integer.parseInt(value);\n\n\t // WRITE ME: parse other tags and interpret metadata as\n\t // intelligently as possible\n\t}\n\n\ts.count = new ArrayList();\n\ts.incr = new ArrayList();\n\ts.decr = new ArrayList();\n\n\t// data -- i'll assume all data is (width,count,up,down)\n\tStreamTokenizer t = new StreamTokenizer(r);\n\tint idx = 0;\n\t\n\tfor (;;) {\n\t // parse (datum, count, up, dn)\n\t\tint datum, count, up, dn;\n\t\ttry {\n\t\t\t\tt.nextToken();\n\t\t\t\tdatum = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tcount = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tup = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tdn = (int) t.nval;\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new WrongFiletypeException();\n\t\t}\n\n\t // (0,0,0,0) seems to mean end-of-sample\n\t if (datum == 0)\n\t \tbreak;\n\n\t // add to lists\n\t s.data.add(new Integer(datum));\n\t s.count.add(new Integer(count));\n\t s.incr.add(new Integer(up));\n\t s.decr.add(new Integer(dn));\n\t \n\t idx++;\n\t \n\t // break out if we have 'length' samples\n\t if(idx == length)\n\t \tbreak;\n\t}\n\n\t// no end? die.\n\tif (end == null)\n\t throw new WrongFiletypeException();\n\n\t// set range, and return\n\ts.range = new Range(end.add(1 - s.data.size()), end);\n\treturn s;\n }", "@Override\n protected Field[] getFields(IndexReader reader, int docId, String fieldName) throws IOException {\n List<Object> values = sourceLookup.extractRawValues(fieldType.name());\n if (values.isEmpty()) {\n return EMPTY_FIELDS;\n }\n Field[] fields = new Field[values.size()];\n for (int i = 0; i < values.size(); i++) {\n fields[i] = new Field(fieldType.name(), values.get(i).toString(), TextField.TYPE_NOT_STORED);\n }\n return fields;\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "com.google.protobuf.ByteString\n getField1066Bytes();", "java.lang.String getProbeFields(int index);", "public byte[] getHeader() {\n\treturn header;\n }", "private List<Variable> headerVariables(String headerLine) {\n LinkedList<Variable> vars = new LinkedList<Variable>();\n Matcher matcher = headerVariablePattern.matcher(headerLine);\n while (matcher.find()) {\n String varname = matcher.group(1);\n if (null != varname) {\n Map<String,Object> attrs = new TreeMap<String,Object>();\n // assuming float for all var for now\n Variable var = new Variable(varname, NCUtil.XType.NC_FLOAT, attrs);\n vars.add(var);\n }\n }\n return vars;\n }", "private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }", "@Override\n\tpublic String[] getFieldName() {\n\t\treturn new String[]{\"编码\",\"名称\",\"属性\"};\n\t}", "public void processHeader()\n {\n try{\n String line = oReader.readLine();\n String regrex = line.replaceAll(\"[^0-9]+\",\"\"); //only looking at the numbers\n this.maxmem = Integer.parseInt(regrex.substring(4, 8), 16);\n mem = new MainMemory(maxmem);\n\n } catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public static void readRecords() {\n\t\t\n\t\tSystem.out.printf(\"%-10s%-12s%-12s%10s%n\", \"Account\", \"First Name\", \"Last Name\", \"Balance\");\n\t\t\n\t\ttry {\n\t\t\twhile (input.hasNext()) {\n\t\t\t\tSystem.out.printf(\"%-10s%-12s%-12s%10.2f%n\", input.nextInt(), input.next(), input.next(), input.nextDouble());\n\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (NoSuchElementException elementException) {\n\t\t\tSystem.out.println(elementException);\n\t\t\tSystem.err.println(\"File improperly formed. Terminating.\");\n\t\t}\n\t\tcatch (IllegalStateException stateException)\n\t\t{\n\t\t\tSystem.err.println(\"Error reading from file. Terminating.\");\n\t\t}\n\t\t\t\n\t\t}", "public void readFields(DataInput in) throws IOException {\n\t\tid.readFields(in);\n\t\ttag.readFields(in);\n\t}", "com.google.protobuf.ByteString\n getField1018Bytes();" ]
[ "0.69144565", "0.64766306", "0.6113598", "0.605162", "0.5962181", "0.5896178", "0.58882433", "0.58728474", "0.5832155", "0.5800123", "0.557133", "0.5472336", "0.5432642", "0.532015", "0.530479", "0.526187", "0.5256802", "0.52560204", "0.525092", "0.5246309", "0.5245477", "0.5210433", "0.52019364", "0.5199254", "0.5167844", "0.5153166", "0.51333123", "0.5119619", "0.51112026", "0.5107758", "0.51020414", "0.50972104", "0.50885636", "0.5068891", "0.50665015", "0.5064756", "0.50519985", "0.50443435", "0.50422025", "0.50407803", "0.5039148", "0.5038692", "0.50365645", "0.50352126", "0.5028211", "0.5026848", "0.5026281", "0.50132555", "0.49988696", "0.49936113", "0.4990474", "0.4989918", "0.49866664", "0.4985545", "0.4983585", "0.4980509", "0.49729592", "0.49728194", "0.49641716", "0.49552444", "0.49526095", "0.4945828", "0.49416268", "0.49363753", "0.49338526", "0.49303034", "0.49274692", "0.49261603", "0.4919004", "0.4913791", "0.48943624", "0.4887187", "0.48751292", "0.48727462", "0.48588747", "0.48443022", "0.4842427", "0.4839582", "0.4817684", "0.48171607", "0.48112416", "0.4805861", "0.4805055", "0.4799549", "0.4795345", "0.47953036", "0.47851598", "0.4774237", "0.4772289", "0.47722366", "0.477208", "0.47693774", "0.4768357", "0.47680122", "0.47646567", "0.47604972", "0.47545204", "0.47497624", "0.47480607", "0.47473887" ]
0.64780587
1
Clear the label array. This is used to create a tabbed input file without headers.
protected void clearLabels(int fields) { this.labels = new String[fields]; Arrays.fill(this.labels, ""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearLabels() {\n\t\talLabels.clear();\n\t\talLeftContainers.clear();\n\t\talRightContainers.clear();\n\t\tiMaxSegmentDepth = 0;\n\t}", "public void clearLabelRecs()\n {\n multiLabel = null;\n }", "void unsetLabel();", "private void resetArraysAndHeader()\r\n\t{\r\n\t\tmainHeader = \"\";\r\n\t\tenergyVals = \"\";\r\n\t\ttoBeOutputBranches.clear();\r\n\t\tassociatedR.clear();\r\n\t\tassociatedP.clear();\r\n\t\tassociatedQ.clear();\r\n\t\ttriangularP.clear();\r\n\t\ttriangularQ.clear();\r\n\t\ttriangularR.clear();\r\n\t\tinputBranchWithJ.clear();\r\n\t\tupperEnergyValuesWithJ.clear();\r\n\r\n\t\tif (energiesForCurrentKOppParity != null)\r\n\t\t\tenergiesForCurrentKOppParity.clear();\r\n\t}", "private void reset(){\n plotValues.clear();\n xLabels.clear();\n }", "public void clear(){\n\t\tcontenido = getName() + ':';\n\t\tindices.clear();\n\t\tindices.add(0);\n\t}", "protected void labelClear(){\n N11.setText(null);N12.setText(null);N13.setText(null);N14.setText(null);\n N21.setText(null);N22.setText(null);N23.setText(null);N24.setText(null);\n N31.setText(null);N32.setText(null);N33.setText(null);N34.setText(null);\n N41.setText(null);N42.setText(null);N43.setText(null);N44.setText(null);\n n11.setText(null);n12.setText(null);n13.setText(null);n14.setText(null);\n n21.setText(null);n22.setText(null);n23.setText(null);n24.setText(null);\n n31.setText(null);n32.setText(null);n33.setText(null);n34.setText(null);\n n41.setText(null);n42.setText(null);n43.setText(null);n44.setText(null);\n G11.setText(null);G12.setText(null);G13.setText(null);G14.setText(null);\n G21.setText(null);G22.setText(null);G23.setText(null);G24.setText(null);\n G31.setText(null);G32.setText(null);G33.setText(null);G34.setText(null);\n G41.setText(null);G42.setText(null);G43.setText(null);G44.setText(null);\n g11.setText(null);g12.setText(null);g13.setText(null);g14.setText(null);\n g21.setText(null);g22.setText(null);g23.setText(null);g24.setText(null);\n g31.setText(null);g32.setText(null);g33.setText(null);g34.setText(null);\n g41.setText(null);g42.setText(null);g43.setText(null);g44.setText(null);\n E11.setText(null);E12.setText(null);E13.setText(null);E14.setText(null);\n E21.setText(null);E22.setText(null);E23.setText(null);E24.setText(null);\n E31.setText(null);E32.setText(null);E33.setText(null);E34.setText(null);\n E41.setText(null);E42.setText(null);E43.setText(null);E44.setText(null);\n e11.setText(null);e12.setText(null);e13.setText(null);e14.setText(null);\n e21.setText(null);e22.setText(null);e23.setText(null);e24.setText(null);\n e31.setText(null);e32.setText(null);e33.setText(null);e34.setText(null);\n e41.setText(null);e42.setText(null);e43.setText(null);e44.setText(null);\n }", "public void makeEmpty() {\r\n\t\theader.next = null;\r\n\t\tlast = null;\r\n\t}", "public void makeEmpty() {\n header.next = null;\n }", "public void limpiarLabelsVacios() {\r\n label_nombre.setText(\"\");\r\n label_horas_teoria.setText(\"\");\r\n label_horas_practica.setText(\"\");\r\n label_creditos.setText(\"\");\r\n }", "public void resetLabel(){\r\n if(sc!= null && sc.getProperties().getAttribute(\"Label\") != null){\r\n sc.getProperties().getAttribute(\"Label\").changeValue(\"\");\r\n }\r\n }", "public void reset() {\n this.setIndex(0);\n }", "public synchronized void clear() {\n Entry tab[] = table;\n for (int index = tab.length; --index >= 0; ) {\n tab[index] = null;\n }\n count = 0;\n }", "public void reset() {\n initEntries();\n }", "public void clear() {\r\n modCount++;\r\n header.next = header.previous = header;\r\n size = 0;\r\n }", "public void clearAll()\n\t{\n\t\t// add code to clear all names from the graphArray \n\t\t// and call repaint() to update the graph\n\t}", "public Builder clearLabel() {\n \n label_ = getDefaultInstance().getLabel();\n onChanged();\n return this;\n }", "public void clearTagArray(){\n\t\t\n\t\ttagArray.clear();\n\t\t\n\t}", "private void clearViewsLabel() {\n \n viewsLabel_ = getDefaultInstance().getViewsLabel();\n }", "private void fillLabelsTabel() {\n }", "public void makeEmpty( )\n {\n header.next = null;\n }", "private void reset() {\n\t\tdata.clear();\n\t}", "public void clear(){\n\t\tfor (int i=1; i<linesAndStores.length; i++){\n\t\t\tfor(int j = 0; j<32; j++){\n\t\t\t\tsetWord(i, new Word(0));\n\t\t\t\tincrement();\n\t\t\t}\n\t\t}\n\t}", "public void reset() {\n started = false;\n flushing = false;\n moreText = true;\n headerCount = 0;\n actualLen = 0;\n }", "public void reset() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}", "public void clear() {\r\n\t\tnameInGraph.clear();\r\n\t\tnameColor.clear();\r\n\t}", "public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}", "public void clear() {\n table = new Handle[defaultSize];\n logicalSize = 0;\n }", "private static void resetFields() {\n tf_name.setText(\"\");\n tf_title.setText(\"\");\n tf_info.setText(\"\");\n tf_path.setText(\"\");\n cb_bgColor.setSelectedItem(\"white\");\n cb_titleColor.setSelectedItem(\"black\");\n cb_infoColor.setSelectedItem(\"gray\");\n rb_url.setSelected(false);\n rb_file.setSelected(true);\n b_fileSelect.setEnabled(true);\n }", "@Override\n public void reset()\n {\n this.titles = new ABR();\n this.years = new ABR();\n this.votes = new ABR();\n this.director = new ABR();\n\n for(int i = 0; i < this.movies.length; i++)\n this.movies.set(i, null);\n }", "public void reset() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void clear() {\n wordsArray = new String[0];\n }", "public void reset() {\n\t\tlength = 0;\n\t}", "public void reset()\n\t{\n\t\tthis.sourceUnit.setSelectedIndex(0);\n\t\tthis.destUnit.setSelectedIndex(0);\n\t\tthis.input.setText(\"\");\n\t\tthis.outputLabel.setText(\"\");\n\t}", "public void resetAll()\n {\n _markers = null;\n setPrefSizeForText();\n repaint();\n }", "private void clear() {\r\n\t\tpstate.clear();\r\n\t\tdisplay.setLegend(\"\");\r\n\t\tship = null;\r\n\t}", "public void reset() {\r\n\t\tnextTokenPos = 0;\r\n\t}", "public void reset(){\r\n \tif (blank != null){\r\n \t\tblank.clear();\r\n \t}\r\n \tif (blankNode != null){\r\n \t\tblankNode.clear();\r\n \t}\r\n }", "private void clearFields(){\n\t\tmiMatriculaLabel.setText(\"-\");\n\t\tmatriculaSearch.setText(\"\");\n\t\tmarcaText.setText(\"\");\n\t\tmodeloText.setText(\"\");\n\t\tanioText.setText(\"\");\n\t\titvText.setText(\"\");\n\t\tvehiculoSelected = null;\n\t\tchangeFieldsState(false);\n\t}", "public void clear() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tbeams[i] = null;\n\t\t}\n\t}", "public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }", "public void setDefault() {\n fields[0].setText(\"\");\n fields[1].setText(\"\");\n fields[2].setText(\"\");\n fields[3].setText(\"\");\n }", "public void clear() {\n classifiedSamples.clear();\n classificationNameMap.clear();\n classifications.clear();\n sampleClassificationMap.clear();\n nextIndex = 0;\n }", "public void reset() {\n this.predictor.reset();\n for(int i=0; i<this.predictedIntraday.length; i++) {\n this.predictedIntraday[i] = 0;\n }\n }", "private void clearUserNames()\n\t{\n\t\tfor (final JLabel jLabel : userNamesLabels)\n\t\t{\n\t\t\tuserDisplayPanel.remove(jLabel);\n\t\t}\n\t\tuserNamesLabels.clear();\n\t}", "public void reset ()\n {\n // position our buffer at the beginning of the frame data\n _buffer.position(getHeaderSize());\n }", "public void reset() {\n index = 0;\n }", "public void resetHighscoreTable()\r\n\t{\r\n\t\tcreateArray();\r\n\t\twriteFile();\r\n\t}", "public void reset_array() {\r\n\t\tfor(int i=0;i<9;i++) {\r\n\t\t\ts[i]=\"\";\r\n\t\t}\r\n\t}", "public void reset() {\n\t\tremoveAll();\n\t\tadd(new GLine(MARGIN, MARGIN, MARGIN, MARGIN + SCAFFOLD_HEIGHT));\n\t\tadd(new GLine(MARGIN, MARGIN, MARGIN + BEAM_LENGTH, MARGIN));\n\t\tadd(new GLine(MARGIN + BEAM_LENGTH, MARGIN, MARGIN + BEAM_LENGTH, MARGIN + ROPE_LENGTH));\n\t\tbody = new GCompound();\n\t\tbody.setLocation(MARGIN + BEAM_LENGTH, MARGIN + ROPE_LENGTH);\n\t\tadd(body);\n\t\twordLabel = new GLabel(\"\");\n\t\twordLabel.setFont(\"*-bold-18\");\n\t\tadd(wordLabel);\n\t\tguesses = \"\";\n\t\tguessesLabel = new GLabel(guesses);\n\t\tadd(guessesLabel);\n\t}", "private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }", "private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }", "private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }", "@Override\n public void reset() throws IOException {\n lemmaListIndex = 0;\n lemmaList = Collections.emptyList();\n tagsList.clear();\n super.reset();\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\r\n dogNameField.clear();\r\n dogText.clear();\r\n }", "public void reset() {\n tid.setEnabled(true);\n tid.setText(\"\");\n tname.setText(\"\");\n }", "public void reset() {\n bb.clear();\n cb.clear();\n found = false;\n }", "private void clearNewHeadpic() {\n \n newHeadpic_ = getDefaultInstance().getNewHeadpic();\n }", "private void reset() {\n }", "public void reset() {\n\n\t}", "public void reset() {\n for (int i = 0; i < this.numRows; i++) {\n this.rows[i] = new int[0];\n }\n for (int k = 0; k < this.numCols; k++) {\n this.cols[k] = new IntOpenHashSet();\n }\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t\tthis.count = 0;\n\t}", "private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }", "@Override\n\t\tpublic void removeLabel(Label label) {\n\n\t\t}", "public void clear()\r\n {\r\n // Create the tables stack and add the top level\r\n tables.clear();\r\n tables.add( new HashMap<String,T>() );\r\n \r\n // Ditto with the counts\r\n counts.clear();\r\n counts.add( 0 ); \r\n }", "public void reset() {\n\t\tcount = 0;\n\t}", "public void reset() {\n this.errorNo = 0;\n this.errorStrings = \"\";\n }", "public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }", "public void\t\tremoveAll()\n\t{\n\t\ttab.clear();\n\t}", "public void LimpaTodosOsCampos(){\n JTextField todosOsCampos[] = todosCampos();\n txtDescricao.setText(null);\n for(int i = 0; i<todosOsCampos.length; i++){\n todosOsCampos[i].setText(null);\n }\n JLabel labels[] = todasLabels();\n for(int i = 0; i<labels.length; i++){\n labels[i].setText(null);\n }\n }", "private void resetFields() {\n\t\tthis.barcodeField.clear();\r\n\t\tthis.barcodeField.setDisable(false);\r\n\t\tthis.nameField.clear();\r\n\t\tthis.descriptionField.clear();\r\n\t\tthis.mrpField.clear();\r\n\t\tthis.revisedMrpField.clear();\r\n\t\tthis.stockField.clear();\r\n\t\tthis.availableStockLabelValue.setText(\"0.0\");\r\n\t\tthis.barcodeImageView.setImage(null);\r\n\t\tthis.barcodeDisplayLabel.setVisible(true);\r\n\t\tthis.barcodeNumberLabel.setVisible(false);\r\n\r\n\t}", "public void reset() {\n\t\tif (marker >= 0) {\n\t\t\tsetSize(marker);\n\t\t\tmarker = -1;\n\t\t}\n\t}", "public void resetField() {\n setFields(new boolean[getLength()][getHeight()]);\n }", "public void reset() {\n\t\tlocalName = \"\";\n\t\turi = \"\";\n\t\tdata = null;\n\t\tchars = null;\n\t\tcharCount = 0;\n\t\tline = 0;\n\t\tcolumn = 0;\n\t\tleaf = true;\n\t}", "public void reset()\n {\n total_frames = 0;\n total_messages = 0;\n total_size = 0;\n lost_frames = 0;\n lost_segments = 0;\n num_files = 0;\n start_time = System.nanoTime();\n m_lastFrames.clear();\n }", "public void reset() {\n\t\treset(false);\n\t\tGraphvizUtils.setDotExecutable(null);\n\t}", "private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }", "public void clear() \r\n\t{\r\n\t\ttotal = 0;\r\n\t\thistory = \"\";\r\n\t}", "public void clear() {\n payload = null;\n // Leave termBuffer to allow re-use\n termLength = 0;\n termText = null;\n positionIncrement = 1;\n flags = 0;\n // startOffset = endOffset = 0;\n // type = DEFAULT_TYPE;\n }", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();" ]
[ "0.6966624", "0.69241375", "0.6667397", "0.6404122", "0.6334983", "0.6117784", "0.61140126", "0.60389376", "0.60360557", "0.60024256", "0.5995905", "0.59907484", "0.5986179", "0.5975633", "0.59709245", "0.59706825", "0.5955389", "0.5937645", "0.59329283", "0.59273237", "0.5909613", "0.5860178", "0.58596987", "0.5851649", "0.5848989", "0.58372414", "0.58195674", "0.58133453", "0.58116394", "0.5798738", "0.578958", "0.5785827", "0.576187", "0.5758601", "0.57482237", "0.5747977", "0.574359", "0.5734338", "0.5733291", "0.5721477", "0.57155544", "0.57120234", "0.57055163", "0.5691462", "0.56775534", "0.56738126", "0.5668176", "0.5664016", "0.56599736", "0.56576943", "0.5653068", "0.5653068", "0.5653068", "0.56508905", "0.5642101", "0.5642101", "0.5642101", "0.5642101", "0.5641651", "0.5633633", "0.5631515", "0.5627389", "0.56256926", "0.56256425", "0.56245047", "0.56239253", "0.56239253", "0.56239253", "0.56239253", "0.5619391", "0.5618171", "0.56162614", "0.5612824", "0.56041133", "0.5600797", "0.55960476", "0.5590361", "0.55834734", "0.5583351", "0.5580134", "0.5579926", "0.55766064", "0.5567664", "0.55618966", "0.55590117", "0.55581695", "0.5556132", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548", "0.55548" ]
0.72870296
0
Prepare the line buffer with the next line of data. Note we skip blank lines.
protected void readAhead() { if (! reader.hasNext()) { this.nextLine = null; } else { this.nextLine = reader.next(); while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext()) this.nextLine = reader.next(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getNextLine()\n\t\t\tthrows IOException, FileNotFoundException {\n String nextLine = \"\";\n if (reader == null) {\n nextLine = textLineReader.readLine();\n } else {\n nextLine = reader.readLine();\n }\n if (nextLine == null) {\n atEnd = true;\n line = new StringBuffer();\n } else {\n\t\t line = new StringBuffer (nextLine);\n }\n if (context.isTextile()) {\n textilize ();\n }\n\t\tlineLength = line.length();\n\t\tlineIndex = 0;\n\t}", "public void newBufLine() {\n this.buffer.add(new ArrayList<Integer>());\n this.columnT = 0;\n this.lineT++;\n }", "public LineByLineDataParser(DataDescription dataDescription) {\n super(dataDescription);\n buf.clear();\n }", "private void prepareLine(int line){\n int length = mText.getColumnCount(line);\n if(length >= mChars.length){\n mChars = new char[length + 100];\n }\n for(int i = 0;i < length;i++){\n mChars[i] = mText.charAt(line, i);\n }\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "public List<String> nextOneLine() throws IOException {\n counterSeveralLines = linesAfter;\n if (StringUtils.isBlank(currentPath)) return null;\n String sCurrentLine;\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n listBefore = addToArray(sCurrentLine);\n }\n return listBefore;\n }", "public final void nextRow() {\n this.line++;\n }", "public Line() {\n \n this.buffer = new ArrayList<ArrayList<Integer>>();\n this.buffer.add(new ArrayList<Integer>());\n this.lineT = 0;\n this.columnT = 0;\n this.inputMode = false;\n }", "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (super.readLimit > 0 && super.recordCounter > super.readLimit) {\n nextLine = null;\n }\n }\n } catch (Exception ignore) {\n // no more lines\n }\n }", "public abstract AbstractLine newLine(byte[] data) throws IOException;", "private void readLine() throws IOException {\n line = reader.readLine(); // null at the end of the source\n currentPos = -1;\n\n if (line != null) {\n lineNum++;\n }\n\n if (line != null) {\n sendMessage(new Message(MessageType.SOURCE_LINE, new Object[]{lineNum, line}));\n }\n }", "@Test\n public void testReadLineLFCR1() throws IOException {\n try {\n final String BUFFER_INITIAL_CONTENT = \"Debut\\rSuite\\n\\rFin\\n\\r\\nANEPASTOUCHER\";\n ByteBuffer buff = ByteBuffer.wrap(BUFFER_INITIAL_CONTENT.getBytes(\"ASCII\")).compact();\n //HTTPReader reader = new HTTPReader(null, buff);\n //assertEquals(\"Debut\\rSuite\\n\\rFin\\n\", reader.readLineCRLF());\n ByteBuffer buffFinal = ByteBuffer.wrap(\"ANEPASTOUCHER\".getBytes(\"ASCII\")).compact();\n // assertEquals(buffFinal.flip(), buff.flip());\n } catch (NullPointerException e) {\n // fail(\"The socket must not be read until buff is entirely consumed.\");\n }\n }", "public int nextFreeBufferLine() {\n\t\tlogger.debug(\">> nextFreeBufferLine()\");\n\t\tint line = getRndLine();\n\t\tlogger.debug(\"<< nextFreeBufferLine(): %s\", line);\n\t\treturn line;\n\t}", "public String nextLine() {\n\t\treturn null;\r\n\t}", "private PolylineDataBuffered getLine(PickManager pickManager, ModelDataRetriever<PolylineGeometry> dataRetriever,\n PolylineRenderData renderData, PolylineGeometry geom)\n {\n PolylineDataBuffered line = renderData.getData().get(geom);\n if (line == null)\n {\n line = getBufferedData(geom, dataRetriever, renderData.getProjection(), TimeBudget.ZERO, pickManager,\n myGroupTimeSpan);\n if (line != null)\n {\n renderData.getData().put(geom, line);\n }\n }\n return line;\n }", "public void ler(String[] lineData) {\n this.setRoomId(Integer.parseInt(lineData[0]));\n this.setHostId(Integer.parseInt(lineData[1]));\n this.setRoomType(lineData[2]);\n this.setCountry(lineData[3]);\n this.setCity(lineData[4]);\n this.setNeighbourhood(lineData[5]);\n this.setReviews(Integer.parseInt(lineData[6]));\n this.setOverallSatisfaction(Double.parseDouble(lineData[7]));\n this.setAccommodates(Integer.parseInt(lineData[8]));\n this.setBedrooms(Double.parseDouble(lineData[9]));\n this.setPrice(Double.parseDouble(lineData[10]));\n this.setPropertyType(lineData[11]);\n }", "public void goNextLine () throws IOException {\n\t\treader.goNextLine();\n\t\tcurrentLine = reader.getCurrentLine();\n\t}", "private String getNextLine () {\n String line;\n if (endOfText()) {\n line = \"\";\n } else {\n int lineEndLength = 1;\n char c = ' ';\n char d = ' ';\n char x = ' ';\n lineEnd = index;\n boolean endOfLine = false;\n while (! endOfLine) {\n if (lineEnd >= blockIn.length()) {\n endOfLine = true;\n } else {\n c = blockIn.charAt (lineEnd);\n if (c == GlobalConstants.CARRIAGE_RETURN) {\n x = GlobalConstants.LINE_FEED;\n endOfLine = true;\n }\n else\n if (c == GlobalConstants.LINE_FEED) {\n x = GlobalConstants.CARRIAGE_RETURN;\n endOfLine = true;\n }\n if (endOfLine) {\n if ((lineEnd + 1) < blockIn.length()) {\n d = blockIn.charAt (lineEnd + 1);\n if (d == x) {\n lineEndLength = 2;\n }\n }\n } else { \n // not end of line\n lineEnd++;\n }\n } // end if another char to look at\n } // end while not end of line\n lineStart = index;\n if (lineEnd < lineStart) {\n lineEnd = blockIn.length();\n }\n if (lineEnd >= lineStart) {\n index = lineEnd + lineEndLength;\n line = blockIn.substring (lineStart, lineEnd);\n if (line.equals (getBlockEnd())) {\n blockEnded = true;\n }\n } else {\n line = \"\";\n } // end if no line to return\n } // end if more of block left\n checkNextField();\n return line;\n }", "int nextLine(int allocate) throws IOException {\n final int length = lineLoader.nextLine(allocate);\n if(length>=0)\n lineNumber++;\n return length;\n }", "public void copyLineBuffer() throws IOException {\n\t\tBufferedReader in = null;\n\t\tBufferedWriter out = null;\n\t\tlong startTime, elapsedTime;\n\t\tString line;\n\n\t\tstartTime = System.nanoTime();\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(inFileStr));\n\t\t\tout = new BufferedWriter(new FileWriter(outFileStr));\n\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tout.write(line);\n\t\t\t\tout.newLine();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t\telapsedTime = System.nanoTime() - startTime;\n\t\tSystem.out.println(\"copyWithBuffer() [\" + new File(inFileStr).length() / (elapsedTime / 1000.0) + \" MB/S]\");\n\t}", "public void jumpToNextLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == textBuffer.getMaxLine()-1) {\n textBuffer.setCurToTail();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo+1);\n lineJumpHelper(curX);\n }", "public final String readNextLine() throws IOException {\r\n String str;\r\n if (buf_end-buf_pos <= 0) {\r\n if (fillBuffer() < 0) {\r\n throw new IOException(\"Error filling buffer!\");\r\n }\r\n }\r\n int lineEnd = -1;\r\n for (int i = buf_pos; i < buf_end; i++) {\r\n if (buffer[i] == '\\n') {\r\n lineEnd = i;\r\n break;\r\n }\r\n }\r\n if (lineEnd < 0) {\r\n StringBuilder input = new StringBuilder(256);\r\n int c;\r\n while (((c = read()) != -1) && (c != '\\n')) {\r\n input.append((char)c);\r\n }\r\n if ((c == -1) && (input.length() == 0)) {\r\n return null;\r\n }\r\n return input.toString();\r\n }\r\n\r\n if (lineEnd > 0 && buffer[lineEnd-1] == '\\r') {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos -1);\r\n }\r\n else {\r\n str = new String(buffer, buf_pos, lineEnd - buf_pos);\r\n }\r\n buf_pos = lineEnd +1;\r\n return str;\r\n }", "protected abstract MS_LineBuilder prepareContent(MS_LineBuilder lb);", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "public void flushCurrentLine()\n {\n line = null;\n }", "private static void eachLine(BufferedReader br, List<String> lines) throws IOException {\n try {\n while (true) {\n String line = br.readLine();\n if (line == null) {\n break;\n } else {\n lines.add(line);\n }\n }\n } finally {\n br.close();\n }\n }", "public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}", "public void start (BufferedReader br) throws IOException {\n\t\treader=br;\n\t\tnextLine = reader.readLine();\n\t}", "private void moveLineOn() {\n getScroller().startScroll(getOffsetX(),getOffsetY(),0,getLineHeight(),0);\n }", "private Line(String inLine) {\n // Save the input line.\n this.lineText = inLine;\n // Get the number of fields in the line.\n int nFields = labels.length;\n // Normally, this will work.\n this.fields = TabbedLineReader.this.splitLine(inLine);\n // If the number of fields is wrong, we have to adjust.\n if (this.fields.length != nFields) {\n // Copy the old array and create a new one of the proper length.\n String[] buffer = this.fields;\n this.fields = new String[nFields];\n // Transfer the strings one by one, padding if necessary.\n for (int i = 0; i < nFields; i++) {\n if (i < buffer.length) {\n this.fields[i] = buffer[i];\n } else {\n this.fields[i] = \"\";\n }\n }\n }\n }", "public static void moveToNextLine(Token token)\r\n\t{\r\n\t\tScanner.iColPos = 0;\r\n\t\ttoken.iColPos = 0;\r\n\t\tScanner.iSourceLineNr++;\r\n\t\t\r\n\t\tScanner.printLine = true;\r\n\t\t\r\n\t\tif(Scanner.iSourceLineNr == Scanner.sourceLineM.size())\r\n\t\t{\r\n\t\t\t//End of file \r\n\t\t\ttoken.primClassif = 6;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse\r\n\t\t\tScanner.textCharM = Scanner.sourceLineM.get(Scanner.iSourceLineNr).toCharArray();\r\n\t}", "public void finish() {\n System.out.println();\n System.out.println(\"Line processed\");\n System.out.println(\"Reseting line...\");\n try{ Thread.sleep(5000); } catch(Exception e) { System.out.println(\"Thread exception\"); }\n this.buffer.clear();\n this.buffer.add(new ArrayList<Integer>());\n this.lineT = 0;\n this.columnT = 0;\n this.inputMode = false;\n }", "public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}", "public void newLine()\n {\n rst += NEW_LINE;\n }", "void storeline(String linebuffer, fileInfo pinfo) {\n\t\tint linenum = ++pinfo.maxLine; /* note, no line zero */\n\t\tif (linenum > fileInfo.MAXLINECOUNT) {\n\t\t\tSystem.err.println(\"MAXLINECOUNT exceeded, must stop.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tpinfo.symbol[linenum] = node.addSymbol(linebuffer, pinfo == oldinfo,\n\t\t\t\tlinenum);\n\t}", "public void jumpToPreLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == 1) {\n textBuffer.setCurToHead();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo-1);\n lineJumpHelper(curX);\n }", "protected void resetNextAdvanceLineNumber() {\n this.nextAdvanceLineNumber = new Integer(1);\n }", "void resetLine() {\n eof = (cursor == lineMark);\n cursor = lineMark;\n }", "private int getNextLine() {\n return peekToken().location.start.line;\n }", "private void lineJumpHelper(int curX) {\n int accX = 0;\n while (true) {\n if (textBuffer.isEnd()) {\n textBuffer.decreCurrent(false);\n return;\n }\n if (textBuffer.currentPos_current().getText().equals(\"\\n\")) {\n textBuffer.decreCurrent(false);\n return;\n }\n Text text = textBuffer.currentPos_current();\n accX += round(text.getLayoutBounds().getWidth());\n if (accX > curX) {\n textBuffer.decreCurrent(false);\n return;\n }\n textBuffer.increCurrent(false);\n }\n }", "public void adjustBeginLineColumn(int newLine, int newCol) {\n/* 511 */ int len, start = this.tokenBegin;\n/* */ \n/* */ \n/* 514 */ if (this.bufpos >= this.tokenBegin) {\n/* 515 */ len = this.bufpos - this.tokenBegin + this.inBuf + 1;\n/* */ } else {\n/* */ \n/* 518 */ len = this.bufsize - this.tokenBegin + this.bufpos + 1 + this.inBuf;\n/* */ } \n/* */ \n/* 521 */ int i = 0, j = 0, k = 0;\n/* 522 */ int nextColDiff = 0, columnDiff = 0;\n/* */ \n/* */ \n/* 525 */ while (i < len && this.bufline[j = start % this.bufsize] == this.bufline[k = ++start % this.bufsize]) {\n/* 526 */ this.bufline[j] = newLine;\n/* 527 */ nextColDiff = columnDiff + this.bufcolumn[k] - this.bufcolumn[j];\n/* 528 */ this.bufcolumn[j] = newCol + columnDiff;\n/* 529 */ columnDiff = nextColDiff;\n/* 530 */ i++;\n/* */ } \n/* */ \n/* 533 */ if (i < len) {\n/* 534 */ this.bufline[j] = newLine++;\n/* 535 */ this.bufcolumn[j] = newCol + columnDiff;\n/* */ \n/* 537 */ while (i++ < len) {\n/* 538 */ if (this.bufline[j = start % this.bufsize] != this.bufline[++start % this.bufsize]) {\n/* 539 */ this.bufline[j] = newLine++; continue;\n/* */ } \n/* 541 */ this.bufline[j] = newLine;\n/* */ } \n/* */ } \n/* */ \n/* 545 */ this.line = this.bufline[j];\n/* 546 */ this.column = this.bufcolumn[j];\n/* */ }", "private void getNextToken() throws IOException {\n if (tok.ttype==LexAnn.TT_EOL) {\n if (code.getCurLine() < maxLine) {\n code.setCurLine(code.getCurLine()+1);\n tok.setString(code.getLine());\n tok.nextToken();\n } else {\n tok.ttype=LexAnn.TT_EOF; //the only place this gets set\n }\n } else {\n tok.nextToken();\n }\n }", "private String nextLine(BufferedReader reader) throws IOException {\n String ln = reader.readLine();\n if (ln != null) {\n int ci = ln.indexOf('#');\n if (ci >= 0)\n ln = ln.substring(0, ci);\n ln = ln.trim();\n }\n return ln;\n }", "public String getNextLine() throws IOException {\n\n String currentLine = nextLine;\n this.nextLine = bufferedReader.readLine();\n\n return currentLine;\n }", "@Test\n public void testNextLineText() {\n System.out.println(\"nextLineText\");\n System.out.println(\"nextLineText@no line terminators in the file.\");\n for(TypeOfStream stype: TypeOfStream.values()) {\n InputStream stream = getInputStream(stype, TypeOfContent.BYTE_10, cs_UTF_8);\n @SuppressWarnings(\"deprecation\")\n BufferedCharSequence instance = new BufferedCharSequence(stream, cs_UTF_8.newDecoder(), 10);\n assertEquals(0, instance.position());\n String expResult = TypeOfContent.BYTE_10.getContent();\n String result = instance.nextLineText();\n assertEquals(expResult, result);\n assertEquals(11, instance.position());\n }\n }", "private void skipCommentLine() {\n while (position < length) {\n int c = data.charAt(position);\n if (c == '\\r' || c == '\\n') {\n return;\n }\n position++;\n }\n }", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "private void nextChar() {\n\t\tif (this.c >= 0) {\n\t\t\ttry {\n\t\t\t\tif (this.c == '\\n') {\n\t\t\t\t\tthis.line++;\n\t\t\t\t\tthis.column = 0;\n\t\t\t\t}\n\t\t\t\tthis.c = this.input.read();\n\t\t\t\tthis.column++;\n\t\t\t} catch (final IOException e) {\n\t\t\t\tthis.c = -1;\n\t\t\t}\n\t\t}\n\t}", "private boolean isNewLine(int nextVal) {\n\t\treturn nextVal == CR || nextVal == LF || nextVal == EOF;\n\t}", "void getNextCharacter()\n\t\t\tthrows IOException, FileNotFoundException {\n\t\tcontext.lastCharacter2 = context.lastCharacter1;\n\t\tcontext.lastCharacter1 = htmlChar.character;\n if (context.hasExtraCharacter()) {\n htmlChar.setCharacter (context.getExtraCharacter());\n }\n else\n\t\tif (lineIndex >= lineLength) {\n\t\t\thtmlChar.setCharacter (GlobalConstants.LINE_FEED, ' ');\n\t\t\tgetNextLine();\n\t\t}\n\t\telse {\n\t\t\thtmlChar.setCharacter (line, lineIndex++);\n\t\t}\n\t}", "public VCFLine getNextValidLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn getCurrentValidLine();\n\t}", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "void endLine() {\n\t\tif (loaded != null && loaded.length() > 0) {\n\t\t\tlineContainer.set(loaded.toString());\n\t\t}\n\t\tloaded = new StringBuilder();\n\t}", "public abstract AbstractLine newLine() throws IOException;", "@Test(timeout=100)\r\n\tpublic void testSkipEmptyLines() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"AAA\",\"BBB\"};\r\n\t\tString [] r3 = {\"the-end\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteline(\"\"); // empty line\r\n\t\twriteline(\"\"); // another empty line\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteline(\"\");\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "private void createLinesArray()\n {\n //This will iterate through the lines array\n for (int i = 0; i < lines.length; i++)\n {\n //Stop at end-of-File\n if (mapScanner.hasNextLine())\n {\n //Add the current line to the lines array\n lines[i] = mapScanner.nextLine();\n }\n }\n }", "@Test\n public void usingCRDelimiterWithSmallestBufferSize() throws Exception {\n conf.set(IO_FILE_BUFFER_SIZE_KEY, \"1\");\n\n try (BZip2TextFileWriter writer = new BZip2TextFileWriter(tempFile, conf)) {\n writer.writeManyRecords(BLOCK_SIZE - 50, 999, CR);\n writer.writeRecord(100, CR);\n writer.writeRecord(10, CR);\n writer.writeRecord(10, CR);\n writer.writeRecord(10, CR);\n }\n assertRecordCountsPerSplit(tempFile, new long[] {1000, 3});\n }", "public static void beginString()\r\n\t{\r\n\t\tstr_linepos = line_;\r\n\t\tstr_charpos = char_;\r\n\t\tstr_colpos = col_;\r\n\t\tbuffer.setLength(0);\r\n\t}", "public abstract String getFirstLine();", "public void setNextData(Data nextData)\r\n\t\t{\r\n\t\t\tthis.nextData = nextData;\r\n\t\t}", "public void lineContinuation(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "private String getNextLine() throws IOException {\n final BufferedReader in = this.in;\n if (in == null) {\n throw new NoSuchElementException();\n } else {\n final String nextLine = this.in.readLine();\n if (nextLine == null) {\n throw new NoSuchElementException();\n }\n return nextLine;\n }\n }", "private void processImageBuffer(){\n \t\tint availPattern = patterns.checkPattern(itemBuffer.buffer);\n \t\t\n \t\tif (availPattern > 0){\n \t\t\tImageRichLineGroup line = new ImageRichLineGroup();\n \t\t\t\n \t\t\tint choice = random.nextInt(availPattern);\n \t\t\tint consumeCount = patterns.pickPattern(choice);\n \t\t\tArrayList<ImageCell> images = itemBuffer.shed(consumeCount);\n \t\t\tint height = patterns.applyPattern(images, choice, totalWidth);\n \t\t\tline.addImages(images);\n \t\t\tline.height = height;\n \t\t\taddLine(line);\n \t\t}\n \t\telse {\n \t\t\t/*No pattern found */\n \t\t\tImageSingleLineGroup line = new ImageSingleLineGroup(totalWidth);\n \t\t\twhile (true == line.needMoreImage() && false == itemBuffer.isEmpty()){\n \t\t\t\tline.addImage(itemBuffer.remove(0));\n \t\t\t}\n \t\t\taddLine(line);\n \t\t}\n \t}", "public void addDataLine(String line) {\n this.data.textProperty().set(\n String.format(\n \"%s\\n%s\",\n this.data.textProperty().get(),\n line\n )\n );\n }", "public void endLine() {\n if (currentLine != null) {\n lines.add(currentLine);\n currentLine = null;\n }\n }", "public List<String> nextSeveralLines() throws IOException {\n if (StringUtils.isBlank(currentPath)) return null;\n List<String> lista = new ArrayList<String>();\n String sCurrentLine;\n int temp = 1;\n\n bufferReader.mark(10000000);\n while ((sCurrentLine = bufferReader.readLine()) != null) {\n temp++;\n if (temp > counterSeveralLines) {\n for (int i = 0; i < linesAfter; i++) {\n if ((sCurrentLine = bufferReader.readLine()) != null) {\n counterSeveralLines++;\n lista.add(sCurrentLine);\n }\n }\n bufferReader.reset();\n return lista;\n }\n }\n return lista;\n }", "private String getNextLine(Scanner input)\n\t{\n\t\tString line = input.nextLine().trim();\n\t\twhile ((line.length() == 0 || line.startsWith(\"#\") || line.startsWith(\"!\")) && input.hasNext())\n\t\t\tline = input.nextLine().trim();\n\t\tif (line.startsWith(\"#\") || line.startsWith(\"!\"))\n\t\t\tline = \"\";\n\t\treturn line;\n\t}", "public void addEmptyLine() {\n addLine(\"\");\n }", "@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n boolean atEndOfLine();", "public void createLine(int _loc, StringBuilder _sb) {\r\n if (_sb.charAt(_loc) == ' ') {\r\n _sb.insert(_loc, \"<br>\");\r\n }\r\n else {\r\n _loc--;\r\n createLine(_loc, _sb);\r\n }\r\n }", "public static void Input(){\n try{\n prepareReader();\n String linea=\"\";\n while((linea = br.readLine()) != null){\n System.out.println(linea);\n }\n br.close();\n System.out.println(\"-------------------------------------------------\");\n }catch (Exception e){\n System.err.println(\"Error al leer del buffer\");\n }\n }", "private String nextLine() {\n if (console) {\n return con.nextLine();\n }\n return scan.nextLine();\n\n }", "public RequestLine parseRequestLine(CharArrayBuffer buffer, ParserCursor cursor) throws ParseException {\n/* 280 */ Args.notNull(buffer, \"Char array buffer\");\n/* 281 */ Args.notNull(cursor, \"Parser cursor\");\n/* 282 */ int indexFrom = cursor.getPos();\n/* 283 */ int indexTo = cursor.getUpperBound();\n/* */ \n/* */ try {\n/* 286 */ skipWhitespace(buffer, cursor);\n/* 287 */ int i = cursor.getPos();\n/* */ \n/* 289 */ int blank = buffer.indexOf(32, i, indexTo);\n/* 290 */ if (blank < 0) {\n/* 291 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* 294 */ String method = buffer.substringTrimmed(i, blank);\n/* 295 */ cursor.updatePos(blank);\n/* */ \n/* 297 */ skipWhitespace(buffer, cursor);\n/* 298 */ i = cursor.getPos();\n/* */ \n/* 300 */ blank = buffer.indexOf(32, i, indexTo);\n/* 301 */ if (blank < 0) {\n/* 302 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* 305 */ String uri = buffer.substringTrimmed(i, blank);\n/* 306 */ cursor.updatePos(blank);\n/* */ \n/* 308 */ ProtocolVersion ver = parseProtocolVersion(buffer, cursor);\n/* */ \n/* 310 */ skipWhitespace(buffer, cursor);\n/* 311 */ if (!cursor.atEnd()) {\n/* 312 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ }\n/* */ \n/* */ \n/* 316 */ return createRequestLine(method, uri, ver);\n/* 317 */ } catch (IndexOutOfBoundsException e) {\n/* 318 */ throw new ParseException(\"Invalid request line: \" + buffer.substring(indexFrom, indexTo));\n/* */ } \n/* */ }", "private void skipEmptyLines() throws IOException {\n for (;;) {\n if (nextChar != ';') {\n do {\n readNextChar();\n } while (isWhitespace(nextChar));\n if (nextChar != ';') return;\n }\n do {\n readNextChar();\n if (nextChar == -1) return;\n } while (nextChar != '\\n');\n }\n }", "public AudioBreak(int nLineNumber){\n\t\tlineNumber = nLineNumber;\n\t\tkey = STARTKEY;\n\t}", "public void resetLines() throws IOException {\n counterSeveralLines = linesAfter;\n if (currentPath != null) {\n bufferReader.close();\n fileReader.close();\n fileReader = new FileReader(currentPath);\n bufferReader = new BufferedReader(fileReader);\n arrayPreviousLines = new String[prevSize];\n resetDateBefore();\n }\n }", "private void addLine()\n{\n BaleElement first = null;\n BaleElement last = null;\n BaleElement eol = null;\n boolean havecmmt = false;\n for (BaleElement ce : line_elements) {\n eol = ce;\n if (!ce.isEmpty() && !ce.isComment()) {\n\t if (first == null) first = ce;\n\t last = ce;\n }\n else if (ce.isComment()) havecmmt = true;\n }\n\n if (first != null && cur_parent.isComment()) cur_parent = cur_parent.getBaleParent();\n if (first == null && !cur_parent.isComment() && !havecmmt) ++num_blank;\n else if (first != null || cur_parent.isComment()) num_blank = 0;\n\n // fix outer parent to ensure it includes this line\n fixOuterParent(first,last,eol);\n\n // Create nodes for block comments\n BaleElement.Branch cpar = null;\n if (first == null) {\n if (!cur_parent.isComment() && (havecmmt || num_blank >= 2)) {\n\t cpar = new BaleElement.BlockCommentNode(for_document,cur_parent);\n\t addElementNode(cpar,num_blank);\n\t cpar.setAstNode(cur_ast);\n\t cpar.setStartTokenState(token_state);\n\t cur_parent = cpar;\n }\n }\n\n if (cpar != null && cur_parent != cpar) {\n BoardLog.logE(\"BALE\",\"UNUSED COMMENT\");\n }\n\n // Add the current line\n BaleElement.Branch lastpar = cur_parent;\n cur_line = new BaleElement.LineNode(for_document,cur_parent);\n cur_line.setAstNode(cur_ast);\n cur_line.setStartTokenState(token_state);\n addElementNode(cur_line,0);\n cur_parent = cur_line;\n\n boolean haveindent = true;\n for (BaleElement ce : line_elements) {\n fixInnerParent(ce);\n ce = fixLeafElement(ce,haveindent);\n haveindent = false;\n addElementNode(ce,0);\n token_state = ce.getEndTokenState();\n }\n\n cur_line.setEndTokenState(token_state);\n cur_parent = lastpar;\n cur_line = null;\n}", "private void addNewLine(StringBuilder builder, String line){\r\n\t\tbuilder.append(line);\r\n\t\tbuilder.append(\"\\n\");\r\n\t}", "void scanDataBufferForEndOfData() {\n while (!allRowsReceivedFromServer() &&\n (dataBuffer_.readerIndex() != lastValidBytePosition_)) {\n stepNext(false);\n }\n }", "public ChunkBuffer allocateBuffer(int increment) {\n final int nextBufferIndex = currentBufferIndex + 1;\n\n Preconditions.assertTrue(nextBufferIndex < capacity, () ->\n \"next index: \" + nextBufferIndex + \" >= capacity: \" + capacity);\n\n currentBufferIndex = nextBufferIndex;\n\n if (currentBufferIndex < bufferList.size()) {\n return getBuffer(currentBufferIndex);\n } else {\n final ChunkBuffer newBuffer = ChunkBuffer.allocate(bufferSize, increment);\n bufferList.add(newBuffer);\n return newBuffer;\n }\n }", "private void newline() {}", "protected String addToMultiLineField(String current, String newline){\n\t\tif(current == null)\n\t\t\tcurrent = \"\";\n\t\t\n\t\tif(newline == null)\n\t\t\tnewline = \"\";\n\t\t\n\t\treturn current +\"\\r\\n\" + newline;\t\n\t}", "public void advance() {\n // Get the next instruction\n instruction = fileStream.next();\n removeWhitespace();\n // Split instruction apart\n instructionChunks = instruction.split(\" \");\n }", "public SourceGenerator forceNewline(){\r\n\t\tm_writer.append(m_newline);\r\n\t\treturn this;\r\n\t}", "private void shiftPartialRowToBeginning() {\n if(true)\n throw new UnsupportedOperationException(\"Need to step through this method\");\n// // Get the length to shift from the beginning of the partial row.\n// int length = lastValidBytePosition_ - currentRowPosition_;\n//\n// // shift the data in the dataBufferStream\n// dataBufferStream_.reset();\n// if (dataBuffer_ != null) {\n// dataBufferStream_.write(dataBuffer_, currentRowPosition_, length);\n// }\n//\n// for (int i = 0; i < length; i++) {\n// dataBuffer_[i] = dataBuffer_[currentRowPosition_ + i];\n// }\n//\n// position_ = length - (lastValidBytePosition_ - position_);\n// lastValidBytePosition_ = length;\n }", "public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}", "public void commentLine(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "public boolean hasNextLine() {\n return nextLine != null;\n }", "private String readLine() throws IOException {\n/* 276 */ String line = null;\n/* */ \n/* */ \n/* 279 */ boolean isLastFilePart = (this.no == 1L);\n/* */ \n/* 281 */ int i = this.currentLastBytePos;\n/* 282 */ while (i > -1) {\n/* */ \n/* 284 */ if (!isLastFilePart && i < ReversedLinesFileReader.this.avoidNewlineSplitBufferSize) {\n/* */ \n/* */ \n/* 287 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ int newLineMatchByteCount;\n/* 292 */ if ((newLineMatchByteCount = getNewLineMatchByteCount(this.data, i)) > 0) {\n/* 293 */ int lineStart = i + 1;\n/* 294 */ int lineLengthBytes = this.currentLastBytePos - lineStart + 1;\n/* */ \n/* 296 */ if (lineLengthBytes < 0) {\n/* 297 */ throw new IllegalStateException(\"Unexpected negative line length=\" + lineLengthBytes);\n/* */ }\n/* 299 */ byte[] lineData = new byte[lineLengthBytes];\n/* 300 */ System.arraycopy(this.data, lineStart, lineData, 0, lineLengthBytes);\n/* */ \n/* 302 */ line = new String(lineData, ReversedLinesFileReader.this.encoding);\n/* */ \n/* 304 */ this.currentLastBytePos = i - newLineMatchByteCount;\n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* 309 */ i -= ReversedLinesFileReader.this.byteDecrement;\n/* */ \n/* */ \n/* 312 */ if (i < 0) {\n/* 313 */ createLeftOver();\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ \n/* 319 */ if (isLastFilePart && this.leftOver != null) {\n/* */ \n/* 321 */ line = new String(this.leftOver, ReversedLinesFileReader.this.encoding);\n/* 322 */ this.leftOver = null;\n/* */ } \n/* */ \n/* 325 */ return line;\n/* */ }", "public LineProducer ( FileIterator input )\n {\n // Store the input on object creation in the global linesInput \n this.linesInput = input ;\n }", "private synchronized void updateLineCount(long lineCount) {\r\n\t\tthis.parsedLines += lineCount;\r\n\t}", "void setCurrentLineNode(Node<UnderlyingData> currentLineNode);", "public LineData() {\n\t\t\tallPoints = new ArrayList<>(SIZE_OF_ORIGINAL_LIST);\n\t\t}", "private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }", "private void makeLines(LayoutContext lc) {\n //String s = new String(text);\n boolean isLastLine = false;\n int tries = 0;\n int curWidth, wordWidth, lineStart, wordEnd, wordStart, newWidth, textLen, beg, maxM2, spaceW;\n curWidth = lineStart = wordEnd = beg = 0;\n char[] text = this.text;\n textLen = text.length;\n maxM2 = textLen - 2;\n spaceW = fm.charWidth(' ');\n boolean glue = false;\n\n do {\n beg = wordEnd;\n\n // find next word\n for (wordStart = beg;; wordStart++) {\n if (wordStart >= textLen) // trailing blanks?\n {\n if (tries > 0) // guich@tc114_81\n {\n lc.disjoin();\n addLine(lineStart, wordEnd, false, lc, false);\n tries = 0;\n }\n wordEnd = wordStart;\n isLastLine = true;\n break;\n }\n if (text[wordStart] != ' ') // is this the first non-space char?\n {\n wordEnd = wordStart;\n do {\n if (++wordEnd >= textLen) {\n isLastLine = true;\n break;\n }\n } while (text[wordEnd] != ' ' && text[wordEnd] != '/'); // loop until the next space/slash char\n // use slashes as word delimiters (useful for URL addresses).\n if (maxM2 > wordEnd && text[wordEnd] == '/' && text[wordEnd + 1] != '/') {\n wordEnd++;\n }\n break;\n }\n }\n if (!lc.atStart() && wordStart > 0 && text[wordStart - 1] == ' ') {\n wordStart--;\n }\n wordWidth = fm.stringWidth(text, wordStart, wordEnd - wordStart);\n if (curWidth == 0) {\n lineStart = beg = wordStart; // no spaces at start of a line\n newWidth = wordWidth;\n } else {\n newWidth = curWidth + wordWidth;\n }\n\n if (lc.x + newWidth <= lc.maxWidth) {\n curWidth = newWidth + spaceW;\n } else // split: line length now exceeds the maximum allowed\n {\n //if (text[wordStart] == ' ') {wordStart++; wordWidth -= spaceW;}\n if (curWidth > 0) {\n // At here, wordStart and wordEnd refer to the word that overflows. So, we have to stop at the previous word\n wordEnd = wordStart;\n if (text[wordEnd - 1] == ' ') {\n wordEnd--;\n }\n if (DEBUG) {\n Vm.debug(\"1. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\": \" + curWidth + \" \" + isLastLine);\n }\n addLine(lineStart, wordEnd, true, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else if (!lc.atStart()) // case of \"this is a text at the end <b>oftheline</b>\" -> oftheline will overflow the screen\n {\n if (++tries == 2) {\n break;\n }\n if (DEBUG) {\n Vm.debug(\"2 \" + isLastLine);\n }\n // Nothing was gathered in, but the current line has characters left by a previous TextSpan. This occurs only once.\n addLine(0, 0, false, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else {\n // Rare case where we both have nothing gathered in, and the physical line is empty. Had this not been made, then we\n // woud have generated an extra-line at the top of the block.\n if (DEBUG) {\n Vm.debug(\"3. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + '\"');\n }\n if (lineStart != wordEnd) {\n addLine(lineStart, wordEnd, true, lc, glue);\n }\n }\n glue = true;\n }\n } while (!isLastLine);\n\n if (wordEnd != lineStart) {\n //curWidth = fm.stringWidth(text, lineStart, wordEnd-lineStart);\n boolean split = lc.x + curWidth > lc.maxWidth && style.hasInitialValues() && style.isDisjoint;\n if (DEBUG) {\n Vm.debug(\"4. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\" \" + split);\n }\n addLine(lineStart, wordEnd, split, lc, glue);\n }\n }", "private List<String> nextRecord() {\n\t\t\t\t\tList<String> record = new LinkedList<String>();\n\t\t\t\t\twhile (lines.hasNext()) {\n\t\t\t\t\t\tString line = lines.next();\n\t\t\t\t\t\tif (line.startsWith(\"---\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\trecord.add(line);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn record;\n\t\t\t\t}", "@Override\n\tprotected void endOfLine() {\n\t}", "private String readLine(ByteBuf in) {\n\n int bytesToRead;\n byte[] data = null;\n int bytesToSkip;\n\n if ((bytesToRead = in.bytesBefore((byte) LINE_FEED_CHAR)) > -1) {\n // Found the line feed.\n bytesToSkip = 1;\n\n // Check (and ignore) optional carriage return.\n if (bytesToRead > 0 && in.getByte(bytesToRead - 1) == CARRIAGE_RETURN_CHAR) {\n bytesToSkip++;\n bytesToRead--;\n }\n\n // Check that the bytes we're about to read will not exceed the\n // max frame size.\n checkTooLongFrame(bytesToRead);\n\n data = new byte[bytesToRead];\n in.readBytes(data);\n in.skipBytes(bytesToSkip);\n\n // Count the bytes read.\n currentDecodedByteCount += bytesToRead;\n }\n else {\n // No line feed. Make sure we're not buffering more than the max\n // frame size.\n checkTooLongFrame(in.readableBytes());\n }\n\n if (data != null) {\n return new String(data, StompConstants.UTF_8);\n }\n else {\n return null;\n }\n }", "protected void contributeToHead(final StringBuffer contributionBuffer) {\r\n\r\n\t}", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }" ]
[ "0.63753706", "0.6350893", "0.60043544", "0.5635884", "0.56274456", "0.5597832", "0.55946577", "0.54584885", "0.5399467", "0.53981036", "0.5396999", "0.53664285", "0.53186595", "0.5280275", "0.5259226", "0.5239976", "0.5228924", "0.51862985", "0.5156059", "0.5147882", "0.51441604", "0.513885", "0.5132528", "0.50777996", "0.50647736", "0.5064565", "0.50295144", "0.5008479", "0.50059587", "0.4991867", "0.49893707", "0.49458557", "0.4926353", "0.49224195", "0.48991856", "0.48829377", "0.48621473", "0.48574245", "0.48562706", "0.48466486", "0.48420084", "0.4837023", "0.48356286", "0.48124075", "0.48027417", "0.48024246", "0.47900707", "0.4785017", "0.47845232", "0.4765387", "0.47490597", "0.47437435", "0.47292224", "0.47205624", "0.47103322", "0.4709088", "0.47076556", "0.4704748", "0.46946487", "0.46882892", "0.4677655", "0.46611574", "0.46481657", "0.4647505", "0.46368188", "0.46301305", "0.4627907", "0.46209168", "0.46176907", "0.46134493", "0.45989686", "0.45982182", "0.45975554", "0.45959762", "0.45956725", "0.4587023", "0.45855927", "0.45823282", "0.45812663", "0.45622218", "0.45583257", "0.45324028", "0.45313203", "0.45307553", "0.45302144", "0.45287588", "0.45192546", "0.45156053", "0.4514971", "0.4511196", "0.45110583", "0.45087254", "0.45082566", "0.45034853", "0.4497542", "0.44941035", "0.44851968", "0.44830197", "0.44810078", "0.4479728" ]
0.5513034
7
Read a map from a tabdelimited file with headers. The first column specified is the key, the second is the data.
public static Map<String, String> readMap(File inFile, String kColumn, String vColumn) throws IOException { Map<String, String> retVal = new HashMap<String, String>(); try (TabbedLineReader inStream = new TabbedLineReader(inFile)) { int kCol = inStream.findField(kColumn); int vCol = inStream.findField(vColumn); for (Line line : inStream) retVal.put(line.get(kCol), line.get(vCol)); } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HashMap<String,String> readMapFile(String filename) throws IOException {\n\t\tHashMap<String,String> valueMap = new HashMap<String,String>();\t\t\n List<String> cols = new ArrayList<String>(); \n\t\t\n try{\n \t buf = new BufferedReader(new FileReader(filename)); \n\t String strRead; \n\t while ((strRead=buf.readLine())!=null) {\n\t \tcols = Arrays.asList(strRead.split(\"\\t\")); \t\n\t \tif(cols.size() != 2)\n\t \t\tcontinue; \t\n\t \tvalueMap.put(cols.get(0),cols.get(1)); \t\n\t \t }\n\t } catch(IOException e){\n\t e.printStackTrace();\n\t } finally {\n\t \tbuf.close(); \n\t }\n\t\t\t\n\t\treturn valueMap;\n\t}", "@SuppressWarnings(\"unchecked\")\n public TreeMap readMap() throws IOException {\n int length = readMapHeader();\n TreeMap result = new TreeMap();\n for (int i = 0; i < length; i++) {\n Object key = read();\n Object value = read();\n result.put(key, value);\n }\n return result;\n }", "static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }", "private void readMap( Map<String, String> map ) {\n\t\t\n\t\tSet<Map.Entry<String, String>> set = map.entrySet();\n\t\t\n\t\tfor( Map.Entry<String, String> entry : set ) {\n\t\t\tSystem.out.printf( \"'%1$-10s' '%2$20s' %n\", entry.getKey(), entry.getValue() );\n\t\t}\n\t\t\n\t}", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "private HashMap<String, String> readExcelData(HashMap<String, String> map, String fileName, String tabName)\n\t\tthrows Exception{\n\t\tWorkbook configWorkBook = Workbook.getWorkbook(this.getClass().getResourceAsStream(fileName));\n//\t\tlogger.debug(\"configWorkBook \" + configWorkBook);\n\t\tSheet configDataSheet = configWorkBook.getSheet(tabName);\n//\t\tlogger.debug(\"reading \" + fileName);\n//\t\tlogger.debug(\"found \" + configDataSheet.getRows() + \"rows in \" + fileName);\n\t\tfor(int row=1; row<configDataSheet.getRows(); row++){\n\t\t\tString key = configDataSheet.getCell(0, row).getContents();\n\t\t\tString value = configDataSheet.getCell(1, row).getContents();\n//\t\t\tlogger.debug(\"processing row \" + row + \" in \" + fileName + \" - found key \" + key + \" value \" + value);\n\t\t\tmap.put(key, value);\n\t\t}\n\t\treturn map;\n\t}", "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "public int readMapHeader() throws IOException {\n return in.readInt();\n }", "public static int[][] loadMap(String fileName) throws Exception{\n FileReader fr=new FileReader(fileName);\n int c;\n String str=\"\";\n List<String> strA=new ArrayList<>(); //list of lines\n //process out newlines from midline\n while((c=fr.read())!=-1){\n System.out.print((char)c); //show map\n if(!(((char)c=='\\n') || ((char)c=='\\r'))){str=str+(char)c;}\n else if(((char)c=='\\n' || (char)c=='\\r')){\n if(strA.size()<1) {strA.add(str);str=\"\";}\n else if(strA.size()>0 && strA.get(0).length()>str.length()){} //newline char found midline\n else {strA.add(str);str=\"\";}\n }\n else System.out.println(\"Err: \"+(char)c);\n }\n strA.add(str);\n System.out.println(\"\\nWidth: \"+str.length()+\"\\nHeight: \"+strA.size());\n //now that size is known, fill info array\n int[][] map=fillMap(strA);\n \n return map;\n }", "public static HashMap readVF(String mapF) throws IOException{\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(new FileInputStream(mapF)));\n\t\tString line = input.readLine();//pair\n\t\tHashMap map = new HashMap();\n\t\twhile(line!=null){\n\t\t\tString vector = input.readLine();\n\t\t\tmap.put(line.substring(1), vector);\n\t\t\tline = input.readLine();\n\t\t}\n\t\tinput.close();\n\t\treturn map;\n\t}", "public void filterTsv() throws IOException {\n\t\tList<List<String>> rows = new ArrayList<>();\n\t\tList<String> cols = new ArrayList<String>();\n\t\tList<String> head = new ArrayList<String>();\n\n\t\ttry {\n\t\t\tbuf = new BufferedReader(new FileReader(inputFile)); \n\t\t\t\n\t\t\t// determine which column to filter based on columnMap\n\t\t\tString strRead = buf.readLine();\n\t\t\tString[] myline = strRead.split(\"\\t\");\n\n\t\t\tfor (int i = 0; i < myline.length; i++) {\n\t\t\t\tString mappedValue = columnMap.get(myline[i]);\n\t\t\t\tif (mappedValue != null) {\n\t\t\t\t\tcolIndex.add(i);\n\t\t\t\t\thead.add(mappedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\trows.add(head);\n\n\t\t\twhile ((strRead = buf.readLine()) != null) {\n\t\t\t\tcols = new ArrayList<String>();\n\t\t\t\tmyline = strRead.split(\"\\t\");\n\t\t\t\t\n\t\t\t\t//skip row if not in rowMap\n\t\t\t\tif (rowMap.get(myline[0]) == null)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tfor (Integer index : colIndex) {\n\t\t\t\t\tif (index < myline.length) {\n\t\t\t\t\t\tif (index == 0)\n\t\t\t\t\t\t\tcols.add(rowMap.get(myline[0]));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcols.add(myline[index]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trows.add(cols);\n\t\t\t}\n\n\t\t\twriteTsv(rows, outputFile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tbuf.close();\n\t\t}\n\t}", "public static HashMap<String, ArrayList<String>> CSVHeadData(String path) {\r\n\t\t\r\n\t\t// get the rows of the file\r\n\t\tString[] rows = read(path).split(\"(\\n)+\");\r\n\t\r\n\t\t\r\n\t\t// Initialize the map\r\n\t\tHashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\r\n\t\t\r\n\t\t// Initialize keys\r\n\t\tArrayList<String> keys = new ArrayList<String>();\r\n\t\t// get the keys from the first row\r\n\t\tfor (String i : rows[0].split(\",\")) {\r\n\t\t\t// get rid of first and last spaces\r\n\t\t\tString current = i.trim();\r\n\t\t\t// add the current string to the list\r\n\t\t\tkeys.add(current);\r\n\t\t\t// add the key to the map and initialize the corresponding list\r\n\t\t\tmap.put(current, new ArrayList<String>());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// iterate over the rest of the rows \r\n\t\tfor (int i = 1; i < rows.length; i++) {\r\n\t\t\tint j = 0;\r\n\t\t\tString[] currentRowWords = rows[i].split(\",\");\r\n\t\t\t\r\n\t\t\t// check if the number of values is equal to the number of keys\r\n\t\t\tif (currentRowWords.length != keys.size()) {\r\n\t\t\t\tSystem.out.println(\"Invalid row n: \" + (i + 1) + \r\n\t\t\t\t\t\t\".\\nNumber of values does not match number of keys\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// get the words from the row and add them to the list of appropriate key\r\n\t\t\tfor (String k : currentRowWords) {\r\n\t\t\t\tString current = k.trim();\r\n\t\t\t\tmap.get(keys.get(j)).add(current);\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// That's all Folks!\r\n\t\treturn map;\r\n\t}", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "public static Map<String, String> parse(File file) throws IOException {\n List<String> configs = Files.readAllLines(file.toPath());\n return configs.stream()\n .map(it -> it.split(\"\\t\"))\n .collect(toMap(splitted -> splitted[0], splitted -> splitted[1]));\n }", "@SuppressWarnings(\"unchecked\")\n\t/**\n\t * Read data and store\n\t * @param data\n\t * \t\t\t\tThe map to store data read from ser file\n\t * @return Map<String, T>\n\t * \t\t\ta map of data that has all the ser file data\n\t * @throws ClassNotFoundException\n\t * @throws IOException\n\t */\n\tprotected Map<String, T> readFromFile(Map<String, T> data) throws ClassNotFoundException, IOException {\n\t\t\n\t\tInputStream file = new FileInputStream(filePath);\n\t\tInputStream buffer = new BufferedInputStream(file);\n\t\tObjectInput input = new ObjectInputStream(buffer);\n\n\t\t//deserialize the Map\n\t\tdata = (HashMap<String, T>) input.readObject();\n\t\tinput.close();\n\t\treturn data;\n\t}", "public abstract void readFromFile(String key, String value);", "public static Map readMap(String filename)\n throws IOException, ClassNotFoundException\n {\n ObjectInputStream in = null;\n try\n {\n //open the file\n in = new ObjectInputStream(new FileInputStream(filename));\n //read and return the object\n return (Map)in.readObject();\t\n }\n finally\n {\n //close the file\n if(in != null)\n in.close();\n } \n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "private void load(Path fileName) throws IOException {\n try(BufferedReader reader = Files.newBufferedReader(fileName)) {\n String line = \"\";\n\n // Matches lines with the format:\n // key=value\n // where the key is any sequence of lowercase letters. (a to z)\n // where value may be any letters from a to z (case insensitive) 0 to 9 or the letters '-' and '.'.\n Pattern validLine = Pattern.compile(\"^(?<key>[a-z]+)=(?<value>[a-zA-Z0-9-.]+)$\");\n\n // Read the file line by line\n while((line = reader.readLine()) != null) {\n if(line.startsWith(\";\")) { // Ignore lines that start with ;\n continue;\n }\n\n // Remove any whitespace\n line = line.trim();\n\n // Continue if our line is empty\n if(\"\".equals(line)) {\n continue;\n }\n\n Matcher matcher = validLine.matcher(line);\n\n if(!matcher.matches() || matcher.groupCount() != 2) {\n System.err.println(\"Unable to parse line: \" + line);\n continue;\n }\n\n String key = matcher.group(\"key\");\n String value = matcher.group(\"value\");\n\n map.put(key, value);\n }\n }\n }", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "protected synchronized Hashtable getMappingsFromFile() throws Exception {\n\n \t\n\t\tInputStream path = null;\n\n\t\tpath = getClass().getResourceAsStream(\"../../../config/mappings.txt\");\n\n\t\tSystem.out.println(\"Path is - \" + path);\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(path));\n/*\t\tStringBuilder sb = new StringBuilder();\n\t\tString line1 = null;\n\t\twhile ((line1 = reader.readLine()) != null) {\n\t\t\tsb.append(line1 + \"\\n\");\n\t\t}\n*/\t\t//System.out.println(\"String is - \" + sb.toString());\n\t\t\n/* \tFile f = new File(\"src/edu/ucsd/crbs/incf/components/services/emage/mappings.txt\");\n System.out.println(\"Mapping - \" + f.getAbsolutePath());\n\n*/ /*if(sb.toString().trim().equals(\"\") || sb.toString() == null ) {\n System.err.println(\"bisel.ReadMappings cannot find mapping file\");\n System.exit(1);\n }*/\n\n Hashtable mappings = new Hashtable(17, new Float(1.25).floatValue());\n\n\n //BufferedReader br = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n while(line != null) { \n StringTokenizer st = new StringTokenizer(line, \"*\");\n String aba = st.nextToken();\n String emap = st.nextToken();\n mappings.put(aba, emap);\n line = reader.readLine();\n }\n\n reader.close();\n return mappings;\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic LinkedHashMap<String, ExplicitRoutingTable> read(String file) {\r\n\t\tLinkedHashMap<String, ExplicitRoutingTable> result = null;\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(file);\r\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\r\n\t\t\tresult = (LinkedHashMap<String, ExplicitRoutingTable>) ois\r\n\t\t\t\t\t.readObject();\r\n\t\t\tois.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }", "static Map<Integer, Map<String, Object>> readCsv(BufferedReader in) throws IOException {\n\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\",\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\t\n\t\t\t/*code found for the regex expression found at \n\t\t\t* http://stackoverflow.com/questions/1757065/java-splitting-a-comma-separated-string-but-ignoring-commas-in-quotes\n\t\t\t* by user Bart Kiers\n\t\t\t*/\n\t\t\tString[] val = valString.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t}\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the list\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }", "public UPOSMapper(String mappingFile){\n map = new ConcurrentHashMap<>();\n try {\n for(String line: Files.readAllLines(Paths.get(mappingFile))){\n line = line.trim();\n if(line.isEmpty()) continue;\n String[] tags = line.split(\"\\t\");\n map.put(tags[0], tags[1]);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "public static char[][] ReadMap(String fileName)\r\n {\n String pathName=System.getProperty(\"user.dir\")+\"\\\\FilesToLoad\\\\Maps\\\\\"+fileName+\".txt\";\r\n File file = new File(pathName); \r\n List<String> list = new ArrayList<String>();\r\n try \r\n {\r\n Scanner sc = new Scanner(file);\r\n \r\n while (sc.hasNextLine()) \r\n {\r\n list.add(sc.nextLine());\r\n }\r\n }\r\n catch (FileNotFoundException ex) \r\n {\r\n Logger.getLogger(TxtReader.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n int x=list.get(0).length();\r\n int y=list.size();\r\n char[][] map=new char[x][y];\r\n \r\n for (int i = 0; i < list.size(); i++) \r\n {\r\n String line=list.get(i);\r\n for (int j = 0; j < line.length(); j++) \r\n {\r\n map[j][i]=line.charAt(j);\r\n }\r\n }\r\n return map;\r\n }", "public static void load(Context context) throws IOException {\n // read the file\n String raw = File.readFile(\"vaccine.txt\", context);\n\n // clear the map and load contents of file into the map\n map.clear();\n for (String line : raw.split(\"\\n\")) {\n if (line.equals(\"\")) {\n continue;\n }\n String[] data = line.split(\",\");\n if (data[0].equals(\"\") || data.length != 3) {\n continue;\n }\n map.put(data[0], Boolean.getBoolean(data[1]));\n dateMap.put(data[0], data[2]);\n }\n }", "public void readFile(String filename) throws IOException {\n BufferedReader buffer = new BufferedReader(new FileReader(filename));\n\n String line;\n int row = 0;\n isFirstLine = true;\n\n while ((line = buffer.readLine()) != null) {\n String[] vals = line.trim().split(\"\\\\s+\");\n int length = vals.length;\n \n if(isFirstLine) {\n \tfor(int col = 0; col < 2; col++) {\n \t\tif(col == 0)\n \t\t\trowSize = Integer.parseInt(vals[col]);\n \t\telse\n \t\t\tcolSize = Integer.parseInt(vals[col]);\n \t}\n \tskiMap = new int[rowSize][colSize];\n \tisFirstLine = false;\n }\n else {\n \tfor (int col = 0; col < length; col++) {\n \tskiMap[row][col] = Integer.parseInt(vals[col]);\n }\n \t row++;\n }\n }\n \n if(buffer != null)\n \tbuffer.close();\n }", "private Map<String, String> getRow(CSVReaderHeaderAware rowReader)\n throws IOException {\n return rowReader.readMap();\n }", "public void loadTroubleMarker(HashMap<Integer, TroubleMarker> TroubleMarker_HASH){\r\n \r\n try {\r\n Scanner scanner = new Scanner(new File(file_position+\"TroubleMarker.csv\"));\r\n Scanner dataScanner = null;\r\n int index = 0;\r\n \r\n while (scanner.hasNextLine()) {\r\n dataScanner = new Scanner(scanner.nextLine());\r\n \r\n if(TroubleMarker_HASH.size() == 0){\r\n dataScanner = new Scanner(scanner.nextLine());\r\n }\r\n \r\n dataScanner.useDelimiter(\",\");\r\n TroubleMarker troubleMarker = new TroubleMarker(-1, -1);\r\n \r\n while (dataScanner.hasNext()) {\r\n String data = dataScanner.next();\r\n if (index == 0) {\r\n troubleMarker.setId(Integer.parseInt(data));\r\n } else if (index == 1) {\r\n troubleMarker.setAreaNumber(Integer.parseInt(data));\r\n } else {\r\n System.out.println(\"invalid data::\" + data);\r\n }\r\n index++;\r\n }\r\n \r\n TroubleMarker_HASH.put(troubleMarker.getId(), troubleMarker);\r\n index = 0;\r\n }\r\n \r\n scanner.close();\r\n \r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"Error: FileNotFound - loadTroubleMarker\");\r\n }\r\n \r\n }", "public static Map readRecords() throws ClassNotFoundException, IOException {\n\t\tMap map = null;\n\t\ttry{\n\t\t\twhile(true) {\n\t\t\t\tmap = (Map) input.readObject();\n\t\t\t\treturn map;\n\t\t\t}\n\t\t} catch(EOFException e) {\n\t\t\tSystem.err.println(\"Error: Reached end of file prematurely. File may be corrupted.\");\n\t\t\tthrow e;\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"Error: Class 'map' not found. Unable to create object.\");\n\t\t\tthrow e;\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to read map from file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "public void readKey(File file) throws FileNotFoundException {\n key = new double[CHAR_SET_SIZE][CHAR_SET_SIZE];\n Scanner in = new Scanner(file);\n int i = 0;\n while (in.hasNextLine()) {\n String line = in.nextLine();\n String [] vals = line.split(\" \");\n for (int j = 0; j < vals.length; j++) {\n key[i][j] = Double.parseDouble(vals[j]);\n }\n i++;\n }\n }", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "public static void readFileToMap(Map<String, List<Integer>> hashMap, String path, int numFiles, int thisFileNum){\n try{\n FileReader file = new FileReader(path);\n BufferedReader textFile = new BufferedReader(file);\n\n String fileLine = \"\";\n String[] wordsInLine;\n List<Integer> occurences;\n List<Integer> temp;\n\n while((fileLine = textFile.readLine()) != null){\n wordsInLine = fileLine.split(\" \");\n cleanLine(wordsInLine);\n //add them to map\n for(String word : wordsInLine){\n\n if(word.length() > Table.maxWordLength){ //keeps track of the longest character\n Table.setMaxWordLength(word.length());\n }\n\n if(!hashMap.containsKey(word)){\n occurences = new ArrayList<>(); //creating a new value makes it so that one change wont affect every HashMap element\n occurences = setZerosList(numFiles);\n occurences.set(thisFileNum, 1);\n hashMap.put(word, occurences);\n }\n else{\n temp = hashMap.get(word); //this code makes a new list, and increments the word appearance by 1\n temp.set(thisFileNum, temp.get(thisFileNum)+1);\n hashMap.put(word, temp );\n }\n }\n }\n }\n catch (Exception e){\n //e.printStackTrace();\n return;\n }\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "private void readKeyDataToIdentifyTransactions(){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(keyFile));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif((line.startsWith(\"#\")) || (line.equals(\"\")))\n\t\t\t\t\tcontinue;\n\t\t\t\telse{\n\t\t\t\t\tString transacName = line.split(\";\")[0];\n\t\t\t\t\tchar transacType = line.split(\";\")[1].charAt(0);\n\t\t\t\t\ttypeTransData.put(transacName,transacType);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! \"+ keyFile +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"Please try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public void loadMap(Map map, Class<?> keyClass, Class<?> valueClass)\n throws Exception {\n int length = readInt();\n\n for (int i = 0; i < length; i++) {\n Object key = keyClass.newInstance();\n Object value = valueClass.newInstance();\n\n if (keyClass.getName()\n .endsWith(\"String\")) {\n key = readString();\n } else {\n load(key);\n }\n\n if (valueClass.getName()\n .endsWith(\"String\")) {\n value = readString();\n } else {\n load(value);\n }\n\n map.put(key, value);\n }\n }", "public static HashMap<String, ArrayList<String>> CSVKeyData(String path) {\r\n\r\n\t\t// Initialize the map\r\n\t\tHashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\r\n\t\t\r\n\t\t// get the rows of the file\r\n\t\tString[] rows = read(path).split(\"(\\n)+\");\r\n\t\t\r\n\t\t\r\n\t\t// iterate over the rows\r\n\t\tfor (int i = 0; i < rows.length; i++) {\r\n\t\t\t// get the words of the current line\r\n\t\t\tString[] currentRowWords = rows[i].split(\",\");\r\n\t\t\t\r\n\t\t\t// get the current key\r\n\t\t\tString currentKey = currentRowWords[0].trim();\r\n\t\t\t\r\n\t\t\t// set the key and initialize the list\r\n\t\t\tmap.put(currentKey, new ArrayList<String>());\r\n\t\t\t\r\n\t\t\t// add the values to the current key\r\n\t\t\tfor (int j = 1; j < currentRowWords.length; j++) {\r\n\t\t\t\tString currentValue = currentRowWords[j].trim();\r\n\t\t\t\tmap.get(currentKey).add(currentValue);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// That's all Folks!\r\n\t\treturn map;\r\n\t}", "public static HashMap<String, String> getNamesMap(File uniprotNamesFile) throws IOException {\n\n HashMap<String, String> namesMap = new HashMap<>();\n\n InputStream fileStream = new FileInputStream(uniprotNamesFile);\n InputStream gzipStream = new GZIPInputStream(fileStream);\n Reader decoder = new InputStreamReader(gzipStream, encoding);\n\n char[] separators = {'[', '('};\n\n try (BufferedReader br = new BufferedReader(decoder)) {\n\n String line = br.readLine();\n while ((line = br.readLine()) != null) {\n\n String[] lineSplit = line.split(\"\\t\");\n\n String accession = lineSplit[0];\n String proteinName = lineSplit[1];\n\n int separatorIndex = indexOf(proteinName, separators, 7);\n\n if (separatorIndex > -1) {\n\n proteinName = proteinName.substring(0, separatorIndex - 1);\n\n }\n\n namesMap.put(accession, proteinName);\n }\n }\n\n return namesMap;\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "private void loadCSVFileIntoHashmap(){\n try {\n postCodesFileReader = new FileReader(postCodesFileLocation);\n String line;\n //Open up the buffered reader so we can start looping through our CSV file\n BufferedReader br = new BufferedReader(postCodesFileReader);\n while ((line = br.readLine()) != null) {\n String[] country = line.split(fieldSeperator);\n if(country.length<=3){\n //Add the region code and matching country to the hashmap\n postCodesMap.put(country[0].trim(), country[2].trim());\n }\n }\n br.close();\n } \n catch (Exception e) {\n //Ideally we would use a custom log file, but for the sake of a quick demo use the stderr \n e.printStackTrace();\n } \n }", "public Map<String, List<Set<Integer>>> readMappingsFromFile(String fname)\n\t\t\tthrows IOException {\n\t\tMap<String, List<Set<Integer>>> mappings = new HashMap<String, List<Set<Integer>>>();\n\n\t\tBufferedReader br = null;\n\n\t\tif (fname != null) {\n\t\t\tInputStream st = getClass().getResourceAsStream(fname);\n\t\t\tif (st != null) {\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(st));\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Could not find \" + fname + \" in classpath\");\n\t\t\t}\n\t\t}\n\t\tString line = null;\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString colsplit[] = line.split(\":\");\n\t\t\tString prefix = colsplit[0];\n\t\t\tString integers[] = colsplit[1].split(\"[, ]+\");\n\n\t\t\tList<Set<Integer>> mapping = null;\n\t\t\tif (!mappings.containsKey(prefix)) {\n\t\t\t\tmapping = new ArrayList<Set<Integer>>();\n\t\t\t\tmappings.put(prefix, mapping);\n\t\t\t}\n\t\t\tmapping = mappings.get(prefix);\n\n\t\t\tSet<Integer> given_mapping = new HashSet<Integer>();\n\t\t\tfor (String Int : integers) {\n\t\t\t\tif (Int.length() > 0) {\n\t\t\t\t\tgiven_mapping.add(Integer.parseInt(Int));\n\t\t\t\t}\n\t\t\t}\n\t\t\tmapping.add(given_mapping);\n\t\t\tmappings.put(prefix, mapping);\n\t\t}\n\t\tbr.close();\n\n\t\treturn mappings;\n\t}", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "private static void loadTableData() {\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + tableInfoFile));\n\n\t\t\twhile (true) {\n\n\t\t\t\t// read next line\n\t\t\t\tString line = in.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] tokens = line.split(\" \");\n\t\t\t\tString tableName = tokens[0];\n\t\t\t\tString tableFileName = tokens[1];\n\n\t\t\t\ttableNameToSchema.put(tableName, new HashMap<String, Type>());\n\t\t\t\ttableNameToOrdredSchema.put(tableName,\n\t\t\t\t\t\tnew ArrayList<ColumnInfo>());\n\n\t\t\t\t// attributes data\n\t\t\t\tfor (int i = 2; i < tokens.length;) {\n\n\t\t\t\t\tString attName = tokens[i++];\n\t\t\t\t\tString attTypeName = (tokens[i++]);\n\n\t\t\t\t\tType attType = null;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Undefined, how to represent dates, crazy longs probably\n\t\t\t\t\t * won't need this for now...\n\t\t\t\t\t */\n\t\t\t\t\tif (attTypeName.equals(\"CHAR\")) {\n\t\t\t\t\t\tattType = Types.getCharType(Integer\n\t\t\t\t\t\t\t\t.valueOf(tokens[i++]));\n\t\t\t\t\t} else if (attTypeName.equals(\"DATE\")) {\n\t\t\t\t\t\tattType = Types.getDateType();\n\t\t\t\t\t} else if (attTypeName.equals(\"DOUBLE\")) {\n\t\t\t\t\t\tattType = Types.getDoubleType();\n\t\t\t\t\t} else if (attTypeName.equals(\"FLOAT\")) {\n\t\t\t\t\t\tattType = Types.getFloatType();\n\t\t\t\t\t} else if (attTypeName.equals(\"INTEGER\")) {\n\t\t\t\t\t\tattType = Types.getIntegerType();\n\t\t\t\t\t} else if (attTypeName.equals(\"LONG\")) {\n\t\t\t\t\t\tattType = Types.getLongType();\n\t\t\t\t\t} else if (attTypeName.equals(\"VARCHAR\")) {\n\t\t\t\t\t\tattType = Types.getVarcharType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Invalid type: \"\n\t\t\t\t\t\t\t\t+ attTypeName);\n\t\t\t\t\t}\n\n\t\t\t\t\ttableNameToSchema.get(tableName).put(attName, attType);\n\n\t\t\t\t\tColumnInfo ci = new ColumnInfo(attName, attType);\n\t\t\t\t\ttableNameToOrdredSchema.get(tableName).add(ci);\n\n\t\t\t\t}\n\n\t\t\t\t// at this point, table info loaded.\n\n\t\t\t\t// Create table\n\t\t\t\tmyDatabase.getQueryInterface().createTable(tableName,\n\t\t\t\t\t\ttableNameToSchema.get(tableName));\n\n\t\t\t\t// Now, load data into newly created table\n\t\t\t\treadTable(tableName, tableFileName);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tHelpers.print(e.getStackTrace().toString(),\n\t\t\t\t\tutil.Consts.printType.ERROR);\n\t\t}\n\n\t}", "public static MobilityMap parseMap( String filename ) throws FileNotFoundException\r\n {\r\n File f = new File( filename );\r\n return parseMap( f );\r\n }", "@Override\n public void readTilePositions(BufferedRandomAccessFile braf) throws IOException {\n row0 = braf.leReadInt();\n col0 = braf.leReadInt();\n nRows = braf.leReadInt();\n nCols = braf.leReadInt();\n this.row1 = row0 + nRows - 1;\n this.col1 = col0 + nCols - 1;\n if (nCols == 0) {\n offsets = null;\n // no position records follow in file.\n } else {\n offsets = new long[nRows][];\n for (int i = 0; i < nRows; i++) {\n offsets[i] = new long[nCols];\n }\n for (int i = 0; i < nRows; i++) {\n for (int j = 0; j < nCols; j++) {\n offsets[i][j] = braf.leReadLong();\n }\n }\n }\n }", "private static void fillDataMapFromFrequencyFile(File frequencyFile, HashMap<String, Long> dataMap) throws IOException {\n\n\t\tfinal BufferedReader frequencyReader = new BufferedReader(new FileReader(frequencyFile));\n\n\t\tList<String> lines = frequencyReader.lines()\n\t\t\t\t.collect(Collectors.toList());\n\n\t\tfrequencyReader.close();\n\n\t\tfor(int i = 0, size = lines.size(); i < size; i++) { // Split each line at the delimiter, into word & frequency - put them in the data map\n\n\t\t\tfinal String[] dataSplit = lines.get(i).split(WORD_FREQUENCY_DELIMITER);\n\t\t\tfinal String word = dataSplit[0];\n\t\t\tfinal long frequency = Long.parseLong(dataSplit[1]);\n\n\t\t\tdataMap.put(word, frequency);\n\t\t}\n\t}", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }", "private void createMaps(String pathToCsv) throws Exception {\n BufferedReader br = new BufferedReader(new FileReader(pathToCsv));\n String line = null;\n\n while ((line = br.readLine()) != null) {\n String[] mapping = line.split(\",\");\n fileUrlMap.put(mapping[0], mapping[1]);\n urlFileMap.put(mapping[1], mapping[0]);\n }\n\n br.close();\n }", "@Override\r\n public Map getData(String fileName) {\r\n Map<String, Integer> map = new HashMap<>();\r\n \r\n File file = new File(fileName);\r\n \r\n try (BufferedReader bufferedReader =\r\n new BufferedReader(new FileReader(file))) {\r\n \r\n String line;\r\n while ((line = bufferedReader.readLine()) != null) {\r\n \r\n //if the word have already been in the map,\r\n //increases the number of occurances,\r\n //otherwise sets this number to 1\r\n //and puts a new value to the map\r\n String[] words = line.split(\" \");\r\n for (String word : words) {\r\n Integer value = map.get(word);\r\n if (value == null) {\r\n value = 1;\r\n } else {\r\n value++;\r\n }\r\n map.put(word, value);\r\n }\r\n }\r\n } catch(IOException e) {\r\n System.out.println(e.getMessage());\r\n return null;\r\n }\r\n \r\n return map;\r\n }", "public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}", "public Table readTable(String pathName, String filename){\n File file = new File(pathName + filename);\n Table newTable = null;\n Scanner sc; \n //foreign key aspects\n Boolean hasForeignKey = false;\n ArrayList<String> FKIndex; \n String[] line; \n String primaryTableName = \"\", primaryColName = \"\", colName = \"\"; \n String name = \"\";\n\n try {\n sc = new Scanner(file);\n } catch(FileNotFoundException ex) {\n System.out.println(\"ERROR: file not found\");\n return null;\n }\n\n //get table name - always first line\n if (sc.hasNextLine()){\n name = sc.nextLine();\n }\n\n FKIndex = getForeignKeyIndex(pathName);\n //loop over all rows in FKIndex, and check if table has a foreign key\n if(!FKIndex.isEmpty()){\n for(int i = 0; i < FKIndex.size(); i++){\n line = FKIndex.get(i).split(\"\\\\s\"); \n if (line[2].equals(name)){\n hasForeignKey = true;\n primaryTableName = line[0];\n primaryColName = line[1];\n colName = line[3];\n }\n }\n }\n\n //get col names - always second line\n if (sc.hasNextLine()){\n String colNamesString = sc.nextLine();\n //split colNames into individual words as Strings based on whitespace\n String[] colNames = colNamesString.split(\"\\\\s\");\n\n //make table with column names\n if (hasForeignKey){\n newTable = new Table(name, primaryTableName, primaryColName, colName, true, colNames);\n } else {\n newTable = new Table(name, colNames);\n }\n\n //add rows from file (each line)\n while(sc.hasNextLine()){\n String newRowString = sc.nextLine();\n String[] newRow = newRowString.split(\"\\\\s\");\n newTable.addRow(newRow);\n }\n }\n\n sc.close();\n return newTable;\n }", "public void readTestFile(final String fileName) {\n\n final String filePath = System.getProperty(\"user.dir\") + \"/data/\" + fileName;\n\n try (Stream<String> lines = Files.lines(Paths.get(filePath))) {\n lines.forEach(\n this::buildTopLevelMap\n );\n topLevelMap.forEach((k, v) -> {\n Hashtable<String, Integer> passFailTable = iterateOverMapRecords(k, v);\n testControlData.put(k, passFailTable);\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public HashMap<String, ArrayList<Trajectory>> readTrajectories(String trajFileName) {\n Scanner csv = null;\n HashMap<String, ArrayList<Trajectory>> trajectories = new HashMap<String, ArrayList<Trajectory>>();\n try {\n csv = new Scanner(new File(trajFileName));\n ArrayList<Trajectory> tj = new ArrayList<Trajectory>();\n String currentId = \"\";\n while (csv.hasNextLine()) {\n String[] line = csv.nextLine().split(\",\");\n line[0] = line[0].substring(6, line[0].length() - 1);\n String[] locs = line[0].split(\" \");\n\n if (currentId.equals(\"\")) // first device\n {\n currentId = line[1];\n } else if (!currentId.equals(line[1])) // we are looking at a new device, add arrayList to the map, reset arrayList\n {\n trajectories.put(currentId, tj);\n tj = new ArrayList<Trajectory>();\n currentId = line[1];\n }\n tj.add(new Trajectory(Double.parseDouble(locs[0]), Double.parseDouble(locs[1]), line[1], Double.parseDouble(line[2])));\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return trajectories;\n }", "protected static void readIn(Path p, HashMap<String, Double> myMap, FileSystem fs) throws IOException {\n\t FSDataInputStream inputStream = fs.open(p);\n\t BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n\t // Read in all the lines and push into hashmap\n\t String line;\n\t while((line = br.readLine()) != null) {\n\t \tString[] sectors = line.trim().split(\"\\t\");\n\t \tif (sectors.length != 2)\n\t \t\tthrow new Error(\"Parsing of file does not match specified input -- readIn\");\n\t \tif (myMap.containsKey(sectors[0]))\n\t \t\tthrow new Error(\"Node is trying to be added more than once\");\n\t \t\n\t \tmyMap.put(sectors[0], Double.parseDouble(sectors[1]));\n\t }\n\t br.close();\n\t fs.close();\n\t}", "public static void readTable(String tableName, String filename) {\n\n\t\t// System.out.println(filename);\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + filename));\n\n\t\t\twhile (true) {\n\n\t\t\t\tString line = in.readLine();\n\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// remove | at end for tokenization\n\t\t\t\tline = line.substring(0, line.length() - 1);\n\n\t\t\t\t// line into tokens\n\t\t\t\tString[] tokens = line.split(attributeDelimiter);\n\t\t\t\tint numAttributes = tokens.length;\n\n\t\t\t\tassert (tokens.length == tableNameToOrdredSchema.get(tableName)\n\t\t\t\t\t\t.size());\n\n\t\t\t\tObject[] arr = new Object[numAttributes];\n\n\t\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\n\t\t\t\t\tClass<?> type = tableNameToOrdredSchema.get(tableName).get(\n\t\t\t\t\t\t\ti).getType().getCorrespondingJavaClass();\n\t\t\t\t\tObject val = null;\n\n\t\t\t\t\tif (type.isAssignableFrom(String.class)) {\n\t\t\t\t\t\tval = tokens[i];\n\t\t\t\t\t} else if (type.isAssignableFrom(java.util.Date.class)) {\n\t\t\t\t\t\tval = new java.util.Date(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Integer.class)) {\n\t\t\t\t\t\tval = Integer.parseInt(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Double.class)) {\n\t\t\t\t\t\tval = Double.parseDouble(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Long.class)) {\n\t\t\t\t\t\tval = Long.parseLong(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Float.class)) {\n\t\t\t\t\t\tval = Float.parseFloat(tokens[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Type problem\");\n\t\t\t\t\t}\n\n\t\t\t\t\tarr[i] = val;\n\n\t\t\t\t}\n\n\t\t\t\tSampleRow row = new SampleRow(tableNameToOrdredSchema\n\t\t\t\t\t\t.get(tableName), arr);\n\n\t\t\t\tmyDatabase.getQueryInterface().insertRow(tableName, row);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void readFile(Path file, Charset charset) {\n\n BufferedReader reader = null;\n try {\n log.info(\"Reading file \" + file.getFileName().toString());\n reader = Files.newBufferedReader(file, charset);\n\n String line = null;\n while ((line = reader.readLine()) != null) {\n\n String[] splitLine = line.split(\",\");\n LocalDateTime ldt = LocalDateTime.parse(splitLine[0], DateTimeFormatter.ISO_DATE_TIME);\n\n /**\n * Creation of new map filtered to get all lines before the current date got from the current file line\n */\n Map<LocalDateTime, String> filteredMap = mapLines.entrySet().stream()\n .filter(entry -> entry.getKey().isBefore(ldt))\n .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,\n (v1,v2) ->{ throw new RuntimeException(String.format(\"Duplicate key for values %s and %s\", v1, v2));},\n TreeMap::new));\n\n /**\n * Printing each line from filter map, also we delete those objects to maintain memory.\n */\n filteredMap.forEach((localDateTime, s) -> {\n System.out.println(s);\n mapLines.remove(localDateTime, s);\n });\n filteredMap.clear();\n\n mapLines.put(ldt, line);\n TimeUnit.SECONDS.sleep(1);\n }\n } catch (MalformedInputException m) {\n readFile(file, Charset.forName(\"Windows-1252\"));\n } catch (IOException e) {\n log.error(e, e);\n }\n catch (InterruptedException ie) {\n log.error(ie, ie);\n }\n }", "protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }", "Map(String input) {\n row = 0;\n col = 0;\n\n String line;\n Scanner fin = null;\n try\n {\n fin = new Scanner(new File(input));\n }\n catch (FileNotFoundException x)\n {\n System.out.println(\"Error: \" + x);\n System.exit(0);\n }\n // Take first line and get mapLength and mapHeight. Initialize map array\n line = fin.nextLine();\n String[] temp = line.split(\" \");\n maxR = Integer.parseInt(temp[0].toString());\n maxC = Integer.parseInt(temp[1].toString());\n map = new String[maxR][maxC];\n\n for(int j = 0; j < maxR; j++) {\n line = fin.nextLine();\n for(int i = 0; i < maxC; i++){\n map[j][i] = (line.charAt(i)) + \"\";\n }\n }\n }", "public HeaderData get(String key){\r\n\t\treturn map.get(key);\r\n\t}", "private void loadMap(MultiHashMap map) {\n\r\n int numRows = sMapPairs.length;\r\n int maxCols = 0;\r\n for (int ii = 0; ii < sMapPairs.length; ii++) {\r\n if (sMapPairs[ii].length > maxCols) {\r\n maxCols = sMapPairs[ii].length;\r\n }\r\n }\r\n for (int ii = 0; ii < maxCols; ii++) {\r\n for (int jj = 0; jj < numRows; jj++) {\r\n if (ii < sMapPairs[jj].length) {\r\n map.put(sMapPairs[jj][ii].mKey, sMapPairs[jj][ii].mValue);\r\n //---------------------------------------------------------\r\n }\r\n }\r\n }\r\n assertTrue(map.size() == sMapPairs.length);\r\n }", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public static HashMap<String, Investor> readInvestorInfoFile(String fileName)\n\t\t\tthrows InvalidFileFormatException, IOException {\n\t\tFile csvFile = new File(fileName);\n\t\t// read the file only if it exists\n\t\tif (csvFile.isFile()) {\n\t\t\t// the row in the csv file\n\t\t\tString row = null;\n\t\t\tint indexRow = 0;\n\t\t\t// create BufferedReader and read data from csv\n\t\t\tBufferedReader csvReader = new BufferedReader(new FileReader(fileName));\n\t\t\ttry {\n\t\t\t\t// read the rest of the lines\n\t\t\t\tHashMap<String, Investor> tableInvestorInfo = new HashMap<String, Investor>();\n\t\t\t\twhile ((row = csvReader.readLine()) != null) {\n\t\t\t\t\tString[] data = row.split(\",\");\n\n\t\t\t\t\t// check the header at the first line (header)\n\t\t\t\t\tif (indexRow == 0) {\n\t\t\t\t\t\t// check if the column names\n\t\t\t\t\t\tif (!(data[0].equals(\"name\") && data[1].equals(\"targetRatio\"))) {\n\t\t\t\t\t\t\tthrow new InvalidFileFormatException(\n\t\t\t\t\t\t\t\t\t\"The column names of the file is invalid.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindexRow++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// for the rest of the rows\n\t\t\t\t\t// - create the transaction node for each row\n\t\t\t\t\tString name = data[0];\n\t\t\t\t\tdouble targetRatio = Double.valueOf(data[1]);\n\n\t\t\t\t\t// add the row data to the hash table\n\t\t\t\t\tInvestor investorInfo = new Investor(name, targetRatio);\n\t\t\t\t\ttableInvestorInfo.put(name, investorInfo);\n\t\t\t\t\tindexRow++;\n\t\t\t\t}\n\t\t\t\t// return the table\n\t\t\t\treturn tableInvestorInfo;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IOException(\"IO Exception occured while reading the file at line \"\n\t\t\t\t\t\t+ String.valueOf(indexRow) + \" in: \" + fileName);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tthrow new InvalidFileFormatException(\n\t\t\t\t\t\t\"The format of the file at line \" + String.valueOf(indexRow)\n\t\t\t\t\t\t\t\t+ \" is invalid,i.e.,\" + row + \" in: \" + fileName);\n\t\t\t} finally {\n\t\t\t\t// close the reader\n\t\t\t\tcsvReader.close();\n\t\t\t}\n\t\t} else\n\n\t\t{\n\t\t\tthrow new FileNotFoundException(\n\t\t\t\t\t\"The file you attempted to read does not exist or is not a valid file: \"\n\t\t\t\t\t\t\t+ fileName);\n\t\t}\n\t}", "public void sortbykey(HashMap map1)\n {\n TreeMap<Integer, File> sorted = new TreeMap<>();\n\n // Copy all data from hashMap into TreeMap\n sorted.putAll(map1);\n\n // Display the TreeMap which is naturally sorted\n for (Map.Entry<Integer, File> entry : sorted.entrySet())\n System.out.println(\"Key = \" + entry.getKey() +\n \", Value = \" + entry.getValue());\n }", "public void read () throws IOException, ClassNotFoundException {\n BufferedReader reader = FileManager.getReader\n (JerboaProperties.getString(\"KeyFeatureContainer.filename\"));\n double kThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.keyThreshold\",0.0);\n double fThreshold = JerboaProperties.getDouble(\"KeyFeatureContainer.featureThreshold\",0.0);\n\n String line;\n String[] tokens;\n double x;\n line = reader.readLine();\n tokens = line.split(\"\\\\t\");\n \n sf = Double.parseDouble(tokens[2]);\n\n while ((line = reader.readLine()) != null) {\n tokens = line.split(\"\\\\t\");\n if (tokens.length == 2) {\n if ((! filterKeys) || kTable.containsKey(tokens[0])) {\n x = Double.parseDouble(tokens[1]);\n if (x >= kThreshold)\n kTable.put(tokens[0],x);\n else if (filterKeys)\n kTable.remove(tokens[0]);\n }\n } else {\n x = Double.parseDouble(tokens[1]);\n if (x >= fThreshold) {\n kfTable.put(tokens[0],x);\n fTable.put(tokens[0],Double.parseDouble(tokens[2]));\n }\n }\n }\n }", "public static HashMap<String, String> getCSVRow(int rowNumber) {\n\t\tString COMMA_DELIMITER = \",\";\n\t\ttry {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\".\\\\CSVFiles\\\\C2ImportCalEventSample.csv\"));\n\n\t\t\tHashMap<String, String> map = new HashMap<>();\n\n\t\t\tString line = \"\";\n\t\t\tint header = 0;\n\t\t\t\n\t\t\t// Reading header\n\t\t\tline = br.readLine();\n\t\t\t\n\t\t\tString[] row = line.split(COMMA_DELIMITER);\n\t\t\t\n\t\t\tint l = 1;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\n\n\t\t\t\tif (l == rowNumber) {\n\t\t\t\t\tString[] row1 = line.split(COMMA_DELIMITER);\n\n\t\t\t\t\tif (row1.length >= 0) {\n\t\t\t\t\t\tint i = 0;\n\t\t\t\t\t\tfor (String cell : row) {\n\t\t\t\t\t\t\tmap.put(row[i].trim().toLowerCase(), row1[i].trim().toLowerCase());\n\t\t\t\t\t\t\t//System.out.println(\"row[\" + i + \"]=\" + row[i]);\n\t\t\t\t\t\t\t//System.out.println(\"row1[\" + i + \"]=\" + row1[i]);\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn map;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tl++;\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn null;\n\n\t}", "Map<String, String> readAttrs(Map<String, Object> pRqVs,\n Reader pReader) throws Exception;", "private void processFileEntries(final File filePath, Map<String, Integer> bigramHistogramMap) {\n\n BufferedInputStream bis = null;\n FileInputStream fis = null;\n\n try {\n\n // create FileInputStream object\n fis = new FileInputStream(filePath);\n\n // create object of BufferedInputStream\n bis = new BufferedInputStream(fis);\n\n String stringLine;\n\n BufferedReader br = new BufferedReader(new InputStreamReader(bis));\n\n String previousWord = \"\";\n\n while ((stringLine = br.readLine()) != null) {\n previousWord = addBigramHistogramEntry(stringLine, previousWord, bigramHistogramMap);\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found - \" + e);\n } catch (IOException ioe) {\n System.out.println(\"Exception while reading file - \" + ioe);\n } catch (Exception e) {\n System.out.println(\"Unable to load: \" + filePath.getName());\n } finally {\n // close the streams using close method\n try {\n if (fis != null) {\n fis.close();\n }\n if (bis != null) {\n bis.close();\n }\n } catch (IOException ioe) {\n System.out.println(\"Error while closing stream : \" + ioe);\n }\n }\n }", "@Test\n public void testScan() throws IOException {\n Reader reader = new Reader(fs.open(path), fs.getFileStatus(path).getLen(), conf);\n Assert.assertFalse(reader.isSorted());\n Assert.assertEquals(((int) (reader.getEntryCount())), 4);\n Scanner scanner = reader.createScanner();\n try {\n // read key and value\n byte[] kbuf = new byte[TestTFileUnsortedByteArrays.BUF_SIZE];\n int klen = scanner.entry().getKeyLength();\n scanner.entry().getKey(kbuf);\n Assert.assertEquals(new String(kbuf, 0, klen), \"keyZ\");\n byte[] vbuf = new byte[TestTFileUnsortedByteArrays.BUF_SIZE];\n int vlen = scanner.entry().getValueLength();\n scanner.entry().getValue(vbuf);\n Assert.assertEquals(new String(vbuf, 0, vlen), \"valueZ\");\n scanner.advance();\n // now try get value first\n vbuf = new byte[TestTFileUnsortedByteArrays.BUF_SIZE];\n vlen = scanner.entry().getValueLength();\n scanner.entry().getValue(vbuf);\n Assert.assertEquals(new String(vbuf, 0, vlen), \"valueM\");\n kbuf = new byte[TestTFileUnsortedByteArrays.BUF_SIZE];\n klen = scanner.entry().getKeyLength();\n scanner.entry().getKey(kbuf);\n Assert.assertEquals(new String(kbuf, 0, klen), \"keyM\");\n } finally {\n scanner.close();\n reader.close();\n }\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "public static Hashtable<String, Vector<String>> getMetaData3(String tablename) {\n\t\tHashtable<String, Vector<String>> temp = new Hashtable<String, Vector<String>>();\n\t\tBufferedReader fileReader = null;\n\t\tString[] array;\n\n\t\ttry {\n\t\t\tString l = \"\";\n\t\t\tfileReader = new BufferedReader(new FileReader(\"src/main/resources/metadata.csv\"));\n\t\t\twhile ((l = fileReader.readLine()) != null) {\n\t\t\t\tVector<String> v = new Vector<>();\n\t\t\t\tarray = l.split(\",\");\n\t\t\t\tif (array[0].equals(tablename)) {\n\t\t\t\t\tv.add(array[5]);\n\t\t\t\t\tv.add(array[6]);\n\t\t\t\t\ttemp.put(array[1], v);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic VariableMapReader(String sdgFile) throws IOException {\n\t\tObjectInputStream defStream = new ObjectInputStream(new FileInputStream(new File(sdgFile+\"_def\")));\n\t\tObjectInputStream useStream = new ObjectInputStream(new FileInputStream(new File(sdgFile+\"_use\")));\n\t\tObjectInputStream modStream = new ObjectInputStream(new FileInputStream(new File(sdgFile+\"_mod\")));\n\t\tObjectInputStream refStream = new ObjectInputStream(new FileInputStream(new File(sdgFile+\"_ref\")));\n\t\tObjectInputStream ptoStream = new ObjectInputStream(new FileInputStream(new File(sdgFile+\"_pto\")));\n\n\t\ttry {\n\t\t\tdef = (Map<Integer, Set<Integer>>) defStream.readObject();\n\t\t\tuse = (Map<Integer, Set<Integer>>) useStream.readObject();\n\t\t\tmod = (Map<Integer, Set<Integer>>) modStream.readObject();\n\t\t\tref = (Map<Integer, Set<Integer>>) refStream.readObject();\n\t\t\tpto = (Map<Integer, Set<Integer>>) ptoStream.readObject();\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tdefStream.close();\n\t\tuseStream.close();\n\t\tmodStream.close();\n\t\trefStream.close();\n\t\tptoStream.close();\n\t}", "public static void main(String[] args) {\n ReadMappings rs = new ReadMappings();\n try {\n Hashtable result = rs.getMappingsFromFile();\n Enumeration en = result.elements();\n while(en.hasMoreElements()) {\n System.out.println(en.nextElement());\n }\n\n System.out.println(\"Pons:\"+result.get(\"Pons\"));\n System.out.println(\"Hypothalamus:\"+result.get(\"Hypothalamus\"));\n System.out.println(\"Medulla:\"+result.get(\"Medulla\"));\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "private Object deserializeMap(Object datum, Schema fileSchema, Schema mapSchema, MapTypeInfo columnType)\n throws AvroSerdeException {\n Map<String, Object> map = new HashMap<String, Object>();\n Map<CharSequence, Object> mapDatum = (Map)datum;\n Schema valueSchema = mapSchema.getValueType();\n TypeInfo valueTypeInfo = columnType.getMapValueTypeInfo();\n for (CharSequence key : mapDatum.keySet()) {\n Object value = mapDatum.get(key);\n map.put(key.toString(), worker(value, fileSchema == null ? null : fileSchema.getValueType(),\n valueSchema, valueTypeInfo));\n }\n\n return map;\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic synchronized Hashtable<Object,Object> loadTable() \n\t{\n\t\tHashtable<Object,Object> ht = null ;\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(tableFile);\n\t\t\t\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\t// Unchecked cast\n\t\t\thtRecords = (Hashtable<Object,Object>) ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// throw new DatabaseException(\"Cannot load : FileNotFoundException\",e);\n\t\t htRecords = new Hashtable<Object,Object>(); // Void Hashtable\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"Cannot load : IOException\",e);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tthrow new RuntimeException(\"Cannot load : ClassNotFoundException\",e);\n\t\t}\n\t\treturn ht ;\n\t}", "public static void readMap(Scanner scanner) {\n // getting the pair of nodes from the input until an empty line is found\n while (true) {\n // read the current line of input\n String line = scanner.nextLine();\n // break the loop when the line is empty\n if (line.equals(\"\")) {\n break;\n }\n readLine(line);\n }\n }", "public void importTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length - 1; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tString[] entriesMinusLastModified = new String[entries.length - 1];\r\n\t\t\t\tfor (int i = 0; i < entriesMinusLastModified.length; i++) {\r\n\t\t\t\t\tentriesMinusLastModified[i] = entries[i];\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(\r\n\t\t\t\t\t\t\tentriesMinusLastModified[i])) {\r\n\t\t\t\t\t\tentriesMinusLastModified[i] = \"--\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entriesMinusLastModified);\r\n\t\t\t\ttable.getAttributes(table.getAttributeNumber() - 1).\r\n\t\t\t\tchangeField(table.getLines() - 1, entries[entries.length - 1]);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "void parseMap(String mapData)\n {\n try {\n \n StringTokenizer\tst = new StringTokenizer(mapData);\n \n int\t\tsizeX, sizeY;\n int\t\tx = 0;\n int\t\ty = 0;\n int\t\te;\n char\tt;\n \n // Get the size of the map\n sizeX = Integer.parseInt(st.nextToken());\n sizeY = Integer.parseInt(st.nextToken());\n \n map = new MUXMap(sizeX, sizeY);\n \n // Loop thru each line\n while (st.hasMoreTokens())\n {\n String\t\t\tthisLine = st.nextToken();\n \n // Think the map is over if we hit this thing\n if (thisLine.equals(\"-1\") || thisLine.startsWith(\"-1 \"))\n break;\n \n for (x = 0; x < sizeX * 2; x+=2)\n {\n // Get terrain and elevation, then set the data in the map\n t = thisLine.charAt(x);\n e = Character.digit(thisLine.charAt(x + 1), 10);\n map.setHex(x/2, y, t, e);\n }\n \n // One more line down in y\n y++;\n } \n } catch (Exception e) {\n System.out.println(\"Error: readMap: \" + e);\n }\n \n }", "public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void parseWritable(final DataInputStream in) throws IOException {\n // First clear the map. Otherwise we will just accumulate entries every time this method is called.\n this.map.clear();\n // Read the number of entries in the map\n int entries = in.readInt();\n // Then read each key/value pair\n for (int i = 0; i < entries; i++) {\n byte[] key = Bytes.readByteArray(in);\n // We used to read a byte that encoded the class type. Read and ignore it because it is always byte [] in hfile\n in.readByte();\n byte[] value = Bytes.readByteArray(in);\n this.map.put(key, value);\n }\n }", "public void loadMap(String filepath) {\n\n\t\ttry {\n\n\t\t\tInputStream in = getClass().getResourceAsStream(filepath);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\n\n\t\t\tnumCols = Integer.parseInt(br.readLine());\n\t\t\tnumRows = Integer.parseInt(br.readLine());\n\t\t\tmap = new int[numRows][numCols];\n\t\t\twidth = numCols * tileSize;\n\t\t\theight = numRows * tileSize;\n\n\t\t\tString delims = \"\\\\s+\";\n\t\t\tfor (int row = 0; row < numRows; row++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tString[] tokens = line.split(delims);\n\t\t\t\tfor (int col = 0; col < numCols; col++) {\n\t\t\t\t\tmap[row][col] = Integer.parseInt(tokens[col]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static Map readMap(MapName s)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n System.out.println(s.toString());\n Scanner mapReader = new Scanner(run.getClass().getResourceAsStream(\"/\"+s.toString()+\".jwmap\"));\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "public void map(LongWritable key, Text value, Context context)\n\t\t\tthrows InterruptedException, IOException {\n\t\tString line = value.toString();\n\n\t\tHashMap<String, String> fields = parseXml.getXmlTags(line);\n \n String fileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n String shortName = fileName.substring(fileName.length()-7, fileName.length()-4);\n \n\t\thKey.set(shortName.getBytes());\n\n\t\tSet set = fields.entrySet();\n\t \n\t Iterator i = set.iterator();\n\t \n\t while(i.hasNext()) {\n\t Map.Entry me = (Map.Entry)i.next();\n\t \n\t\t if (me.getKey().equals(\"0\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JAN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"1\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_FEB.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"2\")) {\n\t\t \tkv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t \tif (me.getKey().equals(\"3\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_APR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"4\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAY.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"5\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"6\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUL.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"7\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_AUG.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"8\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_SEP.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"9\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_OCT.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"10\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_NOV.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"11\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_DEC.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n }\n\t }\n\t}", "private static void readMMap(File file) throws IOException {\n FileChannel channel = new RandomAccessFile(file, \"rw\").getChannel();\n MappedByteBuffer mmap = channel.map(FileChannel.MapMode.READ_WRITE, N, N);\n //mmap.load();\n byte[] buf = new byte[CHUNK];\n long t = System.nanoTime();\n for (int i = 0; i < N/CHUNK; i++) {\n mmap.get(buf);\n }\n System.out.println((System.nanoTime() - t) / 1_000_000 + \" ms \" + mmap.position() + \" bytes\");\n\n channel.close();\n }", "public static HashMap<String, String> processCSVVocabs(String path) throws FileNotFoundException {\n HashMap<String, String> ontoAndTest = new HashMap<>();\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n\n String currentLine;\n int lineN = 0;\n String ontology=\"\";\n String test=\"\";\n String name=\"\";\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n ontology = info[0];\n test = info[1];\n ontoAndTest.put(ontology,test);\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return ontoAndTest;\n }" ]
[ "0.69518566", "0.6177252", "0.6031397", "0.5846899", "0.57023716", "0.56148374", "0.55720246", "0.5570892", "0.55207837", "0.55141234", "0.5478345", "0.54592294", "0.54460496", "0.5432972", "0.5423086", "0.540132", "0.53681934", "0.5359234", "0.53506154", "0.5344526", "0.5336012", "0.5324182", "0.5309804", "0.53032255", "0.530106", "0.52875876", "0.5269357", "0.52613115", "0.52517676", "0.52352", "0.5215895", "0.5214192", "0.52007735", "0.51972663", "0.5151311", "0.51510566", "0.5133147", "0.50953394", "0.509048", "0.5074661", "0.50686824", "0.5064267", "0.5048637", "0.5030033", "0.50261295", "0.5021667", "0.5016069", "0.5014669", "0.49906835", "0.49900144", "0.49816555", "0.4978655", "0.4977292", "0.49692258", "0.4952823", "0.49526975", "0.49306735", "0.49237713", "0.48884898", "0.48767647", "0.48674056", "0.4865522", "0.48633748", "0.48605508", "0.48574868", "0.48487973", "0.4844324", "0.48431748", "0.48249876", "0.4810195", "0.4803095", "0.47962397", "0.4793322", "0.4792259", "0.47863775", "0.4783611", "0.47801876", "0.4767395", "0.47618106", "0.47585723", "0.47566703", "0.47463554", "0.47343963", "0.47169966", "0.4714701", "0.47068098", "0.46922803", "0.46775708", "0.46775648", "0.46767578", "0.46717185", "0.46627146", "0.46595407", "0.4652811", "0.46443218", "0.46332222", "0.46316677", "0.4630113", "0.46137288", "0.46085724" ]
0.68415666
1
Read a string set from a tabdelimited file with headers. The strings to be put in the set are taken from the specified column.
public static Set<String> readSet(File inFile, String column) throws IOException { Set<String> retVal = new HashSet<String>(); try (TabbedLineReader reader = new TabbedLineReader(inFile)) { reader.readIntoSet(column, retVal); } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Set<String> readSet(InputStream inStream, String column) throws IOException {\n Set<String> retVal = new HashSet<String>();\n try (TabbedLineReader reader = new TabbedLineReader(inStream)) {\n reader.readIntoSet(column, retVal);\n }\n return retVal;\n }", "private void readIntoSet(String column, Set<String> retVal) throws IOException {\n int idx = this.findField(column);\n for (TabbedLineReader.Line line : this) {\n String value = line.get(idx);\n retVal.add(value);\n }\n }", "public static List<String> readColumn(File inFile, String string) throws IOException {\n List<String> retVal = new ArrayList<String>(100);\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int inCol = inStream.findField(string);\n for (TabbedLineReader.Line line : inStream)\n retVal.add(line.get(inCol));\n }\n return retVal;\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "Set<String> readData();", "public static Set readingFiles(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n\n return lines.collect(Collectors.toSet());//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n\n //set.forEach(System.out::print);\n\n\n }", "public void filterTsv() throws IOException {\n\t\tList<List<String>> rows = new ArrayList<>();\n\t\tList<String> cols = new ArrayList<String>();\n\t\tList<String> head = new ArrayList<String>();\n\n\t\ttry {\n\t\t\tbuf = new BufferedReader(new FileReader(inputFile)); \n\t\t\t\n\t\t\t// determine which column to filter based on columnMap\n\t\t\tString strRead = buf.readLine();\n\t\t\tString[] myline = strRead.split(\"\\t\");\n\n\t\t\tfor (int i = 0; i < myline.length; i++) {\n\t\t\t\tString mappedValue = columnMap.get(myline[i]);\n\t\t\t\tif (mappedValue != null) {\n\t\t\t\t\tcolIndex.add(i);\n\t\t\t\t\thead.add(mappedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\trows.add(head);\n\n\t\t\twhile ((strRead = buf.readLine()) != null) {\n\t\t\t\tcols = new ArrayList<String>();\n\t\t\t\tmyline = strRead.split(\"\\t\");\n\t\t\t\t\n\t\t\t\t//skip row if not in rowMap\n\t\t\t\tif (rowMap.get(myline[0]) == null)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tfor (Integer index : colIndex) {\n\t\t\t\t\tif (index < myline.length) {\n\t\t\t\t\t\tif (index == 0)\n\t\t\t\t\t\t\tcols.add(rowMap.get(myline[0]));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcols.add(myline[index]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trows.add(cols);\n\t\t\t}\n\n\t\t\twriteTsv(rows, outputFile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tbuf.close();\n\t\t}\n\t}", "void makeSet(BufferedReader br) throws Exception {\n\t\tString[] parts = null;\n\t\tint i;\n\t\tfor (String line; (line = br.readLine()) != null;) {\n\t\t\tparts = eatquotedStrings(line);\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tparts[i] = parts[i].replaceAll(\"\\\"\", \"\");\n\t\t\t}\n\t\t\tset.add(parts[0]);\n\t\t}\n\t\tbr.close();\n\t}", "public void readFileInHashSet() throws IOException {\n\t\tFileReader fileR = new FileReader(MOCK_DATAPath);\n\t\tBufferedReader buffR = new BufferedReader(fileR);\n\t\tcitiesSet = new HashSet<>();\n\t\tcountriesSet = new HashSet<>();\n\t\tString line = \"\";\n\t\twhile ((line = buffR.readLine()) != null) {\n\t\t\tString tempWithComma = line;\n\t\t\tString tempOutComma[] = tempWithComma.split(\",\");\n\t\t\tcitiesSet.add(tempOutComma[0]);\n\t\t\tcountriesSet.add(tempOutComma[1]);\n\t\t}\n\t}", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "public Set<String> readFile(File file)throws IOException{\n Scanner scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n Set<String> data = new HashSet<>();\n\n while(scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n return data;\n }", "public static void readTable(String tableName, String filename) {\n\n\t\t// System.out.println(filename);\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + filename));\n\n\t\t\twhile (true) {\n\n\t\t\t\tString line = in.readLine();\n\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// remove | at end for tokenization\n\t\t\t\tline = line.substring(0, line.length() - 1);\n\n\t\t\t\t// line into tokens\n\t\t\t\tString[] tokens = line.split(attributeDelimiter);\n\t\t\t\tint numAttributes = tokens.length;\n\n\t\t\t\tassert (tokens.length == tableNameToOrdredSchema.get(tableName)\n\t\t\t\t\t\t.size());\n\n\t\t\t\tObject[] arr = new Object[numAttributes];\n\n\t\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\n\t\t\t\t\tClass<?> type = tableNameToOrdredSchema.get(tableName).get(\n\t\t\t\t\t\t\ti).getType().getCorrespondingJavaClass();\n\t\t\t\t\tObject val = null;\n\n\t\t\t\t\tif (type.isAssignableFrom(String.class)) {\n\t\t\t\t\t\tval = tokens[i];\n\t\t\t\t\t} else if (type.isAssignableFrom(java.util.Date.class)) {\n\t\t\t\t\t\tval = new java.util.Date(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Integer.class)) {\n\t\t\t\t\t\tval = Integer.parseInt(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Double.class)) {\n\t\t\t\t\t\tval = Double.parseDouble(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Long.class)) {\n\t\t\t\t\t\tval = Long.parseLong(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Float.class)) {\n\t\t\t\t\t\tval = Float.parseFloat(tokens[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Type problem\");\n\t\t\t\t\t}\n\n\t\t\t\t\tarr[i] = val;\n\n\t\t\t\t}\n\n\t\t\t\tSampleRow row = new SampleRow(tableNameToOrdredSchema\n\t\t\t\t\t\t.get(tableName), arr);\n\n\t\t\t\tmyDatabase.getQueryInterface().insertRow(tableName, row);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static List<String> loadGenericDfFile(String file) throws IOException{\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file), \"UTF-8\"));\n\t\ttry {\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tlines.add(str);\n\t\t\t}\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\n\t\treturn lines;\n\t}", "@Test public void testStrings() {\n Frame fr = null;\n try {\n fr = parseTestFile(\"smalldata/junit/string_test.csv\");\n\n //check dimensions\n int nlines = (int)fr.numRows();\n Assert.assertEquals(65005,nlines);\n Assert.assertEquals(7,fr.numCols());\n\n //check column types\n Vec[] vecs = fr.vecs();\n Assert.assertTrue(vecs[0].isString());\n Assert.assertTrue(vecs[1].isString());\n Assert.assertTrue(vecs[2].isString());\n Assert.assertTrue(vecs[3].isString());\n Assert.assertTrue(vecs[4].isString());\n Assert.assertTrue(vecs[5].isString());\n Assert.assertTrue(vecs[6].isString());\n\n //checks column counts - expects MAX_CATEGORICAL_COUNT == 65000\n //Categorical registration is racy so actual categorical limit can exceed MAX by a few values\n Assert.assertTrue(65003 <= vecs[0].nzCnt()); //ColV2 A lacks starting values\n Assert.assertTrue(65002 <= vecs[1].nzCnt()); //ColV2 B has random missing values & dble quotes\n Assert.assertTrue(65005 <= vecs[2].nzCnt()); //ColV2 C has all values & single quotes\n Assert.assertTrue(65002 <= vecs[3].nzCnt()); //ColV2 D missing vals just prior to Categorical limit\n Assert.assertTrue(65003 <= vecs[4].nzCnt()); //ColV2 E missing vals just after Categorical limit hit\n //Assert.assertTrue(65000 <= vecs[5].domain().length); //ColV2 F cardinality just at Categorical limit\n Assert.assertTrue(65003 <= vecs[6].nzCnt()); //ColV2 G missing final values\n\n //spot check value parsing\n BufferedString str = new BufferedString();\n Assert.assertEquals(\"A2\", vecs[0].atStr(str, 2).toString());\n Assert.assertEquals(\"B7\", vecs[1].atStr(str, 7).toString());\n Assert.assertEquals(\"'C65001'\", vecs[2].atStr(str, 65001).toString());\n Assert.assertEquals(\"E65004\", vecs[4].atStr(str, 65004).toString());\n Assert.assertNull(vecs[6].atStr(str, 65004));\n\n fr.delete();\n } finally {\n if( fr != null ) fr.delete();\n }\n }", "public CharTest (String filename) {\n\t\ttable = new Hashtable<>();\n\t\ttry {\n\t\t\tReader reader = new FileReader(filename);\n\t\t\tScanner s = new Scanner(reader);\n\t\t\t//sortTable = new String[s.];\n\t\t\tint count = 1; \n\t\t\twhile (s.hasNextLine()) {\n\t\t\t\tString str = s.nextLine();\n\t\t\t\ttable.put(count,str);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\ts.close();\n\t\t\tsortAlphabetical();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"failed file import\");\n\t\t}\n\t}", "private static Set<String> readFromFile(String fileName)\n\t{\n\t\tSet<String> words = new HashSet<String> ();\n\t\ttry \n\t\t{\n\t\t\tScanner scanner = new Scanner(new File(fileName));\n\t\t\twhile (scanner.hasNext())\n\t\t\t{\n\t\t\t\tString word = scanner.nextLine();\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\treturn words;\n\t\t}\n\t\treturn words;\n\t}", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "public Set<String> loadWordsFromCSV(final String filePath) {\n\t\treturn loadWords(filePath, \",\");\n\t}", "public Set<String> getColumns();", "private void readStringCells( InputStream istrm ) throws IOException {\n PushbackInputStream stream =\n new PushbackInputStream( new BufferedInputStream( istrm ) );\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n endRow();\n break;\n case '#':\n if ( rows.size() == 0 ) {\n comments.add( eatLine( stream ) );\n }\n else {\n eatLine( stream );\n }\n endRow();\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n addCell( readString( stream ) );\n break;\n case END:\n done = true;\n endRow();\n break;\n default:\n stream.unread( c );\n addCell( readToken( stream ) );\n }\n }\n stream.close();\n }", "public static Hashtable<String, Vector<String>> getMetaData3(String tablename) {\n\t\tHashtable<String, Vector<String>> temp = new Hashtable<String, Vector<String>>();\n\t\tBufferedReader fileReader = null;\n\t\tString[] array;\n\n\t\ttry {\n\t\t\tString l = \"\";\n\t\t\tfileReader = new BufferedReader(new FileReader(\"src/main/resources/metadata.csv\"));\n\t\t\twhile ((l = fileReader.readLine()) != null) {\n\t\t\t\tVector<String> v = new Vector<>();\n\t\t\t\tarray = l.split(\",\");\n\t\t\t\tif (array[0].equals(tablename)) {\n\t\t\t\t\tv.add(array[5]);\n\t\t\t\t\tv.add(array[6]);\n\t\t\t\t\ttemp.put(array[1], v);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t}", "default String[][] txtReader(String fileString) {\n\t\ttry {\n\t\t\tScanner myReader = new Scanner(new File(fileString));\n\t\t\tArrayList<String[]> lines = new ArrayList<>();\n\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString[] splitted = myReader.nextLine().split(\" \");\n\t\t\t\tlines.add(splitted);\n\t\t\t}\n\n\t\t\tString[][] result = new String[lines.size()][];\n\t\t\tfor (int i = 0; i < result.length; i++) {\n\t\t\t\tresult[i] = lines.get(i);\n\t\t\t}\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file is not occurred \" + e.getMessage());\n\t\t}\n\t\treturn null;\n\n\t}", "private void addTypedStrings(Set<String> set, String hdr) {\n BundlesG globals = getRTParent().getRootBundles().getGlobals(); Set<String> to_add = new HashSet<String>();\n\tSet<BundlesDT.DT> datatypes = globals.getFieldDataTypes(globals.fieldIndex(hdr));\n\n // In transformed datatypes (e.g., dstip|ORG), the datatypes lookup fails and a null is returned. I'm\n // unsure if the following will further break the selection/filtered data views -- the underlying assumption\n // in the original implementation was that all of the entities were strongly typed... however, for IP Org\n // lookups, this is clearly not the case.\n if (datatypes == null) return;\n\n\tIterator<BundlesDT.DT> it_dt = datatypes.iterator();\n\twhile (it_dt.hasNext()) {\n\t BundlesDT.DT dt = it_dt.next();\n\t Iterator<String> it = set.iterator();\n while (it.hasNext()) {\n\t String str = it.next();\n\t if (BundlesDT.stringIsType(str, dt)) to_add.add(hdr + BundlesDT.DELIM + str);\n\t }\n\t}\n\tset.addAll(to_add);\n }", "public static LinkedList<Patient> TSVImport(String str) {\n\t\treturn TSVImport(new File(str));\n\t}", "private void synsetParse(String line) {\n String[] tokens = line.split(\",\");\n Integer key = Integer.parseInt(tokens[0]);\n ArrayList<String> al = new ArrayList<String>();\n String[] words = tokens[1].split(\" \");\n for (String w : words) {\n al.add(w);\n nounSet.add(w); // build nounSet at the same time\n }\n synsetMap.put(key, al);\n }", "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "public void importUserMadeTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tfor (int i = 0; i < entries.length; i++) {\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(entries[i]))\r\n\t\t\t\t\t\tentries[i] = \"--\";\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entries);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "public Table readTable(String pathName, String filename){\n File file = new File(pathName + filename);\n Table newTable = null;\n Scanner sc; \n //foreign key aspects\n Boolean hasForeignKey = false;\n ArrayList<String> FKIndex; \n String[] line; \n String primaryTableName = \"\", primaryColName = \"\", colName = \"\"; \n String name = \"\";\n\n try {\n sc = new Scanner(file);\n } catch(FileNotFoundException ex) {\n System.out.println(\"ERROR: file not found\");\n return null;\n }\n\n //get table name - always first line\n if (sc.hasNextLine()){\n name = sc.nextLine();\n }\n\n FKIndex = getForeignKeyIndex(pathName);\n //loop over all rows in FKIndex, and check if table has a foreign key\n if(!FKIndex.isEmpty()){\n for(int i = 0; i < FKIndex.size(); i++){\n line = FKIndex.get(i).split(\"\\\\s\"); \n if (line[2].equals(name)){\n hasForeignKey = true;\n primaryTableName = line[0];\n primaryColName = line[1];\n colName = line[3];\n }\n }\n }\n\n //get col names - always second line\n if (sc.hasNextLine()){\n String colNamesString = sc.nextLine();\n //split colNames into individual words as Strings based on whitespace\n String[] colNames = colNamesString.split(\"\\\\s\");\n\n //make table with column names\n if (hasForeignKey){\n newTable = new Table(name, primaryTableName, primaryColName, colName, true, colNames);\n } else {\n newTable = new Table(name, colNames);\n }\n\n //add rows from file (each line)\n while(sc.hasNextLine()){\n String newRowString = sc.nextLine();\n String[] newRow = newRowString.split(\"\\\\s\");\n newTable.addRow(newRow);\n }\n }\n\n sc.close();\n return newTable;\n }", "Set<String> getInterpetAsTrueStrings(int columnIndex);", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "public void initFromRows(SimpleIterator<String> lines) {\n this.reset();\n int rowId = 0;\n Optional<String> lineOpt;\n Int2ObjectMap<IntArrayList> colsMap = new Int2ObjectOpenHashMap<>();\n int maxColId = -1;\n while (true) {\n lineOpt = lines.next();\n if (!lineOpt.isPresent()) {\n break;\n } else {\n String line = lineOpt.get().trim();\n if (!line.isEmpty()) {\n String[] tokens = line.split(\"\\\\s+\");\n int[] row = new int[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n int colId = Integer.parseInt(tokens[i]) - 1; // convert to 0-based\n if (colId < 0) {\n throw new RuntimeException(\n String.format(\n \"Column %d smaller than 1, in line number %d, line:'%s'\",\n colId + 1, rowId + 1, line\n )\n );\n }\n row[i] = colId;\n if (!colsMap.containsKey(colId)) {\n colsMap.put(colId, new IntArrayList());\n }\n colsMap.get(colId).add(rowId);\n if (colId > maxColId) {\n maxColId = colId;\n }\n }\n Arrays.sort(row);\n this.rows[rowId] = row;\n }\n rowId++;\n if (rowId > this.numRows) {\n throw new RuntimeException(\n \"More rows in input rows file than the expected \" + this.numRows\n );\n }\n }\n }\n if (maxColId > this.numCols) {\n this.numCols = maxColId + 1;\n this.cols = new IntSet[this.numCols];\n }\n for (int colId = 0; colId < this.numCols; colId++) {\n if (colsMap.containsKey(colId) && !colsMap.get(colId).isEmpty()) {\n this.cols[colId] = new IntOpenHashSet(colsMap.get(colId));\n } else {\n this.cols[colId] = new IntOpenHashSet();\n }\n }\n }", "public static void readHistoricalData(String fileName, TeamSet teamSet) throws IOException{\n\t\tScanner input = new Scanner(new File(fileName));\n\t\tString data = input.nextLine();\n\t\twhile(!data.contains(\",,,,\")) {\n\t\t\t//Read the game data for each ncaa game, send in each line and the teamset\n\t\t\treadGameData(data, teamSet);\n\t\t\tdata = input.nextLine();\n\t\t}\n\t}", "public static void getAlternateSpellings\r\n\t(\r\n\t\tReader reader ,\r\n\t\tMap<String, String> map ,\r\n\t\tSet<String> set\r\n\t)\r\n\t\tthrows IOException\r\n\t{\r\n\t\tString[] tokens;\r\n\r\n BufferedReader bufferedReader\t=\r\n \tnew BufferedReader( reader );\r\n\r\n\t\tString inputLine\t\t\t\t= bufferedReader.readLine();\r\n\t\tString alternateSpelling;\r\n\t\tString standardSpelling;\r\n\r\n\t\twhile ( inputLine != null )\r\n\t\t{\r\n\t\t\ttokens\t\t= inputLine.split( \"\\t\" );\r\n\r\n\t\t\tif ( tokens.length > 1 )\r\n\t\t\t{\r\n\t\t\t\talternateSpelling\t= tokens[ 0 ];\r\n\t\t\t\tstandardSpelling\t= tokens[ 1 ];\r\n\r\n\t\t\t\tif ( !isDBNull( standardSpelling ) )\r\n\t\t\t\t{\r\n\t\t\t\t\talternateSpelling\t= alternateSpelling.trim();\r\n\t\t\t\t\tstandardSpelling\t= standardSpelling.trim();\r\n\r\n\t\t\t\t\tif ( map.get( alternateSpelling ) == null )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !alternateSpelling.endsWith( \"-\" ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmap.put( alternateSpelling , standardSpelling );\r\n\t\t\t\t\t\t\tset.add( standardSpelling );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Skipping line = <\" + inputLine + \">\" );\r\n\t\t\t}\r\n\r\n\t\t\tinputLine\t= bufferedReader.readLine();\r\n\t\t}\r\n\r\n\t\tbufferedReader.close();\r\n\t}", "@VisibleForTesting\n static Map<String, Set<String>> parseMtab(String mtab)\n throws IOException {\n Map<String, Set<String>> ret = new HashMap<>();\n BufferedReader in = null;\n Set<String> validCgroups =\n CGroupsHandler.CGroupController.getValidCGroups();\n\n try {\n FileInputStream fis = new FileInputStream(new File(mtab));\n in = new BufferedReader(new InputStreamReader(fis, \"UTF-8\"));\n\n for (String str = in.readLine(); str != null;\n str = in.readLine()) {\n Matcher m = MTAB_FILE_FORMAT.matcher(str);\n boolean mat = m.find();\n if (mat) {\n String path = m.group(1);\n String type = m.group(2);\n String options = m.group(3);\n\n if (type.equals(CGROUPS_FSTYPE)) {\n Set<String> cgroupList =\n new HashSet<>(Arrays.asList(options.split(\",\")));\n // Collect the valid subsystem names\n cgroupList.retainAll(validCgroups);\n ret.put(path, cgroupList);\n }\n }\n }\n } catch (IOException e) {\n if (Shell.LINUX) {\n throw new IOException(\"Error while reading \" + mtab, e);\n } else {\n // Ignore the error, if we are running on an os other than Linux\n LOG.warn(\"Error while reading \" + mtab, e);\n }\n } finally {\n IOUtils.cleanupWithLogger(LOG, in);\n }\n\n return ret;\n }", "private Set<String> parseStringToSet(final String data) {\n String[] splits;\n\n if (data != null && data.length() > 0) {\n splits = data.split(\",\");\n } else {\n splits = new String[] {};\n }\n\n Set<String> set = new HashSet<String>();\n if (splits.length > 0) {\n for (String split : splits) {\n set.add(split.trim());\n }\n }\n\n return set;\n }", "private int[] getColumnNumbers(String f, String t) throws Exception {\n\t\tint[] numbers = new int[2];\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString header = br.readLine();\n\t\tbr.close();\n\t\tString[] tokens = header.split(\"\\t\");\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (String token:tokens) {\n\t\t\tif (token.equalsIgnoreCase(t)) {\n\t\t\t\tnumbers[j] = i;\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn numbers;\n\t}", "public static Map<String, String> stringToHashtable(String file) {\r\n if (file == null) {\r\n return null;\r\n }\r\n\r\n String sansComments = eraseComments(file);\r\n int pos = 0, count = sansComments.length();\r\n Map<String, String> retval = new HashMap<String, String>();\r\n\r\n // Split the file, line by line, into key/value pairs\r\n while (pos < count) {\r\n int eol = offsetToEOL(sansComments, pos);\r\n int next = offsetToNextLine(sansComments, pos);\r\n if (eol > 0) {\r\n String line = sansComments.substring(pos, pos + eol);\r\n StringTokenizer st = new StringTokenizer(line, \"=\");\r\n String key = st.nextToken();\r\n String value = \"\";\r\n if (st.hasMoreTokens()) {\r\n value = st.nextToken();\r\n }\r\n\r\n // Place scalar values in the hashtable directly\r\n // otherwise break comma separated ones into Vectors.\r\n // If they can be, items are inserted as Doubles, failing\r\n // that, as Strings.\r\n // int comma = value.indexOf(\",\");\r\n // if (comma == -1) {\r\n // try {\r\n // retval.put(key, new Double(value));\r\n // } catch (NumberFormatException nfe) {\r\n retval.put(key, value);\r\n // } // endtry\r\n // } else {\r\n // Vector<Comparable> v = new Vector<Comparable>();\r\n // StringTokenizer values = new StringTokenizer(value, \",\");\r\n // while (values.hasMoreTokens()) {\r\n // String s = values.nextToken();\r\n // try {\r\n // v.addElement(new Double(s));\r\n // } catch (NumberFormatException nfe) {\r\n // v.addElement(s.trim());\r\n // } // endtry\r\n // } // endwhile\r\n // retval.put(key, v);\r\n // } // endif\r\n } // endif\r\n pos += next;\r\n } // endwhile\r\n\r\n return retval;\r\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "public Set<String> getEntry(String key){\n if(mTable == null )\n return new TreeSet<String>();\n if(mTable.containsKey(key)){\n return mTable.get(key);\n }\n return new TreeSet<String>();\n }", "public void importTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length - 1; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tString[] entriesMinusLastModified = new String[entries.length - 1];\r\n\t\t\t\tfor (int i = 0; i < entriesMinusLastModified.length; i++) {\r\n\t\t\t\t\tentriesMinusLastModified[i] = entries[i];\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(\r\n\t\t\t\t\t\t\tentriesMinusLastModified[i])) {\r\n\t\t\t\t\t\tentriesMinusLastModified[i] = \"--\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entriesMinusLastModified);\r\n\t\t\t\ttable.getAttributes(table.getAttributeNumber() - 1).\r\n\t\t\t\tchangeField(table.getLines() - 1, entries[entries.length - 1]);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "static TreeSet<Insertion> parseFile(String fn) throws IOException\n{\n\tTreeSet<Insertion> res = new TreeSet<>();\n\t@SuppressWarnings(\"resource\")\n\tScanner input = new Scanner(new FileInputStream(new File(fn)));\n\twhile(input.hasNext())\n\t{\n\t\tString line = input.nextLine();\n\t\tif(line.length() == 0 || line.charAt(0) == '#') continue;\n\t\tif(filter && svType == DELETE && !line.contains(\"SVTYPE=DEL\")) continue;\n\t\tif(filter && svType == INSERT && !line.contains(\"SVTYPE=INS\")) continue;\n\t\tInsertion cur = new Insertion(line);\n\t\tif(cur.length == 0) continue;\n\t\tres.add(new Insertion(line));\n\t}\n\treturn res;\n}", "public abstract ResultSet readTable(String tableName, String [] columns)\n throws SQLException;", "public abstract T readDataFile(String fileLine);", "private static void fillTableFromFile(HashTable table) {\n Scanner in;\n try {\n in = new Scanner(new FileInputStream(\"File.txt\"));\n } catch (FileNotFoundException e) {\n System.out.println(\"File 'File.txt' not found\");\n return;\n }\n while (in.hasNext()) {\n table.add(in.next());\n }\n }", "public void setRuleColumnSet(Set<String> ruleColumnSet) {\n this.ruleColumnSet = ruleColumnSet;\n }", "public static void countRowCol(){\n\t String line=\"\";\n\t row=0;\n\t col=0;\n try{\n Scanner reader = new Scanner(file);\n while(reader.hasNextLine()){\n row++;\n line=reader.nextLine();\n }\n reader.close();\n }catch (FileNotFoundException e) {\n \t e.printStackTrace();\n }\n String[] seperatedRow = line.split(\"\\t\");\n col=seperatedRow.length;\n\t}", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "public TabixReader(final String filename) throws IOException {\n\t\tthis(filename, filename+\".tbi\");\n\t}", "private static List<String> readData(String path) throws IOException{\n ArrayList<String> data = new ArrayList<>();\n try (\n Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);\n CSVReader csvReader = new CSVReader(reader)\n ){\n String[] nextRecord;\n while ((nextRecord = csvReader.readNext()) != null) {\n if (nextRecord[0].contains(\"name\")){\n System.out.println(\"Skipping column headers...\");\n }else {\n data.add(nextRecord[0]);\n// System.out.println(nextRecord[0]);\n }\n }\n }\n return data;\n }", "Set<String> getHeaderNames();", "static StringReader testData() {\n return new StringReader(\n \"@stboundedby, urn:ogc:def:crs:CRS:1.3:84, 2D, 50.23 9.23, 50.31 9.27, 2012-01-17T12:33:41Z, 2012-01-17T12:37:00Z, sec\\n\" +\n \"@columns, mfidref, trajectory, state,xsd:string, \\\"\\\"\\\"type\\\"\\\" code\\\",xsd:integer\\n\" +\n \"@foliation,Time\\n\" +\n \"a, 10, 150, 11.0 2.0 12.0 3.0, walking, 1\\n\" +\n \"b, 10, 190, 10.0 2.0 11.0 3.0, walking, 2\\n\" +\n \"a, 150, 190, 12.0 3.0 10.0 3.0\\n\" + // Omitted values are same as previous line.\n \"c, 10, 190, 12.0 1.0 10.0 2.0 11.0 3.0, vehicle, 1\\n\");\n }", "public TSETInfoTables parseXml(String fileName) { \n\t\ttry { \n\t\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); \n\t\t\tDocumentBuilder db = dbf.newDocumentBuilder(); \n\t\t\tDocument document = db.parse(fileName); \n\t\t\tNodeList TSETInfoTablesNodeList = document.getChildNodes(); \n\t\t\tNode TSETInfoTablesNode = TSETInfoTablesNodeList.item(0); \n\t\t\t//if (!columnNode.hasChildNodes()) continue;\n\t\t\t\n\t\t\t// pojo\n\t\t\tTSETInfoTables infoTables = new TSETInfoTables();\n\t\t\tList<MetaDB> metaDBList = new ArrayList<MetaDB>();\n\t\t\t//infoTables.setMetaDBList(metaDBList);\n\t\t\t\n\t\t\tNodeList metaDBNodeList = TSETInfoTablesNode.getChildNodes();\n\t\t\tfor (int i = 0; i < metaDBNodeList.getLength(); i++) { \n\t\t\t\tNode metaDBNode = metaDBNodeList.item(i);\n\t\t\t\t// tackle the CRLF character, otherwise it will be treated as a empty node.\n\t\t\t\tif (!metaDBNode.hasChildNodes()) continue;\n\t\t\t\tMetaDB metaDB = new MetaDB();\n\t\t\t\t//metaDBList.add(metaDB);\n\t\t\t\tthis.parseMetaDBAttribute(metaDBNode, metaDB);\n\t\t\t\tList<Table> tableList = new ArrayList<Table>();\n\t\t\t\t//metaDB.setTableList(tableList);\n\t\t\t\t\n\t\t\t\tNodeList tableNodeList = metaDBNode.getChildNodes(); \n\t\t\t\tfor (int j = 0; j < tableNodeList.getLength(); j++) { \n\t\t\t\t\tNode tableNode = tableNodeList.item(j); \n\t\t\t\t\tif (!tableNode.hasChildNodes()) continue;\n\t\t\t\t\tTable table = new Table();\n\t\t\t\t\t//tableList.add(table);\n\t\t\t\t\tthis.parseTableAttribute(tableNode, table);\n\t\t\t\t\tList<Column> columnList = new ArrayList<Column>();\n\t\t\t\t\t//table.setColumnList(columnList);\n\t\t\t\t\t\n\t\t\t\t\tNodeList columnNodeList = tableNode.getChildNodes(); \n\t\t\t\t\tfor (int k = 0; k < columnNodeList.getLength(); k++) { \n\t\t\t\t\t\tNode columnNode = columnNodeList.item(k);\n\t\t\t\t\t\tif (!columnNode.hasChildNodes()) continue;\n\t\t\t\t\t\t//this.parseAttribute(columnNode);\n\t\t\t\t\t\tColumn column = new Column();\n\t\t\t\t\t\t//columnList.add(column);\n\t\t\t\t\t\tthis.parseColumnAttribute(columnNode, column);\n\t\t\t\t\t\t\n\t\t\t\t\t\tNodeList columnContentNodeList = columnNode.getChildNodes();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int m = 0; m < columnContentNodeList.getLength(); m++) {\n\t\t\t\t\t\t\t//Node columnContent = columnContentList.item(m);\n\t\t\t\t\t\t\tNode columnContentNode = columnContentNodeList.item(m);\n\t\t\t\t\t\t\t// The CRLF character will be treated as a node, so using IF.\n\t\t\t\t\t\t\tif (columnContentNode.hasChildNodes()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (columnContentNode.getNodeName().equals(\"columnName\")) {\n\t\t\t\t\t\t\t\t\tcolumn.setName(columnContentNode.getTextContent());\n\t\t\t\t\t\t\t\t} else if (columnContentNode.getNodeName().equals(\"columnType\")) {\n\t\t\t\t\t\t\t\t\tcolumn.setType(columnContentNode.getTextContent());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tlogger.error(\"unknown column content.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcolumnList.add(column);\n\t\t\t\t\t} \n\t\t\t\t\ttable.setColumnList(columnList);\n\t\t\t\t\ttableList.add(table);\n\t\t\t\t\tlogger.info(j + \" table tackled.\");\n\t\t\t\t} \n\t\t\t\tmetaDB.setTableList(tableList);\n\t\t\t\tmetaDBList.add(metaDB);\n\t\t\t\tlogger.info(i + \" metaDB tackled.\");\n\t\t\t} \n\t\t\tinfoTables.setMetaDBList(metaDBList);\n\t\t\tlogger.info(\"Parse XML success.\");\n\t\t\treturn infoTables;\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (ParserConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (SAXException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IOException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t\treturn null;\n\t}", "public static void main(String[] args) {\n ArrayList<arrayset> list = new ArrayList<>();\n String [] newarray= new String[97];\n File data = new File(\"records.txt\");\n try {\n Scanner input = new Scanner(data);\n while (input.hasNextLine()) {\n String line = input.nextLine();\n firstName = line.split(\",\")[0];\n\n lastName = line.split(\",\")[1];\n\n gender = line.split(\",\")[2];\n\n age = Integer.parseInt(line.split(\",\")[3]);\n\n phoneNo = line.split(\",\")[4];\n\n email = line.split(\",\")[5];\n\n firstName = Character.toUpperCase(firstName.charAt(0)) + firstName.substring(1, firstName.length());\n lastName = Character.toUpperCase(lastName.charAt(0)) + lastName.substring(1, lastName.length());\n\n if (gender.toLowerCase() == \"male\" || gender.toLowerCase() == \"female\") {\n gender = gender.toLowerCase();\n }\n if (age > 1 || age < 129) {\n age = age;\n }\n else if(age <1 || age > 129) {\n System.out.println(\"Error person not valid\");\n }\n if (phoneNo.length() == 13) {\n phoneNo = phoneNo;\n }\n else if(phoneNo.length()<13) {\n System.out.println(\"Error person not valid\");\n }\n if (email.matches(\"[A-Z][0-9].@\")) {\n email = email;\n }\n else if(email.matches(\"[A-Z][0-9].@\")) {\n System.out.println(\"Error person not valid\");\n }\n list.add(new arrayset(firstName, lastName, gender, age, phoneNo, email));\n }\n input.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"Error Wrong File!\");\n }\n System.out.println(\"Error: Person 4 is not valid, since age = -89\\n\" +\n \"Error: Person 12 is not valid, since last name = Lara22\\n\" +\n \"Error: Person 21 is not valid, since age = 179\\n\" +\n \"Error: Person 32 is not valid, since last name = Mccullough\\n\" +\n \"Error: Person 52 is not valid, since email = MMaddenMadden.net\\n\" +\n \"Error: Person 96 is not valid, since age = 0\");\n System.out.format(\"%-20s%-15s%-15s%-10s%-20s%7s \", \"First Name\", \"Last Name\", \"Gender\", \"Age\", \"Number\", \"Email\");\n\n int i = 0;\n while (i < list.size()) {\n String printarray= String.format(\"%-20s%-15s%-15s%-10s%-20s%7s \", list.get(i).getFirstName(), list.get(i).getLastName(),\n list.get(i).getGender(), list.get(i).getAge(), list.get(i).getPhoneNo(), list.get(i).getEmail());\n newarray[i]=printarray;\n i++;\n\n }\n for(int j=0; j<newarray.length; j++) {\n System.out.println(newarray[j]);\n\n }\n}", "public static DataSet dataSetFromFile(String path) {\n\t\tDataSet dataSet = new DataSet();\n\t\t\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tif(line.trim().equals(\"\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString[] lineItems = line.split(\",\");\n\t\t\t\t \n\t\t\t\tArrayList<String> dataSetRow = new ArrayList<String>();\n\t\t\t\t \n\t\t\t\tfor(String item : lineItems) {\n\t\t\t\t\tdataSetRow.add(item.trim());\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\tdataSet.rows.add(dataSetRow);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn dataSet;\n\t}", "@Test\r\n \tpublic void testQualifiedValues() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = true;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,Value55.1,Value55.2\\nValue55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74\\n\" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote\\nValue91,Value92\\nValueA1,ValueA2\\nValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1 Value44.2 Value44.3 Value44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1 Value54.2 Value54.3 Value54.4,Value55.1,Value55.2 Value55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1 Value64.2 Value64.3 Value64.4,Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74 \" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote Value91,Value92 ValueA1,ValueA2 ValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t}", "@Test\r\n \tpublic void testQualifiedValues2() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = false;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n //\t\t// Line 15\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.2\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 16\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.3\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 17-18\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.4\");\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,\\\"Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74\\n\" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote\\nValue91,Value92\\n\\\"ValueA1\\\",ValueA2\\\"\\nValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1 Value44.2 Value44.3 Value44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1 Value54.2 Value54.3 Value54.4,\\\"Value55.1,Value55.2 Value55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1 Value64.2 Value64.3 Value64.4,\\\"Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74 \" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote Value91,Value92 \\\"ValueA1\\\",ValueA2\\\" ValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t}", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "public void setRows(List<String> rowNames);", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "private static void populateTable(String name, File fileObj, Statement stat) {\n\t\tString tableName = \"\";\n\t\tScanner scan = null;\n\t\tString line = \"\";\n\t\tString[] splitLine = null;\n\t\t\n\t\ttableName = \"stevenwbroussard.\" + name;\n\t\ttry {\n\t\t\tscan = new Scanner(fileObj);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"Failed make thread with file.\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\t//use a for loop to go through, later use a while loop\n\t\twhile (scan.hasNext() != false) {\n\t\t//for (int i = 0; i < 10; i++) {\n\t\t\tline = scan.nextLine();\n\t\t\tsplitLine = line.split(\"\\\\,\");\n\t\t\t\n\t\t\t//if the type for integer column is NULL\n\t\t\tif (splitLine[0].equals(\"NULL\")) {\n\t\t\t\tsplitLine[0] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[1].equals(\"NULL\")) {\n\t\t\t\tsplitLine[1] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[4].equals(\"NULL\")) {\n\t\t\t\tsplitLine[4] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[5].equals(\"NULL\")) {\n\t\t\t\tsplitLine[5] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[7].equals(\"NULL\")) {\n\t\t\t\tsplitLine[7] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[9].equals(\"NULL\")) {\n\t\t\t\tsplitLine[9] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[11].equals(\"NULL\")) {\n\t\t\t\tsplitLine[11] = \"-1\";\n\t\t\t}\n\t\t\tif (splitLine[13].equals(\"NULL\")) {\n\t\t\t\tsplitLine[13] = \"-1\";\n\t\t\t}\n\t\t\t\n\t\t\t//if the type for double column is NULL\n\t\t\tif (splitLine[6].equals(\"NULL\")) {\n\t\t\t\tsplitLine[6] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[8].equals(\"NULL\")) {\n\t\t\t\tsplitLine[8] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[10].equals(\"NULL\")) {\n\t\t\t\tsplitLine[10] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[12].equals(\"NULL\")) {\n\t\t\t\tsplitLine[12] = \"-1.0\";\n\t\t\t}\n\t\t\tif (splitLine[14].equals(\"NULL\")) {\n\t\t\t\tsplitLine[14] = \"-1.0\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tstat.executeQuery(comd.insert(tableName, \n\t\t\t\t\t \t Integer.parseInt(splitLine[0]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[1]), \n\t\t\t\t\t \t splitLine[2], \n\t\t\t\t\t \t splitLine[3], \n\t\t\t\t\t \t Integer.parseInt(splitLine[4]),\n\t\t\t\t\t \t Integer.parseInt(splitLine[5]),\n\t\t\t\t\t \t Double.parseDouble(splitLine[6]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[7]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[8]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[9]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[10]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[11]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[12]), \n\t\t\t\t\t \t Integer.parseInt(splitLine[13]), \n\t\t\t\t\t \t Double.parseDouble(splitLine[14])));\n\t\t\t}\n\t\t\tcatch(SQLException s) {\n\t\t\t\tSystem.out.println(\"SQL insert statement failed.\");\n\t\t\t\ts.printStackTrace();\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "public Set<String> mo16916b(String str, Set<String> set) {\n try {\n return this.f9119b.getStringSet(str, set);\n } catch (Throwable unused) {\n return set;\n }\n }", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public void loadFile(File file) {\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(file));\n\t\t\t\n\t\t\t// read the column names\n\t\t\tList<String> first = stringToList(in.readLine());\n\t\t\tcolNames = first;\n\t\t\t\n\t\t\t// each line makes a row in the data model\n\t\t\tString line;\n\t\t\tdata = new ArrayList<List>();\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tdata.add(stringToList(line));\n\t\t\t}\n\t\t\t\n\t\t\tin.close();\n\t\t\t\n\t\t\t// Send notifications that the whole table is now different\n\t\t\tfireTableStructureChanged();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void parseFile() throws IOException {\r\n\t\tFileInputStream inputStream = new FileInputStream(FILE_PATH);\r\n\t\tScanner sc = new Scanner(inputStream, \"UTF-8\");\r\n\r\n\t\tString line = \"\";\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tif(line.indexOf(comment_char)==0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(header == true) {\r\n//\t\t\tline = sc.nextLine();\r\n\t\t\tString[] linee = line.split(delimiter);\r\n\t\t\tthis.fieldNames = linee;\r\n\t\t\tfor(int i = 0; i < linee.length; i++) {\r\n\t\t\t\tcolumnMapping.put(linee[i], i);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twhile (sc.hasNextLine()) {\r\n\t\t\ttry{line = sc.nextLine();} catch(Exception e){System.out.println(e);}\r\n\t\t\tdf.add(line.split(delimiter, -1));\r\n//\t\t\tif(df.get(df.size()-1).length != this.fieldNames.length) {\r\n//\t\t\t\tSystem.out.println(this.FILE_PATH);\r\n//\t\t\t\tSystem.out.println(String.join(\" \", df.get(df.size()-1)));\r\n//\t\t\t}\r\n\t\t\tfor(int i = 0; i < df.get(df.size()-1).length; i++) {\r\n\t\t\t\tif(df.get(df.size()-1)[i].equals(\"\")) {\r\n\t\t\t\t\tdf.get(df.size()-1)[i] = \"0\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t\tsc.close();\t\r\n\t}", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "Set<String> getRequiredColumns();", "private void createParseTable() {\n parseTableHeader = new HashMap<String, Integer>();\n parseTable = new ArrayList<ArrayList<String>>();\n pHeader = new ArrayList<String>();\n\n String inputLine = null;\n int fileLine = 1;\n int headerCount = 0;\n\n try {\n FileReader reader = new FileReader(parseTableFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n while((inputLine = bufferedReader.readLine()) != null) {\n\n // removes all leading and trailing whitespaces and leading tabs\n String line = inputLine.trim().replaceFirst(\"\\\\t\", \"\");\n\n // these are header rows for terminals and variables\n if(fileLine == 1 || fileLine == 40) {\n String[] cells = line.replaceFirst(\"&\", \"\").split(\"&\");\n for(String cell : cells) {\n// System.out.println(cell);\n if(!parseTableHeader.containsKey(cell) && cell != \"\") {\n parseTableHeader.put(cell, headerCount);\n// System.out.println(headerCount);\n pHeader.add(cell);\n headerCount++;\n }\n }\n }\n else {\n String[] parsedRow = line.split(\"&\",-1);\n // get actual SLR parse table's row number\n int row = Integer.parseInt(parsedRow[0]);\n\n// System.out.println(\"Parsing row number \\t\\t\" + row);\n\n // create a new Array that excludes the row number column\n String[] tempRow = Arrays.copyOfRange(parsedRow, 1, parsedRow.length);\n // remove null / empty entries from Array\n replaceBlanks(tempRow);\n // convert to ArrayList for easier handling\n ArrayList<String> cells = new ArrayList<>(Arrays.asList(tempRow));\n\n// System.out.print(\"Parsed row content \\t\\t\");\n// printArrayList(cells);\n// System.out.println();\n\n // add above ArrayList to the table at the correct row number.\n // because there's two parts to the parse table's row, only\n // add right away if we haven't added anything before\n // otherwise combine the previous entry with this one to create\n // complete entry for this row\n try {\n ArrayList<String> current = parseTable.get(row);\n\n// System.out.print(\"Contents of row \" + row + \"\\t\\t\");\n// printArrayList(current);\n// System.out.println();\n\n // temporary ArrayList to hold previous entry and new entry\n ArrayList<String> temp = new ArrayList<String>();\n temp.addAll(current);\n temp.addAll(cells);\n\n// System.out.print(\"New combined row \\t\\t\");\n// printArrayList(temp);\n// System.out.println();\n\n // add combined ArrayList to the parse table\n parseTable.set(row, temp);\n } catch (IndexOutOfBoundsException e) {\n parseTable.add(row, cells);\n }\n\n// System.out.print(\"Final row \\t\\t\\t\\t\");\n// printArrayList(parseTable.get(row));\n// System.out.println();\n// System.out.println();\n\n }\n\n fileLine++;\n\n }\n if(printPTABLE == \"Y\") {\n printTable();\n }\n bufferedReader.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(\n parseTableFile + \" not found\"\n );\n } catch(IOException e) {\n System.out.println(\n \"Error reading file \" + parseTableFile\n );\n }\n\n }", "public void setColumns(List<String> columnNames);", "private static List<String> stringToList(String string) {\n\t // Create a tokenize that uses \\t as the delim, and reports\n\t // both the words and the delimeters.\n\t\tStringTokenizer tokenizer = new StringTokenizer(string, \"\\t\", true);\n\t\tList<String> row = new ArrayList<String>();\n\t\tString elem = null;\n\t\tString last = null;\n\t\twhile(tokenizer.hasMoreTokens()) {\n\t\t\tlast = elem;\n\t\t\telem = tokenizer.nextToken();\n\t\t\tif (!elem.equals(\"\\t\")) row.add(elem);\n\t\t\telse if (last.equals(\"\\t\")) row.add(\"\");\n\t\t\t// We need to track the 'last' state so we can treat\n\t\t\t// two tabs in a row as an empty string column.\n\t\t}\n\t\tif (elem.equals(\"\\t\")) row.add(\"\"); // tricky: notice final element\n\t\t\n\t\treturn(row);\n\t}", "public static int LoadFastqToArray(String ReadSetPath, String[] ReadSetArray) {\n\t\tint count = 0;\n\t\ttry {\n\t\t\tString encoding = \"utf-8\";\n\t\t\tFile file = new File(ReadSetPath);\n\t\t\tif (file.isFile() && file.exists()) {\n\t\t\t\tInputStreamReader read = new InputStreamReader(new FileInputStream(file), encoding);\n\t\t\t\tBufferedReader bufferedReader = new BufferedReader(read);\n\t\t\t\twhile ((bufferedReader.readLine()) != null) {\n\t\t\t\t\tReadSetArray[count++] = bufferedReader.readLine();\n\t\t\t\t\tbufferedReader.readLine();\n\t\t\t\t\tbufferedReader.readLine();\n\t\t\t\t}\n\t\t\t\tbufferedReader.close();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error liaoxingyu\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\n\t}", "private HashSet<String> buildsetofterms(String filename)\r\n\t{\r\n\t\tString readLine, terms[];\r\n HashSet<String> fileTerms = new HashSet<String>();\r\n try \r\n {\r\n BufferedReader reader = new BufferedReader(new FileReader(filename));\r\n while ((readLine = reader.readLine()) != null)\r\n {\r\n terms = (readLine.toLowerCase().replaceAll(\"[.,:;'\\\"]\", \" \").split(\" +\"));\r\n for (String term : terms)\r\n {\r\n if (term.length() > 2 && !term.equals(\"the\"))\r\n fileTerms.add(term);\r\n }\r\n }\r\n }\r\n catch(IOException e){\r\n e.printStackTrace();\r\n }\r\n return fileTerms;\r\n }", "java.lang.String getColumn();", "public static String setToField(TreeSet<String> set) {\n StringBuilder sb = new StringBuilder();\n String sep = \"\";\n for (String s : set) {\n sb.append(sep).append(s);\n sep = \",\";\n }\n return sb.toString();\n }", "public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}", "public StringSet() {\r\n\t\tsuper();\r\n\t}", "public ResultSet selecionar(String tabela);", "public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "public static void xlRead_TD(String xlPath, String sheet) throws Exception{\n\t\t\n\t\tcolumnDictionary(xlPath, sheet, columns_TD);\t\t\t// To get All columns Text in Hashtable corresponding to sheet.\n\t\tFile myxl = new File(xlPath);\n\t\tFileInputStream myStream = new FileInputStream(myxl);\n\t\thssfWorkbook = new HSSFWorkbook(myStream);\n\t\thssfWorkSheet = hssfWorkbook.getSheet(sheet);\t\t\t// Referring to Test Data Sheet corresponding to Test Case.\n\t\txTDRows = hssfWorkSheet.getLastRowNum()+1;\n\t\txTDCols = hssfWorkSheet.getRow(0).getLastCellNum();\n\t\txTDdata = new String[xTDRows][xTDCols]; \n for (int i = 1; i < xTDRows; i++) {\n\t HSSFRow row = hssfWorkSheet.getRow(i); \n\t for (int j = 0; j < xTDCols; j++) {\n\t \t HSSFCell cell = row.getCell(j); \t\t\t\t\t// To read value from each column in each row\n\t try{\n\t String value = cellToString(cell);\n\t xTDdata[i][j] = value;\n\t }\n\t catch (Exception e) {}\n\t }\n }\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "protected String[] getStringTable() {\n/* 199 */ return myStringTable;\n/* */ }", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static LinkedList<Patient> TSVImport(File f) {\n\t\treturn importSepValuesFilePatient(f, \"\\t\");\n\t}", "public void readKey(File file) throws FileNotFoundException {\n key = new double[CHAR_SET_SIZE][CHAR_SET_SIZE];\n Scanner in = new Scanner(file);\n int i = 0;\n while (in.hasNextLine()) {\n String line = in.nextLine();\n String [] vals = line.split(\" \");\n for (int j = 0; j < vals.length; j++) {\n key[i][j] = Double.parseDouble(vals[j]);\n }\n i++;\n }\n }", "void setColumns(List<String> columns);", "public static Rmatrix loadRDataSet(Rengine re, String file,boolean header, int rowName, String saveAs){\r\n\t\t//rowNames here will indicate the index of the rownames in the dataset. R will store that column as the names for the rows\r\n\t\t//that follow it.\r\n\t\tString bool= \"\";\r\n\t\tif(header==true){\r\n\t\t\tbool=\"TRUE\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\tbool=\"FALSE\";\r\n\t\t}\r\n\t\tfile=hero.quote(file);\r\n\t\tre.eval(\"filename=\" + file + \";\");\r\n\t\tre.eval(saveAs+ \"= read.table(\" + file + \", header = \" + bool + \", sep= \\\",\\\",\" +\"row.names=\" + rowName+ \");\");\r\n\t\tSystem.out.println(saveAs+ \"= read.table(\" + file + \", header =\" + bool + \", sep= \\\",\\\",\" +\"row.names=\" + rowName+ \");\");\r\n\t\tre.eval(saveAs + \"=\" + \"as.matrix(\" + saveAs + \");\");\r\n\t\tREXP x= re.eval(saveAs);\r\n\t\tdouble[][] matrix= x.asDoubleMatrix();\r\n\t\tREXP RrowNames=re.eval(\"rownames(\" + saveAs +\", do.NULL=FALSE);\");\r\n\t\tString[] rowNames=RrowNames.asStringArray();\r\n\t\tString[] headcols= null;\r\n\t\tif(header){ /*if not header: ie if header is false */\r\n\t\t\tSystem.out.println(\"temp= read.table(\" + file + \", header =FALSE, sep= \\\",\\\",\" +\" nrows=1);\");\r\n\t\t\tre.eval(\"temp= read.table(\" + file + \", header =FALSE, sep= \\\",\\\",\" +\", nrows=1);\");\r\n\t\t\tre.eval(\"temp=as.matrix(temp)\");\r\n\t\t\tre.eval(\"unname(temp)\");\r\n\t\t\theadcols=re.eval(\"temp[1,]\").asStringArray();\r\n\t\t\tif(headcols==null){\r\n\t\t\t\tint[] nums=re.eval(\"temp[1,]\").asIntArray();\r\n\t\t\t\t//int[] nums=re.eval(\"colnames(\"+saveAs+\");\").asIntArray();\r\n\t\t\t\tString [] headcols2= new String[nums.length];\r\n\t\t\t\theadcols=headcols2;\r\n\t\t\t\t// headcols=makeColNames(headcols);\r\n\t\t\t\tfor(int z=0; z<nums.length; z++){\r\n\t\t\t\t\theadcols2[z]=Integer.toString(nums[z]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\tint[] dim=re.eval(\"dim(\"+saveAs+\");\").asIntArray();\r\n\t\t\tif(matrix[0].length==headcols.length+1){\r\n\t\t\t//headcols=makeColNames(headcols);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tRmatrix ret= new Rmatrix(rowNames, headcols, matrix);\r\n\t\treturn ret;\r\n\t}", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "abstract protected T getRecordFromLine(String line) throws DataImportException ;", "public List<String> getStrings(String fileName) throws IOException {\n\n List<String> items = readFile (fileName);\n String text = String.join (\"\", items);\n\n return normalizeCsv (text + \" \");\n }", "void insertCSV(String file_path) {\n try {\n InputStream fileStream = new FileInputStream(file_path);\n Reader decoder = new InputStreamReader(fileStream, \"UTF-8\");\n BufferedReader buffered = new BufferedReader(decoder);\n\n for (String line = buffered.readLine(); line != null; line = buffered.readLine()) {\n // process line\n String[] tokens = line.trim().split(\"\\\\s+\"); // split line into different fields\n\n // valid table row should have 16 fields\n if (tokens.length == 16) {\n insertSingleRow(tokens);\n } else {\n continue;\n }\n }\n } catch (Exception e) {\n logger.log(Level.WARNING, \"insertGZip error \", e);\n }\n }", "@Override\n\tpublic void firstLine(String line) {\n\t\t// read variable names, build map of name -> column\n\t\tfinal Map<String, Integer> vars = Maps.newHashMap();\n\t\tvariableNames = parseCsvLine(line);\n\t\tint column = 0;\n\t\tfor (String var : variableNames) {\n\t\t\tvars.put(var, column++);\n\t\t}\n\n\t\t// record target column and establish dictionary for decoding target\n\t\ttarget = vars.get(targetName);\n\n\t\t// record id column\n\t\tif (idName != null) {\n\t\t\tid = vars.get(idName);\n\t\t}\n\n\t\t// create list of predictor column numbers\n\t\tpredictors = Lists.newArrayList(Collections2.transform(typeMap.keySet(), new Function<String, Integer>() {\n\t\t\t@Override\n\t\t\tpublic Integer apply(String from) {\n\t\t\t\tInteger r = vars.get(from);\n\t\t\t\tPreconditions.checkArgument(r != null, \"Can't find variable %s, only know about %s\", from, vars);\n\t\t\t\treturn r;\n\t\t\t}\n\t\t}));\n\n\t\tif (includeBiasTerm) {\n\t\t\tpredictors.add(-1);\n\t\t}\n\t\tCollections.sort(predictors);\n\n\t\t// and map from column number to type encoder for each column that is a\n\t\t// predictor\n\t\tpredictorEncoders = Maps.newHashMap();\n\t\tfor (Integer predictor : predictors) {\n\t\t\tString name;\n\t\t\tClass<? extends FeatureVectorEncoder> c;\n\t\t\tif (predictor == -1) {\n\t\t\t\tname = INTERCEPT_TERM;\n\t\t\t\tc = ConstantValueEncoder.class;\n\t\t\t} else {\n\t\t\t\tname = variableNames.get(predictor);\n\t\t\t\tc = TYPE_DICTIONARY.get(typeMap.get(name));\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tPreconditions.checkArgument(c != null, \"Invalid type of variable %s, wanted one of %s\",\n\t\t\t\t\t\ttypeMap.get(name), TYPE_DICTIONARY.keySet());\n\t\t\t\tConstructor<? extends FeatureVectorEncoder> constructor = c.getConstructor(String.class);\n\t\t\t\tPreconditions.checkArgument(constructor != null, \"Can't find correct constructor for %s\",\n\t\t\t\t\t\ttypeMap.get(name));\n\t\t\t\tFeatureVectorEncoder encoder = constructor.newInstance(name);\n\t\t\t\tpredictorEncoders.put(predictor, encoder);\n\t\t\t\tencoder.setTraceDictionary(traceDictionary);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t}\n\t\t}\n\t}", "public void readSet() throws IOException {\n temps = new HashSet<String>();\n readDescription();\n // adds the words in the temporary set to the temp array\n for (String w : temps) {\n if (w.equals(\"dana\")) {\n System.out.println(w + \" was called +1\");\n }\n int v = d.getValue(w);\n arr[v]++;\n if (w.equals(\"subj\")) {\n System.out.println(w + \" was called +1\");\n System.out.println(arr[v] + \" is the number of the array of \" + w);\n }\n }\n temps = new HashSet<String>();\n readDescription();\n // does the same thing above, except since this is the second\n // description, subtract 1 from array\n for (String w : temps) {\n int v = d.getValue(w);\n arr[v]--;\n if (w.equals(\"subj\")) {\n System.out.println(w + \" was called -1\");\n System.out.println(arr[v] + \" is the number of the array of \" + w);\n }\n }\n // get the prices\n int p1 = getPrice();\n int p2 = getPrice();\n // get the answer value\n // a should be the correct answer\n // b should be the answer they choose\n int a = getAnswer();\n int b = getAnswer();\n // System.out.println(\"The correct answer is: \" + a +\n // \" The chosen answer is: \" + b);\n int y_real;\n DecimalFormat numberFormat = new DecimalFormat(\"#.####\");\n double real_ratio;\n double mturk_ratio;\n if (p1 > p2) {\n y_real = p1 - p2;\n real_ratio = (double) p1 / p2;\n } else {\n y_real = p2 - p1;\n real_ratio = (double) p2 / p1;\n }\n int pdiff;\n if (a == b) {\n pdiff = y_real;\n mturk_ratio = real_ratio;\n } else {\n pdiff = -y_real;\n mturk_ratio = 1 / real_ratio;\n }\n if (p2 > p1) {\n for (int i = 0; i < arr.length; i++) {\n arr[i] = -arr[i];\n }\n }\n w.write(pdiff + \" \");\n w.write(numberFormat.format(real_ratio) + \" \");\n w.write(numberFormat.format(mturk_ratio) + \" \");\n for (int i = 0; i < size; i++) {\n if (i != arr.length - 1) {\n w.write(arr[i] + \" \");\n } else {\n w.write(arr[i]);\n }\n }\n w.write(\"\\n\");\n arr = new int[size];\n }", "private String[][] readfromSpreadSheet(String xlFilePath, String sheetName,String tableName) {\n\t\t\t String[][] tabArray=null;\n\t\t\t try{\n\t\t Workbook workbook = Workbook.getWorkbook(new File(xlFilePath));\n\t\t Sheet sheet = workbook.getSheet(sheetName);\n\t\t int startRow,startCol, endRow, endCol,ci,cj;\n\t\t System.out.println(sheet.getName());\n\t\t \n\t\t Cell tableStart=sheet.findCell(tableName);\n\t\t startRow=tableStart.getRow();\n\t\t startCol=tableStart.getColumn();\n\n\t\t Cell tableEnd= sheet.findCell(tableName, startCol+1,startRow+1, 100, 64000, false); \n\n\t\t endRow=tableEnd.getRow();\n\t\t endCol=tableEnd.getColumn();\n\t\t System.out.println(\"startRow=\"+startRow+\", endRow=\"+endRow+\", \" +\n\t\t \"startCol=\"+startCol+\", endCol=\"+endCol);\n\t\t tabArray=new String[endRow-startRow-1][endCol-startCol-1];\n\t\t ci=0;\n\n\t\t for (int i=startRow+1;i<endRow;i++,ci++){\n\t\t cj=0;\n\t\t for (int j=startCol+1;j<endCol;j++,cj++){\n\t\t tabArray[ci][cj]=sheet.getCell(j,i).getContents();\n\t\t }\n\t\t }\n\t\t\t }//end try\n\t\t \n\t\t catch (Exception e) {\n System.out.println(\"error in getTableArray()\");\n e.printStackTrace();\n }\n\n return(tabArray);\n\t\t }", "public static DoubleMatrixDataset<String, String> parseGeoTables(String fileInput, boolean debug) throws IOException {\n System.out.println(\"\\tNow parsing file: \"+fileInput);\n LinkedHashSet<Integer> desiredColPos = new LinkedHashSet<Integer>();\n \n int columnOffset = 1;\n int rowOffset = 1;\n TextFile in = new TextFile(fileInput, TextFile.R);\n String str = in.readLine(); // header\n while (str.startsWith(\"#\") || str.startsWith(\"\\\"#\") || str.matches(\"^\\\\s*$\") || str.equals(\"\") || str.startsWith(\"This is our raw data.\") || str.matches(\"^GSM[0-9]+.*\")\n || str.startsWith(\"Illumina Inc. GenomeStudio\") || str.startsWith(\"Array Content =\") || str.startsWith(\"Normalization =\") || str.startsWith(\"log\")) {\n str = in.readLine();\n rowOffset++;\n }\n \n String[] headerData = SPLIT_ON_TAB.split(str);\n String str2 = in.readLine();\n String[] nextRowData = SPLIT_ON_TAB.split(str2);\n \n for (int s = 0; s < headerData.length; s++) {\n if ((headerData[s].toLowerCase().contains(\"probe\") && headerData[s].toLowerCase().contains(\"id\")) || (headerData[s].toLowerCase().contains(\"ref\") && headerData[s].toLowerCase().contains(\"id\")) || (headerData[s].toLowerCase().contains(\"array\") && headerData[s].toLowerCase().contains(\"address\"))) {\n columnOffset = (s + 1);\n break;\n }\n }\n int tmpCols = (headerData.length - columnOffset);\n \n LinkedHashMap<String, Integer> colMap = new LinkedHashMap<String, Integer>((int) Math.ceil(tmpCols / 0.75));\n \n int storedCols = 0;\n \n for (int s = 0; s < tmpCols; s++) {\n String colName = headerData[s + columnOffset];\n if (!colMap.containsKey(colName) && !colName.equals(\"\") && !colName.equalsIgnoreCase(\"Target ID\") && !colName.equalsIgnoreCase(\"TargetID\") && !colName.equalsIgnoreCase(\"Probe ID\") && !colName.toLowerCase().contains(\".p=\") && !colName.toLowerCase().contains(\"pval\") && !colName.toLowerCase().contains(\"detection\") && !colName.toLowerCase().contains(\"p-val\") && !colName.toLowerCase().contains(\"array\") && !colName.toLowerCase().contains(\"bead\")) {\n if((nextRowData.length > (s+columnOffset))){\n if((isNumeric(nextRowData[ s + columnOffset]))) {\n colMap.put(colName, storedCols);\n desiredColPos.add(s+columnOffset);\n storedCols++;\n } else if(debug) {\n System.out.println(\"In non-numeric, entry: \"+nextRowData[s + columnOffset]);\n System.out.println(\"###############################\");\n }\n }\n } else if(colMap.containsKey(colName)) {\n LOGGER.warning(\"Duplicated column name:\" + colName + \"! In file: \" + fileInput);\n throw new IOException(\"Problem with parsing file\");\n } \n else if (debug) {\n System.out.println(\"Empthy colname:\"+colName.equals(\"\"));\n System.out.println(\"Colname contains \\\"target id\\\":\"+colName.equalsIgnoreCase(\"Target ID\"));\n System.out.println(\"Colname contains \\\"probe id\\\":\"+colName.equalsIgnoreCase(\"Probe ID\"));\n System.out.println(\"Colname contains \\\".p\\\":\"+colName.toLowerCase().contains(\".p=\"));\n System.out.println(\"Colname contains \\\"pval\\\":\"+colName.toLowerCase().contains(\"pval\"));\n System.out.println(\"Colname contains \\\"p-val\\\":\"+colName.toLowerCase().contains(\"p-val\"));\n System.out.println(\"Colname contains \\\"detection\\\":\"+colName.toLowerCase().contains(\"detection\"));\n System.out.println(\"Colname contains \\\"array\\\":\"+colName.toLowerCase().contains(\"array\"));\n System.out.println(\"Colname contains \\\"bead\\\":\"+colName.toLowerCase().contains(\"bead\"));\n System.out.println(\"###############################\");\n }\n }\n if (colMap.size() == 0) {\n if(debug){\n System.out.println(\"#Nothing added for this file: \"+fileInput+\". First two rows:\");\n System.out.println(\"Parsing of values oke? \"+ isNumeric(nextRowData[columnOffset]));\n System.out.println(str);\n System.out.println(str2);\n System.out.println(fileInput);\n }\n return null;\n }\n int tmpRows = 1;\n \n while (in.readLine() != null) {\n tmpRows++;\n }\n \n in.close();\n \n double[][] initialMatrix = new double[tmpRows][storedCols];\n \n in.open();\n String headerRow = null;\n for (int i = 0; i < rowOffset; ++i) {\n headerRow = in.readLine(); // read header\n }\n int row = 0;\n \n LinkedHashMap<String, Integer> rowMap = new LinkedHashMap<String, Integer>((int) Math.ceil(tmpRows / 0.75));\n \n boolean correctData = true;\n while ((str = in.readLine()) != null) {\n String[] data = SPLIT_ON_TAB.split(str);\n if(data.length == headerData.length){\n if (!rowMap.containsKey(data[columnOffset - 1])) {\n rowMap.put(data[columnOffset - 1], row);\n int columnToPut = 0;\n for (int s : desiredColPos) {\n double d;\n try {\n d = Double.parseDouble(data[s]);\n } catch (NumberFormatException e) {\n correctData = false;\n d = Double.NaN;\n }\n initialMatrix[row][columnToPut] = d;\n columnToPut++;\n }\n row++;\n } else {\n LOGGER.warning(\"Duplicated row name!\");\n LOGGER.warning(\"Duplicated row name: \"+data[columnOffset - 1]);\n System.out.println(str);\n throw new IOException(\"Problem in reading file.\");\n }\n }\n }\n if (!correctData) {\n LOGGER.warning(\"Your data contains NaN/unparseable values!\");\n }\n in.close();\n \n DoubleMatrixDataset<String, String> dataset;\n \n if ((tmpRows * tmpCols) < (Integer.MAX_VALUE - 2)) {\n dataset = new SmallDoubleMatrixDataset<String, String>(new DenseDoubleMatrix2D(initialMatrix), rowMap, colMap);\n } else {\n DenseLargeDoubleMatrix2D matrix = new DenseLargeDoubleMatrix2D(tmpRows, tmpCols);\n matrix.assign(initialMatrix);\n dataset = new LargeDoubleMatrixDataset<String, String>(matrix, rowMap, colMap);\n }\n \n LOGGER.log(Level.INFO, \"''{0}'' has been loaded, nrRows: {1} nrCols: {2}\", new Object[]{fileInput, dataset.rows(), dataset.columns()});\n return dataset;\n }" ]
[ "0.6809743", "0.65522647", "0.5931733", "0.55443084", "0.55310214", "0.5481635", "0.5355165", "0.5142071", "0.5056909", "0.50446683", "0.5019533", "0.49929285", "0.49104396", "0.48836297", "0.48726866", "0.4838374", "0.48129243", "0.4783868", "0.47657093", "0.4764258", "0.47579136", "0.4752836", "0.4748083", "0.47479776", "0.47237816", "0.4669734", "0.4657438", "0.4649557", "0.46090028", "0.4595888", "0.4580245", "0.4576315", "0.45761508", "0.45698318", "0.45583588", "0.4551414", "0.45394906", "0.45250103", "0.45220456", "0.45151857", "0.45142612", "0.4509135", "0.4504753", "0.4502037", "0.4498779", "0.44948947", "0.44767168", "0.44717118", "0.4463836", "0.44486982", "0.44450173", "0.44408876", "0.4439054", "0.44379234", "0.44373918", "0.44335142", "0.44300723", "0.4429664", "0.44186446", "0.44165656", "0.43996087", "0.43994877", "0.4399442", "0.43963602", "0.43944454", "0.43916196", "0.43892908", "0.4357947", "0.4348197", "0.43432456", "0.43384987", "0.4338273", "0.43356746", "0.43321717", "0.43248603", "0.4323011", "0.43200758", "0.4311063", "0.43067402", "0.43060225", "0.42969924", "0.42931888", "0.42919958", "0.4289119", "0.42768964", "0.42757922", "0.42708567", "0.42704844", "0.42690462", "0.42681155", "0.42679214", "0.42655134", "0.42648342", "0.4262175", "0.42496774", "0.42433956", "0.42387083", "0.42347082", "0.4234449", "0.42295274" ]
0.7087181
0
Read a string set from a tabdelimited stream with headers. The strings to be put in the set are taken from the specified column.
public static Set<String> readSet(InputStream inStream, String column) throws IOException { Set<String> retVal = new HashSet<String>(); try (TabbedLineReader reader = new TabbedLineReader(inStream)) { reader.readIntoSet(column, retVal); } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Set<String> readSet(File inFile, String column) throws IOException {\n Set<String> retVal = new HashSet<String>();\n try (TabbedLineReader reader = new TabbedLineReader(inFile)) {\n reader.readIntoSet(column, retVal);\n }\n return retVal;\n }", "private void readIntoSet(String column, Set<String> retVal) throws IOException {\n int idx = this.findField(column);\n for (TabbedLineReader.Line line : this) {\n String value = line.get(idx);\n retVal.add(value);\n }\n }", "Set<String> readData();", "public static List<String> readColumn(File inFile, String string) throws IOException {\n List<String> retVal = new ArrayList<String>(100);\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int inCol = inStream.findField(string);\n for (TabbedLineReader.Line line : inStream)\n retVal.add(line.get(inCol));\n }\n return retVal;\n }", "private void readStringCells( InputStream istrm ) throws IOException {\n PushbackInputStream stream =\n new PushbackInputStream( new BufferedInputStream( istrm ) );\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n endRow();\n break;\n case '#':\n if ( rows.size() == 0 ) {\n comments.add( eatLine( stream ) );\n }\n else {\n eatLine( stream );\n }\n endRow();\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n addCell( readString( stream ) );\n break;\n case END:\n done = true;\n endRow();\n break;\n default:\n stream.unread( c );\n addCell( readToken( stream ) );\n }\n }\n stream.close();\n }", "private void loadTsvFile()\n {\n try\n {\n BufferedReader input = new BufferedReader(new FileReader(inFile));\n try\n {\n String line = null;\n\n Integer lineNum = 0;\n\n while ((line = input.readLine()) != null)\n {\n\n lineNum++;\n if (line.matches(\"^\\\\s+$\"))\n {\n System.err.println(\"Skipping line \" + lineNum + \" as it contains no data\");\n // Weird bug with TSV generated by excel\n // This line.match skips some empty lines because the println runs\n // However, it doesn't match all empty lines as some get put into the \"data\"\n // ArrayList\n // Can see this when using the debugger\n // It's difficult to inspect because the Mac command line tools such as tail\n // and less\n // don't recognise /r as a newline break. They display as ^M.\n // However, the java readLine doesn't have a problem.\n // Easy quick work around was to go into Excel and delete the blank row of\n // cells\n // so that they are truly empty\n\n } else\n {\n\n ArrayList<String> dataLine = new ArrayList<String>();\n\n Scanner tokenize = new Scanner(line).useDelimiter(\"\\t\");\n while (tokenize.hasNext())\n {\n dataLine.add(tokenize.next());\n }\n if (lineNum == headRow)\n {\n header = dataLine;\n\n } else if (ignoreRow.contains(lineNum))\n {\n // do nothing\n } else\n {\n data.add(dataLine);\n }\n }\n\n }\n } finally\n {\n input.close();\n }\n } catch (IOException ex)\n {\n ex.printStackTrace();\n }\n }", "public void filterTsv() throws IOException {\n\t\tList<List<String>> rows = new ArrayList<>();\n\t\tList<String> cols = new ArrayList<String>();\n\t\tList<String> head = new ArrayList<String>();\n\n\t\ttry {\n\t\t\tbuf = new BufferedReader(new FileReader(inputFile)); \n\t\t\t\n\t\t\t// determine which column to filter based on columnMap\n\t\t\tString strRead = buf.readLine();\n\t\t\tString[] myline = strRead.split(\"\\t\");\n\n\t\t\tfor (int i = 0; i < myline.length; i++) {\n\t\t\t\tString mappedValue = columnMap.get(myline[i]);\n\t\t\t\tif (mappedValue != null) {\n\t\t\t\t\tcolIndex.add(i);\n\t\t\t\t\thead.add(mappedValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\trows.add(head);\n\n\t\t\twhile ((strRead = buf.readLine()) != null) {\n\t\t\t\tcols = new ArrayList<String>();\n\t\t\t\tmyline = strRead.split(\"\\t\");\n\t\t\t\t\n\t\t\t\t//skip row if not in rowMap\n\t\t\t\tif (rowMap.get(myline[0]) == null)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tfor (Integer index : colIndex) {\n\t\t\t\t\tif (index < myline.length) {\n\t\t\t\t\t\tif (index == 0)\n\t\t\t\t\t\t\tcols.add(rowMap.get(myline[0]));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tcols.add(myline[index]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trows.add(cols);\n\t\t\t}\n\n\t\t\twriteTsv(rows, outputFile);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tbuf.close();\n\t\t}\n\t}", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "public TabbedLineReader(List<String> strings) {\n this.stream = null;\n this.reader = strings.iterator();\n this.delim = '\\t';\n this.readHeader();\n }", "void makeSet(BufferedReader br) throws Exception {\n\t\tString[] parts = null;\n\t\tint i;\n\t\tfor (String line; (line = br.readLine()) != null;) {\n\t\t\tparts = eatquotedStrings(line);\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tparts[i] = parts[i].replaceAll(\"\\\"\", \"\");\n\t\t\t}\n\t\t\tset.add(parts[0]);\n\t\t}\n\t\tbr.close();\n\t}", "public static Set readingFiles(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n\n return lines.collect(Collectors.toSet());//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n\n //set.forEach(System.out::print);\n\n\n }", "private void addTypedStrings(Set<String> set, String hdr) {\n BundlesG globals = getRTParent().getRootBundles().getGlobals(); Set<String> to_add = new HashSet<String>();\n\tSet<BundlesDT.DT> datatypes = globals.getFieldDataTypes(globals.fieldIndex(hdr));\n\n // In transformed datatypes (e.g., dstip|ORG), the datatypes lookup fails and a null is returned. I'm\n // unsure if the following will further break the selection/filtered data views -- the underlying assumption\n // in the original implementation was that all of the entities were strongly typed... however, for IP Org\n // lookups, this is clearly not the case.\n if (datatypes == null) return;\n\n\tIterator<BundlesDT.DT> it_dt = datatypes.iterator();\n\twhile (it_dt.hasNext()) {\n\t BundlesDT.DT dt = it_dt.next();\n\t Iterator<String> it = set.iterator();\n while (it.hasNext()) {\n\t String str = it.next();\n\t if (BundlesDT.stringIsType(str, dt)) to_add.add(hdr + BundlesDT.DELIM + str);\n\t }\n\t}\n\tset.addAll(to_add);\n }", "@Test public void testStrings() {\n Frame fr = null;\n try {\n fr = parseTestFile(\"smalldata/junit/string_test.csv\");\n\n //check dimensions\n int nlines = (int)fr.numRows();\n Assert.assertEquals(65005,nlines);\n Assert.assertEquals(7,fr.numCols());\n\n //check column types\n Vec[] vecs = fr.vecs();\n Assert.assertTrue(vecs[0].isString());\n Assert.assertTrue(vecs[1].isString());\n Assert.assertTrue(vecs[2].isString());\n Assert.assertTrue(vecs[3].isString());\n Assert.assertTrue(vecs[4].isString());\n Assert.assertTrue(vecs[5].isString());\n Assert.assertTrue(vecs[6].isString());\n\n //checks column counts - expects MAX_CATEGORICAL_COUNT == 65000\n //Categorical registration is racy so actual categorical limit can exceed MAX by a few values\n Assert.assertTrue(65003 <= vecs[0].nzCnt()); //ColV2 A lacks starting values\n Assert.assertTrue(65002 <= vecs[1].nzCnt()); //ColV2 B has random missing values & dble quotes\n Assert.assertTrue(65005 <= vecs[2].nzCnt()); //ColV2 C has all values & single quotes\n Assert.assertTrue(65002 <= vecs[3].nzCnt()); //ColV2 D missing vals just prior to Categorical limit\n Assert.assertTrue(65003 <= vecs[4].nzCnt()); //ColV2 E missing vals just after Categorical limit hit\n //Assert.assertTrue(65000 <= vecs[5].domain().length); //ColV2 F cardinality just at Categorical limit\n Assert.assertTrue(65003 <= vecs[6].nzCnt()); //ColV2 G missing final values\n\n //spot check value parsing\n BufferedString str = new BufferedString();\n Assert.assertEquals(\"A2\", vecs[0].atStr(str, 2).toString());\n Assert.assertEquals(\"B7\", vecs[1].atStr(str, 7).toString());\n Assert.assertEquals(\"'C65001'\", vecs[2].atStr(str, 65001).toString());\n Assert.assertEquals(\"E65004\", vecs[4].atStr(str, 65004).toString());\n Assert.assertNull(vecs[6].atStr(str, 65004));\n\n fr.delete();\n } finally {\n if( fr != null ) fr.delete();\n }\n }", "private void readHeader() throws IOException {\n\t\tString line = this.readLine();\n\t\tSystem.out.println(String.format(\"header->{%s}\", line));\n\t\tthis.columnNames = line.split(DEFAULT_DELIMITER);\n\t}", "public abstract ResultSet readTable(String tableName, String [] columns)\n throws SQLException;", "static StringReader testData() {\n return new StringReader(\n \"@stboundedby, urn:ogc:def:crs:CRS:1.3:84, 2D, 50.23 9.23, 50.31 9.27, 2012-01-17T12:33:41Z, 2012-01-17T12:37:00Z, sec\\n\" +\n \"@columns, mfidref, trajectory, state,xsd:string, \\\"\\\"\\\"type\\\"\\\" code\\\",xsd:integer\\n\" +\n \"@foliation,Time\\n\" +\n \"a, 10, 150, 11.0 2.0 12.0 3.0, walking, 1\\n\" +\n \"b, 10, 190, 10.0 2.0 11.0 3.0, walking, 2\\n\" +\n \"a, 150, 190, 12.0 3.0 10.0 3.0\\n\" + // Omitted values are same as previous line.\n \"c, 10, 190, 12.0 1.0 10.0 2.0 11.0 3.0, vehicle, 1\\n\");\n }", "public static Hashtable<String, Vector<String>> getMetaData3(String tablename) {\n\t\tHashtable<String, Vector<String>> temp = new Hashtable<String, Vector<String>>();\n\t\tBufferedReader fileReader = null;\n\t\tString[] array;\n\n\t\ttry {\n\t\t\tString l = \"\";\n\t\t\tfileReader = new BufferedReader(new FileReader(\"src/main/resources/metadata.csv\"));\n\t\t\twhile ((l = fileReader.readLine()) != null) {\n\t\t\t\tVector<String> v = new Vector<>();\n\t\t\t\tarray = l.split(\",\");\n\t\t\t\tif (array[0].equals(tablename)) {\n\t\t\t\t\tv.add(array[5]);\n\t\t\t\t\tv.add(array[6]);\n\t\t\t\t\ttemp.put(array[1], v);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn temp;\n\t}", "public CsvStringReader(String csvString, boolean hasHeader) throws IOException\n\t{\n\t\tsuper();\n\t\tif (csvString == null) throw new IllegalArgumentException(\"csvString is null\");\n\t\tthis.csvString = csvString;\n\t\tthis.hasHeader = hasHeader;\n\t\tthis.reset();\n\t}", "public void initFromRows(SimpleIterator<String> lines) {\n this.reset();\n int rowId = 0;\n Optional<String> lineOpt;\n Int2ObjectMap<IntArrayList> colsMap = new Int2ObjectOpenHashMap<>();\n int maxColId = -1;\n while (true) {\n lineOpt = lines.next();\n if (!lineOpt.isPresent()) {\n break;\n } else {\n String line = lineOpt.get().trim();\n if (!line.isEmpty()) {\n String[] tokens = line.split(\"\\\\s+\");\n int[] row = new int[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n int colId = Integer.parseInt(tokens[i]) - 1; // convert to 0-based\n if (colId < 0) {\n throw new RuntimeException(\n String.format(\n \"Column %d smaller than 1, in line number %d, line:'%s'\",\n colId + 1, rowId + 1, line\n )\n );\n }\n row[i] = colId;\n if (!colsMap.containsKey(colId)) {\n colsMap.put(colId, new IntArrayList());\n }\n colsMap.get(colId).add(rowId);\n if (colId > maxColId) {\n maxColId = colId;\n }\n }\n Arrays.sort(row);\n this.rows[rowId] = row;\n }\n rowId++;\n if (rowId > this.numRows) {\n throw new RuntimeException(\n \"More rows in input rows file than the expected \" + this.numRows\n );\n }\n }\n }\n if (maxColId > this.numCols) {\n this.numCols = maxColId + 1;\n this.cols = new IntSet[this.numCols];\n }\n for (int colId = 0; colId < this.numCols; colId++) {\n if (colsMap.containsKey(colId) && !colsMap.get(colId).isEmpty()) {\n this.cols[colId] = new IntOpenHashSet(colsMap.get(colId));\n } else {\n this.cols[colId] = new IntOpenHashSet();\n }\n }\n }", "public static LinkedList<Patient> TSVImport(String str) {\n\t\treturn TSVImport(new File(str));\n\t}", "public void importUserMadeTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tfor (int i = 0; i < entries.length; i++) {\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(entries[i]))\r\n\t\t\t\t\t\tentries[i] = \"--\";\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entries);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "private Set<String> parseStringToSet(final String data) {\n String[] splits;\n\n if (data != null && data.length() > 0) {\n splits = data.split(\",\");\n } else {\n splits = new String[] {};\n }\n\n Set<String> set = new HashSet<String>();\n if (splits.length > 0) {\n for (String split : splits) {\n set.add(split.trim());\n }\n }\n\n return set;\n }", "private String readString( InputStream stream ) throws IOException {\n char delimiter = (char) stream.read();\n buffer = new StringBuffer();\n while ( true ) {\n int c = stream.read();\n if ( c == delimiter ) {\n break;\n }\n else {\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n throw new TableFormatException(\n \"End of line within a string literal\" );\n case '\\\\':\n buffer.append( (char) stream.read() );\n break;\n case END:\n throw new TableFormatException(\n \"End of file within a string literal\" );\n default:\n buffer.append( (char) c );\n }\n }\n }\n return buffer.toString();\n }", "private void synsetParse(String line) {\n String[] tokens = line.split(\",\");\n Integer key = Integer.parseInt(tokens[0]);\n ArrayList<String> al = new ArrayList<String>();\n String[] words = tokens[1].split(\" \");\n for (String w : words) {\n al.add(w);\n nounSet.add(w); // build nounSet at the same time\n }\n synsetMap.put(key, al);\n }", "public void readFileInHashSet() throws IOException {\n\t\tFileReader fileR = new FileReader(MOCK_DATAPath);\n\t\tBufferedReader buffR = new BufferedReader(fileR);\n\t\tcitiesSet = new HashSet<>();\n\t\tcountriesSet = new HashSet<>();\n\t\tString line = \"\";\n\t\twhile ((line = buffR.readLine()) != null) {\n\t\t\tString tempWithComma = line;\n\t\t\tString tempOutComma[] = tempWithComma.split(\",\");\n\t\t\tcitiesSet.add(tempOutComma[0]);\n\t\t\tcountriesSet.add(tempOutComma[1]);\n\t\t}\n\t}", "public Set<String> getColumns();", "public List<T> readDataFromStream(InputStream stream, boolean readFirstLine) throws IOException {\n\n List<T> typeBeans = new LinkedList<>();\n try (ICsvBeanReader beanReader = new CsvBeanReader(new BufferedReader(new InputStreamReader(stream)),\n CsvPreference.TAB_PREFERENCE)) {\n if (readFirstLine) {\n beanReader.getHeader(true);\n }\n T typeBean;\n boolean carryOn = true;\n while (carryOn) {\n try {\n typeBean = beanReader.read(clazz, headers, cellProcessors);\n if (typeBean != null) {\n typeBeans.add(typeBean);\n } else {\n carryOn = false;\n }\n } catch (SuperCsvException e) {\n // we need this as the data file MAY contain rubbish\n LOGGER.warning(\"Ignoring data error in line: \" + beanReader.getLineNumber());\n }\n\n }\n }\n return typeBeans;\n }", "public NParseCsv(String charset, boolean isHeaderPresent)\n {\n try\n {\n _decoder = Charset.forName(charset).newDecoder();\n _inBytes = null;\n _outChars = null;\n }\n catch(Exception e)\n {\n System.err.println(\"Error creating charset decoder for '\"+charset+\"' in NParseCsv(): \"+e);\n }\n \n _isHeaderPresent = isHeaderPresent;\n _linePos = 0;\n _fieldPos = 0;\n _charPos = 0;\n }", "abstract protected T getRecordFromLine(String line) throws DataImportException ;", "@Override\n public ResultSet readTable (String tableName, String[] columns, int nThread) throws SQLException {\n tableName = tableName == null ? this.options.getSourceTable() : tableName;\n\n // If columns parameter is null, get it from options\n String allColumns = this.options.getSourceColumns() == null ? \"*\" : this.options.getSourceColumns();\n\n long offset = nThread * chunkSize;\n String sqlCmd;\n\n // Read table with source-query option specified\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sqlCmd = \"SELECT * FROM (\" +\n options.getSourceQuery() + \") as T1 \";\n } else {\n\n sqlCmd = \"SELECT \" +\n allColumns +\n \" FROM \" +\n escapeTableName(tableName);\n\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sqlCmd = sqlCmd + \" WHERE \" + options.getSourceWhere();\n }\n\n }\n\n sqlCmd = sqlCmd + \" LIMIT ? OFFSET ? \";\n\n if (this.options.getJobs() == nThread + 1) {\n return super.execute(sqlCmd, \"-1\", offset);\n } else {\n return super.execute(sqlCmd, chunkSize, offset );\n }\n\n }", "protected abstract DataTypes[] processLine(MutableCharArrayString line);", "@Test(timeout=100)\r\n\tpublic void testUnquoted() {\r\n\t\tString [] r1 = {\"aaa\",\"bbb\",\"ccc\"};\r\n\t\tString [] r2 = {\"A\",\"Bb\",\"C\",\"Dd\",\"5555\",\"six\",\"7-11\",\"8\",\"Nines\",\"10!!!\"};\r\n\t\tString [] r3 = {\"a\"};\r\n\t\twriteArrayToLine(r1);\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader( getInstream() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tString [] next = csv.next();\r\n\t\tassertEquals( r1.length, next.length );\r\n\t\tassertArrayEquals( r1, next );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t\tassertFalse( csv.hasNext() );\r\n\t}", "@Test\n void testRead() throws IOException, URISyntaxException {\n final String[] expectedResult = {\n \"-199\t\\\"hello\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"2017/06/20\\\"\t0.0\t1\t\\\"2\\\"\t\\\"823478788778713\\\"\",\n \"2\t\\\"Sdfwer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"1100/06/20\\\"\tInf\t2\t\\\"NaN\\\"\t\\\",1,2,3\\\"\",\n \"0\t\\\"cjlajfo.\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"3000/06/20\\\"\t-Inf\t3\t\\\"inf\\\"\t\\\"\\\\casdf\\\"\",\n \"-1\t\\\"Mywer\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-2011\\\"\t3.141592653\t4\t\\\"4.8\\\"\t\\\"  \\\\\\\" \\\"\",\n \"266128\t\\\"Sf\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"06-20-1917\\\"\t0\t5\t\\\"Inf+11\\\"\t\\\"\\\"\",\n \"0\t\\\"null\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:23\t2017-06-20\t\\\"03/03/1817\\\"\t123\t6.000001\t\\\"11-2\\\"\t\\\"\\\\\\\"adf\\\\0\\\\na\\\\td\\\\nsf\\\\\\\"\\\"\",\n \"-2389\t\\\"\\\"\t2013-04-08 13:14:23\t2013-04-08 13:14:72\t2017-06-20\t\\\"2017-03-12\\\"\tNaN\t2\t\\\"nap\\\"\t\\\"💩⌛👩🏻■\\\"\"};\n BufferedReader result;\n File file = getFile(\"csv/ingest/IngestCSV.csv\");\n try (FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream stream = new BufferedInputStream(fileInputStream)) {\n CSVFileReader instance = createInstance();\n File outFile = instance.read(Tuple.of(stream, file), null).getTabDelimitedFile();\n result = new BufferedReader(new FileReader(outFile));\n }\n\n assertThat(result).isNotNull();\n assertThat(result.lines().collect(Collectors.toList())).isEqualTo(Arrays.asList(expectedResult));\n }", "@Test\n\tpublic void test_ReadAsciiString_tab_terminates() throws IOException {\n\t\tBinaryReader br = br(true, 'A', 'B', 'C', '\\t', 'D', 'E', 'F', 0, /* magic flag */ 42);\n\t\tassertEquals(\"ABC\\tDEF\", br.readAsciiString(0));\n\t}", "public Set<String> mo16916b(String str, Set<String> set) {\n try {\n return this.f9119b.getStringSet(str, set);\n } catch (Throwable unused) {\n return set;\n }\n }", "public static void readTable(String tableName, String filename) {\n\n\t\t// System.out.println(filename);\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + filename));\n\n\t\t\twhile (true) {\n\n\t\t\t\tString line = in.readLine();\n\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// remove | at end for tokenization\n\t\t\t\tline = line.substring(0, line.length() - 1);\n\n\t\t\t\t// line into tokens\n\t\t\t\tString[] tokens = line.split(attributeDelimiter);\n\t\t\t\tint numAttributes = tokens.length;\n\n\t\t\t\tassert (tokens.length == tableNameToOrdredSchema.get(tableName)\n\t\t\t\t\t\t.size());\n\n\t\t\t\tObject[] arr = new Object[numAttributes];\n\n\t\t\t\tfor (int i = 0; i < tokens.length; i++) {\n\n\t\t\t\t\tClass<?> type = tableNameToOrdredSchema.get(tableName).get(\n\t\t\t\t\t\t\ti).getType().getCorrespondingJavaClass();\n\t\t\t\t\tObject val = null;\n\n\t\t\t\t\tif (type.isAssignableFrom(String.class)) {\n\t\t\t\t\t\tval = tokens[i];\n\t\t\t\t\t} else if (type.isAssignableFrom(java.util.Date.class)) {\n\t\t\t\t\t\tval = new java.util.Date(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Integer.class)) {\n\t\t\t\t\t\tval = Integer.parseInt(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Double.class)) {\n\t\t\t\t\t\tval = Double.parseDouble(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Long.class)) {\n\t\t\t\t\t\tval = Long.parseLong(tokens[i]);\n\t\t\t\t\t} else if (type.isAssignableFrom(java.lang.Float.class)) {\n\t\t\t\t\t\tval = Float.parseFloat(tokens[i]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Type problem\");\n\t\t\t\t\t}\n\n\t\t\t\t\tarr[i] = val;\n\n\t\t\t\t}\n\n\t\t\t\tSampleRow row = new SampleRow(tableNameToOrdredSchema\n\t\t\t\t\t\t.get(tableName), arr);\n\n\t\t\t\tmyDatabase.getQueryInterface().insertRow(tableName, row);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Test\r\n\tpublic void readCsvTest() throws IOException {\r\n\t\t\tfail(\"Not yet implemented\");\r\n\t}", "@Override\n public ResultSet readTable (String tableName, String[] columns, int nThread) throws SQLException {\n tableName = tableName == null ? this.options.getSourceTable() : tableName;\n\n // If columns parameter is null, get it from options\n String allColumns = this.options.getSourceColumns() == null ? \"*\" : this.options.getSourceColumns();\n\n long offset = nThread * chunkSize;\n String sqlCmd;\n\n // Read table with source-query option specified\n if (options.getSourceQuery() != null && !options.getSourceQuery().isEmpty()) {\n sqlCmd = \"SELECT * FROM (\" + options.getSourceQuery() + \") AS REPLICADB_TABLE \";\n } else {\n\n sqlCmd = \"SELECT \" + allColumns + \" FROM \" + escapeTableName(tableName);\n\n // Source Where\n if (options.getSourceWhere() != null && !options.getSourceWhere().isEmpty()) {\n sqlCmd = sqlCmd + \" WHERE \" + options.getSourceWhere();\n }\n }\n\n if (chunkSize != 0L) {\n sqlCmd = sqlCmd + \" LIMIT ? OFFSET ?\";\n return super.execute(sqlCmd, chunkSize, offset);\n } else {\n return super.execute(sqlCmd);\n }\n }", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "@Test(timeout=100)\r\n\tpublic void testSetDelimiter() {\r\n\t\tString [] r1 = {\"NAME\", \"ADDRESS\",\"EMAIL\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"Santa Claus\",\"North Pole\",\"[email protected]\"};\r\n\t\tString [] r3 = {\"Obama\",\"1 Pennsylvania Ave\",\"[email protected]\"};\r\n\t\t// default delimiter\r\n\t\twriteArrayToLine(r1);\r\n\t\t// change delimiter\r\n\t\tdelim = ':';\r\n\t\twriteArrayToLine(r2);\r\n\t\twriteArrayToLine(r3);\r\n\t\tout.close();\r\n\t\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tcsv.setDelimiter(delim);\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t\tassertArrayEquals( r3, csv.next() );\r\n\t}", "@Test(timeout = 4000)\n public void test125() throws Throwable {\n StringReader stringReader0 = new StringReader(\"H Gz\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 3423, 1002, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.getNextToken();\n assertEquals(1004, javaCharStream0.getBeginColumn());\n assertEquals(1005, javaCharStream0.getColumn());\n }", "public void importTable(BufferedReader br) {\r\n\t\tString line;\r\n\t\tTable table = null;\r\n\t\ttry {\r\n\t\t\tString tableName = br.readLine();\r\n\t\t\ttable = new Table(tableName);\r\n\t\t\tint[] types = convertTypes(br.readLine().split(\",\"));\r\n\t\t\tString[] names = br.readLine().split(\",\");\r\n\t\t\tassert (types.length == names.length);\r\n\t\t\tfor (int i = 0 ; i < types.length - 1; i++) {\r\n\t\t\t\ttable.newAttribute(names[i], types[i]);\r\n\t\t\t}\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tString[] entries = line.split(\",\");\r\n\t\t\t\tString[] entriesMinusLastModified = new String[entries.length - 1];\r\n\t\t\t\tfor (int i = 0; i < entriesMinusLastModified.length; i++) {\r\n\t\t\t\t\tentriesMinusLastModified[i] = entries[i];\r\n\t\t\t\t\tif (!table.getAttributes(i + 1).checkType(\r\n\t\t\t\t\t\t\tentriesMinusLastModified[i])) {\r\n\t\t\t\t\t\tentriesMinusLastModified[i] = \"--\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttable.newEntry(entriesMinusLastModified);\r\n\t\t\t\ttable.getAttributes(table.getAttributeNumber() - 1).\r\n\t\t\t\tchangeField(table.getLines() - 1, entries[entries.length - 1]);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\ttable.delete();\r\n\t\t}\r\n\t}", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "public static Timetable parseTimetable(String timetableString) throws ParseException {\n String[] splitted = timetableString.split(\"\\n\");\n List<TimeRange> timeRanges = new ArrayList<>();\n for (String s : splitted) {\n try {\n timeRanges.add(parseTimeRange(s));\n } catch (ParseException e) {\n throw new ParseException(TimeRange.MESSAGE_CONSTRAINTS);\n }\n }\n return new Timetable(timeRanges);\n }", "private static List<String> readData(String path) throws IOException{\n ArrayList<String> data = new ArrayList<>();\n try (\n Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);\n CSVReader csvReader = new CSVReader(reader)\n ){\n String[] nextRecord;\n while ((nextRecord = csvReader.readNext()) != null) {\n if (nextRecord[0].contains(\"name\")){\n System.out.println(\"Skipping column headers...\");\n }else {\n data.add(nextRecord[0]);\n// System.out.println(nextRecord[0]);\n }\n }\n }\n return data;\n }", "private static List<String> stringToList(String string) {\n\t // Create a tokenize that uses \\t as the delim, and reports\n\t // both the words and the delimeters.\n\t\tStringTokenizer tokenizer = new StringTokenizer(string, \"\\t\", true);\n\t\tList<String> row = new ArrayList<String>();\n\t\tString elem = null;\n\t\tString last = null;\n\t\twhile(tokenizer.hasMoreTokens()) {\n\t\t\tlast = elem;\n\t\t\telem = tokenizer.nextToken();\n\t\t\tif (!elem.equals(\"\\t\")) row.add(elem);\n\t\t\telse if (last.equals(\"\\t\")) row.add(\"\");\n\t\t\t// We need to track the 'last' state so we can treat\n\t\t\t// two tabs in a row as an empty string column.\n\t\t}\n\t\tif (elem.equals(\"\\t\")) row.add(\"\"); // tricky: notice final element\n\t\t\n\t\treturn(row);\n\t}", "Set<String> getInterpetAsTrueStrings(int columnIndex);", "public void setRows(List<String> rowNames);", "public static void readHistoricalData(String fileName, TeamSet teamSet) throws IOException{\n\t\tScanner input = new Scanner(new File(fileName));\n\t\tString data = input.nextLine();\n\t\twhile(!data.contains(\",,,,\")) {\n\t\t\t//Read the game data for each ncaa game, send in each line and the teamset\n\t\t\treadGameData(data, teamSet);\n\t\t\tdata = input.nextLine();\n\t\t}\n\t}", "public void readSQL(SQLInput stream, String typeName) throws SQLException {\n\t\tid = Helpers.integerOrNull(stream.readBigDecimal());\n\t\trt = stream.readString();\n\t\tname = stream.readString();\n\t\tdescription = stream.readString();\n\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "private static List<Object> getPartitionValues(\n ResultSet inputSet,\n List<String> columnNames)\n throws SQLException\n {\n List<Object> vals = new ArrayList<Object>();\n for (String name : columnNames) {\n vals.add(inputSet.getObject(name));\n }\n return vals;\n }", "private void createParseTable() {\n parseTableHeader = new HashMap<String, Integer>();\n parseTable = new ArrayList<ArrayList<String>>();\n pHeader = new ArrayList<String>();\n\n String inputLine = null;\n int fileLine = 1;\n int headerCount = 0;\n\n try {\n FileReader reader = new FileReader(parseTableFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n while((inputLine = bufferedReader.readLine()) != null) {\n\n // removes all leading and trailing whitespaces and leading tabs\n String line = inputLine.trim().replaceFirst(\"\\\\t\", \"\");\n\n // these are header rows for terminals and variables\n if(fileLine == 1 || fileLine == 40) {\n String[] cells = line.replaceFirst(\"&\", \"\").split(\"&\");\n for(String cell : cells) {\n// System.out.println(cell);\n if(!parseTableHeader.containsKey(cell) && cell != \"\") {\n parseTableHeader.put(cell, headerCount);\n// System.out.println(headerCount);\n pHeader.add(cell);\n headerCount++;\n }\n }\n }\n else {\n String[] parsedRow = line.split(\"&\",-1);\n // get actual SLR parse table's row number\n int row = Integer.parseInt(parsedRow[0]);\n\n// System.out.println(\"Parsing row number \\t\\t\" + row);\n\n // create a new Array that excludes the row number column\n String[] tempRow = Arrays.copyOfRange(parsedRow, 1, parsedRow.length);\n // remove null / empty entries from Array\n replaceBlanks(tempRow);\n // convert to ArrayList for easier handling\n ArrayList<String> cells = new ArrayList<>(Arrays.asList(tempRow));\n\n// System.out.print(\"Parsed row content \\t\\t\");\n// printArrayList(cells);\n// System.out.println();\n\n // add above ArrayList to the table at the correct row number.\n // because there's two parts to the parse table's row, only\n // add right away if we haven't added anything before\n // otherwise combine the previous entry with this one to create\n // complete entry for this row\n try {\n ArrayList<String> current = parseTable.get(row);\n\n// System.out.print(\"Contents of row \" + row + \"\\t\\t\");\n// printArrayList(current);\n// System.out.println();\n\n // temporary ArrayList to hold previous entry and new entry\n ArrayList<String> temp = new ArrayList<String>();\n temp.addAll(current);\n temp.addAll(cells);\n\n// System.out.print(\"New combined row \\t\\t\");\n// printArrayList(temp);\n// System.out.println();\n\n // add combined ArrayList to the parse table\n parseTable.set(row, temp);\n } catch (IndexOutOfBoundsException e) {\n parseTable.add(row, cells);\n }\n\n// System.out.print(\"Final row \\t\\t\\t\\t\");\n// printArrayList(parseTable.get(row));\n// System.out.println();\n// System.out.println();\n\n }\n\n fileLine++;\n\n }\n if(printPTABLE == \"Y\") {\n printTable();\n }\n bufferedReader.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(\n parseTableFile + \" not found\"\n );\n } catch(IOException e) {\n System.out.println(\n \"Error reading file \" + parseTableFile\n );\n }\n\n }", "public static void getAlternateSpellings\r\n\t(\r\n\t\tReader reader ,\r\n\t\tMap<String, String> map ,\r\n\t\tSet<String> set\r\n\t)\r\n\t\tthrows IOException\r\n\t{\r\n\t\tString[] tokens;\r\n\r\n BufferedReader bufferedReader\t=\r\n \tnew BufferedReader( reader );\r\n\r\n\t\tString inputLine\t\t\t\t= bufferedReader.readLine();\r\n\t\tString alternateSpelling;\r\n\t\tString standardSpelling;\r\n\r\n\t\twhile ( inputLine != null )\r\n\t\t{\r\n\t\t\ttokens\t\t= inputLine.split( \"\\t\" );\r\n\r\n\t\t\tif ( tokens.length > 1 )\r\n\t\t\t{\r\n\t\t\t\talternateSpelling\t= tokens[ 0 ];\r\n\t\t\t\tstandardSpelling\t= tokens[ 1 ];\r\n\r\n\t\t\t\tif ( !isDBNull( standardSpelling ) )\r\n\t\t\t\t{\r\n\t\t\t\t\talternateSpelling\t= alternateSpelling.trim();\r\n\t\t\t\t\tstandardSpelling\t= standardSpelling.trim();\r\n\r\n\t\t\t\t\tif ( map.get( alternateSpelling ) == null )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !alternateSpelling.endsWith( \"-\" ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmap.put( alternateSpelling , standardSpelling );\r\n\t\t\t\t\t\t\tset.add( standardSpelling );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Skipping line = <\" + inputLine + \">\" );\r\n\t\t\t}\r\n\r\n\t\t\tinputLine\t= bufferedReader.readLine();\r\n\t\t}\r\n\r\n\t\tbufferedReader.close();\r\n\t}", "public abstract DataSet getTablesByType(InputStream inputSteam,\r\n String name, String pattern, String type)\r\n throws Exception;", "public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "@Test\r\n \tpublic void testQualifiedValues2() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = false;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n //\t\t// Line 15\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.2\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 16\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.3\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n //\t\t\r\n //\t\t// Line 17-18\r\n //\t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"Value54.4\");\r\n //\t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value55.1,Value55.2\\nValue55.3,Value55.4\\\"\");\r\n //\t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,\\\"Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74\\n\" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote\\nValue91,Value92\\n\\\"ValueA1\\\",ValueA2\\\"\\nValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value12\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value22.1,Value22.2, Value22.3\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value44.1 Value44.2 Value44.3 Value44.4\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value45.1,Value45.2\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value54.1 Value54.2 Value54.3 Value54.4,\\\"Value55.1,Value55.2 Value55.3,Value55.4\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value64.1 Value64.2 Value64.3 Value64.4,\\\"Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,\\\"Value66\\\"\\\"\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value72 \\\"aaa \\\"quoted part 1\\\", then \\\"\\\"quoted part 2\\\" value\\\",Value73\\\",Value74 \" +\r\n \t\t\t\t\"Value81,\\\"Value82 with unclosed quote Value91,Value92 \\\"ValueA1\\\",ValueA2\\\" ValueB1\\\"\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"Value\\\"B2,Va\\\"lueB3\\\"\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Va\\\"lueB4\\\"\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"\\\"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t}", "@Test\r\n \tpublic void testQualifiedValues() {\n \t\t\r\n \t\tParameters params = (Parameters) filter.getParameters();\r\n \t\tparams.detectColumnsMode = Parameters.DETECT_COLUMNS_NONE;\r\n \t\t\r\n \t\tInputStream input = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.NONE; // !!!\r\n \t\tparams.removeQualifiers = true;\r\n \t\t\r\n //\t\tparams.valuesStartLineNum = 9;\r\n //\t\tparams.sendHeaderMode = 0;\r\n \r\n \t\t\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1\\nValue34.2\\nValue34.3\\nValue34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1\\nValue44.2\\nValue44.3\\nValue44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1\\nValue54.2\\nValue54.3\\nValue54.4,Value55.1,Value55.2\\nValue55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1\\nValue64.2\\nValue64.3\\nValue64.4,Value65.1,Value65.2\\nValue65.3,Value65.4\\n\" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74\\n\" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote\\nValue91,Value92\\nValueA1,ValueA2\\nValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t\t\r\n \t\t\r\n \t\t// Unwrap lines\r\n \t\tinput = TableFilterTest.class.getResourceAsStream(\"/csv_test3.txt\");\r\n \t\tassertNotNull(input);\r\n \t\t\r\n \t\tparams.wrapMode = WrapMode.SPACES; // !!!\r\n \t\tfilter.open(new RawDocument(input, \"UTF-8\", locEN));\r\n \t\t\r\n \t\ttestEvent(EventType.START_DOCUMENT, null);\r\n \t\t\r\n \t\t// Line 1\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value11\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value12\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value13\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value14\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 2\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value21\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value22.1,Value22.2, Value22.3\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value23\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value24\");\t\t\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\t\t\r\n \t\t// Line 4-7\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value31\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value32\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value33\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value34.1 Value34.2 Value34.3 Value34.4,Value34.5\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value35\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 9-12\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value41\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value42\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value43\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value44.1 Value44.2 Value44.3 Value44.4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value45.1,Value45.2\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\t\t\r\n \t\t\r\n \t\t// Line 14-18\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value51\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value52\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value53\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value54.1 Value54.2 Value54.3 Value54.4,Value55.1,Value55.2 Value55.3,Value55.4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 20\r\n \t\t// Line 20-25\r\n \t\ttestEvent(EventType.START_GROUP, null);\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value61\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value62\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value63\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value64.1 Value64.2 Value64.3 Value64.4,Value65.1,Value65.2 Value65.3,Value65.4 \" +\r\n \t\t\t\t\"Value65.5,Value66\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t// -------------------------------------------------\r\n \t\t\r\n \t\t// Line 27-31\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value71\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"Value72 aaa quoted part 1, then quoted part 2 value,Value73,Value74 \" +\r\n \t\t\t\t\"Value81,Value82 with unclosed quote Value91,Value92 ValueA1,ValueA2 ValueB1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB2,ValueB3\");\t\t// If quotation marks are not around field, preserve them \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueB4\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\t// Line 32\r\n \t\ttestEvent(EventType.START_GROUP, null);\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC1\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC2\");\t\t \r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC3\");\t\t\t\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC4\");\r\n \t\ttestEvent(EventType.TEXT_UNIT, \"ValueC5\");\r\n \t\ttestEvent(EventType.END_GROUP, null);\r\n \t\t\r\n \t\ttestEvent(EventType.END_DOCUMENT, null);\r\n \t\tfilter.close();\r\n \t}", "Set<String> getHeaderNames();", "public ResultSet selecionar(String tabela);", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "private void processHeader(String header) {\n this.header = header + System.lineSeparator(); // Store the header for writing back.\n\n String[] headers = header.split(\"\\\",\\\"\");\n for (int i = 0; i < headers.length; i++) {\n String columnName = headers[i].replaceAll(\"\\\"\", \"\");\n this.headerMap.put(i, columnName);\n }\n }", "public String[] parseCsv(Reader reader, String separator, boolean hasHeader) throws IOException {\n List<String> columnNames = new LinkedList<String>();\n String[] nodesInfo = new String[GlobalVar.numberOfNodes];\n int nodeCount=0;\n BufferedReader br = null;\n br = new BufferedReader(reader);\n String line;\n int numLines = 0;\n while ((line = br.readLine()) != null) {\n if (!line.startsWith(\"#\")) {\n String[] tokens = line.split(separator);\n if (tokens != null) {\n if (numLines == 0) {\n for (int i = 0; i < tokens.length; ++i) {\n columnNames.add(hasHeader ? tokens[i] : (\"row_\"+i));\n }\n } else {\n nodesInfo[nodeCount++]= tokens[0]; \n }\n \n }\n ++numLines; \n }\n }\n return nodesInfo;\n }", "public void readTable() {\r\n\r\n try ( BufferedReader b = new BufferedReader(new FileReader(\"Hashdata.txt\"))) {\r\n\r\n String line;\r\n ArrayList<String> arr = new ArrayList<>();\r\n while ((line = b.readLine()) != null) {\r\n\r\n arr.add(line);\r\n }\r\n\r\n for (String str : arr) {\r\n this.load(str);\r\n }\r\n this.print();\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Unable to read file\");\r\n }\r\n\r\n this.userInterface();\r\n\r\n }", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "public abstract T readDataFile(String fileLine);", "public static Set<String> commaDelimitedStringToSet(String s) {\n Set<String> set = new HashSet<String>();\n String[] split = s.split(\",\");\n for (String aSplit : split) {\n String trimmed = aSplit.trim();\n if (trimmed.length() > 0)\n set.add(trimmed);\n }\n return set;\n }", "List<String[]> readCsv(String inputFilePath)throws IOException;", "public abstract boolean read(String line);", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "public void setRuleColumnSet(Set<String> ruleColumnSet) {\n this.ruleColumnSet = ruleColumnSet;\n }", "java.lang.String getColumn();", "public StringSet() {\r\n\t\tsuper();\r\n\t}", "public boolean nextSet() throws Exception {\n if (m_iInputStream == null)\n return false;\n\n // clear the set buffer and token index\n m_nTokenIndex = 0;\n m_sSetBuffer.setLength(0);\n\n int nNextChar = 0;\n boolean bSetEnd = false;\n // check for both new line characters and end-of-file\n while (!bSetEnd && (nNextChar = m_iInputStream.read()) >= 0) {\n m_sSetBuffer.append((char) nNextChar);\n bSetEnd = m_oSetDelim.matches((char) nNextChar);\n }\n\n // remove the line termination characters\n if (bSetEnd)\n m_sSetBuffer.setLength(m_sSetBuffer.length() - m_oSetDelim.length());\n\n // skip blank lines, there might not be any tokens\n // in the current set, but there might be more sets\n return (nNextChar >= 0);\n }", "public void readLine(String line) {\n\t\tif (line.length() < 32) {\n\t\t\twhile (line.length() < 32) {\n\t\t\t\tline += \"0\";\n\t\t\t}\n\t\t}\n\n\t\tint begin = 0;\n\t\tint end = 2;\n\n\t\t\n\t\tfor (int row = 0; row < 4; row++) {\n\t\t\tfor (int col = 0; col < 4; col++) {\n\t\t\t\t// int val = 0;\n\t\t\t\tString hexVal = line.substring(begin, end);\n\t\t\t\thexVal = \"0x\" + hexVal;\n\t\t\t\tchar val; \n\t\t\t\ttry {\n\t\t\t\t\tval = (char) Integer.decode(hexVal).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// System.out.println(\"Error: Key has non hex characters.\");\n\t\t\t\t\tthis.state = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.state[row][col] = val;\n\t\t\t\tbegin += 2;\n\t\t\t\tend += 2;\n\t\t\t}\n\t\t}\n\t}", "private RecordSet getRecordSet(String arg[]){\n RecordSet datos = new RecordSet();\n datos.addColumn(\"CODIGO\");\n\t\tdatos.addColumn(\"VALOR\"); \n\n for(int j=0;j<arg.length;j++) { \n datos.addRow(new Object[] { arg[j], arg[j] }); \n }\n return datos;\n }", "private Set parseSQL(String sqlin){\r\n \tSet columnProposals = new HashSet();\r\n \t//Find the end of \"SELECT\" and the start of \"FROM\"\r\n \t//if you dont find SELECT run away\r\n \tint selectStartPos = sqlin.toLowerCase().indexOf(\"select\", 0);\r\n \tint fromStartPos = sqlin.toLowerCase().indexOf(\"from\", 0);\r\n \tif(selectStartPos == -1){\r\n \t\treturn null;\r\n \t}\r\n \tif(fromStartPos == -1){\r\n \t\treturn null;\r\n \t}\r\n \t\r\n \t//Ok, so we found a SELECT and a FROM, lets get the middle bit!\r\n \tString allColumns = sqlin.substring(selectStartPos + (\"select\").length(), fromStartPos).trim();\r\n \tString[] columnArray = allColumns.split(\",\");\r\n \t\r\n \tfor(int i=0; i<columnArray.length; i++){\r\n \t\tString column = columnArray[i].trim();\r\n \t\t//We need to find if it has an AS\r\n \t\t\r\n \t\tint findAS = column.toLowerCase().indexOf(\" as \", 0);\r\n \t\t\r\n \t\tif(findAS != -1){\r\n \t\t\tcolumn = column.substring(findAS + 4, column.length()).trim();\r\n \t\t}\r\n \t\tcolumnProposals.add(column);\r\n \t}\r\n \treturn columnProposals;\r\n }", "@Override\n\tpublic void firstLine(String line) {\n\t\t// read variable names, build map of name -> column\n\t\tfinal Map<String, Integer> vars = Maps.newHashMap();\n\t\tvariableNames = parseCsvLine(line);\n\t\tint column = 0;\n\t\tfor (String var : variableNames) {\n\t\t\tvars.put(var, column++);\n\t\t}\n\n\t\t// record target column and establish dictionary for decoding target\n\t\ttarget = vars.get(targetName);\n\n\t\t// record id column\n\t\tif (idName != null) {\n\t\t\tid = vars.get(idName);\n\t\t}\n\n\t\t// create list of predictor column numbers\n\t\tpredictors = Lists.newArrayList(Collections2.transform(typeMap.keySet(), new Function<String, Integer>() {\n\t\t\t@Override\n\t\t\tpublic Integer apply(String from) {\n\t\t\t\tInteger r = vars.get(from);\n\t\t\t\tPreconditions.checkArgument(r != null, \"Can't find variable %s, only know about %s\", from, vars);\n\t\t\t\treturn r;\n\t\t\t}\n\t\t}));\n\n\t\tif (includeBiasTerm) {\n\t\t\tpredictors.add(-1);\n\t\t}\n\t\tCollections.sort(predictors);\n\n\t\t// and map from column number to type encoder for each column that is a\n\t\t// predictor\n\t\tpredictorEncoders = Maps.newHashMap();\n\t\tfor (Integer predictor : predictors) {\n\t\t\tString name;\n\t\t\tClass<? extends FeatureVectorEncoder> c;\n\t\t\tif (predictor == -1) {\n\t\t\t\tname = INTERCEPT_TERM;\n\t\t\t\tc = ConstantValueEncoder.class;\n\t\t\t} else {\n\t\t\t\tname = variableNames.get(predictor);\n\t\t\t\tc = TYPE_DICTIONARY.get(typeMap.get(name));\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tPreconditions.checkArgument(c != null, \"Invalid type of variable %s, wanted one of %s\",\n\t\t\t\t\t\ttypeMap.get(name), TYPE_DICTIONARY.keySet());\n\t\t\t\tConstructor<? extends FeatureVectorEncoder> constructor = c.getConstructor(String.class);\n\t\t\t\tPreconditions.checkArgument(constructor != null, \"Can't find correct constructor for %s\",\n\t\t\t\t\t\ttypeMap.get(name));\n\t\t\t\tFeatureVectorEncoder encoder = constructor.newInstance(name);\n\t\t\t\tpredictorEncoders.put(predictor, encoder);\n\t\t\t\tencoder.setTraceDictionary(traceDictionary);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\tthrow new IllegalStateException(CANNOT_CONSTRUCT_CONVERTER, e);\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testUTF8() throws IOException {\n\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\tnew InputStreamReader(new FileInputStream(UTF8_FILE), \"UTF-8\")\n\t\t);\n\t\tReadTestCSVFile(reader);\n\t}", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "public Sample load(BufferedReader r) throws IOException {\n\tString line = r.readLine();\n\tif (line==null || !line.startsWith(\"HEADER:\"))\n\t throw new WrongFiletypeException(); // no HEADER: found\n\n\t// new sample, with given filename\n\tSample s = new Sample();\n\n\t// don't know end, yet\n\tYear end = null;\n\tint length = -1;\n\n\t// metadata\n\tfor (;;) {\n\t // read a line\n\t line = r.readLine();\n\n\t // got to data, stop\n\t if (line.startsWith(\"DATA:\"))\n\t\tbreak;\n\n\t // parse line as \"variable = value\", and put into s.meta\n\t int i = line.indexOf(\"=\");\n\t if (i == -1)\n\t\tthrow new WrongFiletypeException();\n\t String tag = line.substring(0, i);\n\t String value = line.substring(i+1);\n\n\t // got end-date.\n\t if (tag.equals(\"DateEnd\"))\n\t\tend = new Year(value);\n\t \n\t if (tag.equals(\"Length\"))\n\t \tlength = Integer.parseInt(value);\n\n\t // WRITE ME: parse other tags and interpret metadata as\n\t // intelligently as possible\n\t}\n\n\ts.count = new ArrayList();\n\ts.incr = new ArrayList();\n\ts.decr = new ArrayList();\n\n\t// data -- i'll assume all data is (width,count,up,down)\n\tStreamTokenizer t = new StreamTokenizer(r);\n\tint idx = 0;\n\t\n\tfor (;;) {\n\t // parse (datum, count, up, dn)\n\t\tint datum, count, up, dn;\n\t\ttry {\n\t\t\t\tt.nextToken();\n\t\t\t\tdatum = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tcount = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tup = (int) t.nval;\n\t\t\t\tt.nextToken();\n\t\t\t\tdn = (int) t.nval;\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new WrongFiletypeException();\n\t\t}\n\n\t // (0,0,0,0) seems to mean end-of-sample\n\t if (datum == 0)\n\t \tbreak;\n\n\t // add to lists\n\t s.data.add(new Integer(datum));\n\t s.count.add(new Integer(count));\n\t s.incr.add(new Integer(up));\n\t s.decr.add(new Integer(dn));\n\t \n\t idx++;\n\t \n\t // break out if we have 'length' samples\n\t if(idx == length)\n\t \tbreak;\n\t}\n\n\t// no end? die.\n\tif (end == null)\n\t throw new WrongFiletypeException();\n\n\t// set range, and return\n\ts.range = new Range(end.add(1 - s.data.size()), end);\n\treturn s;\n }", "public static DataSet dataSetFromFile(String path) {\n\t\tDataSet dataSet = new DataSet();\n\t\t\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tif(line.trim().equals(\"\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString[] lineItems = line.split(\",\");\n\t\t\t\t \n\t\t\t\tArrayList<String> dataSetRow = new ArrayList<String>();\n\t\t\t\t \n\t\t\t\tfor(String item : lineItems) {\n\t\t\t\t\tdataSetRow.add(item.trim());\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\tdataSet.rows.add(dataSetRow);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn dataSet;\n\t}", "void setHeader(java.lang.String header);", "static int readHeaders(InputStream stream, String [] aHeaders) throws IOException\n {\n boolean bEmptyLine = false;\n int iIndex;\n int iNumElements = aHeaders.length;\n \n for(iIndex=0; !bEmptyLine && (iIndex <= iNumElements); iIndex+=2)\n {\n String sThisLine = readLine(stream).trim();\n int iLength = sThisLine.length();\n \n if (iLength == 0)\n {\n bEmptyLine = true;\n }\n else\n {\n int iSeparator = sThisLine.indexOf(\":\");\n if (-1 != iSeparator)\n {\n aHeaders[iIndex] = sThisLine.substring(0, iSeparator).trim();\n aHeaders[iIndex+1] = sThisLine.substring(iSeparator+1).trim();\n //System.out.println(\"Read: \" + aHeaders[iIndex] + \": \" + aHeaders[iIndex+1]);\n }\n else\n {\n // I couldn't make out anything\n aHeaders[iIndex] = sThisLine;\n aHeaders[iIndex+1] = null;\n //System.out.println(\"Read-: \" + aHeaders[iIndex]);\n }\n }\n }\n \n return (iIndex > iNumElements) ? -1 : iIndex;\n }", "private String getStringFromResultSet(ResultSet rs) throws SQLException, UnsupportedEncodingException {\n ResultSetMetaData meta = rs.getMetaData();\n\n StringBuilder sb = new StringBuilder();\n\n int numColumns = meta.getColumnCount();\n for (int i = 1; i <= numColumns; i++) {\n sb.append(meta.getColumnLabel(i));\n if (i == numColumns) {\n sb.append('\\n');\n } else {\n sb.append('\\t');\n }\n }\n\n\n JMeterVariables jmvars = getThreadContext().getVariables();\n String varnames[] = getVariableNames().split(COMMA);\n String resultVariable = getResultVariable().trim();\n List<Map<String, Object>> results = null;\n if (resultVariable.length() > 0) {\n results = new ArrayList<Map<String, Object>>();\n jmvars.putObject(resultVariable, results);\n }\n int j = 0;\n while (rs.next()) {\n Map<String, Object> row = null;\n j++;\n for (int i = 1; i <= numColumns; i++) {\n Object o = rs.getObject(i);\n if (results != null) {\n if (row == null) {\n row = new HashMap<String, Object>(numColumns);\n results.add(row);\n }\n row.put(meta.getColumnLabel(i), o);\n }\n if (o instanceof byte[]) {\n o = new String((byte[]) o, ENCODING);\n }\n sb.append(o);\n if (i == numColumns) {\n sb.append('\\n');\n } else {\n sb.append('\\t');\n }\n if (i <= varnames.length) { // i starts at 1\n String name = varnames[i - 1].trim();\n if (name.length() > 0) { // Save the value in the variable if present\n jmvars.put(name + UNDERSCORE + j, o == null ? null : o.toString());\n }\n }\n }\n if (NumberUtils.isNumber(getResultSetReadDelay())) {\n try {\n Thread.sleep(Long.valueOf(getResultSetReadDelay()));\n } catch (InterruptedException e) {\n log.warn(\"Result set read delay caused InterruptedException.\", e);\n }\n }\n }\n // Remove any additional values from previous sample\n for (int i = 0; i < varnames.length; i++) {\n String name = varnames[i].trim();\n if (name.length() > 0 && jmvars != null) {\n final String varCount = name + \"_#\"; // $NON-NLS-1$\n // Get the previous count\n String prevCount = jmvars.get(varCount);\n if (prevCount != null) {\n int prev = Integer.parseInt(prevCount);\n for (int n = j + 1; n <= prev; n++) {\n jmvars.remove(name + UNDERSCORE + n);\n }\n }\n jmvars.put(varCount, Integer.toString(j)); // save the current count\n }\n }\n\n return sb.toString();\n }", "public Set<String> readFile(File file)throws IOException{\n Scanner scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n Set<String> data = new HashSet<>();\n\n while(scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n return data;\n }", "public Set<String> loadWordsFromCSV(final String filePath) {\n\t\treturn loadWords(filePath, \",\");\n\t}", "static void parseData(Map<String, Set<String>> sourceOutputStrings, Set<String> trueTuples) throws IOException{\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\t\n\t\tSet<String> bookSet = new HashSet<String>();\n\t\tSet<String> authorSet = new HashSet<String>();\n\t\tSet<String> tupleSet = new HashSet<String>();\n\t\tSet<String> sourceSet = new HashSet<String>();\n\t\t\n\t\tString s;\n\t\tSet<String> sourceBlackList = new HashSet<String>();\n\t\t// remove below books? increases isolated errors, although there should still be correlations between errors such as using first name\n\t\tsourceBlackList.add(\"A1Books\");\n\t\tsourceBlackList.add(\"Indoo.com\");\n\t\tsourceBlackList.add(\"Movies With A Smile\");\n\t\tsourceBlackList.add(\"Bobs Books\");\n\t\tsourceBlackList.add(\"Gunars Store\");\n\t\tsourceBlackList.add(\"Gunter Koppon\");\n\t\tsourceBlackList.add(\"Quartermelon\");\n\t\tsourceBlackList.add(\"Stratford Books\");\n\t\tsourceBlackList.add(\"LAKESIDE BOOKS\");\n\t\tsourceBlackList.add(\"Books2Anywhere.com\");\n\t\tsourceBlackList.add(\"Paperbackshop-US\");\n\t\tsourceBlackList.add(\"tombargainbks\");\n\t\tsourceBlackList.add(\"Papamedia.com\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\t\n\t\tPattern pattern = Pattern.compile(\"[^a-z]\", Pattern.CASE_INSENSITIVE);\n\t\twhile ((s = dataFile.readLine()) != null) {\n\t\t\tif (s.indexOf('\\t') == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length != 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String sourceId = fields[0];\n\t\t\tif (sourceBlackList.contains(sourceId)) {\n\t\t\t\t//continue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[1];\n\t\t\tfinal String authorString = fields[3];\n\t\t\tList<String> authorList = parseAuthorString(authorString);\n\t\t\t\n\t\t\tbookSet.add(bookId);\n\t\t\tauthorSet.addAll(authorList);\n\t\t\tsourceSet.add(sourceId);\n\t\t\tif (!sourceOutputStrings.containsKey(sourceId)) {\n\t\t\t\tsourceOutputStrings.put(sourceId, new HashSet<String>());\n\t\t\t}\n\t\t\tfor (String author : authorList) {\n\t\t\t\tMatcher matcher = pattern.matcher(author.trim());\n\t\t\t\tif (matcher.find()) {\n\t\t\t\t\tcontinue; // Skip author names that have a special character, since they are likely a parsing error.\n\t\t\t\t}\n\t\t\t\tif (author.equals(\"\")) { // Sometimes, trailing commas result in empty author strings. \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfinal String tuple = bookId + \"\\t\" + author.trim();\n\t\t\t\ttupleSet.add(tuple);\n\t\t\t\tsourceOutputStrings.get(sourceId).add(tuple);\n\t\t\t}\n\t\t}\n\t\tdataFile.close();\n\n\t\tBufferedReader labelledDataFile = new BufferedReader(new FileReader(ISBNLABELLEDDATAFILE));\t\t\n\t\twhile ((s = labelledDataFile.readLine()) != null) {\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[0];\n\t\t\tfinal String authorString = fields[1];\n\t\t\tString[] authors = authorString.split(\"; \");\n\t\t\tfor (int i = 0; i < authors.length; i++) {\n\t\t\t\tauthors[i] = canonicalize(authors[i].trim());\n\t\t\t\ttrueTuples.add(bookId + \"\\t\" + authors[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelledDataFile.close();\n\t}", "@Test(timeout = 4000)\n public void test034() throws Throwable {\n StringReader stringReader0 = new StringReader(\"\\\"for\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 114, (-473));\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n char[] charArray0 = new char[1];\n stringReader0.read(charArray0);\n javaParserTokenManager0.getNextToken();\n assertEquals(2, javaCharStream0.bufpos);\n assertEquals((-471), javaCharStream0.getColumn());\n }", "default String[][] txtReader(String fileString) {\n\t\ttry {\n\t\t\tScanner myReader = new Scanner(new File(fileString));\n\t\t\tArrayList<String[]> lines = new ArrayList<>();\n\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString[] splitted = myReader.nextLine().split(\" \");\n\t\t\t\tlines.add(splitted);\n\t\t\t}\n\n\t\t\tString[][] result = new String[lines.size()][];\n\t\t\tfor (int i = 0; i < result.length; i++) {\n\t\t\t\tresult[i] = lines.get(i);\n\t\t\t}\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file is not occurred \" + e.getMessage());\n\t\t}\n\t\treturn null;\n\n\t}", "public static void parseQueryString(String queryString) {\n\n System.out.println(\"STUB: Calling parseQueryString(String s) to process queries\");\n System.out.println(\"Parsing the string:\\\"\" + queryString + \"\\\"\");\n queryString = queryString.toLowerCase();\n String colName = queryString.substring(0,queryString.indexOf(\"from\")+5).trim();\n String colNames[] = removeWhiteSpacesInArray(colName.split(\" \"));\n ArrayList<String> queryStringList = new ArrayList<String>(Arrays.asList(colNames));\n queryStringList.remove(\"select\");\n queryStringList.remove(\"from\");\n String condition = \"\";\n String keyValueCond[] = new String[]{};\n String tableName = \"\";\n if(queryString.contains(\"where\")) {\n tableName = queryString.substring(queryString.indexOf(\"from\") + 5, queryString.indexOf(\"where\")).trim();\n condition = queryString.substring(queryString.indexOf(\"where\")+6, queryString.length()).trim();\n keyValueCond = removeWhiteSpacesInArray(condition.split(\" \"));\n }else\n tableName = queryString.substring(queryString.indexOf(\"from\")+5).trim();\n try {\n Table table = new Table(tableName.concat(\".tbl\"));\n int noOfRecords = table.page.getNoOfRecords();\n long pos = table.page.getStartofContent();\n TreeMap<String, String> colOrder = columnOrdinalHelper.getColumnsInOrdinalPositionOrder(tableName);\n int recordLength = Integer.parseInt(recordLengthHelper.getProperties(tableName.concat(\".\").concat(Constant.recordLength)));\n if(keyValueCond.length>0){\n\n }else{\n Iterator it = colOrder.entrySet().iterator();\n while (it.hasNext()){\n Map.Entry<String, String> entryPair = (Map.Entry<String, String>) it.next();\n// ReadResult<Object> readResult = table.page.readIntasByte(pos);\n// System.out.println(readResult.getT());\n ReadResult<Object> readResult = RecordFormat.readRecordFormat(columnTypeHelper.getProperties(entryPair.getValue()),table,pos);\n System.out.println(\"RESULT COLUMN NAME : \"+entryPair.getValue()+\" Value : \"+readResult.getT());\n\n }\n\n }\n\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public static HashMap<String, ArrayList<String>> parseCreateString(String createTableString, boolean metadata) throws FileNotFoundException {\n\n /*\n CREATE TABLE CUSTOMERS( ID INT PRIMARY KEY,NAME TEXT NOT NULL,AGE INT);\n */\n\n System.out.println(\"STUB: Calling your method to create a table\");\n System.out.println(\"Parsing the string:\\\"\" + createTableString + \"\\\"\");\n createTableString = createTableString.toLowerCase();\n String tablename = createTableString.substring(0, createTableString.indexOf(\"(\")).split(\" \")[2].trim();\n String tablenamefile = tablename + \".tbl\";\n Table newTable = new Table(tablenamefile, Constant.leafNodeType);\n HashMap<String, ArrayList<String>> columndata = new HashMap<>();\n TreeMap<Integer, String> columnOrdinalPosition = new TreeMap<>();\n int record_length = 0;\n Matcher m = Pattern.compile(\"\\\\((.*?)\\\\)\").matcher(createTableString);\n while (m.find()) {\n String cols = m.group(1);\n String singlecol[] = cols.split(\",\");\n ArrayList<String> colname;\n int ordinalPosition = 1;\n for (int i = singlecol.length - 1; i >= 0; i--) {\n\n\n colname = new ArrayList<>();\n singlecol[i] = singlecol[i].trim();\n String colNameType[] = singlecol[i].split(\" \");\n colNameType = removeWhiteSpacesInArray(colNameType);\n //columntype\n colname.add(0, colNameType[1]);\n\n columnTypeHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), colNameType[1]);\n record_length = record_length + RecordFormat.getRecordFormat(colNameType[1]);\n colname.add(1, \"yes\");\n //ordinaltype\n colname.add(2, String.valueOf(++ordinalPosition));\n columnOrdinalPosition.put(ordinalPosition, tablename.concat(\".\").concat(colNameType[0]));\n if (colNameType.length == 4) {\n if (colNameType[2].equals(\"primary\")) {\n colname.set(1, \"pri\");\n colname.set(2, String.valueOf(1));\n columnOrdinalPosition.remove(ordinalPosition);\n columnOrdinalPosition.put(1, tablename.concat(\".\").concat(colNameType[0]));\n --ordinalPosition;\n } else\n colname.set(1, \"no\");\n columnNotNullHelper.setProperties(tablename.concat(\".\").concat(colNameType[0]), \"NOT NULL\");\n }\n columndata.put(colNameType[0], colname);\n }\n\n }\n\n Iterator it = columnOrdinalPosition.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry pair = (Map.Entry) it.next();\n columnOrdinalHelper.setProperties(String.valueOf(pair.getValue()), String.valueOf(pair.getKey()));\n }\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.recordLength), String.valueOf(record_length));\n recordLengthHelper.setProperties(tablename.concat(\".\").concat(Constant.numberOfColumns), String.valueOf(columnOrdinalPosition.size()));\n if (!metadata) {\n updateTablesTable(tablename, record_length);\n updateColumnsTable(tablename, columndata);\n }\n return columndata;\n\n }", "public Set<String> getEntry(String key){\n if(mTable == null )\n return new TreeSet<String>();\n if(mTable.containsKey(key)){\n return mTable.get(key);\n }\n return new TreeSet<String>();\n }", "public Reader getCharacterStream(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getCharacterStream\", columnName);\n return get(columnName).getReader();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void readFields(ResultSet arg0) throws SQLException {\n\t\tthis.startingPhrase = arg0.getString(1);\n\t\tthis.followingWord = arg0.getString(2);\n\t\tthis.count = arg0.getInt(3);\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate void mockStringResultSet(String[][] rows) throws SQLException {\n\n\t\tOngoingStubbing rsNextStub = when(mockResultSet.next());\n\t\tfor (int i = 0; i < rows.length; i++) {\n\t\t\trsNextStub = rsNextStub.thenReturn(true);\n\t\t}\n\t\trsNextStub.thenReturn(false);\n\n\t\tOngoingStubbing rsGetString1Stub = when(mockResultSet.getString(1));\n\t\tfor (int i = 0; i < rows.length; i++) {\n\t\t\trsGetString1Stub = rsGetString1Stub.thenReturn(rows[i][0]);\n\t\t}\n\n\t\tOngoingStubbing rsGetString2Stub = when(mockResultSet.getString(2));\n\t\tfor (int i = 0; i < rows.length; i++) {\n\t\t\trsGetString2Stub = rsGetString2Stub.thenReturn(rows[i][1]);\n\t\t}\n\n\t\tOngoingStubbing rsGetString3Stub = when(mockResultSet.getString(3));\n\t\tfor (int i = 0; i < rows.length; i++) {\n\t\t\trsGetString3Stub = rsGetString3Stub.thenReturn(rows[i][2]);\n\t\t}\n\t}" ]
[ "0.62698", "0.6179089", "0.5447644", "0.5414349", "0.51701707", "0.5024906", "0.4986615", "0.49228802", "0.48874286", "0.48287326", "0.48190692", "0.46874827", "0.46470788", "0.46435142", "0.4609127", "0.4581574", "0.45734292", "0.45705116", "0.45525488", "0.45521674", "0.45505068", "0.4547706", "0.45279416", "0.4497785", "0.4489177", "0.44735146", "0.44327062", "0.44095927", "0.44051647", "0.44002625", "0.43947956", "0.43884584", "0.4380841", "0.43744004", "0.4352725", "0.4349915", "0.43401662", "0.4315491", "0.4312731", "0.4307299", "0.4296169", "0.42898902", "0.4288149", "0.4280803", "0.42724508", "0.42690387", "0.42644355", "0.426202", "0.42588663", "0.42415863", "0.42379525", "0.42355344", "0.4226864", "0.42225698", "0.4215424", "0.4213466", "0.4212111", "0.42064217", "0.42011622", "0.41996673", "0.41995394", "0.41848984", "0.4176347", "0.41721162", "0.41697437", "0.4159135", "0.41442806", "0.4134127", "0.4129813", "0.41288665", "0.41138408", "0.41125503", "0.41105393", "0.41102275", "0.41089454", "0.4106334", "0.41027546", "0.4101409", "0.4096215", "0.4093924", "0.40710667", "0.40622872", "0.40612015", "0.40598494", "0.4053997", "0.40489662", "0.40488866", "0.40424737", "0.40416163", "0.40412295", "0.40395987", "0.40362465", "0.40352654", "0.40346852", "0.4031356", "0.4031312", "0.40279222", "0.40216798", "0.40215555", "0.4013556" ]
0.717628
0
Read a string set from this file. The strings to be put in the set are taken from the specified column. This process exhausts the file.
private void readIntoSet(String column, Set<String> retVal) throws IOException { int idx = this.findField(column); for (TabbedLineReader.Line line : this) { String value = line.get(idx); retVal.add(value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Set<String> readSet(File inFile, String column) throws IOException {\n Set<String> retVal = new HashSet<String>();\n try (TabbedLineReader reader = new TabbedLineReader(inFile)) {\n reader.readIntoSet(column, retVal);\n }\n return retVal;\n }", "public static Set<String> readSet(InputStream inStream, String column) throws IOException {\n Set<String> retVal = new HashSet<String>();\n try (TabbedLineReader reader = new TabbedLineReader(inStream)) {\n reader.readIntoSet(column, retVal);\n }\n return retVal;\n }", "Set<String> readData();", "public static List<String> readColumn(File inFile, String string) throws IOException {\n List<String> retVal = new ArrayList<String>(100);\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int inCol = inStream.findField(string);\n for (TabbedLineReader.Line line : inStream)\n retVal.add(line.get(inCol));\n }\n return retVal;\n }", "public static Set readingFiles(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n\n return lines.collect(Collectors.toSet());//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n\n //set.forEach(System.out::print);\n\n\n }", "void makeSet(BufferedReader br) throws Exception {\n\t\tString[] parts = null;\n\t\tint i;\n\t\tfor (String line; (line = br.readLine()) != null;) {\n\t\t\tparts = eatquotedStrings(line);\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tparts[i] = parts[i].replaceAll(\"\\\"\", \"\");\n\t\t\t}\n\t\t\tset.add(parts[0]);\n\t\t}\n\t\tbr.close();\n\t}", "Set<String> getInterpetAsTrueStrings(int columnIndex);", "public void readFileInHashSet() throws IOException {\n\t\tFileReader fileR = new FileReader(MOCK_DATAPath);\n\t\tBufferedReader buffR = new BufferedReader(fileR);\n\t\tcitiesSet = new HashSet<>();\n\t\tcountriesSet = new HashSet<>();\n\t\tString line = \"\";\n\t\twhile ((line = buffR.readLine()) != null) {\n\t\t\tString tempWithComma = line;\n\t\t\tString tempOutComma[] = tempWithComma.split(\",\");\n\t\t\tcitiesSet.add(tempOutComma[0]);\n\t\t\tcountriesSet.add(tempOutComma[1]);\n\t\t}\n\t}", "public Set<String> readFile(File file)throws IOException{\n Scanner scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n Set<String> data = new HashSet<>();\n\n while(scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n return data;\n }", "private String stringValue(String columnName) {\r\n String value = null;\r\n try {\r\n if ((rowSet != null) && selectContactInRowSet()) {\r\n value = rowSet.getString(columnName);\r\n }\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n return value;\r\n }", "@Test public void testStrings() {\n Frame fr = null;\n try {\n fr = parseTestFile(\"smalldata/junit/string_test.csv\");\n\n //check dimensions\n int nlines = (int)fr.numRows();\n Assert.assertEquals(65005,nlines);\n Assert.assertEquals(7,fr.numCols());\n\n //check column types\n Vec[] vecs = fr.vecs();\n Assert.assertTrue(vecs[0].isString());\n Assert.assertTrue(vecs[1].isString());\n Assert.assertTrue(vecs[2].isString());\n Assert.assertTrue(vecs[3].isString());\n Assert.assertTrue(vecs[4].isString());\n Assert.assertTrue(vecs[5].isString());\n Assert.assertTrue(vecs[6].isString());\n\n //checks column counts - expects MAX_CATEGORICAL_COUNT == 65000\n //Categorical registration is racy so actual categorical limit can exceed MAX by a few values\n Assert.assertTrue(65003 <= vecs[0].nzCnt()); //ColV2 A lacks starting values\n Assert.assertTrue(65002 <= vecs[1].nzCnt()); //ColV2 B has random missing values & dble quotes\n Assert.assertTrue(65005 <= vecs[2].nzCnt()); //ColV2 C has all values & single quotes\n Assert.assertTrue(65002 <= vecs[3].nzCnt()); //ColV2 D missing vals just prior to Categorical limit\n Assert.assertTrue(65003 <= vecs[4].nzCnt()); //ColV2 E missing vals just after Categorical limit hit\n //Assert.assertTrue(65000 <= vecs[5].domain().length); //ColV2 F cardinality just at Categorical limit\n Assert.assertTrue(65003 <= vecs[6].nzCnt()); //ColV2 G missing final values\n\n //spot check value parsing\n BufferedString str = new BufferedString();\n Assert.assertEquals(\"A2\", vecs[0].atStr(str, 2).toString());\n Assert.assertEquals(\"B7\", vecs[1].atStr(str, 7).toString());\n Assert.assertEquals(\"'C65001'\", vecs[2].atStr(str, 65001).toString());\n Assert.assertEquals(\"E65004\", vecs[4].atStr(str, 65004).toString());\n Assert.assertNull(vecs[6].atStr(str, 65004));\n\n fr.delete();\n } finally {\n if( fr != null ) fr.delete();\n }\n }", "public StringSet() {\r\n\t\tsuper();\r\n\t}", "public void setString(String data, int row, int column) {\n\t\tcolumns[column].setString(data, subset[row]);\n\t}", "private void readStringCells( InputStream istrm ) throws IOException {\n PushbackInputStream stream =\n new PushbackInputStream( new BufferedInputStream( istrm ) );\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\r':\n case '\\n':\n endRow();\n break;\n case '#':\n if ( rows.size() == 0 ) {\n comments.add( eatLine( stream ) );\n }\n else {\n eatLine( stream );\n }\n endRow();\n break;\n case ' ':\n case '\\t':\n break;\n case '\"':\n case '\\'':\n stream.unread( c );\n addCell( readString( stream ) );\n break;\n case END:\n done = true;\n endRow();\n break;\n default:\n stream.unread( c );\n addCell( readToken( stream ) );\n }\n }\n stream.close();\n }", "public void updateCharacterStream(String columnName, Reader x) throws SQLException {\n\n updateCharacterStream(columnName, x, -1);\n }", "public Set<String> getColumns();", "private Set<String> parseStringToSet(final String data) {\n String[] splits;\n\n if (data != null && data.length() > 0) {\n splits = data.split(\",\");\n } else {\n splits = new String[] {};\n }\n\n Set<String> set = new HashSet<String>();\n if (splits.length > 0) {\n for (String split : splits) {\n set.add(split.trim());\n }\n }\n\n return set;\n }", "public Set<String> mo16916b(String str, Set<String> set) {\n try {\n return this.f9119b.getStringSet(str, set);\n } catch (Throwable unused) {\n return set;\n }\n }", "private static List<String> loadGenericDfFile(String file) throws IOException{\n\t\tList<String> lines = new ArrayList<String>();\n\t\t\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tnew FileInputStream(file), \"UTF-8\"));\n\t\ttry {\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tlines.add(str);\n\t\t\t}\n\t\t} finally {\n\t\t\tin.close();\n\t\t}\n\n\t\treturn lines;\n\t}", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "public boolean nextSet() throws Exception {\n if (m_iInputStream == null)\n return false;\n\n // clear the set buffer and token index\n m_nTokenIndex = 0;\n m_sSetBuffer.setLength(0);\n\n int nNextChar = 0;\n boolean bSetEnd = false;\n // check for both new line characters and end-of-file\n while (!bSetEnd && (nNextChar = m_iInputStream.read()) >= 0) {\n m_sSetBuffer.append((char) nNextChar);\n bSetEnd = m_oSetDelim.matches((char) nNextChar);\n }\n\n // remove the line termination characters\n if (bSetEnd)\n m_sSetBuffer.setLength(m_sSetBuffer.length() - m_oSetDelim.length());\n\n // skip blank lines, there might not be any tokens\n // in the current set, but there might be more sets\n return (nNextChar >= 0);\n }", "public void load(String file){\n try{\n Scanner sc = new Scanner(new FileReader(file));\n ArrayList <String> saving = new ArrayList<String>();\n boolean line = sc.hasNext();\n while(line ==true ){\n String x = sc.next();\n if(!(x.contains(\"CO\")||x.contains(\"CB\"))){\n saving.add(x);\n line = sc.hasNext();\n }\n }\n sc.close();\n setValues(saving);\n }catch(IOException e){\n JOptionPane.showMessageDialog(null, \"error in reading file\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\t@Transactional\n\tpublic List<String> leerColumnasTxtDelServidor(String ubicacion) {\n\t\tList<String> lines = Collections.emptyList();\n\t\tList<String> listadoColumnas = new ArrayList<String>(); // Agregar nombres de la columna\n\t\tSpssDataFileReader reader = null;\n\t\ttry {\n\n\t\t\tlines = Files.readAllLines(Paths.get(ubicacion), StandardCharsets.UTF_8);\n\t\t\tSystem.out.println(lines.get(0));\n\t\t\tString campos = lines.get(0);\t\t\t\n\t\t\tlistadoColumnas=Arrays.asList(campos.split(\",\"));\n\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t\treturn listadoColumnas;\n\t}", "public String getStringColumn(String column)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n String name = canonicalize(column);\n \n if (isColumnNull(name))\n return null;\n \n Object value = data.get(name);\n \n if (value == null)\n throw new IllegalArgumentException(\"Column \" + column + \" not present\");\n if (!(value instanceof String))\n throw new IllegalArgumentException(\"Value is not an string\");\n \n return (String) value;\n }", "private static Set<String> readFromFile(String fileName)\n\t{\n\t\tSet<String> words = new HashSet<String> ();\n\t\ttry \n\t\t{\n\t\t\tScanner scanner = new Scanner(new File(fileName));\n\t\t\twhile (scanner.hasNext())\n\t\t\t{\n\t\t\t\tString word = scanner.nextLine();\n\t\t\t\twords.add(word);\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e)\n\t\t{\n\t\t\treturn words;\n\t\t}\n\t\treturn words;\n\t}", "public abstract void load(LongLongsCol col, DataInputStream output) throws IOException;", "private void synsetParse(String line) {\n String[] tokens = line.split(\",\");\n Integer key = Integer.parseInt(tokens[0]);\n ArrayList<String> al = new ArrayList<String>();\n String[] words = tokens[1].split(\" \");\n for (String w : words) {\n al.add(w);\n nounSet.add(w); // build nounSet at the same time\n }\n synsetMap.put(key, al);\n }", "public ArrayList<String[]> read(String s) throws IOException,\n\t\t\tFileNotFoundException {\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\n\t\tFileReader fr = new FileReader(s);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString[] row = new String[6];\n\t\tString line;\n\t\twhile (true) {\n\t\t\tline = br.readLine();\n\t\t\tif (line == null) {\n\t\t\t\tbr.close();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\trow = line.split(\",\");\n\t\t\tresult.add(row);\n\t\t}\n\t}", "public List<String> getStrings(String fileName) throws IOException {\n\n List<String> items = readFile (fileName);\n String text = String.join (\"\", items);\n\n return normalizeCsv (text + \" \");\n }", "public void updateNCharacterStream(String columnName, Reader x) throws SQLException {\n\n updateNCharacterStream(columnName, x, -1);\n }", "private void AddSet(String set)\n\t{\n\t\tint i;\n\n\t\tif (_canonical && RangeCount() > 0 && set.length() > 0 && set.charAt(0) <= GetRangeAt(RangeCount() - 1)._last)\n\t\t{\n\t\t\t_canonical = false;\n\t\t}\n\n\t\tfor (i = 0; i < set.length() - 1; i += 2)\n\t\t{\n\t\t\t_rangelist.add(new SingleRange(set.charAt(i), (char)(set.charAt(i + 1) - 1)));\n\t\t}\n\n\t\tif (i < set.length())\n\t\t{\n\t\t\t_rangelist.add(new SingleRange(set.charAt(i), Lastchar));\n\t\t}\n\t}", "public void updateAsciiStream(String columnName, InputStream x) throws SQLException {\n\n updateAsciiStream(columnName, x, -1);\n }", "@Override\n\tpublic Set<String> getWordSet() {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.getWordSet();\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "public void setColumn(String column, String s)\n {\n if (! hasColumn(column))\n throw new IllegalArgumentException(\"No such column \" + column);\n \n data.put(canonicalize(column), s == null ? NULL_OBJECT : s);\n }", "protected abstract Set<String> _addToSet(String key, Collection<String> str);", "public String getString(int row, int column) {\n\t\treturn getColumn(column).getString(subset[row]);\n\t}", "public java.io.Reader getCharacterStream(String columnName) throws SQLException\n {\n return m_rs.getCharacterStream(columnName);\n }", "public void setValue(String column, String value)\n\t\t\tthrows ReadWriteException\n\t{\n\t\tsetValue(column, value, \"=\", \"\", \"\", \"AND\") ;\n\t}", "public Reader getCharacterStream(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getCharacterStream\", columnName);\n return get(columnName).getReader();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public static String[] readStrings() {\n return readAllStrings();\n }", "public Set<String> loadWordsFromCSV(final String filePath) {\n\t\treturn loadWords(filePath, \",\");\n\t}", "public static Map<Long, FxString[]> loadFxStrings(Connection con, String table, String... columns) throws SQLException {\n Statement stmt = null;\n final StringBuilder sql = new StringBuilder();\n final Map<Long, FxString[]> result = Maps.newHashMap();\n final Map<String, String> cache = Maps.newHashMap(); // avoid return duplicate strings\n try {\n sql.append(\"SELECT ID, LANG\");\n final boolean hasDefLang = columns.length == 1; // deflang is only meaningful for single-column tables\n if (hasDefLang)\n sql.append(\", DEFLANG\");\n for (String column : columns) {\n sql.append(',').append(column);\n if (!hasDefLang)\n sql.append(',').append(column).append(\"_MLD\");\n }\n sql.append(\" FROM \").append(table).append(ML).append(\" ORDER BY LANG\");\n final int startIndex = hasDefLang ? 4 : 3;\n stmt = con.createStatement();\n final ResultSet rs = stmt.executeQuery(sql.toString());\n while (rs.next()) {\n final long id = rs.getLong(1);\n final int lang = rs.getInt(2);\n boolean defLang = false;\n if( hasDefLang )\n defLang = rs.getBoolean(3);\n if (lang == FxLanguage.SYSTEM_ID) {\n continue; // TODO how to deal with system language? \n }\n FxString[] entry = result.get(id);\n if (entry == null) {\n entry = new FxString[columns.length];\n /*for (int i = 0; i < entry.length; i++) {\n entry[i] = new FxString(true, \"\");\n }\n result.put(id, entry);*/\n }\n for (int i = 0; i < columns.length; i++) {\n final String value = rs.getString(startIndex + i * (hasDefLang ? 1 : 2));\n final String translation;\n if (cache.containsKey(value)) {\n translation = cache.get(value); // return cached string instance\n } else {\n translation = value;\n cache.put(value, value);\n }\n if (entry[i] == null)\n entry[i] = new FxString(true, lang, translation);\n else\n entry[i].setTranslation(lang, translation);\n if(!hasDefLang)\n defLang = rs.getBoolean(startIndex + 1 + i * 2);\n if (defLang)\n entry[i].setDefaultLanguage(lang);\n }\n result.put(id, entry);\n }\n } finally {\n closeObjects(Database.class, null, stmt);\n }\n return result;\n }", "public static void getAlternateSpellings\r\n\t(\r\n\t\tReader reader ,\r\n\t\tMap<String, String> map ,\r\n\t\tSet<String> set\r\n\t)\r\n\t\tthrows IOException\r\n\t{\r\n\t\tString[] tokens;\r\n\r\n BufferedReader bufferedReader\t=\r\n \tnew BufferedReader( reader );\r\n\r\n\t\tString inputLine\t\t\t\t= bufferedReader.readLine();\r\n\t\tString alternateSpelling;\r\n\t\tString standardSpelling;\r\n\r\n\t\twhile ( inputLine != null )\r\n\t\t{\r\n\t\t\ttokens\t\t= inputLine.split( \"\\t\" );\r\n\r\n\t\t\tif ( tokens.length > 1 )\r\n\t\t\t{\r\n\t\t\t\talternateSpelling\t= tokens[ 0 ];\r\n\t\t\t\tstandardSpelling\t= tokens[ 1 ];\r\n\r\n\t\t\t\tif ( !isDBNull( standardSpelling ) )\r\n\t\t\t\t{\r\n\t\t\t\t\talternateSpelling\t= alternateSpelling.trim();\r\n\t\t\t\t\tstandardSpelling\t= standardSpelling.trim();\r\n\r\n\t\t\t\t\tif ( map.get( alternateSpelling ) == null )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( !alternateSpelling.endsWith( \"-\" ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmap.put( alternateSpelling , standardSpelling );\r\n\t\t\t\t\t\t\tset.add( standardSpelling );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Skipping line = <\" + inputLine + \">\" );\r\n\t\t\t}\r\n\r\n\t\t\tinputLine\t= bufferedReader.readLine();\r\n\t\t}\r\n\r\n\t\tbufferedReader.close();\r\n\t}", "public Set getBoardSet(String s){\n return board.getSet(s);\n }", "public Set<String> getEntry(String key){\n if(mTable == null )\n return new TreeSet<String>();\n if(mTable.containsKey(key)){\n return mTable.get(key);\n }\n return new TreeSet<String>();\n }", "static Set<String> readValueAsSet(Map m, String key) {\n Set<String> result = new HashSet<>();\n Object val = m.get(key);\n if (val == null) {\n if(\"collection\".equals(key)){\n //for collection collection: null means a core admin/ collection admin request\n // otherwise it means a request where collection name is ignored\n return m.containsKey(key) ? singleton((String) null) : singleton(\"*\");\n }\n return null;\n }\n if (val instanceof Collection) {\n Collection list = (Collection) val;\n for (Object o : list) result.add(String.valueOf(o));\n } else if (val instanceof String) {\n result.add((String) val);\n } else {\n throw new RuntimeException(\"Bad value for : \" + key);\n }\n return result.isEmpty() ? null : Collections.unmodifiableSet(result);\n }", "public void setCollect(String column, String value)\n\t{\n\t\t//#CM708948\n\t\t// Disregard it when the key which does not exist in Effective is specified. \n\t\tKey Eky = getKey(column) ;\n\t\tif (Eky == null)\n\t\t\treturn ;\n\n\t\tEky.setTableCollect(value) ;\n\t\tsetCollectKey(Eky) ;\n\t}", "private Set<String> loadSpecialCharacters() throws FileNotFoundException {\n return new BufferedReader(new FileReader(SPECIAL_CHARACTERS_FILE))\n .lines()\n .collect(Collectors.toSet());\n }", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "protected abstract Set<String> _removeFromSet(String key, Collection<String> str);", "void setColumns(List<String> columns);", "private void loadAndProcessInput(){\n transactions_set = new ArrayList<>();\n strItemToInt = new HashMap<>();\n intToStrItem = new HashMap<>();\n \n try{\n BufferedReader br = new BufferedReader(\n new InputStreamReader(\n new FileInputStream(this.inputFilePath)\n ));\n \n String line;\n while((line = br.readLine()) != null){\n String[] tokens = line.split(\" \");\n ArrayList<Integer> itemsId = new ArrayList();\n \n for(String item : tokens){\n if( ! strItemToInt.containsKey(item)){\n strItemToInt.put(item, strItemToInt.size()+1);\n intToStrItem.put(strItemToInt.size(), item);\n }\n itemsId.add(strItemToInt.get(item));\n }\n transactions_set.add(itemsId);\n }\n }\n catch(IOException fnfEx){\n System.err.println(\"Input Error\");\n fnfEx.printStackTrace();\n }\n \n }", "public IDataSet loadMaterializedDataSet(Set<FieldDescriptor> columns) throws DataSourceException;", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "@Test\n public void testReadOldStringData()\n throws IOException {\n TestUtils.loadLog(getClass(), \"je-4.0.103_StringData.jdb\", envHome);\n\n open();\n PrimaryIndex<String, StringData> primary = \n store.getPrimaryIndex(String.class, StringData.class);\n \n /* Read the older String data. */\n StringData entity = primary.get(\"pk1\");\n assertNotNull(entity);\n CompositeKey compK = new CompositeKey(\"CompKey1_1\", \"CompKey1_2\");\n String[] f3 = {\"f3_1\", \"f3_2\"};\n List<String> f4 = new ArrayList<String>();\n f4.add(\"f4_1\");\n f4.add(\"f4_2\");\n entity.validate\n (new StringData (\"pk1\", \"sk1\", compK, \"f1\", \"f2\", f3, f4)); \n close();\n }", "public void initFromRows(SimpleIterator<String> lines) {\n this.reset();\n int rowId = 0;\n Optional<String> lineOpt;\n Int2ObjectMap<IntArrayList> colsMap = new Int2ObjectOpenHashMap<>();\n int maxColId = -1;\n while (true) {\n lineOpt = lines.next();\n if (!lineOpt.isPresent()) {\n break;\n } else {\n String line = lineOpt.get().trim();\n if (!line.isEmpty()) {\n String[] tokens = line.split(\"\\\\s+\");\n int[] row = new int[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n int colId = Integer.parseInt(tokens[i]) - 1; // convert to 0-based\n if (colId < 0) {\n throw new RuntimeException(\n String.format(\n \"Column %d smaller than 1, in line number %d, line:'%s'\",\n colId + 1, rowId + 1, line\n )\n );\n }\n row[i] = colId;\n if (!colsMap.containsKey(colId)) {\n colsMap.put(colId, new IntArrayList());\n }\n colsMap.get(colId).add(rowId);\n if (colId > maxColId) {\n maxColId = colId;\n }\n }\n Arrays.sort(row);\n this.rows[rowId] = row;\n }\n rowId++;\n if (rowId > this.numRows) {\n throw new RuntimeException(\n \"More rows in input rows file than the expected \" + this.numRows\n );\n }\n }\n }\n if (maxColId > this.numCols) {\n this.numCols = maxColId + 1;\n this.cols = new IntSet[this.numCols];\n }\n for (int colId = 0; colId < this.numCols; colId++) {\n if (colsMap.containsKey(colId) && !colsMap.get(colId).isEmpty()) {\n this.cols[colId] = new IntOpenHashSet(colsMap.get(colId));\n } else {\n this.cols[colId] = new IntOpenHashSet();\n }\n }\n }", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "abstract CharArraySet build();", "private static List<String> readData(String path) throws IOException{\n ArrayList<String> data = new ArrayList<>();\n try (\n Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);\n CSVReader csvReader = new CSVReader(reader)\n ){\n String[] nextRecord;\n while ((nextRecord = csvReader.readNext()) != null) {\n if (nextRecord[0].contains(\"name\")){\n System.out.println(\"Skipping column headers...\");\n }else {\n data.add(nextRecord[0]);\n// System.out.println(nextRecord[0]);\n }\n }\n }\n return data;\n }", "public static PropertyDescriptionBuilder<Set<String>> setOfStringsProperty(String name) {\n // Trick to work-around type erasure\n // https://stackoverflow.com/a/30754982/2535153\n @SuppressWarnings(\"unchecked\")\n Class<Set<String>> clazz = (Class<Set<String>>)(Class<?>)Set.class;\n return PropertyDescriptionBuilder.start(name, clazz, Parsers.parseSet(Parsers::parseString));\n }", "private void many(Set<String> s) {\n\t\twhile (!done() && s.contains(program.charAt(pos)+\"\"))\n\t\t\tpos++;\n }", "private void addTypedStrings(Set<String> set, String hdr) {\n BundlesG globals = getRTParent().getRootBundles().getGlobals(); Set<String> to_add = new HashSet<String>();\n\tSet<BundlesDT.DT> datatypes = globals.getFieldDataTypes(globals.fieldIndex(hdr));\n\n // In transformed datatypes (e.g., dstip|ORG), the datatypes lookup fails and a null is returned. I'm\n // unsure if the following will further break the selection/filtered data views -- the underlying assumption\n // in the original implementation was that all of the entities were strongly typed... however, for IP Org\n // lookups, this is clearly not the case.\n if (datatypes == null) return;\n\n\tIterator<BundlesDT.DT> it_dt = datatypes.iterator();\n\twhile (it_dt.hasNext()) {\n\t BundlesDT.DT dt = it_dt.next();\n\t Iterator<String> it = set.iterator();\n while (it.hasNext()) {\n\t String str = it.next();\n\t if (BundlesDT.stringIsType(str, dt)) to_add.add(hdr + BundlesDT.DELIM + str);\n\t }\n\t}\n\tset.addAll(to_add);\n }", "private void get_rooms() throws FileNotFoundException\n {\n Scanner room_all = new Scanner(new FileInputStream(db_rooms));\n room_all.nextLine();\n while(room_all.hasNextLine())\n {\n String [] searcher = (room_all.nextLine()).split(\"\\\"\");\n if(!searcher[7].equals(\"empty\"))\n data_set.add(new Room(searcher[3], searcher[5], (searcher[7].equals(\"booked\") ? 1 : 2), Integer.valueOf(searcher[1])));\n else\n data_set.add(new Room(Integer.valueOf(searcher[1])));\n }\n room_all.close();\n }", "public List<String[]> fill() throws IOException {\r\n\t\tList<String[]> allRows = new ArrayList<>();\r\n\t\t// CSV setting\r\n\t\tCSVReader reader = new CSVReader(new FileReader(path), '|', '\"', 1);\r\n\t\tallRows.addAll(reader.readAll());\r\n\t\treader.close();\r\n\t\treturn allRows;\r\n\t}", "@Override\n\tpublic SortedSet<Integer> getPositionSet(String word, String path) {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.getPositionSet(word, path);\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "public static void main(String[] args) {\n ArrayList<arrayset> list = new ArrayList<>();\n String [] newarray= new String[97];\n File data = new File(\"records.txt\");\n try {\n Scanner input = new Scanner(data);\n while (input.hasNextLine()) {\n String line = input.nextLine();\n firstName = line.split(\",\")[0];\n\n lastName = line.split(\",\")[1];\n\n gender = line.split(\",\")[2];\n\n age = Integer.parseInt(line.split(\",\")[3]);\n\n phoneNo = line.split(\",\")[4];\n\n email = line.split(\",\")[5];\n\n firstName = Character.toUpperCase(firstName.charAt(0)) + firstName.substring(1, firstName.length());\n lastName = Character.toUpperCase(lastName.charAt(0)) + lastName.substring(1, lastName.length());\n\n if (gender.toLowerCase() == \"male\" || gender.toLowerCase() == \"female\") {\n gender = gender.toLowerCase();\n }\n if (age > 1 || age < 129) {\n age = age;\n }\n else if(age <1 || age > 129) {\n System.out.println(\"Error person not valid\");\n }\n if (phoneNo.length() == 13) {\n phoneNo = phoneNo;\n }\n else if(phoneNo.length()<13) {\n System.out.println(\"Error person not valid\");\n }\n if (email.matches(\"[A-Z][0-9].@\")) {\n email = email;\n }\n else if(email.matches(\"[A-Z][0-9].@\")) {\n System.out.println(\"Error person not valid\");\n }\n list.add(new arrayset(firstName, lastName, gender, age, phoneNo, email));\n }\n input.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"Error Wrong File!\");\n }\n System.out.println(\"Error: Person 4 is not valid, since age = -89\\n\" +\n \"Error: Person 12 is not valid, since last name = Lara22\\n\" +\n \"Error: Person 21 is not valid, since age = 179\\n\" +\n \"Error: Person 32 is not valid, since last name = Mccullough\\n\" +\n \"Error: Person 52 is not valid, since email = MMaddenMadden.net\\n\" +\n \"Error: Person 96 is not valid, since age = 0\");\n System.out.format(\"%-20s%-15s%-15s%-10s%-20s%7s \", \"First Name\", \"Last Name\", \"Gender\", \"Age\", \"Number\", \"Email\");\n\n int i = 0;\n while (i < list.size()) {\n String printarray= String.format(\"%-20s%-15s%-15s%-10s%-20s%7s \", list.get(i).getFirstName(), list.get(i).getLastName(),\n list.get(i).getGender(), list.get(i).getAge(), list.get(i).getPhoneNo(), list.get(i).getEmail());\n newarray[i]=printarray;\n i++;\n\n }\n for(int j=0; j<newarray.length; j++) {\n System.out.println(newarray[j]);\n\n }\n}", "void remove (String dataFile) {\n\t\tint i;\t\t\n\t\t\n\n\t\ttry {\n//\t\t\tHash set to store strings\n\t\t\t\t\t\t\n//\t\t\tScanner reads objects from file\n\t\t\tScanner fileInput = new Scanner(new File(dataFile));\n\t\t\t\n//\t\t\treads line from file\n\t\t\twhile(fileInput.hasNextLine()) {\n\t\t\t\tString row = fileInput.nextLine();\n\t\t\t\t\n//\t\t\t\tsplits words by the space\n\t\t\t\tString[] word = row.split(\" \");\n\t\t\t\t\n\t\t\t\tfor(i = 0; i < word.length; i++) {\n\t\t\t\t\t\n//\t\t\t\t\tconvert words to lower case\n\t\t\t\t\tString wordSet = word[i].toLowerCase();\n//\t\t\t\t\tadds words to set\n\t\t\t\t\tuniqueWords.add(wordSet);\n\t\t\t\t}\t\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t@Transactional\n\tpublic List<String> leerColumnasCsvDelServidor(String ubicacion) {\n\t\tList<String> lines = Collections.emptyList();\n\t\tList<String> listadoColumnas = new ArrayList<String>(); // Agregar nombres de la columna\n\t\t//SpssDataFileReader reader = null;\n\t\t/*try (BufferedReader br = new BufferedReader(new FileReader(ubicacion))){\n\n\t\t\t\n\t\t\tString campos = br.readLine();\t\n\t\t\tlistadoColumnas=Arrays.asList(campos.split(\",\"));\n\t\n\t\t}*/\n\t\t try (BufferedReader reader = new BufferedReader(new FileReader(ubicacion))){\n\t\t List<String[]> list = new ArrayList<>();\n\t\t String line = \"\";\n\n\t\t String campos = reader.readLine();\t\n\t\t\t\tlistadoColumnas=Arrays.asList(campos.split(\",\"));\n\t\t }\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t\treturn listadoColumnas;\n\t}", "public String[][] loadData(String fileName)\n{\n String[] rows = loadStrings(fileName);\n String[][] dataa = new String [24][7];\n int i = 0;\n for (String row : rows) \n {\n String[] columns = row.split(\",\");\n if (columns.length >= 7) \n {\n for (int j = 0; j < 7; j=j+1)\n {\n dataa [i][j]=columns[j];\n }\n i = i +1;\n }\n }\n return dataa;\n}", "public abstract void load(LongIntsCol col, DataInputStream output) throws IOException;", "protected Collection<Country> loadCountries(BufferedReader in, String columnSeparator) throws IOException {\n\t\t\r\n\t\tCollection<Country> countries = new HashSet<Country>();\r\n\t\tString[] columnHeaders = in.readLine().split(columnSeparator);\r\n\t\t\r\n\t\tString line = in.readLine();\r\n\t\twhile (line != null) {\r\n\t\t\tMap<String, String> properties = new HashMap<String, String>();\r\n\t\t\t\r\n\t\t\tString[] columns = line.split(columnSeparator);\r\n\t\t\tfor (int i = 0, n = Math.min(columnHeaders.length, columns.length); i < n; i++) {\r\n\t\t\t\tproperties.put(columnHeaders[i].toLowerCase(), columns[i].trim());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcountries.add(toCountry(properties));\r\n\t\t\tline = in.readLine();\r\n\t\t}\r\n\t\t\r\n\t\tif (countries.size() <= 0) {\r\n\t\t\tLOG.warn(\"{} countries loaded from resource file\", countries.size());\t\t\t\r\n\t\t} else {\r\n\t\t\tLOG.info(\"{} countries loaded from resource file\", countries.size());\r\n\t\t}\r\n\t\t\r\n\t\treturn countries;\r\n\t}", "public static void loadColumn(ColumnRef columnRef) throws Exception {\n\t\t// Check whether column is already loaded\n\t\tif (!colToData.containsKey(columnRef)) {\n\t\t\tlong startMillis = System.currentTimeMillis();\n\t\t\t// Get column information from catalog\n\t\t\tColumnInfo column = CatalogManager.getColumn(columnRef);\n\t\t\tlog(\"Loaded column meta-data: \" + column.toString());\n\t\t\t// Read generic object from file\n\t\t\tString dataPath = PathUtil.colToPath.get(column);\n\t\t\tObject object = DiskUtil.loadObject(dataPath);\t\n\t\t\t// Cast object according to column type\n\t\t\tJavaType javaType = TypeUtil.toJavaType(column.type);\n\t\t\tlog(\"Column data type:\\t\" + javaType);\n\t\t\tswitch (javaType) {\n\t\t\tcase INT:\n\t\t\t\tcolToData.put(columnRef, (IntData)object);\n\t\t\t\tbreak;\n\t\t\tcase LONG:\n\t\t\t\tcolToData.put(columnRef, (LongData)object);\n\t\t\t\tbreak;\n\t\t\tcase DOUBLE:\n\t\t\t\tcolToData.put(columnRef, (DoubleData)object);\n\t\t\t\tbreak;\n\t\t\tcase STRING:\n\t\t\t\tcolToData.put(columnRef, (StringData)object);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Generate statistics for output\n\t\t\tif (LoggingConfig.BUFFER_VERBOSE) {\n\t\t\t\tlong totalMillis = System.currentTimeMillis() - startMillis;\n\t\t\t\tSystem.out.println(\"Loaded \" + columnRef.toString() + \n\t\t\t\t\t\t\" in \" + totalMillis + \" milliseconds\");\n\t\t\t}\n\t\t\t// Generate debugging output\n\t\t\tlog(\"*** Column \" + columnRef.toString() + \" sample ***\");\n\t\t\tint cardinality = colToData.get(columnRef).getCardinality();\n\t\t\tint sampleSize = Math.min(10, cardinality);\n\t\t\tfor (int i=0; i<sampleSize; ++i) {\n\t\t\t\tswitch (column.type) {\n\t\t\t\tcase STRING_CODE:\n\t\t\t\t\tint code = ((IntData)object).data[i];\n\t\t\t\t\tlog(dictionary.getString(code));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog(\"******\");\n\t\t}\n\t}", "public static void readHistoricalData(String fileName, TeamSet teamSet) throws IOException{\n\t\tScanner input = new Scanner(new File(fileName));\n\t\tString data = input.nextLine();\n\t\twhile(!data.contains(\",,,,\")) {\n\t\t\t//Read the game data for each ncaa game, send in each line and the teamset\n\t\t\treadGameData(data, teamSet);\n\t\t\tdata = input.nextLine();\n\t\t}\n\t}", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "StringCursor getAllStrings() throws RemoteException;", "@Override\n\tpublic Set<String> getPathSet(String word) {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.getPathSet(word);\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "public void mo16912a(String str, Set<String> set) {\n try {\n this.f9119b.edit().putStringSet(str, set).apply();\n } catch (Throwable unused) {\n }\n }", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "public Reader getNCharacterStream(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getNCharacterStream\", columnName);\n return get(columnName).getReader();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public CollectionFacadeSet(java.util.Collection<java.lang.String> collection) {\n this.collection = collection;\n for (String str : collection) {\n if (contains(str) || str == null) {\n continue;\n }\n add(str);\n }\n }", "public void setColumns(java.lang.String[] columns) {\n this.columns = columns;\n }", "public void readFile(String file)\n\t{\t\n\t\tfindPieces(file);\n\t}", "public void setString(String line)\n {\n tempString = new StringBuilder(line);\n }", "public abstract void load(IntIntsCol col, DataInputStream output) throws IOException;", "public abstract boolean read(String line);", "java.lang.String getColumn();", "public void setColumn(char column) {\n\t\tthis.column = column;\n\t}", "public InputStream getAsciiStream(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getAsciiStream\", columnName);\n String s = get(columnName).getString();\n return IOUtils.getInputStream(s);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "private ArrayList<String> readStringsFromFile(File f, String stringSeparator)\r\n\t\t\tthrows EasyCorrectionException {\r\n\t\tArrayList<String> contentOfFile = new ArrayList<String>();\r\n\t\tbyte[] buffer = new byte[(int) f.length()];\r\n\t\tBufferedInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tstream = new BufferedInputStream(new FileInputStream(f));\r\n\t\t\tstream.read(buffer);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new EasyCorrectionException(\"The file \" + f.getName()\r\n\t\t\t\t\t+ \" could not be read during the Output Comparison!\");\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (stream != null) {\r\n\t\t\t\t\tstream.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tthrow new EasyCorrectionException(\"The file \" + f.getName()\r\n\t\t\t\t\t\t+ \" could not be closed during the Output Comparison!\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String string : new String(buffer).split(stringSeparator)) {\r\n\t\t\tcontentOfFile.add(string);\r\n\t\t}\r\n\r\n\t\treturn contentOfFile;\r\n\t}", "public void updateCharacterStream(String columnName, Reader x, int length) throws SQLException {\n\n updateCharacterStream(columnName, x, (long) length);\n }", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "Column(String column) {\n this.column = column;\n }", "Column(String column) {\n this.column = column;\n }", "public static Set<String> commaDelimitedStringToSet(String s) {\n Set<String> set = new HashSet<String>();\n String[] split = s.split(\",\");\n for (String aSplit : split) {\n String trimmed = aSplit.trim();\n if (trimmed.length() > 0)\n set.add(trimmed);\n }\n return set;\n }", "public void load(File file) throws IOException {\n FileReader reader = new FileReader(file); //new File Reader\r\n char str[] = new char[10000]; //create a character string array of 10000 values\r\n reader.read(str);//read the file\r\n boolean temp[][] = new boolean[100][100]; //create a temporary new colony\r\n for (int r = 0; r < 100; r++) { //iterate through to fill with values\r\n for (int c = 0; c < 100; c++) {\r\n if (str[r*100 + c] == '1') { //if the char is equal to one, cell is alive\r\n temp[r][c] = true;\r\n } else {\r\n temp[r][c] = false; //else, the cell is dead\r\n }\r\n }\r\n }\r\n grid = temp;\r\n }", "public void setValue(String column, String value) {\n Collection<Column> cols = source.getColumn(column);\n Column col = cols.iterator().next();\n setValue(col, value);\n }", "void write(String... columns) throws IOException;", "public abstract String getString(int columnIndex);", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "public void setRuleColumnSet(Set<String> ruleColumnSet) {\n this.ruleColumnSet = ruleColumnSet;\n }" ]
[ "0.73687303", "0.70155835", "0.61173964", "0.56992006", "0.5388314", "0.5383496", "0.5296292", "0.51918864", "0.5188936", "0.5071075", "0.5008981", "0.5004765", "0.49570498", "0.49300832", "0.4864272", "0.48629674", "0.48163298", "0.4788915", "0.4747696", "0.47311848", "0.4722604", "0.47120625", "0.4706292", "0.4686287", "0.4676354", "0.46356133", "0.46271098", "0.46088487", "0.46057957", "0.45793837", "0.4562153", "0.4552651", "0.45410246", "0.45404986", "0.45359457", "0.45344386", "0.45319813", "0.45299408", "0.45297152", "0.4523225", "0.45222002", "0.45158374", "0.45067328", "0.45022383", "0.44803953", "0.4478234", "0.44778195", "0.44611192", "0.44584098", "0.44543165", "0.44516373", "0.44488516", "0.44453287", "0.44417918", "0.44314468", "0.4430887", "0.44265598", "0.44255725", "0.4414767", "0.44077253", "0.44051617", "0.4403937", "0.44006348", "0.43950486", "0.43809795", "0.43805522", "0.4372198", "0.4370607", "0.436789", "0.43676186", "0.435174", "0.4348553", "0.43473113", "0.43440497", "0.43438575", "0.43410203", "0.43371418", "0.4335346", "0.43247223", "0.4318183", "0.43168506", "0.43154597", "0.43154222", "0.43152538", "0.4309019", "0.43080738", "0.43074024", "0.43019715", "0.4301381", "0.43012378", "0.4297179", "0.42946517", "0.42946517", "0.4290144", "0.4289872", "0.42763746", "0.42721927", "0.42719603", "0.42689067", "0.42648393" ]
0.7546014
0
Read a single column into a list.
public static List<String> readColumn(File inFile, String string) throws IOException { List<String> retVal = new ArrayList<String>(100); try (TabbedLineReader inStream = new TabbedLineReader(inFile)) { int inCol = inStream.findField(string); for (TabbedLineReader.Line line : inStream) retVal.add(line.get(inCol)); } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<?> getList(String columnName) {\n ListVector vector = (ListVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "public ArrayList<Object> retrieveData(String column) {\n ArrayList<Object> dataLst = new ArrayList<Object>(this.rowCount);\r\n\r\n int colType = getColumnType(column);\r\n\r\n //Number can be measure alone?\r\n if (isNumberColumn(colType)) {\r\n for (Object data : retrieveNumericData(column)) {\r\n dataLst.add(data);\r\n }\r\n } else if (isTextColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueString(i, column));\r\n }\r\n } else if (isDateColumn(colType)) {\r\n for (int i = 0; i < this.rowCount; i++) {\r\n dataLst.add(this.getFieldValueDate(i, column));\r\n }\r\n }\r\n\r\n// // long endTime = System.currentTimeMillis();\r\n// \r\n return dataLst;\r\n }", "private Collection getColumn(QueryResultIF queryResult, int column) {\n Collection retVal = new ArrayList();\n\n while (queryResult.next()) {\n retVal.add(queryResult.getValue(column));\n }\n\n return retVal;\n }", "List<E> read();", "List<T> read();", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "List<T> readList();", "@SuppressWarnings(\"unchecked\")\n public List readList() throws IOException {\n List list = new ArrayList();\n Object obj = read();\n while (obj != null) {\n list.add(obj);\n obj = read();\n }\n return list;\n }", "public static ListOfString readColumn(final ILogger aLogger,\r\n final String aSql,\r\n final Statement aStatement) {\r\n if (aStatement==null) return null;\r\n ResultSet rs = read(aLogger, aSql, aStatement);\r\n if (rs==null) return null;\r\n\r\n ListOfString list = new ListOfString();\r\n try {\r\n while (rs.next()) {\r\n list.add( StringUtility.defaultString(rs.getString(1)) );\r\n } // while\r\n return list;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"readColumn\", \"Failed reading from ResultSet.\", ex);\r\n return null;\r\n }\r\n finally {\r\n close(aLogger, rs);\r\n }\r\n }", "public ArrayList<String> readRow(Row row, int columns)\t\n\t{\n\t\tArrayList<String> cellValueList = new ArrayList<String>();\t//List to hold the values we read\n\t\tDataFormatter formatter = new DataFormatter();\t//Used to get String value of cell\n\t\tint cellNumber;\n\t\tint lastCellNumber = row.getFirstCellNum() + columns;\n\t\tfor(cellNumber = row.getFirstCellNum(); cellNumber < lastCellNumber; cellNumber++)\n\t\t{\n\t\t\t//Iterating over cells in the row\n\t\t\tCell currentCell = row.getCell(cellNumber, Row.RETURN_BLANK_AS_NULL);\t//Get Cell object\n\t\t\tif(currentCell == null)\n\t\t\t{\n\t\t\t\tcellValueList.add(\"\");\t//Treat empty cell entry as a blank string\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Format the current cell as a String and add it to the list\n\t\t\t\tcellValueList.add(formatter.formatCellValue(currentCell));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn cellValueList;\n\t}", "public abstract List<V> makeColumnData(C column);", "public List<int[]> readCSVint() {\n\t\tCSVReader reader;\n\t\t// The strings pulled from file\n\t\tList<String[]> storedEntries = new ArrayList<String[]>();\n\t\t// Each string converted to int.\n\t\tList<int[]> convertedEntries = new ArrayList<int[]>();\n\n\t\t// Read the entire file into a List.\n\t\ttry {\n\t\t\treader = new CSVReader(new FileReader(getCSVFolder() + File.separator + getFileName() + \".csv\"));\n\t\t\tstoredEntries = reader.readAll();\n\t\t\treader.close();\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// The current list contains strings, so we convert them.\n\t\tint size = storedEntries.get(0).length;\n\t\tfor (String[] row : storedEntries) {\n\t\t\tint[] convertedRow = new int[size];\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tconvertedRow[i] = Integer.parseInt(row[i]);\n\t\t\t}\n\t\t\tconvertedEntries.add(convertedRow);\n\t\t}\n\n\t\treturn convertedEntries;\n\t}", "private String[] splitListColumn(String column) {\n if (column.trim().equals(\"\")) {\n return EMPTY_STRING_ARRAY;\n } else {\n return column.split(INPUT_LIST_DELIM);\n }\n }", "public List<?> getList(int columnIndex) {\n ListVector vector = (ListVector) table.getVector(columnIndex);\n return vector.getObject(rowNumber);\n }", "public List<Lender> readCSVFile(String path){\r\n\r\n List<Lender> inputList = new ArrayList<>();\r\n try{\r\n File inputF = new File(path);\r\n InputStream inputFS = new FileInputStream(inputF);\r\n BufferedReader br = new BufferedReader(new InputStreamReader(inputFS));\r\n // skip the header of the csv\r\n inputList = br.lines().skip(1).map(mapToItem).collect(Collectors.toList());\r\n br.close();\r\n } catch (IOException e) {\r\n throw new QuoteException(\"Error reading the csv file\", e);\r\n }\r\n\r\n return inputList ;\r\n }", "public static ListOfString readColumn(final ILogger aLogger,\r\n final String aSql,\r\n final Connection aConnection) {\r\n if (aConnection==null) return null;\r\n Statement stm= getStatement(aLogger, aConnection);\r\n ListOfString r = readColumn(aLogger, aSql, stm);\r\n close(aLogger, stm);\r\n return r;\r\n }", "private static List<String> readData(String path) throws IOException{\n ArrayList<String> data = new ArrayList<>();\n try (\n Reader reader = Files.newBufferedReader(Paths.get(path), StandardCharsets.UTF_8);\n CSVReader csvReader = new CSVReader(reader)\n ){\n String[] nextRecord;\n while ((nextRecord = csvReader.readNext()) != null) {\n if (nextRecord[0].contains(\"name\")){\n System.out.println(\"Skipping column headers...\");\n }else {\n data.add(nextRecord[0]);\n// System.out.println(nextRecord[0]);\n }\n }\n }\n return data;\n }", "@NonNull\n Collection<TObj> getColumnItems(int column) {\n Collection<TObj> result = new LinkedList<>();\n for (int count = mData.size(), i = 0; i < count; i++) {\n int key = mData.keyAt(i);\n TObj columnObj = mData.get(key).get(column);\n if (columnObj != null) {\n result.add(columnObj);\n }\n\n }\n return result;\n }", "public List<String> read()\n\t{\n\t\treturn null;\n\t}", "List<String> getColumns();", "List<C> getRow() throws Exception;", "public List<?> getMap(String columnName) {\n ListVector vector = (ListVector) table.getVector(columnName);\n return vector.getObject(rowNumber);\n }", "public List<Column> getColumns();", "public List<String> getColumns();", "List<String[]> readCsv(String inputFilePath)throws IOException;", "java.util.List<Column>\n getColumnsList();", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "public static List read(String file){\n\t\tLinkedList<String> data =\tnew LinkedList<String>();\n\t\tString dataRow;\n\t\t\n\t\ttry {\n\t\t\t\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\n\t\twhile((dataRow = br.readLine())!=null);{\t\n\t\t\tString[] dataRecord = dataRow.split(\",\");\n\t\t\tdata.addAll(dataRecord);\n\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Could not found file\");\n\t\t\te.printStackTrace();\n\t\t}catch (IOException e) {\n\t\tSystem.out.println(\"Could Not read file\");\n\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public ArrayList<Column> getColumnArrayList(){\n\t\t\n\t\treturn clist;\n\t\t\n\t}", "public List<Integer> getColAsList(int j){\n\t\tList<Integer> col = new ArrayList<Integer>(size*size);\n\t\tfor (int i = 0; i < size*size; i++){\n\t\t\tcol.add(numbers[i][j]);\n\t\t}\n\t\treturn col;\n\t}", "List<String[]> readAll();", "public abstract List<CellValue< ? extends Comparable< ? >>> convertColumnData(C column,\n List<V> columnData);", "public void loadData(Object[] columnData);", "public static ListOfString readColumn(final ILogger aLogger,\r\n final String aTableName,\r\n final String aColumnName,\r\n final String aWhere,\r\n final Connection aConnection) {\r\n if (aConnection==null) return null;\r\n Statement stm= getStatement(aLogger, aConnection);\r\n ListOfString r = readColumn(aLogger, aTableName, aColumnName, aWhere, stm);\r\n close(aLogger, stm);\r\n return r;\r\n }", "public List<String[]> readCSV() {\n\t\tCSVReader reader;\n\t\tList<String[]> myEntries = new ArrayList<String[]>();\n\t\ttry {\n\t\t\treader = new CSVReader(new FileReader(getCSVFolder() + File.separator + getFileName() + \".csv\"));\n\t\t\tmyEntries = reader.readAll();\n\t\t\treader.close();\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn myEntries;\n\t}", "private static ListOfString readListAndClose(final ILogger aLogger,\r\n final ResultSet aResultSet) {\r\n if (aResultSet==null) return null;\r\n ListOfString r;\r\n if (!moveNext(aLogger, aResultSet)) {\r\n r= new ListOfString();\r\n } else {\r\n r= getRowAsList(aLogger, aResultSet);\r\n }\r\n close(aLogger, aResultSet);\r\n return r;\r\n }", "public List<byte[]> getColumns(){\n List<byte[]> list = new ArrayList<byte[]>();\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n if(iter.hasNext()){\n byte[] col = iter.next().getSecond();\n if(null != col)\n list.add(col);\n }\n return list;\n }", "List<String[]> readCsv(String inputFilePath,int skipLine)throws IOException;", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> \n getColumnList();", "public int[] getCol() { return _col; }", "public static ListOfString getRowAsList(final ILogger aLogger,\r\n final ResultSet aResultSet,\r\n final int aColumnCount,\r\n final String aDefault) {\r\n if (aResultSet==null) return null;\r\n ListOfString r= new ListOfString();\r\n String v;\r\n try {\r\n for (int i=0; i < aColumnCount; i++) {\r\n v= aResultSet.getString(i+1);\r\n if (v==null) v= aDefault;\r\n r.add(v);\r\n }\r\n return r;\r\n }\r\n catch (SQLException ex) {\r\n error(aLogger, \"getRowAsList\", \"Reading column from result set failed.\", ex);\r\n return null;\r\n }\r\n }", "List<T> readAll();", "@Override\n\tpublic List<T> getCol(MatrixCoordinate coordIn) {\n\t\treturn this.getCol(coordIn.getX());\n\t}", "public Column getColumn(int column) throws Exception{\n\t\tif(column >= size)\n\t\t\tthrow new Exception(\"Index out of bounds\");\n\n\t\treturn columns[column];\n\t}", "java.util.List<String>\n getRowsList();", "public List getColumns(Serializable columnId) {\n\tif(null==columnId){\r\n\t\treturn this.getColumnDao().getColumns();\r\n\t}else{\r\n\t\treturn this.getColumnDao().getColumns(columnId);\r\n\t}\r\n}", "public Array getArray(String columnName) throws SQLException {\n\n try {\n int id = getNextId(TraceObject.ARRAY);\n debugCodeAssign(\"Clob\", TraceObject.ARRAY, id, \"getArray(\" + quote(columnName) + \")\");\n Value v = get(columnName);\n return v == ValueNull.INSTANCE ? null : new JdbcArray(conn, v, id);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "@Override\n\tpublic List<T> getCol(long xIn) throws IndexOutOfBoundsException {\n\t\tMatrixValidator.throwIfBadIndex(this, xIn, Plane.X);\n\t\tLinkedList<T> output = new LinkedList<>();\n\t\t\n\t\tfor(long i = 0; i < this.getNumRows(); i++){\n\t\t\toutput.addLast(this.get(xIn, i));\n\t\t}\n\t\t\n\t\treturn output;\n\t}", "public Object[] getColumn(int c) {\n// Object[] dta = new Object[data.rows];\n// for (int i = 0; i < data.rows; i++)\n// dta[i] = data.values[c][c];\n return data.values[c];\n }", "public List<String> getRows();", "public double[] readVector(String line, int index) {\n\n String[] list = line.split(\" \");\n int numColumns = Integer.parseInt(list[index]);\n double[] res = new double[numColumns];\n\n int num = index + 1;\n for (int j = 0; j < numColumns; j++) {\n res[j] = Double.parseDouble(list[num]);\n num++;\n }\n return res;\n }", "Column getColumns(int index);", "static public DoubleList readVector(BufferedReader reader) throws IOException {\r\n int dim = Integer.parseInt(reader.readLine());\r\n DoubleList vector = new DoubleArrayList(dim);\r\n for (int i = 0; i < dim; i++) {\r\n double v = Double.parseDouble(reader.readLine());\r\n vector.add(v);\r\n }\r\n return vector;\r\n }", "private void readIntoSet(String column, Set<String> retVal) throws IOException {\n int idx = this.findField(column);\n for (TabbedLineReader.Line line : this) {\n String value = line.get(idx);\n retVal.add(value);\n }\n }", "private static List<Integer> getColumn(int colIndex, int[][] m) {\r\n List<Integer> col = new ArrayList<Integer>(m[0].length);\r\n for (int i = 0; i < m.length; ++i) {\r\n col.add(m[i][colIndex]);\r\n }\r\n\r\n return col;\r\n }", "public static ListOfString readOneRowAsList(final ILogger aLogger,\r\n final String aSql,\r\n final Connection aConnection) {\r\n ResultSet rs= read(aLogger, aSql, aConnection);\r\n return readListAndClose(aLogger, rs);\r\n }", "public static List<String> parseStringToList(String str) {\n List<String> list = new LinkedList<>();\n if (StringUtils.isEmpty(str)){\n return list;\n }\n String[] tokens = str.trim().split(\"\\\\s*,\\\\s*\");\n if(tokens != null && tokens.length > 0) {\n for (String column : tokens) {\n list.add(column);\n }\n }\n return list;\n }", "String getColumn(int index);", "String getColumn(int index);", "public static void loadColumn(ColumnRef columnRef) throws Exception {\n\t\t// Check whether column is already loaded\n\t\tif (!colToData.containsKey(columnRef)) {\n\t\t\tlong startMillis = System.currentTimeMillis();\n\t\t\t// Get column information from catalog\n\t\t\tColumnInfo column = CatalogManager.getColumn(columnRef);\n\t\t\tlog(\"Loaded column meta-data: \" + column.toString());\n\t\t\t// Read generic object from file\n\t\t\tString dataPath = PathUtil.colToPath.get(column);\n\t\t\tObject object = DiskUtil.loadObject(dataPath);\t\n\t\t\t// Cast object according to column type\n\t\t\tJavaType javaType = TypeUtil.toJavaType(column.type);\n\t\t\tlog(\"Column data type:\\t\" + javaType);\n\t\t\tswitch (javaType) {\n\t\t\tcase INT:\n\t\t\t\tcolToData.put(columnRef, (IntData)object);\n\t\t\t\tbreak;\n\t\t\tcase LONG:\n\t\t\t\tcolToData.put(columnRef, (LongData)object);\n\t\t\t\tbreak;\n\t\t\tcase DOUBLE:\n\t\t\t\tcolToData.put(columnRef, (DoubleData)object);\n\t\t\t\tbreak;\n\t\t\tcase STRING:\n\t\t\t\tcolToData.put(columnRef, (StringData)object);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Generate statistics for output\n\t\t\tif (LoggingConfig.BUFFER_VERBOSE) {\n\t\t\t\tlong totalMillis = System.currentTimeMillis() - startMillis;\n\t\t\t\tSystem.out.println(\"Loaded \" + columnRef.toString() + \n\t\t\t\t\t\t\" in \" + totalMillis + \" milliseconds\");\n\t\t\t}\n\t\t\t// Generate debugging output\n\t\t\tlog(\"*** Column \" + columnRef.toString() + \" sample ***\");\n\t\t\tint cardinality = colToData.get(columnRef).getCardinality();\n\t\t\tint sampleSize = Math.min(10, cardinality);\n\t\t\tfor (int i=0; i<sampleSize; ++i) {\n\t\t\t\tswitch (column.type) {\n\t\t\t\tcase STRING_CODE:\n\t\t\t\t\tint code = ((IntData)object).data[i];\n\t\t\t\t\tlog(dictionary.getString(code));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlog(\"******\");\n\t\t}\n\t}", "List<String[]> readCsv(String inputFilePath, char separator)throws IOException;", "public interface Column extends List, TetradSerializable {\n static final long serialVersionUID = 23L;\n\n /**\n * Returns the raw data array for this columns. Must be cast to the type of\n * array which supports the particular column implementation being used. The\n * array will typically contain more elements than are actually being used;\n * to obtain the true number of data points, use the size() method. This\n * method should be used by algorithms to retrieve data in columns without\n * incurring the cost of unnecessarruy object creations (e.g. array\n * allocations and generation of primitive data wrappers). </p> Example of\n * proper casting for ContinuousColumn:\n * <pre> double[] data = (double[])column.getRawData(); </pre>\n *\n * @return the raw data array.\n */\n Object getRawData();\n\n /**\n * Returns the variable which governs the type of data stored in this\n * column.\n *\n * @return the variable specification.\n * @see edu.cmu.tetrad.data.Variable\n */\n Node getVariable();\n}", "public static final List resultSet2List(ResultSet rs) throws SQLException {\n\t\t// Tries to discover the name of each column\n\t\tfinal ResultSetMetaData metaData = rs.getMetaData();\n\t\tfinal List results = new ArrayList();\n\n\t\t// Puts each line in the result\n\t\twhile (rs.next()) {\n\t\t\tfinal List row = new ArrayList();\n\t\t\tresults.add(row);\n\n\t\t\t// For each field, creates a entry with the column name and its\n\t\t\t// value\n\t\t\tfor (int i = 1, size = metaData.getColumnCount(); i <= size; i++) {\n\t\t\t\trow.add(rs.getObject(i));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}", "java.lang.String getColumn();", "String getColumn();", "public static int [] readMatrix(){\n int[] matrix=null;\n try {\n String linea;\n if((linea = br.readLine()) != null){\n String[] split = linea.split(\",\");\n matrix = new int[split.length];\n for (int i = 0; i < matrix.length; i++) {\n matrix[i] = Integer.parseInt(split[i]);\n }\n }else{\n br.close();\n }\n } catch (IOException ex) {\n System.err.println(\"Error al leer del buffer\");\n }\n return matrix;\n }", "public ArrayList<String[]> read(String s) throws IOException,\n\t\t\tFileNotFoundException {\n\t\tArrayList<String[]> result = new ArrayList<String[]>();\n\t\tFileReader fr = new FileReader(s);\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString[] row = new String[6];\n\t\tString line;\n\t\twhile (true) {\n\t\t\tline = br.readLine();\n\t\t\tif (line == null) {\n\t\t\t\tbr.close();\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\trow = line.split(\",\");\n\t\t\tresult.add(row);\n\t\t}\n\t}", "public ArrayList<String> selectCommand(String query, String[] wantedColumn){\n String record = null;\n ArrayList<String> records=new ArrayList<>( );\n try (Connection conn = this.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(query)){\n // loop through the result set\n while (rs.next()) {\n record=\"\";\n for (int i = 0; i <wantedColumn.length ; i++) {\n record+=rs.getString( wantedColumn[i] ) + \"\\t\";\n }\n records.add(record);\n }\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return records;\n }", "Object getDataValue(String column, int row);", "public static ListOfString readColumn(final ILogger aLogger,\r\n final String aTableName,\r\n final String aColumnName,\r\n final String aWhere,\r\n final Statement aStatement) {\r\n if (aStatement==null) return null;\r\n String sql= buildSelectQuery(aTableName, aColumnName, aWhere);\r\n return readColumn(aLogger, sql, aStatement);\r\n }", "public Column getColumn(int pos) { return columns[pos]; }", "public List<Pair<byte[], byte[]>> getScanColumn(){\n List<Pair<byte[], byte[]>> list = new ArrayList<Pair<byte[], byte[]>>();\n Iterator<Pair<String ,byte[]>> iter =outList.iterator();\n while(iter.hasNext()){\n Pair<String ,byte[]> col = iter.next();\n if(col.getSecond() == null)\n continue;\n list.add(new Pair<byte[],byte[]>(cf,col.getSecond()));\n }\n return list;\n }", "public static ListOfString readOneRowAsList(final ILogger aLogger,\r\n final String aSql,\r\n final Statement aStatement) {\r\n ResultSet rs= read(aLogger, aSql, aStatement);\r\n return readListAndClose(aLogger, rs);\r\n }", "public static List read(String fileName) throws IOException {\n\tList data = new ArrayList() ;\n Scanner scanner = new Scanner(new FileInputStream(fileName));\n try {\n while (scanner.hasNextLine()){\n data.add(scanner.nextLine());\n }\n }\n finally{\n scanner.close();\n }\n return data;\n }", "java.util.List<io.dstore.engine.procedures.ImModifyNodeCharacsAd.Response.Row> \n getRowList();", "List<String> getHeaderAsList(String name);", "public List<String> readFields() throws IOException\n {\n List<String> fields = new ArrayList<String>();\n StringBuffer sb = new StringBuffer();\n String line = in.readLine();\n\n if (line == null)\n return null;\n\n if (line.length() == 0)\n {\n fields.add(line);\n return fields;\n }\n\n int i = 0;\n do\n {\n sb.setLength(0);\n if (i < line.length() && line.charAt(i) == textQualifier)\n {\n i = handleQuotedField(line, sb, ++i); // skip quote\n }\n else\n {\n i = handlePlainField(line, sb, i);\n }\n\n // Make sure the field name is trimmed before adding it\n fields.add(sb.toString().trim());\n i++;\n }\n while (i < line.length());\n\n return fields;\n }", "public List<CharSequence> allValues(String column) {\n\t\tList<CharSequence> list = new LinkedList<CharSequence>();\n\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tCursor c = db.query(TABLE_PUBKEYS, new String[] { \"_id\", column },\n\t\t\t\tnull, null, null, null, \"_id ASC\");\n\n\t\tif (c != null) {\n\t\t\tint COL = c.getColumnIndexOrThrow(column);\n\n\t\t\twhile (c.moveToNext())\n\t\t\t\tlist.add(c.getString(COL));\n\n\t\t\tc.close();\n\t\t}\n\n\t\tdb.close();\n\n\t\treturn list;\n\t}", "List<String[]> readCsv(String inputFilePath,int skipLine,char separator)throws IOException;", "public static String[] ReadColumnFromExcel(String ExcelFile) throws IOException {\r\n\t\tString[] columnData = {};\r\n\t\tFileInputStream fis = new FileInputStream(ExcelFile);\r\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis);\r\n\t\tXSSFSheet sheet = workbook.getSheetAt(1);\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i<=9;i++) {\r\n\t\t\t\tcolumnData[i]=sheet.getRow(i).getCell(i).getStringCellValue();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tworkbook.close();\r\n\t\t\tfis.close();\r\n\t\t}\r\n\t\treturn columnData;\r\n\t}", "public ArrayList<String> readItem();", "public ArrayList<String> readFromBoard(Position pos){\n\t\treturn boardMatrix[pos.getX()][pos.getY()];\n\t}", "public ArrayList getColumns() {\n return columns;\n }", "java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition> \n getColumnsList();", "public <T> List<T> queryColumn(String columnName, String sql) throws SQLException {\n return queryColumn(columnName, sql, (Object[])null);\n }", "public List<Integer> getRowAsList(int i){\n\t\tList<Integer> row = new ArrayList<Integer>(size*size);\n\t\tfor (int j = 0; j < size*size; j++){\n\t\t\trow.add(numbers[i][j]);\n\t\t}\n\t\treturn row;\n\t}", "public java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> getColumnList() {\n return column_;\n }", "public List getColumns() {\r\n return columns;\r\n }", "int getColumn();", "public java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> getColumnList() {\n if (columnBuilder_ == null) {\n return java.util.Collections.unmodifiableList(column_);\n } else {\n return columnBuilder_.getMessageList();\n }\n }", "public abstract void load(LongIntsCol col, DataInputStream output) throws IOException;", "@SuppressWarnings(\"unchecked\")\n public ArrayList readVector() throws IOException {\n int length = readVectorHeader();\n ArrayList result = new ArrayList(length);\n for (int i = 0; i < length; i++) {\n result.add(read());\n }\n return result;\n }", "@Override\r\n\tpublic String[] getCol(String[] sql) {\n\t\treturn null;\r\n\t}", "Object getColumnValue(int colIndex);", "public final int getColumn() {\n/* 368 */ return this.bufcolumn[this.bufpos];\n/* */ }", "public static ArrayList<String> getColumValues(String columnWanted, String sheetName) throws Exception {\r\n\t\t\tFileInputStream fileIn = new FileInputStream(new File(\"./DataSheet.xls\"));\r\n\t\t\t// read file\r\n\t\t\tPOIFSFileSystem fs = new POIFSFileSystem(fileIn);\r\n\t\t\tHSSFWorkbook filename = new HSSFWorkbook(fs);\r\n\t\t\t// open sheet 0 which is first sheet of your worksheet\r\n\t\t\tHSSFSheet comscoreSheet = filename.getSheet(sheetName);\r\n\t\t\t// we will search for column index containing string \"Your Column Name\"\r\n\t\t\t// in the row 0 (which is first row of a worksheet\r\n\t\t\tInteger columnNo = null;\r\n\t\t\t// output all not null values to the list\r\n\t\t\tList<Cell> cells = new ArrayList<Cell>();\r\n\t\t\tList<String> excelParametersList = new ArrayList<String>();\r\n\t\t\tRow firstRow = comscoreSheet.getRow(0);\r\n\t\t\tfor (Cell cell : firstRow) {\r\n\t\t\t\tif (cell.getStringCellValue().equals(columnWanted)) {\r\n\t\t\t\t\tcolumnNo = cell.getColumnIndex();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (columnNo != null) {\r\n\t\t\t\tfor (Row row : comscoreSheet) {\r\n\t\t\t\t\tCell c = row.getCell(columnNo);\r\n\t\t\t\t\tif (c == null || c.getCellType() == Cell.CELL_TYPE_BLANK) {\r\n\t\t\t\t\t\t// Nothing in the cell in this row, skip it\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcells.add(c);\r\n\t\t\t\t\t\texcelParametersList.add(c.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"could not find column \" + columnWanted + \" in first row of \" + fileIn.toString());\r\n\t\t\t}\r\n\t\t\treturn (ArrayList<String>) excelParametersList;\r\n\t\t}", "public List<String> readFileIntoList(String filepath) throws IOException;", "public Object getValueAt(int row, int column) {\n\t\tString[] rowValues = this.records.get(row);\n return rowValues[column];\n\t}", "@Override\n\t@Transactional\n\tpublic List<String> leerColumnasTxtDelServidor(String ubicacion) {\n\t\tList<String> lines = Collections.emptyList();\n\t\tList<String> listadoColumnas = new ArrayList<String>(); // Agregar nombres de la columna\n\t\tSpssDataFileReader reader = null;\n\t\ttry {\n\n\t\t\tlines = Files.readAllLines(Paths.get(ubicacion), StandardCharsets.UTF_8);\n\t\t\tSystem.out.println(lines.get(0));\n\t\t\tString campos = lines.get(0);\t\t\t\n\t\t\tlistadoColumnas=Arrays.asList(campos.split(\",\"));\n\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace(System.out);\n\t\t}\n\t\treturn listadoColumnas;\n\t}", "public static ColumnData getData(ColumnRef columnRef) throws Exception {\n\t\t// Load data if necessary\n\t\tif (!colToData.containsKey(columnRef)) {\n\t\t\tloadColumn(columnRef);\n\t\t}\n\t\treturn colToData.get(columnRef);\n\t}" ]
[ "0.654364", "0.62857723", "0.6053204", "0.5984167", "0.59596217", "0.59271747", "0.5904158", "0.5881015", "0.5847771", "0.5831133", "0.5803572", "0.57750434", "0.5769891", "0.5759572", "0.5753936", "0.5748568", "0.5744393", "0.572198", "0.5695842", "0.56874764", "0.56833816", "0.5642972", "0.5636706", "0.5632832", "0.56325483", "0.5621092", "0.55614924", "0.54969954", "0.54759085", "0.5459674", "0.5449266", "0.54370433", "0.5420847", "0.539846", "0.5394955", "0.53880125", "0.5363531", "0.53539145", "0.5334136", "0.53337526", "0.5321536", "0.53111297", "0.530273", "0.53021544", "0.5301102", "0.5288323", "0.5285758", "0.5275643", "0.52678823", "0.52611065", "0.5260854", "0.5234264", "0.52323556", "0.52250177", "0.51970804", "0.5184059", "0.51605344", "0.5159918", "0.5159918", "0.5156821", "0.5156093", "0.5149204", "0.514365", "0.5133976", "0.51321936", "0.5127495", "0.5112503", "0.51082534", "0.51048565", "0.50997925", "0.50994277", "0.50944626", "0.50881505", "0.5079076", "0.5074454", "0.5068972", "0.5058249", "0.50570065", "0.5056633", "0.5053969", "0.504889", "0.5044681", "0.50240165", "0.50239146", "0.50197786", "0.5001562", "0.49989802", "0.49906197", "0.49878916", "0.49853754", "0.49850518", "0.4983792", "0.49756905", "0.49749738", "0.4966149", "0.496546", "0.49641147", "0.49636096", "0.49529022", "0.49282745" ]
0.62842655
2
Split a line into fields.
protected String[] splitLine(String line) { return StringUtils.splitPreserveAllTokens(line, TabbedLineReader.this.delim); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "private String splitAndGetField(String line, String key) {\r\n\t\tString[] tmps = line.substring(line.indexOf(key) + key.length()).split(\r\n\t\t\t\t\" \");\r\n\t\treturn (tmps[0]);\r\n\t}", "private String[] splitLine(String line)\n\t{\n\t\treturn line.split(CSV_SEPARATOR);\n\t}", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }", "public String[] split(String lineWithoutCmd) {\n String[] fields = new String[2];\n // position of the first space\n int pos = lineWithoutCmd.indexOf(\" \");\n\n // The name of the hashTable\n String tableName = lineWithoutCmd.substring(0, pos);\n // The name of the movie or reviewer\n String name = lineWithoutCmd.substring(pos, lineWithoutCmd.length());\n\n fields[0] = tableName.trim();\n\n fields[1] = name.trim();\n\n return fields;\n }", "private void parseField(String line){\n List<Integer> commaPos = ParserUtils.getCommaPos(line);\n int size = commaPos.size();\n // parse field\n String zip = line.substring(commaPos.get(size-ZIP_CODE_POS-1)+1, commaPos.get(size-ZIP_CODE_POS));\n // if zip is not valid return\n zip = zip.trim();\n if(zip==null || zip.length()<5){\n return;\n }\n // only keep the first 5 digits\n zip = zip.substring(0,5);\n String marketVal = line.substring(commaPos.get(MARKET_VALUE_POS-1)+1, commaPos.get(MARKET_VALUE_POS));\n String liveableArea = line.substring(commaPos.get(size-TOTAL_LIVEABLE_AREA_POS-1)+1, commaPos.get(size-TOTAL_LIVEABLE_AREA_POS));\n // cast those value to Long Double\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n Double DMarketVal = ParserUtils.tryCastStrToDouble(marketVal);\n Double DLiveableArea = ParserUtils.tryCastStrToDouble(liveableArea);\n // update those field into the map\n updatePropertyInfo(lZip,DMarketVal, DLiveableArea);\n }", "private static ArrayList<String> splitString(String line) {\n String[] splits = line.split(DELIMITER);\n return new ArrayList<>(Arrays.asList(splits));\n }", "public void processLine(String line){\n\t\tString[] splitted = line.split(\"(\\\\s+|\\\\t+)\");\n\t\tif(splitted.length < FIELDS){\n\t\t\tSystem.err.println(\"DataRow: Cannot process line : \" + line);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tindex \t\t= Integer.parseInt(splitted[0]);\n\t\tparentIndex = Integer.parseInt(splitted[1]);\n\t\tword \t\t= splitted[2].trim();\n\t\tpos\t\t\t= splitted[3].trim();\n\t\tpredicateLabel = splitted[4].trim();\n\t\tintervenes = splitted[5];\n\t\t\n\t\tidentificationLabel = splitted[6];\n\t\tclassificationLabel = splitted[7];\n\t\t\n\t\thmmState = Integer.parseInt(splitted[8]);\n\t\tnaiveState = Integer.parseInt(splitted[9]);\n\t\tchunk = splitted[10];\n\t\tne = splitted[11];\n\t\tif(splitted.length > FIELDS){\n\t\t\tSystem.err.println(\"WARNING: data row has more than required columns: \" + line);\n\t\t}\n\t}", "private Line(String inLine) {\n // Save the input line.\n this.lineText = inLine;\n // Get the number of fields in the line.\n int nFields = labels.length;\n // Normally, this will work.\n this.fields = TabbedLineReader.this.splitLine(inLine);\n // If the number of fields is wrong, we have to adjust.\n if (this.fields.length != nFields) {\n // Copy the old array and create a new one of the proper length.\n String[] buffer = this.fields;\n this.fields = new String[nFields];\n // Transfer the strings one by one, padding if necessary.\n for (int i = 0; i < nFields; i++) {\n if (i < buffer.length) {\n this.fields[i] = buffer[i];\n } else {\n this.fields[i] = \"\";\n }\n }\n }\n }", "private static String[] lineSplit(String input) {\r\n String[] tokens = input.split(delimiter);\r\n return tokens;\r\n }", "static Map.Entry<String, String> splitLine(String line) {\n // TODO: Make this method less gross!\n int count = 0;\n int cur = 0;\n do {\n cur = line.indexOf(' ', cur+1); // Move cursor to next space character.\n count++;\n } while (0 <= cur && count < 4);\n\n String key, value;\n if (0 <= cur && cur < line.length()) {\n // Don't include the separating space in either `key` or `value`:\n key = line.substring(0, cur); //\n value = line.substring(cur+1, line.length());\n } else {\n key = line;\n value = \"\";\n }\n\n return new Map.Entry<String, String>() {\n @Override public String getKey() {\n return key;\n }\n @Override public String getValue() {\n return value;\n }\n @Override public String setValue(String value) {\n throw new UnsupportedOperationException();\n }\n };\n }", "public String[] split(String line, String delimit) {\r\n\t\tlog.debug(\"line = \" + line);\r\n\t\tString[] a = null;\r\n\t\tVector<String> lines = new Vector<String>();\r\n\t\tline = line.replaceAll(\"\\\\\\\\\" + delimit, \"\\\\e\");\r\n\t\ta = line.split(delimit);\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tString thisLine = a[i];\r\n\t\t\tlog.debug(\"thisLine[\" + i + \"] = \" + thisLine);\r\n\t\t\tif (quoteText && thisLine.startsWith(\"\\\"\")) {\r\n\t\t\t\twhile (!thisLine.endsWith(\"\\\"\") && i < a.length) {\r\n\t\t\t\t\tthisLine += \",\" + a[++i];\r\n\t\t\t\t}\r\n\t\t\t\tif (i == line.length()) {\r\n\t\t\t\t\tthrow new RuntimeException(\"unterminated string quote\");\r\n\t\t\t\t}\r\n\t\t\t\tthisLine = thisLine.substring(1, thisLine.length()-2);\r\n\t\t\t\tthisLine.replaceAll(\"\\\\e\", delimit);\r\n\t\t\t}\r\n\t\t\tlines.add(thisLine);\r\n\t\t}\r\n\t\ta = new String[1];\r\n\t\treturn lines.toArray(a);\r\n\t}", "public Tuple(String textLine, String delimiter) {\n if (delimiter == null) {\n delimiter = defaultDelimiter;\n }\n \n fields = new ArrayList<Datum>(numFields) ;\n int delimSize = delimiter.length() ;\n boolean done = false ;\n \n int lastIdx = 0 ;\n \n while (!done) {\n int newIdx = textLine.indexOf(delimiter, lastIdx) ;\n if (newIdx != (-1)) {\n String token = textLine.substring(lastIdx, newIdx) ;\n fields.add(new DataAtom(token));\n lastIdx = newIdx + delimSize ;\n }\n else {\n String token = textLine.substring(lastIdx) ;\n fields.add(new DataAtom(token));\n done = true ;\n }\n }\n\n numFields = fields.size();\n }", "public List<String> readFields() throws IOException\n {\n List<String> fields = new ArrayList<String>();\n StringBuffer sb = new StringBuffer();\n String line = in.readLine();\n\n if (line == null)\n return null;\n\n if (line.length() == 0)\n {\n fields.add(line);\n return fields;\n }\n\n int i = 0;\n do\n {\n sb.setLength(0);\n if (i < line.length() && line.charAt(i) == textQualifier)\n {\n i = handleQuotedField(line, sb, ++i); // skip quote\n }\n else\n {\n i = handlePlainField(line, sb, i);\n }\n\n // Make sure the field name is trimmed before adding it\n fields.add(sb.toString().trim());\n i++;\n }\n while (i < line.length());\n\n return fields;\n }", "private void SplitString(String line) {\n String[] splittedLine = line.split(\"-\");\n AddLineToDictionary(Integer.parseInt(splittedLine[0]), splittedLine[1]);\n }", "@Override\n protected void processLine(String line) {\n String[] lines = line.split(\",\");\n for (String l : lines) {\n data.add(l);\n }\n }", "private void fillFieldsList(List<String> lines, int numberOfFields) throws Exception {\n for (int index = 1; index < numberOfFields; index++) {\n String[] fieldTypes = lines.get(index).split(\" \");\n switch (fieldTypes[0]) {\n case \"property\":\n fields.add(new PropertyField());\n break;\n case \"service\":\n fields.add(new ServiceField(Integer.parseInt(fieldTypes[1])));\n break;\n case \"lucky\":\n fields.add(new LuckyField(Integer.parseInt(fieldTypes[1])));\n break;\n default:\n throw new Exception(\"No field defined for this board \");\n }\n }\n\n }", "public void readLine(String line){\n\t\tfields = line.split(\"\\\\s*,\\\\s*\");\n\t\tDate key = parseDate(fields[0]);\n\t\tif(key != null){\n\t\t\tDouble val = parseAverage(fields[6]);\t\t\n\t\t\tdja.put(key, val);\n\t\t}\n\t}", "private String[] splitLine (String fileLine){\n String[] ans = new String[5];\n ans[0] = fileLine.substring(0, fileLine.indexOf(\"!\"));\n ans[1] = fileLine.substring(fileLine.indexOf(\"[\") + 1, fileLine.indexOf(\"]\"));\n String dfTf = fileLine.substring(fileLine.indexOf(\"]!\") + 2);\n ans[3] = dfTf;\n ans[2] = dfTf.substring(0, dfTf.indexOf(\"!\"));\n if (dfTf.contains(\"^\")) {\n ans[4] = dfTf.substring(dfTf.length() - 1);\n ans[3] = ans[3].substring(ans[3].indexOf(\"!\") + 1, ans[3].length() - 2);\n } else\n ans[3] = ans[3].substring(dfTf.indexOf(\"!\") + 1);\n\n return ans;\n }", "@Override\n public boolean isFieldLine(int line) {\n return lineToField.containsKey(line);\n }", "public Record(String line)\t// create a record from a line\n\t{\n\t\tint i;\n\t\trecordMap = new HashMap<>(); \n\t\tStringTokenizer st = new StringTokenizer(line, DELIMITER);\n\n\t\tfor (i=0; i < NUMBER_OF_FIELDS; i++)\n\t\t{\n\t\t\trecordMap.put(i, new Field(FIELD_TYPES[i], FIELD_LABELS[i], st.nextToken()));\n\t\t}\t\t\n\t}", "private static void readLine(BufferedReader br, String field, String line, int pos, GameFile gameFile) throws IOException {\r\n\t\t\r\n\t\tString[] s = line.split(\"=\"); //splits the current line at equal sines\r\n\t\t\r\n\t\tString n = s[0];\r\n\t\t\r\n\t\tif(n.isEmpty()) return;\r\n\t\tif(n.startsWith(\"#\")) return; //if the line is a comment, skip the line\r\n\t\t\r\n\t\tString f = field + \".\" + n; //add the field name to the end of the field chain\r\n\t\t\r\n\t\t//if the line does not contain an equales sine than just add the line to the gamefile\r\n\t\tif(s.length == 1) {\r\n\t\t\tgameFile.add(field, n, pos);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//if the rest of the current line starts with a currly bracket than read that line\r\n\t\tif(s[1].startsWith(\"{\")) {\r\n\t\t\tString newLine = line.substring(line.indexOf(\"{\")+1); //gets the line after the currly bracket\r\n\t\t\tif(f.contains(\"?\"))\r\n\t\t\t\tf = f.replace(\"?\", \":\");\r\n\t\t\tread(br, f, newLine.replace(\"\\\\}\", \"}\"), pos+1, gameFile); //replases the exscaped end currly bracket with a nonecaped one\r\n\t\t} else { //else add the line to the gamefile\r\n\t\t\t//if the line contains commas, run through whats between the commas as sepret entrys\r\n\t\t\tif(line.contains(\",\")) {\r\n\t\t\t\tString[] split = line.split(\",\");\r\n\t\t\t\tfor(String l: split) {\r\n\t\t\t\t\treadLine(br, field, l, pos, gameFile);\r\n\t\t\t\t}\r\n\t\t\t} else { //else add the line with out currly brackets\r\n\t\t\t\tgameFile.add(f, s[1].replace(\"}\", \"\"), pos);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn;\r\n\t\t\r\n\t}", "protected void readFieldDelim(java.lang.String s) throws java.io.IOException {\n readExpected(s);\n }", "public void split(String line) {\r\n \r\n String temp[]=line.split(\";\");\r\n String dayno=temp[0];\r\n String itemval=temp[3];\r\n String dayvalues[]=dayno.split(\":\");\r\n String itemvalues[]=itemval.split(\":\");\r\n int dayno1=Integer.parseInt(dayvalues[1]);\r\n \r\n String itemno = itemvalues[1];\r\n \r\n \r\n tcount++;\r\n if(dayno1>dcount)\r\n {\r\n dcount++; \r\n }\r\n \r\n if(itemno.equals(\"Gun\"))\r\n icount++;\r\n else if(itemno.equals(\"NailCutter\"))\r\n icount++;\r\n else if(itemno.equals(\"Blade\"))\r\n icount++;\r\n else if(itemno.equals(\"Knife\"))\r\n icount++;\r\n \r\n \r\n apstate.settravellers(tcount);\r\n apstate.setprohibiteditems(icount);\r\n apstate.setdays(dcount);\r\n \r\n \r\n }", "public static Vector<String> parseLine(String line, String separator)\n\t{\n\t\tVector<String> partes=new Vector<>();\n\t\tint index = 0,offset = 0;\n\t\tint indexComillas;\n\t\tboolean startingComillas = true;\n\t\tif(line==null)return partes;\n\t\tif(!line.endsWith(separator))line+=separator;\n\t\tif((indexComillas = line.indexOf('\\\"')) == -1)indexComillas = Integer.MAX_VALUE;\n\t\twhile((index=line.indexOf(separator,startingComillas ? offset : indexComillas))!=-1)\n\t\t{\n\t\t\tif(index > indexComillas)\n\t\t\t{\n\t\t\t\tif((indexComillas = line.indexOf('\\\"', index)) == -1)indexComillas = Integer.MAX_VALUE;\n\t\t\t\tif(startingComillas)\n\t\t\t\t{\n\t\t\t\t\tstartingComillas = false;\n\t\t\t\t\toffset++;\n\t\t\t\t\tif(indexComillas == Integer.MAX_VALUE)break;\n\t\t\t\t\telse continue;\n\t\t\t\t}\n\t\t\t\telse startingComillas = true;\n\t\t\t\tindex--;\n\t\t\t}\n\t\t\tpartes.addElement(line.substring(offset,index));\n\t\t\toffset=index;\n\t\t\twhile(line.startsWith(separator,++offset)&&offset<line.length()); // Elimino separadores seguidos\n\t\t}\n\t\tif(!startingComillas) // Si faltan las comillas de cierre, igual pongo esa parte\n\t\t\tpartes.addElement(line.substring(offset, line.length() - separator.length()));\n\t\treturn partes;\n\t}", "public String[] parse(String line, String sep, boolean bQuoted, int lineNumber) {\n int pos = 0;\n String[] flds = new String[0];\n StringTokenizer tok = new StringTokenizer(line, sep, true);\n for ( ;tok.hasMoreTokens(); ) {\n String word = tok.nextToken();\n if (word.equals(sep)) {\n pos++;\n }\n else {\n int x = word.length();\n if (bQuoted && x > 2) {\n if ( word.charAt(0) == '\"' && word.charAt(x-1) == '\"') {\n word = word.substring(1, x-1);\n }\n }\n flds = Arrays.copyOf(flds, pos+1);\n flds[pos] = word;\n }\n }\n return flds;\n }", "public static String[] splitString(String str) {\r\n String line = str.trim();\r\n String info = \"\";\r\n String areas = \"\";\r\n for (int i = 0; i < line.length(); i ++) {\r\n if (i <= 6)\r\n info += line.charAt(i);\r\n else\r\n areas += line.charAt(i);\r\n }\r\n info = info.trim();\r\n areas = areas.trim();\r\n String[] splitString = new String[]{info, areas};\r\n return splitString;\r\n }", "private static String[] parseInstance(String line) {\n line = line.trim();\n String[] instance = line.split(\",\");\n return instance;\n }", "private boolean parseLine()\r\n\t{\r\n\t\tString delim = \"\\t\";\r\n\t\tm_tokenizer = new StringTokenizer(m_line, delim, true);\r\n\t\tString token;\r\n\t\t\r\n\t\tint tokCount = m_tokenizer.countTokens();\r\n\t\tif ((fieldIndexArray.length <= tokCount) &&\t(tokCount <= fieldIndexArray.length*2))\r\n\t\t{\r\n\t\t\tint lastDelim = -2; /** case when line has consecutive (>=2) tabs!*/\r\n\t\t\tint columnIndex = 0;\r\n\t\t\t/** Tokenise the chip data file's line to separate the data to be put in various columns*/\r\n\t\t\tfor (int i=0; i< tokCount; i++) \r\n\t\t\t{\r\n\t\t\t\ttoken = m_tokenizer.nextToken();\r\n\t\t\t\tif (token.equalsIgnoreCase(delim)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (lastDelim + 1 == i) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** 2 consecutive tags - empty string value*/\r\n\t\t\t\t\t\tif(columnIndex<fieldIndexArray.length)\r\n\t\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(\"\");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlastDelim = i;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\t/** Each time when new token rrpresenting column data is encountered then columnIndex is \r\n\t\t\t\t\t * incremented and tokens are stored till the token number is less than total number\r\n\t\t\t\t\t * of tokens on one line according to fieldIndexArray */\r\n\t\t\t\t\tif(columnIndex < fieldIndexArray.length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t/** If total description length exceeds the precision of that field in the table then \r\n\t\t\t\t\t\t * it will be truncated to load it in the description field*/\r\n\t\t\t\t\t\tif(columnIndex == (fieldIndexArray.length-1))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (token.length() > max)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tStringBuffer tokenbuffer = new StringBuffer(token);\r\n\t\t\t\t\t\t\t\ttokenbuffer.setLength(max);\r\n\t\t\t\t\t\t\t\tif(tokenbuffer.charAt(max-1) != '\"')\r\n\t\t\t\t\t\t\t\t\ttokenbuffer.append('\"');\r\n\t\t\t\t\t\t\t\ttoken=tokenbuffer.toString();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/** Here fieldIndexArray will give the actual location of particular token\r\n\t\t\t\t\t\t * in the chipinformation table. This mapping is already done in fieldIndexArray */\r\n\t\t\t\t\t\tbaseRecord.fields[fieldIndexArray[columnIndex++]].append(token);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\tLogger.log(\"Invalid record: \"+ tokCount + \" fields. \",\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\tLogger.log(\"Expected tokens = \"+ fieldIndexArray.length,\r\n\t\t\t\t\tLogger.WARNING);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public TabbedLineReader(InputStream inStream, int fields, char delimiter) throws IOException {\n this.openFile(inStream, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "private void processFirstLine(String line) {\r\n\t\tString[] numsAsStr = line.split(\" \");\r\n\t\tnumRows = Integer.parseInt(numsAsStr[0]);\r\n\t\tnumCols = Integer.parseInt(numsAsStr[1]);\r\n\t\t/**\r\n\t\t * Taken out for time testing\r\n\t\t */\r\n//\t\tSystem.out.println(\"Rows: \" + numRows + \" Cols: \" + numCols);\r\n\t}", "public static void readHeaderFields(InputStream in, HashMap headerfields) throws IOException, ProtocolException {\r\n\t\tString fieldname = null;\r\n\t\tint i;\r\n\t\tSimpleStringBuilder buffer = Toolkit.getInstance().createSimpleStringBuilder();\r\n\t\tboolean foundCR = false;\r\n\t\tboolean foundCRLF = false;\r\n\t\twhile (((i = in.read()) != -1)) {\r\n\t\t\tif (fieldname == null) {\r\n\t\t\t\tif (i == Specialchars.CR && foundCRLF) {\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tfoundCRLF = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (foundCR) {\r\n\t\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (i == Specialchars.COL) {\r\n\t\t\t\t\tfieldname = buffer.toString().toLowerCase();\r\n\t\t\t\t\tif (fieldname.length() == 0) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// no CTL (ascii 0-31) allowed for field-name\r\n\t\t\t\t// no separators allowed for token (see RFC2616 2.2)\r\n\t\t\t\tif ((i >= 0x00 && i <= 0x1F) || i == 0x28 || i == 0x29 || i == 0x3C || i == 0x3D || i == 0x3E || i == 0x40 || i == 0x2C || i == 0x3F || i == 0x3B || i == 0x2F || i == 0x5C || i == 0x5B || i == 0x5D || i == 0x7B || i == 0x7D || i == 0x22 || i == Specialchars.SP || i == Specialchars.HT) { //\r\n\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t}\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t} else {\r\n\t\t\t\tif (i == Specialchars.CR) {\r\n\t\t\t\t\tif (foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t// check for new line end\r\n\t\t\t\tif (i == Specialchars.LF) {\r\n\t\t\t\t\tif (!foundCR) {\r\n\t\t\t\t\t\tthrow new ProtocolException(FAULT_MALFORMED_HEADERFIELD);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (foundCRLF) {\r\n\t\t\t\t\t\t// double CRLF, header ends here\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (fieldname.startsWith(MIMEConstants.DEFAULT_HEADERFIELD_PREFIX)) {\r\n\t\t\t\t\t\theaderfields.put(fieldname, buffer.toTrimmedString().toLowerCase());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfoundCR = false;\r\n\t\t\t\t\tfoundCRLF = true;\r\n\t\t\t\t\tbuffer.clear();\r\n\t\t\t\t\tfieldname = null;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tfoundCR = false;\r\n\t\t\t\tfoundCRLF = false;\r\n\t\t\t\tbuffer.append((char) i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IOException(FAULT_MALFORMED_HEADERFIELD);\r\n\t}", "public void readEntityCSV(String line) {\n List<String> items = Arrays.asList(line.split(\",\"));\n this.setId(Long.valueOf(items.get(0)));\n this.noOfRounds = Integer.parseInt(items.get(1));\n this.caliber = Float.parseFloat(items.get(2));\n this.manufacturer = items.get(3);\n this.price = Float.parseFloat(items.get(4));\n }", "public String[] parseLine() {\n String[] tokens = null;\n try {\n tokens = csvReader.readNext();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return tokens;\n }", "protected String[] splitMVSLine(String raw) {\n if (raw == null) {\n return new String[] {};\n }\n StringTokenizer st = new StringTokenizer(raw);\n String[] rtn = new String[st.countTokens()];\n int i = 0;\n while (st.hasMoreTokens()) {\n String nextToken = st.nextToken();\n rtn[i] = nextToken.trim();\n i++;\n }\n return rtn;\n }", "protected abstract void parse(String line);", "public String[] getParameters(String line, int length)\n\t\t\tthrows IllegalArgumentException {\n\t\tString[] parts = line.split(\": \");\n\t\tif (parts.length == 2) {\n\t\t\tString[] params = parts[1].split(\",\");\n\t\t\tif (params.length == length) {\n\t\t\t\treturn params;\n\t\t\t}\n\t\t}\n\n\t\tthrow new IllegalArgumentException();\n\t}", "public static String[] splitLine(String line) {\n\t\t\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tArrayList<String> stockStrs = new ArrayList<String>();\n\t\t\n\t\tchar[] chars = line.toCharArray();\n\t\tboolean inQuotes = false;\n\t\tfor (char ch: chars) {\n\t\t\tif (inQuotes) {\n\t\t\t\tif (ch == '\"') {\n\t\t\t\t\tinQuotes = false;\n\t\t\t\t} else {\n\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ch == '\"') {\n\t\t\t\t\tinQuotes = true;\n\t\t\t\t} else if (ch == ',') {\n\t\t\t\t\tstockStrs.add(buffer.toString());\n\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t} else {\n\t\t\t\t\tbuffer.append(ch);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstockStrs.add(buffer.toString());\n\t\n\t\tString[] stockStrsArray = stockStrs.toArray(new String[stockStrs.size()]);\n\t\treturn stockStrsArray;\n\t}", "final public void fieldFromSrc(){\n List<String> lines = readSrc();\n size = Integer.parseInt(lines.get(0));\n Tile[] tiles = new Tile[size*size];\n int count = 0;\n Tile t;\n \n char[][] fieldChars = new char[size][size];\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n try{\n fieldChars[X][Y] = lines.get(Y+1).charAt(X);\n }catch(StringIndexOutOfBoundsException e){\n System.out.println(e);\n }\n }\n }\n \n for(int Y=0; Y<size; Y++){\n for(int X=0; X<size; X++){\n Coordinaat C = new Coordinaat(X,Y); \n switch(fieldChars[X][Y]){\n case 'M' : \n t = new Muur(C); \n break;\n case 'V' :\n t = new Veld(C);\n break;\n case 'E' :\n t = new EindVeld(C);\n break;\n default :\n t = new Tile(C);\n break;\n }\n tiles[count] = t;\n count++;\n }\n }\n \n fillField(tiles,size);\n createMoveAbles(lines.subList(size+2, lines.size()));\n }", "public void parseLine(String line, ParseState parseState) {\n String[] lineElements = line.split(\"\\\\s\");\n if (lineElements.length == 2 && \"attributes\".equals(lineElements[0]) && \"{\".equals(lineElements[1])) {\n SubgraphAttributeDefLineParser contAttrDefLineParser = new SubgraphAttributeDefLineParser(container);\n PopulateDB.parseBlock(parseState, contAttrDefLineParser);\n } else if (lineElements.length == 3 && \"subgraph\".equals(lineElements[0]) && \"{\".equals(lineElements[2])) {\n int subgID = Integer.parseInt(lineElements[1]);\n SubgraphLineParser subgraphLineParser = new SubgraphLineParser(container, subgID);\n PopulateDB.parseBlock(parseState, subgraphLineParser);\n } else {\n throw new IllegalArgumentException(\"Bad attributes or subgraph definition\");\n }\n }", "protected abstract DataTypes[] processLine(MutableCharArrayString line);", "protected void processLine(String line){}", "protected void parseLine(String dataLine) {\n String[] line = dataLine.split(\",\");\n if (validater(line)) {\n try {\n Route route =\n new Route(\n line[airline],\n Integer.parseInt(line[airlineID]),\n line[sourceAirport],\n Integer.parseInt(line[sourceAirportID]),\n line[destinationAirport],\n Integer.parseInt(line[destinationAirportID]),\n line[codeshare],\n Integer.parseInt(line[stops]),\n line[equipment].split(\" \"));\n addRoute(route);\n } catch (Exception e) {\n errorCounter(11);\n }\n }\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLines() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = false;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t\t\n\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLines - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\n\t\t\top = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "private ImportCommand parseLinesFromFile(BufferedReader br) {\n boolean hasContactWithInvalidField = false;\n boolean hasContactWithoutName = false;\n try {\n String line = br.readLine();\n while (line != null) {\n String[] attributes = line.split(\",\", -1);\n int numAttributes = attributes.length;\n\n if (attributes[NAME_FIELD].equalsIgnoreCase(\"Name\")\n || attributes[NAME_FIELD].equalsIgnoreCase(\"Name:\")) { // ignore headers\n line = br.readLine();\n continue;\n }\n\n if (contactHasNoName(attributes, numAttributes)) {\n hasContactWithoutName = true;\n line = br.readLine();\n continue;\n }\n\n Name name = null;\n Optional<Phone> phone = Optional.empty();\n Optional<Email> email = Optional.empty();\n Optional<Address> address = Optional.empty();\n Meeting meeting = null;\n\n try {\n name = ParserUtil.parseName(attributes[NAME_FIELD]);\n if (!attributes[PHONE_FIELD].matches(\"\")) {\n phone = Optional.of(ParserUtil.parsePhone(attributes[PHONE_FIELD]));\n }\n if (!attributes[EMAIL_FIELD].matches(\"\")) {\n email = Optional.of(ParserUtil.parseEmail(attributes[EMAIL_FIELD]));\n }\n if (!attributes[ADDRESS_FIELD].matches(\"\")) {\n address = Optional.of(ParserUtil.parseAddress(attributes[ADDRESS_FIELD]));\n }\n if (!attributes[MEETING_FIELD].matches(\"\")) {\n meeting = ParserUtil.parseMeeting(attributes[MEETING_FIELD]);\n }\n } catch (ParseException pe) {\n hasContactWithInvalidField = true;\n line = br.readLine();\n continue;\n }\n\n ArrayList<String> tags = new ArrayList<>();\n //Check for tags\n if (numAttributes > TAG_FIELD_START) {\n for (int i = TAG_FIELD_START; i < numAttributes; i++) {\n if (!attributes[i].matches(\"\")) {\n tags.add(attributes[i]);\n }\n }\n }\n\n Set<Tag> tagList = null;\n try {\n tagList = ParserUtil.parseTags(tags);\n } catch (ParseException e) {\n line = br.readLine();\n continue;\n }\n if (meeting == null) {\n persons.add(new Person(name, phone, email, address, tagList));\n } else {\n persons.add(new Person(name, phone, email, address, tagList, meeting));\n }\n line = br.readLine();\n }\n br.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n return new ImportCommand(persons, hasContactWithInvalidField, hasContactWithoutName);\n }", "public void readFields(DataInput in) throws IOException {\n byte[] b = new byte[1];\n in.readFully(b);\n if (b[0]!=TUPLE)\n throw new IOException(\"Unexpected data while reading tuple from binary file\");\n Tuple t = read(in);\n fields = t.fields;\n }", "private final List<PLineSegment> getLineSegmentsForSplitLine(SplitLine splitLine) {\n int lineIndex = splitLine.getLineIndex();\n List<PLineSegment> segments = getLineSegments(lineIndex);\n int index = 0;\n ArrayList<PLineSegment> result = new ArrayList<PLineSegment>();\n int start = splitLine.getOffset();\n int end = start + splitLine.getLength();\n \n for (int i = 0; index < end && i < segments.size(); ++i) {\n PLineSegment segment = segments.get(i);\n if (start >= index + segment.getModelTextLength()) {\n index += segment.getModelTextLength();\n continue;\n }\n if (start > index) {\n int skip = start - index;\n segment = segment.subSegment(skip);\n index += skip;\n }\n if (end < index + segment.getModelTextLength()) {\n segment = segment.subSegment(0, end - index);\n }\n result.add(segment);\n index += segment.getModelTextLength();\n }\n return result;\n }", "public abstract void readFields(DataInput in) throws IOException;", "private void fillPlayersList(List<String> lines, int numberOfFields) throws Exception {\n if (fields.size() == 0) throw new Exception(\"No fields found\");\n int numberOfPlayersIndex = Integer.parseInt(lines.get(numberOfFields + 1));\n for (int index = numberOfFields + 2;\n index <= numberOfFields + numberOfPlayersIndex + 1;\n index++) {\n String[] player = lines.get(index).split(\" \");\n switch (player[1]) {\n case \"greedy\":\n players.add(new Player(player[0], StrategyType.GREEDY));\n break;\n case \"careful\":\n players.add(new Player(player[0], StrategyType.CAREFUL));\n break;\n case \"tactical\":\n players.add(new Player(player[0], StrategyType.TACTICAL));\n break;\n }\n }\n }", "public static void appendSplittedSegment(StringBuilder sb, List<String> fields, char fieldSeparator) {\r\n for (String field : fields) {\r\n sb.append(field).append(fieldSeparator);\r\n }\r\n for (int len = sb.length(); sb.charAt(--len) == fieldSeparator; ) {\r\n sb.setLength(len);\r\n }\r\n sb.append('\\r');\r\n }", "private ProductRecord parseLine(String line) {\n\t\tString[] splittedLine = splitAndTrim(line);\n\t\t\n\t\tString name = splittedLine[0];\n\t\tString id = splittedLine[1];\n\t\tint price = Integer.parseInt(splittedLine[2]);\n\t\tint currentStock = Integer.parseInt(splittedLine[3]);\n\t\tint minStock = Integer.parseInt(splittedLine[4]);\n\t\t\n\t\t// Parse memo if exist.\n\t\tString memo = null;\n\t\tif (splittedLine.length >= 6) memo = splittedLine[5];\n\t\t\n\t\t// Get category from product id.\n\t\tString category;\n\t\tint categoryInt = Integer.parseInt(id.split(\"-\")[0]);\n\t\tswitch (categoryInt) {\n\t\tcase 1:\n\t\t\tcategory = \"Food\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcategory = \"Office\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcategory = \"Misc.\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcategory = \"Health\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcategory = \"Clothing\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcategory = \"Etc\";\n\t\t}\n\t\t\n\t\treturn new ProductRecord(name, id, category, price, currentStock, minStock, memo);\n\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void test_headerSplitOnNofLinesWithRegex() throws StageException, IOException {\n\t\tprocessor.headerConfig = getHeaderConfig(null, NOF_HEADER_LINES);\n\n\t\t// prepare details config\n\t\tprocessor.detailsConfig.detailsColumnHeaderType = DetailsColumnHeaderType.USE_HEADER;\n\t\tprocessor.detailsConfig.separatorAsRegex = true;\n\t\tprocessor.parserConfig.splitDetails = true;\n\t\t\n\t\trunner = new ProcessorRunner.Builder(HeaderDetailParserDProcessor.class, processor)\n\t\t\t\t.setExecutionMode(ExecutionMode.STANDALONE)\n\t\t\t\t.setResourcesDir(\"/tmp\")\n\t\t\t\t.addOutputLane(\"header\").addOutputLane(\"headerDetails\")\n\t\t\t\t.build();\n\t\trunner.runInit();\n\n\t\t// run the test\n\t\tList<Record> op = null;\n\t\ttry {\n\t\t\tList<Record> input = prepareInput(TEST_FILE_WITH_HEADER_AND_DETAILS_HEADER);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t\n\t\t\tStageRunner.Output output = runner.runProcess(input);\n\t\t\t\n\t\t System.out.println(\"test_headerSplitOnNofLinesWithRegex - Total execution time: \" + (System.currentTimeMillis()-startTime) + \"ms\"); \n\t\t\t\n\t\t op = output.getRecords().get(\"headerDetails\");\n\n\t\t} finally {\n\t\t\trunner.runDestroy();\n\t\t}\n\n\t\t// assert\n\t\tassertEquals(42324, op.size());\n//\t\tassertEquals(\"11:02:12.000\", StringUtils.substring(op.get(0).get(\"/detail\").getValueAsString(), 0, 12));\n\t}", "public Iterable<String> call(String line) throws Exception {\n\t\t\t\treturn Arrays.asList(line.split(\",\"));\n\t\t\t}", "public String getField(String fieldName){\r\n\t\tString split[] = currentLine.split(Constants.SPLIT_MARK);\r\n\t\tif (mapHeader.get(fieldName) == -1 || mapHeader.get(fieldName) >= split.length) \r\n\t\t\treturn Integer.toString(Constants.UNKNOWN);\r\n\t\tif (split[mapHeader.get(fieldName)].equals(\"\")) \r\n\t\t\treturn Integer.toString(Constants.UNKNOWN);\r\n\t\treturn split[mapHeader.get(fieldName)];\r\n\t}", "protected void parseHeaderLine(String unparsedLine) {\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\"HEADER LINE = \" + unparsedLine);\r\n\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\042\\011\");\r\n\t\tString tok = null;\r\n\r\n\t\tfor (int i = 0; t.hasMoreTokens(); i++) {\r\n\t\t\ttok = t.nextToken();\r\n\t\t\tif (DEBUG)\r\n\t\t\t\tSystem.out.println(\"token \" + i + \"=[\" + tok + \"]\");\r\n\t\t\tif (tok.equalsIgnoreCase(CHAN_HEADER)) {\r\n\t\t\t\t_chanIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"chan_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(DIST_HEADER)) {\r\n\t\t\t\t_distIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"dist_header=\" + i);\r\n\t\t\t}\r\n\t\t\tif (tok.equalsIgnoreCase(FILENAME_HEADER)) {\r\n\t\t\t\t_filenameIndex = i;\r\n\t\t\t\tif (DEBUG)\r\n\t\t\t\t\tSystem.out.println(\"filename_header=\" + i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (DEBUG)\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"_chanIndex, _distIndex, _filenameIndex=\" + _chanIndex + \",\" + _distIndex + \",\" + _filenameIndex);\r\n\r\n\t}", "public TabbedLineReader(File inFile, int fields, char delimiter) throws IOException {\n this.openFile(inFile, delimiter);\n this.clearLabels(fields);\n this.readAhead();\n }", "List<Pair<String, Value>> fields();", "List<CountryEntity> parseLines(List<String> line);", "protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }", "public static void parseNewOrder(String line) throws IOException, Exception{\n\t\tString order_id, timestamp;\n\t\tString side;\n\t\tint target_size, size;\n\t\tdouble price;\n\n\t\tremove_order_matcher = remove_order_pattern.matcher(line);\n\t\tadd_order_matcher = add_order_pattern.matcher(line);\n\n if(add_order_matcher.matches()){//add order to log book\n\t\t\t//separate fields\n\t\t\ttimestamp = add_order_matcher.group(1);\n\t\t\torder_id = add_order_matcher.group(2);\n\t\t\tside = add_order_matcher.group(3);\n\t\t\tprice = Double.parseDouble(add_order_matcher.group(4));\n\t\t\tsize = Integer.parseInt(add_order_matcher.group(5));\n\n\t\t\taddOrder(timestamp,order_id,side,price,size);\n\n } else if(remove_order_matcher.matches()){\n\t\t\t//separate fields\n\t\t\ttimestamp = remove_order_matcher.group(1);\n\t\t\torder_id = remove_order_matcher.group(2);\n\t\t\tsize = Integer.parseInt(remove_order_matcher.group(3));\n\n\t\t\tremoveOrder(timestamp,order_id,size);\n\n\t\t} else {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "Field getFields(int index);", "private ArrayList<SimpleDeclaration> parseStructFields(Tokenizer in) {\n\t\tToken next = in.next();\n\t\t\n\t\tArrayList<SimpleDeclaration> fields = new ArrayList<>();\n\t\tif (next.type == Token.TokenType.CLOSE_BRACE)\n\t\t\treturn fields;\n\t\tin.pushTokens(next);\n\t\tfields.add(parseSimpleDeclaration(in));\n\t\tnext = in.next();\n\t\twhile (true) {\n\t\t\tif (next.type == Token.TokenType.CLOSE_BRACE)\n\t\t\t\treturn fields;\n\t\t\tif (next.type != Token.TokenType.COMMA)\n\t\t\t\tthrow new SyntaxError(\"Expected } or , got: '\"+next+\"'\"+next.generateLineChar());\n\t\t\tfields.add(parseSimpleDeclaration(in));\n\t\t\tnext = in.next();\n\t\t}\n\t}", "private void splitLevelDetails() {\n final int zero = 0;\n final int one = 1;\n // goes over all of the levels\n for (int i = 0; i < level.size(); i++) {\n // if the level.get(i) contains \":\"\n if (level.get(i).contains(\":\")) {\n // split the line\n String[] keyAndVal = level.get(i).trim().split(\":\");\n // put the key and the value in the map\n this.map.put(keyAndVal[zero], keyAndVal[one].trim());\n } else {\n break;\n }\n }\n }", "public void parseFlights(String[] lines) throws StorageException {\r\n // Iterate through the lines in the file and create a Flight with the info\r\n // from each line\r\n for (int i = 0; i < lines.length; i++) {\r\n String[] info = lines[i].split(\";\");\r\n try {\r\n addOrUpdateFlight(new Flight(info[0], info[3], Double.parseDouble(info[6]), info[1],\r\n info[2], info[4], info[5], Integer.parseInt(info[7])));\r\n } catch (Exception exception) {\r\n throw new StorageException(\"Cannot parse flight\");\r\n }\r\n }\r\n }", "public boolean parseLine(final Object headerObj, final String[] parts) throws IOException {\n header = (ArrayList<String>)(headerObj);\n \n //System.out.printf(\"parts [len=%d] is '%s'%n\", parts.length, Utils.join(\":\", parts));\n \n if ( parts.length == 0 || COMMENT_PATTERN.matcher(parts[0]).matches() || HEADER_PATTERN.matcher(parts[0]).matches() )\n return false;\n \n if (header.size() != parts.length) {\n throw new IOException(String.format(\"Header length %d not equal to Tabular parts length %d\", header.size(), parts.length));\n }\n \n for ( int i = 0; i < parts.length; i++ ) {\n put(header.get(i), parts[i]);\n }\n \n if ( printRecordsParsed ) System.out.printf(\"Parsed %d records %s%n\", ++parsedRecords, this);\n \n return true;\n }", "public abstract void split(Space s);", "public void parseClients(String[] lines) {\r\n // For each line, add a value mapped to the associated column name\r\n for (int i = 0; i < lines.length; i++) {\r\n String[] info = lines[i].split(\";\");\r\n ContentValues values = new ContentValues();\r\n values.put(\"email\", info[2]);\r\n values.put(\"expiry\", info[5]);\r\n values.put(\"personalAddress\", info[3]);\r\n values.put(\"creditCardNumber\", info[4]);\r\n values.put(\"firstName\", info[1]);\r\n values.put(\"lastName\", info[0]);\r\n // Add or update the database with the parsed info\r\n sqlExecutor.updateOrAddRecords(\"clients\", values);\r\n }\r\n }", "List<Vehicle> getLineVehicles(String line);", "private List<String> read_level_row(String line){\r\n List<String> row = new ArrayList<>();\r\n try (Scanner rowScanner = new Scanner(line)){\r\n rowScanner.useDelimiter(\",\");\r\n while (rowScanner.hasNext()) {\r\n row.add(rowScanner.next());\r\n }\r\n }\r\n return row;\r\n }", "private void getEachElementOfTheLine() {\n int nbOfComa = 0;\n String idItemCraft = \"\";\n ArrayList<String> idItemNeeded = new ArrayList<>();\n ArrayList<String> quantityItemNeeded = new ArrayList<>();\n boolean isFinished = false;\n for (int c = 0; c < line.length() && !isFinished; c++) {\n switch (nbOfComa) {\n\n case 2:\n quantityItemNeeded.add(new String(\"\" + line.charAt(c)));\n if (line.charAt(c + 1) == '.') {\n isFinished = true;\n } else if (line.charAt(c + 1) == ';') {\n nbOfComa = 1;\n c++;\n }\n break;\n\n case 1:\n idItemNeeded.add(new String(\"\" + line.charAt(c)));\n if (line.charAt(c + 1) == ',') {\n nbOfComa++;\n c++;\n }\n break;\n\n case 0:\n idItemCraft = idItemCraft + line.charAt(c);\n if (line.charAt(c + 1) == ';') {\n nbOfComa++;\n c++;\n }\n break;\n\n default:\n break;\n }\n }\n this.idItemCraft = idItemCraft;\n this.idItemNeeded = idItemNeeded;\n this.quantityItemNeeded = quantityItemNeeded;\n }", "private static void read(BufferedReader br, String field, String line, int pos, GameFile gameFile) throws IOException {\r\n\t\t\r\n\t\tGameFile f = gameFile;\r\n\t\t\r\n\t\tif(field.contains(\":\")) {\r\n\t\t\tfield = field.replace(\":\", \"\");\r\n\t\t\tf = new GameFile(field);\r\n\t\t\tgameFile.add(f);\r\n\t\t}\r\n\t\t\r\n\t\t//loops through all line in file\r\n\t\tfor(String l = (line.isEmpty())? br.readLine(): line; l != null; l = br.readLine()) {\r\n\t\t\t\r\n\t\t\tl = l.replaceAll(\"\\\\s+\",\"\"); //get rid of white spaces\r\n\t\t\t\r\n\t\t\tif(l.contains(\"{\") && l.contains(\"}\")) //if both currly brackets exist on the same line, replace end curlly bracket to prevent exiting the function premacherly\r\n\t\t\t\tl = l.replace(\"}\", \"\\\\}\");\r\n\t\t\tif(l.equals(\"}\")) //if the current line contanise only an end currly breaket then exit the function\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\treadLine(br, field, l, pos, f); //interpets the current line\r\n\t\t\t\r\n\t\t\tif(l.contains(\"}\") && !l.contains(\"\\\\}\")) //if the line containes an end currly breaket in it, exit the function\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn;\r\n\t\t\r\n\t}", "private void parseLine(String line) throws ParsingException {\n if (line.startsWith(COMMENT_PREFIX)) //Ignore comments\n return;\n String parts[] = line.split(SEPARATOR_PARAMETER);\n if (parts.length == 2) { //PARAMETER=VALUE\n if (isValidParameter(parts[0])) //If the parameter is present in the config list then add it\n parameters.put(parts[0], parts[1]);\n } else if (parts.length == 1 && parts[0].startsWith(OPTION_PREFIX)) { //-OPTION\n String option = parts[0].substring(OPTION_PREFIX.length());\n if (isValidOption(option))\n parameters.put(option, null); //Null in value differs options from parameters\n } else\n throw new ParsingException(buildErrorMessage(EXCEPTION_BAD_FORMAT));\n }", "public TabbedLineReader(InputStream inStream, int fields) throws IOException {\n this.openFile(inStream, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public static void reformat(BufferedReader input) throws IOException {\n String line = input.readLine();\n\n while (line != null) {\n String[] parts = line.split(\";\", 2);\n for (String part : parts) {\n System.out.println(part);\n }\n line = input.readLine();\n }\n }", "abstract protected T getRecordFromLine(String line) throws DataImportException ;", "public Task parseLine(String line) {\n assert(line != null && !line.equals(\"\"));\n\n String[] x = line.split(\"\\\\|\");\n String taskType = x[0].strip();\n boolean isDone = !x[1].strip().equals(\"0\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"d MMM yyyy HH:mm\");\n\n if (taskType.equals(\"T\")) {\n return new ToDo(x[2].strip(), isDone);\n } else if (taskType.equals(\"D\")) {\n String by = x[x.length - 1].strip();\n LocalDateTime byy = LocalDateTime.parse(by, formatter);\n return new Deadline(x[2].strip(), isDone, byy);\n } else { // Event\n String at = x[x.length - 1].strip();\n LocalDateTime att = LocalDateTime.parse(at, formatter);\n return new Event(x[2].strip(), isDone, att);\n }\n }", "@Override\n\tpublic ArrayList<BigDecimal> input(String line) {\n\t\tArrayList<BigDecimal> list = new ArrayList<BigDecimal>();\n\t\tfor (String s : line.split(\"\\\\s+\")) {\n\t\t\tBigDecimal num = new BigDecimal(Double.parseDouble(s));\n\t\t\tlist.add(num);\n\t\t}\n\n\t\treturn list;\n\t}", "private void processLine(String line1) {\n StringTokenizer tVal = new StringTokenizer(line1);\n int yearOf = Integer.parseInt((tVal.nextToken()));\n List chosenYear = yearOf == 2014 ? employeeSalary_2014:\n employeeSalary_2015;\n String employeeTypeE = tVal.nextToken();\n String employeeName = tVal.nextToken();\n Integer employeeMonthlySalary =\n Integer.parseInt(tVal.nextToken());\n Employee newEmployee = null;\n if (employeeTypeE.equals(\"Salesman\")) {\n Integer salesmanCommission=\n Integer.parseInt(tVal.nextToken());\n\n newEmployee = new Salesman(employeeName, employeeMonthlySalary, salesmanCommission);\n\n }\n else if (employeeTypeE.equals(\"Executive\")) {\n Integer stockPrice= Integer.parseInt(tVal.nextToken());\n newEmployee = new Executive(employeeName, employeeMonthlySalary, stockPrice);\n }\n else {\n newEmployee = new Employee(employeeName, employeeMonthlySalary);\n }\n chosenYear.add(newEmployee);\n }", "private void readFields() throws IOException, ClassFormatException {\n final int fields_count = dataInputStream.readUnsignedShort();\n fields = new Field[fields_count];\n for (int i = 0; i < fields_count; i++) {\n fields[i] = new Field(dataInputStream, constant_pool);\n }\n }", "private LineTokenizer createCardLineTokenizer() {\r\n\t\tDelimitedLineTokenizer lineTokenizer = new DelimitedLineTokenizer();\r\n\t\tlineTokenizer.setDelimiter(\";\");\r\n\t\tlineTokenizer\r\n\t\t\t\t.setNames(new String[] { \"cardId\", \"cardNumber\", \"cardHolderName\", \"expiryDate\", \"cvv\", \"cardTypeId\" });\r\n\t\treturn lineTokenizer;\r\n\t}", "@Override\n public String postProcess(final String line) {\n var lineSeparatorIndex = line.lastIndexOf(RECORD_SEPARATOR_CHARACTER);\n return lineSeparatorIndex >= 0 ? line.substring(0, lineSeparatorIndex) : line;\n }", "private void handleImportLines(String inputLineString ){\n String [] splitInputLine = inputLineString.split(\",\");\n String command = splitInputLine[0];\n String name = \"\";\n String date = \"\";\n String department = \"\";\n\n double pay = 0;\n int role = 0;\n\n if(splitInputLine.length == ADDPARTFULLCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n\n }else if(splitInputLine.length == ADDMANAGECOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n pay = Double.parseDouble(splitInputLine[4]);\n role = Integer.parseInt(splitInputLine[5]);\n }else if(splitInputLine.length == OTHEREXPECTEDCOMMANDS){\n name = splitInputLine[1];\n department = splitInputLine[2];\n date = splitInputLine[3];\n }\n\n if(command.equals(\"P\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Parttime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"F\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Fulltime(newEmployeeProfile, pay);\n company.add(newEmployee);\n }else if(command.equals(\"M\")){\n Profile newEmployeeProfile = profileData(name, department, date);\n Employee newEmployee = new Management(newEmployeeProfile, pay, role);\n company.add(newEmployee);\n }\n }", "private void parseRecord(String line){\n\t\tString[] recordSplit = line.split(\",\");\n\t\tString employeeId = recordSplit[RECORD_EMPLOYEE];\n\t\t/**\n\t\t * check if the key matching employeeId is found in \n\t\t * employeesStocks if not create a new EmployeeStocks \n \t\t * with employeeId as key\n\t\t */\n\t\t\n\t\tif(!mStockReport.getEmployeesRecords().containsKey(employeeId)){\n\t\t\tmStockReport.getEmployeesRecords().put(employeeId, new EmployeeRecords());\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).setEmployeeId(employeeId);\n\t\t}\n\t\tint recordDate = Integer.parseInt(recordSplit[RECORD_DATE]);\n\t\tRecord record = createRecord(recordSplit);\n\t\tswitch(recordSplit[RECORD_TYPE]){\n\t\tcase TYPE_VEST:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putVests(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_SALE:\t\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putSales(recordDate, record);\n\t\t\tbreak;\n\t\tcase TYPE_PERF:\n\t\t\tmStockReport.getEmployeesRecords().get(employeeId).putPerfs(recordDate, record);\n\t\t\tbreak;\n\t\t}\n\t}", "public static StringSplit newSplit(int start) {\n return new StringSplit(start, END_OF_LINE, WordCase.NO_CASE, false);\n }", "String getLineDelimiter(int line) throws BadLocationException;", "public void read(){\n assert(inputStream.hasNext());\n\n while(inputStream.hasNextLine()){\n String line = inputStream.nextLine();\n String[] fields = line.split(\";\");\n\n //If Line is address line\n if(fields.length >= 4){\n Address adr = new Address(fields[0], fields[1], fields[2], fields[3]);\n if(fields.length == 5){\n parseGroups(fields[4], adr);\n }\n inputAddressList.add(adr);\n }\n\n //If Line is Group Line\n else if(fields.length <=3){\n Group group = new Group(fields[0], Integer.parseInt(fields[1]));\n if(fields.length == 3){\n parseGroups(fields[2], group);\n }\n inputGroupList.add(group);\n }\n }\n compose();\n assert(invariant());\n }", "private static List<StudentRecord> convert(List<String> lines) {\n\t\tObjects.requireNonNull(lines);\n\t\t\n\t\tArrayList<StudentRecord> result = new ArrayList<>(lines.size());\n\t\t\n\t\tfor(String data : lines) {\n\t\t\tif(data.length() == 0) continue; //preskoci prazne linije\n\t\t\tScanner sc = new Scanner(data);\n\t\t\tsc.useDelimiter(\"\\t\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tresult.add(new StudentRecord(sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next(), sc.next()));\n\t\t\t}catch(NoSuchElementException e) {\n\t\t\t\tsc.close();\n\t\t\t\tthrow new NoSuchElementException(\"Data not formatted correctly.\");\n\t\t\t}\n\t\t\tsc.close();\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private String[] getNameParts() {\n return field.getName().split(\"_\");\n }", "public List<String> getFields() {\n if (!Strings.isNullOrEmpty(fields)) {\n return Arrays.asList(fields.split(\",\"));\n } else {\n return Collections.emptyList();\n }\n }", "public static Login parse(String line) {\n Validate.notEmpty(line, \"Line may not be empty\");\n\n // Start hack\n // TODO(JeromSar) Explain hack\n final boolean invalid = line.startsWith(\".\");\n if (invalid) {\n line = line.substring(1);\n }\n // End hack\n\n final Matcher matcher = LOGIN_PATTERN.matcher(line.trim());\n\n if (!matcher.find()) {\n return null;\n }\n\n final String comment = matcher.group(1);\n\n if (comment != null && !comment.isEmpty()) {\n return new Login(comment);\n }\n\n return new Login(\n matcher.group(2), // Login\n matcher.group(3), // Password\n matcher.group(4), // Display name\n matcher.group(5), // Email\n matcher.group(6), // Old password\n invalid);\n }", "@Test\n public void test() {\n bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n List<TokensLine> lines = bridge.chunk(\"file.txt\", new InputStreamReader(new ByteArrayInputStream(new byte[0]), StandardCharsets.UTF_8));\n\n assertThat(lines.size(), is(3));\n\n TokensLine line = lines.get(0);\n // 2 tokens on 1 line\n assertThat(line.getStartUnit(), is(1));\n assertThat(line.getEndUnit(), is(2));\n\n assertThat(line.getStartLine(), is(1));\n assertThat(line.getEndLine(), is(1));\n assertThat(line.getHashCode(), is(\"t1t2\".hashCode()));\n\n line = lines.get(1);\n // 1 token on 2 line\n assertThat(line.getStartUnit(), is(3));\n assertThat(line.getEndUnit(), is(3));\n\n assertThat(line.getStartLine(), is(2));\n assertThat(line.getEndLine(), is(2));\n assertThat(line.getHashCode(), is(\"t3\".hashCode()));\n\n line = lines.get(2);\n // 3 tokens on 4 line\n assertThat(line.getStartUnit(), is(4));\n assertThat(line.getEndUnit(), is(6));\n\n assertThat(line.getStartLine(), is(4));\n assertThat(line.getEndLine(), is(4));\n assertThat(line.getHashCode(), is(\"t1t3t3\".hashCode()));\n }", "public String[] parse() {\n String line = input.nextLine();\n line = line.trim();\n if (StringUtils.isNotEmpty(line)) {\n return StringUtils.split(line, \" \");\n }\n return null;\n }", "public TabbedLineReader(File inFile, int fields) throws IOException {\n this.openFile(inFile, '\\t');\n this.clearLabels(fields);\n this.readAhead();\n }", "public static String[] tokenizeWords(String line) {\n\n String[] lineTokens = new String[0];\n if (!line.equals(\"\") && !line.equals(\" \")) {\n lineTokens = line.split(\":| :|: | : \");\n }\n return lineTokens;\n }", "@Override\n public void readFields(DataInput in) throws IOException {\n super.readFields(in);\n\n byte flags = in.readByte();\n hasFooter = (FOOTER_FLAG & flags) != 0;\n isOriginal = (ORIGINAL_FLAG & flags) != 0;\n hasBase = (BASE_FLAG & flags) != 0;\n boolean hasLongFileId = (HAS_LONG_FILEID_FLAG & flags) != 0,\n hasWritableFileId = (HAS_SYNTHETIC_FILEID_FLAG & flags) != 0,\n hasSyntheticProps = (HAS_SYNTHETIC_ACID_PROPS_FLAG & flags) != 0;\n if (hasLongFileId && hasWritableFileId) {\n throw new IOException(\"Invalid split - both file ID types present\");\n }\n\n deltas.clear();\n int numDeltas = in.readInt();\n for(int i=0; i < numDeltas; i++) {\n AcidInputFormat.DeltaMetaData dmd = new AcidInputFormat.DeltaMetaData();\n dmd.readFields(in);\n deltas.add(dmd);\n }\n if (hasFooter) {\n int tailLen = WritableUtils.readVInt(in);\n byte[] tailBuffer = new byte[tailLen];\n in.readFully(tailBuffer);\n OrcProto.FileTail fileTail = OrcProto.FileTail.parseFrom(tailBuffer);\n orcTail = new OrcTail(fileTail, null);\n }\n if (hasLongFileId) {\n fileKey = in.readLong();\n } else if (hasWritableFileId) {\n SyntheticFileId fileId = new SyntheticFileId();\n fileId.readFields(in);\n this.fileKey = fileId;\n }\n fileLen = in.readLong();\n rootDir = new Path(in.readUTF());\n\n if (hasSyntheticProps) {\n long rowId = in.readLong();\n int bucket = in.readInt();\n long writeId = in.readLong();\n\n syntheticAcidProps = new OffsetAndBucketProperty(rowId, bucket, writeId);\n }\n }", "public Entry buildEntry(String line) {\n\t\tlog.debug(\"line : \" + line);\n\t\t\n\t\tEntry entry = new Entry();\n\t\ttry {\n\t\t\tString[] strList = line.split(\",\");\n\t\t\tint length = strList.length;\n\t\t\t//Checking for phone number values\n\t\t\tif (length == 5)\n\t\t\t{\n\t\t\t\tif(FlatFileUtil.isPhone(strList[2]))\n\t\t\t\t{\n\t\t\t\t\tlog.debug(\"LastName, FirstName, (703)-711-0996, Blue, 11013 - format\");\n\t\t\t\t\tentry.setLastname(strList[0].trim());\n\t\t\t\t\tentry.setFirstname(strList[1].trim());\n\t\t\t\t\tentry.setPhonenumber(strList[2].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t\t\tentry.setColor(strList[3].trim());\n\t\t\t\t\tentry.setZipcode(strList[4].trim());\n\t\t\t\t\t\n\t\t\t\t}else if(FlatFileUtil.isPhone(strList[3])) {\n\t\t\t\t\tlog.debug(\"FirstName, LastName, 12023, 636 121 1111, Yellow - format\");\n\t\t\t\t\tentry.setFirstname(strList[0].trim());\n\t\t\t\t\tentry.setLastname(strList[1].trim());\n\t\t\t\t\tentry.setZipcode(strList[2].trim());\n\t\t\t\t\tentry.setPhonenumber(strList[3].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t\t\tentry.setColor(strList[4].trim());\n\t\t\t\t}\n\t\t\t} else if (length == 4) { \n\t\t\t\tlog.debug(\"FirstName LastName, Purple, 14537, 713 905 0383 - format\");\n\t\t\t\tString[] nameStrList = strList[0].split(\" \");\n\t\t\t\tentry.setFirstname(nameStrList[0].trim());\n\t\t\t\tentry.setLastname(nameStrList[1].trim());\n\t\t\t\tentry.setColor(strList[1].trim());\n\t\t\t\tentry.setZipcode(strList[2].trim());\n\t\t\t\tentry.setPhonenumber(strList[3].replaceAll(\"\\\\D+\",\"\"));\n\t\t\t}\n\t\t} catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn entry;\n\t}", "protected FieldList generateFieldsMap(String delimiter,List<String> lines) throws RemoteException {\n\n\t\tlogger.debug(\"generateFieldsMap --\");\n\t\t\n\t\tFieldList fl = new OrderedFieldList();\n\t\ttry {\n\t\t\t\n\t\t\tMap<String,Set<String>> valueMap = new LinkedHashMap<String,Set<String>>();\n\t\t\tMap<String,Integer> nbValueMap = new LinkedHashMap<String,Integer>();\n\t\t\t\n\t\t\tMap<String, FieldType> schemaTypeMap = new LinkedHashMap<String, FieldType>();\n\t\t\t\n\t\t\tif (lines != null) {\n\t\t\t\tlogger.trace(\"key_delimiter: \" + Pattern.quote(delimiter));\n\t\t\t\tfor (String line : lines) {\n\t\t\t\t\tboolean full = true;\n\t\t\t\t\tif (!line.trim().isEmpty()) {\n\t\t\t\t\t\tint cont = 0;\n\t\t\t\t\t\tfor (String s : line.split(Pattern\n\t\t\t\t\t\t\t\t.quote(delimiter))) {\n\n\t\t\t\t\t\t\tString nameColumn = generateColumnName(cont++);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!valueMap.containsKey(nameColumn)){\n\t\t\t\t\t\t\t\tvalueMap.put(nameColumn, new LinkedHashSet<String>());\n\t\t\t\t\t\t\t\tnbValueMap.put(nameColumn, 0);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif(valueMap.get(nameColumn).size() < 101){\n\t\t\t\t\t\t\t\tfull = false;\n\t\t\t\t\t\t\t\tvalueMap.get(nameColumn).add(s.trim());\n\t\t\t\t\t\t\t\tnbValueMap.put(nameColumn,nbValueMap.get(nameColumn)+1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(full){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIterator<String> valueIt = valueMap.keySet().iterator();\n\t\t\t\twhile(valueIt.hasNext()){\n\t\t\t\t\tString cat = valueIt.next();\n\t\t\t\t\tfl.addField(cat,getType(valueMap.get(cat),nbValueMap.get(cat), schemaTypeMap.get(cat)));\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn fl;\n\n\t}", "public abstract T parseLine(String inputLine);", "public static ImmutableList<Coordinate> parseLines(ImmutableList<String> lines) {\r\n Pattern pattern = Pattern.compile(\"(\\\\d+), (\\\\d+)\");\r\n char name = 'a';\r\n\r\n ImmutableList.Builder<Coordinate> coordinates = ImmutableList.builder();\r\n for (String line : lines) {\r\n Matcher matcher = pattern.matcher(line);\r\n if (matcher.matches()) {\r\n coordinates.add(new Coordinate(\r\n name,\r\n Integer.parseInt(matcher.group(1)),\r\n Integer.parseInt(matcher.group(2))\r\n ));\r\n\r\n name++;\r\n if (name > 'z') {\r\n name = 'A';\r\n }\r\n }\r\n }\r\n\r\n return coordinates.build();\r\n }", "public static LogDataParser praseLogRequestLine(String line)\n\t\t\tthrows NumberFormatException, PatternSyntaxException, PatternNotMatchedException {\n\t\tPATTERN = Pattern.compile(LOG_LINE_ENTRY_PATTERN);\n\t\tMatcher matcher = PATTERN.matcher(line);\n\t\tif (!matcher.find()) {\n\t\t\tthrow new PatternNotMatchedException(\"Cannot parse \" + line);\n\t\t}\n\t\treturn new LogDataParser(matcher.group(1), matcher.group(9));\n\t}" ]
[ "0.6682122", "0.6678799", "0.66366595", "0.62753105", "0.61066747", "0.608921", "0.6088772", "0.5998516", "0.59660435", "0.58845735", "0.5819873", "0.58108157", "0.56784505", "0.5657799", "0.5547249", "0.55332667", "0.55093914", "0.54905796", "0.54852694", "0.54404753", "0.5403989", "0.53686357", "0.5329209", "0.52825475", "0.52729017", "0.52116925", "0.51947254", "0.5135815", "0.51342344", "0.5121937", "0.512104", "0.51153016", "0.5112724", "0.5101956", "0.5098016", "0.5074403", "0.5067325", "0.50632447", "0.50564045", "0.5022882", "0.50103927", "0.4996614", "0.4981185", "0.4967954", "0.49496037", "0.49389273", "0.49322027", "0.4929971", "0.49279425", "0.4924987", "0.49238586", "0.49194995", "0.4912788", "0.4910976", "0.49073073", "0.49038064", "0.49000567", "0.4891542", "0.48902845", "0.4878983", "0.48588717", "0.48278657", "0.48261288", "0.4824334", "0.4818829", "0.4817132", "0.48135436", "0.48128083", "0.4808917", "0.4808059", "0.47862852", "0.47516975", "0.47394785", "0.4737979", "0.47345564", "0.47259757", "0.47229323", "0.4722736", "0.47119293", "0.47086236", "0.47081926", "0.46991026", "0.46916556", "0.46758524", "0.46690515", "0.46616185", "0.46491534", "0.46469858", "0.46405107", "0.4638037", "0.46339098", "0.4631541", "0.46290562", "0.46262532", "0.46229246", "0.46199876", "0.46135223", "0.46130207", "0.46117437", "0.46009627" ]
0.65401644
3
There's already a schema read operation in progress. Just piggyback on that
@NotNull private CompletableFuture<StoredSchema> getSchema(String schemaId) { return readSchemaOperations.computeIfAbsent(schemaId, key -> { if (log.isDebugEnabled()) { log.debug("[{}] Fetching schema from store", schemaId); } return getSchemaLocator(getSchemaPath(schemaId)).thenCompose(locator -> { if (log.isDebugEnabled()) { log.debug("[{}] Got schema locator {}", schemaId, locator); } if (!locator.isPresent()) { return completedFuture(null); } SchemaStorageFormat.SchemaLocator schemaLocator = locator.get().locator; return readSchemaEntry(schemaLocator.getInfo().getPosition()) .thenApply(entry -> new StoredSchema(entry.getSchemaData().toByteArray(), new LongSchemaVersion(schemaLocator.getInfo().getVersion()))); }); }).whenComplete((res, ex) -> { if (log.isDebugEnabled()) { log.debug("[{}] Get operation completed. res={} -- ex={}", schemaId, res, ex); } readSchemaOperations.remove(schemaId); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void executeSchemaOperations() {\n }", "public void syncSchema(Schema schema) {\n Span span = this.tracer.buildSpan(\"Client.SyncSchema\").start();\n try {\n Schema serverSchema = readSchema();\n\n // find out local - remote schema\n Schema diffSchema = schema.diff(serverSchema);\n // create the indexes and fields which doesn't exist on the server side\n for (Map.Entry<String, Index> indexEntry : diffSchema.getIndexes().entrySet()) {\n Index index = indexEntry.getValue();\n if (!serverSchema.getIndexes().containsKey(indexEntry.getKey())) {\n ensureIndex(index);\n }\n for (Map.Entry<String, Field> fieldEntry : index.getFields().entrySet()) {\n this.ensureField(fieldEntry.getValue());\n }\n }\n\n // find out remote - local schema\n diffSchema = serverSchema.diff(schema);\n for (Map.Entry<String, Index> indexEntry : diffSchema.getIndexes().entrySet()) {\n String indexName = indexEntry.getKey();\n Index index = indexEntry.getValue();\n if (!schema.getIndexes().containsKey(indexName)) {\n schema.index(index);\n } else {\n Index localIndex = schema.getIndexes().get(indexName);\n for (Map.Entry<String, Field> fieldEntry : index.getFields().entrySet()) {\n // do not read system fields\n if (systemFields.contains(fieldEntry.getKey())) {\n continue;\n }\n localIndex.field(fieldEntry.getValue());\n }\n }\n }\n } finally {\n span.finish();\n }\n }", "protected void preUpdateSchema(CiDb db) throws OrmException, SQLException {\n }", "public void checkSchema(ResourceSchema schema) throws IOException\n {\n }", "private void recreateDatabaseSchema() {\n\t\t// Fetch database schema\n\t\tlogger.info(\"Reading database schema from file\");\n\t\tString[] schemaSql = loadFile(\"blab_schema.sql\", new String[] { \"--\", \"/*\" }, \";\");\n\n\t\tConnection connect = null;\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\t// Get the Database Connection\n\t\t\tlogger.info(\"Getting Database connection\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconnect = DriverManager.getConnection(Constants.create().getJdbcConnectionString());\n\n\t\t\tstmt = connect.createStatement();\n\n\t\t\tfor (String sql : schemaSql) {\n\t\t\t\tsql = sql.trim(); // Remove any remaining whitespace\n\t\t\t\tif (!sql.isEmpty()) {\n\t\t\t\t\tlogger.info(\"Executing: \" + sql);\n\t\t\t\t\tSystem.out.println(\"Executing: \" + sql);\n\t\t\t\t\tstmt.executeUpdate(sql);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ClassNotFoundException | SQLException ex) {\n\t\t\tlogger.error(ex);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (stmt != null) {\n\t\t\t\t\tstmt.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (connect != null) {\n\t\t\t\t\tconnect.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException ex) {\n\t\t\t\tlogger.error(ex);\n\t\t\t}\n\t\t}\n\t}", "static void schemaUpdated(Configuration conf) {\n conf.setInt(SCHEMA_UPDATE_PROP, getCurrentIteration(conf));\n }", "protected boolean afterMerge() throws DBSIOException{return true;}", "private void processAlterSchema() throws HsqlException {\n processAlterSchemaRename();\n }", "public void retryRequired(){\n startFetching(query);\n }", "public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "@Override\n public Schema getSchema () throws BlinkException\n {\n return schema;\n }", "@Override\n public void handleSchemaChange(ConnectSchema lastSchema, ConnectSchema currSchema, String\n dpSchemaName, PrimaryKey primaryKey, boolean shouldStageData) {\n System.out.println(\"New schema has fields as \" + currSchema.fields().stream().map\n (Field::name).collect(Collectors.joining(\", \")));\n\n List<Field> lastFilelds = lastSchema.fields();\n List<Field> currFilelds = currSchema.fields();\n\n }", "public void loadSchema (Reader... schemas)\n throws IOException, BlinkException\n {\n synchronized (monitor)\n {\n for (Reader rd : schemas)\n SchemaReader.read (rd, \"-\", schema);\n }\n }", "public void schemaUpdated() throws SQLException, IOException {\n ResultSet resultSet = databaseStatement.executeQuery(\"select count(datname) from pg_database\");\n int uniqueID = 0;\n if(resultSet.next()) {\n uniqueID = resultSet.getInt(1);\n }\n String newDBName = \"OSM\"+uniqueID;\n ProcessBuilder processBuilder = new ProcessBuilder(\"src/main/resources/schema/schemaUploader.sh\", newDBName, password);\n Process process = processBuilder.start();\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n String line = null; // This is here for testing purposes\n while ((line = bufferedReader.readLine()) != null ) {\n System.out.println(line);\n }\n }", "private void loadGeneratedSchema(SchemaDefinition sd) throws ResultException, DmcValueException, DmcNameClashException {\n \t\n \tfor(String schemaName : sd.dependsOnSchemaClasses.keySet()){\n \t\tString schemaClassName = sd.dependsOnSchemaClasses.get(schemaName);\n \t\t\n\t\t\tSchemaDefinition depSchema = isSchema(schemaName);\n\t\t\t\n\t\t\tif (depSchema == null){\n\t\t\t\tClass<?> schemaClass = null;\n\t\t\t\t\n try{\n \tschemaClass = Class.forName(schemaClassName);\n }\n catch(Exception e){\n \tResultException ex = new ResultException();\n \tex.result.addResult(Result.FATAL,\"Couldn't load generated schema class: \" + schemaClassName);\n ex.result.lastResult().moreMessages(e.getMessage());\n ex.result.lastResult().moreMessages(DebugInfo.extractTheStack(e));\n throw(ex);\n }\n\n try{\n \tdepSchema = (SchemaDefinition) schemaClass.newInstance();\n }\n catch(Exception e){\n \tResultException ex = new ResultException();\n \tex.result.addResult(Result.FATAL,\"Couldn't instantiate Java class: \" + schemaClassName);\n \tex.result.lastResult().moreMessages(\"This may be because the class doesn't have a constructor that takes no arguments.\");\n \tex.result.lastResult().moreMessages(\"Or it may be that the class isn't derived from SchemaDefinition.\");\n \tthrow(ex);\n }\n\n loadGeneratedSchema(depSchema);\n\t\t\t}\n\n \t}\n \t\n \tSchemaDefinition theInstance = sd.getInstance();\n \t\n manageSchemaInternal(theInstance);\n \n resolveReferences(theInstance,this);\n \n \t// Now that everything's resolved, we have some unfinished business to take care of\n \tIterator<AttributeDefinition> adl = sd.getAttributeDefList();\n \tresolveNameTypes(adl);\n }", "private void bootstrapIndexIfNeed(String partition) {\n if (OptionsResolver.isInsertOverwrite(config)) {\n // skips the index loading for insert overwrite operation.\n return;\n }\n if (bucketIndex.containsKey(partition)) {\n return;\n }\n LOG.info(String.format(\"Loading Hoodie Table %s, with path %s\", this.metaClient.getTableConfig().getTableName(),\n this.metaClient.getBasePath() + \"/\" + partition));\n\n // Load existing fileID belongs to this task\n Map<Integer, String> bucketToFileIDMap = new HashMap<>();\n this.writeClient.getHoodieTable().getHoodieView().getLatestFileSlices(partition).forEach(fileSlice -> {\n String fileId = fileSlice.getFileId();\n int bucketNumber = BucketIdentifier.bucketIdFromFileId(fileId);\n if (isBucketToLoad(bucketNumber, partition)) {\n LOG.info(String.format(\"Should load this partition bucket %s with fileId %s\", bucketNumber, fileId));\n // Validate that one bucketId has only ONE fileId\n if (bucketToFileIDMap.containsKey(bucketNumber)) {\n throw new RuntimeException(String.format(\"Duplicate fileId %s from bucket %s of partition %s found \"\n + \"during the BucketStreamWriteFunction index bootstrap.\", fileId, bucketNumber, partition));\n } else {\n LOG.info(String.format(\"Adding fileId %s to the bucket %s of partition %s.\", fileId, bucketNumber, partition));\n bucketToFileIDMap.put(bucketNumber, fileId);\n }\n }\n });\n bucketIndex.put(partition, bucketToFileIDMap);\n }", "public SchemaInfo getSchema () throws Exception;", "private void adjustAllSchemaReferences() throws Exception {\n File[] schemas = new File(new File(getRootDir(), ToolboxFoldersFileConstants.WEB_INF), ToolboxFoldersFileConstants.SCHEMAS).listFiles(new FileFilter() {\n\n public boolean accept(File file) {\n return file.getName().endsWith(\".xsd\");\n }\n });\n for (int index = 0; index < schemas.length; adjustSchemaReferences(schemas[index++]));\n }", "@Override\n protected void load() {\n //recordId can be null when in batchMode\n if (this.recordId != null && this.properties.isEmpty()) {\n this.sqlgGraph.tx().readWrite();\n if (this.sqlgGraph.getSqlDialect().supportsBatchMode() && this.sqlgGraph.tx().getBatchManager().isStreaming()) {\n throw new IllegalStateException(\"streaming is in progress, first flush or commit before querying.\");\n }\n\n //Generate the columns to prevent 'ERROR: cached plan must not change result type\" error'\n //This happens when the schema changes after the statement is prepared.\n @SuppressWarnings(\"OptionalGetWithoutIsPresent\")\n EdgeLabel edgeLabel = this.sqlgGraph.getTopology().getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format(\"Schema %s not found\", this.schema))).getEdgeLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format(\"EdgeLabel %s not found\", this.table)));\n StringBuilder sql = new StringBuilder(\"SELECT\\n\\t\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(\"ID\"));\n appendProperties(edgeLabel, sql);\n List<VertexLabel> outForeignKeys = new ArrayList<>();\n for (VertexLabel vertexLabel : edgeLabel.getOutVertexLabels()) {\n outForeignKeys.add(vertexLabel);\n sql.append(\", \");\n if (vertexLabel.hasIDPrimaryKey()) {\n String foreignKey = vertexLabel.getSchema().getName() + \".\" + vertexLabel.getName() + Topology.OUT_VERTEX_COLUMN_END;\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey));\n } else {\n int countIdentifier = 1;\n for (String identifier : vertexLabel.getIdentifiers()) {\n PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow(\n () -> new IllegalStateException(String.format(\"identifier %s column must be a property\", identifier))\n );\n PropertyType propertyType = propertyColumn.getPropertyType();\n String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType);\n int count = 1;\n for (String ignored : propertyTypeToSqlDefinition) {\n if (count > 1) {\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + propertyType.getPostFixes()[count - 2] + Topology.OUT_VERTEX_COLUMN_END));\n } else {\n //The first column existVertexLabel no postfix\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + Topology.OUT_VERTEX_COLUMN_END));\n }\n if (count++ < propertyTypeToSqlDefinition.length) {\n sql.append(\", \");\n }\n }\n if (countIdentifier++ < vertexLabel.getIdentifiers().size()) {\n sql.append(\", \");\n }\n }\n }\n }\n List<VertexLabel> inForeignKeys = new ArrayList<>();\n for (VertexLabel vertexLabel : edgeLabel.getInVertexLabels()) {\n sql.append(\", \");\n inForeignKeys.add(vertexLabel);\n if (vertexLabel.hasIDPrimaryKey()) {\n String foreignKey = vertexLabel.getSchema().getName() + \".\" + vertexLabel.getName() + Topology.IN_VERTEX_COLUMN_END;\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey));\n } else {\n int countIdentifier = 1;\n for (String identifier : vertexLabel.getIdentifiers()) {\n PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow(\n () -> new IllegalStateException(String.format(\"identifier %s column must be a property\", identifier))\n );\n PropertyType propertyType = propertyColumn.getPropertyType();\n String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType);\n int count = 1;\n for (String ignored : propertyTypeToSqlDefinition) {\n if (count > 1) {\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + propertyType.getPostFixes()[count - 2] + Topology.IN_VERTEX_COLUMN_END));\n } else {\n //The first column existVertexLabel no postfix\n sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + \".\" + identifier + Topology.IN_VERTEX_COLUMN_END));\n }\n if (count++ < propertyTypeToSqlDefinition.length) {\n sql.append(\", \");\n }\n }\n if (countIdentifier++ < vertexLabel.getIdentifiers().size()) {\n sql.append(\", \");\n }\n }\n }\n }\n sql.append(\"\\nFROM\\n\\t\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.schema));\n sql.append(\".\");\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(EDGE_PREFIX + this.table));\n sql.append(\" WHERE \");\n //noinspection Duplicates\n if (edgeLabel.hasIDPrimaryKey()) {\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(\"ID\"));\n sql.append(\" = ?\");\n } else {\n int count = 1;\n for (String identifier : edgeLabel.getIdentifiers()) {\n sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(identifier));\n sql.append(\" = ?\");\n if (count++ < edgeLabel.getIdentifiers().size()) {\n sql.append(\" AND \");\n }\n\n }\n }\n if (this.sqlgGraph.getSqlDialect().needsSemicolon()) {\n sql.append(\";\");\n }\n Connection conn = this.sqlgGraph.tx().getConnection();\n if (logger.isDebugEnabled()) {\n logger.debug(sql.toString());\n }\n try (PreparedStatement preparedStatement = conn.prepareStatement(sql.toString())) {\n if (edgeLabel.hasIDPrimaryKey()) {\n preparedStatement.setLong(1, this.recordId.sequenceId());\n } else {\n int count = 1;\n for (Comparable identifierValue : this.recordId.getIdentifiers()) {\n preparedStatement.setObject(count++, identifierValue);\n }\n }\n ResultSet resultSet = preparedStatement.executeQuery();\n if (resultSet.next()) {\n loadResultSet(resultSet, inForeignKeys, outForeignKeys);\n }\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }\n }", "@Override\r\n\tpublic boolean isReady() {\n\t\tResultSetDTO dto = mongoManager.fetchAndUpdateAvailableToRead(previousCollectionName);\r\n\t\t\r\n\t\tlogger.info(\"ready to start a new transaction? : [\"+(dto.isNotEmpty()?\"Yes\":\"No\")+\"], fetch size : \"+dto.getBatchRowsSize());\r\n\t\tif(dto.isNotEmpty()){\r\n\t\t\t\r\n\t\t\tnextBatchRows = dto.getBatchRows();\r\n\t\t\tcollectionName = dto.getCollectionName();\r\n\t\t\tpreviousCollectionName = collectionName;\r\n//\t\t\tlong idletime = 1 * 1000;\r\n//\t\t\tlogger.info(\"sleeping(has data)... idle time:\"+idletime+\" ms\");\r\n//\t\t\tUtils.sleep(idletime);\r\n\t\t\tlogger.debug(\"received data, prepare to sleep for a while...\");\r\n\t\t\tUtil.sleepForawhile(3 * 1000);\r\n\t\t\treturn true;\r\n\t\t} else{ //sleep while there is no data found\r\n\t\t\tlogger.warn(\"no data found, sleeping...\");\r\n\t\t\tUtil.sleepForawhile(6 * 1000);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n//\t\treturn mongoManager.getAvailableToRead(nextRead) > 0;\r\n\t}", "public SchemaInfo readServerSchema() {\n String path = \"/schema\";\n Span span = this.tracer.buildSpan(\"Client.Schema\").start();\n try {\n try (CloseableHttpResponse response = clientExecute(\"GET\", path, null, null, \"Error while reading schema\",\n ReturnClientResponse.ERROR_CHECKED_RESPONSE, false)) {\n HttpEntity entity = response.getEntity();\n if (entity != null) {\n try (InputStream src = entity.getContent()) {\n return SchemaInfo.fromInputStream(src);\n }\n }\n throw new PilosaException(\"Server returned empty response\");\n }\n } catch (IOException ex) {\n throw new PilosaException(\"Error while reading response\", ex);\n } finally {\n span.finish();\n }\n }", "@Override\n //TODO move out\n public void fillInitialSchemaData(DBRProgressMonitor monitor, Connection connection) throws DBException, SQLException {\n exclusiveConnection = new DelegatingConnection<Connection>(connection) {\n @Override\n public void close() throws SQLException {\n // do nothing\n }\n };\n\n try {\n // Fill initial data\n\n CBDatabaseInitialData initialData = getInitialData();\n if (initialData == null) {\n return;\n }\n\n String adminName = initialData.getAdminName();\n String adminPassword = initialData.getAdminPassword();\n List<SMTeam> initialTeams = initialData.getTeams();\n String defaultTeam = application.getAppConfiguration().getDefaultUserTeam();\n if (CommonUtils.isNotEmpty(defaultTeam)) {\n Set<String> initialTeamNames = initialTeams == null\n ? Set.of()\n : initialTeams.stream().map(SMTeam::getTeamId).collect(Collectors.toSet());\n if (!initialTeamNames.contains(defaultTeam)) {\n throw new DBException(\"Initial teams configuration doesn't contain default team \" + defaultTeam);\n }\n }\n if (!CommonUtils.isEmpty(initialTeams)) {\n // Create teams\n for (SMTeam team : initialTeams) {\n adminSecurityController.createTeam(team.getTeamId(), team.getName(), team.getDescription(), adminName);\n if (adminName != null && !application.isMultiNode()) {\n adminSecurityController.setSubjectPermissions(\n team.getTeamId(),\n new ArrayList<>(team.getPermissions()),\n adminName\n );\n }\n }\n }\n\n if (!CommonUtils.isEmpty(adminName)) {\n // Create admin user\n createAdminUser(adminName, adminPassword);\n }\n } finally {\n exclusiveConnection = null;\n }\n }", "private void initSchema() throws Exception {\n File workingDirectory = service.getInstanceLayout().getPartitionsDirectory();\n\n // Extract the schema on disk (a brand new one) and load the registries\n File schemaRepository = new File(workingDirectory, \"schema\");\n SchemaLdifExtractor extractor = new DefaultSchemaLdifExtractor(workingDirectory);\n\n try {\n extractor.extractOrCopy();\n } catch (IOException ioe) {\n // The schema has already been extracted, bypass\n }\n\n SchemaLoader loader = new LdifSchemaLoader(schemaRepository);\n SchemaManager schemaManager = new DefaultSchemaManager(loader);\n\n // We have to load the schema now, otherwise we won't be able\n // to initialize the Partitions, as we won't be able to parse\n // and normalize their suffix Dn\n schemaManager.loadAllEnabled();\n\n // Tell all the normalizer comparators that they should not normalize anything\n ComparatorRegistry comparatorRegistry = schemaManager.getComparatorRegistry();\n\n for (LdapComparator<?> comparator : comparatorRegistry) {\n if (comparator instanceof NormalizingComparator) {\n ((NormalizingComparator) comparator).setOnServer();\n }\n }\n\n service.setSchemaManager(schemaManager);\n\n // Init the LdifPartition\n LdifPartition ldifPartition = new LdifPartition(schemaManager, service.getDnFactory());\n ldifPartition.setPartitionPath(new File(workingDirectory, \"schema\").toURI());\n SchemaPartition schemaPartition = new SchemaPartition(schemaManager);\n schemaPartition.setWrappedPartition(ldifPartition);\n service.setSchemaPartition(schemaPartition);\n\n List<Throwable> errors = schemaManager.getErrors();\n\n if (errors.size() != 0) {\n throw new Exception(I18n.err(I18n.ERR_317, Exceptions.printErrors(errors)));\n }\n }", "public void checkReadLock() {\r\n return;\r\n }", "@Override\n\tpublic void consumeFields(Schema schema) {\n\n\t}", "protected void doBeginRead() throws Exception {}", "@Override\n protected boolean continueOnWriteError() {\n return true;\n }", "public boolean updateInformationSchemaTable(){\n\t\tSchema currentSchema = Schema.getSchemaInstance();\n\t\tString currentSchemaName = currentSchema.getCurrentSchema();\n\t\tboolean isFound = false;\n\t\ttry {\n\t\t\tRandomAccessFile tablesTableFile = new RandomAccessFile(\"information_schema.table.tbl\", \"rw\");\n\n\t\t\t//Searching to see if the information schema is present or not\n\t\t\twhile(tablesTableFile.getFilePointer() < tablesTableFile.length()){\n\t\t\t\tString readSchemaName = \"\";\n\t\t\t\tbyte varcharLength = tablesTableFile.readByte();\n\t\t\t\tfor(int j = 0; j < varcharLength; j++)\n\t\t\t\t\treadSchemaName += (char)tablesTableFile.readByte();\n\n\t\t\t\tif(readSchemaName.equals(currentSchemaName)){\n\t\t\t\t\tString readTableName = \"\";\n\t\t\t\t\tbyte varcharTableLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < varcharTableLength; j++)\n\t\t\t\t\t\treadTableName += (char)tablesTableFile.readByte();\n\n\t\t\t\t\tif(readTableName.equals(tableName)){\n\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\tSystem.out.println(\"Table '\" + tableName + \"' already exits...\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t} else {\n\t\t\t\t\tbyte traverseLength = tablesTableFile.readByte();\n\t\t\t\t\tfor(int j = 0; j < traverseLength; j++)\n\t\t\t\t\t\ttablesTableFile.readByte();\n\t\t\t\t\ttablesTableFile.readLong();\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t\tif(!isFound){\n\t\t\t\t//Traversing to the end of file\n\t\t\t\ttablesTableFile.seek(tablesTableFile.length());\n\t\t\t\ttablesTableFile.writeByte(currentSchemaName.length()); // TABLE_SCHEMA\n\t\t\t\ttablesTableFile.writeBytes(currentSchemaName);\n\t\t\t\ttablesTableFile.writeByte(tableName.length()); // TABLE_NAME\n\t\t\t\ttablesTableFile.writeBytes(tableName);\n\t\t\t\ttablesTableFile.writeLong(0); // TABLE_ROWS\n\t\t\t}\n\n\t\t\ttablesTableFile.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\treturn isFound;\n\t}", "private void loadRules() throws DataNormalizationException {\n\t\tloadRules(TableVersion.COMMITTED);\n\t}", "@Test\n\tpublic void testSchemaIsComplete() {\n\t\tOrientGraph g = factory.getTx();\n\t\tOrientVertexType t = g.getVertexType(\"ElementTrace\");\n\t\tassertThat(t, is(notNullValue()));\n\t\t\n\t\tOrientEdgeType et = g.getEdgeType(\"Accesses\");\n\t}", "@Override\n public long readBatchData() throws SQLException {\n return (-1);\n }", "private void initializeSchemaNode(final SchemaNode schemaNode,\n\t\t\tfinal Element schemataElement) {\n\t\t// schemaNode may not be initialized\n\t\tif (schemaNode.getTableNodeList() == null) {\n\t\t\tinitializationProgress++;\n\t\t\tTableGroupNode tableGroupNode = schemaNode.getTableGroupNode();\n\t\t\ttableGroupNode\n\t\t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\n\t\t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\t\t\tString property = evt.getPropertyName();\n\t\t\t\t\t\t\tif (property\n\t\t\t\t\t\t\t\t\t.equals(AbstractNode.NODE_CHILDREN_MODIFIED)\n\t\t\t\t\t\t\t\t\t&& !(evt.getNewValue() instanceof WaitingNode)) {\n\t\t\t\t\t\t\t\tfor (AbstractNode node : schemaNode\n\t\t\t\t\t\t\t\t\t\t.getTableNodeList()) {\n\t\t\t\t\t\t\t\t\tinitializeTableNodes((TableNode) node,\n\t\t\t\t\t\t\t\t\t\t\tschemataElement);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tinitializationProgress--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\tschemaNode.getTableNodeList(true);\n\t\t} else {\n\t\t\tfor (AbstractNode node : schemaNode.getTableNodeList()) {\n\t\t\t\tinitializeTableNodes((TableNode) node, schemataElement);\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void cursorDirtyRead() throws IOException {\n\t\tfinal ArangoCursor<VPackSlice> cursor = arango.db().query(\"FOR i IN 1..4 RETURN i\",\n\t\t\tnew AqlQueryOptions().batchSize(1).allowDirtyRead(true), VPackSlice.class);\n\t\t// get the initial result\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// get the second batch\n\t\tassertThat(cursor.hasNext(), is(true));\n\t\tassertThat(cursor.next().isInteger(), is(true));\n\t\t// close the cursor before fetching the all batches\n\t\tcursor.close();\n\t}", "@Override\n public LogbookEntry loadInBackground() {\n this.database = this.databaseSchemaHelper.getReadableDatabase();\n return SchemaQueries.getLogbook(this.database);\n }", "private void checkForUpdates() {\n File dbFile = new File(peopleDBPath + \"people.protostuff\");\n try {\n BasicFileAttributes readAttributes = Files.readAttributes(dbFile.toPath(), BasicFileAttributes.class);\n if (lastModifiedDate.getTime() < readAttributes.lastModifiedTime().toMillis()) {\n // db = MAPPER.readValue(dbFile, PeopleDB.class);\n db = daoProtostuff.load(dbFile.getAbsolutePath(), PeopleDB.class);\n System.out.println(\"DB loaded\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }", "@Override\n protected SourceXmlSchemaHelper setUpSchema() {\n return null; // cause a plugin exception to get thrown\n }", "@Override\n protected SourceXmlSchemaHelper setUpSchema() {\n return null; // cause a plugin exception to get thrown\n }", "@Override\n public int getCurrentRecordsProcessed() {\n return 0;\n }", "@Override\n\t\tpublic void rewind() throws DbException, TransactionAbortedException {\n\t\t\tclose();\n\t\t\topen();\n\t\t}", "@Override\n public void run() {\n while (true) {\n // (1)\n Select deploymentRecordQuery =\n QueryBuilder.select()\n .all()\n .from(Constants.PATHSTORE_APPLICATIONS, Constants.NODE_SCHEMAS);\n\n deploymentRecordQuery.where(\n QueryBuilder.eq(Constants.NODE_SCHEMAS_COLUMNS.NODE_ID, this.nodeId));\n\n for (Row row : this.session.execute(deploymentRecordQuery)) {\n NodeSchemaEntry entry = NodeSchemaEntry.fromRow(row);\n\n if (entry.nodeSchemaProcessStatus != NodeSchemaProcessStatus.INSTALLING\n && entry.nodeSchemaProcessStatus != NodeSchemaProcessStatus.REMOVING) continue;\n\n // (2)\n this.transitionRow(entry.nodeSchemaProcessStatus, entry.keyspaceName);\n\n // (3)\n this.spawnSubProcess(entry.nodeSchemaProcessStatus, entry.keyspaceName);\n }\n\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n logger.error(e);\n }\n }\n }", "public void schemaBeingLoaded(SchemaDefinition sd) throws ResultException {\n \tfor(SchemaExtensionIF currext : extensions.values()){\n \t\tcurrext.schemaBeingLoaded(sd);\n \t}\n }", "@Override\n public boolean canReadSchema() throws UnauthorizedException\n {\n return null != _participant || super.canReadSchema();\n }", "@Override\n public int getCurrentSchemaVersion(DBRProgressMonitor monitor, Connection connection, String schemaName) throws DBException, SQLException {\n try {\n int version = CommonUtils.toInt(JDBCUtils.executeQuery(connection,\n normalizeTableNames(\"SELECT VERSION FROM {table_prefix}CB_SCHEMA_INFO\")));\n return version == 0 ? 1 : version;\n } catch (SQLException e) {\n try {\n Object legacyVersion = CommonUtils.toInt(JDBCUtils.executeQuery(connection,\n normalizeTableNames(\"SELECT SCHEMA_VERSION FROM {table_prefix}CB_SERVER\")));\n // Table CB_SERVER exist - this is a legacy schema\n return LEGACY_SCHEMA_VERSION;\n } catch (SQLException ex) {\n // Empty schema. Create it from scratch\n return -1;\n }\n }\n }", "public void loadSchema (String... schemas)\n throws IOException, BlinkException\n {\n synchronized (monitor)\n {\n for (String f : schemas)\n SchemaReader.read (f, schema);\n }\n }", "private boolean shouldExecuteDbFirst() throws ServiceException {\n DbSearchConstraints.Leaf top = getTopLeafConstraint();\n if (top.convId > 0 || !top.itemIds.isEmpty()) {\n return true;\n }\n\n if (luceneOp != null && luceneOp.shouldExecuteDbFirst()) {\n return true;\n }\n\n return constraints.tryDbFirst(context.getMailbox());\n }", "protected boolean isSaveSchema() {\n\t\treturn false;\n\t}", "public void beforeFirst() throws SQLException {\n\n try {\n debugCodeCall(\"beforeFirst\");\n checkClosed();\n if (result.getRowId() >= 0) {\n resetResult();\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "@Test\n public void createUserWithConflictingSchema() throws Exception {\n\n\n\n // clean and remove the schema\n try{\n methodWatcher.prepareStatement(\"DROP SCHEMA \" + EXISTING_USER_NAME_3.toUpperCase() + \" RESTRICT\").execute();\n }catch(Exception e){\n\n }\n\n String createSchemaQuery = String.format(\"CREATE SCHEMA %s\",EXISTING_USER_NAME_3);\n methodWatcher.prepareStatement(createSchemaQuery).execute();\n\n // 1. Make sure the schema have been created\n String sysUserSchemaQuery = String.format(\"select count(*) as result from SYS.SYSSCHEMAS where SCHEMANAME='%s'\",EXISTING_USER_NAME_3.toUpperCase());\n try (ResultSet resultSet = methodWatcher.executeQuery(sysUserSchemaQuery)) {\n String result = TestUtils.FormattedResult.ResultFactory.toStringUnsorted(resultSet);\n assertThat(EXISTING_USER_NAME_3 + \" must be present in result set!\", result,\n is(\n \"RESULT |\\n\" +\n \"--------\\n\" +\n \" 1 |\"\n ));\n }\n\n //2 .create the user\n methodWatcher.prepareStatement(\"CALL SYSCS_UTIL.SYSCS_CREATE_USER('\" + EXISTING_USER_NAME_3 + \"', 'bar')\").execute();\n\n // 3 .Make sure the user exist\n String userQuery = String.format(\"select count(*) as result from (select USERNAME from SYS.SYSUSERS where USERNAME ='%s') AS T\",EXISTING_USER_NAME_3);\n try (ResultSet resultSet = methodWatcher.executeQuery(userQuery)) {\n String result = TestUtils.FormattedResult.ResultFactory.toStringUnsorted(resultSet);\n assertThat(EXISTING_USER_NAME_3 + \" must be present in result set!\", result,\n is(\n \"RESULT |\\n\" +\n \"--------\\n\" +\n \" 1 |\"\n ));\n }\n\n // 4. Make sure we have only one schema at that name\n try (ResultSet resultSet = methodWatcher.executeQuery(sysUserSchemaQuery)) {\n String result = TestUtils.FormattedResult.ResultFactory.toStringUnsorted(resultSet);\n assertThat(EXISTING_USER_NAME_3 + \" must be present in result set!\", result,\n is(\n \"RESULT |\\n\" +\n \"--------\\n\" +\n \" 1 |\"\n ));\n }\n\n }", "private boolean reloadDatabase() {\n\t\t\ttry {\n\t\t\t\tthis.db = xmlp.readFromXMLFile();\n\t\t\t\treturn true;\n\t\t\t} catch (SAXException | IOException | ParserConfigurationException e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "@Override\n public void handleSnapshotDone(String dpSchemaName, PrimaryKey primaryKey) {\n }", "static void refreshSchema(Connection connection, String keyspace, String table, Cluster.Manager cluster) throws ConnectionException, BusyConnectionException, ExecutionException, InterruptedException {\n String whereClause = \"\";\n if (keyspace != null) {\n whereClause = \" WHERE keyspace_name = '\" + keyspace + \"'\";\n if (table != null)\n whereClause += \" AND columnfamily_name = '\" + table + \"'\";\n }\n\n ResultSetFuture ksFuture = table == null\n ? new ResultSetFuture(null, new QueryMessage(SELECT_KEYSPACES + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL))\n : null;\n ResultSetFuture cfFuture = new ResultSetFuture(null, new QueryMessage(SELECT_COLUMN_FAMILIES + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL));\n ResultSetFuture colsFuture = new ResultSetFuture(null, new QueryMessage(SELECT_COLUMNS + whereClause, ConsistencyLevel.DEFAULT_CASSANDRA_CL));\n\n if (ksFuture != null)\n connection.write(ksFuture.callback);\n connection.write(cfFuture.callback);\n connection.write(colsFuture.callback);\n\n cluster.metadata.rebuildSchema(keyspace, table, ksFuture == null ? null : ksFuture.get(), cfFuture.get(), colsFuture.get());\n }", "@Test\n public void verifyUserSchemaCreated() throws Exception {\n String sysUserSchemaQuery = String.format(\"select count(*) as result from SYS.SYSSCHEMAS where SCHEMANAME='%s'\",EXISTING_USER_NAME);\n try (ResultSet resultSet = methodWatcher.executeQuery(sysUserSchemaQuery)) {\n String result = TestUtils.FormattedResult.ResultFactory.toStringUnsorted(resultSet);\n assertThat(EXISTING_USER_NAME_2 + \" must present in result set!\", result,\n is(\n \"RESULT |\\n\" +\n \"--------\\n\" +\n \" 1 |\"\n ));\n }\n\n }", "@java.lang.Override\n public boolean hasAvro() {\n return schemaCase_ == 1;\n }", "public abstract void lockTableForReading(String table) throws RollbackException;", "@Test\n public void doImport_skipsImportIfFileNotUpdated() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n assertThat(dbFile.exists(), is(true));\n SQLiteDatabase db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READWRITE);\n Cursor cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(cursor.getCount(), is(3));\n\n // Purge the contents of the data table before reimporting\n db.delete(EXTERNAL_DATA_TABLE_NAME, null, null);\n assertThat(SQLiteUtils.doesTableExist(db, EXTERNAL_DATA_TABLE_NAME), is(true));\n cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(\"expected zero rows of data after purging\", cursor.getCount(), is(0));\n db.close();\n\n // Reimport\n externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n db = SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), null, SQLiteDatabase.OPEN_READWRITE);\n cursor = db.rawQuery(SELECT_ALL_DATA_QUERY, null);\n assertThat(\"expected zero rows of data after reimporting unchanged file\", cursor.getCount(), is(0));\n }", "public Boolean shouldRead() {\n return this.isComplete();\n }", "boolean hasForRead();", "@Test\n public void testUnionOnSchemaNoSchema() throws Exception {\n String expectedErr = \"UNION ONSCHEMA cannot be used with \" +\n \"relations that have null schema\";\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, expectedErr);\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, expectedErr);\n\n }", "@Override\n\tprotected void doOpen() throws Exception {\n\n\t\tAssert.state(!initialized, \"Stream is already initialized. Close before re-opening.\");\n\t\tAssert.isNull(rs, \"ResultSet still open! Close before re-opening.\");\n\n\t\tinitializeConnection();\n\t\topenCursor(con);\n\t\tinitialized = true;\n\n\t}", "protected void checkScrollability() throws HibernateException {\n \t\t// Allows various loaders (ok mainly the QueryLoader :) to check\n \t\t// whether scrolling of their result set should be allowed.\n \t\t//\n \t\t// By default it is allowed.\n \t\treturn;\n \t}", "private void readStyles() {\n table.clearSelection();\n\n styles.getReadWriteLock().writeLock().lock();\n styles.clear();\n if (styleDir.getText().length() > 0) {\n addStyles(styleDir.getText(), true);\n }\n styles.getReadWriteLock().writeLock().unlock();\n\n selectLastUsed();\n }", "private static void performInitialSync() throws IOException,ConfigurationException {\n\n LOGGER.info(\"Starting to perform initial sync\");\n //tapDump is basically that -- a dump of all data currently in CB.\n TapStream tapStream = tapClient.tapDump(tapName);\n SolrBatchImportEventHandler couchbaseToSolrEventHandler = new SolrBatchImportEventHandler();\n startupBatchDisruptor(couchbaseToSolrEventHandler);\n RingBuffer<CouchbaseEvent> ringBuffer = disruptor.getRingBuffer();\n\n CouchbaseEventProducer producer = new CouchbaseEventProducer(ringBuffer);\n //While there is data keep reading and producing\n while (!tapStream.isCompleted()) {\n while (tapClient.hasMoreMessages()) {\n ResponseMessage responseMessage;\n responseMessage = tapClient.getNextMessage();\n if (null != responseMessage) {\n String key = responseMessage.getKey();\n String value = new String(responseMessage.getValue());\n producer.onData(new String[] {key, value}, responseMessage.getOpcode());\n\n }\n }\n }\n LOGGER.info(\"Finished initial sync\");\n shutdownBatchDisruptor();\n //Since this event handler is batch based, we need to let it know we are done and it could flush the remaining data.\n couchbaseToSolrEventHandler.flush();\n\n }", "@java.lang.Override\n public boolean hasAvro() {\n return schemaCase_ == 1;\n }", "int getUnusedSchemaId();", "protected void doProcess() throws Exception {\n boolean continueProcessing = true;\n while (continueProcessing) {\n continueProcessing = processFollowUpsRecords();\n }\n commitRecords();\n }", "@Override\n protected List<WriteStatus> computeNext() {\n BoundedInMemoryExecutor<HoodieRecord<T>, HoodieInsertValueGenResult<HoodieRecord>, List<WriteStatus>> bufferedIteratorExecutor =\n null;\n try {\n final Schema schema = new Schema.Parser().parse(hoodieConfig.getSchema());\n bufferedIteratorExecutor =\n new SparkBoundedInMemoryExecutor<>(hoodieConfig, inputItr, getInsertHandler(), getTransformFunction(schema));\n final List<WriteStatus> result = bufferedIteratorExecutor.execute();\n assert result != null && !result.isEmpty() && !bufferedIteratorExecutor.isRemaining();\n return result;\n } catch (Exception e) {\n throw new HoodieException(e);\n } finally {\n if (null != bufferedIteratorExecutor) {\n bufferedIteratorExecutor.shutdownNow();\n }\n }\n }", "@Override\n\tpublic void recovery() {\n\t\tRecordTable recordTable = new RecordTable(); \n\t\tjava.util.List<FileRecordInfoModel> lst = null;\n\t\ttry {\n\t\t\tlst = recordTable.findAllRows();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(FileRecordInfoModel model : lst)\n\t\t\t_recordSingle.addParam(model,false);\n\t\t\t// 读取配置,看是否需要扫描文件。--以后加\n\t}", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "public void manageSchema(SchemaDefinition sd) throws ResultException, DmcValueException, DmcNameClashException {\n \t\n \tif (sd.generatedSchema)\n \t\tperformIDChecks = false;\n \telse\n \t\tperformIDChecks = true;\n \t\n \tif (sd.isGeneratedSchema()){\n \t\t// This method will automatically instantiate/load any schemas on which the\n \t\t// specified schema depends.\n \t\tloadGeneratedSchema(sd);\n \t}\n \telse{\n \t\tmanageSchemaInternal(sd);\n \t}\n \t\n }", "protected boolean continueOnWriteError() {\n/* 348 */ return true;\n/* */ }", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "@Override\n\tpublic void buildSchema() {\n\t\tchild.buildSchema();\n\t\tschema = child.schema;\n\t}", "@java.lang.Override\n public boolean hasThrift() {\n return schemaCase_ == 2;\n }", "public void beforeFirst() throws SQLException {\n/* 251 */ notSupported();\n/* */ }", "public Schema readSchema() {\n Schema result = Schema.defaultSchema();\n SchemaInfo schema = readServerSchema();\n for (IndexInfo indexInfo : schema.getIndexes()) {\n Index index =\n result.index(indexInfo.getName(), indexInfo.getIndexOptions(), indexInfo.getShardWidth());\n List<FieldInfo> fields = indexInfo.getFields();\n if (fields != null) {\n for (IFieldInfo fieldInfo : indexInfo.getFields()) {\n // do not read system fields\n if (systemFields.contains(fieldInfo.getName())) {\n continue;\n }\n index.field(fieldInfo.getName(), fieldInfo.getOptions());\n }\n }\n }\n return result;\n }", "@java.lang.Override\n public boolean hasParquet() {\n return schemaCase_ == 4;\n }", "public void startMigrating();", "private void main_flow() throws SQLException {\n start_operation_complete_monitoring(this);\r\n BuffDBWriterTrell.total_nr_recorded_entries = 0;\r\n //======================\r\n NEW_RECORDS_FOUND = false;\r\n String last_export_date = get_last_export_date(SqlQ.get_latest_export_date());\r\n last_export_date = HelpM.get_date_time_minus_some_time_in_ms(last_export_date, \"yyyy-MM-dd HH:mm:ss\", 600000);// 10 min\r\n //======================\r\n export_procedure_1(last_export_date);\r\n //======================\r\n\r\n if (NEW_RECORDS_FOUND) {\r\n wait_();\r\n String msg = \" (nr rec.= \" + (BufferedDBWriterSuper.total_nr_recorded_entries - 1) + \" )\";\r\n SimpleLoggerLight.logg(\"main_flow.log\", msg);\r\n// write_to_update_table(\"main_flow\", \"\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n } else {\r\n SimpleLoggerLight.logg_no_append(\"last_check.log\", \"-> LAST CHECK\");\r\n// write_to_update_table(\r\n// \"main_flow\", \"last_check\", DBT_trell.INTERFACE_TRIGER_TABLE_NAME,\r\n// \"mc\",\r\n// \"trell\",\r\n// bWriterTrell);\r\n }\r\n }", "public void setSchema(Schema schema)\n {\n this.schema = schema;\n }", "public void check() {\r\n logger.info(\"ADIT monitor - Checking database and application.\");\r\n\r\n checkApplication();\r\n\r\n checkDBConnection();\r\n checkDBRead(this.getMonitorConfiguration().getTestDocumentId());\r\n }", "public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}", "public void collFullScan(String databse, String collectionName) {\r\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n Date date = new Date();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" InitTime:\",\r\n dateFormat.format(date));\r\n DBCollection geoTags = getCollection(databse, collectionName);\r\n DBCursor cursor = geoTags.find();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" Size:\",\r\n String.valueOf(cursor.count()));\r\n while(cursor.hasNext())\r\n cursor.next();\r\n Date date2 = new Date();\r\n logger.logp(Level.FINE, TAG, \"collFullScan \" + databse + collectionName + \" EndTime:\",\r\n dateFormat.format(date2));\r\n }", "public Schema getSchema()\n {\n return schema;\n }", "private void m44337f() throws BaseException {\n Throwable th = this.f30622n;\n if (th != null) {\n if (th instanceof StreamClosedException) {\n throw new BaseException(1068, \"async reader closed!\");\n }\n DownloadUtils.m44505a(th, \"async_read\");\n }\n throw new BaseException(1069, \"async reader terminated!\");\n }", "private DatabaseWriteResult(UploadStrategy strategy) {\n savedEntries = new ArrayList<>(1000);\n databaseSize = -1L;\n error = null;\n uploadStrategy = strategy;\n }", "public static Schema loadSchema(Configuration conf) {\n SchemaWritable schema = new SchemaWritable();\n try {\n FileSystem fs = FileSystem.get(conf);\n Path schemaPath = getSchemaPath(conf);\n if (fs.isDirectory(schemaPath)) {\n for (FileStatus status : fs.listStatus(schemaPath)) {\n schemaPath = status.getPath();\n if (status.isFile() && status.getLen() > 0\n && !schemaPath.getName().startsWith(DEBUG_OUT)) {\n break;\n }\n }\n }\n SequenceFile.Reader in = new SequenceFile.Reader(conf,\n SequenceFile.Reader.file(schemaPath));\n NullWritable key = NullWritable.get();\n in.next(key, schema);\n in.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return schema;\n }", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshReadLock(lockKey, readToken, lockTimeoutSec);\r\n\t\t\t}", "protected void rebuildSchemas() throws VisitorException, FrontendException {\n SchemaRemover sr = new SchemaRemover(mPlan);\n sr.visit();\n SchemaCalculator sc = new SchemaCalculator(mPlan);\n sc.visit();\n \n }", "@Test\r\n public void testIsSchemaAutoPropagate() throws Exception {\r\n TDataPrepDBInputDefinition fixture = new TDataPrepDBInputDefinition();\r\n\r\n boolean result = fixture.isSchemaAutoPropagate();\r\n\r\n assertEquals(true, result);\r\n }", "private void processCreateSchema() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n boolean isquoted = tokenizer.wasQuotedIdentifier();\n\n if (session.isSchemaDefintion()) {\n throw Trace.error(Trace.INVALID_IDENTIFIER);\n }\n\n tokenizer.getThis(Token.T_AUTHORIZATION);\n tokenizer.getThis(GranteeManager.DBA_ADMIN_ROLE_NAME);\n\n if (database.schemaManager.schemaExists(name)) {\n if (!session.isProcessingScript) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n } else {\n database.schemaManager.createSchema(name, isquoted);\n }\n\n HsqlName schemaName = database.schemaManager.getSchemaHsqlName(name);\n\n database.logger.writeToLog(session,\n DatabaseScript.getSchemaCreateDDL(database,\n schemaName));\n database.logger.writeToLog(session,\n \"SET SCHEMA \" + schemaName.statementName);\n session.startSchemaDefinition(name);\n\n session.loggedSchema = session.currentSchema;\n }", "private void checkDatabaseStructure(DatabaseUpdateType update) {\n }", "final void checkEnsure() {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif (this.conn == null || this.conn.isClosed()) {\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (--this.loops < 0 || this.date < System.currentTimeMillis()) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this.databaseType == ConnectionHolder.DT_UNKNOWN) {\r\n\t\t\t\tthis.databaseType = this.conn.getMetaData().getDatabaseProductName().toUpperCase().indexOf(\"ORACLE\") == -1\r\n\t\t\t\t\t? ConnectionHolder.DT_NORMAL\r\n\t\t\t\t\t: ConnectionHolder.DT_ORACLE;\r\n\t\t\t}\r\n\t\t\ttry (final Statement st = this.conn.createStatement()) {\r\n\t\t\t\t/** Do not use it here, may be unsupported? */\r\n\t\t\t\ttry {\r\n\t\t\t\t\tst.setQueryTimeout(10);\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t\tst.execute(\r\n\t\t\t\t\t\tthis.databaseType == ConnectionHolder.DT_ORACLE\r\n\t\t\t\t\t\t\t? \"SELECT 5 FROM DUAL\"\r\n\t\t\t\t\t\t\t: \"SELECT 5\");\r\n\t\t\t}\r\n\t\t} catch (final SQLException e) {\r\n\t\t\tif (this.conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tthis.conn.close();\r\n\t\t\t\t} catch (final Throwable t) {\r\n\t\t\t\t\t// ignore\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.conn = this.ci.createConnection();\r\n\t\t\tthis.databaseType = ConnectionHolder.DT_UNKNOWN;\r\n\t\t\tthis.loops = this.ci.connectionMaxLoops();\r\n\t\t\tthis.date = System.currentTimeMillis() + this.ci.connectionTimeToLive();\r\n\t\t}\r\n\t}", "private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }", "@Override\n public void retrieveStats() throws Exception {\n if (!this.useStats) {\n throw new IllegalStateException(\"Accessor is not using statistics in current context.\");\n }\n /*\n * We are using file-level stats therefore if file has multiple splits,\n * it's enough to return count for a first split in file.\n * In case file has multiple splits - we don't want to duplicate counts.\n */\n if (context.getFragmentIndex() == 0) {\n this.count = this.orcReader.getNumberOfRows();\n rowToEmitCount = readNextObject();\n }\n statsInitialized = true;\n }", "public void postProcess() {\n if (foreignColumnName != null) {\n foreignAutoRefresh = true;\n }\n if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {\n maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;\n }\n }", "@PostConstruct\n public void loadSchema() throws IOException {\n\n loadDataIntoHSQL();\n\n //get the schema\n File schemaFile = resource.getFile();\n\n //parse the schema\n //Register the schema file\n TypeDefinitionRegistry typeDefinitionRegistry = new SchemaParser().parse(schemaFile);\n\n //build the wiring to connect\n RuntimeWiring wiring = buildRuntimeWiring();\n\n //Generate the schema using registered file and wiring which is nothing but reference.\n GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(typeDefinitionRegistry, wiring);\n\n //build the graphQL\n graphQL = GraphQL.newGraphQL(schema).build();\n\n List<Vehicle> list = vehicleService.findAll();\n\n for (Vehicle vehicle : list) {\n System.out.println(vehicle.getMake().toString());\n }\n\n }", "@java.lang.Override\n public boolean hasThrift() {\n return schemaCase_ == 2;\n }", "public Schema getSchema() {\n return schema;\n }" ]
[ "0.6267159", "0.59384125", "0.5805213", "0.57284653", "0.5561381", "0.55256754", "0.5480223", "0.5456387", "0.5421914", "0.5392182", "0.5362756", "0.53323936", "0.5317525", "0.5254101", "0.5243998", "0.5202857", "0.5191543", "0.51888055", "0.517443", "0.5165305", "0.51363057", "0.5129019", "0.512425", "0.51152897", "0.5086093", "0.50738126", "0.50701195", "0.5056986", "0.5035213", "0.5001231", "0.49970177", "0.49921474", "0.4991626", "0.499076", "0.4988202", "0.4984724", "0.49793947", "0.49783862", "0.49783862", "0.49642608", "0.49123266", "0.49112284", "0.48950237", "0.48907152", "0.48836476", "0.48638687", "0.48634532", "0.4854505", "0.4851011", "0.4829012", "0.4821828", "0.4819969", "0.4819899", "0.4813887", "0.48127672", "0.48099086", "0.4809891", "0.48029128", "0.47859633", "0.47750273", "0.47709638", "0.47698593", "0.47597846", "0.47567275", "0.4743838", "0.47269508", "0.4725013", "0.47227374", "0.47221625", "0.47121367", "0.47098878", "0.4708929", "0.4700603", "0.46924937", "0.4691346", "0.468882", "0.4681406", "0.46785882", "0.46741807", "0.46731693", "0.46717656", "0.4668303", "0.46651167", "0.466338", "0.4657641", "0.46526885", "0.465051", "0.46495903", "0.464654", "0.4641645", "0.46378815", "0.46221575", "0.46192715", "0.46128035", "0.4610378", "0.46070498", "0.45949548", "0.4594099", "0.4591836", "0.45913053" ]
0.5121089
23
The schema storage converts the schema from bytes to long so it handles both cases 1) version is 64 bytes long pre 2.4.0; 2) version is 8 bytes long post 2.4.0 NOTE: if you are planning to change the logic here. you should consider both 64 bytes and 8 bytes cases.
@Override public SchemaVersion versionFromBytes(byte[] version) { ByteBuffer bb = ByteBuffer.wrap(version); return new LongSchemaVersion(bb.getLong()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BigDecimal getLqncoreSchemaVersion();", "BigDecimal getLqnSchemaVersion();", "public boolean isLong() {\n return field.getJavaType() == FieldDescriptor.JavaType.LONG && !isInt52();\n }", "String getSchemaVersion();", "@Test\n public void testUnionOnSchemaIncompatibleTypes() throws Exception {\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n //without \"onschema\"\n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union l1, l2;\"\n ;\n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n\n // bag column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : int, c2 : chararray)} );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : long, c2 : chararray)} );\"\n + \"u = union onschema l1, l2;\"\n ; \n Schema sch = new Schema();\n sch.add(new FieldSchema(\"x\", DataType.LONG));\n Schema bagInnerSchema = new Schema();\n bagInnerSchema.add(new FieldSchema(null, new Schema(), DataType.TUPLE));\n sch.add(new FieldSchema(\"b\", bagInnerSchema, DataType.BAG));\n checkSchemaEquals(query, sch);\n \n // tuple column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : int, c2 : chararray) );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : long, c2 : chararray) );\"\n + \"u = union onschema l1, l2;\"\n ; \n sch = new Schema();\n sch.add(new FieldSchema(\"t\", new Schema(), DataType.TUPLE));\n checkSchemaEquals(query, sch);\n }", "long decodeLong();", "public void testValueOfLong()\n {\n // let's test that creating a EthernetAddress from an zero long\n // gives a null EthernetAddress (definition of a null EthernetAddress)\n EthernetAddress ethernet_address =\n EthernetAddress.valueOf(0x0000000000000000L);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good long\n ethernet_address =\n EthernetAddress.valueOf(VALID_ETHERNET_ADDRESS_LONG);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }", "@Ignore\n @Test(expected = IllegalArgumentException.class)\n public void require_that_illegal_long_throws_exception() throws IOException {\n Slime slime = new Slime();\n Cursor root = slime.setObject();\n root.setString(\"longval\", \"invalid\");\n InnerCNode def = new DefParser(\"simpletypes\", new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, \"\\n\"))).getTree();\n new ConfigFileFormat(def).encode(new ByteArrayOutputStream(), slime);\n }", "Long payloadLength();", "@Override\n protected long getMaxBytes(final PropertyContext context) {\n return Long.MAX_VALUE;\n }", "@java.lang.Override\n public long getLongValue() {\n if (typeCase_ == 3) {\n return (java.lang.Long) type_;\n }\n return 0L;\n }", "public long getLongValue() {\n if (typeCase_ == 3) {\n return (java.lang.Long) type_;\n }\n return 0L;\n }", "public final Long mo28864a(Object obj) {\n if (obj instanceof Long) {\n return (Long) obj;\n }\n if (obj instanceof String) {\n try {\n return Long.valueOf(Long.parseLong((String) obj));\n } catch (NumberFormatException unused) {\n }\n }\n String b = super.mo28865b();\n String valueOf = String.valueOf(obj);\n StringBuilder sb = new StringBuilder(String.valueOf(b).length() + 25 + String.valueOf(valueOf).length());\n sb.append(\"Invalid long value for \");\n sb.append(b);\n sb.append(\": \");\n sb.append(valueOf);\n Log.e(\"PhenotypeFlag\", sb.toString());\n return null;\n }", "private final long get_BIGINT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos())\n return dataBuffer_.getLong(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getLongLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getLong(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "long readLong();", "@Test\n public void test_column_type_detection_integer_05() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDunsignedLong), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertFalse(info.isSigned());\n }", "@Test\n public void test_column_type_detection_integer_03() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDlong), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "public int getSchemaVersion() {\n return SCHEMA_VERSION;\n }", "protected final long getLong(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getLong(tableData, cursor+offset);\n }", "@Override\n public long getLength() throws ValueFormatException, RepositoryException {\n return 0;\n }", "public abstract long getLength() throws VlException;", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n DBDataType dBDataType0 = DBDataType.getInstance(\"CLOB\");\n Integer integer0 = RawTransaction.LOCK_ESCALATE;\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"CLOB\", defaultDBTable0, dBDataType0, integer0);\n StringBuilder stringBuilder0 = new StringBuilder();\n SQLUtil.renderColumnTypeWithSize((DBColumn) defaultDBColumn0, stringBuilder0);\n assertEquals(\"CLOB\", stringBuilder0.toString());\n }", "@Test\n\tpublic void testTooLargeValueBinaryReaderStreamPosition() throws IOException {\n\n\t\tbyte[] bytes =\n\t\t\tbytes(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x1, 0x2);\n\t\tInputStream is = is(bytes);\n\n\t\ttry {\n\t\t\tlong value = LEB128.read(is, false);\n\t\t\tAssert.fail(\n\t\t\t\t\"Should not be able to read a LEB128 that is larger than what can fit in java 64bit long int: \" +\n\t\t\t\t\tLong.toUnsignedString(value));\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\t// good\n\t\t}\n\n\t\tAssert.assertEquals(bytes.length - 10, is.available());\n\t}", "public int getOneof1864() {\n if (hugeOneofCase_ == 1864) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1864() {\n if (hugeOneofCase_ == 1864) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getVersionForSchema() {\n try (ITransaction tx = transactionProvider.getTransaction()) {\n try (Connection c = connectionProvider.getConnection()) {\n GetSchemaVersion cmd = new GetSchemaVersion(this.schemaName);\n return cmd.run(translator, c);\n } catch (SQLException x) {\n throw translator.translate(x);\n }\n }\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long asLong() {\n \n return notSupportedCast(BasicTypeID.LONG);\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n StringBuilder stringBuilder0 = new StringBuilder();\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"dKop matrUalized view\", (DBTable) null, 149, \"org.h2.store.LobStorage\");\n SQLUtil.renderColumnTypeWithSize((DBColumn) defaultDBColumn0, stringBuilder0);\n assertEquals(\"ORG.H2.STORE.LOBSTORAGE\", stringBuilder0.toString());\n }", "@Override\n public long[] getLengths() throws ValueFormatException, RepositoryException {\n return null;\n }", "public static int getDateByteSize() {\n return LongSerializer.getLongByteSize();\n }", "long dbSize();", "public abstract long read_longlong();", "@Override\n\tpublic long readScalarLong() throws IOException {\n\t\treturn 0;\n\t}", "@Test\n public void stringFromLong() {\n assertEquals(\n \"784dd132\",\n JdkHashTools.getStringFromLong(2018365746)\n );\n }", "protected Class getDefaultLockingFieldType() {\r\n return ClassConstants.LONG;\r\n\r\n }", "public static String generateHiveSpecificLogicalType(Schema schema)\n throws AvroSerdeException {\n // For bytes type, it can be mapped to decimal.\n Schema.Type type = schema.getType();\n\n if (type == Schema.Type.STRING && AvroSerDe.VARCHAR_TYPE_NAME\n .equalsIgnoreCase(schema.getProp(AvroSerDe.AVRO_PROP_LOGICAL_TYPE))) {\n int maxLength = 0;\n try {\n maxLength = Integer.parseInt(AvroCompatibilityHelper.getSchemaPropAsJsonString(schema, \n AvroSerDe.AVRO_PROP_MAX_LENGTH, false, false));\n } catch (Exception ex) {\n throw new AvroSerdeException(\"Failed to obtain maxLength value from file schema: \" + schema, ex);\n }\n return String.format(\"varchar(%s)\", maxLength);\n } else {\n return StringUtils.EMPTY;\n }\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getMinorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(MINORSCHEMAVERSION_PROP.get());\n }", "public abstract int read_long();", "private void setLongTokenBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n longToken_ = value.toStringUtf8();\n }", "private void setLongTokenBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n longToken_ = value.toStringUtf8();\n }", "public String getType() {\r\n return \"Block Data Long\";\r\n }", "@Test\n public void test_column_type_detection_integer_04() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDunsignedInt), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertFalse(info.isSigned());\n }", "public int getOneof1804() {\n if (hugeOneofCase_ == 1804) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1804() {\n if (hugeOneofCase_ == 1804) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1833() {\n if (hugeOneofCase_ == 1833) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1833() {\n if (hugeOneofCase_ == 1833) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public void setSchemaVersion(int version) {\n this.SCHEMA_VERSION = version;\n }", "public int getOneof1834() {\n if (hugeOneofCase_ == 1834) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1904() {\n if (hugeOneofCase_ == 1904) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public void updateSchemaVersion() {\n // The schema version should never regress, so make sure we don't change\n // anything if this code is older than what's currently in the database\n if (latestCodeVersion > getVersionForSchema()) {\n updateSchemaVersionId(this.latestCodeVersion);\n }\n }", "public int getOneof1834() {\n if (hugeOneofCase_ == 1834) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1904() {\n if (hugeOneofCase_ == 1904) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1433() {\n if (hugeOneofCase_ == 1433) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getMinorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(MINORSCHEMAVERSION_PROP.get());\n }", "public int getOneof1364() {\n if (hugeOneofCase_ == 1364) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1433() {\n if (hugeOneofCase_ == 1433) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1364() {\n if (hugeOneofCase_ == 1364) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1341() {\n if (hugeOneofCase_ == 1341) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1341() {\n if (hugeOneofCase_ == 1341) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1464() {\n if (hugeOneofCase_ == 1464) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "private Long validateMaxFileSize(String maxFileSize){\n return Long.parseLong(maxFileSize);\n }", "@Test\n public void test_column_type_detection_integer_02() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"1234\", XSDDatatype.XSDint), true, Types.BIGINT, Long.class.getCanonicalName());\n Assert.assertEquals(0, info.getScale());\n Assert.assertTrue(info.isSigned());\n }", "public int getOneof1464() {\n if (hugeOneofCase_ == 1464) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getPlatformMinorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(PLATFORMMINORSCHEMAVERSION_PROP.get());\n }", "public boolean isLong() {\n return _isLong;\n }", "public int getOneof1072() {\n if (hugeOneofCase_ == 1072) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1072() {\n if (hugeOneofCase_ == 1072) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "@Override\n public long applyAsLong(BytesStore bytes) {\n return applyAsLong(bytes, bytes.readRemaining());\n }", "public int getOneof1832() {\n if (hugeOneofCase_ == 1832) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1832() {\n if (hugeOneofCase_ == 1832) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "@CheckReturnValue\n default long idAsLong() {\n return Long.parseUnsignedLong(id());\n }", "long version();", "public int getOneof1489() {\n if (hugeOneofCase_ == 1489) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public Long getLongAttribute();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getPlatformMinorSchemaVersion() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(PLATFORMMINORSCHEMAVERSION_PROP.get());\n }", "private long getLong() {\n longBuffer.rewind();\n archive.read(longBuffer);\n longBuffer.flip();\n return longBuffer.getLong();\n }", "public int getOneof1489() {\n if (hugeOneofCase_ == 1489) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1872() {\n if (hugeOneofCase_ == 1872) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1872() {\n if (hugeOneofCase_ == 1872) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1764() {\n if (hugeOneofCase_ == 1764) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1764() {\n if (hugeOneofCase_ == 1764) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1064() {\n if (hugeOneofCase_ == 1064) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1064() {\n if (hugeOneofCase_ == 1064) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getMarshalledSize()\n{\n int marshalSize = 0; \n\n marshalSize += recordType.getMarshalledSize();\n marshalSize += changeIndicator.getMarshalledSize();\n marshalSize += entityType.getMarshalledSize();\n marshalSize += 2; // padding\n marshalSize += 4; // padding1\n\n return marshalSize;\n}", "public int getOneof1704() {\n if (hugeOneofCase_ == 1704) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1704() {\n if (hugeOneofCase_ == 1704) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1964() {\n if (hugeOneofCase_ == 1964) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "Long getVersion();", "public int getOneof1964() {\n if (hugeOneofCase_ == 1964) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1862() {\n if (hugeOneofCase_ == 1862) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1854() {\n if (hugeOneofCase_ == 1854) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1862() {\n if (hugeOneofCase_ == 1862) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public static int size_dataType() {\n return (8 / 8);\n }", "public int getOneof1863() {\n if (hugeOneofCase_ == 1863) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1304() {\n if (hugeOneofCase_ == 1304) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public int getOneof1304() {\n if (hugeOneofCase_ == 1304) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "abstract public int dbVersion();", "public int getOneof1854() {\n if (hugeOneofCase_ == 1854) {\n return (java.lang.Integer) hugeOneof_;\n }\n return 0;\n }", "public Integer getSchemaVersion() {\n return this.schemaVersion;\n }", "public Integer getSchemaVersion() {\n return this.schemaVersion;\n }" ]
[ "0.61453056", "0.5883262", "0.5625808", "0.56034863", "0.5596346", "0.5563018", "0.55011076", "0.54554904", "0.544887", "0.54154736", "0.53781295", "0.5334409", "0.5331018", "0.5328589", "0.53172994", "0.5294116", "0.5289098", "0.5287211", "0.52833855", "0.525452", "0.5241524", "0.52404386", "0.52187943", "0.52181745", "0.5216494", "0.5212754", "0.52056354", "0.5202175", "0.5201787", "0.5201786", "0.5199896", "0.5197899", "0.51938444", "0.51899993", "0.51889896", "0.51848865", "0.51670593", "0.51638544", "0.5149109", "0.5149109", "0.5146701", "0.5129425", "0.5126777", "0.5124016", "0.51147497", "0.5113295", "0.511307", "0.5113041", "0.51090336", "0.51078695", "0.51056653", "0.5102172", "0.51007634", "0.5097339", "0.5097272", "0.50939983", "0.50908506", "0.50799274", "0.5077526", "0.50665075", "0.50645626", "0.50625724", "0.5061323", "0.5058334", "0.50528765", "0.5044434", "0.50439304", "0.50409395", "0.5040214", "0.5038842", "0.5020125", "0.5017853", "0.50160724", "0.50120854", "0.50102425", "0.50091213", "0.50074875", "0.5007353", "0.5005737", "0.50053465", "0.5005204", "0.49990234", "0.49979517", "0.49974743", "0.49906728", "0.49863788", "0.4983952", "0.49803716", "0.49795976", "0.49793085", "0.49737895", "0.49730325", "0.49729884", "0.49719137", "0.497137", "0.49675778", "0.4967135", "0.49669477", "0.4965356", "0.4965356" ]
0.74011374
0
When an NFC tag is being written, call the write tag function when an intent is received that says the tag is within range of the device and ready to be written to
public void onNewIntent(Intent intent) { Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); String nfcMessage = intent.getStringExtra("nfcMessage"); if(nfcMessage != null) { if(writeTag(this, tag, nfcMessage)) Toast.makeText(this, "Write successfull", Toast.LENGTH_LONG).show(); newText.setText("sample text"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "public void writeNFC(View view) {\n\n // capture in logcat\n Log.d(TAG, getString(R.string.debug_key) + \" Write key pressed\");\n\n getNdef();\n if (ndef == null)\n return;\n\n NdefMessage mMessage = this.createMessage();\n\n try {\n // establish connection with tag\n ndef.connect();\n //if (ndef.isConnected()) {\n // write the message\n ndef.writeNdefMessage(mMessage);\n //}\n // disconnect\n ndef.close();\n Toast.makeText(this, \"Tag written\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n Toast.makeText(this, \"Connection lost: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (FormatException e) {\n Toast.makeText(this, \"Format Error: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n // get the edit text string\n// str = mInput.getText().toString();\n// //Log.d(TAG, getString(R.string.debug_key) + \" \" + str);\n//\n//\n // can only be used to beam data between two devices p2p\n// if (nfcAdapter == null) {\n// Toast.makeText(this, getString(R.string.no_nfc), Toast.LENGTH_LONG).show();\n// } else {\n// nfcAdapter.setNdefPushMessageCallback(this, this);\n// //Toast.makeText(this, \"Bring phone close to tag\", Toast.LENGTH_LONG).show();\n// nfcAdapter.setOnNdefPushCompleteCallback(this, this);\n// }\n }", "public static boolean writeTag(Context context, Tag tag, String data) {\n NdefRecord appRecord = NdefRecord.createApplicationRecord(context.getPackageName());\n \n // Record with actual data we care about\n NdefRecord relayRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA,\n new String(\"application/\" + context.getPackageName()).getBytes(Charset.forName(\"US-ASCII\")),\n null, data.getBytes());\n \n // Complete NDEF message with both records\n NdefMessage message = new NdefMessage(new NdefRecord[] {relayRecord, appRecord});\n\n try {\n // If the tag is already formatted, just write the message to it\n Ndef ndef = Ndef.get(tag);\n if(ndef != null) {\n ndef.connect();\n\n // Make sure the tag is writable\n if(!ndef.isWritable()) {\n Toast.makeText(context, \"Error: nfcReadOnlyError\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n // Check if there's enough space on the tag for the message\n int size = message.toByteArray().length;\n if(ndef.getMaxSize() < size) {\n Toast.makeText(context, \"Error: nfcBadSpaceError\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n try {\n // Write the data to the tag\n ndef.writeNdefMessage(message);\n \n //DialogUtils.displayInfoDialog(context, R.string.nfcWrittenTitle, R.string.nfcWritten);\n return true;\n } catch (TagLostException tle) {\n Toast.makeText(context, \"Error: nfcTagLostError\", Toast.LENGTH_LONG).show();\n return false;\n } catch (IOException ioe) {\n Toast.makeText(context, \"Error: nfcFormattingError\", Toast.LENGTH_LONG).show();\n return false;\n } catch (FormatException fe) {\n Toast.makeText(context, \"Error: nfcFormattingError\", Toast.LENGTH_LONG).show();\n return false;\n }\n // If the tag is not formatted, format it with the message\n } else {\n NdefFormatable format = NdefFormatable.get(tag);\n if(format != null) {\n try {\n format.connect();\n format.format(message);\n \n //DialogUtils.displayInfoDialog(context, R.string.nfcWrittenTitle, R.string.nfcWritten);\n return true;\n } catch (TagLostException tle) {\n Toast.makeText(context, \"Error: nfcTagLostError\", Toast.LENGTH_LONG).show();\n return false;\n } catch (IOException ioe) {\n Toast.makeText(context, \"Error: nfcFormattingError\", Toast.LENGTH_LONG).show();\n return false;\n } catch (FormatException fe) {\n Toast.makeText(context, \"Error: nfcFormattingError\", Toast.LENGTH_LONG).show();\n return false;\n }\n } else {\n Toast.makeText(context, \"Error: nfcNoNdefErrorTitle\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n } catch(Exception e) {\n \tToast.makeText(context, \"Error: nfcUnknownErrorTitle\", Toast.LENGTH_LONG).show();\n \n }\n\n return false;\n }", "@Override\n protected void onNewIntent(Intent intent){\n\n //If the new intent matches the filtered NFC intent, read in the tag's raw data.\n if(NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {\n mytag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n //Display a visible notification showing the object has been found.\n Toast.makeText(this, \"Object Found.\", Toast.LENGTH_LONG).show();\n\n //If the new story is ready to be written\n if (newStoryReady) {\n\n //Initialize success boolean which returns true only if the nfc interaction has been successful\n boolean success = false;\n success = nfcInteraction.doWrite(mytag, tag_data);\n\n //If the nfc write process has succeeded, take the following action\n if (success) {\n\n //Return the value of newStoryReady to false as current ready story has been written\n newStoryReady = false;\n //Stop the clickability of the current range of image views\n disableViewClickability();\n //Stop any active commentary\n commentaryInstruction.stopPlaying();\n //Cancel idleSaveStoryToArchiveHandler which automatically saves the current story to the archive\n cancelIdleStoryCountdown();\n //Reset the camera to a new preview\n resetCamera();\n //Release current camera instance\n releaseCamera();\n// nfcInteraction.Complete(success);\n //Complete the process by navigating to back to HomeScreen activity which will play the new story\n Complete(success);\n } else {\n\n newStoryReady = true;\n }\n }\n }\n }", "boolean onTag(ByteBuffer buffer, int tagIndex, int tagLen, int valueLen);", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {\n myTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n }\n if(isWriting){\n attemptWriteToTag();\n writeFragment.dismiss();\n isWriting = false;\n } else {\n setIntent(intent);\n tagProfile = nfcReader.readFromIntent(intent);\n }\n }", "public void onTag(RFIDTagEvent e) {\n\t\t\t\t\t// Creating string for the tag string\n\t\t\t\t\tString tagStr = e.getTag();\n\t\t\t\t\t// Creating try to check if its thecorrect tag\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// If thetag is \"1600ee15e9\", publish the message\n\t\t\t\t\t\tif (tagArray1.contains(tagStr)) {\n\t\t\t\t\t\t\t// Print message, if it's the correct tag\n\t\t\t\t\t\t\tSystem.out.println(\"Tag read OPEN DOOR: \" + tagStr);\n\n\t\t\t\t\t\t\t// Publish rfid and motor\n\t\t\t\t\t\t\tpublisher.publishRfid(tagStr);\n\t\t\t\t\t\t\tpublisher.publishMotor(tagStr);\n\t\t\t\t\t\t\t//Print statements to the console\n\t\t\t\t\t\t\tSystem.out.println(\"VALID TAG/USER\");\n\t\t\t\t\t\t\tSystem.out.println(\"Room3 - DOOR OPEN\");\n\t\t\t\t\t\t\t// Seting the sensor name(tag), sensorvalue and user id for the valid tag/user)\n\t\t\t\t\t\t\tRFID.setSensorname(\"1600ee15e9\");// Setting valid sensorname (tag)\n\t\t\t\t\t\t\tRFID.setSensorvalue(\"Room1, Door open\");// Setting the valid sensor value\n\t\t\t\t\t\t\tRFID.setUserid(\"16038287\");// Setting valid user id\n\t\t\t\t\t\t\t// Converting the data to json format\n\t\t\t\t\t\t\tRFIDJSON = gson.toJson(RFID);\n\t\t\t\t\t\t\t// Sending the data to the server\n\t\t\t\t\t\t\tsendToServer(RFIDJSON);\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t// inserting rfid data to the database and printing message out onto the console\n\t\t\t\t\t\t\tSystem.out.println(\"Success rrfid data have been added to the database!\"); // printing success message\n\t\t\t\t\t\t\t// Creating variable for gson\n\t\t\t\t\t\t\t// Declaring gson object\n\t\t\t\t\t\t\t// Json is data format which would express data objects consisting of attribute value pairs. \n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\t// Creating string for the json bject and then converting it to json format\n\t\t\t\t\t\t\tString allRFIDDataJson = gson.toJson(RFIDJSON);\n\n\n\t\t\t\t\t\t\t// Print all rfid data in json format\n\t\t\t\t\t\t\tSystem.out.println(allRFIDDataJson);\n\t\t\t\t\t\t\tSystem.out.println(\"RFID data successfully in json format!\"); // printing success message\n\n\t\t\t\t\t\t} // close if statement to check the tag string\n\n\t\t\t\t\t\t// Otherwise fail and print out invalid rfid tag to the console.\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Print message, if it's the correct tag\n\t\t\t\t\t\t\tSystem.out.println(\"Tag read: DOOR NOT OPEN: \" + tagStr);\n\n\t\t\t\t\t\t\t//Print statements to the console\n\t\t\t\t\t\t\tSystem.out.println(\"INVALID TAG/USER\");\n\t\t\t\t\t\t\tSystem.out.println(\"Room2 - DOOR NOT OPEN\");// CHANGE rfid log..!!!!!\n\t\t\t\t\t\t\t// Seting the sensor name(tag), sensorvalue and user id for the invalid tag/user)\n\t\t\t\t\t\t\tRFID.setSensorname(\"4d004a9afa\");// Setting invalid sensorname (tag)\n\t\t\t\t\t\t\tRFID.setSensorvalue(\"Room2-DOOR NOT OPEN\");// Setting the invalid sensor value\n\t\t\t\t\t\t\tRFID.setUserid(\"16038287\");// Setting valid user id for the invalid user which has been used\n\t\t\t\t\t\t\t// Converting the data to json format\n\t\t\t\t\t\t\tRFIDJSON = gson.toJson(RFID);\n\t\t\t\t\t\t\t// Sending the data to the server\n\t\t\t\t\t\t\tsendToServer(RFIDJSON);\t\t\t\t\t\t\n\n\n\t\t\t\t\t\t\t// inserting rfid data to the database and printing message out onto the console\n\t\t\t\t\t\t\tSystem.out.println(\"Success rrfid data have been added to the database!\"); // printing success message\n\t\t\t\t\t\t\t// Creating variable for gson\n\t\t\t\t\t\t\t// Declaring gson object\n\t\t\t\t\t\t\t// Json is data format which would express data objects consisting of attribute value pairs. \n\t\t\t\t\t\t\tGson gson = new Gson();\n\t\t\t\t\t\t\t// Creating string for the json bject and then converting it to json format\n\t\t\t\t\t\t\tString allRFIDDataJson = gson.toJson(RFIDJSON);\n\n\n\t\t\t\t\t\t\t// Print all rfid data in json format\n\t\t\t\t\t\t\tSystem.out.println(allRFIDDataJson);\n\t\t\t\t\t\t\tSystem.out.println(\"RFID data successfully in json format!\"); // printing success message\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (MqttException mqtte) {\n\t\t\t\t\t\tmqtte.printStackTrace();\n\t\t\t\t\t} // Close catch mqtt exception\n\t\t\t\t}", "public void readNFC(View view) {\n\n // capture in logcat\n Log.d(TAG, getString(R.string.debug_key) + \" Read key pressed\");\n\n getNdef();\n if (ndef == null)\n return;\n\n String set_it;\n\n boolean canbereadonly = ndef.canMakeReadOnly();\n int maxsize = ndef.getMaxSize();\n String tag_type = ndef.getType();\n boolean connected = ndef.isConnected();\n boolean writable = ndef.isWritable();\n //NdefMessage cached_msg = ndef.getCachedNdefMessage();\n NdefMessage cached_msg = null;\n try {\n // establish connection with tag\n ndef.connect();\n\n cached_msg = ndef.getNdefMessage();\n\n // disconnect\n ndef.close();\n Toast.makeText(this, \"Tag read\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n Toast.makeText(this, \"Connection lost: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (FormatException e) {\n Toast.makeText(this, \"Format Error: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n if (cached_msg == null) {\n Toast.makeText(this, \"Tag is empty\", Toast.LENGTH_LONG).show();\n } else {\n // this can also be done by creating other activity for this layout.tag_output and calling that activity through explicit intent, better way\n setContentView(R.layout.tag_output);\n is_tag_output = true;\n }\n\n // get reference to text view inside tag_output\n TextView out1 = (TextView) findViewById(R.id.out1);\n TextView v_aar = (TextView) findViewById(R.id.aar);\n TextView prop1 = (TextView) findViewById(R.id.prop1);\n TextView prop2 = (TextView) findViewById(R.id.prop2);\n TextView prop3 = (TextView) findViewById(R.id.prop3);\n TextView prop4 = (TextView) findViewById(R.id.prop4);\n\n // get string from ndef message\n String user_msg = new String(cached_msg.getRecords()[0].getPayload());\n //String aar = new String(cached_msg.getRecords()[1].getPayload());\n\n // assign it to textview\n if (user_msg.equals(\"\"))\n out1.setText(\"User didn't provide data\");\n else\n out1.setText(user_msg);\n //v_aar.setText(\"AAR is: \" + aar);\n v_aar.setText(\"AAR is: \");\n\n if (canbereadonly) {\n Log.d(TAG, getString(R.string.debug_key) + \"Can be Read only\");\n set_it = \"Can be Read only\";\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Can't be Read only\");\n set_it = \"Can't be Read only\";\n }\n prop1.setText(set_it);\n\n if (writable) {\n Log.d(TAG, getString(R.string.debug_key) + \"writable\");\n set_it = \"Writable\";\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Not writable\");\n set_it = \"Not Writable\";\n }\n prop2.setText(set_it);\n\n if (connected) {\n Log.d(TAG, getString(R.string.debug_key) + \"Connected\");\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Not Connected\");\n }\n\n Log.d(TAG, getString(R.string.debug_key) + \"maxsize: \" + maxsize + \"tag_type: \" + tag_type);\n prop3.setText(\"MaxSize: \" + maxsize);\n prop4.setText(\"TagType: \" + tag_type);\n\n }", "@Override\r\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\r\n Tag tagFromIntent = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\r\n DataDevice ma = (DataDevice) getApplication();\r\n ma.setCurrentTag(tagFromIntent);\r\n }", "public boolean insertTag(String tagDescriptiveString){\n if (logEnabled) {\n if (mBufferedWriter != null) {\n long nowMillis = System.currentTimeMillis();\n final String timestamp = new SimpleDateFormat(\"yyyy MM dd HH mm ss\").format(new Date()); // salva il timestamp per il log\n try {\n\n try {\n String tagString = \"\" + timestamp +\n \" \" + nowMillis +\n \" PHONE\" +\n \" LOCAL_DEVICE \" +\n \"TAG data \" +\n tagDescriptiveString +\n \"\\n\";\n Log.i(TAG, tagDescriptiveString);\n\n mBufferedWriter.write(tagString);\n mBufferedWriter.flush();\n return true;\n } catch (NullPointerException e){\n String tagString = \"\" + timestamp +\n \" \" + nowMillis +\n \" NO_ADDRESS\" +\n \" LOCAL_DEVICE \" +\n \"TAG data \" +\n tagDescriptiveString +\n \"\\n\";\n\n mBufferedWriter.write(tagString);\n return true;\n }\n } catch (IOException e) {\n Log.w(TAG, \"Exception throwed while writing data to file.\");\n return false;\n }\n }else{\n return false;\n }\n }else{\n return false;\n }\n }", "@Override\n\tpublic void onNdefPushComplete(NfcEvent event) {\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t\t\n\t}", "public void handleMessage(Message msg) {\n // if the message 'what' matches the constant MESSAGE_SENT, it\n // means the callback\n // to onNdefPushComplete happened which means the NFC was a\n // success\n if (msg.what == MESSAGE_SENT) {\n Toast.makeText(getApplicationContext(), \"Tag written successfully!!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void onNfcPerform() throws IOException {\n super.onNfcPerform();\n // either way, finish afterwards\n finish();\n }", "public void onNdefPushComplete(NfcEvent event) {\n\t\t\n\t}", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n String s = new String(msg.getRecords()[0].getPayload());\n nfcTagCode = s.substring(3);\n\n textView.setText(nfcTagCode); // Sets the textview as the Text read from NFC TAG\n }", "@Override\n public void onClick(View arg0) {\n writeTag.disableNdefExchangeMode();\n writeTag.enableTagWriteMode();\n\n new AlertDialog.Builder(WiFiConnectActivity.this).setTitle(\"Touch tag to write\")\n .setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n writeTag.disableTagWriteMode();\n writeTag.enableNdefExchangeMode();\n }\n }).create().show();\n }", "@Override\n public void onResume() {\n super.onResume();\n // Check if there is any any NDEF is discovered to process the TAG\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {\n processIntent(getIntent()); // If NDEF is discovered, It calls prcoessIntent method to get the NFC TAG Code\n }\n }", "@Override\n protected void onNewIntent(Intent intent) {\n Log.d(TAG, getString(R.string.debug_key) + \"TagWriter intent filter success\");\n this.setIntent(intent);\n }", "@Override\r\n public void onNdefPushComplete(NfcEvent event)\r\n {\r\n mServer.start();\r\n\r\n SendActivity.this.runOnUiThread(new Runnable()\r\n {\r\n public void run()\r\n {\r\n tapImage.setVisibility(View.INVISIBLE);\r\n tapText.setVisibility(View.INVISIBLE);\r\n }\r\n });\r\n mNfcAdapter.setNdefPushMessageCallback(null, this);\r\n }", "@Override\n public void onNdefPushComplete(NfcEvent nfcEvent) {\n Handler h = handler;\n if (h != null)\n h.obtainMessage(MESSAGE_SENT).sendToTarget();\n }", "boolean performWrite(NfcWriteUtility writeUtility) throws ReadOnlyTagException, InsufficientCapacityException, TagNotPresentException, FormatException;", "@Override\n\tpublic void onNdefPushComplete(NfcEvent arg0) {\n\t\t// A handler is needed to send messages to the activity when this\n\t\t// callback occurs, because it happens from a binder thread\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t}", "@Override\n public void onChange(boolean selfChange) {\n super.onChange(selfChange);\n int[] bytesAndStatus = getBytesAndStatus(tag_id);\n if (bytesAndStatus[0] == -1 || bytesAndStatus[1] == -1) {\n hdHandler.sendMessage(hdHandler.obtainMessage(0, 0,\n -1));\n } else {\n hdHandler.sendMessage(hdHandler.obtainMessage(0,\n bytesAndStatus[0], bytesAndStatus[1]));\n }\n }", "protected static boolean write2Tag(GroupTagModel model, Tag tag)\n\t\t\tthrows IOException, FormatException, NfcTagException {\n\n\t\t// check id uniqueness\n\t\tif (null == model)\n\t\t\tthrow new NfcTagException(\n\t\t\t\t\tCommonTagErrors.ErrorMsg.TAG_MODEL_NOT_INIT);\n\n\t\tString id = model.getId();\n\n\t\t// throw exception in case user has not defined tag id.\n\t\tif (null == id || \"\".equals(model.getId()))\n\t\t\tthrow new NfcTagException(CommonTagErrors.ErrorMsg.TAG_ID_UNDEFINED);\n\n\t\t// id prefix check\n\t\tif (!id.startsWith(TagConstants.TAG_TYPE_GROUP_PREFIX))\n\t\t\tmodel.setId(TagConstants.TAG_TYPE_GROUP_PREFIX + model.getId());\n\n\t\t// finally create group tag\n\t\tNdefRecord records[] = new NdefRecord[NO_OF_RECORDS];\n\n\t\tshort index = 0;\n\t\trecords[index] = TextRecord.createRecord(model.getId());\n\t\trecords[++index] = TextRecord.createRecord(\"\" + model.getPermission());\n\n\t\t// explicitly converting integer to string to store into tags\n\t\trecords[++index] = TextRecord.createRecord(\"\" + model.getCapacity());\n\n\t\t// explicitly converting integer to string to store into tags\n\t\trecords[++index] = TextRecord.createRecord(\"\" + model.getOccupied());\n\t\trecords[++index] = TextRecord.createRecord(model.getData());\n\n\t\tNdefMessage group_msg = new NdefMessage(records);\n\t\tNfcReadWrite.writeToNfc(group_msg, tag);\n\t\treturn true;\n\t}", "private void onPreRequestData(int tag) {\n }", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n String payload = null;\n if (intent != null && NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) {\n Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n if (rawMessages != null) {\n NdefMessage[] messages = new NdefMessage[rawMessages.length];\n messages[0] = (NdefMessage) rawMessages[0];\n NdefRecord rec = messages[0].getRecords()[0];\n payload = new String(rec.getPayload());\n //Toast.makeText(getApplicationContext(),payload,Toast.LENGTH_LONG).show();\n ServerComm serverComm = new ServerComm();\n String result=\"\";\n try {\n result = serverComm.execute(\"1\", MainActivity.user.getUserId(), MainActivity.user.getPassword(), payload).get();\n }catch (InterruptedException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }catch (ExecutionException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n if(result==null){\n Toast.makeText(getApplicationContext(),\"Check your Internet Connection\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(result.equalsIgnoreCase(\"successful\")){\n Toast.makeText(getApplicationContext(),\"Attendance Registered successfully!\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }", "private void handleIntent(Intent intent) {\n if(intent == null){\n Toast.makeText(this, \"intent is null handleIntent \", Toast.LENGTH_SHORT).show();\n return;\n }\n String action = intent.getAction();\n\n if(nfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)){\n String type = intent.getType();\n if(MIME_TEXT_PLAIN.equals(type)){\n Tag tag = intent.getParcelableExtra(EXTRA_TAG);\n\n nfcReaderTask = new NfcReaderTask();\n nfcReaderTask.SetResponseListener(this);\n nfcReaderTask.execute(tag);\n }\n }\n }", "public void transmit_flags(){\n BluetoothGattCharacteristic txChar = mBleService.getCharacteristic(deviceAddress, GattServices.UART_SERVICE, GattCharacteristics.TX_CHARACTERISTIC);/**---------------------------------------------------------------------------------------------------------*/\n /**\n * added to sent 1 or 2 or 3 to the bluetooth device\n */\n if(ExerciseInstructionFragment.flag==1)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x01});\n Log.d(TAG, \"Data sent via flex\");}\n else if(ExerciseInstructionFragment.flag==2)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x02});\n Log.d(TAG, \"Data sent via imu\");}\n else if(ExerciseInstructionFragment.flag==3)\n {mBleService.writeCharacteristic(deviceAddress, txChar, new byte[] {0x03});}\n\n }", "public void onTagsReceived(Map<String, Object> tags);", "public boolean handleTag(TagWrapper tag)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Get the first APDU from the tag\n\t\t\tApdu apdu = AppletThread.getApdu(tag); \n\n\t\t\t// Keep trying\n\t\t\tdo\n\t\t\t{\n\t\t\t\tCommandApdu commandApdu = new CommandApdu(apdu);\n\t\t\t\t\n\t\t\t\t// SELECT\n\t\t\t\tif (commandApdu.cla == Iso7816.CLA_ISO7816 && commandApdu.ins == Iso7816.INS_SELECT)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t// TODO: Process P1 and P2 and handle that\n\t\t\t\t\t\n\t\t\t\t\t// We have an applet\n\t\t\t\t\tif (applets_.containsKey(ByteBuffer.wrap(commandApdu.getData())))\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t// If we have an active applet deselect it\n\t\t\t\t\t\tif (activeApplet_ != null)\n\t\t\t\t\t\t\tactiveApplet_.deselect();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Set the applet to active and select it\n\t\t\t\t\t\tactiveApplet_ = applets_.get(ByteBuffer.wrap(commandApdu.getData()));\n\t\t\t\t\t\tactiveApplet_.select();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Send an OK and start the applet\n\t\t\t\t\t\tApdu response = AppletThread.sendApdu(tag, new ResponseApdu(Iso7816.SW_NO_ERROR));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Stop current applet thread and wait just a bit\n\t\t\t\t\t\tappletThread_.stop();\n\t\t\t\t\t\tThread.sleep(250);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set the applet to the active runnable\n\t\t\t\t\t\tappletThread_.setApplet(activeApplet_, tag);\n\t\t\t\t\t\tappletThread_.setApdu(response);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Run it\n\t\t\t\t\t\tThread thread= new Thread(appletThread_);\n\t\t\t\t\t\tthread.setName(\"JavaCard\");\n\t\t\t\t\t\tthread.start();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Stop trying\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// Something went wrong\n\t\t\t\t\t\tapdu = AppletThread.sendApdu(tag, new ResponseApdu(Iso7816.SW_APPLET_SELECT_FAILED));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// This is as defined in the specifications\n\t\t\t\t// If we have an active applet let them process this commandApdu\n\t\t\t\tif (activeApplet_ != null)\n\t\t\t\t\tapdu = AppletThread.sendApdu(tag, activeApplet_.process(commandApdu));\n\t\t\t\telse\n\t\t\t\t\tapdu = AppletThread.sendApdu(tag, new ResponseApdu(Iso7816.SW_INS_NOT_SUPPORTED));\n\t\t\t}\n\t\t\twhile(true);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public void packetSent(NIOSocket socket, Object tag)\n {\n }", "public interface INfcTag\n extends IInterface {\n public static abstract class Stub extends Binder\n implements INfcTag {\n private static class Proxy\n implements INfcTag {\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public boolean canMakeReadOnly(int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(17, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n if(j != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int close(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(1, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int connect(int i, int j) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int k;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n parcel.writeInt(j);\n mRemote.transact(2, parcel, parcel1, 0);\n parcel1.readException();\n k = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return k;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int formatNdef(int i, byte abyte0[]) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n parcel.writeByteArray(abyte0);\n mRemote.transact(12, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean getExtendedLengthApdusSupported() throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int i;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n mRemote.transact(19, parcel, parcel1, 0);\n parcel1.readException();\n i = parcel1.readInt();\n if(i != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public String getInterfaceDescriptor() {\n return \"android.nfc.INfcTag\";\n }\n\n public int getMaxTransceiveLength(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(18, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int[] getTechList(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int ai[];\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(4, parcel, parcel1, 0);\n parcel1.readException();\n ai = parcel1.createIntArray();\n parcel1.recycle();\n parcel.recycle();\n return ai;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int getTimeout(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(15, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isNdef(int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(5, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n if(j != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean isPresent(int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(6, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n if(j != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public boolean ndefIsWritable(int i) throws RemoteException {\n boolean flag;\n Parcel parcel;\n Parcel parcel1;\n flag = false;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(11, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n if(j != 0)\n flag = true;\n parcel1.recycle();\n parcel.recycle();\n return flag;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int ndefMakeReadOnly(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(10, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public NdefMessage ndefRead(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(8, parcel, parcel1, 0);\n parcel1.readException();\n if(parcel1.readInt() == 0) goto _L2; else goto _L1\n_L1:\n NdefMessage ndefmessage = (NdefMessage)NdefMessage.CREATOR.createFromParcel(parcel1);\n_L4:\n parcel1.recycle();\n parcel.recycle();\n return ndefmessage;\n_L2:\n ndefmessage = null;\n if(true) goto _L4; else goto _L3\n_L3:\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int ndefWrite(int i, NdefMessage ndefmessage) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n if(ndefmessage == null)\n break MISSING_BLOCK_LABEL_75;\n parcel.writeInt(1);\n ndefmessage.writeToParcel(parcel, 0);\n_L1:\n int j;\n mRemote.transact(9, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n parcel.writeInt(0);\n goto _L1\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int reconnect(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int j;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(3, parcel, parcel1, 0);\n parcel1.readException();\n j = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return j;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public Tag rediscover(int i) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n mRemote.transact(13, parcel, parcel1, 0);\n parcel1.readException();\n if(parcel1.readInt() == 0) goto _L2; else goto _L1\n_L1:\n Tag tag = (Tag)Tag.CREATOR.createFromParcel(parcel1);\n_L4:\n parcel1.recycle();\n parcel.recycle();\n return tag;\n_L2:\n tag = null;\n if(true) goto _L4; else goto _L3\n_L3:\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public void resetTimeouts() throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n mRemote.transact(16, parcel, parcel1, 0);\n parcel1.readException();\n parcel1.recycle();\n parcel.recycle();\n return;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public int setTimeout(int i, int j) throws RemoteException {\n Parcel parcel;\n Parcel parcel1;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n int k;\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n parcel.writeInt(j);\n mRemote.transact(14, parcel, parcel1, 0);\n parcel1.readException();\n k = parcel1.readInt();\n parcel1.recycle();\n parcel.recycle();\n return k;\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n public TransceiveResult transceive(int i, byte abyte0[], boolean flag) throws RemoteException {\n int j;\n Parcel parcel;\n Parcel parcel1;\n j = 0;\n parcel = Parcel.obtain();\n parcel1 = Parcel.obtain();\n parcel.writeInterfaceToken(\"android.nfc.INfcTag\");\n parcel.writeInt(i);\n parcel.writeByteArray(abyte0);\n if(flag)\n j = 1;\n parcel.writeInt(j);\n mRemote.transact(7, parcel, parcel1, 0);\n parcel1.readException();\n if(parcel1.readInt() == 0) goto _L2; else goto _L1\n_L1:\n TransceiveResult transceiveresult = (TransceiveResult)TransceiveResult.CREATOR.createFromParcel(parcel1);\n_L4:\n parcel1.recycle();\n parcel.recycle();\n return transceiveresult;\n_L2:\n transceiveresult = null;\n if(true) goto _L4; else goto _L3\n_L3:\n Exception exception;\n exception;\n parcel1.recycle();\n parcel.recycle();\n throw exception;\n }\n\n private IBinder mRemote;\n\n Proxy(IBinder ibinder) {\n mRemote = ibinder;\n }\n }\n\n\n public static INfcTag asInterface(IBinder ibinder) {\n Object obj;\n if(ibinder == null) {\n obj = null;\n } else {\n IInterface iinterface = ibinder.queryLocalInterface(\"android.nfc.INfcTag\");\n if(iinterface != null && (iinterface instanceof INfcTag))\n obj = (INfcTag)iinterface;\n else\n obj = new Proxy(ibinder);\n }\n return ((INfcTag) (obj));\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel1, int j) throws RemoteException {\n int k;\n boolean flag;\n k = 0;\n flag = true;\n i;\n JVM INSTR lookupswitch 20: default 176\n // 1: 199\n // 2: 228\n // 3: 261\n // 4: 290\n // 5: 319\n // 6: 357\n // 7: 395\n // 8: 476\n // 9: 526\n // 10: 588\n // 11: 617\n // 12: 655\n // 13: 688\n // 14: 738\n // 15: 771\n // 16: 800\n // 17: 817\n // 18: 855\n // 19: 884\n // 1598968902: 190;\n goto _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9 _L10 _L11 _L12 _L13 _L14 _L15 _L16 _L17 _L18 _L19 _L20 _L21\n_L1:\n flag = super.onTransact(i, parcel, parcel1, j);\n_L23:\n return flag;\n_L21:\n parcel1.writeString(\"android.nfc.INfcTag\");\n continue; /* Loop/switch isn't completed */\n_L2:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int j3 = close(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(j3);\n continue; /* Loop/switch isn't completed */\n_L3:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int i3 = connect(parcel.readInt(), parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(i3);\n continue; /* Loop/switch isn't completed */\n_L4:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int l2 = reconnect(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(l2);\n continue; /* Loop/switch isn't completed */\n_L5:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int ai[] = getTechList(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeIntArray(ai);\n continue; /* Loop/switch isn't completed */\n_L6:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n boolean flag6 = isNdef(parcel.readInt());\n parcel1.writeNoException();\n if(flag6)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L7:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n boolean flag5 = isPresent(parcel.readInt());\n parcel1.writeNoException();\n if(flag5)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L8:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int k2 = parcel.readInt();\n byte abyte0[] = parcel.createByteArray();\n boolean flag4;\n TransceiveResult transceiveresult;\n if(parcel.readInt() != 0)\n flag4 = flag;\n else\n flag4 = false;\n transceiveresult = transceive(k2, abyte0, flag4);\n parcel1.writeNoException();\n if(transceiveresult != null) {\n parcel1.writeInt(flag);\n transceiveresult.writeToParcel(parcel1, flag);\n } else {\n parcel1.writeInt(0);\n }\n continue; /* Loop/switch isn't completed */\n_L9:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n NdefMessage ndefmessage1 = ndefRead(parcel.readInt());\n parcel1.writeNoException();\n if(ndefmessage1 != null) {\n parcel1.writeInt(flag);\n ndefmessage1.writeToParcel(parcel1, flag);\n } else {\n parcel1.writeInt(0);\n }\n continue; /* Loop/switch isn't completed */\n_L10:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int i2 = parcel.readInt();\n NdefMessage ndefmessage;\n int j2;\n if(parcel.readInt() != 0)\n ndefmessage = (NdefMessage)NdefMessage.CREATOR.createFromParcel(parcel);\n else\n ndefmessage = null;\n j2 = ndefWrite(i2, ndefmessage);\n parcel1.writeNoException();\n parcel1.writeInt(j2);\n continue; /* Loop/switch isn't completed */\n_L11:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int l1 = ndefMakeReadOnly(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(l1);\n continue; /* Loop/switch isn't completed */\n_L12:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n boolean flag3 = ndefIsWritable(parcel.readInt());\n parcel1.writeNoException();\n if(flag3)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L13:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int k1 = formatNdef(parcel.readInt(), parcel.createByteArray());\n parcel1.writeNoException();\n parcel1.writeInt(k1);\n continue; /* Loop/switch isn't completed */\n_L14:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n Tag tag = rediscover(parcel.readInt());\n parcel1.writeNoException();\n if(tag != null) {\n parcel1.writeInt(flag);\n tag.writeToParcel(parcel1, flag);\n } else {\n parcel1.writeInt(0);\n }\n continue; /* Loop/switch isn't completed */\n_L15:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int j1 = setTimeout(parcel.readInt(), parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(j1);\n continue; /* Loop/switch isn't completed */\n_L16:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int i1 = getTimeout(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(i1);\n continue; /* Loop/switch isn't completed */\n_L17:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n resetTimeouts();\n parcel1.writeNoException();\n continue; /* Loop/switch isn't completed */\n_L18:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n boolean flag2 = canMakeReadOnly(parcel.readInt());\n parcel1.writeNoException();\n if(flag2)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n continue; /* Loop/switch isn't completed */\n_L19:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n int l = getMaxTransceiveLength(parcel.readInt());\n parcel1.writeNoException();\n parcel1.writeInt(l);\n continue; /* Loop/switch isn't completed */\n_L20:\n parcel.enforceInterface(\"android.nfc.INfcTag\");\n boolean flag1 = getExtendedLengthApdusSupported();\n parcel1.writeNoException();\n if(flag1)\n k = ((flag) ? 1 : 0);\n parcel1.writeInt(k);\n if(true) goto _L23; else goto _L22\n_L22:\n }\n\n private static final String DESCRIPTOR = \"android.nfc.INfcTag\";\n static final int TRANSACTION_canMakeReadOnly = 17;\n static final int TRANSACTION_close = 1;\n static final int TRANSACTION_connect = 2;\n static final int TRANSACTION_formatNdef = 12;\n static final int TRANSACTION_getExtendedLengthApdusSupported = 19;\n static final int TRANSACTION_getMaxTransceiveLength = 18;\n static final int TRANSACTION_getTechList = 4;\n static final int TRANSACTION_getTimeout = 15;\n static final int TRANSACTION_isNdef = 5;\n static final int TRANSACTION_isPresent = 6;\n static final int TRANSACTION_ndefIsWritable = 11;\n static final int TRANSACTION_ndefMakeReadOnly = 10;\n static final int TRANSACTION_ndefRead = 8;\n static final int TRANSACTION_ndefWrite = 9;\n static final int TRANSACTION_reconnect = 3;\n static final int TRANSACTION_rediscover = 13;\n static final int TRANSACTION_resetTimeouts = 16;\n static final int TRANSACTION_setTimeout = 14;\n static final int TRANSACTION_transceive = 7;\n\n public Stub() {\n attachInterface(this, \"android.nfc.INfcTag\");\n }\n }\n\n\n public abstract boolean canMakeReadOnly(int i) throws RemoteException;\n\n public abstract int close(int i) throws RemoteException;\n\n public abstract int connect(int i, int j) throws RemoteException;\n\n public abstract int formatNdef(int i, byte abyte0[]) throws RemoteException;\n\n public abstract boolean getExtendedLengthApdusSupported() throws RemoteException;\n\n public abstract int getMaxTransceiveLength(int i) throws RemoteException;\n\n public abstract int[] getTechList(int i) throws RemoteException;\n\n public abstract int getTimeout(int i) throws RemoteException;\n\n public abstract boolean isNdef(int i) throws RemoteException;\n\n public abstract boolean isPresent(int i) throws RemoteException;\n\n public abstract boolean ndefIsWritable(int i) throws RemoteException;\n\n public abstract int ndefMakeReadOnly(int i) throws RemoteException;\n\n public abstract NdefMessage ndefRead(int i) throws RemoteException;\n\n public abstract int ndefWrite(int i, NdefMessage ndefmessage) throws RemoteException;\n\n public abstract int reconnect(int i) throws RemoteException;\n\n public abstract Tag rediscover(int i) throws RemoteException;\n\n public abstract void resetTimeouts() throws RemoteException;\n\n public abstract int setTimeout(int i, int j) throws RemoteException;\n\n public abstract TransceiveResult transceive(int i, byte abyte0[], boolean flag) throws RemoteException;\n}", "protected void writeToPacket(NBTTagCompound nbt) {\n }", "protected void readFullTagValue(ExifTag tag) throws IOException {\n short type = tag.getDataType();\n if (type == ExifTag.TYPE_ASCII || type == ExifTag.TYPE_UNDEFINED ||\n type == ExifTag.TYPE_UNSIGNED_BYTE) {\n int size = tag.getComponentCount();\n if (mCorrespondingEvent.size() > 0) {\n if (mCorrespondingEvent.firstEntry().getKey() < mTiffStream.getReadByteCount()\n + size) {\n Object event = mCorrespondingEvent.firstEntry().getValue();\n if (event instanceof ImageEvent) {\n // Tag value overlaps thumbnail, ignore thumbnail.\n Timber.w(\"Thumbnail overlaps value for tag: \\n\" + tag.toString());\n Entry<Integer, Object> entry = mCorrespondingEvent.pollFirstEntry();\n Timber.w(\"Invalid thumbnail offset: \" + entry.getKey());\n } else {\n // Tag value overlaps another tag, shorten count\n if (event instanceof IfdEvent) {\n Timber.w(\"Ifd \" + ((IfdEvent) event).ifd\n + \" overlaps value for tag: \\n\" + tag.toString());\n } else if (event instanceof ExifTagEvent) {\n Timber.w(\"Tag value for tag: \\n\"\n + ((ExifTagEvent) event).tag.toString()\n + \" overlaps value for tag: \\n\" + tag.toString());\n }\n size = mCorrespondingEvent.firstEntry().getKey()\n - mTiffStream.getReadByteCount();\n Timber.w(\"Invalid size of tag: \\n\" + tag.toString()\n + \" setting count to: \" + size);\n tag.forceSetComponentCount(size);\n }\n }\n }\n }\n switch (tag.getDataType()) {\n case ExifTag.TYPE_UNSIGNED_BYTE:\n case ExifTag.TYPE_UNDEFINED: {\n byte buf[] = new byte[tag.getComponentCount()];\n read(buf);\n tag.setValue(buf);\n }\n break;\n case ExifTag.TYPE_ASCII:\n tag.setValue(readString(tag.getComponentCount()));\n break;\n case ExifTag.TYPE_UNSIGNED_LONG: {\n long value[] = new long[tag.getComponentCount()];\n for (int i = 0, n = value.length; i < n; i++) {\n value[i] = readUnsignedLong();\n }\n tag.setValue(value);\n }\n break;\n case ExifTag.TYPE_UNSIGNED_RATIONAL: {\n Rational value[] = new Rational[tag.getComponentCount()];\n for (int i = 0, n = value.length; i < n; i++) {\n value[i] = readUnsignedRational();\n }\n tag.setValue(value);\n }\n break;\n case ExifTag.TYPE_UNSIGNED_SHORT: {\n int value[] = new int[tag.getComponentCount()];\n for (int i = 0, n = value.length; i < n; i++) {\n value[i] = readUnsignedShort();\n }\n tag.setValue(value);\n }\n break;\n case ExifTag.TYPE_LONG: {\n int value[] = new int[tag.getComponentCount()];\n for (int i = 0, n = value.length; i < n; i++) {\n value[i] = readLong();\n }\n tag.setValue(value);\n }\n break;\n case ExifTag.TYPE_RATIONAL: {\n Rational value[] = new Rational[tag.getComponentCount()];\n for (int i = 0, n = value.length; i < n; i++) {\n value[i] = readRational();\n }\n tag.setValue(value);\n }\n break;\n }\n if (LOGV) {\n Timber.v(\"\\n\" + tag.toString());\n }\n }", "private void receivedPacket(String tagID, String reader, String power){\n\t\tint transmitPower = Integer.parseInt(power, 16);\n\t\tif (tags.containsKey(tagID)){\n\t\t\tTag tag = tags.get(tagID);\n\t\t\ttag.addReading(reader,transmitPower);\t\t\t\n\t\t} else {\n\t\t\tTag tag = new Tag(tagID);\n\t\t\ttag.addReading(reader,transmitPower);\n\t\t\ttags.put(tagID, tag);\t\t\t\t\n\t\t}\n\t\tif ((tagID.equals(\"03BD\")) || (tagID.equals(\"03B8\")) || (tagID.equals(\"03D3\"))){\n\t\t\tcalcLocation(tagID);\n\t\t}\n\t\t\n\t}", "public abstract void readTagPayload(DataInput in) throws IOException;", "public interface OnBluetoothWriteListener {\n\t\tvoid onWrite();\n\t}", "public void addSupportedTag(String tag);", "public void setTag(int tag) {\n this.tag = tag;\n }", "public void onWriteShortEnd(ICPU cpu, int addr) {\n\t}", "public NBTTagCompound writeToNBT(NBTTagCompound tag)\r\n/* 158: */ {\r\n/* 159:159 */ tag.setByte(\"Id\", (byte)getID());\r\n/* 160:160 */ tag.setByte(\"Amplifier\", (byte)getAmplifier());\r\n/* 161:161 */ tag.setInt(\"Duration\", getDuration());\r\n/* 162:162 */ tag.setBoolean(\"Ambient\", getAmbient());\r\n/* 163:163 */ tag.setBoolean(\"ShowParticles\", getShowParticles());\r\n/* 164:164 */ return tag;\r\n/* 165: */ }", "public void resolveIntent(Intent intent) {\n String action = intent.getAction();\n if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)\n || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)) {\n\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage[] msgs;\n if (this.status == Status.bereit_zum_schreiben) {\n\n Tag wTAG = (Tag) intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n if (wTAG != null) {\n this.setStatus(Status.schreibt);\n writeTag(wTAG, this.createNdefMessage());\n\n }\n }\n }\n\n }", "public void onTagLost(RFIDTagLostEvent e) {\n\t\t\t\t\t// Creating string for the tag\n\t\t\t\t\tString tagStr = e.getTag();\n\t\t\t\t\t// If the tag has been lost, print message to the console\n\t\t\t\t\tSystem.out.println(\"Tag lost: \" + tagStr);\n\t\t\t\t}", "public boolean write(BluetoothGattCharacteristic characteristic, byte[] payload, boolean withEOD) {\n Log.v(TAG, String.format(\"write called: device=%s base64=%s value=%s length=%d characteristicUUID=%s\", getMACAddress(), Base64.encodeToString(payload, Base64.DEFAULT), BleDriver.bytesToHex(payload), payload.length, characteristic.getUuid()));\n\n if (!isClientConnected()) {\n Log.e(TAG, \"write error: device not connected\");\n return false;\n }\n\n int minOffset = 0;\n int maxOffset;\n\n // Send data to fit with MTU value\n while (minOffset != payload.length) {\n maxOffset = minOffset + getMtu() - GattServer.ATT_HEADER_SIZE > payload.length ? payload.length : minOffset + getMtu() - GattServer.ATT_HEADER_SIZE;\n final byte[] toWrite = Arrays.copyOfRange(payload, minOffset, maxOffset);\n minOffset = maxOffset;\n Log.v(TAG, String.format(\"write: data chunk: device=%s base64=%s value=%s length=%d characteristicUUID=%s\", getMACAddress(), Base64.encodeToString(toWrite, Base64.DEFAULT), BleDriver.bytesToHex(toWrite), toWrite.length, characteristic.getUuid()));\n if (!internalWrite(characteristic, toWrite)) {\n Log.e(TAG, String.format(\"write payload failed: device=%s\", getMACAddress()));\n return false;\n }\n }\n\n if (withEOD && !internalWrite(characteristic, EOD.getBytes())) {\n Log.e(TAG, String.format(\"write EOD failed: device=%s\", getMACAddress()));\n return false;\n }\n return true;\n }", "void onCloseBleComplete();", "@Override\n\tpublic void saveTag(Tag newTag) throws Exception {\n\n\t}", "private void checkNfcEnabled()\r\n {\r\n if (!mNfcAdapter.isEnabled())\r\n {\r\n Toast.makeText(this, \"Aby wysyłać, włącz NFC\", Toast.LENGTH_LONG).show();\r\n if(!mNfcAdapter.isNdefPushEnabled())\r\n Toast.makeText(this, \"Aby wysyłać, włącz Android Beam\", Toast.LENGTH_LONG).show();\r\n else\r\n sendNdefMessage();\r\n }\r\n else\r\n {\r\n if (!mNfcAdapter.isNdefPushEnabled())\r\n Toast.makeText(this, \"Aby wysyłać, włącz Android Beam\", Toast.LENGTH_LONG).show();\r\n else\r\n sendNdefMessage();\r\n }\r\n }", "public void onReadShortEnd(ICPU cpu, int addr) {\n\t}", "@Override\n\t\t\t\t\tpublic void onError(Platform arg0, int arg1, Throwable arg2) {\n\t\t\t\t\t\tLog.i(\"tag\", \"\"+arg2);\n\t\t\t\t\t}", "void processIntent(Intent intent) {\n\t\tParcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n\t\t// only one message sent during the beam\n\t\tNdefMessage msg = (NdefMessage) rawMsgs[0];\n\t\ttry {\n\t\t\tDaoSession dbSession = HostageApplication.getInstances().getDaoSession();\n\t\t\tDAOHelper daoHelper = new DAOHelper(dbSession,this);\n\t\t\t//HostageDBOpenHelper dbh = new HostageDBOpenHelper(this);\n\n\t\t\tArrayList<NetworkRecord> remoteNetworkInformation = (ArrayList<NetworkRecord>) deserialize(msg.getRecords()[0].getPayload());\n\t\t\tHashMap<String, Long> devices_remote = (HashMap<String, Long>) deserialize(msg.getRecords()[1].getPayload());\n\t\t\tHashMap<String, Long> devices_local = daoHelper.getSyncDeviceDAO().getSyncDeviceHashMap();\n\t\t\tArrayList<SyncInfoRecord> syncInfo = (ArrayList<SyncInfoRecord>) deserialize(msg.getRecords()[2].getPayload());\n\t\t\t\n\t\t\tlong tracing_timestamp = 0;\n\t\t\tif(devices_local.containsKey(TracingSyncService.REMOTE_DEVICE))\n\t\t\t\ttracing_timestamp = devices_local.get(TracingSyncService.REMOTE_DEVICE);\n\t\t\t\t\n\t\t\tfor(Iterator<String> i = devices_remote.keySet().iterator(); i.hasNext(); ){\n\t\t\t\tString key = i.next();\n\t\t\t\tif((devices_local.containsKey(key) && devices_local.get(key) >= devices_remote.get(key)) \n\t\t\t\t || (tracing_timestamp > devices_remote.get(key))){\n\t\t\t\t\ti.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor ( Iterator<SyncInfoRecord> i = syncInfo.iterator(); i.hasNext(); ){\n\t\t\t\tSyncInfoRecord info = i.next();\n\t\t\t\tif(!devices_remote.containsKey(info.getDeviceID())){\n\t\t\t\t\ti.remove();\n\t\t\t\t}\t\t\t\t \n\t\t\t}\t\n\t\t\t\n\t\t\tdaoHelper.getSyncDeviceDAO().updateSyncDevices(devices_remote);\n\t\t\tdaoHelper.getSyncInfoRecordDAO().updateSyncInfo(syncInfo);\n\t\t\tdaoHelper.getNetworkRecordDAO().updateNetworkInformation(remoteNetworkInformation);\n\t\t\tmHandler.obtainMessage(MESSAGE_RECEIVED).sendToTarget();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onScannedBleDeviceAdded(BluetoothDevice device) {\n Log.d(TAG, \"onScannedBleDeviceAdded enter\");\n// Message msg = mHandler.obtainMessage();\n// msg.what = SCAN_DEVICE_ADD_FLAG;\n// msg.obj = device;\n// mHandler.sendMessage(msg);\n updateScanDialog(SCAN_DEVICE_ADD_FLAG, device);\n }", "public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }", "@Override\n public void onClick(View arg0) {\n byte[]bb= new byte[]{(byte)1,2,3};\n String sendstr = \"group1:\"+seekbartime1 + \",\" + seekbaramp1 +\"\\r\\n\";\n Boolean boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group2:\"+seekbartime2 + \",\" + seekbaramp2 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group3:\"+seekbartime3 + \",\" + seekbaramp3 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n sendstr = \"group4:\"+seekbartime4 + \",\" + seekbaramp4 +\"\\r\\n\";\n boolean1 = mBluetoothLeService.write(mNotifyCharacteristic,sendstr);\n\n\n\n SeekBaramp_1.setProgress(0);\n SeekBartime_01.setProgress(0);\n\n\n SeekBaramp_2.setProgress(0);\n SeekBartime_02.setProgress(0);\n\n SeekBaramp_3.setProgress(0);\n SeekBartime_03.setProgress(0);\n\n SeekBaramp_4.setProgress(0);\n SeekBartime_04.setProgress(0);\n\n Log.e(\"a\", \"发送UUID\"+mNotifyCharacteristic.getUuid().toString()+\"是否发送成功::\"+\"\");\n }", "public void setTag(String tag);", "public void setTag( String tag )\n {\n this.tag = tag;\n }", "public void onWriteShortBegin(ICPU cpu, int addr) {\n\t}", "public interface IUHFService {\n\n public static final int REGION_CHINA_840_845 = 0;\n public static final int REGION_CHINA_920_925 = 1;\n public static final int REGION_CHINA_902_928 = 2;\n public static final int REGION_EURO_865_868 = 3;\n public static final int RESERVED_A = 0;\n public static final int EPC_A = 1;\n public static final int TID_A = 2;\n public static final int USER_A = 3;\n public static final int FAST_MODE = 0;\n public static final int SMART_MODE = 1;\n public static final int LOW_POWER_MODE = 2;\n public static final int USER_MODE = 3;\n public static final String SERIALPORT = \"/dev/ttyMT2\";\n public static final String POWERCTL = \"/sys/class/misc/mtgpio/pin\";\n\n\n //默认参数初始化模块\n public int OpenDev();\n\n //释放模块\n public void CloseDev();\n\n //开始盘点\n public void inventory_start();\n\n // Handler用于处理返回的盘点数据\n public void inventory_start(Handler hd);\n\n public void setListener(Listener listener);\n\n public interface Listener {\n void update(Tag_Data var1);\n }\n //新盘点方法,Listener回调\n public void newInventoryStart();\n\n public void newInventoryStop();\n\n\n //设置密码\n public int set_Password(int which, String cur_pass, String new_pass);\n //停止盘点\n public int inventory_stop();\n\n /**\n * 从标签 area 区的 addr 位置(以 word 计算)读取 count 个值(以 byte 计算)\n * passwd 是访问密码,如果区域没被锁就给 0 值。\n *\n * @param area\n * @param addr\n * @param count\n * @param passwd\n * @return\n */\n public byte[] read_area(int area, int addr, int count, String passwd);\n public String read_area(int area, String str_addr\n , String str_count, String str_passwd);\n\n\n //把 content 中的数据写到标签 area 区中 addr(以 word 计算)开始的位 置。\n public int write_area(int area, int addr, String passwd, byte[] content);\n public int write_area(int area, String addr, String pwd, String count, String content);\n\n\n //选中要进行操作的 epc 标签\n public int select_card(int bank,byte[] epc,boolean mFlag);\n public int select_card(int bank,String epc,boolean mFlag);\n\n\n //设置天线功率\n public int set_antenna_power(int power);\n\n //读取当前天线功率值\n public int get_antenna_power();\n\n //设置频率区域\n public int set_freq_region(int region);\n\n public int get_freq_region();\n\n //设置盘点的handler\n public void reg_handler(Handler hd);\n\n\n public INV_TIME get_inventory_time();\n public int set_inventory_time(int work_t, int rest_t);\n public int MakeSetValid();\n public int setlock(int type, int area, int passwd);\n public int get_inventory_mode();\n public int set_inventory_mode(int m);\n //拿到最近一次详细内部错误信息\n public String GetLastDetailError();\n\n public int SetInvMode(int invm, int addr, int length);\n public int GetInvMode(int type);\n}", "private void setHasTag(int value) {\n \n hasTag_ = value;\n }", "public boolean addTag(Tag tag){\n return addTagUC.addTag(mCurrentAccount, tag);\n }", "@Test\n public void testTagNotifications() throws Exception {\n TaggingDeviceManagerImpl tagManager = getTagManager();\n\n // Set up the listeners and record the expected notification\n IDeviceTagListener listener1 = EasyMock.createNiceMock(IDeviceTagListener.class);\n IDeviceTagListener listener2 = EasyMock.createNiceMock(IDeviceTagListener.class);\n listener1.tagAdded(tag2);\n listener2.tagAdded(tag2);\n replay(listener1, listener2);\n\n // Now try it for real\n tagManager.addListener(listener1);\n tagManager.addListener(listener2);\n\n // Update a new tag\n tagManager.addTag(tag2);\n tagManager.mapTagToHost(tag2, tag1Mapping.getMac(), null, null, null);\n\n verify(listener1);\n verify(listener2);\n\n reset(listener1);\n listener1.tagDeleted(tag2);\n replay(listener1);\n\n // Delete a tag\n tagManager.unmapTagToHost(tag2,\n tag1Mapping.getMac(),\n null,\n null,\n null);\n tagManager.deleteTag(tag2);\n\n verify(listener1);\n }", "@Override\r\n\tprotected void processInWifiEvent(InWifiEvent arg0) {\n\t\t\r\n\t}", "public void setTag(String tag) {\r\n this.tag = tag;\r\n }", "protected void handleStart(HtmlDocument.Tag tag) {\n if (!tag.isSelfTerminating()) {\n // Add to the stack of tags needing closing tag\n mSeenTags.push(new TagWrapper(tag, mBuilder.length()));\n }\n }", "private void checkOffsetOrImageTag(ExifTag tag) {\n // Some invalid formattd image contains tag with 0 size.\n if (tag.getComponentCount() == 0) {\n return;\n }\n short tid = tag.getTagId();\n int ifd = tag.getIfd();\n if (tid == TAG_EXIF_IFD && checkAllowed(ifd, ExifInterface.TAG_EXIF_IFD)) {\n if (isIfdRequested(IfdId.TYPE_IFD_EXIF)\n || isIfdRequested(IfdId.TYPE_IFD_INTEROPERABILITY)) {\n registerIfd(IfdId.TYPE_IFD_EXIF, tag.getValueAt(0));\n }\n } else if (tid == TAG_GPS_IFD && checkAllowed(ifd, ExifInterface.TAG_GPS_IFD)) {\n if (isIfdRequested(IfdId.TYPE_IFD_GPS)) {\n registerIfd(IfdId.TYPE_IFD_GPS, tag.getValueAt(0));\n }\n } else if (tid == TAG_INTEROPERABILITY_IFD\n && checkAllowed(ifd, ExifInterface.TAG_INTEROPERABILITY_IFD)) {\n if (isIfdRequested(IfdId.TYPE_IFD_INTEROPERABILITY)) {\n registerIfd(IfdId.TYPE_IFD_INTEROPERABILITY, tag.getValueAt(0));\n }\n } else if (tid == TAG_JPEG_INTERCHANGE_FORMAT\n && checkAllowed(ifd, ExifInterface.TAG_JPEG_INTERCHANGE_FORMAT)) {\n if (isThumbnailRequested()) {\n registerCompressedImage(tag.getValueAt(0));\n }\n } else if (tid == TAG_JPEG_INTERCHANGE_FORMAT_LENGTH\n && checkAllowed(ifd, ExifInterface.TAG_JPEG_INTERCHANGE_FORMAT_LENGTH)) {\n if (isThumbnailRequested()) {\n mJpegSizeTag = tag;\n }\n } else if (tid == TAG_STRIP_OFFSETS && checkAllowed(ifd, ExifInterface.TAG_STRIP_OFFSETS)) {\n if (isThumbnailRequested()) {\n if (tag.hasValue()) {\n for (int i = 0; i < tag.getComponentCount(); i++) {\n if (tag.getDataType() == ExifTag.TYPE_UNSIGNED_SHORT) {\n registerUncompressedStrip(i, tag.getValueAt(i));\n } else {\n registerUncompressedStrip(i, tag.getValueAt(i));\n }\n }\n } else {\n mCorrespondingEvent.put(tag.getOffset(), new ExifTagEvent(tag, false));\n }\n }\n } else if (tid == TAG_STRIP_BYTE_COUNTS\n && checkAllowed(ifd, ExifInterface.TAG_STRIP_BYTE_COUNTS)\n && isThumbnailRequested() && tag.hasValue()) {\n mStripSizeTag = tag;\n }\n }", "void processTag(XMLNode tag) throws Exception {\n if(tag.type()== XMLNode.Type.TAG){\n state.traceTagBegin(tag.getTag()==null?\"process\":tag.getTag(),null);\n tagstk[tagstkptr++] = tag.getTag();\n \n dataloader.beginTag(tagstk, tagstkptr, tag.getTag(), tag.getAttribs());\n if(tag.getTags()!= null) for(XMLNode nextTag : tag.getTags()){\n processTag(nextTag);\n }\n ((LoadDatamapData)dataloader).endTag(tagstk, tagstkptr, tag, tag.getBody(), tag.getAttribs());\n \n tag.clearRef();\n \n tagstkptr--;\n tagstk[tagstkptr]= null;\n state.traceTagEnd();\n }\n }", "protected abstract void handleWriteCompleted() throws IOException, BadAttributeException;", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n openNfc = 0;\n }", "public void writeToNet(NBTTagCompound tag, boolean self)\n\t{\n\t}", "public void setTag(String tag) {\n this.tag = tag;\n }", "public void setTag(String tag) {\n this.tag = tag;\n }", "@Override\n\t\tprotected void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {\n\t\t\tfinal byte[] buffer = mOutgoingBuffer;\n\t\t\tif (mBufferOffset == buffer.length) {\n\t\t\t\ttry {\n\t\t\t\t\tmCallbacks.onDataSent(new String(buffer, \"UTF-8\"));\n\t\t\t\t} catch (final UnsupportedEncodingException e) {\n\t\t\t\t\t// do nothing\n\t\t\t\t}\n\t\t\t\tmOutgoingBuffer = null;\n\t\t\t} else { // Otherwise...\n\t\t\t\tfinal int length = Math.min(buffer.length - mBufferOffset, MAX_PACKET_SIZE);\n\t\t\t\tfinal byte[] data = new byte[length]; // We send at most 20 bytes\n\t\t\t\tSystem.arraycopy(buffer, mBufferOffset, data, 0, length);\n\t\t\t\tmBufferOffset += length;\n\t\t\t\tmWriteCharacteristic.setValue(data);\n\t\t\t\twriteCharacteristic(mWriteCharacteristic);\n\t\t\t}\n\t\t}", "static void openTag(String name, boolean endTag) {\n openMinorTag(name);\n if (endTag)\n closeTag(false);\n }", "@Override\n public void onDataWrite(String deviceName, String data)\n {\n if(mTruconnectHandler.getLastWritePacket().contentEquals(data))\n {\n mTruconnectCallbacks.onDataWritten(data);\n\n String nextPacket = mTruconnectHandler.getNextWriteDataPacket();\n if(!nextPacket.contentEquals(\"\"))\n {\n mBLEHandler.writeData(deviceName, nextPacket);\n }\n }\n else\n {\n mTruconnectCallbacks.onError(TruconnectErrorCode.WRITE_FAILED);\n mTruconnectHandler.onError();\n }\n }", "public void i2cTransaction(int deviceAddress, byte[]writeBuf,\n int writeOffset, int writeLen, byte[] readBuf, int readOffset,\n int readLen);", "public void writeTagged (DataOutputStream outStream)\r\n throws IOException\r\n {\r\n outStream.writeByte (_tag);\r\n write (outStream);\r\n }", "@Override\n public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {\n advance();\n enableNextSensor(gatt);\n }", "private void onRequestData(int tag) {\n \ttry {\n \t data = request.request();\n \t} catch(MatjiException e) {\n \t lastOccuredException = e;\n \t}\n }", "private void writeCapSenseNotification(boolean value) {\n BLEService.mBluetoothGatt.setCharacteristicNotification(mCapsenseCharacteristic, value);\n byte[] byteVal = new byte[1];\n if (value) {\n byteVal[0] = 1;\n } else {\n byteVal[0] = 0;\n }\n Log.i(TAG, \"CapSense Notification \" + value);\n mCapsenseNotification.setValue(byteVal);\n BLEService.mBluetoothGatt.writeDescriptor(mCapsenseNotification);\n }", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public void testNFC(){\n if(mNfcAdapter.isEnabled() && mNfcAdapter != null){\n Log.i(\"test\",\"NFC is Enabled\");\n }\n else{\n Log.i(\"test\",\"NFC is Disabled, Enable NFC from Settings Screen\");\n finish();\n }\n }", "public void writeToServer(NBTTagCompound tag)\n\t{\n\t}", "public long readTag(){\n if (!checkOpen()){\r\n return 0;\r\n }\r\n // arrays will hold return values from various calls to reader\r\n byte[] pLen = new byte[1];\r\n byte[] pTAG = new byte[1];\r\n byte[] pSN = new byte[10];\r\n byte[] pNumTagFound = new byte[1];\r\n short tag = cardReader.select(handle,pTAG, pLen, pSN);\r\n if (tag < 0 ){\r\n message = \"No card found\";\r\n System.err.println(message);\r\n return 0;\r\n }\r\n System.out.println(\"Tagtype:\"+pTAG[0] + \" SN[0]:\" + Integer.toHexString(pSN[0]) + \" return= \" + tag);\r\n long serial = 0;\r\n for(int i=0;i<pLen[0];i++) {\r\n // shift and bitwise-OR the bytes into one 64-bits integer\r\n serial = (serial << 8 ); // shift left 8 bits\r\n serial = serial | (pSN[i] & 0xFF); // bitwise OR byte into int\r\n }\r\n System.out.printf(\" serial = %d hex: %X\",serial, serial);\r\n message = \"String read\";\r\n // test card read/write+login functions; only with new cards\r\n //writeString(\"Hello RFID card\");\r\n //System.err.println(readString());\r\n return (int)serial;\r\n }", "@Override\n\tpublic int update(Tags tag) {\n\t\treturn 0;\n\t}", "@Override\n\tprotected String openTag(String tag) {\n\t\t// store position of parser for openening tag only if\n\t\t// it the first openened, e.g. <b>text<b>text2</b> will draw\n\t\t// text and text2 in bold weight\n\t\tif (!tags.containsKey(tag)) {\n\t\t\ttags.put(tag, Integer.valueOf(clearedText.length()));\n\t\t}\n\t\treturn \"\";\n\t}", "private void insertEventRecord(Device device, \n long fixtime, int statusCode, Geozone geozone,\n GeoPoint geoPoint, \n long gpioInput,\n double speedKPH, double heading, \n double altitude,\n double odomKM)\n {\n\n /* create event */\n EventData evdb = createEventRecord(device, fixtime, statusCode, geoPoint, gpioInput, speedKPH, heading, altitude, odomKM);\n\n /* insert event */\n // this will display an error if it was unable to store the event\n Print.logInfo(\"Event : [0x\" + StringTools.toHexString(statusCode,16) + \"] \" + StatusCodes.GetDescription(statusCode,null));\n if (device != null) {\n device.insertEventData(evdb); \n }\n this.eventTotalCount++;\n\n }", "private static void notifyListenersOfTag(Tag tag){\n ArrayList<TagListener> listenersOfTag = tagListeners.get(tag);\n if(listenersOfTag!=null){\n for(TagListener listener : listenersOfTag){\n try {\n listener.onTagUpdated(tag);\n }catch (NullPointerException e){\n e.printStackTrace();\n }\n }\n }\n }", "void updateTags();", "void applyTags(ReaderContext context, Operation operation, Method method);", "public boolean alreadyAnnotated(String indeces, String tag, String word) {\n if (taggedItems.containsKey(indeces)) {\n if (!tag.equals(taggedItems.get(indeces)))\n System.out.println(\"Conflict : \" + word + \" Old tag: \" + taggedItems.get(indeces) + \" New tag: \" + tag);\n return true;\n } else\n return false;\n }", "@Override\n\tprotected void writeEntityToNBT(NBTTagCompound tag) {\n\t\ttag.setByte(\"Fuse\", (byte)this.fuse);\n\t\ttag.setByte(\"Variant\", (byte)this.variant);\n\t}", "public void write(long address, short[] buffer, int length, int moteID) {\n\t\tmote.write(address, buffer, length, moteID);\t\n\t}", "public void addTag(String tag) {\n this.tag = tag;\n }", "protected void onComponentTag(final ComponentTag tag)\n\t{\n\t}", "public int send (byte []buffer, int offset, int length, int iTag, short sPriority)\n throws IOException,IllegalArgumentException,IndexOutOfBoundsException\n {\n if (offset < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if (length < 0) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n if ((offset + length) > buffer.length) {\n throw new java.lang.IndexOutOfBoundsException();\n }\n return sendTagPrio(buffer, offset, length, iTag, sPriority);\n }", "protected void tag(ResourceMapping mapping, CVSTag tag) throws CoreException {\n tag(new ResourceMapping[] { mapping }, tag, false);\n assertTagged(mapping, tag);\n }", "void setTag(java.lang.String tag);", "public boolean addTag(String tag, Writer writer) throws IOException {\n\n if(tag == null || tags.contains(tag)){\n return false;\n }\n\n Matcher matcher = invalidPattern.matcher(tag);\n if (matcher.find() || tag.equals(\"\")) {\n throw new InvalidTagException(\"Invalid tag format\");\n }\n tags.add(tag);\n writer.append(tag).append(\"\\n\");\n return true;\n }", "void tag1() { }", "abstract protected void onReceivedSequence(String sequence);", "private void saveTag(Tag tag){\n Long num = tagMap.get(tag);\n tagMap.put(tag, (num == null) ? (long)1 : num+1);\n }" ]
[ "0.6763869", "0.6640294", "0.66231066", "0.64405507", "0.6396191", "0.6354265", "0.6104571", "0.6045186", "0.5976769", "0.5835992", "0.5790317", "0.57864535", "0.5640121", "0.5603344", "0.5555391", "0.5526842", "0.5488021", "0.5460332", "0.54406375", "0.54072785", "0.5403915", "0.535085", "0.52872354", "0.5240874", "0.5225902", "0.5207665", "0.5193427", "0.51528394", "0.5118866", "0.50949454", "0.50561935", "0.50396466", "0.5021389", "0.5015672", "0.49701402", "0.49681774", "0.49346736", "0.48974654", "0.48844287", "0.488145", "0.48684576", "0.48620716", "0.4860385", "0.485649", "0.4854259", "0.48432583", "0.48391998", "0.4822147", "0.4802438", "0.47936946", "0.47879082", "0.47757414", "0.47734684", "0.47728956", "0.4766314", "0.4765264", "0.47594607", "0.47563565", "0.47440857", "0.47433016", "0.47428536", "0.47344497", "0.4732305", "0.4730103", "0.47175258", "0.4715086", "0.4704525", "0.4703214", "0.47010916", "0.47010916", "0.4701086", "0.46972603", "0.46734193", "0.46619478", "0.4653306", "0.46371436", "0.4634402", "0.46291894", "0.46093696", "0.460549", "0.46017337", "0.46005368", "0.459869", "0.45978117", "0.4586331", "0.45834896", "0.45834243", "0.45794958", "0.45760542", "0.4575216", "0.45734325", "0.45733017", "0.45507684", "0.45505401", "0.45451444", "0.45451424", "0.45386338", "0.4531189", "0.45301056", "0.45299262" ]
0.63156265
6
Record to launch Play Store if app is not installed
public static boolean writeTag(Context context, Tag tag, String data) { NdefRecord appRecord = NdefRecord.createApplicationRecord(context.getPackageName()); // Record with actual data we care about NdefRecord relayRecord = new NdefRecord(NdefRecord.TNF_MIME_MEDIA, new String("application/" + context.getPackageName()).getBytes(Charset.forName("US-ASCII")), null, data.getBytes()); // Complete NDEF message with both records NdefMessage message = new NdefMessage(new NdefRecord[] {relayRecord, appRecord}); try { // If the tag is already formatted, just write the message to it Ndef ndef = Ndef.get(tag); if(ndef != null) { ndef.connect(); // Make sure the tag is writable if(!ndef.isWritable()) { Toast.makeText(context, "Error: nfcReadOnlyError", Toast.LENGTH_LONG).show(); return false; } // Check if there's enough space on the tag for the message int size = message.toByteArray().length; if(ndef.getMaxSize() < size) { Toast.makeText(context, "Error: nfcBadSpaceError", Toast.LENGTH_LONG).show(); return false; } try { // Write the data to the tag ndef.writeNdefMessage(message); //DialogUtils.displayInfoDialog(context, R.string.nfcWrittenTitle, R.string.nfcWritten); return true; } catch (TagLostException tle) { Toast.makeText(context, "Error: nfcTagLostError", Toast.LENGTH_LONG).show(); return false; } catch (IOException ioe) { Toast.makeText(context, "Error: nfcFormattingError", Toast.LENGTH_LONG).show(); return false; } catch (FormatException fe) { Toast.makeText(context, "Error: nfcFormattingError", Toast.LENGTH_LONG).show(); return false; } // If the tag is not formatted, format it with the message } else { NdefFormatable format = NdefFormatable.get(tag); if(format != null) { try { format.connect(); format.format(message); //DialogUtils.displayInfoDialog(context, R.string.nfcWrittenTitle, R.string.nfcWritten); return true; } catch (TagLostException tle) { Toast.makeText(context, "Error: nfcTagLostError", Toast.LENGTH_LONG).show(); return false; } catch (IOException ioe) { Toast.makeText(context, "Error: nfcFormattingError", Toast.LENGTH_LONG).show(); return false; } catch (FormatException fe) { Toast.makeText(context, "Error: nfcFormattingError", Toast.LENGTH_LONG).show(); return false; } } else { Toast.makeText(context, "Error: nfcNoNdefErrorTitle", Toast.LENGTH_LONG).show(); return false; } } } catch(Exception e) { Toast.makeText(context, "Error: nfcUnknownErrorTitle", Toast.LENGTH_LONG).show(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void handleApplicationLaunch(Context context) {\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);\n\n boolean doNotRemindAgain = sharedPrefs.getBoolean(PREF_KEY_DO_NOT_REMIND_AGAIN, false);\n if (!doNotRemindAgain) {\n // Increment launch counter\n long launchCount = sharedPrefs.getLong(PREF_KEY_LAUNCH_COUNT, 0);\n launchCount++;\n Log.d(TAG, \"The application has been launched \" + launchCount + \" times.\");\n sharedPrefs.edit().putLong(PREF_KEY_LAUNCH_COUNT, launchCount).commit();\n\n // Get date of first launch\n long now = System.currentTimeMillis();\n Long dateOfFirstLaunch = sharedPrefs.getLong(PREF_KEY_DATE_OF_FIRST_LAUNCH, now);\n if (dateOfFirstLaunch == now) {\n sharedPrefs.edit().putLong(PREF_KEY_DATE_OF_FIRST_LAUNCH, now).commit();\n }\n long numberOfDaysSinceFirstLaunch = convertMillisToDays(now - dateOfFirstLaunch);\n Log.d(TAG, \"It has been \" + numberOfDaysSinceFirstLaunch + \" days since first launch\");\n\n if (numberOfDaysSinceFirstLaunch >= NUMBER_OF_DAYS_TIL_PROMPT &&\n launchCount >= NUMBER_OF_LAUNCHES_TIL_PROMPT) {\n // It's time. Ask the user to rate the app.\n showRateApplicationDialog(context, sharedPrefs);\n }\n }\n }", "@Test(priority = 2)\n public void verifyAppIsInstalled(){\n Assert.assertTrue(driver.isAppInstalled(bundleId), \"The App is not installed\");\n Log.info(\"App is installed\");\n }", "private void dontShowThisAgain() {\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"isFirstAppLaunch\", false);\n editor.apply();\n }", "public static void openPlayStoreEntry()\n\t{\n\t\tApp.getInstance().startActivity(new Intent(Intent.ACTION_VIEW)\n\t\t\t\t.setData(Uri.parse(\"market://details?id=\" + General.PKG_MESSENGERAPI+\"&referrer=utm_source%3D\"+App.getInstance().getPackageName()+\"%26utm_medium%3DAPIMethod%26utm_campaign%3DAPICampaign\"))\n\t\t\t\t.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));\n\t}", "boolean isAppInstalled(String bundleId);", "private void requestAutoStartPermission() {\n if (Build.MANUFACTURER.equals(\"OPPO\")) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startup.FakeActivity\")));\n } catch (Exception e) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startupapp.StartupAppListActivity\")));\n } catch (Exception e1) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startupmanager.StartupAppListActivity\")));\n } catch (Exception e2) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safe\", \"com.coloros.safe.permission.startup.StartupAppListActivity\")));\n } catch (Exception e3) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safe\", \"com.coloros.safe.permission.startupapp.StartupAppListActivity\")));\n } catch (Exception e4) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safe\", \"com.coloros.safe.permission.startupmanager.StartupAppListActivity\")));\n } catch (Exception e5) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startsettings\")));\n } catch (Exception e6) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startupapp.startupmanager\")));\n } catch (Exception e7) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startupmanager.startupActivity\")));\n } catch (Exception e8) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startup.startupapp.startupmanager\")));\n } catch (Exception e9) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.privacypermissionsentry.PermissionTopActivity.Startupmanager\")));\n } catch (Exception e10) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.privacypermissionsentry.PermissionTopActivity\")));\n } catch (Exception e11) {\n try {\n startActivity(new Intent().setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.FakeActivity\")));\n } catch (Exception e12) {\n e12.printStackTrace();\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public void rateApp() {\n try {\n Intent rateIntent = rateIntentForUrl(\"market://details\");\n startActivity(rateIntent);\n }\n catch (ActivityNotFoundException e) {\n Intent rateIntent = rateIntentForUrl(\"https://play.google.com/store/apps/details\");\n startActivity(rateIntent);\n }\n }", "public void onInstalledApplication(final boolean show) {\n\t\trunOnUiThread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tif(loadingDialog!=null){\n\t\t\t\t\tloadingDialog.dismiss();\n\t\t\t\t}\n\t\t\t\tif (show) {\n\t\t\t\t\tuninstall.setEnabled(true);\n\t\t\t\t\tinstall.setEnabled(false);\n\t\t\t\t\tchangeStatus(getString(R.string.installed_application_found));\n\t\t\t\t} else {\n\t\t\t\t\tuninstall.setEnabled(false);\n\t\t\t\t\tinstall.setEnabled(true);\n\t\t\t\t\tchangeStatus(getString(R.string.no_installed_application));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void checkQPairIsInstalled() {\n try {\n if (!isPackageInstalled(getString(R.string.qpair_package))) {\n createDialog(getString(R.string.dialog_qpair_not_installed), getString(R.string.dialog_qpair_not_installed_description), new OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n openPlayStore(getString(R.string.qpair_package));\n }\n });\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onReceive(Context context, final Intent intent) {\n if (!isServiceRunning(ShakeService.class)) {\n Intent serviceIntent = new Intent(getContext(), ShakeService.class);\n getContext().startService(serviceIntent);\n }\n\n if (isQPairOn() && isConnected() && getPreference(KEY_SYNC_APPS, true)) {\n switch (intent.getAction()) {\n // Whether the action is that a new App is installed\n case \"android.intent.action.PACKAGE_ADDED\":\n // Get the packageName\n final String[] dataPackageAdded = intent.getData().toString().split(\":\");\n // If the app doesn't turns to be installed by Play Store return\n if (getContext().getPackageManager().getInstallerPackageName(dataPackageAdded[1]) == null\n || !getContext().getPackageManager().getInstallerPackageName(dataPackageAdded[1]).equals(getContext().getString(R.string.play_package))) {\n createToast(getContext().getString(R.string.toast_app_not_supported));\n setPreference(KEY_LAST_APP, dataPackageAdded[1]);\n break;\n }\n // If we have not recently played with this app ask if he wants to install on Peer\n if (!dataPackageAdded[1].equals(getPreference(KEY_LAST_APP, null))) {\n setPreference(KEY_LAST_APP, dataPackageAdded[1]);\n createDialog(getContext().getString(R.string.dialog_install), getContext().getString(R.string.dialog_install_description), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n getContext().bindService(getQpairIntent(),\n new sendBroadcastConnection(ACTION_OPEN_PLAY_STORE, dataPackageAdded[1]), 0);\n }\n }, null);\n }\n break;\n // Whether the action is that an old App is uninstalled\n case \"android.intent.action.PACKAGE_REMOVED\":\n // Get the packageName\n final String[] dataPackageRemoved = intent.getData().toString().split(\":\");\n // If we have not recently played with this app ask if he wants to uninstall on Peer\n if (!dataPackageRemoved[1].equals(getPreference(KEY_LAST_APP, null))) {\n setPreference(KEY_LAST_APP, dataPackageRemoved[1]);\n createDialog(getContext().getString(R.string.dialog_uninstall), getContext().getString(R.string.dialog_uninstall_description), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n getContext().bindService(getQpairIntent(),\n new sendBroadcastConnection(ACTION_UNINSTALL_PACKAGE, dataPackageRemoved[1]), 0);\n }\n }, null);\n }\n break;\n // Default case, this should never happen.\n default:\n createToast(getContext().getString(R.string.toast_intent) + \" \" + intent.getAction());\n break;\n }\n }\n }", "public static void trackLaunch(final Context ctx) {\n log.debug(\"ref-extras: Tracking launcher.trackLaunch\");\n\n if (singleton == null) {\n singleton = new TrackingWorker(ctx);\n }\n\n long lastLaunch = pullValueLong(ITrackingConstants.CONF_LAST_LAUNCH_INTERNAL, context);\n\n if (lastLaunch == 0) {\n boolean isGooglePlayServicesAvailable = (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) == ConnectionResult.SUCCESS);\n if (isGooglePlayServicesAvailable) {\n new GetAsyncGoogleAdvertiserId(singleton, context).execute();\n\n mReferrerClient = newBuilder(ctx).build();\n mReferrerClient.startConnection(new InstallReferrerStateListener() {\n @Override\n public void onInstallReferrerSetupFinished(int responseCode) {\n switch (responseCode) {\n case InstallReferrerClient.InstallReferrerResponse.OK:\n try {\n ReferrerDetails response = mReferrerClient.getInstallReferrer();\n String installReferrer = response.getInstallReferrer();\n long referrerClickTimestampSeconds = response.getReferrerClickTimestampSeconds();\n long installBeginTimestampSeconds = response.getInstallBeginTimestampSeconds();\n\n DataContainer.getInstance().storeValueString(DataKeys.PLAY_INSTALL_REFERRER, installReferrer, ctx);\n DataContainer.getInstance().storeValueLong(DataKeys.PLAY_REF_CLICK_TIMESTAMP, referrerClickTimestampSeconds, ctx);\n DataContainer.getInstance().storeValueLong(DataKeys.PLAY_INSTALL_BEGIN_TIMESTAMP, installBeginTimestampSeconds, ctx);\n } catch (RemoteException e) {\n log.error(e.getMessage(), e);\n }\n break;\n case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED:\n break;\n case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE:\n break;\n }\n DataContainer.getInstance().storeValueBoolean(DataKeys.PLAY_REFERRER_FETCHED, true, ctx);\n singleton.onTaskCompletionResult();\n }\n\n @Override\n public void onInstallReferrerServiceDisconnected() {\n DataContainer.getInstance().storeValueBoolean(DataKeys.PLAY_REFERRER_FETCHED, true, ctx);\n singleton.onTaskCompletionResult();\n }\n });\n } else {\n trackLaunchHandler(lastLaunch);\n }\n } else {\n trackLaunchHandler(lastLaunch);\n }\n }", "public boolean isNotFirstInstallation(){\n return mSharedPreferences.contains(SharedPrefContract.PREF_INSTALLED) && mSharedPreferences.getBoolean(SharedPrefContract.PREF_INSTALLED, false);\n }", "@Override\n public void success() {\n XSPSystem.getInstance().installApp(PjjApplication.App_Path + appName);\n }", "protected void onFirstTimeLaunched() {\n }", "public interface Appstore {\n\n /**\n * If Appstore cannot determine version of published app on it's server\n */\n public static final int PACKAGE_VERSION_UNDEFINED = -1;\n\n /**\n * Returns true only if actual installer for specified app\n */\n boolean isPackageInstaller(String packageName);\n \n /**\n * Tells whether in-app billing is ready to work with specified app\n * For OpenStore app: if any in-app item for this app published in store\n */\n boolean isBillingAvailable(String packageName);\n\n /**\n * Returns <code>android:versionCode</code> package. If there are several builds for one package\n * versionCode of the most approptiate to be used \n */\n int getPackageVersion(String packageName);\n \n String getAppstoreName();\n\n Intent getProductPageIntent(String packageName);\n\n Intent getRateItPageIntent(String packageName);\n\n Intent getSameDeveloperPageIntent(String packageName);\n\n boolean areOutsideLinksAllowed();\n\n /**\n * @return helper to interact with store billing service and perform purchases\n */\n AppstoreInAppBillingService getInAppBillingService();\n\n\n}", "public void launchAppInGooglePlay(final Context context) {\n\t\tUri uri = Uri.parse(\"market://details?id=\" + context.getPackageName()); // Opens app page in Google Play // Good for allowing users to rate app\n\t\tIntent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);\n\t\ttry {\n\t\t\tcontext.startActivity(myAppLinkToMarket); // This must be an Activity Context, NOT Application Context.\n\t\t} catch (ActivityNotFoundException e) {\n\t\t\tToast.makeText(mContext, \"Unable to find app\", Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "public void setFirstInstall(){\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(SharedPrefContract.PREF_INSTALLED, true);\n editor.apply();\n }", "private void openApp(String packageName) {\n final String launcherPackage = packageName;\n assertThat(launcherPackage, notNullValue());\n mDevice.wait(Until.hasObject(By.pkg(launcherPackage).depth(0)), LAUNCH_TIMEOUT);\n\n // Launcher app\n Context context = InstrumentationRegistry.getContext();\n final Intent intent = context.getPackageManager()\n .getLaunchIntentForPackage(packageName);\n\n // Clear out any previous instances\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n context.startActivity(intent);\n\n // Wait for the app to appear\n mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), LAUNCH_TIMEOUT);\n }", "private void checkFirstRun() {\r\n\r\n\t final String PREFS_NAME = \"MyPrefsFile\";\r\n\t final String PREF_VERSION_CODE_KEY = \"version_code\";\r\n\t final int DOESNT_EXIST = -1;\r\n\r\n\r\n\t // Get current version code\r\n\t int currentVersionCode = 0;\r\n\t try {\r\n\t currentVersionCode = getPackageManager().getPackageInfo(getPackageName(), 0).versionCode;\r\n\t } catch (android.content.pm.PackageManager.NameNotFoundException e) {\r\n\t // handle exception\r\n\t Log.e(\"PackageMissing\", \"Package Not Found\");\r\n\t return;\r\n\t }\r\n\r\n\t // Get saved version code\r\n\t SharedPreferences prefs = getSharedPreferences(PREFS_NAME, MODE_PRIVATE);\r\n\t int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\r\n\r\n\t // Check for first run or upgrade\r\n\t if (currentVersionCode == savedVersionCode) {\r\n\t \t// This is just a normal run\r\n\t return;\r\n\t } else {\r\n\t \tstartActivity(new Intent(DisplayBin.this, DisplayBinHelp.class));\r\n\t }\r\n\t // Update the shared preferences with the current version code\r\n\t prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\r\n\t}", "@Override\n public void onClick(View v) {\n try {\n launchActivity(MGERRIT, MGERRIT_MAIN_ENTRY);\n } catch (ActivityNotFoundException failToMarket) {\n launchUrl(MGERRIT_PLAYSTORE);\n }\n\n }", "public synchronized void notifyForegroundApp(String packageName) {\n if (packageName != null) {\n if (!packageName.equals(this.mLatestPgName)) {\n NeuronAppRecord app = (NeuronAppRecord) this.mAppUsageMap.get(packageName);\n if (app == null) {\n app = new NeuronAppRecord(packageName);\n app.dataList.pushToHead(new AppDataNode());\n this.mAppUsageMap.put(packageName, app);\n }\n long currentTime = System.currentTimeMillis();\n app.lastestResumeTime.pushToHead(Long.valueOf(currentTime));\n AppDataNode latestAppData = (AppDataNode) app.dataList.getLatest();\n Long latestPause = (Long) app.latestPauseTime.getLatest();\n if (!(latestAppData == null || latestPause == null || latestPause.longValue() <= 0)) {\n long bgTime = currentTime - latestPause.longValue();\n if (bgTime < latestAppData.minBgTime) {\n latestAppData.minBgTime = bgTime;\n }\n if (bgTime > latestAppData.maxBgTime) {\n latestAppData.maxBgTime = bgTime;\n }\n latestAppData.totalBgTime += bgTime;\n }\n NeuronAppRecord removedApp = (NeuronAppRecord) this.mAppUsageList.pushToHead(app);\n if (removedApp != null) {\n this.mAppUsageMap.remove(removedApp.packageName);\n }\n pauseLatestApp(currentTime);\n this.mLatestAppUsage = app;\n this.mLatestPgName = packageName;\n }\n }\n }", "@Override\n public void onClick(View v) {\n AppUtil.silentInstall(filename);\n }", "@Override\n\tpublic void installedSucess(String packageName) {\n\t\t\n\t}", "public boolean isNonMarketAppsAllowed() {\n\t\treturn Settings.Secure.getInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS, 0) > 0;\r\n\t}", "@Override\n public void onClick(View view) {\n List<AndroidAppProcess> runningAppProcessInfo = AndroidProcesses.getRunningAppProcesses();\n\n for (int i = 0; i < runningAppProcessInfo.size(); i++) {\n Log.i(\"MainActivity\", runningAppProcessInfo.get(i).getPackageName());\n // Check for AnkuLua\n if(runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro2\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.pro\") ||\n runningAppProcessInfo.get(i).getPackageName().equals(\"com.appautomatic.ankulua.trial\")){\n\n // AnkuLua package process has been detected! Perma ban account for abusing Terms & Conditions\n alert();\n return;\n }\n }\n Toast.makeText(MainActivity.this,\"Not Found\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View view)\n {\n Uri uri = Uri.parse(direccionAplicacion);\n Intent linkMyApp = new Intent(Intent.ACTION_VIEW, uri);\n\n try {\n startActivity(linkMyApp);\n } catch (ActivityNotFoundException e) {\n Toast.makeText(getContext(), \"No tienes Google Play instalado!, no se lo digas a nadie y corre a instalarlo.\"\n + \"'\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onInstalled() {\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Test\n public void trackingEnabled_updateAppConfigMissing() throws Exception {\n configureTrackingEnabled();\n configureReliabilityConfigSettingsOk();\n configureUpdateAppPackageNameMissing();\n configureDataAppPackageOk(DATA_APP_PACKAGE_NAME);\n\n try {\n // Initialize the tracker.\n mPackageTracker.start();\n fail();\n } catch (RuntimeException expected) {}\n\n mFakeIntentHelper.assertNotInitialized();\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n }", "@Override\n public void onProviderInstallFailed(int errorCode, Intent intent) {\n }", "public void onUpgradeAppButtonClicked(View arg0) {\n\t\tLog.d(TAG,\n\t\t\t\t\"Upgrade button clicked; launching purchase flow for upgrade.\");\n\t\tsetWaitScreen(true);\n\n\t\t/*\n\t\t * TODO: for security, generate your payload here for verification. See\n\t\t * the comments on verifyDeveloperPayload() for more info. Since this is\n\t\t * a SAMPLE, we just use an empty string, but on a production app you\n\t\t * should carefully generate this.\n\t\t */\n//\t\tString payload = \"\";\n\n//\t\tmHelper.launchPurchaseFlow(GameRenderer.mStart, SKU_10000, RC_REQUEST,\n//\t\t\t\tmPurchaseFinishedListener, payload);\n\t}", "void checkForApps();", "void onIssuerWithoutDefaultInstallment();", "private boolean checkFirstRun(Context context) {\n\n final String PREFS_NAME = \"com.zgsoft.prefs\";\n final String PREF_VERSION_CODE_KEY = \"version_code\";\n final int DOESNT_EXIST = -1;\n // String packageName=null;\n\n\n // Get current version code\n int currentVersionCode = 0;\n try {\n PackageInfo packageInfo =context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode =packageInfo.versionCode;\n //packageName = packageInfo.packageName;\n\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n // handle exception\n e.printStackTrace();\n return false;\n }\n\n\n // Get saved version code\n SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, android.content.Context.MODE_PRIVATE);\n int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n\n // Check for first run or upgrade\n if (currentVersionCode == savedVersionCode) {\n\n // This is just a normal run\n return false;\n\n } else {\n // Update the shared preferences with the current version code\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\n return true;\n }\n\n }", "@Override\n\tprotected void onRestart() {\n\t\tsuper.onRestart();\n\t\tMCommerceApp mApp = (MCommerceApp) getApplication();\n\t\tif (mApp.isContinueShopping() == true) {\n\t\t\tmApp.setContinueShopping(false);\n\t\t\tfinish();\n\t\t}\n\n\t}", "private boolean appInstalledOrNot(String uri) {\n PackageManager pm = getActivity().getPackageManager();\n boolean app_installed;\n try {\n pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);\n app_installed = true;\n } catch (PackageManager.NameNotFoundException e) {\n app_installed = false;\n }\n return app_installed;\n }", "void onDefaultInstallmentSet();", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setAction(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS);\n Uri uri = Uri.fromParts(\"package\",\n BuildConfig.APPLICATION_ID, null);\n intent.setData(uri);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "public void launchEmail(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_MAIN); \n \tsendIntent.addCategory(Intent.CATEGORY_APP_EMAIL);\n\n if (sendIntent.resolveActivity(pacman) != null) {\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Email App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "private void checkAppKeySetup() {\n if (APP_KEY.startsWith(\"CHANGE\") ||\n APP_SECRET.startsWith(\"CHANGE\")) {\n showToast(\"You must apply for an app key and secret from developers.dropbox.com, and add them to the DBRoulette ap before trying it.\");\n finish();\n return;\n }\n\n // Check if the app has set up its manifest properly.\n Intent testIntent = new Intent(Intent.ACTION_VIEW);\n String scheme = \"db-\" + APP_KEY;\n String uri = scheme + \"://\" + AuthActivity.AUTH_VERSION + \"/test\";\n testIntent.setData(Uri.parse(uri));\n PackageManager pm = getPackageManager();\n if (0 == pm.queryIntentActivities(testIntent, 0).size()) {\n showToast(\"URL scheme in your app's \" +\n \"manifest is not set up correctly. You should have a \" +\n \"com.dropbox.client2.android.AuthActivity with the \" +\n \"scheme: \" + scheme);\n finish();\n }\n }", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n Log.d(TAG, \"From: \" + remoteMessage.getFrom());\n\n // Check if message contains a data payload.\n if (remoteMessage.getData().size() > 0) {\n Log.d(TAG, \"Message data payload: \" + remoteMessage.getData());\n /*final Map<String, String> data = remoteMessage.getData();\n\n try {\n Log.d(TAG, \"app_package: \" + data.get(\"app_package\"));\n// openAppOnGooglePlayStoreApp(getApplicationContext(), data.get(\"app_package\"));\n *//*if (data.get(\"app_package\") != null) *//*{\n\n\n _packageName = data.get(\"app_package\");\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n public void run() {\n AlertDialog alertDialog = new AlertDialog.Builder(mContext)\n .setTitle(data.get(\"title\"))\n .setMessage(data.get(\"message\"))\n .setPositiveButton(\"Open Google Play Store!\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n })\n .setIcon(R.drawable.ic_launcher)\n .create();\n\n alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);\n alertDialog.show();\n }\n });\n\n *//*AlertDialog.Builder builder = new AlertDialog.Builder(getApplicationContext());\n builder.setTitle(remoteMessage.getNotification().getTitle());\n builder.setMessage(remoteMessage.getNotification().getBody());\n builder.setPositiveButton(\"Open Google Play Store!\",new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();*//*\n\n// openAppOnGooglePlayStoreApp(getApplicationContext(), _packageName);\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception: \"+e);\n }*/\n }\n\n // Check if message contains a notification payload.\n if (remoteMessage.getNotification() != null) {\n Log.d(TAG, \"Message Notification Body: \" + remoteMessage.getNotification().getBody());\n }\n\n // Also if you intend on generating your own notifications as a result of a received FCM\n // message, here is where that should be initiated. See sendNotification method below.\n }", "public void installApk(String filename) {\n // systemLib.Installapk(filename);\n // if (isregister == false) {\n // isregister = true;\n // IntentFilter intentFilter = new IntentFilter(MyIntent.ACTION_INSTALL_BEGIN);\n // intentFilter.addAction(MyIntent.ACTION_INSTALL_END);\n // mContext.registerReceiver(mReceiver, intentFilter);\n // }\n // //start the service\n // Intent startservice = new Intent();\n // startservice.setAction(MyIntent.ACTION_PROXY);\n // startservice.putExtra(MyIntent.EXTRA_OPERATION, MyIntent.EXTRA_INSTALL);\n // startservice.putExtra(MyIntent.EXTRA_ARG1, filename);\n // Log.print(\"startservice intent is \" + startservice);\n // mContext.startService(startservice);\n }", "public void launchPhone(){\n\t\tIntent sendIntent = new Intent(Intent.ACTION_DIAL);\n \tsendIntent.setData(Uri.parse(\"tel:\"));\n \t\n \tfinal ResolveInfo mInfo = pacman.resolveActivity(sendIntent, 0);\n \tString s = pacman.getApplicationLabel(mInfo.activityInfo.applicationInfo).toString();\n \t\n \tif (s != null && s.length() > 2) {\n startActivity(sendIntent);\n return;\n } else {\n \tToast.makeText(context, \"No Phone Call App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "private boolean arEngineAbilityCheck() {\n boolean isInstallArEngineApk = AREnginesApk.isAREngineApkReady(this);\n if (!isInstallArEngineApk && isRemindInstall) {\n Toast.makeText(this, \"Please agree to install.\", Toast.LENGTH_LONG).show();\n finish();\n }\n Log.d(TAG, \"Is Install AR Engine Apk: \" + isInstallArEngineApk);\n if (!isInstallArEngineApk) {\n startActivity(new Intent(this, ConnectAppMarketActivity.class));\n isRemindInstall = true;\n }\n return AREnginesApk.isAREngineApkReady(this);\n }", "public boolean isLaunched();", "@Test\n public void trackingEnabled_updateAppNotPrivileged() throws Exception {\n configureTrackingEnabled();\n configureReliabilityConfigSettingsOk();\n configureUpdateAppPackageNotPrivileged(UPDATE_APP_PACKAGE_NAME);\n configureDataAppPackageOk(DATA_APP_PACKAGE_NAME);\n\n try {\n // Initialize the tracker.\n mPackageTracker.start();\n fail();\n } catch (RuntimeException expected) {}\n\n mFakeIntentHelper.assertNotInitialized();\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n }", "void launchApp();", "@Override\n public boolean isInstall(Context context) {\n\n return true;\n }", "private void addAutoStartupswitch() {\n\n try {\n Intent intent = new Intent();\n String manufacturer = android.os.Build.MANUFACTURER .toLowerCase();\n\n switch (manufacturer){\n case \"xiaomi\":\n intent.setComponent(new ComponentName(\"com.miui.securitycenter\", \"com.miui.permcenter.autostart.AutoStartManagementActivity\"));\n break;\n case \"oppo\":\n intent.setComponent(new ComponentName(\"com.coloros.safecenter\", \"com.coloros.safecenter.permission.startup.StartupAppListActivity\"));\n break;\n case \"vivo\":\n intent.setComponent(new ComponentName(\"com.vivo.permissionmanager\", \"com.vivo.permissionmanager.activity.BgStartUpManagerActivity\"));\n break;\n case \"Letv\":\n intent.setComponent(new ComponentName(\"com.letv.android.letvsafe\", \"com.letv.android.letvsafe.AutobootManageActivity\"));\n break;\n case \"Honor\":\n intent.setComponent(new ComponentName(\"com.huawei.systemmanager\", \"com.huawei.systemmanager.optimize.process.ProtectActivity\"));\n break;\n case \"oneplus\":\n intent.setComponent(new ComponentName(\"com.oneplus.security\", \"com.oneplus.security.chainlaunch.view.ChainLaunchAppListAct‌​ivity\"));\n break;\n }\n\n List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);\n if (list.size() > 0) {\n startActivity(intent);\n }\n } catch (Exception e) {\n Log.e(\"exceptionAutostarti2pd\" , String.valueOf(e));\n }\n\n }", "private void onProviderInstallerNotAvailable() {\n Toast.makeText(this, \"Unable to update your security settings and SSL security may not avialble\", Toast.LENGTH_SHORT).show();\n }", "public void retry(){\n _activity.finish();\n Intent i = _activity.getBaseContext().getPackageManager()\n .getLaunchIntentForPackage(_activity.getBaseContext().getPackageName());\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n _activity.startActivity(i);\n }", "@Override\n protected void onPostResume() {\n super.onPostResume();\n if (mRetryProviderInstall) {\n // We can now safely retry installation.\n ProviderInstaller.installIfNeededAsync(this, this);\n }\n mRetryProviderInstall = false;\n }", "private void addApp(RifidiApp app) {\n\t\tsynchronized (apps) {\n\t\t\tif (apps.containsValue(app))\n\t\t\t\treturn;\n\t\t\tint appID = serviceCounter++;\n\t\t\tapps.put(appID, app);\n\t\t\tstartApp(appID, true);\n\t\t}\n\t}", "private void checkFirstLaunch(){\n SharedPreferencesEditor editor = new SharedPreferencesEditor(this);\n boolean test = editor.GetBoolean(\"firstLaunch\");\n if(test){\n loadData();\n return;\n }\n startActivity(new Intent(MainActivity.this, FirstLaunch.class));\n editor.WriteBoolean(\"firstLaunch\", true);\n }", "static public boolean isLaunched()\n\t{\n\t\tif (g_currentLaunch == null)\n\t\t return false;\n\t\telse\n\t\t return true;\n\t}", "public boolean showPIPUpgrade(){\n if (!Preferences.hasUpgrade && Tools.deviceSupportsPIPMode(this)) {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\n //dont show on first launch of app\n boolean firstLaunch = prefs.getBoolean(\"firstlaunch\",true);\n if (!firstLaunch) {\n\n //Only show popup max once per day\n\n int dayLastShown = prefs.getInt(\"lastdayshownupgrade\", -1);\n\n Calendar calendar = Calendar.getInstance();\n int day = calendar.get(Calendar.DAY_OF_MONTH);\n\n if (dayLastShown!= day){\n prefs.edit().putInt(\"lastdayshownupgrade\", day).apply();\n Intent pipUpgradeIntent = new Intent(VideoPlayActivity.this,PictureInPictureUpgradeActivity.class);\n startActivityForResult(pipUpgradeIntent, REQUEST_UPGRADE);\n return true;\n }\n\n }else {\n prefs.edit().putBoolean(\"firstlaunch\",false).apply();\n }\n }\n return false;\n\n }", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet();\n } else {\n initialize();\n startMIDlet();\n }\n midletPaused = false;\n }", "@Override\n\tpublic void addNewInstallApps(List<ApplicationInfo> apps, String packageName) {\n ALog.d(\"Enter\");\n\n\n\t\tfor(ApplicationInfo info : apps){\n\t\t\tint[] pageInfo = LauncherProviderHelper.findVacantCell4AppAdd(getBaseContext());\n\t\t\tif (pageInfo == null) {\n\t\t\t\tALog.d(\"can't find cell for new app\");\n\t\t\t\tcontinue;\n\t\t\t} \n\t\t\tint page = pageInfo[0];\n\t\t\tint cellX = pageInfo[1];\n\t\t\tint cellY = pageInfo[2];\n\t\t\tinfo.screen = page;\n\t\t\tinfo.cellX = cellX;\n\t\t\tinfo.cellY = cellY;\n\t\t\tinfo.spanX = 1;\n\t\t\tinfo.spanY = 1;\n\t\t\tBaseLauncherModel.addOrMoveItemInDatabase(getBaseContext(), info, LauncherSettings.Favorites.CONTAINER_DESKTOP);\n\t\t\t\n\t\t\tView view = mWorkspace.createViewByItemInfo(info);\n\t\t\tif (view == null)\n\t\t\t\treturn;\n\t\t\t((Workspace)mWorkspace).addInScreen(view, page, cellX, cellY, 1, 1);\n\t\t\t\n\t\t\t//FIXME 在编辑模式下可能会有刷新的问题\n\t\t}\n ALog.d(\"Exit\");\n\t}", "private void restartApp() {\n Intent intent = new Intent(application, Launcher.class);\n int mPendingIntentId = 123;\n PendingIntent mPendingIntent =\n PendingIntent.getActivity(\n application,\n mPendingIntentId,\n intent,\n PendingIntent.FLAG_CANCEL_CURRENT\n );\n AlarmManager mgr = (AlarmManager) application.getSystemService(Context.ALARM_SERVICE);\n if (mgr != null) {\n mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, mPendingIntent);\n }\n System.exit(0);\n }", "@Override\n public void validCertificateAvailable() {\n dismissDialog();\n if(android.os.Build.VERSION.SDK_INT < 14) {\n String targetURL = KeyTalkCommunicationManager.getUrl();\n if(targetURL == null || targetURL.isEmpty() || TextUtils.isEmpty(targetURL)) {\n showDialog(AppConstants.DIALOG_EMPTY_TARGET_URL);\n } else {\n Intent intent = new Intent(this, WebViewActivity.class);\n startActivity(intent);\n ServiceListingActivity.this.finish();\n }\n } else if(android.os.Build.VERSION.SDK_INT >= 14 && android.os.Build.VERSION.SDK_INT <= 18) {\n boolean isNative = PreferenceManager.getBoolean(ServiceListingActivity.this, Keys.PreferenceKeys.DEVICE_TYPE);\n if(isNative) {\n boolean isAddedToNativeKeyStore = KeyTalkCommunicationManager.getNativeKeyStoreInstallationStatus(ServiceListingActivity.this, KeyTalkCommunicationManager.getUrl());\n if(isAddedToNativeKeyStore) {\n String targetURL = KeyTalkCommunicationManager.getUrl();\n if(targetURL == null || targetURL.isEmpty() || TextUtils.isEmpty(targetURL)) {\n showDialog(AppConstants.DIALOG_EMPTY_TARGET_URL);\n } else {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse( KeyTalkCommunicationManager.getUrl()));\n startActivity(browserIntent);\n }\n } else {\n showDialog(AppConstants.DIALOG_REINSTALL_CERTIFICATE);\n }\n } else {\n String targetURL = KeyTalkCommunicationManager.getUrl();\n if(targetURL == null || targetURL.isEmpty() || TextUtils.isEmpty(targetURL)) {\n showDialog(AppConstants.DIALOG_EMPTY_TARGET_URL);\n } else {\n Intent intent = new Intent(this, WebViewActivity.class);\n startActivity(intent);\n ServiceListingActivity.this.finish();\n }\n }\n } else {\n boolean isAddedToNativeKeyStore = KeyTalkCommunicationManager.getNativeKeyStoreInstallationStatus(ServiceListingActivity.this, KeyTalkCommunicationManager.getUrl());\n if(isAddedToNativeKeyStore) {\n String targetURL = KeyTalkCommunicationManager.getUrl();\n if(targetURL == null || targetURL.isEmpty() || TextUtils.isEmpty(targetURL)) {\n showDialog(AppConstants.DIALOG_EMPTY_TARGET_URL);\n } else {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(KeyTalkCommunicationManager.getUrl()));\n startActivity(browserIntent);\n }\n } else {\n showDialog(AppConstants.DIALOG_REINSTALL_CERTIFICATE);\n }\n }\n }", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet ();\n } else {\n initialize ();\n startMIDlet ();\n }\n midletPaused = false;\n }", "public void startApp() {\n if (midletPaused) {\n resumeMIDlet ();\n } else {\n initialize ();\n startMIDlet ();\n }\n midletPaused = false;\n }", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\n\t\tIntent intent = new Intent();\n\t\tintent.setClass(MainActivity.this, LockScreenActivity.class);\n\t\tintent.putExtra(LockScreenActivity.BlockedPackageName, \"proauth_settings\");\n\t\tstartActivityForResult(intent, 0);\n\t\t\n\t\treturn true;\n\t}", "void installApp(String appPath);", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch(item.getItemId()){\n case R.id.share: // share with friends through social media\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"\");\n sharingIntent.putExtra(Intent.EXTRA_TEXT, \"\");\n try {\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n break;\n } catch(ActivityNotFoundException e){Toast.makeText(MainActivity.this, \"There are no social media apps installed.\", Toast.LENGTH_SHORT).show();\n }\n\n case R.id.rate: // rate the app\n Uri uri = Uri.parse(\"market://details?id=\" + getPackageName());\n Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);\n // To count with Play market backstack, After pressing back button,\n // to taken back to our application, we need to add following flags to intent.\n goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY |\n Intent.FLAG_ACTIVITY_NEW_DOCUMENT |\n Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n try {\n startActivity(goToMarket);\n break;\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"http://play.google.com/store/apps/details?id=\" + getPackageName())));\n }\n\n case R.id.about:\n Intent newIntent = new Intent(MainActivity.this, about.class );\n startActivity(newIntent);\n }\n return super.onOptionsItemSelected(item);\n }", "public boolean isFirstRun() {\n int currentVersionCode = 0;\n boolean firstRun = false;\n\n try {\n currentVersionCode = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode;\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n // handle exception\n //e.printStackTrace();\n }\n\n // Get saved version code\n SharedPreferences prefs = context.getSharedPreferences(VERSION_PREFS_NAME, Context.MODE_PRIVATE);\n int savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n\n // Check for first run or upgrade\n if (currentVersionCode == savedVersionCode) {\n\n // This is just a normal run\n\n } else if (savedVersionCode == DOESNT_EXIST) {\n\n // TODO This is a new install (or the user cleared the shared preferences)\n firstRun = true;\n\n } else if (currentVersionCode > savedVersionCode) {\n\n // TODO This is an upgrade\n\n }\n\n // Update the shared preferences with the current version code\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, currentVersionCode).commit();\n\n return firstRun;\n\n }", "@Override\n public void cancelPreloadRecentApps() {\n if (!isUserSetup()) {\n return;\n }\n\n mImpl.cancelPreloadRecentApps();\n }", "@Test\n public void trackingEnabled_dataAppConfigMissing() throws Exception {\n configureTrackingEnabled();\n configureReliabilityConfigSettingsOk();\n configureUpdateAppPackageOk(UPDATE_APP_PACKAGE_NAME);\n configureDataAppPackageNameMissing();\n\n try {\n // Initialize the tracker.\n mPackageTracker.start();\n fail();\n } catch (RuntimeException expected) {}\n\n mFakeIntentHelper.assertNotInitialized();\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n }", "private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "private void startStep1() {\n\n //Check whether this user has installed Google play service which is being used by Location updates.\n if (isGooglePlayServicesAvailable()) {\n\n //Passing null to indicate that it is executing for the first time.\n startStep2(null);\n\n } else {\n Toast.makeText(getApplicationContext(), R.string.no_google_playservice_available, Toast.LENGTH_LONG).show();\n }\n }", "public void finishedLaunching (UIApplication app, NSDictionary options) {\n if (options == null) {\n return;\n }\n\n UILocalNotification notif = (UILocalNotification)\n options.ObjectForKey(UIApplication.get_LaunchOptionsLocalNotificationKey());\n if (notif == null) {\n return;\n }\n\n dispatch(IOSTypes.toMap(notif.get_UserInfo()), false);\n Log.log.debug(\"Got local notification on launch\", \"message\", notif.get_AlertBody());\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tappInstall(DeviceNum1);\r\n\r\n\t\t\t}", "public static void askDownloadExistingApps(final Activity activity, final ArrayList<ObjectDetail> missing) {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity);\n\n alertDialogBuilder.setTitle(activity.getString(R.string.restore_apps_title));\n\n String msg = String.format(activity.getString(R.string.restore_apps_msg), missing.size());\n alertDialogBuilder\n .setMessage(msg)\n .setCancelable(false)\n .setNeutralButton(activity.getResources().getString(R.string.restore_disable_syncs), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //disable syncs\n Utils.setSyncDisabled(activity, true);\n //TODO - note this leaves apps in a weird state. Will show apps as local to device but no option\n //to install, etc...\n }\n })\n .setNegativeButton(activity.getResources().getString(R.string.restore_no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n GCESync.startActionUpdateLocal(activity, null, null);\n }\n })\n .setPositiveButton(activity.getResources().getString(R.string.restore_yes), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n //build the install list...\n ArrayList<String> apklist = new ArrayList<String>();\n for (int i=0; i < missing.size(); i++) {\n apklist.add(missing.get(i).pkg);\n }\n //let the updates go through\n GCESync.startActionUpdateLocal(activity, null, null);\n //and kick off the batch install\n confirmBatchOperation(activity, apklist, true);\n }\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "@Test\n public void trackingEnabled_dataAppNotPrivileged() throws Exception {\n configureTrackingEnabled();\n configureReliabilityConfigSettingsOk();\n configureUpdateAppPackageOk(UPDATE_APP_PACKAGE_NAME);\n configureDataAppPackageNotPrivileged(DATA_APP_PACKAGE_NAME);\n\n try {\n // Initialize the tracker.\n mPackageTracker.start();\n fail();\n } catch (RuntimeException expected) {}\n\n mFakeIntentHelper.assertNotInitialized();\n\n // Check reliability triggering state.\n mFakeIntentHelper.assertReliabilityTriggerNotScheduled();\n }", "@Override\n public void preloadRecentApps() {\n if (!isUserSetup()) {\n return;\n }\n\n mImpl.preloadRecentApps();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Uri uri = Uri.parse(\"market://details?id=\" + getPackageName());\n Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);\n // To count with Play market backstack, After pressing back button,\n // to taken back to our application, we need to add following flags to intent.\n goToMarket.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY |\n Intent.FLAG_ACTIVITY_NEW_DOCUMENT |\n Intent.FLAG_ACTIVITY_MULTIPLE_TASK);\n try {\n startActivity(goToMarket);\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW,\n Uri.parse(\"http://play.google.com/store/apps/details?id=\" + getPackageName())));\n }\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public void startNewActivity(Context context, String packageName) {\n Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName);\n if (intent != null) {\n /* We found the activity now start the activity */\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n } else {\n /* Bring user to the market or let them choose an app? */\n intent = new Intent(Intent.ACTION_VIEW);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.setData(Uri.parse(\"market://details?id=\" + packageName));\n context.startActivity(intent);\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tcom.facebook.AppEventsLogger.activateApp(HomeActivity.this, \"312401348947190\");\n\t}", "private void openGooglePlay(String appId) throws android.content.ActivityNotFoundException {\n Context context = this.cordova.getActivity().getApplicationContext();\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=\" + appId));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }", "public void pauseApp() {\n\t\t//do nothing\n\t}", "public static String getPlayStoreAppUrl(Context context) {\n String url = \"https://play.google.com/store/apps/details?id=\";\n url += context.getPackageName();\n\n return url;\n }", "public void startApp()\r\n\t{\n\t}", "@Override\n public void exitFirstRun() {\n FirstRunStatus.setFirstRunSkippedByPolicy(true);\n\n launchPendingIntentAndFinish();\n }", "public static void startLauncherActivity(Context context) {\n PackageManager packageManager = context.getPackageManager();\n Intent intent = packageManager.getLaunchIntentForPackage(context\n .getPackageName());\n ComponentName componentName = intent.getComponent();\n Intent mainIntent = Intent.makeRestartActivityTask(componentName);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mainIntent.putExtra(\"isSessionExpired\", true);\n context.startActivity(mainIntent);\n }", "public void startApp() {\n\n\t\tboolean isContinue = true;\n\t\tint i = 0;\n\t\twhile (isContinue) {\n\t\t\ti = displayAppMenu();\n\t\t\texecuteMenuItem(i);\n\n\t\t\tif (i == APP_EXIT) {\n\t\t\t\tisContinue = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private void loadApps() {\n\n Intent i = new Intent(Intent.ACTION_MAIN, null);\n i.addCategory(Intent.CATEGORY_LAUNCHER);\n\n switch ((int) tabId) {\n case 1:\n // Tab 1 is a special tab and includes all except for the ones in other tabs\n // Retrieve all installed apps on the device\n List<ResolveInfo> availableActivities = mPacMan.queryIntentActivities(i, 0);\n\n // And only add those that are not in the database\n for (int j = 0; j < availableActivities.size(); j++) {\n ResolveInfo ri = availableActivities.get(j);\n\n if (sqlHelper.containsApp(ri.activityInfo.name))\n continue;\n\n AppDetail app = new AppDetail();\n app.label = ri.loadLabel(mPacMan);\n app.packageName = ri.activityInfo.packageName;\n app.activityName = ri.activityInfo.name;\n\n\n // Load the icon later in an async task.\n app.icon = null;\n\n appsList.add(app);\n }\n break;\n default:\n // All other tabs just query the apps from the database\n List<AppTable> apps = sqlHelper.getAppsForTab(tabId);\n for (AppTable app : apps) {\n\n boolean success = addAppToList(app);\n // If the app could not be added then it was probably uninstalled,\n // so we have to remove it from the database\n if (!success) {\n Log.d(\"DB\", \"Removing app \" + app.getPackageName() + \" from db\");\n sqlHelper.removeAppFromTab(app);\n }\n }\n\n // show the empty category notice if this tab is empty\n if (apps.size() == 0) {\n showEmptyCategoryNotice();\n }\n }\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t System.out.println(\"URL APP----------:\" + getIntent().getExtras().getString(\"urlApp\"));\r\n\t\tinstallApp(getIntent().getExtras().getString(\"urlApp\"));\r\n\t}", "private void startIntentSafely(Intent openMovieReview) {\n if (openMovieReview.resolveActivity(getPackageManager()) != null) {\n startActivity(openMovieReview);\n } else {\n Toast.makeText(this, R.string.error_no_appropriate_app, Toast.LENGTH_SHORT).show();\n }\n }", "void onPackageInstalled(@NonNull AndroidPackage pkg, int previousAppId,\n @NonNull PackageInstalledParams params,\n @UserIdInt int userId);", "@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "private void loadApps() {\n\t\tIntent mainIntent = new Intent(Intent.ACTION_MAIN, null);\n\t\tmainIntent.addCategory(Intent.CATEGORY_LAUNCHER);\n\t\tmApps = getPackageManager().queryIntentActivities(mainIntent, 0);\n\t}", "public void onClick(DialogInterface dialog, int id) {\n Constants.APP_UPDATE_FLAG = true;\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=in.org.klp.ilpkonnect\"));\n startActivity(intent);\n }", "private void handleNewPackageInstalled(String packageName, int userHandle) {\n if (!getUserData(userHandle).mAppsSuspended) {\n return;\n }\n final String[] packagesToSuspend = { packageName };\n // Check if package is considered not suspendable?\n if (mInjector.getPackageManager(userHandle)\n .getUnsuspendablePackages(packagesToSuspend).length != 0) {\n Slogf.i(LOG_TAG, \"Newly installed package is unsuspendable: \" + packageName);\n return;\n }\n try {\n mIPackageManager.setPackagesSuspendedAsUser(packagesToSuspend, true /*suspend*/,\n null, null, null, PLATFORM_PACKAGE_NAME, userHandle);\n } catch (RemoteException ignored) {\n // shouldn't happen.\n }\n }" ]
[ "0.6281984", "0.61831176", "0.60013574", "0.59572476", "0.59296626", "0.5911021", "0.588933", "0.5876238", "0.5853802", "0.58496684", "0.57938945", "0.5785628", "0.57513344", "0.5701756", "0.57014716", "0.5687743", "0.5682845", "0.56574667", "0.5653368", "0.5634326", "0.562255", "0.55733985", "0.556677", "0.554208", "0.5526794", "0.5521606", "0.5515492", "0.55092216", "0.55092216", "0.549493", "0.549493", "0.549493", "0.549493", "0.54825765", "0.54823506", "0.5442663", "0.54189694", "0.54177415", "0.54167616", "0.5410941", "0.54089445", "0.5398935", "0.5398934", "0.5398934", "0.5394248", "0.53932935", "0.5378664", "0.5358449", "0.5334684", "0.5326959", "0.53268343", "0.53229785", "0.53145885", "0.5299911", "0.52992153", "0.5295237", "0.5275066", "0.52673113", "0.526512", "0.5244743", "0.5229623", "0.5225625", "0.5224207", "0.52224165", "0.5219422", "0.5219041", "0.52175546", "0.52175546", "0.52170616", "0.52132046", "0.52097476", "0.52004224", "0.519251", "0.5192129", "0.51822174", "0.51755524", "0.5173734", "0.5171663", "0.5169982", "0.5154795", "0.5141524", "0.5140856", "0.5138896", "0.51335657", "0.51271087", "0.51263565", "0.51145756", "0.5113115", "0.5106043", "0.51047355", "0.5101502", "0.508449", "0.5075943", "0.50735146", "0.50726765", "0.50726455", "0.5068979", "0.50638837", "0.50593823", "0.5043105", "0.504267" ]
0.0
-1
end of main constructor
public OrchardGame() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Main() {\n\n super();\n }", "private Main ()\n {\n super ();\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public Main() {\n\t\tsuper();\n\t}", "public Main() {\r\n\t}", "public Main() {\n \n \n }", "public Main() {\r\n }", "public Main() {\r\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Main() {}", "public Main() {\n }", "public Main() {\n }", "public Main() {\n }", "private Main() {}", "private Main() {\n }", "public Constructor(){\n\t\t\n\t}", "private void init() {\n\n\n\n }", "public Main() {\n // Required empty public constructor\n }", "public mainData() {\n }", "private void init() {\n\n\t}", "private void init() {\n }", "private void initialize() {\n\t\t\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private Rekenhulp()\n\t{\n\t}", "private TetrisMain() {\r\n //ensure uninstantiability\r\n }", "private TMCourse() {\n\t}", "public void init() {\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "public void init() {\r\n\r\n\t}", "public void init() {}", "public void init() {}", "private void initialize() {\n }", "public void init() {\n \n }", "public ProgramWilmaa()\n\t{\n\t}", "private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}", "private void initialize() {\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() { }", "public void init() { }", "public void init() {\n\t\n\t}", "private AlgorithmTools() {}", "public void init()\n { \t\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void init(){}", "@Override\r\n\tpublic void init() {}", "public void init(){\r\n\t\t\r\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public static void init() {\n\t\t\n\t}", "public FeatureSynthesisMain() {\n super();\n }", "public void init() {\n\t\t \r\n\t\t }", "protected void initialize() {}", "protected void initialize() {}", "public void init() {\n\t\t}", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "public void init()\n {\n }", "@Override\n protected void init() {\n }", "private CommandLine() {\n\t}", "public Main()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n\n prepare();\n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "public EnsembleLettre() {\n\t\t\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "private ThoseMain()\n {\n // Do nothing\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void init(){\n \n }", "public static void main() {\n \n }", "public static void main(String[] args)\r\t{", "public void init() {\n\n }", "public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void init() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n }", "private TetrisMain() {\r\n //prevents instantiation\r\n }", "public static void main(String[] args) {\n\t\tConstructor cn=new Constructor(); \r\n\t\t// Note: no need to create object for constructor\r\n\t\r\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void initialize() {\n\t\t\n\t}" ]
[ "0.7932623", "0.7744706", "0.77209455", "0.76552397", "0.7614706", "0.7496279", "0.74637645", "0.74637645", "0.7418881", "0.73458856", "0.72540945", "0.72540945", "0.7212898", "0.7165506", "0.71231335", "0.7106036", "0.71043116", "0.70944613", "0.70283073", "0.7005191", "0.69704", "0.69570166", "0.69375306", "0.69375306", "0.69375306", "0.69375306", "0.6893979", "0.6875381", "0.6872368", "0.6867283", "0.67923325", "0.67712575", "0.67561173", "0.67561173", "0.67534703", "0.6749359", "0.67231333", "0.67148083", "0.6699192", "0.6697832", "0.6697832", "0.6697832", "0.6684978", "0.6684978", "0.66760534", "0.6663795", "0.66579634", "0.6652616", "0.6652616", "0.6652616", "0.6652616", "0.6652616", "0.6652155", "0.6631023", "0.6627398", "0.6626201", "0.6626201", "0.6626201", "0.66259426", "0.6624483", "0.660375", "0.6601559", "0.6600822", "0.6600822", "0.6598832", "0.6598675", "0.6598675", "0.6596305", "0.65958613", "0.65850383", "0.6584665", "0.6583981", "0.657219", "0.6570943", "0.6560949", "0.65586907", "0.65579045", "0.65579045", "0.65579045", "0.65579045", "0.65571845", "0.655512", "0.655512", "0.655512", "0.6548416", "0.65468746", "0.65468746", "0.65406674", "0.65371054", "0.6534178", "0.65288365", "0.65288365", "0.6527173", "0.6520146", "0.6515546", "0.6505258", "0.64985156", "0.64951444", "0.64879394", "0.6479265", "0.6473996" ]
0.0
-1
Description InputStream is used for direct player input
public void setScan(InputStream inStream){ this.scan = new Scanner (inStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream is) {\n\t}", "public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }", "public InputStream getInputStream();", "public InputStream getInputStream();", "@Override\n\tpublic void loadPlayerData(InputStream arg0)\n\t{\n\n\t}", "@Override\n\tpublic void loadPlayerData(InputStream arg0) {\n\n\t}", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "public InputStream getStream();", "public InputStream getInputStream() throws IOException {\n \t\treturn liveHelpURL.openStream();\r\n \t}", "InputStream mo1151a();", "InputStream getDataStream();", "public abstract InputStream mo131998b();", "@NotNull InputStream openInputStream() throws IOException;", "public abstract InputStream openStream(String str);", "public void xmlInputStream() {\n inputStream = context.getResources().openRawResource(R.raw.flowers_xml);\n //stringInputStream = convertInputStreamToString(inputStream);\n //System.out.println(\"------------ InputStream ------------\\n\" + stringInputStream);\n //------------------------------------------------------------------------------------------\n }", "@Override\n\tpublic void read(InStream inStream) {\n\t}", "protected final InputStream getStream() { return _inputSource; }", "InputStream openStream() throws IOException;", "public abstract SeekInputStream getRawInput();", "public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n attachments = (Map) in.readObject();\n properties = (Map) in.readObject();\n String src = (String) in.readObject();\n if (src != null) {\n content = new StringSource(src);\n }\n securitySubject = (Subject) in.readObject();\n }", "protected abstract InputStream getStream(String resource);", "public InputStream getInputStream() throws IOException;", "public InputStream getInputStream() throws IOException;", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "public void readData(InputStream inStream);", "Stream<In> getInputStream();", "public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "public void processStreamInput() {\n }", "public abstract InputStream getInputStream() throws AccessException;", "@Override\n\tpublic int describe(InputStream contents, IContentDescription description) throws IOException {\n\t\treturn 0;\n\t}", "public InputStream getInputStream() {\n return inputStream;\n }", "public InputStream getInputStream() {\n return inputStream;\n }", "@SuppressWarnings(\"unused\")\r\n private void addReadStream(InputStream asciiStream) {\n\t\taddReadSize(100);\r\n\t}", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "private String readStream(InputStream in) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = in.read();\n while(i != -1) {\n bo.write(i);\n i = in.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "@Override\n public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { in.readByte(); // version\n type = in.readUTF();\n subType = in.readUTF();\n // allow for more data from future version\n int extra = in.readShort();\n if (extra > 0) {\n byte[] extraBytes = new byte[extra];\n in.read(extraBytes, 0, extra);\n }\n }", "private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "public InputStream getInputStream()\r\n\t{\r\n\t\treturn this.inputStream;\r\n\t}", "public void readDescription() throws IOException {\n while (!shouldStop()) {\n String word = next();\n if (word != \"\") {\n // System.out.println(word);\n temps.add(word);\n }\n }\n c = r.read();\n }", "public InputStream getInputStream() {\n return this.inputStream;\n }", "public InputStream getStream() {\n\t\treturn this.in;\n\t}", "IAudio read(InputStream inputStream) throws AudioReaderException, InvalidFormatException;", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "public abstract SoundContainer loadSound( InputStream in ) throws IOException;", "private int readStream(final DataInputStream dis)\n\t\tthrows IOException {\n\t\tif(dis.readInt() > MAX_PROTOCOL_VERSION) {\n\t\t\treturn E_UNSUPPORTED_PROTOCOL_VERSION;\n\t\t}\n\n\t\tint length = dis.readInt();\n\t\tLog.i(\"PhoneLink\", \"Received a \"+length+\" byte parcel\");\n\t\tbyte[] data = new byte[length];\n\t\tint position = 0;\n\t\tdo {\n\t\t\tposition += dis.read(data, position, length-position);\n\t\t} while(position < length);\n\n\t\tParcel parcel = Parcel.obtain();\n\t\tparcel.unmarshall(data, 0, length);\n\t\tparcel.setDataPosition(0);\n\t\tIntent newIntent = (Intent) parcel.readValue(Intent.class.getClassLoader());\n\t\tmIntentHandler.processIntent(newIntent);\n\t\treturn OK;\n\t}", "public InputStream getInputStream() {\n return this.inputStream;\n }", "public BCPGInputStream getInputStream()\n {\n return in;\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "public InputStream getInputStream() throws MorseException {\n\t\treturn null;\r\n\t}", "private void readInput() {\n byte[] byteForStream = new byte[2048];\n mListener.onCarRunning();\n\n String message = \"\";\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n\n message += new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n System.out.println(\"Message is\" + message);\n\n if (message.equals(\"Done\")){\n mListener.onCarNotRunning();\n\n }\n if (message.equals(\"Obstacle\")){\n mListener.onCarNotRunning();\n\n\n }\n if (message.equals(\"Continue\")){\n mListener.onCarRunning();\n\n }\n if(message.contains(\"*\")){\n GPSTracker.getInstance(myContext).setGPSstring(message);\n Log.d(TAG, \"Setting GPSString to \" + message);\n }\n\n\n\n } catch (Exception e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n message = \"\";\n\n }", "@Override\n public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n\n\n }", "public JSONObject read(InputStream uploadedInputStream);", "@Override\n public void readFrom(InputStream in) throws IOException {\n }", "public boolean playGeneric(InputStream stream){\r\n\t\ttry{\r\n\t\t\tplayer.open(stream);\r\n\t\t\tplayer.play();\r\n\t\t\tselectedSource = \"Streaming\";\r\n\t\t\treturn true;\r\n\t\t}catch(Exception e){\r\n\t\t\tSystem.err.println(\"ERROR: BASICPLAYER INTERNAL PLAY CODE HAS FAULTED.\");\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "InputStream convert(InputStream inputStream, String specificationName) throws IOException;", "@Override\n\tpublic void readData(DataInputStream input) throws IOException {\n\t\t\n\t}", "@Override\r\n\tpublic InputStream getInputStream() throws IOException {\n\t\treturn this.s.getInputStream();\r\n\t}", "public InputStream getInputStream() {\n\t\treturn inputStream;\n\t}", "public InputStream getInputStream() {\n\t\treturn inputStream;\n\t}", "public void readExternal( ObjectInput in )\n\t\tthrows IOException, ClassNotFoundException\n\t{\n\t\tid\t\t\t\t\t= (Long)in.readObject();\n\t\ttitle\t\t\t\t= (String)in.readObject();\n\t\tdescription\t\t\t= (String)in.readObject();\n\t\twebPageURL\t\t\t= (String)in.readObject();\n\t\tcreationTime\t\t= (Date)in.readObject();\n\t\tmodificationTime\t= (Date)in.readObject();\n\t\towner\t\t\t\t= (String)in.readObject();\n\t\tisPublic \t\t= in.readBoolean();\n\t\tisActive = in.readBoolean();\n\t\tisActive\t\t\t= true;\n\t\t\n\t\tcategory = (AnnotationCategory)in.readObject();\n\t\tbody\t\t\t\t= (String)in.readObject();\n\t\tresetText(body);\n\t\ttarget\t\t\t\t= (TextRange)in.readObject();\n\t\tauthor\t\t\t\t= (String)in.readObject();\n\t\tannotates\t\t\t= (String)in.readObject();\n\t\tworkPart = WorkUtils.getWorkPartByTag(annotates);\n\t}", "public abstract InputStream stdout();", "@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }", "public String getStream(){\n return this.stream;\n }", "public InputStream getInputStream() {\n\t\treturn fromMonet;\n\t}", "@SuppressWarnings(\"unused\")\r\n private void addReadStream(Reader asciiStream) {\n\t\taddReadSize(100);\r\n\t}", "public MyInputStream(InputStream in) {\n super(in);\n this.in = in;\n }", "public void read(DataInputStream in) throws IOException;", "void loadFromInputStream(InputStream inputStream) throws IOException;", "@Override\r\n\tpublic InputStream getInStream() {\n\t\treturn inStreamServer;\r\n\t}", "public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {\n\t}", "private String readStream(InputStream in) throws IOException {\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n\n StringBuilder sb = new StringBuilder();\n String line;\n\n // Reads every line and stores them in sb.\n while((line = r.readLine()) != null) {\n sb.append(line);\n }\n\n // Closes the input stream.\n in.close();\n\n return sb.toString();\n }", "public InputStream mo7256h(String str, Object obj) {\n throw new UnsupportedOperationException(String.format(\"UIL doesn't support scheme(protocol) by default [%s]. You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))\", new Object[]{str}));\n }", "@Override\r\n\tpublic void read(DataInput in) throws IOException {\n\t\t\r\n\t}", "public String decode(InputStream is)\n throws DataProcessingException, IOException {\n sendRecognition();\n streamAudioSource.setInputStream(is);\n sendData();\n String result = readResult();\n return result;\n }", "InputStream synthesize(String phrase, OutputFormat fmt) throws IOException;", "public String readStream(InputStream in) {\n BufferedReader reader = null;\n StringBuffer data = new StringBuffer(\"\");\n try {\n reader = new BufferedReader(new InputStreamReader(in));\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n data.append(line);\n }\n } catch (IOException e) {\n Log.e(\"Log\", \"IOException\");\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return data.toString();\n }", "public void setIn(InputStream in);", "private void requestLiveStreaming() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n\n targetDos.writeInt(LIVE_STREAMING_COMMAND);\n targetDos.writeUTF(camClient.getCamCode());\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n\n } catch (Exception e) {\n e.printStackTrace();\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }", "@Override\n\tpublic void readExternal(ObjectInput in) throws IOException,\n\t\t\tClassNotFoundException {\n\t}", "private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}", "public void readExternal(ObjectInput in) throws IOException, FileNotFoundException, ClassNotFoundException{\n\t\tSystem.out.println(\"Inside readExternal()\");\n\t\tthis.age = in.readInt();\n\t\tthis.name = (String) in.readObject();\n\t\tthis.address = (String) in.readObject();\n\t\tthis.job = (String) in.readObject();\n\t}", "public void setInputStream(InputStream inputStream)\r\n\t{\r\n\t\tthis.inputStream = inputStream;\r\n\t}", "public void read(final InputStream stream)\r\n throws IOException, DataFormatException {\r\n decoder.read(stream);\r\n }", "public void printStream(InputStream is) {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String line;\r\n try {\r\n while ((line=br.readLine())!=null) {\r\n System.out.println(line);\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"RegisterRequest.printStream: \" + ex);\r\n }\r\n }", "public String readString() {\n byte[] byteForStream = new byte[1024];\n String message = \"\";\n\n mListener.onCarRunning();\n\n\n int bytes;\n\n while (true) {\n try {\n bytes = mInputStream.read(byteForStream);\n message = new String(byteForStream, 0, bytes);\n Log.d(TAG, \" Read from inputstream \" + message);\n\n } catch (IOException e) {\n Log.e(TAG, \" error reading from inputstream \" + e.getMessage());\n break;\n }\n }\n return message;\n }", "public interface IStreamProcessor {\r\n\r\n\t/**\r\n\t * \r\n\t * @return the mime type the stream processor can detect\r\n\t */\r\n\tString getMimeType();\r\n\t\r\n\t/**\r\n\t * This method is used to detect for an array of bytes if this stream processor can handle that data \r\n\t * \r\n\t * @param buffer the input data\r\n\t * @return true if the buffer contains data this stream processor is able to process \r\n\t * @throws NMEAProcessingException\r\n\t */\r\n\tboolean isValidStreamProcessor(int[] buffer) throws RawDataEventException;\r\n\t\r\n\t/**\r\n\t * reads a single byte from an underlying stream or source\r\n\t * \r\n\t * @param c\r\n\t * @param streamProvider\r\n\t * @return false if processing should stop due user termination\r\n\t * @throws NMEAProcessingException\r\n\t */\r\n\tboolean readByte(int c, String streamProvider) throws RawDataEventException ;\r\n\t\r\n\t/**\r\n\t * actively closes the stream\r\n\t * @throws IOException\r\n\t */\r\n\tvoid close() throws IOException;\r\n\r\n\t/**\r\n\t * This may be used to aid misinterpretations in stream processor detection\r\n\t * \r\n\t * @return if the stream processor accepts binary data or ascii data.\r\n\t */\r\n\tboolean isBinary();\r\n}", "public String getStreamContent() {\n return streamContent;\n }", "public InputStream getOptionalData() throws StandardException;", "@Override\n\tpublic void readExternal(ObjectInput in) throws IOException,\n\t\t\tClassNotFoundException {\n\t\t\n\t\tname = (String) in.readObject();\n\t\ti = in.readInt();\n\t\t\n\t}", "public InputStream getInputStream(long position);", "public MediaPropertiesChunk(DataInputStream f) throws Exception {\n\t\tstreamId = f.readShort();\n\t\tmaxBitrate = f.readInt();\n\t\taverageBitrate = f.readInt();\n\t\tmaxDataPacketSize = f.readInt();\n\t\taverageDataPacketSize = f.readInt();\n\t\tstreamStartInMs = f.readInt();\n\t\tprerollInMs = f.readInt();\n\t\tduration = f.readInt();\n//\t\tbyte Size of stream description string\n\t\tstreamDescription = Utils.readString(f, f.read());\n//\t\tbyte Size of stream mime type string\n\t\tmimeType = Utils.readString(f, f.read());\n\t\t\n\t\tint dataLength = (int)f.readInt();\n\t\tbyte [] b = new byte[dataLength];\n\t\tf.readFully(b);\n\t\t\n\t\tswitch(mimeType) {\n\t\t\tcase \"audio/x-pn-realaudio\" :\n\t\t\t\taudioInfo = new AudioInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"logical-fileinfo\":\n\t\t\t\tlogicStreamInfo = new LogicalStreamInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"audio/X-MP3-draft-00\": /*dataLength must equals 0. In this case we do not have any codec info */ break;\n\t\t\tcase \"audio/x-ralf-mpeg4\" : \n\t\t\tcase \"audio/x-ralf-mpeg4-generic\" :\n\t\t\t\tlosslessAudioInfo = new LosslessAudioInfo(new DataInputStream(new ByteArrayInputStream(b)));\n\t\t\t\tbreak;\n\t\t\tcase \"audio/x-pn-multirate-realaudio\" : /* ASM-compatible RealAudio stream. Not supported */\t\t\t\t\n\t\t\tdefault: throw new UnsupportedException(\"Unknow mime : \" + mimeType); \n\t\t}\n\t}", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "private static void readAndPrint(InputStream is) {\n try {\n int a = is.read();\n int b = is.read();\n int c = is.read();\n int d = is.read();\n System.out.print(\"Received: \");\n System.out.println(\"0x\" + Integer.toString(a, 16) + Integer.toString(b, 16) + Integer.toString(c, 16) + Integer.toString(d, 16));\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void setInput(InputStream iInputStream) {\n // prepare to read the newly opened input stream\n m_iInputStream = iInputStream;\n }", "protected Object readMessage(InputStream inputStream) throws IOException{\n PushbackInputStream pin = (PushbackInputStream)inputStream;\n StringBuffer buf = new StringBuffer();\n \n boolean lineStartsWithPrompt = false;\n while (true){\n int b = pin.read();\n \n if (b < 0){\n if (buf.length() == 0) // Clean disconnection\n return null;\n break;\n }\n \n // End of line\n if (b == '\\n'){\n // FICS uses \\n\\r for an end-of-line marker!?\n // Eat the following '\\r', if there is one\n b = pin.read();\n if ((b > 0) && (b != '\\r'))\n pin.unread(b);\n \n // Ignore all-prompt lines\n if (lineStartsWithPrompt && (buf.length() == 0)){\n lineStartsWithPrompt = false;\n continue;\n }\n else\n break;\n }\n \n buf.append((char)b);\n \n // Filter out the prompt\n if (buf.toString().equals(\"fics% \")){\n buf.setLength(0);\n lineStartsWithPrompt = true;\n }\n }\n \n return buf.toString();\n }" ]
[ "0.6438668", "0.6438668", "0.64267164", "0.6373508", "0.6361644", "0.6357278", "0.6357278", "0.62992525", "0.6296752", "0.6284413", "0.6284413", "0.6284413", "0.62510526", "0.6209387", "0.61881846", "0.6155581", "0.603662", "0.59967786", "0.5991875", "0.5982538", "0.5981246", "0.5970197", "0.5881405", "0.5876398", "0.5846742", "0.58449054", "0.58109576", "0.58109576", "0.5808669", "0.5807924", "0.5795471", "0.5786727", "0.5755937", "0.57291347", "0.5705283", "0.5690249", "0.5690249", "0.56885594", "0.56833977", "0.56808215", "0.5645244", "0.56426525", "0.56304455", "0.5620639", "0.5609662", "0.55802184", "0.55727327", "0.5561608", "0.5557273", "0.554599", "0.55434656", "0.5541834", "0.5515693", "0.55141735", "0.5504776", "0.54995996", "0.5485027", "0.54702705", "0.5467938", "0.5462784", "0.5460292", "0.5455436", "0.54482424", "0.54424185", "0.54424185", "0.543755", "0.5434828", "0.5434515", "0.54340607", "0.54316777", "0.5428228", "0.5418027", "0.5413816", "0.5411271", "0.54096043", "0.53993857", "0.5398702", "0.53969276", "0.5392598", "0.53789663", "0.53744656", "0.53727365", "0.5372087", "0.53715396", "0.5354637", "0.5345587", "0.53439844", "0.5341694", "0.533942", "0.5330624", "0.53259516", "0.53225696", "0.5321167", "0.5307258", "0.53035784", "0.53018165", "0.5299837", "0.5298271", "0.52955306", "0.5294595", "0.52920794" ]
0.0
-1
Description: ByteArrayInputStream used for automated input
public void setScan(ByteArrayInputStream inStream){ this.programIn= (ByteArrayInputStream) inStream; this.scan = new Scanner (programIn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InputStream getDataStream();", "InputStream mo1151a();", "public InputStream asInputStream() {\n return new ByteArrayInputStream(data);\n }", "public abstract InputStream mo131998b();", "private boolean tryByteArrayInputStream(){\n return true;\n }", "public abstract InputStream getInputStream();", "public abstract InputStream getInputStream();", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "InputStream getInputStream() throws IOException;", "public InputStream getInputStream();", "public InputStream getInputStream();", "Stream<In> getInputStream();", "InputStream convert(InputStream inputStream, String specificationName) throws IOException;", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "TclInputStream(InputStream inInput) {\n input = inInput;\n }", "public InputStream asByteStream() {\n return new ByteArrayInputStream(rawBytes);\n }", "public FileBitReadUtility(InputStream is) {\n\t\tin = is;\n\t\tbufferPos = Constant.BITS_PER_BYTES;// initial remaining space\n\t}", "public void readData(InputStream inStream);", "@Test\r\n public void test_getInputStream_Accuracy() throws Exception {\r\n assertNull(\"incorrect default value\", instance.getInputStream());\r\n FileInputStream stream = null;\r\n try {\r\n stream = new FileInputStream(new File(\"test_files/test.txt\"));\r\n instance.setInputStream(stream);\r\n assertEquals(\"incorrect value after setting\", stream, instance.getInputStream());\r\n } finally {\r\n IOUtils.closeQuietly(stream);\r\n }\r\n }", "public Base64InputStream( InputStream in )\n\t{\n\t\tsuper( in );\n\t}", "public InputStream getInputStream() throws IOException;", "public InputStream getInputStream() throws IOException;", "InputStream deserialize(InputStream toDeserialize);", "@Test\r\n public void test_setInputStream_Accuracy() throws Exception {\r\n FileInputStream stream = null;\r\n try {\r\n stream = new FileInputStream(new File(\"test_files/test.txt\"));\r\n instance.setInputStream(stream);\r\n assertEquals(\"incorrect value after setting\", stream, instance.getInputStream());\r\n } finally {\r\n IOUtils.closeQuietly(stream);\r\n }\r\n }", "public void setIn(InputStream in);", "public void xmlInputStream() {\n inputStream = context.getResources().openRawResource(R.raw.flowers_xml);\n //stringInputStream = convertInputStreamToString(inputStream);\n //System.out.println(\"------------ InputStream ------------\\n\" + stringInputStream);\n //------------------------------------------------------------------------------------------\n }", "private static byte[] getDataFromInputStream(final InputStream input) throws IOException {\r\n if (input == null) {\r\n return new byte[0];\r\n }\r\n int nBytes = 0;\r\n final byte[] buffer = new byte[BUFFER_SIZE];\r\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n while ((nBytes = input.read(buffer)) != -1) {\r\n baos.write(buffer, 0, nBytes);\r\n }\r\n return baos.toByteArray();\r\n }", "public InputStream openInputStream() throws IOException {\n return super.openInputStream();\n //StringBuilder sb = getCharContent(true);\n //ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //( charset ==null ? new OutputStreamWriter(baos) : new OutputStreamWriter(baos,charset) )\n // .write(sb.toString()); // ouch!\n //return new ByteArrayInputStream(baos.toByteArray()); // another ouch!\n }", "@NotNull InputStream openInputStream() throws IOException;", "@Override\n\tpublic void read(InStream inStream) {\n\t}", "void loadFromInputStream(InputStream inputStream) throws IOException;", "@Test\n public void testAddStudent() {\n //String number = \"7\";\n //System.setIn(new ByteArrayInputStream(number.getBytes()));\n //String number2 = \"7\";\n //System.setIn(new ByteArrayInputStream(number2.getBytes()));\n assertTrue(aIO.addStudent() instanceof Student);\n }", "private InputStream getInstream() {\r\n\t\tif (instream == null) try {\r\n\t\t\tinstream = new FileInputStream(file);\r\n\t\t} catch(IOException ioe) {\r\n\t\t\tthrow new RuntimeException(\"Couldn't create instream for test\", ioe);\r\n\t\t}\r\n\t\treturn instream;\r\n\t}", "public StorableInput(InputStream stream) {\n Reader r = new BufferedReader(new InputStreamReader(stream));\n fTokenizer = new StreamTokenizer(r);\n fMap = new Vector();\n }", "@Test\n\tpublic void testConstructorInputStream() throws Exception\n\t{\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tsmall_model.writeModelBinary(baos);\n\t\t\n\t\t//System.out.println(small_model);\n\n\t\tGeoTessModel model = new GeoTessModel(new DataInputStream(new ByteArrayInputStream(baos.toByteArray())));\n\t\t\n\t\t//System.out.println(model);\n\t\t\n\t\tassertTrue(small_model.equals(model));\n\t\t\n\t\t// write model to byte array in ascii format\n\t\tbaos = new ByteArrayOutputStream();\n\t\tsmall_model.writeModelAscii(baos);\n\t\t\n\t\tmodel = new GeoTessModel(new Scanner(new ByteArrayInputStream(baos.toByteArray())));\n\t\t\n\t\t//System.out.println(model);\n\t\t\n\t\tassertTrue(small_model.equals(model));\n\t}", "private IOUtils()\n {\n }", "@Override\r\n\tpublic void read(DataInput in) throws IOException {\n\t\t\r\n\t}", "public LineInputStream(InputStream is) {\n\t\tinputStream = is;\n\t}", "@Test\n public void in() throws IOException {\n InputStream in = getResourceAstream(\"peizhi.xml\");\n\n //InputStream in = new FileInputStream(\"G:\\\\IDEA\\\\Java_test\\\\src\\\\main\\\\resources\\\\peizhi.xml\");\n //定义一个数组相当于缓存\n byte by[]=new byte[1024];\n int n=0;\n while((n=in.read(by))!=-1)\n {\n String s=new String(by,0,n);\n System.out.println(s);\n }\n }", "@Test\n\n public void testAddCat() {\n //String number = \"7\";\n //System.setIn(new ByteArrayInputStream(number.getBytes()));\n assertTrue(aIO.addCat() instanceof Cat);\n }", "public MyInputStream(InputStream in) {\n super(in);\n this.in = in;\n }", "public static ByteArrayInputStream strToByteArrayInputStream(String str){\n return new ByteArrayInputStream(str.getBytes());\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public InputStream getStream();", "private IOUtils() {\n\n }", "void deserialize(@NotNull InputStream in) throws IOException;", "private InputStream buildUpStream(final Object... args)\r\n\t{\n\t\tfinal StringBuilder builder = new StringBuilder(1000);\r\n\t\tfor (final Object arg : args)\r\n\t\t{\r\n\t\t\tbuilder.append(arg).append(CharUtils.CR);\r\n\t\t}\r\n\t\treturn new ByteArrayInputStream(builder.toString().getBytes());\r\n\t}", "private IOUtils() {\n }", "public static ByteArrayInputStream readSocketStream(InputStream is) throws IOException {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n copyStream(is, bos);\n byte[] data = bos.toByteArray();\n ByteArrayInputStream bis = new ByteArrayInputStream(data);\n closeStream(is);\n closeStream(bos);\n return bis;\n }", "protected abstract InputStream getInStreamImpl(String filename) throws IOException;", "static protected byte[] readContent( InputStream in )\n \t{\n \t\tBufferedInputStream bin = in instanceof BufferedInputStream\n \t\t\t\t? (BufferedInputStream) in\n \t\t\t\t: new BufferedInputStream( in );\n \t\tByteArrayOutputStream out = new ByteArrayOutputStream( 1024 );\n \t\tbyte[] buffer = new byte[1024];\n \t\tint readSize = 0;\n \t\ttry\n \t\t{\n \t\t\treadSize = bin.read( buffer );\n \t\t\twhile ( readSize != -1 )\n \t\t\t{\n \t\t\t\tout.write( buffer, 0, readSize );\n \t\t\t\treadSize = bin.read( buffer );\n \t\t\t}\n \t\t}\n \t\tcatch ( IOException ex )\n \t\t{\n \t\t\tlogger.log( Level.SEVERE, ex.getMessage( ), ex );\n \t\t}\n \t\treturn out.toByteArray( );\n \t}", "public static void main(String[] args) {\n byte[] arr = {1, 2, 3, 4, 5};\n\n try {\n ByteArrayInputStream one = new ByteArrayInputStream(arr);\n System.out.println(one.available());\n\n for(int i = 0; i< arr.length; i++){\n\n int data = one.read();\n System.out.println(data);\n }\n one.close();\n }catch (Exception e){\n System.out.println(e.getMessage());\n\n\n }\n\n }", "public InputStream getAsInputStream () {\r\n\r\n\t //code description\r\n\t \r\n\t if (this.document == null) return null;\r\n\t return new ByteArrayInputStream(this.getAsBytes());\r\n\t \r\n }", "private InputStream openContentStream() {\n\t\tString contents =\n\t\t\t\"This is the initial file contents for *.opera file that should be word-sorted in the Preview page of the multi-page editor\";\n\t\treturn new ByteArrayInputStream(contents.getBytes());\n\t}", "@Override\r\n\tpublic InputStream getInputStream() throws IOException {\r\n\t\tInputStream stream = null;\r\n\t\ttry {\r\n\t\t\tif (bytes != null) {\r\n\t\t\t\tstream = new ByteArrayInputStream(bytes);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new AppRuntimeException(ErrorCode.DATASOURCE_EMPTY_ERROR,\r\n\t\t\t\t\tErrorCode.DATASOURCE_EMPTY_ERROR.getCodeDescription());\r\n\t\t}\r\n\t\treturn stream;\r\n\t}", "public static\n InputStream inputStream() {\n return Input.wrappedInputStream;\n }", "protected byte[] stream2blob(InputStream is) throws IOException, IllegalArgumentException {\n return StreamUtils.stream2blob(is);\n }", "public InputStream getOptionalData() throws StandardException;", "@Override\n public void readFrom(InputStream in) throws IOException {\n }", "@Override // c.d.a.m.w.b.AbstractC0024b\n public InputStream b(byte[] bArr) {\n return new ByteArrayInputStream(bArr);\n }", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "static String loadStream(InputStream in) throws IOException { \n\t\tint ptr = 0; \n\t\tin = new BufferedInputStream(in); \n\t\tStringBuffer buffer = new StringBuffer(); \n\t\twhile( (ptr = in.read()) != -1 ) { \n\t\t\tbuffer.append((char)ptr); \n\t\t} \n\t\treturn buffer.toString(); \n\t}", "protected final InputStream getStream() { return _inputSource; }", "@Override\n public Ini read(InputStream in) throws IOException {\n return read(new InputStreamReader(in));\n }", "Object create(InputStream in) throws IOException, SAXException, ParserConfigurationException;", "public void testCtorSuccess() throws Exception {\r\n String text = \"A piece of text\";\r\n byte[] bytes = text.getBytes();\r\n InputStream is = new ByteArrayInputStream(bytes);\r\n BytesIterator iterator = new InputStreamBytesIterator(is, 10);\r\n assertTrue(\"should have next bytes\", iterator.hasNextBytes());\r\n }", "static String loadStream(InputStream in) throws IOException {\n int ptr = 0;\n in = new BufferedInputStream(in);\n StringBuffer buffer = new StringBuffer();\n while( (ptr = in.read()) != -1 ) {\n buffer.append((char)ptr);\n }\n return buffer.toString();\n }", "void readObject(InputSerializer in) throws java.io.IOException;", "public Class<InputStream> mo12943a() {\n return InputStream.class;\n }", "public InputStream getInputStream() throws IOException {\r\n \t\t \t\r\n \t\t \t\r\n \t\t \tInputStream stream = null;\r\n \t\t \r\n \t\t \tClassLoader saved = Thread.currentThread().getContextClassLoader();\r\n\t\t\ttry {\r\n\t\t\t\t Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());\r\n\t\t\t\t String newXml = null;\r\n\t\t\t\t Map<String, Object> options = new HashMap<String, Object>();\r\n\t\t\t\t options.put(\"includeSchema\", \"true\");\r\n\t\t\t\t// CONNECT TO RSUITE\r\n\t\t\t\t log.println(\"GETTING DOCUMENT WITH MO ID: \" + moId + \"...\");\r\n\t\t\t\t String document = repository.getAsString(moId, options);\r\n\t\t\t\t /*\r\n\t\t\t\t InputStream realInputStream = new URL(host + \"/rsuite/rest/v2/content/binary/id/\" + moId + \"?skey=\" + repository.sessionKey).openConnection().getInputStream();\r\n\t\t\t\t StringWriter writer = new StringWriter();\r\n\t\t\t\t IOUtils.copy(realInputStream, writer);\r\n\t\t\t\t String document = writer.toString();\r\n\t\t\t\t */\r\n\t\t\t\t log.println(\"DOCUMENT FOUND.\");\r\n\t\t\t\t log.print(document);\r\n\t\t\t\t \r\n\t\t\t\t // FIND ENCODING\r\n\t\t\t\t encoding = guessXMLEncoding(document);\r\n\r\n\t\t\t\t XMLStructureDefinitionType xmlStructureDefinitionType = getXMLStructureDefinitionType(document);\r\n\t\t\t\t newXml = document;\r\n\t\t\t\t \r\n\t\t\t\t switch (xmlStructureDefinitionType) {\r\n\t\t\t\t \tcase DTD:\r\n\t\t\t\t \t\tnewXml = replaceDtdDefinition(document, log);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase XSD:\r\n\t\t\t\t\t\tnewXml = replaceXsdDefinition(document, log);\t\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t\t }\r\n\t\t\t\t if (newXml == null) {\r\n\t\t\t\t\t newXml = document;\r\n\t\t\t\t }\r\n\t\t\t\t log.println(\"XML CONVERTED\");\r\n\t\t\t\t log.println(newXml);\r\n\t\t\t\t // RETURN DOCUMENT\r\n\t\t\t\t log.println(\"CREATING INPUT STREAM FROM NEW DOCUMENT...\");\r\n\t\t\t\t stream = new ByteArrayInputStream(newXml.getBytes(encoding));\r\n\t\t\t\t log.println(\"STREAM CREATED SUCCESSFULLY.\");\r\n\t\t\t}\r\n\t\t\tcatch(Throwable t){\r\n\t\t\t\tt.printStackTrace(log);\r\n\t\t\t\tfor (Throwable t1 : t.getSuppressed()) {\r\n\t\t\t\t\tt1.printStackTrace(log);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfinally{\r\n\t\t\t\tThread.currentThread().setContextClassLoader(saved);\r\n\t\t\t}\r\n\t\t\tlog.println(\"RETURNING STREAM TO OXYGEN...\");\r\n\t\t\treturn stream;\r\n\t\t}", "public StreamReader() {}", "protected final ByteSource getInput(String name) {\n try {\n if (name.equals(\"-\")) {\n return new StandardInputSource();\n } else {\n File file = new File(name);\n if (!file.exists()) {\n throw new FileNotFoundException(name);\n } else if (file.isDirectory()) {\n throw new IOException(name); // TODO Message? Exception?\n } else if (!file.canRead()) {\n throw new IOException(name); // TODO Message? Exception?\n } else {\n return Files.asByteSource(file);\n }\n }\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }", "protected InputStream getInputStream() throws IOException\n\t {\n\t FileInputStream fin = new FileInputStream(fFilename);\n\t BufferedInputStream bin = new BufferedInputStream(fin);\n\t return bin;\n\t }", "private static void read(final InputStream istream, final byte[] bytes)\r\n throws IOException {\r\n int pos = 0;\r\n while (pos < bytes.length) {\r\n int read = istream.read(bytes, pos, bytes.length - pos);\r\n if (read < 0) {\r\n throw new RuntimeException(\"premature EOF\");\r\n }\r\n pos += read;\r\n }\r\n }", "@Test\n\tpublic void addInputStreamTest() throws IOException {\n\t\tInputStream inputStream = DeploymentBuilderTest.class.getClassLoader()\n\t\t\t\t.getResource(\"com/shareniu/chapter16/multiInstance/collectionmultiInstance.bpmn\").openStream();\n\t\t// 流程定义的分类\n\t\tString category = \"shareniu_addInputStream\";\n\t\t// 构造DeploymentBuilder对象\n\t\tDeploymentBuilder deploymentBuilder = repositoryService\n\t\t\t\t.createDeployment().category(category)\n\t\t\t\t.addInputStream(resourceName, inputStream);\n\t\t// 部署\n\t\tDeployment deploy = deploymentBuilder.deploy();\n\t\tSystem.out.println(deploy);\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.949 -0400\", hash_original_method = \"C01D66AAAB14EA4E4DF6A9979EF6E5B0\", hash_generated_method = \"50350992DEB69163C1BBFA74E423D508\")\n \npublic AutoCloseInputStream(InputStream in) {\r\n super(in);\r\n }", "public void setInputStream(DataInputStream x) throws IOException {\n\t\tin = x;\n\t\tin.readFully(scratch, 0, 32);\n\t\tversion = scratch[0];\n\t\tyear = scratch[1] + 1900;\n\t\tmonth = scratch[2];\n\t\tday = scratch[3];\n\t\tnumRecords = ShapefileBundle.bytesToIntLE(scratch, 4);\n\t\tnumHeaderBytes = ShapefileBundle.bytesToUShortLE(scratch, 8);\n\t\tnumRecordBytes = ShapefileBundle.bytesToUShortLE(scratch, 10);\n\t\tincomplete = scratch[14];\n\t\tencrypted = scratch[15];\n\t\tmdx = scratch[28];\n\t\tlanguage = scratch[29];\n\t\tint readPartTwoLen = 31;\n\t\tif ((version & 0x07) == 4) {\n\t\t\tin.readFully(scratch, 0, 32);\n\t\t\tdriverName = new String(scratch, 0, 32);\n\t\t\tin.skipBytes(4);\n\t\t\treadPartTwoLen = 47;\n\t\t} else {\n\t\t\tassert((version & 0x07) == 3);\n\t\t}\n\t\tscratch[0] = in.readByte();\n\t\tint startpos = 0;\n\t\twhile (scratch[0] != (byte)0x0d) {\n\t\t\tin.readFully(scratch, 1, readPartTwoLen);\n\t\t\tDBaseFieldDescriptor nh = new DBaseFieldDescriptor(scratch, 0, 1+readPartTwoLen);\n\t\t\tnh.startpos = startpos;\n\t\t\tstartpos += nh.length;\n\t\t\tfields.add(nh);\n\t\t\tscratch[0] = in.readByte();\n\t\t}\n\t\trecordLength = startpos;\n\t\tscratch = new byte[recordLength];\n\t}", "public COSInputStream createInputStream() throws IOException {\n/* 236 */ return this.stream.createInputStream();\n/* */ }", "public abstract void read(DataInput input) throws IOException;", "private ObjectInputStream getInputStream() {\n\t\t// retornamos el stream de entrada\n\t\treturn this.inputStream;\n\t}", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "public ExecutableReader(InputStream is) throws Exception {\n\t\texStr = new ExecutableStream(is);\n\t\tread(exStr);\n\t}", "public void setInputStream(InputStream inputStream)\r\n\t{\r\n\t\tthis.inputStream = inputStream;\r\n\t}", "public InputStream getStream() {\n\t\treturn new ByteArrayInputStream(os.toByteArray());\n\t}", "public Serializable read_value( InputStream is ){\r\n\t return is.read_value( new UtcTBase() );\r\n }", "public InputStream getInputStream() throws IOException {\n/* 521 */ return Minecraft.getMinecraft().getResourceManager().getResource(p_148612_0_).getInputStream();\n/* */ }", "public InputStream openInputStream() throws IOException {\n\n\tthrow new IllegalArgumentException(\"Not supported\");\n }", "@Test\n public void testTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "ObjectInputStream newObjectInputStream(InputStream in) throws Exception;", "@Test(dataProvider = \"validXMLServletStreamProvider\")\n public void testValidateForValidEntityXML(ServletInputStream stream) throws IOException {\n\n when(mockHttpServletRequest.getInputStream()).thenReturn(stream);\n }", "public SqlScanner (InputStream input)\n {\n mInputStream = new BufferedInputStream(input);\n }", "InputStream openStream() throws IOException;", "public TypedBytesInput(DataInput in) {\n this.in = in;\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public ClassFile(DataInput stream)\n throws IOException\n {\n load(stream);\n }", "@Test\n public void testTransform3() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT3.getBytes()));\n // create new output stream as byte array and assign to standard\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n System.setOut(new PrintStream(baos));\n\n BurrowsWheeler.transform();\n byte[] encoded = baos.toByteArray();\n assertEquals(ENCODED_INPUT3.length, encoded.length);\n for (int i = 0; i < encoded.length; i++) {\n assertEquals(ENCODED_INPUT3[i], encoded[i]);\n }\n } finally {\n // return standard input and output\n System.setIn(standardIn);\n System.setOut(standardOut);\n }\n }", "public BitInputStream(final InputStream inner) {\n this.inner = inner;\n }", "public InputStream inputWrap(InputStream is) \n throws IOException {\n logger.fine(Thread.currentThread().getName() + \" wrapping input\");\n \n // discard any state from previously-recorded input\n this.characterEncoding = null;\n this.inputIsChunked = false;\n this.contentEncoding = null; \n \n this.ris.open(is);\n return this.ris;\n }", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }" ]
[ "0.67805433", "0.6731746", "0.65572786", "0.65299994", "0.6428517", "0.6348483", "0.6348483", "0.62875926", "0.62875926", "0.62875926", "0.6271508", "0.6271508", "0.62518483", "0.6185078", "0.6087549", "0.6074801", "0.603317", "0.60288984", "0.6016659", "0.5982356", "0.5957968", "0.59569997", "0.59569997", "0.5942212", "0.5935789", "0.5919154", "0.5906492", "0.58949655", "0.58748025", "0.58403826", "0.5833088", "0.5824676", "0.5823733", "0.5799109", "0.5792361", "0.5782492", "0.57766145", "0.57605475", "0.57364774", "0.57338876", "0.572424", "0.57186", "0.5710179", "0.57008296", "0.5695238", "0.5687581", "0.567518", "0.56636447", "0.5657263", "0.5656464", "0.56511396", "0.56483793", "0.56457984", "0.5642428", "0.56356084", "0.56179714", "0.5613129", "0.5613126", "0.56105554", "0.5593881", "0.5590831", "0.55882424", "0.55869174", "0.5585289", "0.55816454", "0.5580354", "0.5577269", "0.55735785", "0.5572136", "0.5569278", "0.556557", "0.5559107", "0.55568194", "0.55497116", "0.5541503", "0.5537165", "0.5530322", "0.55251926", "0.55206853", "0.5497672", "0.5494544", "0.5490566", "0.54874414", "0.54851955", "0.5484351", "0.5479802", "0.5475803", "0.54691476", "0.5467945", "0.5462537", "0.5461659", "0.5458256", "0.5457763", "0.545599", "0.5453542", "0.54352564", "0.5434566", "0.5429447", "0.54290354", "0.5421733" ]
0.6295695
7
DEFAULT CONSTRUCTOR (Whenever an obj of this class is created 1st Default constructor is called)
public RediffMailLoginPage(WebDriver driver ) { this.driver =driver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "defaultConstructor(){}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "void DefaultConstructor(){}", "public Constructor(){\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private SingleObject()\r\n {\r\n }", "private Default()\n {}", "public ObjectFactory() {\r\n\t}", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public ObjectFactory() {\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Instantiation(){}", "public Demo3() {}", "Employees() { \r\n\t\t this(100,\"Hari\",\"TestLeaf\");\r\n\t\t System.out.println(\"default Constructor\"); \r\n\t }", "TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }", "private SingleObject(){}", "public Demo() {\n\t\t\n\t}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Supercar() {\r\n\t\t\r\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "public void init(){}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public CSSTidier() {\n\t}", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }", "private SingleObject(){\n }", "public Curso() {\r\n }", "public Aanbieder() {\r\n\t\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}", "public Self__1() {\n }", "Parent()\n\t{\n\t\tSystem.out.println(\"This is parent's default constructor\");\n\t}", "private void __sep__Constructors__() {}", "private SingletonObject() {\n\n\t}", "public Cohete() {\n\n\t}", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void init() {\n\t\t}", "public void init() {\n \n }", "public Pitonyak_09_02() {\r\n }", "public TennisCoach () {\n\t\tSystem.out.println(\">> inside default constructor.\");\n\t}", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.8089953", "0.7998268", "0.7889616", "0.7828152", "0.7715715", "0.7393976", "0.73048645", "0.721678", "0.7211636", "0.71949804", "0.7166036", "0.7133148", "0.713055", "0.7090066", "0.7086108", "0.70567805", "0.7033806", "0.70178545", "0.7006699", "0.6980893", "0.6954789", "0.69520825", "0.6924917", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.69070625", "0.6904403", "0.6891864", "0.6885923", "0.68736404", "0.68624675", "0.6858725", "0.68582475", "0.6855152", "0.6836716", "0.6831615", "0.68301374", "0.68252486", "0.68235964", "0.68150693", "0.6803108", "0.68011826", "0.6798221", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808", "0.6794808" ]
0.0
-1
PROIBI CACHORROS ACIMA DO PESO
public String validaPeso() { if (this.peso>20) { return "Cachorro acima do peso."; } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public int getAprovacoes() {\n\t\treturn this.aprovacoes;\n\t}", "public MovimientoPantallaCocina() {\n initComponents();\n \n //COLOCAR FONOD EN LA PANTALLA PARA LA COCINA\n try{\n pnlOrdenes.setBorder(new ImagenCocina());\n } catch (IOException e){\n Logger.getLogger(MovimientoPantallaCocina.class.getName()).log(Level.SEVERE, null, e);\n }\n \n //VISUALIZAR TODAS LAS ORDENES ACTIVAS\n hilo p = new hilo(\"ordenes\");\n p.start();\n }", "public void adicionaNaPrisao(Jogador jogador) {\n print(\"\\tA prisao tinha \" + listaJogadoresNaPrisao);\n listaJogadoresNaPrisao.add(listaJogadores.get(jogadorAtual()).getNome());\n\n print(\"\\tmas chegou prisioneiro e prisao agora tem \" + listaJogadoresNaPrisao);\n }", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private void populaParteCorpo()\n {\n ParteCorpo p1 = new ParteCorpo(\"Biceps\");\n parteCorpoDAO.insert(p1);\n ParteCorpo p2 = new ParteCorpo(\"Triceps\");\n parteCorpoDAO.insert(p2);\n ParteCorpo p3 = new ParteCorpo(\"Costas\");\n parteCorpoDAO.insert(p3);\n ParteCorpo p4 = new ParteCorpo(\"Lombar\");\n parteCorpoDAO.insert(p4);\n ParteCorpo p5 = new ParteCorpo(\"Peito\");\n parteCorpoDAO.insert(p5);\n ParteCorpo p6 = new ParteCorpo(\"Panturrilha\");\n parteCorpoDAO.insert(p6);\n ParteCorpo p7 = new ParteCorpo(\"Coxas\");\n parteCorpoDAO.insert(p7);\n ParteCorpo p8 = new ParteCorpo(\"Gluteos\");\n parteCorpoDAO.insert(p8);\n ParteCorpo p9 = new ParteCorpo(\"Abdomen\");\n parteCorpoDAO.insert(p9);\n ParteCorpo p10 = new ParteCorpo(\"Antebraço\");\n parteCorpoDAO.insert(p10);\n ParteCorpo p11 = new ParteCorpo(\"Trapezio\");\n parteCorpoDAO.insert(p11);\n ParteCorpo p12 = new ParteCorpo(\"Ombro\");\n parteCorpoDAO.insert(p12);\n }", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public static void main(String[] args) {\n Pessoa p1 = new Pessoa();\n p1.nome = \"João\";\n p1.rg = \"12345678910\";\n \n // Criando uma primeira conta para associar com a primeira pessoa\n Conta c1 = new Conta();\n c1.agencia = \"0872-9\";\n c1.numero = 887878;\n c1.cliente = p1; // Associando a pessoa com a conta\n }", "public void ordenarAdyacenciasPorPeso() {\n\t\tfor(int i = 1; i <= cantNodos; i++) {\n\t\t\tCollections.sort(adyacencias[i], new PesoNodoComparator(pesoNodos));\n\t\t}\n\t}", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "public APropos() {\r\n\t\tpanap.setBackground(Color.LIGHT_GRAY);\r\n\r\n\t\t// mise en forme du texte dans le JTextPane\r\n\t\tStyledDocument doc = zoneAPropos.getStyledDocument();\r\n\t\tMutableAttributeSet centrer = new SimpleAttributeSet();\r\n\t\tStyleConstants.setAlignment(centrer, StyleConstants.ALIGN_CENTER);\r\n\t\tdoc.setParagraphAttributes(0, 0, centrer, false);\r\n\r\n\t\t// mise en place du texte dans le JTextPane\r\n\t\tzoneAPropos.setText(\"Calculatrice en NPI réalisée par :\\n \\nCamille SAMAIN\\nEMACS 166\\nEcole des Mines d'Alès\");\r\n\t\tzoneAPropos.setEditable(false);\r\n\r\n\t\t// mise en forme JTextPane\r\n\t\tzoneAPropos.setBackground(Color.LIGHT_GRAY);\r\n\t\tzoneAPropos.setForeground(Color.DARK_GRAY);\r\n\t\tzoneAPropos.setFont(police);\r\n\r\n\t\t// ajout du JtextPane dans le panel\r\n\t\tpanap.add(zoneAPropos);\r\n\t}", "public void geneticoPSO(){ \n //leer archivos de texto\n nombreArchivos.stream().map((nombreArchivo) -> lam.leerArchivo(nombreArchivo)).forEach((Mochila moc) -> {\n mochilas.add(moc);\n }); \n \n int o = 0;\n for (Mochila mochila : mochilas) { \n \n Algorithm_PSO alg_pso = new Algorithm_PSO(0.1, 0.8, 0.7, 0.6, 1, tamanioPob, EFOs, mochila.getSolucion().length, mochila); \n Individuo_mochilaPSO res = (Individuo_mochilaPSO)alg_pso.correr();\n System.out.println(\"fitnes: \" + res.getFitness() + \". Solucion\" + Arrays.toString(res.getCromosoma()));\n if (o == 9){\n System.out.println(\"\");\n }\n o++;\n }\n \n }", "public void publicarPropuestas() {\n try {\n //SISTEMA VERIFICA QUE LOS COMPROMISOS PARA EL PERIODO HAYAN SIDO INGRESADO\n if (this.listaCompromiso == null || this.listaCompromiso.isEmpty()) {\n //MUESTRA MENSAJE: 'DEBE INGRESAR LOS COMPROMISOS PARA PODER PUBLICAR ', NO ES POSIBLE PUBLICAR LOS RESULTADOS \n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_add_comprimiso_faltantes\"));\n return;\n }\n String mensajeValidacion = validarCompromisosPeriodoByPropuestaNacesidad(this.propuestaSeleccionada);\n if (mensajeValidacion != null) {\n addErrorMessage(keyPropertiesFactory.value(mensajeValidacion));\n return;\n }\n if (IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA.compareTo(this.propuestaSeleccionada.getConstantes().getIdConstantes()) != 0) {\n addErrorMessage(\"La propuesta debe estar en estado Pre-Aprobado\");\n return;\n }\n /*byte[] bitesPdf;\n //GENERAMOS EL REPORTE - CREADOR DE REPORTES\n try {\n HashMap mapa = new HashMap();\n mapa.put(\"p_id_periodo\", periodoSeleccionado.getIdPeriodo().intValue());\n bitesPdf = GeneradorReportesServicio.getInstancia().generarReporte(mapa, \"reporte15.jasper\");\n } catch (Exception e) {\n adicionaMensajeError(\"ERROR, Se presentaron errores al general el reporte JASPER\");\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, \"CU-NE-06(publicarPropuestas)\", e);\n return;\n }*/\n String iniciaCodigoVic = keyPropertiesFactory.value(\"cu_ne_6_codigo_proyecto_inicia_generacion\");\n if (iniciaCodigoVic.contains(\"-----NOT FOUND-----\")) {\n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_error_no_existe_codigo_proyecto_inicia_generacion\"));\n return;\n }\n //EL SISTEMA CAMBIA EL ESTADO DE TODAS LAS PROPUESTAS DEL LISTADO DE ''PRE-APROBADA ' A 'APROBADA' \n //Y LOS DE ESTADO 'REVISADA' A 'NO APROBADA' \n List<SieduPropuestaAsignada> lstPropuestaasignada = this.servicePropuestaAsignada.findByVigencia(this.propuestaSeleccionada);\n List<Long> lstLong = new ArrayList<>();\n for (SieduPropuestaAsignada s : lstPropuestaasignada) {\n lstLong.add(s.getPropuestaNecesidad().getIdPropuestaNecesidad());\n }\n Proyecto proyecto = new Proyecto();\n int contarProyecto = iProyectoLocal.contarProyectoByVigencia(lstLong);\n Constantes constantes = iConstantesLocal.getConstantesPorIdConstante(IConstantes.DURACION_PROYECTOS_INSTITUCIONALES);\n int numeroMesesEstimacionProyecto = Integer.parseInt(constantes.getValor());\n UsuarioRol usuarioRol = new UsuarioRol(loginFaces.getPerfilUsuarioDTO().getRolUsuarioPorIdRolDTO(IConstantesRole.EVALUADOR_DE_PROPUESTAS_DE_NECESIDADES_EN_LA_VICIN).getIdUsuarioRol());\n if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA)) {\n EjecutorNecesidad ejecutorNecesidadResponsable = iEjecutorNecesidadLocal.getEjecutorNecesidadPorPropuestaNecesidadYRolResponsable(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n if (ejecutorNecesidadResponsable == null || ejecutorNecesidadResponsable.getUnidadPolicial() == null || ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica() == null) {\n addErrorMessage(\"Error, Verifique la sigla física de la Unidad Policial asociada a la propuesta: \" + this.propuestaSeleccionada.getTema());\n return;\n }\n\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_APROBADA));\n //POR CADA PROPROPUESTA APROBADA SE CREA UN PROYECTO\n //CREA UN PROYECTO DE INVESTIGACIÓN POR CADA PROPUESTA CON EL ESTADO 'APROBADA', \n //ASIGNÁNDOLE EL CÓDIGO DE INVESTIGACIÓN DE ACUERDO AL MÉTODO ESTABLECIDO(VER REQUERIMIENTOS ESPECIALES), \n //ASIGNÁNDOLE EL ÁREA Y LA LÍNEA DE INVESTIGACIÓN Y EL TEMA PROPUESTO COMO TITULO PROPUESTO\n //VIC - [Consecutivo de proyectos en el periodo][Año]- [Código interno de la Unidad Policial o Escuela]\n String codigoInternoUnidad = ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica();\n String codigoProyecto = iniciaCodigoVic.concat(\"-\");//VIC \n contarProyecto += 1;\n codigoProyecto = codigoProyecto.concat(String.valueOf(contarProyecto));//[Consecutivo de proyectos en el periodo]\n codigoProyecto = codigoProyecto.concat(String.valueOf(lstPropuestaasignada.get(0).getSieduPropuestaAsignadaPK().getVigencia()));//[Año]\n codigoProyecto = codigoProyecto.concat(\"-\");\n codigoProyecto = codigoProyecto.concat(codigoInternoUnidad);//[Código interno de la Unidad Policial o Escuela]\n Date fechaHoy = new Date();\n proyecto.setCodigoProyecto(codigoProyecto);\n proyecto.setLinea(this.propuestaSeleccionada.getLinea());\n proyecto.setTituloPropuesto(this.propuestaSeleccionada.getTema());\n proyecto.setTema(this.propuestaSeleccionada.getTema());\n proyecto.setPeriodo(this.propuestaSeleccionada.getPeriodo());\n proyecto.setUsuarioRol(usuarioRol);\n proyecto.setEstado(new Constantes(IConstantes.TIPO_ESTADO_PROYECTO_EN_EJECUCION));\n proyecto.setUnidadPolicial(ejecutorNecesidadResponsable.getUnidadPolicial());\n proyecto.setPropuestaNecesidad(this.propuestaSeleccionada);\n proyecto.setFechaEstimadaInicio(fechaHoy);\n Calendar fechaFinalEstimadaProyecto = Calendar.getInstance();\n fechaFinalEstimadaProyecto.setTime(fechaHoy);\n fechaFinalEstimadaProyecto.add(Calendar.MONTH, numeroMesesEstimacionProyecto);\n proyecto.setFechaEstimadaFinalizacion(fechaFinalEstimadaProyecto.getTime());\n proyecto.setFechaActualizacion(fechaHoy);\n //CREAMOS LOS COMPROMISOS PROYECTOS\n List<CompromisoProyecto> listaCompromisosProyecto = new ArrayList<CompromisoProyecto>();\n //CONSULTAMOS LOS COMPROMISOS DE ESTE PERIODO\n List<CompromisoPeriodo> listaComprimiso = iCompromisoPeriodoLocal.buscarCompromisoPeriodoByIdPropuestaNecesidad(this.propuestaSeleccionada);\n for (CompromisoPeriodo unCompromisoPeriodo : listaComprimiso) {\n CompromisoProyecto compromisoProyecto = new CompromisoProyecto();\n compromisoProyecto.setCompromisoPeriodo(unCompromisoPeriodo);\n compromisoProyecto.setProyecto(proyecto);\n compromisoProyecto.setEstado(new Constantes(IConstantes.ESTADO_COMPROMISO_PROYECTO_PENDIENTE));\n compromisoProyecto.setFechaCreacion(new Date());\n compromisoProyecto.setMaquina(loginFaces.getPerfilUsuarioDTO().getMaquinaDTO().getIpLoginRemotoUsuario());\n compromisoProyecto.setUsuarioRegistro(loginFaces.getPerfilUsuarioDTO().getIdentificacion());\n compromisoProyecto.setUsuarioRolRegistra(usuarioRol);\n listaCompromisosProyecto.add(compromisoProyecto);\n }\n //CREAMOS LAS UNIDADES EJECUTORAS PARA EL PROYECTO\n List<EjecutorNecesidadDTO> listadoEjecutorNecesidadDTOPropuesta = iEjecutorNecesidadLocal.getEjecutorNecesidadDTOPorPropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n List<EjecutorNecesidad> listaEjecutorNecesidadProyecto = new ArrayList<EjecutorNecesidad>();\n for (EjecutorNecesidadDTO unaEjecutorNecesidadDTO : listadoEjecutorNecesidadDTOPropuesta) {\n EjecutorNecesidad ejecutorNecesidadLocal = new EjecutorNecesidad();\n ejecutorNecesidadLocal.setPropuestaNecesidad(new PropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad()));\n ejecutorNecesidadLocal.setProyecto(proyecto);\n ejecutorNecesidadLocal.setRol(new Constantes(unaEjecutorNecesidadDTO.getIdRol()));\n ejecutorNecesidadLocal.setUnidadPolicial(this.iUnidadPolicialLocal.obtenerUnidadPolicialPorId(unaEjecutorNecesidadDTO.getIdUnidadPolicial()));\n listaEjecutorNecesidadProyecto.add(ejecutorNecesidadLocal);\n }\n proyecto.setEjecutorNecesidadList(listaEjecutorNecesidadProyecto);\n proyecto.setCompromisoProyectoList(listaCompromisosProyecto);\n\n } else if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(\n IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_REVISADA)) {\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_NO_APROBADA));\n }\n\n //ACTUALIZAMOS EL CAMPO ROL_ACTUAL\n //CON EL OBJETIVO SE SABER EN DONDE SE ENCUENTRA LA PROPUESTA\n //ESTO SE REALIZA PARA CORREGIR \n //LA INCIDENCIA #0002754: Mientras no se publiquen los resultados de las necesidades, el estado debe ser 'Enviada a VICIN'.\n this.propuestaSeleccionada.setRolActual(IConstantes.PROPUESTA_NECESIDAD_PUBLICADA_JEFE_UNIDAD);\n /* \n\n //GENERAMOS EL NOMBRE DEL ARCHIVO DEL REPORTE\n String nombreReporteUnico = \"PROP_NECES_PERIODO\".concat(\"_\").concat(String.valueOf(System.currentTimeMillis())).concat(\".pdf\");\n String nombreReporte = \"PROP_NECES_PERIODO_\" + (periodoSeleccionado.getAnio() == null ? periodoSeleccionado.getIdPeriodo().toString() : periodoSeleccionado.getAnio().toString()) + \".pdf\";\n */\n //SE ACTUALIZAN LAS PROPUESTAS DE NECESIDAD\n servicePropuestaNecesidad.guardarPropuestaYgenerarProyecto(\n this.propuestaSeleccionada,\n proyecto);\n\n addInfoMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_propuestas_actualizadas_ok_publicar\"));\n\n navigationFaces.redirectFacesCuNe01();\n\n } catch (Exception e) {\n\n addErrorMessage(keyPropertiesFactory.value(\"general_mensaje_error_exception\"));\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,\n \"CU-NE-06 Evaluar propuestas de necesidades de investigación - (publicarPropuestas)\", e);\n\n }\n\n }", "public static void main(String args[]){\n int x = 10;\r\n List<Perro> perros = new ArrayList();\r\n \r\n Perro perro=new Perro();\r\n \r\n Persona persona = new Persona();\r\n persona.setAltura(5.5);\r\n persona.setColorPiel(\"Blanca\");\r\n persona.setEdad(16);\r\n persona.setGenero('f');\r\n persona.setNacionalidad(\"Japonesa\");\r\n persona.setPeso(130);\r\n persona.setTipoDePelo(\"Lacio\"); \r\n persona.setOcupacion(\"Dinero\");\r\n \r\n //Se dan todas las características\r\n perro.setNombre(\"Manuel\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);//Se añade a la instancia\r\n \r\n perro = new Perro();//Se limpia y se vuelve a llamar la instancia\r\n perro.setNombre(\"Igor\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Lacio\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n \r\n perro = new Perro();\r\n perro.setNombre(\"Luli\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Siberiano\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n //****************CUANDO EJECUTES ESTO VE COMENTADO LOS BLOQUES QUE NO QUIERES QUE SE USEN*************\r\n //foreach y for hace la misma funcion\r\n //Uso de for\r\n for (Perro perro1:perros){\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo());\r\n }\r\n \r\n //Formas de uso del for each\r\n perros.forEach(perro1->\r\n System.out.println(perro1.getNombre()));\r\n \r\n perros.forEach(perro1 ->{//Se define una variable que es perro1 y esta recorrera toda la lista\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo()); \r\n System.out.println();\r\n \r\n });\r\n \r\n \r\n System.out.println(\"Blanco\".equals(perro.color)? \"Si es blanco\":\"No es blanco\");\r\n \r\n //Uso del if\r\n if (((4/2==0)&&(10/5 !=0))||(100/20==0)){\r\n System.out.println(\"Es bisiesto\");\r\n }else{\r\n System.out.println(\"No es bisiesto\");\r\n }\r\n \r\n //Uso del switcH\r\n switch(x){\r\n case 6:\r\n System.out.println(\"Es verdadero\");\r\n break;\r\n case 2:\r\n System.out.println(\"Es falso\");\r\n break;\r\n default:\r\n System.out.println(\"No es ninguna\");\r\n \r\n //Uso de la lista de un item en especifico \r\n System.out.println(\"Nombre: \" + perros.get(2).getNombre());//El número del get\r\n System.out.println(\"Color: \"+perros.get(2).getColor());//define que item es que tomará\r\n System.out.println(\"Raza: \"+perros.get(2).getRaza());\r\n \r\n \r\n //Demostración del uso de getters\r\n System.out.println(\"Nombre: \");\r\n System.out.println(\"Altura: \" + persona.getAltura());\r\n System.out.println(\"Color: \" + persona.getColorPiel());\r\n System.out.println(\"Edad: \"+persona.getEdad());\r\n System.out.println(\"Genero: \"+persona.getGenero());\r\n System.out.println(\"Nacionalidad: \"+persona.getNacionalidad());\r\n System.out.println(\"Peso: \"+persona.getPeso());\r\n System.out.println(\"Tipo de Pelo: \"+persona.getTipoDePelo());\r\n \r\n }\r\n \r\n}", "public PosicaoMapa pegaProximaPosicao(PosicaoMapa posicao)\n\t{\n\t\treturn posicoes.get(pegaIndicePosicao(posicao) + 1);\n\t}", "private Boolean pulouPeca(String posicao, int eixo, Casa casa, Casa destino, Tabuleiro tabuleiro) {\n \n int x = destino.x;\n int y = destino.y;\n \n if(posicao == \"reta\") {\n switch(eixo) {\n case 1:\n if(y > casa.y){ \n for(int i = casa.y + 1; i < y; i++){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) { \n return true; }\n } \n } \n if(y < casa.y){ \n for(int i = casa.y - 1; i > y; i--){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) {\n return true; }\n }\n }\n return false;\n case 2:\n if(x > casa.x){\n for(int i = casa.x + 1; i < x; i++){\n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n if(x < casa.x){\n for(int i = casa.x - 1; i > x; i--){\n \n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n return false;\n } \n \n }\n \n if(posicao == \"diagonal\") {\n \n switch(eixo) {\n case 1:\n if(x > casa.x){\n //verifica se pulou peca\n for(int j = 1; j < x - casa.x; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.x > x){\n //verifica se pulou peca\n for(int j = 1; j < casa.x - x; j++){\n if(tabuleiro.getCasa(x + j, y + j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false; \n case 2:\n if(y > casa.y){\n //verifica se pulou peca\n for(int j = 1; j < y - casa.y; j++){\n if(tabuleiro.getCasa(casa.x - j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.y > y){\n //verifica se pulou peca\n for(int j = 1; j < casa.y - y; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y - j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false;\n }\n }\n \n return false;\n }", "public void posizionaPecora(Agnello pecora) {\n\t\tpecore.add(pecora);\n\t\tif (pecora instanceof PecoraAdulta) {\n\t\t\tif (((PecoraAdulta) pecora).isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t\treturn;\n\t\t} else if (!(pecora instanceof PecoraNera))\n\t\t\tnumeroAgelli++;\n\t}", "public String getCUSU_APELLIDOS(){\n\t\treturn this.myCusu_apellidos;\n\t}", "@Override\n protected void elaboraMappaBiografie() {\n if (mappaCognomi == null) {\n mappaCognomi = Cognome.findMappaTaglioListe();\n }// end of if cycle\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "public QuadradoVerdeLosango(Posicao umaPosicao) {\n super(\"quadradoVerdeLosango.png\");\n this.setPosicao(umaPosicao);\n bTransponivel = false;\n bQuebravel = true;\n bMovivel = true;\n }", "private void preenchePosicoes(List<Par<Integer,Integer>> posicoes, \n\t\t\tEstadoAmbiente estado) {\n\t\tfor (Par<Integer,Integer> p : posicoes) {\n\t\t\tthis.quadricula[p.primeiro()][p.segundo()] = estado;\n\t\t}\n\t}", "public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "public void afegirPosicio() {\n\t\tfor(int i=0; i<cal.length; ++i){\n\t\t\tcal[i] = new Dia(false);\n\t\t\tfor(int j=0; j<3; ++j) cal[i].getTorns()[j].setPosicio(i);\n\t\t}\n\t}", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "@Override\n public void pintarPantalla(Graphics g) {\n //ESTABLECEMOS COLOR PARA FONDO DE LA PANTALLA\n g.setColor(colorInicio);\n g.fillRect(0, 0, p.getWidth(), p.getHeight());\n\n //ESTABLECEMOS COLOR Y POSICION PARA EL TITULO DEL JUEGO\n g.setColor(colorLetra);\n g.setFont(fuenteGrande);\n g.drawString(\"NAVES NODRIZAS\", (anchoPantalla / 2) - (p.getWidth() / 2), (altoPantalla / 2) - (p.getHeight() / 2));\n\n //ESTABLECEMOS COLOR Y POSICION PARA EL MENSAJE\n g.setColor(colorLetra);\n g.setFont(fuenteGrande);\n g.drawString(\"Haga clic para jugar\", 100, 200);\n }", "public void primerPunto() {\n\t\tp = new PuntoAltaPrecision(this.xCoord, this.yCoord);\n\t\t// Indicamos la trayectoria por la que va la pelota\n\t\tt = new TrayectoriaRecta(1.7f, p, false);\n\t}", "public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}", "public static void main( String[] args )\n {\n int contador = 0;\n Perro perro1 = new Perro(\"Pepe\",4,\"Pug\"); \n //perro1.setNombre(\"Axel\");\n //System.out.println(perro1.getNombre());\n Perro perro2 = new Perro(\"Sasha\",3,\"Siberiano\"); \n //System.out.println(perro2.getNombre()); */\n JOptionPane.showMessageDialog(null, \"Unidad 2\",\"Misiontic\",JOptionPane.ERROR_MESSAGE);\n Perro perro3 = new Perro(\"Manchis\",7,\"Chandoso\"); \n System.out.println(Perro.contadorPerros);\n Perro.ladrar();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate List<PromocionConcursoAgr> traerPromocionConcursoAgrAsignados() {\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tLong id = puestoAgr.getIdConcursoPuestoAgr();\r\n\t\tif (puestoAgr != null && puestoAgr.getIdConcursoPuestoAgr() != null) {\r\n\t\t\tString cadena = \"select distinct(puesto_det.*) \"\r\n\t\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t\t+ \"join seleccion.concurso_puesto_agr puesto_agr \"\r\n\t\t\t\t\t+ \"on puesto_agr.id_concurso_puesto_agr=puesto_det.id_concurso_puesto_agr \"\r\n\t\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t\t+ \"where puesto_det.nro_orden = 3 \"\r\n\t\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t\t;\r\n\r\n\t\t\tcadena = cadena + \" and puesto_agr.id_concurso_puesto_agr = \"\r\n\t\t\t\t\t+ puestoAgr.getIdConcursoPuestoAgr();\r\n\r\n\t\t\tlista = em.createNativeQuery(cadena, PromocionConcursoAgr.class)\r\n\t\t\t\t\t.getResultList();\r\n\t\t\tPromocionSalarialAgrupados = new ArrayList<ConcursoPuestoAgr>();\r\n\t\t\tfor (PromocionConcursoAgr o : lista) {\r\n\t\t\t\tPromocionSalarialAgrupados.add(o.getConcursoPuestoAgr());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lista;\r\n\t}", "public static void main(String[] args) {\n Alumno aaDatos []; // El identificador es nulo\n \n aaDatos = new Alumno[tam];//Creamos un arreglo de 10 \n //alumnos - AQUI HABRA PREGUNTA\n for (int i = 0; i < aaDatos.length; i++) {\n aaDatos[i]= new Alumno(\"Dany\",\"16550518\", 0);//Para cada lugar de arreglo se crea un objeto de la clase alumno\n \n }\n for (Alumno aaDatos1: aaDatos) {\n System.out.println(\"Nombre: \"+ aaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaDatos1.getiCar());\n \n }\n \n \n //CREAMOS UNA COPIA DEL ARREGLO\n Alumno aaCopiaDatos [];\n aaCopiaDatos = new Alumno [tam];\n \n for (int i = 0; i < aaCopiaDatos.length; i++) {\n aaCopiaDatos[i]= new Alumno(aaDatos[i].getsNom(), // <<<Se llenan todos los datos que pide el constructor por argumentos\n aaDatos[i].getsMatri(), \n aaDatos[i].getiCar());\n \n }\n for (Alumno aaCopiaDatos1 : aaCopiaDatos) {\n System.out.println(\"Nombre: \"+ aaCopiaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaCopiaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaCopiaDatos1.getiCar());\n }\n System.out.println(aaDatos);\n System.out.println(aaCopiaDatos);\n }", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public static void main(String[] args) {\n\t\t\n\t\tProvaCollezioni pc = new ProvaCollezioni();\n\t\t\n\t\tpc.spesa.add(\"latte\");\n\t\tpc.spesa.add(\"pane\");\n\t\tpc.spesa.add(\"biscotti\");\n\t\tpc.spesa.add(\"olio\");\n\t\tpc.spesa.add(\"biscotti\");\n\t\t\n\n\t\tSystem.out.println(pc.spesa.size());\n\t\t\n\t\tfor (String voce : pc.spesa) {\n\t\t\tpc.spesaFiltrata.add(voce);\n\t\t\tpc.spesaOrdinata.add(voce);\n\t\t}\n\n\t\tSystem.out.println(pc.spesaFiltrata.size());\n\t\tfor (String string : pc.spesaOrdinata) {\n\t\t\tSystem.out.println(string);\n\t\t}\n\t\t\n\t\tMap<String, String> regioni = new TreeMap<>();\n\t\t\n\t\tregioni.put(\"Piemonte\", \"Torino\");\n\t\tregioni.put(\"Lombardia\", \"Milano\");\n\t\tregioni.put(\"Toscana\", \"Firenze\");\n\t\tregioni.put(\"Puglia\", \"Bari\");\n\t\t\n\t\tSystem.out.println(regioni.size());\n\t\t\n\t\tSystem.out.println(regioni.get(\"Piemonte\"));\n\t\t\n\t\tSystem.out.println(regioni.keySet());\n\t\t\n\t\tSystem.out.println(regioni.values());\n\t\t\n//\t\tfor (String regione : regioni.keySet()) {\n//\t\t\tSystem.out.println(\"Il capoluogo della regione \" \n//\t\t\t\t\t\t\t+ regione \n//\t\t\t\t\t\t\t+ \" è: \" \n//\t\t\t\t\t\t\t+ regioni.get(regione));\n//\t\t}\n//\t\t\n\t\t\n\t\tfor (Entry<String, String> regione : regioni.entrySet()) {\n\t\t\tSystem.out.print(\"Il capoluogo della regione \" + regione.getKey());\n\t\t\tSystem.out.println(\" è: \" + regione.getValue());\n\t\t\tSystem.out.println(regione);\n\t\t}\n\t\t\n\t\t\n\t}", "public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public static void main(String[] args) {\n Aviso aviso1 = new Aviso();\n \n aviso1.id=1;\n \n aviso1.tipoAviso=\"General\";\n aviso1.titulo=\"Insumos y bienes muebles de laboratorio disponibles\";\n aviso1.texto=\"La Coordinación de Control Técnico de Insumos (COCTI) de la Dirección de Prestaciones Médicas, pone a disposición del personal que realiza investigación el inventario adjunto.\";\n aviso1.resumen=\"Insumos y bienes muebles de laboratorio disponibles por la Coordinación de Control Técnico de Insumos (COCTI)\";\n aviso1.nombre=\"Eduardo Flores Díaz\";\n aviso1.estatusF=\"Vigente\";\n \n aviso1.diaP=02;\n aviso1.mesP=02;\n aviso1.yearP=2020;\n \n aviso1.diaA=02;\n aviso1.mesA=02;\n aviso1.yearA=2020;\n \n aviso1.diaB=02;\n aviso1.mesB=02;\n aviso1.yearB=2021;\n \n System.out.println(aviso1);\n \n Aviso aviso2 = new Aviso();\n \n aviso2.id=2;\n \n aviso2.tipoAviso=\"Conferencia\";\n aviso2.titulo=\"CONFERENCIA DR. COSSARIZZA\";\n aviso2.texto=\"El Dr. Andrea Cossarizza, ofreció a la comunidad IMSS su conferencia “Clinical Applications of Advanced Cytometry” y aprovechó la presencia de investigadores y estudiantes del IMSS para compartir sus últimos resultados de investigación, aún no publicados, sobre VIH y el uso de citometría de flujo.\\n\" +\n\"\\n\" +\n\"Además, invitó a nuestra comunidad a agregarse a la sociedad internacional sobre citometría: ISAC(International Society for the Advancement of Cytometry) y aprovechar los recursos que tienen como:\\n\" +\n\"\\n\" +\n\"Programa de Liderazgo MARYLOU INGRAM SCHOLARS PROGRAM, de 5 años para formación de citomteristas\\n\" +\n\"Iniciativa de innovación CYTO-Innovation apoya a las propuestas innovadoras que contemplan la conversión de ideas en productos comerciales de alto impacto para ayudar a nuevos empresarios a aprovechar la tecnología de citometría\\n\" +\n\"\\n\" +\n\"Además en la ISAC tienen disponibles una serie de manuales e información de punta sobre la citometría para uso libre. El Dr. Cossarizza reiteró la invitación al personal IMSS a vincularse con la Universidad de Módena y su laboratorio aprovechando el prestigio que tiene el Laboratorio de Citometría de Flujo del Centro de Instrumentos del Centro Médico Nacional Siglo XXI.\";\n \n aviso2.resumen=\"Conferencia de Dr. Andrea Cossarizza del tema “Clinical Applications of Advanced Cytometry\\\"\";\n aviso2.nombre=\"Kevin Meza Gonzalez\";\n aviso2.estatusF=\"No Vigente\";\n \n aviso2.diaP=02;\n aviso2.mesP=03;\n aviso2.yearP=2020;\n \n aviso2.diaA=15;\n aviso2.mesA=02;\n aviso2.yearA=2020;\n \n aviso2.diaB=31;\n aviso2.mesB=03;\n aviso2.yearB=2020;\n \n System.out.println(aviso2);\n \n }", "private void reposicionarPersonajes() {\n // TODO implement here\n }", "public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }", "public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }", "public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public void MostrarDatos(){\n // En este caso, estamos mostrando la informacion necesaria del objeto\n // podemos acceder a la informacion de la persona y de su arreglo de Carros por medio de un recorrido\n System.out.println(\"Hola, me llamo \" + nombre);\n System.out.println(\"Tengo \" + contador + \" carros.\");\n for (int i = 0; i < contador; i++) {\n System.out.println(\"Tengo un carro marca: \" + carros[i].getMarca());\n System.out.println(\"El numero de placa es: \" + carros[i].getPlaca()); \n System.out.println(\"----------------------------------------------\");\n }\n }", "public String getPoblacion() {\r\n\t\treturn poblacion;\r\n\t}", "public void mostrarSocios()\n\t{\n\t\t//titulo libro, autor\n\t\tIterator<Socio> it=socios.iterator();\n\t\t\n\t\tSystem.out.println(\"***********SOCIOS***********\");\n\t\tSystem.out.printf(\"\\n%-40s%-40s\", \"NOMBRE\" , \"APELLIDO\");\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tSocio socio=(Socio)it.next();\n\t\t\tSystem.out.printf(\"\\n%-40s%-40s\\n\",socio.getNombre(),socio.getApellidos());\n\t\t}\n\t}", "public Iterable<PosicaoMapa> pegaPosicoes()\n\t{\n\t\treturn posicoes;\n\t}", "public static void main(String[] args) {\n\n aluno exemplo1 = new aluno();//objeto do tipo aluno\n aluno exemplo2 = new aluno();\n exemplo1.nome = \"EPAMINONDAS\";\n exemplo1.matricula = \"MAT-1\";\n exemplo1.nota = 5;\n exemplo1.anoNacimento = 2005;\n\n\n exemplo2.nome = \"MARIA\";\n exemplo2.matricula = \"MAT-2\";\n exemplo2.nota = 10;\n exemplo2.anoNacimento = 2000;\n\n\n System.out.println(\"Nome: \"+exemplo1.nome + \" matricula: \" + exemplo1.matricula + \" nota: \" + exemplo1.nota);\n System.out.println(\"Nome: \"+exemplo2.nome + \" matricula: \" + exemplo2.matricula + \" nota: \" + exemplo2.nota);\n\n exemplo1.mostraIdade(2030);//metodos\n exemplo2.mostraIdade(2021);\n exemplo2.mostraIdade(2003, 2021);\n }", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "public Punto getCentro() {\r\n\treturn centro;\r\n}", "Object obtenerPolizasPorFolioSolicitudNoCancelada(int folioSolicitud,String formatoSolicitud);", "public void avancaPosicio(int[] posicions) {\n\n if (Arrays.equals(posicions, Const.FINISH_CODE)) {\n //Acaba la frame del joc\n v.closeFrame();\n return;\n }\n \n jugadors[0].getCentre().setX(posicions[0]);\n jugadors[0].getCentre().setY(posicions[1]);\n jugadors[1].getCentre().setX(posicions[2]);\n jugadors[1].getCentre().setY(posicions[3]);\n\n //Afegeix les noves posicions\n if ((jugadors[0].getCentre().getX() != -1) || (jugadors[0].getCentre().getY() != -1)){\n jugadors[0].addCoordToPath(new Coord(jugadors[0].getCentre()));\n }\n if ((jugadors[1].getCentre().getX() != -1) || (jugadors[1].getCentre().getY() != -1)){\n jugadors[1].addCoordToPath(new Coord(jugadors[1].getCentre()));\n }\n //Avisa a la Vista_Client\n avisarObservadors();\n\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public Exposicao() {\n obras = new TreeSet<Obra>();\n }", "public String darPista() {\r\n\t\tString msj = \"\";\r\n\t\tboolean fin = false;\r\n\t\tfor (int i = 0; i < casillas.length && !fin; i++) {\r\n\t\t\tfor (int j = 0; j < casillas[0].length && !fin; j++) {\t\t\r\n\t\t\t\tif(casillas[i][j].esMina() == false && casillas[i][j].darValor() > 0) {\r\n\t\t\t\t\tcasillas[i][j].destapar();\r\n\t\t\t\t\tmsj += i+\",\"+j;\r\n\t\t\t\t\tfin = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn msj;\r\n\t}", "public PnAlunos() {\n initComponents();\n listarAlunos();\n }", "public void obtenerValorDePiezaEnDolaresAPesos() {\r\n\t\tpieza = new Pieza(\"\",10,Moneda.DOLAR);\r\n\t\tdouble precio = this.pieza.getPrecioEn(Moneda.PESO);\r\n\t\tAssert.assertEquals(precio, 40);\r\n\t}", "public String getRazaN(){\n return razaP1.nombre1();\n }", "public void carregarRegistroDoPrimeiroAno() {\n\t\tlimpar();\n\t\t\n\t\tlistaAlunos = repository.encontrarComQueryNomeada(AlunosMilitaresOMDS.class, \"alunosMilitaresOMDS.listarPorOMEPeriodo\",\n\t\t\t\tnew Object[]{\"periodo\", periodo},\n\t\t\t\tnew Object[]{\"organizacao\", subordinado},\n\t\t\t\tnew Object[]{\"ano\", Ano.PRIMEIRO});\n\t\t\n\t\tif (listaAlunos.size() > 0) {\n\t\t\tlistaAlunos.forEach(efetivo ->{\n\t\t\t\tif (efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.OFICIAL))\n\t\t\t\t\tsetAlunosMilitarOficial(listaAlunos.get(0));\n\t\t\t\tif(efetivo.getTipoAlunosMilitaresOMDS().equals(TipoAlunosMilitaresOMDS.PRACA))\n\t\t\t\t\tsetAlunosMilitarPraca(listaAlunos.get(0));;\n\t\t\t});\n\t\t\thabilitaBotao=false;\n\t\t}\n\t\torganizarValores();\n\t}", "private String getQuerySelecaoPromocoes()\n\t{\n\t\tString result = \n\t\t\t\"SELECT \" +\n\t\t\t\" PROMOCAO.IDT_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.NOM_PROMOCAO, \" +\n\t\t\t\" PROMOCAO.DAT_INICIO_VALIDADE, \" +\n\t\t\t\" PROMOCAO.DAT_FIM_VALIDADE, \" +\n\t\t\t\" PROMOCAO.VLR_MAX_CREDITO_BONUS \" +\n\t\t \"FROM \" +\n\t\t \" TBL_GER_PROMOCAO PROMOCAO \" + \n\t\t \"WHERE \" +\n\t\t \" PROMOCAO.IDT_CATEGORIA = \" + String.valueOf(ID_CATEGORIA_PULA_PULA);\n\t\t\n\t\treturn result;\n\t}", "@Override\n public void buildAspecto() {\n this.personaje.setAspecto(\"Se presenta con rasgos humanos, rodeado de circulos de agua.\");\n }", "private void aggiornaMappeColori(Scena scena) {\n\t\tMappaColori colori=creaMappaColoriCompleta(scena.getPersonaggiPrincipali());\n\t\t// pulisce l'elenco delle mappe di colori associate ad ogni\n\t\t// visualizzatore\n\t\taggiornaColori(colori);\n\t}", "public Agnello mangiaPecora() {\n\t\tint indiceCasuale = (int) (Math.random() * pecore.size());\n\t\tAgnello pecoraMangiata = pecore.get(indiceCasuale);\n\t\tprelevaAnimale(pecoraMangiata.getTipo());\n\t\treturn pecoraMangiata;\n\t}", "public static void main(String[] args) {\n\t\tPessoa PF1 = new PessoaFisica(1,\"Michel\",\"31/03/1988\",\"15785465-01\",\"145.217.365-54\");\n\t\tPF1.AdicionaContato(\"898\",\"222\");\n\t\tPF1.AdicionaEndereco(\"avenida das gar�as\", 1110, \"padre cicero\", \"petrolina\", \"PE\", \"56326000\");\n\t\t\n\t\t// criando cliente pessoa Juridica\n\t\tPessoa PJ1 = new PessoaJuridica(2,\"Tectronic\",\"TECLTDA\",\"10-1009290/0001\");\n\t\tPJ1.AdicionaContato(\"00000\",\"11111\");\n\t\tPJ1.AdicionaEndereco(\"avenida do bambu\", 878, \"jo�oo pio 10\", \"juazeiro\", \"BA\", \"56326000\");\n\t\t\n\t\t// criando objetos produtoodutos\n\t\t/*Produto produto1 = new Produto(10, \"impressora\",35,1,100);\n\t\tProduto produto2 = new Produto(11, \"MicroSystem\",550, 2,80);\n\t\tProduto produto3 = new Produto(12, \"Faqueiro Ipanema\",75, 3,70);\n\t\tProduto produto4 = new Produto(13, \"Mangueira de Jardim\",19, 4,80);\n\t\tProduto produto5 = new Produto(14, \"Mouse multilaser\",25,5,90);*/\n \n Facade fachada = new Facade();\n fachada.incializarProdutos();\n \n\n\t\t// algumas forma de pagamento\n\t\t/*FormaPagamento Pagamento1 = new CartaoCredito(1,\"visa\",\"credito\", 3, \"Mariano Ribeiro\", \"10/10/23\", \"54212345212\",\"132\");\n\t\tFormaPagamento Pagamento2 = new CartaoCredito(2,\"mastercard\",\"debito\", 1, \"Juliana Marinalva\", \"12/09/29\", \"232356789\",\"787\");\n\t\tFormaPagamento Pagamento3 = new Boleto(3,\"19/04/2017\",\"12345678912\",\"Sanatander\");\n\t\tFormaPagamento Pagamento4 = new Boleto(4,\"20/04/2017\",\"12232344423\",\"Banco do Brasil\");\t\t*/\n \n \n\t\t//------------------------------------------------------------------------------------------------------------------------\n\t\t// criando um pedido com cliente e numero de itemens\n\t\tPedido pedido1 = new Pedido(30,PF1,3);\n\t\t\t\t\n\t\t// adicionando produtos como itens da lista de pedido\n\t\t/*ItemPedido item1 = new ItemPedido(20,produto1,3);\n\t\tItemPedido item2 = new ItemPedido(21,produto2,9);\n\t\tItemPedido item3 = new ItemPedido(22,produto3,2);\n\t\tItemPedido item4 = new ItemPedido(23,produto4,4);\n\t\tItemPedido item5 = new ItemPedido(24,produto5,1);*/\n\t\t\n\t\t// adicionando itens a lista de pedido\n\t\t/*pedido1.AdicionandoItemLista(item1,0);\n\t\tpedido1.AdicionandoItemLista(item3,1);\n\t\tpedido1.AdicionandoItemLista(item5,2);*/\n\t\t\t\t\n\t\t//forma de pagamento para o pedido 1\n\t\t//pedido1.setPagamento(Pagamento3);\n\n\t\t// Mostrar dados\n\t\tpedido1.mostrarPedido();\n\t\tSystem.out.println(\"Valor total com desconto: \" + Pedido.desconto(pedido1.getValorTotal(),(float)0.1));\n\t\tpedido1.getPagamento().realizaPagamento(true, \"16/04/17\");\n\t\t\n\t\t\n\t\t\n\t}", "private void gerarLaudosProcedimentosCirurgicos(\r\n\t\t\tMpmPrescricaoMedica prescricao, List<MpmLaudo> laudoList) throws ApplicationBusinessException {\r\n\r\n\t\tMap<MpmPrescricaoProcedimento, FatProcedHospInternos> procedimentosMap = this\r\n\t\t\t\t.getConfirmarPrescricaoMedicaRN()\r\n\t\t\t\t.listarProcedimentosCirurgicosGeracaoLaudos(prescricao);\r\n\r\n\t\tMpmLaudo laudo = null;\r\n\r\n\t\tfor (MpmPrescricaoProcedimento procedimento : procedimentosMap.keySet()) {\r\n\r\n\t\t\tlaudo = new MpmLaudo();\r\n\t\t\tlaudo.setDthrInicioValidade(prescricao.getDthrInicio());\r\n\r\n\t\t\tDate dataFimValidade = prescricao.getDthrInicio();\r\n\t\t\tif (procedimento.getDuracaoTratamentoSolicitado() != null) {\r\n\t\t\t\tdataFimValidade = DateUtil.adicionaDias(dataFimValidade,\r\n\t\t\t\t\t\tprocedimento.getDuracaoTratamentoSolicitado()\r\n\t\t\t\t\t\t\t\t.intValue() - 1);\r\n\t\t\t}\r\n\t\t\tlaudo.setDthrFimValidade(dataFimValidade);\r\n\t\t\tlaudo.setDthrFimPrevisao(dataFimValidade);\r\n\r\n\t\t\tlaudo.setJustificativa(procedimento.getJustificativa());\r\n\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\tlaudo.setImpresso(false);\r\n\t\t\tlaudo.setDuracaoTratSolicitado(procedimento\r\n\t\t\t\t\t.getDuracaoTratamentoSolicitado());\r\n\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\tlaudo.setPrescricaoProcedimento(procedimento);\r\n\t\t\tlaudo.setProcedimentoHospitalarInterno(procedimentosMap\r\n\t\t\t\t\t.get(procedimento));\r\n\r\n\t\t\tthis.adicionarLaudoLista(laudoList, laudo);\r\n\r\n\t\t}\r\n\r\n\t}", "private void acabarJogo() {\n\t\tif (mapa.isFimDeJogo() || mapa.isGanhouJogo()) {\r\n\r\n\t\t\tthis.timer.paraRelogio();\r\n\r\n\t\t\tif (mapa.isFimDeJogo()) {//SE PERDEU\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"VOCÊ PERDEU\", \"FIM DE JOGO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t} else {//SE GANHOU\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\t\t\"PARABÉNS \" + this.nomeJogador + \"! \" + \"TODAS AS BOMBAS FORAM ENCONTRADAS\", \"VOCÊ GANHOU\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tiniciarRanking();//SE VENCEU MANDA O JOGADOR PRO RANKING\r\n\t\t\t}\r\n\t\t\tthis.voltarMenu();//VOLTA PRO MENU\r\n\r\n\t\t}\r\n\t}", "public void generarCuestionario() {\n setLayout(null);\n \n setTitle(\"Cuestionario de Fin de Curso\"); \n \n //Con el modelo construido debemos representar uestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n \n Opcion op1 = new Opcion();\n op1.setTitulo(\"Londres\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"Roma\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Paris\");\n op3.setCorrecta(true);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Oslo\");\n op4.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Cual es la capital de Francia\");\n p1.setOpciones(opciones);\n \n //Opiciones de la pregumta Numero 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Atlantico\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Indico\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Artico\");\n op23.setCorrecta(false);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Pacifico\");\n op24.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Cual es el oceano más grande del mundo?\");\n p2.setOpciones(opciones2);\n \n //Opiciones de la pregumta Numero 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"Cristobal Colon\");\n op31.setCorrecta(true);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Cristobal Nodal\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Cuahutemoc blanco\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Cuahutemoc\");\n op34.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien descubrio América?\");\n p3.setOpciones(opciones3);\n \n //Opiciones de la pregumta Numero 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"Fernanflo\");\n op41.setCorrecta(false);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Polinesios\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"Eh vegeta\");\n op43.setCorrecta(true);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Willyrex\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Quien es el mejor youtuber?\");\n p4.setOpciones(opciones4);\n \n //Opiciones de la pregumta Numero 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Amarillo patito\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Verde Sherec\");\n op52.setCorrecta(false);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Rojo me faltas tú\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Azul\");\n op54.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5 = {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿De que color es el cielo?\");\n p5.setOpciones(opciones5);\n \n //Opiciones de la pregumta Numero 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"200\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"100\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"45\");\n op63.setCorrecta(true);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"13\");\n op64.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿De cuantas localidades se compone una memoria de 8x5?\");\n p6.setOpciones(opciones6);\n \n //Opiciones de la pregumta Numero 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Try - Catch\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"IF\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Switch - Case\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"For anidado\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que estructura condicional se recomienda usar menos en una interfaz de usuario?\");\n p7.setOpciones(opciones7);\n \n //Opiciones de la pregumta Numero 8\n Opcion op81 = new Opcion();\n op81.setTitulo(\"Access\");\n op81.setCorrecta(false);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Oracle\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"MySQL\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Mongo DB\");\n op84.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Es una base de datos no relacional de uso moderno?\");\n p8.setOpciones(opciones8);\n \n //Opiciones de la pregumta Numero 9\n Opcion op91 = new Opcion();\n op91.setTitulo(\"GitHub\");\n op91.setCorrecta(true);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"MIcrosoft teams\");\n op22.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Zoom\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"Collaborate\");\n op94.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿Es una plataforma para trabajo en línea?\");\n p9.setOpciones(opciones9);\n\n //Opiciones de la pregumta Numero 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Prog. a nivel maquina\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Prog. orientada a objetos\");\n op102.setCorrecta(true);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"MySQL\");\n op103.setCorrecta(false);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"C++\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que aprendi en este curso?\");\n p10.setOpciones(opciones10);\n\n\n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n\n //Se agrega a este list la unica prgunta que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n c.setPreguntas(preguntas);\n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la preunta\n mostrarPregunta(preguntaActual);\n \n Salir.setVisible(false);\n siguiente.setEnabled(false);\n \n }", "public RepositorioAvioes() {\n avioes = new ArrayList<Aviao>();\n }", "public void creatOnt(List<Promoter> pros){\r\n\t\tString nameuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Name\";\r\n\t\tString authoruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Author\";\r\n\t\tString iduri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Identifier\";\r\n\t\tString linkuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Link\";\r\n\t\tString locuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Location\";\r\n\t\tString titleuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Title\";\r\n\t\t\r\n\t\tString activeuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#active\";\r\n\t\tString fromspeciesuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#fromSpecies\";\r\n\t\tString hasgouri = \"http://miuras.inf.um.es/ontologies/OGO.owl#hasGO\";\r\n\t\tString hashomologyuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasHomolgy\";\r\n\t\tString haskeyworduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasKeywords\";\r\n\t\tString haspromoteruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasPromoter\";\r\n\t\tString hasreferenceuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#hasReference\";\r\n\t\tString hasresourceuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#hasResource\";\r\n\t\tString isbelongeduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isBelongedTo\";\r\n\t\tString isexpresseduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isExpressedTo\";\r\n\t\tString istranscribeduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#isTranscribedTo\";\r\n\t\tString istranslateduri = \"http://miuras.inf.um.es/ontologies/OGO.owl#isTranslatedTo\";\r\n\t\t\r\n\t\tString gouri = \"http://miuras.inf.um.es/ontologies/OGO.owl#GO_term\";\r\n\t\tString geneuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Gene\";\r\n\t\tString homologyuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Homology\";\r\n\t\tString keyworduri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Keyword\";\r\n\t\tString taxonomyuri = \"http://um.es/ncbi.owl#NCBI_1\";\r\n\t\tString promoteruri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Promoter\";\r\n\t\tString proteinuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Protein\";\r\n\t\tString referenceuri = \"http://miuras.inf.um.es/ontologies/promoter.owl#Reference\";\r\n\t\tString resourceuri = \"http://miuras.inf.um.es/ontologies/OGO.owl#Resource\";\r\n\t\tString mrnauri = \"http://miuras.inf.um.es/ontologies/promoter.owl#mRNA\";\r\n\t\t\r\n\t\tSimpleExample se = new SimpleExample();\r\n\t\tOntModel onmo = null;\r\n\t\ttry {\r\n\t\t\tonmo = se.loadDB2nd();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tint index = 1;\r\n\t\tfor(Promoter pro: pros){\r\n\t\t\t// Create new individual of promoter;\r\n\t\t\tIndividual newproidv = se.CreateandGetIdv(\r\n\t\t\t\t\tpromoteruri + \"_\" + pro.getName(),\r\n\t\t\t\t\tpromoteruri, onmo);\r\n\t\t\t// Create the relation between promoter and homology\r\n\t\t\tif(pro.getHomology().getId().trim().length()>0){\r\n\t\t\t\tIndividual homoidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\thomologyuri + \"_\" + pro.getHomology().getId(),\r\n\t\t\t\t\t\thomologyuri, onmo);\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hashomologyuri, homoidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the reference individual and the relation to promoter\r\n\t\t\tfor(Reference ref : pro.getReferences()){\r\n\t\t\t\tIndividual refidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\treferenceuri + \"_\" + ref.getPubmed(),\r\n\t\t\t\t\t\treferenceuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), authoruri, ref.getAuther());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), titleuri, ref.getTitle());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), iduri, ref.getPubmed());\r\n\t\t\t\tse.addDataProperty(onmo, refidv.getURI(), locuri, ref.getLocation());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hasreferenceuri, refidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the resource individual and the relation to promoter\r\n\t\t\tfor(Resource res : pro.getResources()){\r\n\t\t\t\tIndividual residv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tresourceuri + \"_\" + res.getId(),\r\n\t\t\t\t\t\tresourceuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), nameuri, res.getDataset());\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), linkuri, res.getLink());\r\n\t\t\t\tse.addDataProperty(onmo, residv.getURI(), iduri, res.getId());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), hasresourceuri, residv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the keyword individual and the relation to promoter\r\n\t\t\tfor(Keyword kwd : pro.getKeywords()){\r\n\t\t\t\tIndividual kwdidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tkeyworduri + \"_\" + kwd.getKeyword(),\r\n\t\t\t\t\t\tkeyworduri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, kwdidv.getURI(), nameuri, kwd.getKeyword());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), haskeyworduri, kwdidv.getURI());\r\n\t\t\t}\r\n\t\t\t//create the gene individual and the relative individuals to the gene\r\n\t\t\t//create the relation between the gene individual and the relative individuals to the gene and the promoter\r\n\t\t\tfor(Gene gen: pro.getGenes()){\r\n\t\t\t\t//create the gene individual and the relation to promoter\r\n\t\t\t\tIndividual genidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tgeneuri + \"_\" + gen.getId(),\r\n\t\t\t\t\t\tgeneuri, onmo);\r\n\t\t\t\tse.addDataProperty(onmo, genidv.getURI(), iduri, gen.getId());\r\n\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), haspromoteruri, newproidv.getURI());\r\n\t\t\t\tse.addObjProperty(onmo, newproidv.getURI(), isbelongeduri, genidv.getURI());\r\n\t\t\t\t//create or get the go individual and the relation to gene\r\n\t\t\t\tfor(GO ngo: gen.getGos()){\r\n\t\t\t\t\tIndividual goidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\tse.OGO_PREFIX + \"#GO_\" + ngo.getId(),\r\n\t\t\t\t\t\t\tgouri, onmo);\r\n\t\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), hasgouri, goidv.getURI());\r\n\t\t\t\t}\r\n\t\t\t\t//create or get the taxonomy individual and the relation to gene\r\n\t\t\t\tIndividual taxidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\tse.NCBI_PREFIX + \"#NCBI_\" + gen.getTaxonomy().getId(),\r\n\t\t\t\t\t\ttaxonomyuri, onmo);\r\n\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), fromspeciesuri, taxidv.getURI());\r\n\t\t\t\t//create the mRNA and protein individual and the relation to gene\r\n\t\t\t\tfor(int i = 0; i<=gen.getMrnas().size()-1; i++){\r\n\t\t\t\t\tString rnaid = gen.getMrnas().get(i).getId();\r\n\t\t\t\t\tif(!rnaid.equals(\"-\")){\r\n\t\t\t\t\t\tIndividual rnaidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\tmrnauri + \"_\" + rnaid,\r\n\t\t\t\t\t\t\tmrnauri, onmo);\r\n\t\t\t\t\t\tse.addDataProperty(onmo, rnaidv.getURI(), iduri, rnaid);\r\n\t\t\t\t\t se.addObjProperty(onmo, genidv.getURI(), istranscribeduri, rnaidv.getURI());\r\n\t\t\t\t\t se.addObjProperty(onmo, newproidv.getURI(), activeuri, rnaidv.getURI());\r\n\t\t\t\t\t String prnid = gen.getProteins().get(i).getId();\r\n\t\t\t\t\t if(!prnid.equals(\"-\")){\r\n\t\t\t\t\t \tIndividual prnidv = se.CreateandGetIdv(\r\n\t\t\t\t\t\t\t\t\tproteinuri + \"_\" + rnaid,\r\n\t\t\t\t\t\t\t\t\tproteinuri, onmo);\r\n\t\t\t\t\t\t\tse.addDataProperty(onmo, prnidv.getURI(), iduri, prnid);\r\n\t\t\t\t\t\t\tse.addObjProperty(onmo, genidv.getURI(), isexpresseduri, prnidv.getURI());\r\n\t\t\t\t\t\t\tse.addObjProperty(onmo, rnaidv.getURI(), istranslateduri, prnidv.getURI());\r\n\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(index+++\".\t\"+\"Promoter: \"+pro.getName()+\" finished!\");\r\n\t\t}\r\n\t}", "public GrapheIndicateursProjet (Projet p) {\n seuils = p.getSeuilFixes() ;\n \n // pour l'echelle, on determine les mesures max de toutes les iterations\n \n \n iterations = p.getListeIt() ; \n nbIt = iterations.size() ;\n \n // calcul des maximums\n Iteration tempIt = null ;\n IndicateursIteration tempIndIt = null ;\n for (int i = 0 ; i < nbIt ; i++)\n {\n if (iterations.get(i) instanceof Iteration)\n {\n tempIt = (Iteration)iterations.get(i) ;\n tempIndIt = tempIt.getIndicateursIteration() ;\n // charges\n if (tempIndIt.getTotalCharges() > chargesMax) { chargesMax = tempIndIt.getTotalCharges() ; }\n\t\tif (tempIndIt.getChargeMoyenneParticipants() > moyenneChargesMax) { moyenneChargesMax = tempIndIt.getChargeMoyenneParticipants() ; }\n\t\tif (tempIndIt.getNombreParticipants() > participantsMax) { participantsMax = tempIndIt.getNombreParticipants() ; }\n\t\tif (tempIndIt.getNombreTachesTerminees() > tachesTermineesMax) { tachesTermineesMax = tempIndIt.getNombreTachesTerminees() ; }\n\t\tif (tempIndIt.getNombreMoyenTachesParticipants() > tachesParticipantsMax) { tachesParticipantsMax = tempIndIt.getNombreMoyenTachesParticipants() ; }\n\t\tif (tempIndIt.getDureeMoyenneTaches() > dureeMoyenneTacheMax) { dureeMoyenneTacheMax = tempIndIt.getDureeMoyenneTaches() ; }\n }\n }\n setPreferredSize(new Dimension(ITERATION_WIDTH * nbIt,440));\n\t//setBorder(new TitledBorder(new EtchedBorder(), \"toto\", 5, TitledBorder.ABOVE_TOP)) ;\n }", "public void Ordenamiento() {\n\n\t}", "public void colorearSecuencialAlternativo() {\n\t\tint color;\n\t\tcantColores = 0;\n\t\tfor (int i = 0; i < cantNodos; i++) {\n\t\t\tcolor = 1;\n\t\t\t/** Mientras el color no se pueda usar, elijo otro color **/\n\t\t\twhile (!sePuedeColorear(i, color))\n\t\t\t\tcolor++;\n\n\t\t\tnodos.get(i).setColor(color);\n\n\t\t\tif (color > cantColores)\n\t\t\t\tcantColores = color;\n\t\t}\n\t}", "public static void libertarPagina(PCB processo) {\n\n for (Pagina pagina : Paginas) {\n if (processo.getPid() == pagina.getPagina_pid()) {\n pagina.setAlocado(false);\n pagina.setPagina_pid(-1);\n pagina.setEspacoVazio(VirtualMemory.tamanho_pagina);\n\n }\n }\n processo.setMemoriaOcupada(0);\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "private static void ordenamientoMezclaNatural(Comparable[] a, int primero, int ultimo) {\r\n\t\tint i = primero;\r\n\t\tint j = 0;\r\n\t\tint medio = 0;\r\n\t\tint az = 0;\r\n\t\twhile(true) {\r\n\t\t\ti = 0;\r\n\t\t\twhile(i < a.length) {\r\n\t\t\t\tif( i == a.length - 1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else if(a[i].compareTo(a[i + 1]) > 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tj ++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//medio = primero + ( j - primero) / 2;\r\n\t\t\t\r\n\t\t\tMezcla(a, primero, i, j);\r\n\t\t\tprimero = 0;\r\n\t\t\t\r\n\t\t\tif(estaOrdenado(a)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void trancribirPistas() {\r\n\t\t\r\n\t\tfor (int x = 0; x<manejadorArchivos.getPistas().size();x++) {\r\n\t\t\t\r\n\t\t\tpistas.add(manejadorArchivos.getPistas().get(x));\t\r\n\t\t}\r\n\t}", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "public FacturaCompra pagoPSE(String userName,TipoMoneda tipoMoneda);", "private Punto getPuntoCercano(Punto puntoini, List<Punto> puntos ){\n\t\t\t\n\t\t List<Segmento> segmentos = new ArrayList<Segmento>();\n\t\t\t// todos contra todos\n\t\t\tfor (Punto punto : puntos) {\n\t\t\t\tif( (puntoini!=null && punto!=null) && !puntoini.equals(punto) ){\n\t\t\t\t\t\tdouble d = Geometria.distanciaDeCoordenadas(puntoini, punto);\n\t\t\t\t\t\tsegmentos.add(new Segmento(puntoini, punto, d));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tCollections.sort(segmentos);\n\t\t\tPunto puntocerano = segmentos.get(0).getPunto2();\n\t\t \n\t\t return puntocerano;\n\t\t \n\t }", "public void aumentarReproducidas() {\n\t\tsuper.aumentarReproducidas();\n\n\t}", "private void zmienne_poziomu(int poziom)\n {\n liczba_zyc =Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc\"));\n liczba_naboi=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_naboi\"));\n liczba_zyc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_zyc_wroga\"));\n liczba_pilek=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_liczba_pilek\"));\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_predkosc_wroga\"));\n bonusy_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_bonusy_poziomu\"));\n rozmiar_pilki=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_rozmiar_pilki\"));\n zmiana_ruchu_wroga=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_zmiana_ruchu_wroga\"));\n czas_gry=Integer.parseInt(konfiguracja.properties.getProperty(poziom+\"_czas_gry\"));\n }", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }", "public void procesarCajas() {\n\t\tCollections.sort(destinos, Collections.reverseOrder());\n\t\t// si tengo mas o igual vias que periodos el problema se acaba aca\n\t\tif (this.destinos.size() > 1) {\n\t\t\tasignarDestinosAScannersHijos();\n\t\t\tactualizarNumeroProcesamientoDestinos();\n\t\t}\n\t\tsetearEnQuePasadaSeMataronLosDestinos();\n\t\tprocesarScannerHijos();\n\t}", "public void inicializar() {\n\t\tarestas.forEach(aresta -> {\n\t\t\taresta.getOrigin().atribuirPesoInicial();\n\t\t\taresta.getTarget().atribuirPesoInicial();\n\t\t});\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public int getPrecios()\r\n {\r\n for(int i = 0; i < motos.size(); i++)\r\n {\r\n precio_motos += motos.get(i).getCoste();\r\n }\r\n \r\n return precio_motos;\r\n }", "public void mostrarPiezas() {\n\t\ttry {\n\t\t\tXPathQueryService consulta = \n\t\t\t\t\t(XPathQueryService) \n\t\t\t\t\tcol.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tResourceSet r = consulta.query(\"/piezas/pieza\");\n\t\t\tResourceIterator i = r.getIterator();\n\t\t\twhile(i.hasMoreResources()) {\n\t\t\t\tSystem.out.println(i.nextResource().getContent());\n\t\t\t}\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\n\t\tPerro p1=new Perro();\r\n\t\tPerro p2 =new Perro(\"Chucho\", \"Pastor Aleman\", 3,true);\r\n\t\tPerroPresa pp1=new PerroPresa();\r\n\t\tPerroPresa pp2=new PerroPresa(\"Dientes\",\"pitbull\",5,true);\r\n\t\tpp1.setNombre(\"ŅamŅam\");\r\n\t\tp1.setEdad(-3);\r\n\t\tSystem.out.println(p1.toString());\r\n\t\tSystem.out.println(p2.toString());\r\n\t\tSystem.out.println(pp1.toString());\r\n\t\tpp1.atacar();\r\n\t\tSystem.out.println(pp2.toString());\r\n\t\tpp2.atacar();\r\n\t}", "private void getArquivo()\n {\n /*** Obtem o conteudo do pacote através do diretorio ***/\n File file = new File(caminho_origem);\n if (file.isFile())\n {\n try\n {\n /*** Lê o pacote e põe em um array de bytes ***/\n DataInputStream diStream = new DataInputStream(new FileInputStream(file));\n long len = (int) file.length();\n if (len > Utils.tamanho_maximo_arquivo)\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_muito_grande);\n System.exit(0);\n }\n Float numero_pacotes_ = ((float)len / Utils.tamanho_util_pacote);\n int numero_pacotes = numero_pacotes_.intValue();\n int ultimo_pacote = (int) len - (Utils.tamanho_util_pacote * numero_pacotes);\n int read = 0;\n /***\n 1500\n fileBytes[1500]\n p[512]\n p[512]\n p[476]len - (512 * numero_pacotes.intValue())\n ***/\n byte[] fileBytes = new byte[(int)len];\n while (read < fileBytes.length)\n {\n fileBytes[read] = diStream.readByte();\n read++;\n }\n int i = 0;\n int pacotes_feitos = 0;\n while ( pacotes_feitos < numero_pacotes)\n {\n byte[] mini_pacote = new byte[Utils.tamanho_util_pacote];\n for (int k = 0; k < Utils.tamanho_util_pacote; k++)\n {\n mini_pacote[k] = fileBytes[i];\n i++;\n }\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(mini_pacote);\n this.pacotes.add(pacote_);\n pacotes_feitos++;\n }\n byte[] ultimo_mini_pacote = new byte[ultimo_pacote];\n int ultimo_indice = ultimo_mini_pacote.length;\n for (int j = 0; j < ultimo_mini_pacote.length; j++)\n {\n ultimo_mini_pacote[j] = fileBytes[i];\n i++;\n }\n byte[] ultimo_mini_pacote2 = new byte[512];\n System.arraycopy(ultimo_mini_pacote, 0, ultimo_mini_pacote2, 0, ultimo_mini_pacote.length);\n for(int h = ultimo_indice; h < 512; h++ ) ultimo_mini_pacote2[h] = \" \".getBytes()[0];\n Pacote pacote_ = new Pacote();\n pacote_.setConteudo(ultimo_mini_pacote2);\n this.pacotes.add(pacote_);\n this.janela = new HashMap<>();\n for (int iterator = 0; iterator < this.pacotes.size(); iterator++) janela.put(iterator, new Estado());\n } catch (Exception e)\n {\n System.out.println(Utils.prefixo_cliente + Utils.erro_na_leitura);\n System.exit(0);\n }\n } else\n {\n System.out.println(Utils.prefixo_cliente + Utils.arquivo_inexistente);\n System.exit(0);\n }\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "public Coloca_imagen(){\n \n \n }", "public static void MenuPrincipal() {\n System.out.println(\"Ingrese Opcion deseada :.\\n\"\r\n + \"1. Ingresar un perro a la guardería.\\n\"\r\n + \"2. Contar cuántos Perros de la raza y el Genero deceado hay o pasaron por la guardería durante el verano.\\n\"\r\n + \"3. Listar todos los perros (con su respectiva información) que ingresaron en una determinada fecha.\\n\"\r\n + \"4. Listar todos los Perrros de la Raza que decea con estadía mayor a 20 días.\\n\"\r\n + \"5. Dado el código de un perro, informar los datos de su dueño.\\n\"\r\n + \"6. Terminar.\\n\"\r\n +\"______________________________________________________________________________________________________________\"\r\n \r\n );\r\n\r\n }", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}" ]
[ "0.6290054", "0.62563396", "0.6178946", "0.5964304", "0.5891925", "0.58181846", "0.5806831", "0.5805247", "0.5769042", "0.5764836", "0.57428753", "0.57277954", "0.57227576", "0.57170594", "0.5700794", "0.56941897", "0.56818736", "0.56730026", "0.56716824", "0.5668874", "0.5644375", "0.5634797", "0.56257993", "0.56167173", "0.561543", "0.5614865", "0.5613457", "0.56041425", "0.5603476", "0.5591617", "0.5585309", "0.5558687", "0.5558208", "0.5555843", "0.5546761", "0.5546289", "0.55424887", "0.5541229", "0.5537604", "0.55331165", "0.55299354", "0.5523742", "0.55192536", "0.5512574", "0.5506937", "0.550344", "0.5502077", "0.5500076", "0.5499321", "0.549898", "0.54951096", "0.5488962", "0.54886407", "0.54876167", "0.5471229", "0.5470712", "0.5467721", "0.5462103", "0.5460784", "0.54599315", "0.5458686", "0.5458033", "0.5456121", "0.5453178", "0.54510766", "0.54438007", "0.5439512", "0.5436001", "0.5435712", "0.5434596", "0.5433364", "0.5432251", "0.5430975", "0.54256856", "0.5423523", "0.54220885", "0.542177", "0.54198325", "0.54185903", "0.541704", "0.5416256", "0.5414009", "0.5411384", "0.54100806", "0.5407085", "0.5405377", "0.5404899", "0.54042", "0.5401247", "0.53989005", "0.5397517", "0.53968215", "0.5392931", "0.53903717", "0.53886795", "0.53822196", "0.53771305", "0.53768903", "0.53767914", "0.53745365", "0.5371676" ]
0.0
-1
PROIBI CACHORRO COM AGRESSIVIDADE
public String validaAgressividade() { if (this.agressividade>10 || this.agressividade<1) {// ALTA. return "Agressividade deve variar de 1 a 10"; } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Agencia abrirAgencia() {\n Agencia a = new Agencia(\"\" + numeroProximaAgencia++,this,10);\n boolean agenciaAdicionada = adicionaArrayAgencias(a);\n if (agenciaAdicionada) {\n return a;\n } else {\n return null;\n }\n }", "public Arquero(){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate List<PromocionConcursoAgr> traerPromocionConcursoAgrAsignados() {\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tLong id = puestoAgr.getIdConcursoPuestoAgr();\r\n\t\tif (puestoAgr != null && puestoAgr.getIdConcursoPuestoAgr() != null) {\r\n\t\t\tString cadena = \"select distinct(puesto_det.*) \"\r\n\t\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t\t+ \"join seleccion.concurso_puesto_agr puesto_agr \"\r\n\t\t\t\t\t+ \"on puesto_agr.id_concurso_puesto_agr=puesto_det.id_concurso_puesto_agr \"\r\n\t\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t\t+ \"where puesto_det.nro_orden = 3 \"\r\n\t\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t\t;\r\n\r\n\t\t\tcadena = cadena + \" and puesto_agr.id_concurso_puesto_agr = \"\r\n\t\t\t\t\t+ puestoAgr.getIdConcursoPuestoAgr();\r\n\r\n\t\t\tlista = em.createNativeQuery(cadena, PromocionConcursoAgr.class)\r\n\t\t\t\t\t.getResultList();\r\n\t\t\tPromocionSalarialAgrupados = new ArrayList<ConcursoPuestoAgr>();\r\n\t\t\tfor (PromocionConcursoAgr o : lista) {\r\n\t\t\t\tPromocionSalarialAgrupados.add(o.getConcursoPuestoAgr());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn lista;\r\n\t}", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "public QuadradoVerdeLosango(Posicao umaPosicao) {\n super(\"quadradoVerdeLosango.png\");\n this.setPosicao(umaPosicao);\n bTransponivel = false;\n bQuebravel = true;\n bMovivel = true;\n }", "public void gerarReceitaLiquidaIndiretaDeAgua() \n\t\t\tthrows ErroRepositorioException;", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "private void cargarContrarreferencia() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& !admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTRAREFERENCIA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTRAREFERENCIA, parametros);\r\n\t\t}\r\n\r\n\t}", "Activite getActiviteCourante();", "public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }", "@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\n }", "@Override\n\tpublic boolean puedoAtacar(ElementoPiedra a) {\n\t\treturn true;\n\t}", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public SocioAdulto() {\n super();\n this.dirigente = DIRIGENTE_POR_DEFEITO;\n this.IDAdulto = tagAdulto + SAContador;\n SAContador ++;\n }", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "public void obtener_proximo_cpte(){\n\t\t_Data data=(_Data) _data;\n\t\tString cb=data.getProximoPGCorrecto();\n\t\t//Pago_frame _frame=(Pago_frame) this._frame;\n\t\tframe.get_txt_idPago().setText(cb);\n\t}", "public void aggiungiPecoraCasualmente() {\n\t\tif (((int) (Math.random() * 3)) >= 1) {\n\t\t\tPecoraAdulta nuovaPecoraAdulta = new PecoraAdulta();\n\t\t\tpecore.add(nuovaPecoraAdulta);\n\t\t\tif (nuovaPecoraAdulta.isMaschio())\n\t\t\t\tnumMontoni++;\n\t\t\telse\n\t\t\t\tnumPecoreFemmine++;\n\t\t} else {\n\t\t\tpecore.add(new Agnello());\n\t\t\tnumeroAgelli++;\n\t\t}\n\t}", "public Conta(String numero, String agencia) { // Construtor 1\n this.numero = numero;\n this.agencia = agencia;\n this.saldo = 0.0;\n }", "@Override\n\tpublic int sacameVida(ElementoAlien a) {\n\t\treturn 20;\n\t}", "public Via getViaComienzo() {\n\t\treturn viaComienzo;\n\t}", "@Override\r\n\tprotected void agregarObjeto() {\r\n\t\t// opcion 1 es agregar nuevo justificativo\r\n\t\tthis.setTitle(\"PROCESOS - PERMISOS INDIVIDUALES (AGREGANDO)\");\r\n\t\tthis.opcion = 1;\r\n\t\tactivarFormulario();\r\n\t\tlimpiarTabla();\r\n\t\tthis.panelBotones.habilitar();\r\n\t}", "Reserva Obtener();", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public void attaque(Personnage p,int x, int y, int xApres, int yApres, Case[][] tableauIle, Affichage affichage, int equipe){\n\t\tRandom random=new Random();\n\t\tif (this.getObjetInventaire(\"Epee\")){\n\t\t\t//il fait plus de dommage s'il a une epee\t\n\t\t\tint degat=5*random.nextInt(7);\n\t\t\tif(!p.perteEnergie(degat, xApres, yApres, tableauIle, true, false, affichage, equipe)){\n\t\t\t\t//Verifie que le personnage ne meurt pas de la perte d'energie\n\t\t\t\taffichage.popUp(equipe,\"Vous avez inflige \"+degat+\" points de degats a votre cible\", \"ATTAQUE\" );\n\t\t\t}else{\n\t\t\t\taffichage.popUp(equipe,\"Vous avez reussi a tuer votre cible\", \"ATTAQUE\" );\n\t\t\t}\n\t\t}else{\n\t\t\t//fait moins de dommage comme le guerrier se bat avec ses poings\t\n\t\t\tint degat=random.nextInt(7);\n\t\t\tif(!p.perteEnergie(degat, xApres, yApres, tableauIle, true, false,affichage, equipe)){\n\t\t\t\t//Verifie que le personnage ne meurt pas de la perte d'energie\n\t\t\t\taffichage.popUp(equipe,\"Vous combattez à main nues... Vous avez infliger \"+degat+\" points de degats a votre cible\", \"ATTAQUE\" );\n\t\t\t}else{\n\t\t\t\taffichage.popUp(equipe,\"Vous avez reussi a tuer votre cible\", \"ATTAQUE\" );\n\t\t\t}\n\t\t}\n\t\tsuper.perteEnergie(10, x,y, tableauIle, false, false,affichage, equipe);\n\t}", "public abstract java.lang.String getAcma_descripcion();", "public QuadradoVerdeLosango(Posicao umaPosicao, boolean powerUp) {\n super(\"quadradoVerdeLosango.png\");\n this.setPosicao(umaPosicao);\n bTransponivel = false;\n bQuebravel = true;\n bPowerUp = powerUp;\n }", "public Conta (int numero, int agencia) {\n this.numero = numero;\n this.agencia = agencia;\n System.out.println(\"Seu número de agência e conta são, respectivamente: \" + getNumero() + \", \"\n + getAgencia() + \"e do tipo: \" + tipo() );\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "public java.lang.String getCodigo_agencia();", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "public RecordSet obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n // gPineda - V-COB006 - 30/01/2007\n //query.append(\" SELECT OID_ETAP_DEUD_TIPO_CARG AS OID, VAL_DESC descripcion \");\n query.append(\" SELECT oid_etap_deud_tipo_carg AS OID, NVL(val_desc, gen.VAL_I18N) descripcion \");\n query.append(\" FROM cob_etapa_deuda_tipo_cargo etapTipoCar, \");\n query.append(\" \t\t ccc_tipo_cargo_abono tipoCar, \");\n query.append(\" \t\t gen_i18n_sicc_pais gen \");\n query.append(\" WHERE ETDE_OID_ETAP_DEUD = \" + dtoe.getOid() );\n query.append(\" \t and etapTipoCar.TCAB_OID_TIPO_CARG_ABON = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.VAL_OID = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.ATTR_ENTI = 'CCC_TIPO_CARGO_ABONO' \");\n query.append(\" \t\t and gen.ATTR_NUM_ATRI = 1 \");\n query.append(\" ORDER BY descripcion \");\n \n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Salida\");\n \n return rs; \n }", "public Dinamica(){\n\t\tprimer=null;\n\t\tanterior=null;\n\t\tn_equips = 0;\n\t\t\n\t}", "@Override\n\tpublic void apagar() {\n\t\tSystem.out.println(\"Apagando Computadora\");\n\t}", "public Arquero(Casillero casillero){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n ubicacion = new ArrayList<Casillero>();\n this.ubicacion.add(casillero);\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "public String getRazaN(){\n return razaP1.nombre1();\n }", "public Torretta1(int danno, int x, int y, ArrayList<Proiettile> proiettili) {\r\n super();\r\n velocitàAttacco = 5000;\r\n attacco = danno;\r\n this.proiettili = proiettili;\r\n this.x = x * 40;\r\n this.y = y * 40 - 40;\r\n range = new Ellipse2D.Double();\r\n range.setFrame(this.x - 40, this.y - 40, 119, 119);\r\n temposparo = 200;\r\n finestrasparo = 0;\r\n costoAcquisto = 10;\r\n tipo='a';\r\n }", "public Rainha(Casa casa, CorDaPeca cor)\n {\n // public static final int RAINHA = 3;\n super(casa, TipoDaPeca.RAINHA, cor);\n \n }", "public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public void acionarInadimplencia(CestaGarantiasDO cesta);", "public Proceso atender() {\n\t\tProceso proceso = raiz.sig;\n\t\tif (proceso == this.raiz) {\n\t\t\tSystem.out.println(\"Cola Vacia\");\n\t\t\treturn null;\n\t\t}\n\t\tProceso sig = proceso.sig;\n\t\tProceso padre = raiz;\n\t\tpadre.sig = sig;\n\t\tsig.padre = padre;\n\t\tcabeza = sig;\n\t\tthis.numProcesos--;\n\t\tthis.calcularTiemposProcesos();\n\t\treturn proceso;\n\t}", "java.lang.String getAdresa();", "public String getIdAeroporto()\n {\n return this.idAeroporto;\n }", "public Cromosoma(ArrayList<Integer> itinerario,int horaAcumulada) {\n\t\tthis._gen = itinerario;\n this._horaAcumulada = horaAcumulada;\n\t\tthis.aptitud = calcularAptitud(itinerario,horaAcumulada);\n }", "public FaseDescartes faseJuego();", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "String getAnnoPubblicazione();", "TypeAssociation getAssocieCommeSujetEvenementNRBC();", "public Conta(String numero, String agencia, Double saldo) { // Construtor 1\n this.numero = numero;\n this.agencia = agencia;\n this.saldo = saldo;\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public void nascitaAgnello() {\n\t\tpecore.add(new Agnello());\n\t\tnumeroAgelli++;\n\t}", "private String creaElenco() {\n String testoTabella ;\n String riga = CostBio.VUOTO;\n ArrayList listaPagine = new ArrayList();\n ArrayList listaRiga;\n HashMap mappaTavola = new HashMap();\n String cognomeText;\n int num;\n int taglioPagine = Pref.getInt(CostBio.TAGLIO_COGNOMI_PAGINA);\n String tag = \"Persone di cognome \";\n ArrayList titoli = new ArrayList();\n titoli.add(LibWiki.setBold(\"Cognome\"));\n titoli.add(LibWiki.setBold(\"Voci\"));\n\n for (Map.Entry<String, Integer> mappa: mappaCognomi.entrySet()) {\n\n cognomeText = mappa.getKey();\n num = mappa.getValue();\n if (num >= taglioPagine) {\n cognomeText = tag + cognomeText + CostBio.PIPE + cognomeText;\n cognomeText = LibWiki.setQuadre(cognomeText);\n cognomeText = LibWiki.setBold(cognomeText);\n }// end of if cycle\n\n listaRiga = new ArrayList();\n listaRiga.add(cognomeText);\n listaRiga.add(num);\n listaPagine.add(listaRiga);\n\n }// end of for cycle\n mappaTavola.put(Cost.KEY_MAPPA_SORTABLE_BOOLEAN, true);\n mappaTavola.put(Cost.KEY_MAPPA_TITOLI, titoli);\n mappaTavola.put(Cost.KEY_MAPPA_RIGHE_LISTA, listaPagine);\n testoTabella = LibWiki.creaTable(mappaTavola);\n\n return testoTabella;\n }", "protected Asignatura()\r\n\t{}", "public Atuendo originarAtuendoCon(Guardarropa guardarropa) {\n\t\t//Agrego las prendas a las distintas listas de prendas, luego recorro cada lista y muestro lo que contienen para mostrar el atuendo.\n\n\n\t\tAtuendo atuendoARetornar= new Atuendo();\n\t\t\n\n\t\tatuendoARetornar = obtenerAtuendo(atuendoARetornar,guardarropa.getPrendas());\n\t\treturn atuendoARetornar;\n\t}", "public Arbol(){\n\t this.esVacio=true;\n\t this.hIzq = null;\n\t this.hDer = null;\n\t}", "public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }", "public abstract java.lang.String getAcma_valor();", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "public abstract java.lang.String getAcma_cierre();", "protected void elaboraPagina() {\n testoPagina = VUOTA;\n\n //header\n testoPagina += this.elaboraHead();\n\n //body\n testoPagina += this.elaboraBody();\n\n //footer\n //di fila nella stessa riga, senza ritorno a capo (se inizia con <include>)\n testoPagina += this.elaboraFooter();\n\n //--registra la pagina principale\n if (dimensioniValide()) {\n testoPagina = testoPagina.trim();\n\n if (pref.isBool(FlowCost.USA_DEBUG)) {\n testoPagina = titoloPagina + A_CAPO + testoPagina;\n titoloPagina = PAGINA_PROVA;\n }// end of if cycle\n\n //--nelle sottopagine non eseguo il controllo e le registro sempre (per adesso)\n if (checkPossoRegistrare(titoloPagina, testoPagina) || pref.isBool(FlowCost.USA_DEBUG)) {\n appContext.getBean(AQueryWrite.class, titoloPagina, testoPagina, summary);\n logger.info(\"Registrata la pagina: \" + titoloPagina);\n } else {\n logger.info(\"Non modificata la pagina: \" + titoloPagina);\n }// end of if/else cycle\n\n //--registra eventuali sottopagine\n if (usaBodySottopagine) {\n uploadSottoPagine();\n }// end of if cycle\n }// end of if cycle\n\n }", "private String organizarCadena (Resultado res){\n String cadena = formatoCadenaTexto(res.getFuncion(),15) +\n formatoCadenaTexto(res.getAlgoritmo(),20) + \n res.getD() + \n \" \" + formatoDecimales(res.getPromedioIteracion(),1,6)+\n \" \" + formatoDecimales(res.getMejor_optimo(),10,10) + \n \" \" + formatoDecimales(res.getPeor_optimo(),10,10) + \n \" \" + formatoDecimales(res.getPromedioOptimos(), 10,10) + \n \" \" + formatoDecimales(res.getDesviacionOptimos(),10,15) + \n \" \" + formatoDecimales(res.getTiempoPromedio(), 3,1); \n return cadena;\n }", "public AsignaturaSemestre (Asignatura Asig, Profesor Profe, List<HorarioAsig> hrrio) {\n asignaturaAsig = Asig ;\n ProfesorAsig = Profe;\n Horario = hrrio;\n }", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public int construir(int pasoSolicitado ) {\n if(tipoTraductor.equals(\"Ascendente\")){\n construirAsc(pasoSolicitado);\n \n }\n else{\n construirDesc(pasoSolicitado);\n }\n contador=pasoSolicitado;\n cadena.actualizarCadena(pasoSolicitado);\n return contador;\n }", "@Override\n protected String elaboraFooterCategorie() {\n String text = CostBio.VUOTO;\n\n text += A_CAPO;\n text += LibWiki.setRigaCat(\"Liste di persone per cognome| \");\n text += LibWiki.setRigaCat(\"Progetto Antroponimi|Cognomi\");\n\n return text;\n }", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "public void carregarAno() {\n\t\tif (usuario.getOrganizacaoMilitar().toString().equals(\"AMAN\")){\n\t\t\tano.addAll(Arrays.asList(Ano.values()));\n\t\t}\n\t\telse if (usuario.getOrganizacaoMilitar().toString().equals(\"ECEME\")){\n\t\t\tano.addAll(Arrays.asList(Ano.values()));\n\t\t\tano.remove(Ano.TERCEIRO);\n\t\t\tano.remove(Ano.QUARTO);\n\t\t}\n\t\telse{\n\t\t\tcarregarRegistroDoPrimeiroAno();\n\t\t}\n\t}", "public RecibeMovimientoComportamiento(Agent a) {\n super(a, MessageTemplate.and(MessageTemplate.MatchProtocol(\n FIPANames.InteractionProtocol.FIPA_PROPOSE),\n MessageTemplate.MatchPerformative(ACLMessage.PROPOSE)));\n }", "public void aumentarReproducidas() {\n\t\tsuper.aumentarReproducidas();\n\n\t}", "String getCADENA_TRAMA();", "public MovimientoPantallaCocina() {\n initComponents();\n \n //COLOCAR FONOD EN LA PANTALLA PARA LA COCINA\n try{\n pnlOrdenes.setBorder(new ImagenCocina());\n } catch (IOException e){\n Logger.getLogger(MovimientoPantallaCocina.class.getName()).log(Level.SEVERE, null, e);\n }\n \n //VISUALIZAR TODAS LAS ORDENES ACTIVAS\n hilo p = new hilo(\"ordenes\");\n p.start();\n }", "@Listen(\"onClick =#asignarEspacioCita\")\n\tpublic void asginarEspacioCita() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "public void VenderCasasOuHoteis(int idPropriedade) throws Exception {\n this.terminarAVez();\n\n if (this.sell == true) {\n if (this.listaJogadores.get(jogadorAtual()).getComandos().contains(\"sell\")) {\n\n if (idPropriedade <= 0 || idPropriedade > 40) {\n throw new Exception(\"Place doesn't exist\");\n }\n\n if (!this.tabuleiro.getLugarById(idPropriedade).isPropriedade()) {\n throw new Exception(\"Can only sell houses built on properties\");\n }\n boolean OJogadorDavezEhDono = this.listaJogadores.get(jogadorAtual()).getPropriedades().contains(this.tabuleiro.getLugarById(idPropriedade).getNome());\n if (OJogadorDavezEhDono) {\n if (this.tabuleiro.getLugarById(idPropriedade).getNivel() == 0) {\n throw new Exception(\"No house is built on this property\");\n }\n } else {\n throw new Exception(\"Player is not the owner of this property\");\n }\n\n //Procedimento De Venda\n\n if (this.tabuleiro.verificaSePodeVenderImovelDoTerreno(idPropriedade) == true) {\n RealizarProtocoloDeVendaDeCasasEHoteis(idPropriedade);\n if(bankruptcy && this.listaJogadores.get(jogadorAtual()).isBankruptcy()){\n adicionaGiveupQuandoPossivel(this.listaJogadores.get(jogadorAtual()));\n }\n if(hipotecaAtiva && verificaSeTemLugarSemConstrucao(listaJogadores.get(jogadorAtual())))\n listaJogadores.get(jogadorAtual()).adicionarComandoHipotecar();\n\n\n } else {\n throw new Exception(\"Uneven distribution of houses\");\n }\n } else {\n throw new Exception(\"Unavailable command\");\n }\n\n\n\n }\n }", "public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }", "public void realiserAcahatProduit() {\n\t\t\n\t}", "public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public static void main(String[] args) {\n Aviso aviso1 = new Aviso();\n \n aviso1.id=1;\n \n aviso1.tipoAviso=\"General\";\n aviso1.titulo=\"Insumos y bienes muebles de laboratorio disponibles\";\n aviso1.texto=\"La Coordinación de Control Técnico de Insumos (COCTI) de la Dirección de Prestaciones Médicas, pone a disposición del personal que realiza investigación el inventario adjunto.\";\n aviso1.resumen=\"Insumos y bienes muebles de laboratorio disponibles por la Coordinación de Control Técnico de Insumos (COCTI)\";\n aviso1.nombre=\"Eduardo Flores Díaz\";\n aviso1.estatusF=\"Vigente\";\n \n aviso1.diaP=02;\n aviso1.mesP=02;\n aviso1.yearP=2020;\n \n aviso1.diaA=02;\n aviso1.mesA=02;\n aviso1.yearA=2020;\n \n aviso1.diaB=02;\n aviso1.mesB=02;\n aviso1.yearB=2021;\n \n System.out.println(aviso1);\n \n Aviso aviso2 = new Aviso();\n \n aviso2.id=2;\n \n aviso2.tipoAviso=\"Conferencia\";\n aviso2.titulo=\"CONFERENCIA DR. COSSARIZZA\";\n aviso2.texto=\"El Dr. Andrea Cossarizza, ofreció a la comunidad IMSS su conferencia “Clinical Applications of Advanced Cytometry” y aprovechó la presencia de investigadores y estudiantes del IMSS para compartir sus últimos resultados de investigación, aún no publicados, sobre VIH y el uso de citometría de flujo.\\n\" +\n\"\\n\" +\n\"Además, invitó a nuestra comunidad a agregarse a la sociedad internacional sobre citometría: ISAC(International Society for the Advancement of Cytometry) y aprovechar los recursos que tienen como:\\n\" +\n\"\\n\" +\n\"Programa de Liderazgo MARYLOU INGRAM SCHOLARS PROGRAM, de 5 años para formación de citomteristas\\n\" +\n\"Iniciativa de innovación CYTO-Innovation apoya a las propuestas innovadoras que contemplan la conversión de ideas en productos comerciales de alto impacto para ayudar a nuevos empresarios a aprovechar la tecnología de citometría\\n\" +\n\"\\n\" +\n\"Además en la ISAC tienen disponibles una serie de manuales e información de punta sobre la citometría para uso libre. El Dr. Cossarizza reiteró la invitación al personal IMSS a vincularse con la Universidad de Módena y su laboratorio aprovechando el prestigio que tiene el Laboratorio de Citometría de Flujo del Centro de Instrumentos del Centro Médico Nacional Siglo XXI.\";\n \n aviso2.resumen=\"Conferencia de Dr. Andrea Cossarizza del tema “Clinical Applications of Advanced Cytometry\\\"\";\n aviso2.nombre=\"Kevin Meza Gonzalez\";\n aviso2.estatusF=\"No Vigente\";\n \n aviso2.diaP=02;\n aviso2.mesP=03;\n aviso2.yearP=2020;\n \n aviso2.diaA=15;\n aviso2.mesA=02;\n aviso2.yearA=2020;\n \n aviso2.diaB=31;\n aviso2.mesB=03;\n aviso2.yearB=2020;\n \n System.out.println(aviso2);\n \n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "@Override\r\n\tpublic boolean lancar(Combativel origem, Combativel alvo) {\r\n DadoVermelho dado = new DadoVermelho();\r\n int valor = dado.jogar();\r\n if(valor < origem.getInteligencia()) {\r\n alvo.defesaMagica(dano);\r\n return true;\r\n }\r\n else {\r\n \tSystem.out.println(\"Voce nao conseguiu usar a magia\");\r\n }\r\n return false;\r\n }", "private String prepararCaducidad() {\n this.getRequestBean1().setCasoNavegacionPostCaducidad(CASO_NAV_POST_CADUCIDAD);\n return CASO_NAV_CADUCIDAD;\n }", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "public Conway(AutomataCelular ac,int fila,int columna){\r\n super(ac,fila,columna);\r\n estadoActual=VIVA;\r\n //decida();\r\n estadoSiguiente=VIVA;\r\n edad=0;\r\n automata.setElemento(fila,columna,(Elemento)this); \r\n color=Color.blue;\r\n }", "public Mostra_Trascrizione(Pagina a, FCPagina cp, Utente ut) throws IOException, ParserConfigurationException, SAXException {\n this.utente = ut;\n this.pagina = a;\n this.acquisizione = a.getAcquisizione();\n this.viewA = cp.ask(ut, this.acquisizione);\n this.viewT = cp.ask(this.acquisizione.getTrascrizione());\n Image image = ImageIO.read(this.viewA.getInput()).getScaledInstance(425, 490, java.awt.Image.SCALE_SMOOTH);\n this.bg = new ImageIcon(image);\n initComponents();\n myInitComponents();\n }", "public void asignarVida();", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "String getArcrole();", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "TypeAssociation getAssocieCommeObjetAdresse();" ]
[ "0.6126185", "0.6085356", "0.60656285", "0.600289", "0.5942466", "0.59305626", "0.59090286", "0.58191293", "0.58142704", "0.58017105", "0.57973486", "0.57848436", "0.5755752", "0.5695711", "0.56571805", "0.5653135", "0.56414056", "0.5637027", "0.56326896", "0.56199366", "0.56176394", "0.56164783", "0.5613465", "0.5605889", "0.5601821", "0.55808425", "0.55626035", "0.554949", "0.5531296", "0.5529492", "0.55283695", "0.5522122", "0.55149925", "0.5514449", "0.55117285", "0.5509984", "0.5509298", "0.5504747", "0.5502976", "0.5501039", "0.5501029", "0.5480104", "0.54774106", "0.54685426", "0.5464983", "0.54556626", "0.5455203", "0.5453821", "0.5449044", "0.54487526", "0.5446219", "0.5443714", "0.5435162", "0.5431515", "0.5414855", "0.54089576", "0.5407951", "0.5397044", "0.53964233", "0.53909224", "0.5390146", "0.5385444", "0.53840077", "0.5381794", "0.53774405", "0.53734845", "0.53730315", "0.5370155", "0.53605205", "0.5351998", "0.5350614", "0.5349367", "0.53480625", "0.5346468", "0.5346112", "0.53434074", "0.5342667", "0.5339647", "0.5339468", "0.53392124", "0.53367406", "0.5336638", "0.5335854", "0.53358537", "0.5333882", "0.5330867", "0.53286463", "0.5327337", "0.5327318", "0.5327114", "0.532299", "0.532114", "0.532093", "0.5318002", "0.5315808", "0.5315475", "0.5314091", "0.53138167", "0.53137267", "0.5312213", "0.5308794" ]
0.0
-1
Capitalize the first letter of the filter key so that it can be used to create a getter
public boolean matches(Object objectToFilter) { filterKey = filterKey.substring(0, 1).toUpperCase() + filterKey.substring(1); String methodName = "get" + filterKey; try { Class parameters[] = {}; Method methodToCall = objectToFilter.getClass().getDeclaredMethod(methodName); try { if (methodToCall.invoke(objectToFilter, parameters).equals(filterValue) == include) { return true; } else { return false; } } catch (IllegalAccessException | InvocationTargetException e) { LOGGER.error("Method " + methodName + "() is either inaccessible or there was an error when invoking"); return false; } } catch (NoSuchMethodException e) { LOGGER.error("Object to be filtered does not contain the method: " + methodName + "()\n" + "Either the object does not contain the field that you want to filter on or there is no public " + "accessor for it."); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}", "String getFilterName();", "static String normalizedNameOf(SdkField<?> field) {\n String name = field.memberName();\n return name.length() > 1 && Ascii.isLowerCase(name.charAt(1))\n ? Ascii.toLowerCase(name.charAt(0)) + name.substring(1)\n : name.toLowerCase(Locale.ROOT);\n }", "private static String capName(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); }", "java.lang.String getFilter();", "@Override\n public String tagKey(String key) {\n String conventionKey = NamingConvention.snakeCase.tagKey(key);\n\n String sanitized = tagKeyChars.matcher(conventionKey).replaceAll(SEPARATOR);\n if (!Character.isLetter(sanitized.charAt(0))) {\n sanitized = \"m_\" + sanitized;\n }\n return sanitized;\n }", "public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}", "@Override\n\tpublic String name() {\n\t\treturn filter.name();\n\t}", "String getFirstName( String key ) {\n return developer.firstName;\n }", "String getFilter();", "public static String getNameFilter() {\r\n return nameFilter;\r\n }", "private String preprocessName(String original){\n\t\t// Remove non-alphabetical characters from the name\n\t\toriginal = original.replaceAll( \"[^A-Za-z]\", \"\" );\n\t\t\t\t\n\t\t// Convert to uppercase to help us ignore case-sensitivity\n\t\toriginal = original.toUpperCase();\n\t\t\n\t\t// Remove all occurences of the letters outlined in step 3\n\t\toriginal = original.substring(0,1) + original.substring(1).replaceAll(\"[AEIHOUWY]\",\"\");\n\t\t\n\t\t// Return the result\n\t\treturn original;\n\t}", "private static String getCamelCasedPropertyName(String propertyName) {\n return propertyName.substring(0, 1).toUpperCase() +\n propertyName.substring(1);\n }", "private String validateAndGetLowerCaseKey(String key) {\n Strings.requireNonNullAndNotEmpty(key);\n return key.toLowerCase(Locale.ROOT);\n }", "private static String toPropertyName(String str) {\n return str.toLowerCase().trim().replaceAll(\" +\", \"_\");\n }", "private String filter(String line) {\n return line.toLowerCase().replaceAll(\"[^a-z]\", \"\");\n }", "protected String getName( String key ){\n\n return ( key.indexOf( '.' ) == -1 )?\n //if there is no instance of . then the key is the name\n key:\n //else get the substring to first dot\n key.substring( 0, key.indexOf( '.' ));\n }", "public static String describe(String fieldName)\r\n {\r\n StringBuffer buf = new StringBuffer();\r\n boolean uppercase = false;\r\n for (int i = 0; i < fieldName.length(); i++)\r\n {\r\n char c = fieldName.charAt(i);\r\n if (Character.isUpperCase(c))\r\n {\r\n if (!uppercase)\r\n buf.append(' ');\r\n buf.append(Character.toLowerCase(c));\r\n uppercase = true;\r\n }\r\n else if (c == '_')\r\n {\r\n buf.append(' ');\r\n uppercase = false;\r\n }\r\n else\r\n {\r\n buf.append(c);\r\n uppercase = false;\r\n }\r\n }\r\n return buf.toString();\r\n }", "@Override\n protected FilterResults performFiltering(CharSequence arg0) {\n String[] tmp = API.it().getKeywords(arg0.toString());\n FilterResults results = new FilterResults();\n results.values = tmp;\n results.count = tmp.length;\n return results;\n }", "@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }", "default String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}", "String normalizeName(String tag) {\n\t\tStringBuffer buf = new StringBuffer();\n\t\t\n\t\tboolean newWord = true;\n\t\t// capitalize first letter of each word\n\t\t// remove -'s and _'s\n\t\tfor (int i = 0; i < tag.length(); i++) {\n\t\t\tchar c = tag.charAt(i);\n\t\t\tif (c == '-' || c == '_') {\n\t\t\t\tnewWord=true;\n\t\t\t} else if (newWord) {\n\t\t\t\tbuf.append(Character.toUpperCase(c));\n\t\t\t\tnewWord = false;\n\t\t\t} else {\n\t\t\t\tbuf.append(c);\n\t\t\t\tnewWord = false;\n\t\t\t}\n\t\t}\n\t\treturn buf.toString().trim();\n\t}", "String getShortNameKey();", "public void firstToUpperCase() {\n \n }", "public String getFilter()\n {\n return encryptionDictionary.getNameAsString( COSName.FILTER );\n }", "Caseless getName();", "public String getFilter();", "private String toPropertyName(String element) {\n String refPropertyName = handleRefProperty(element);\n if (refPropertyName != null) {\n return refPropertyName;\n }\n\n StringBuilder sb = new StringBuilder();\n char[] chars = element.toCharArray();\n boolean upper = true;\n for (char c : chars) {\n if (c == '_' || c == '-' || c == '.') {\n upper = true;\n } else if (upper) {\n sb.append(Character.toUpperCase(c));\n upper = false;\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public TypeFilterHonSearch(String key) {\r\n\t\temptyKey = StringUtils.isEmpty(key);\r\n\t\tif (emptyKey == false) {\r\n\t\t\tkey = key.trim().toLowerCase();\r\n\t\t\tif (key.length() > 0) {\r\n\t\t\t\tif (key.charAt(key.length() - 1) != '*') {\r\n\t\t\t\t\tkey += '*';\r\n\t\t\t\t}\r\n\t\t\t\tpattern = Pattern.compile(StringUtils.replace(key, \"*\", \".*\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n public String toString() {\r\n String prettyName = this.name();\r\n prettyName = prettyName.toLowerCase();\r\n prettyName = Utils.capitalizeFirstLetter(prettyName);\r\n \r\n return prettyName;\r\n }", "private String capitalize(String title) {\n return title.substring(0, 1).toUpperCase() + title.substring(1);\n }", "private String getTitleString(String actionStr)\n\t\t{\n\t\t\treturn (actionStr + \" \" + PATTERN_STR.toLowerCase() + \" : \" + filterKind + \" \" + FILTER_STR);\n\t\t}", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapKeyToItem(String key) {\n return key.substring(this.mPrefixLength);\n }", "String filter(String text)\n {\n return text.trim().toLowerCase();\n }", "public String formatName(String name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();\n }", "private String getFilterUIName(String filterName)\n {\n String prodName = Configuration.getProductName(xMSF);\n String[][] s = new String[][]\n {\n {\n getFilterUIName_(filterName)\n }\n };\n s[0][0] = JavaTools.replaceSubString(s[0][0], prodName, \"%productname%\");\n return s[0][0];\n }", "static String normalizePropertyName(String name, String... ignorePrefixes) {\n if (ignorePrefixes.length > 0) {\n return normalizePropertyName(stripPrefixes(name, ignorePrefixes));\n }\n if (name == null || name.isEmpty()) {\n return name;\n } else if (!name.contains(\".\") && !name.contains(\"-\")) {\n return name;\n } else {\n String[] parts = name.replaceAll(\" \", \"\").split(\"-|\\\\.\");\n StringBuilder sb = new StringBuilder();\n if (parts.length > 0) {\n sb.append(parts[0]);\n for (int i = 1; i < parts.length; i++) {\n String s = parts[i-1].length() > 0 ?\n parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1) :\n parts[i];\n sb.append(s);\n }\n }\n return sb.toString();\n }\n }", "@Override\n\tprotected String getSurroundingKeys(char key) {\n\t\tif((key >= 'a' && key <= 'z') || (key >= 'A' && key <= 'Z')) {\n\t\t\tif(Character.isLowerCase(key))\n\t\t\t\treturn surroundingKeys[key - 'a'];\n\t\t\telse\n\t\t\t\treturn surroundingKeys[Character.toLowerCase(key) - 'a'];\n\t\t}\n\n\t\treturn \"\" + key;\n\t}", "private static String capitalize (String input) {\n\n String output = WordUtils.capitalize(input.toLowerCase());\n\n return output;\n }", "public String getLowercaseFunction() {\n \t\treturn \"lower\";\n \t}", "@Test\n public final void testCapitalize1() {\n Object target = \"abc\";\n String expResult = \"Abc\";\n String result = StringUtils.capitalize(target);\n Assertions.assertEquals(expResult, result);\n }", "@Test\n public void testUnCapitalize1() {\n Object target = \"ABC\";\n String expResult = \"aBC\";\n String result = StringUtils.unCapitalize(target);\n Assertions.assertEquals(expResult, result);\n }", "public static void main(String[] args) {\n Function<String, String> func = text -> text.toLowerCase().trim();\n String original = \" WIELKI NAPIS \";\n //wywołujemy funkcję przekazująć jej oryginał jako parametr\n String loweCaseTrim = func.apply(original);\n System.out.println(loweCaseTrim);\n\n }", "public interface AuthorNames {\n\n static String shortenName(String name) {\n return Arrays.asList(name.split(\" \")).\n stream().\n map(s -> s.substring(0, 1)).collect(Collectors.joining());\n }\n}", "java.lang.String getDataItemFilter();", "@Override\r\n\tpublic String displayElementName(String elementName) {\r\n\t\tString[] words = StringUtils.split(elementName, \"-\");\r\n\t\tList<String> capitalized = new ArrayList<String>();\r\n\t\tfor (String word : words) {\r\n\t\t\tcapitalized.add(StringUtils.capitalize(word));\r\n\t\t}\r\n\t\treturn StringUtils.join(capitalized, \" \");\r\n\t}", "public static void setNameFilter(String nameFilter) {\r\n PCCTRL.nameFilter = nameFilter;\r\n }", "protected static String _beanMethodName(String prefix, String fieldName)\n {\n StringBuffer sb = new StringBuffer(prefix);\n sb.append(fieldName.substring(0,1).toUpperCase());\n sb.append(fieldName.substring(1));\n return sb.toString();\n }", "private String capitalizeFirstLetter(String aString){\n\t\t// pre-conditon\n\t\tif(aString == null || aString.length() == 0) return aString;\n\t\t// Main code\n\t\treturn aString.substring(0, 1).toUpperCase() + aString.substring(1);\n\t}", "public static String toPropertyStyle(String s)\r\n {\r\n if (isEmpty(s))\r\n return s;\r\n\r\n StringBuffer buf = new StringBuffer();\r\n buf.append(Character.toLowerCase(s.charAt(0)));\r\n boolean uppercase = false;\r\n for (int i = 1; i < s.length(); i++)\r\n {\r\n char c = s.charAt(i);\r\n if (c == '_')\r\n {\r\n uppercase = true;\r\n }\r\n else\r\n {\r\n buf.append(uppercase ? Character.toUpperCase(c) : Character.toLowerCase(c));\r\n uppercase = false;\r\n }\r\n }\r\n return buf.toString();\r\n }", "public StringFilter getFirstName() {\n\t\treturn firstName;\n\t}", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "public static String formatter(String s) {\n return s.replaceAll(\"[^a-zA-Z]\", \"\").toLowerCase();\n }", "private void useCapitalLettersFromType(String type, StringBuffer buffer) {\r\n for (int ndx = 0; ndx < type.length(); ndx++) {\r\n char ch = type.charAt(ndx);\r\n if (Character.isUpperCase(ch)) {\r\n buffer.append(Character.toLowerCase(ch));\r\n }\r\n }\r\n }", "protected String alterCase(String value) {\n\t\tswitch (getCase()) {\n\t\tcase UPPERCASE:\n\t\t\treturn value.toUpperCase();\n\t\tcase LOWERCASE:\n\t\t\treturn value.toLowerCase();\n\t\tdefault:\n\t\t\treturn value;\n\t\t}\n\t}", "public String getCapName() {\n StringBuilder result = new StringBuilder();\n for (String s : getNameParts()) {\n result.append(Util.capitalize(s));\n }\n return result.toString();\n }", "CamelCaseKeyTranslator(String sep) {\n\t\tthis.separator = sep;\n\t}", "public static String capitalizeFirstLetter(String input) {\n return output;\n }", "private String convertAction(String action) {\n\t\treturn action.toLowerCase();\n\t}", "public static String getNameKeyForAssociateMatchKey(String lastname, String firstname) {\n if (lastname == null) {\n lastname = \"\";\n }\n String lastnameFirstword = lastname.split(\"[-]\")[0].toUpperCase();\n\n if (firstname == null) {\n firstname = \"\";\n }\n String firstTwoFirstname = firstname.substring(0, min(2, firstname.length())).toUpperCase();\n\n String name_key = lastnameFirstword + firstTwoFirstname;\n return name_key;\n }", "private String formatName(String name) {\n Character firstCharacter = name.charAt(0);\n firstCharacter = Character.toUpperCase(firstCharacter);\n\n final String remainingCharacters = name.substring(1);\n\n return String.valueOf(firstCharacter) + remainingCharacters;\n }", "public abstract String getDefaultFilter ();", "public static String getFieldUpperCase(String name) {\r\n\t\tString aux = name.substring(0, 1);\r\n\t\tString mayus = aux.toUpperCase()+name.substring(1);\r\n\t\treturn mayus;\r\n\t}", "private String transformName(String originName,String prefix,String separator){\n if(StringUtils.isNotBlank(originName)){\n originName = StringUtils.removeStart(originName,prefix);\n }\n if(StringUtils.isNotBlank(separator)){\n List<String> names = Splitter.on(separator).omitEmptyStrings().trimResults().splitToList(originName);\n List<String> javaStyleNames = Lists.transform(names, new Function<String, String>() {\n public String apply(String input) {\n return ContextUtil.onlyFirstLetterIsUp(input);\n }\n });\n originName = Joiner.on(\"\").join(javaStyleNames);\n }else {\n originName = ContextUtil.onlyFirstLetterIsUp(originName);\n }\n return ContextUtil.upperFirstLetter(originName);\n }", "private String getTitle(String s) {\n if (this.isCaseFolding) {\n s = s.toLowerCase();\n }\n\n if (this.isPunctuationHandling) {\n s = punctuationHandler(s);\n }\n\n return s;\n }", "private final static String toTitleCase( String s ) {\n\n char[] ca = s.toCharArray();\n\n boolean changed = false;\n boolean capitalise = true;\n\n for ( int i=0; i<ca.length; i++ ) {\n char oldLetter = ca[i];\n if ( oldLetter <= '/'\n || ':' <= oldLetter && oldLetter <= '?'\n || ']' <= oldLetter && oldLetter <= '`' ) {\n /* whitespace, control chars or punctuation */\n /* Next normal char should be capitalized */\n capitalise = true;\n } else {\n char newLetter = capitalise\n ? Character.toUpperCase(oldLetter)\n : Character.toLowerCase(oldLetter);\n ca[i] = newLetter;\n changed |= (newLetter != oldLetter);\n capitalise = false;\n }\n } // end for\n\n return new String (ca);\n\n }", "public String getName() {\n return Util.uncapitalize(getCapName());\n }", "private static String kebapToConstant(String input) {\n return CaseFormat.LOWER_HYPHEN.to(CaseFormat.UPPER_UNDERSCORE, input);\n }", "private static Predicate<Person> predicate(CrudFilter filter) {\n return filter.getConstraints().entrySet().stream()\n .map(constraint -> (Predicate<Person>) person -> {\n try {\n Object value = valueOf(constraint.getKey(), person);\n return value != null && value.toString().toLowerCase()\n .contains(constraint.getValue().toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n })\n .reduce(Predicate::and)\n .orElse(e -> true);\n }", "private static String qualifiedName2FirstCharacterUppercasedString(final String s) {\n final StringBuffer result = new StringBuffer();\n final Matcher m = Pattern.compile(\"(?:\\\\.|^)(.)\").matcher(s);\n while (m.find()) {\n m.appendReplacement(result,\n m.group(1).toUpperCase());\n }\n m.appendTail(result);\n return result.toString().replaceAll(\"\\\\[\\\\]\", \"Array\");\n }", "void setFilter(String filter);", "public String getProperty(String key) {\n if (this.ignoreCase) {\n key = key.toUpperCase();\n }\n\n return this.attributes.getProperty(key);\n }", "private static String firstLetterCapital(final String text)\n {\n return (null == text ? null : text.substring(0, 1).toUpperCase() + text.substring(1, text.length()));\n }", "void firstName( String key, String value ){\n developer.firstName = value;\n }", "private String formatPropertyName(String property) {\r\n property = property.replace( '/', '.' );\r\n property = property.replace( '@', '.' );\r\n return StringExtend.validateString( property, \".\" );\r\n }", "private static String canonicalize (String authorName) {\n\t\tif (authorName.contains(\",\")) {\n\t\t\treturn removeAccents(authorName.substring(0, authorName.indexOf(',')).toLowerCase());\n\t\t} else if( authorName.contains(\" \")) {\n\t\t\treturn removeAccents(authorName.substring(authorName.lastIndexOf(' ') + 1, authorName.length()).toLowerCase());\n\t\t} else {\n\t\t\treturn removeAccents(authorName.toLowerCase());\n\t\t}\n\t}", "@Override\n public String filterWidgetAttribute(@Nonnull String attributeKey, Object attributeValue) {\n return attributeKey;\n }", "@Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n FilterResults results = new FilterResults();\n\n if (charSequence != null && charSequence.length() > 0) {\n charSequence = charSequence.toString().toUpperCase();\n ArrayList<Icon> filterIcon = new ArrayList<>();\n\n for (int i = 0; i < mFilterList.size(); i++) {\n if (mFilterList.get(i).getName().toUpperCase().contains(charSequence)) {\n filterIcon.add(mFilterList.get(i));\n }\n }\n\n results.count = filterIcon.size();\n results.values = filterIcon;\n } else {\n results.count = mFilterList.size();\n results.values = mFilterList;\n }\n\n return results;\n }", "private static String xcase(String s, Function<Character, Character> f) {\n if (s == null || s.length() == 0) {\n return s;\n }\n return f.apply(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : \"\");\n }", "private static String capitaliseSingleWord(String word) {\n String capitalisedFirstLetter = word.substring(0, 1).toUpperCase();\n String lowercaseRemaining = word.substring(1).toLowerCase();\n return capitalisedFirstLetter + lowercaseRemaining;\n }", "public ICase retourneLaCase() ;", "public String getLowerCaseName() {\n\t\treturn getName().toLowerCase();\n\t}", "void unsetCapital();", "public static interface KeyValueFilter {\r\n\t}", "private void streamWithSimpleForEach() {\n List<String> myList = Arrays.asList(\"a1\", \"a2\", \"b1\", \"c2\", \"c1\");\n\n myList.stream()\n .filter(s -> s.startsWith(\"c\")).map(String::toUpperCase)\n .sorted()\n .forEach(System.out::println);\n }", "public void setFilter(String filter)\n {\n encryptionDictionary.setItem( COSName.FILTER, COSName.getPDFName( filter ) );\n }", "String filter(String value);", "public static interface GetFilter extends KeyValueFilter {\r\n\t\tObject get(String name);\r\n\t}", "static String canonicalize(String column)\n {\n return column.toLowerCase();\n }", "@Override\n public String toParamName(String name) {\n name = name.replaceAll(\"-\", \"_\");\n\n // if it's all uppper case, do nothing\n if (name.matches(\"^[A-Z_]*$\")) {\n return name;\n }\n\n // camelize(lower) the variable name\n // pet_id => petId\n name = camelize(name, true);\n\n // for reserved word or word starting with number, append _\n if (reservedWords.contains(name) || name.matches(\"^\\\\d.*\")) {\n name = escapeReservedWord(name);\n }\n\n return name;\n }", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapKeyToItem(String key) {\n return key;\n }", "public static String textFormat(String s){\r\n s =s.toLowerCase();\r\n s = s.substring(0, 1).toUpperCase() + s.substring(1);\r\n return(s);\r\n }", "static String pascalCase(String s){\n\t\treturn s.substring(0, 1).toUpperCase() + s.substring(1);\n\t}", "private String cleanModel(String model) {\n\t\tString cleanModel = model.replaceAll(\"[$|#|@|!|%|^|&|*|(|)|]\", \"\").trim();\n\t\treturn cleanModel.substring(0,1).toUpperCase() + cleanModel.substring(1).toLowerCase();\n\t}", "public String getUserFilter()\n {\n return this.userFilter;\n }", "private String camelToSnakeCase(String camelCaseId) {\n\t\t// https://stackoverflow.com/q/2206378/split-and-keep-delimiters\n\t\tfinal String[] parts = camelCaseId.split(\"(?=[A-Z])\"); // e.g. [\"num\", \"Of\", \"Pages\"]\n\t\treturn Arrays.stream(parts).collect(Collectors.joining(\"_\")).toLowerCase();\n\t}", "private static String capitalize(String str) {\n return Character.toUpperCase(str.charAt(0)) + str.substring(1);\n }", "public String prefix(String s) {\n\t\tString tmp = methodBase();\n\t\treturn s+tmp.substring(0,1).toUpperCase()+tmp.substring(1);\n\t}", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public static String buildActionMethodName( Method actionMethod ) {\n\n String methodName = actionMethod.getName();\n StringBuilder actionMethodName = new StringBuilder();\n int charIndex;\n for (charIndex = 0; charIndex < methodName.length(); charIndex++) {\n char ch = methodName.charAt(charIndex);\n if (Character.isUpperCase(ch)) {\n actionMethodName.append(' ');\n }\n actionMethodName.append(ch);\n }\n\n return actionMethod.getDeclaringClass().getSimpleName() + \" \" + actionMethodName.toString().trim();\n }", "public java.lang.String getFilter() {\n return filter;\n }" ]
[ "0.65412384", "0.6277115", "0.6268821", "0.6086164", "0.6005185", "0.5998195", "0.59880054", "0.5909832", "0.58304936", "0.58167726", "0.57858765", "0.57655925", "0.5757422", "0.5742277", "0.5735987", "0.5703627", "0.5693841", "0.5680796", "0.5668133", "0.5629669", "0.5609018", "0.5573897", "0.5563659", "0.5560745", "0.555545", "0.55056703", "0.55041814", "0.54643273", "0.5442084", "0.5434724", "0.54174143", "0.53905195", "0.5387629", "0.5377229", "0.53657204", "0.5363109", "0.5357485", "0.535499", "0.5337898", "0.5326014", "0.5323533", "0.53166264", "0.53144556", "0.5308881", "0.5307478", "0.5288701", "0.5277879", "0.5274482", "0.5265191", "0.5264566", "0.525841", "0.5258364", "0.5256482", "0.5256128", "0.5254988", "0.52543795", "0.52378064", "0.5236089", "0.5208394", "0.520511", "0.52024925", "0.5182969", "0.51790845", "0.5173161", "0.51688135", "0.5164895", "0.5150208", "0.51404", "0.5136907", "0.51301175", "0.51297957", "0.51284987", "0.51251", "0.5121851", "0.5121469", "0.51185024", "0.51153994", "0.5115276", "0.51055604", "0.51023436", "0.51017284", "0.50993663", "0.50983024", "0.5082044", "0.5081776", "0.5081585", "0.50800526", "0.5075609", "0.50704867", "0.5070168", "0.50694853", "0.5066601", "0.5045802", "0.5045163", "0.503766", "0.50285506", "0.5026603", "0.5015847", "0.5014003", "0.50092185", "0.5008868" ]
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static FragmentEnderecoNovoUsuario newInstance(String param1, String param2) { FragmentEnderecoNovoUsuario fragment = new FragmentEnderecoNovoUsuario(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public CuartoFragment() {\n }", "public StintFragment() {\n }", "public ExploreFragment() {\n\n }", "public RickAndMortyFragment() {\n }", "public FragmentMy() {\n }", "public LogFragment() {\n }", "public FeedFragment() {\n }", "public HistoryFragment() {\n }", "public HistoryFragment() {\n }", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "public WkfFragment() {\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment(){}", "public WelcomeFragment() {}", "public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }", "public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public HeaderFragment() {}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public EmployeeFragment() {\n }", "public Fragment_Tutorial() {}", "public NewShopFragment() {\n }", "public FavoriteFragment() {\n }", "public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }", "public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "public NoteActivityFragment() {\n }", "public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public EventHistoryFragment() {\n\t}", "public HomeFragment() {}", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public VantaggiFragment() {\n // Required empty public constructor\n }", "public AddressDetailFragment() {\n }", "public ArticleDetailFragment() { }", "public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }", "public RegisterFragment() {\n }", "public EmailFragment() {\n }", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }", "public ForecastFragment() {\n }", "public FExDetailFragment() {\n \t}", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "public TripNoteFragment() {\n }", "public ItemFragment() {\n }", "public NoteListFragment() {\n }", "public CreatePatientFragment() {\n\n }", "public DisplayFragment() {\n\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment() {\n\n }", "public BackEndFragment() {\n }", "public CustomerFragment() {\n }", "public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public static Fragment newInstance() {\n return new SettingsFragment();\n }", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public PeersFragment() {\n }", "public TagsFragment() {\n }", "public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }", "public HomeSectionFragment() {\n\t}", "public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }", "public PersonDetailFragment() {\r\n }", "public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public PlaylistFragment() {\n }", "public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.6646188", "0.66410166", "0.6640725", "0.6634425", "0.66188246", "0.66140765", "0.6608169", "0.66045964", "0.65977716", "0.6592119", "0.659137", "0.65910816", "0.65830594", "0.65786606", "0.6562876", "0.65607685", "0.6557126", "0.65513307", "0.65510213", "0.65431285", "0.6540448", "0.65336084", "0.6532555", "0.6528302", "0.6524409", "0.652328", "0.6523149", "0.6516528", "0.65049976", "0.6497274", "0.6497235", "0.64949715", "0.64944136", "0.6484968", "0.6484214", "0.64805835", "0.64784926", "0.64755154", "0.64710265", "0.6466466", "0.6457089", "0.645606", "0.6454554", "0.6452161", "0.64520335", "0.6450325", "0.64488834", "0.6446765", "0.64430225", "0.64430225", "0.64430225", "0.64420956", "0.6441306", "0.64411277", "0.6438451", "0.64345145", "0.64289486", "0.64287597", "0.6423755", "0.64193285", "0.6418699", "0.6414679", "0.6412867", "0.6402168", "0.6400724", "0.6395624", "0.6395109", "0.6391252", "0.63891554", "0.63835025", "0.63788056", "0.63751805", "0.63751805", "0.63751805", "0.6374796", "0.63653135", "0.6364529", "0.6360922", "0.63538784", "0.6351111", "0.635067" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final Bundle b = getArguments(); getActivity().findViewById(R.id.editTextNomeInfoPessoais).setVisibility(View.INVISIBLE); getActivity().findViewById(R.id.editTextTelefoneInfoPessoais).setVisibility(View.INVISIBLE); getActivity().findViewById(R.id.editTextEmail).setVisibility(View.INVISIBLE); getActivity().findViewById(R.id.buttonContinuarInformacoesPessoais).setVisibility(View.INVISIBLE); View v = inflater.inflate(R.layout.fragment_fragment_endereco_novo_usuario, container, false); v.findViewById(R.id.relativeEnderecoNovoUsuario).setBackgroundColor(Color.WHITE); continuar = (Button) v.findViewById(R.id.buttonContinuarEndereco); rua = (EditText) v.findViewById(R.id.editTextNomeRua); numero = (EditText) v.findViewById(R.id.editTextNumeroRua); cep = (EditText) v.findViewById(R.id.editTextCEP); complemento = (EditText) v.findViewById(R.id.editTextComplemento); bairro = (EditText) v.findViewById(R.id.editTextBairro); referencia = (EditText) v.findViewById(R.id.editTextPontoDeReferencia); numero.setNextFocusDownId(R.id.editTextCEP); rua.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("rua"); if (rua.getText().toString().equals("Rua")) { rua.setText(""); rua.setTextColor(Color.BLACK); } return false; } }); rua.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_NEXT) { checkTexts("numero"); if (numero.getText().toString().equals("Número")) { numero.setText(""); numero.setTextColor(Color.BLACK); numero.setInputType(InputType.TYPE_CLASS_NUMBER); } } return false; } }); numero.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("numero"); if (numero.getText().toString().equals("Número")) { numero.setText(""); numero.setTextColor(Color.BLACK); numero.setInputType(InputType.TYPE_CLASS_NUMBER); } return false; } }); numero.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_NEXT) { checkTexts("cep"); if (cep.getText().toString().equals("CEP")) { cep.setText(""); cep.setInputType(InputType.TYPE_CLASS_NUMBER); cep.setTextColor(Color.BLACK); } } return false; } }); cep.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("cep"); if (cep.getText().toString().equals("CEP")) { cep.setText(""); cep.setInputType(InputType.TYPE_CLASS_NUMBER); cep.setTextColor(Color.BLACK); } return false; } }); cep.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_NEXT) { checkTexts("complemento"); if (complemento.getText().toString().equals("Complemento")) { complemento.setText(""); complemento.setTextColor(Color.BLACK); } } return false; } }); complemento.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("complemento"); if (complemento.getText().toString().equals("Complemento")) { complemento.setText(""); complemento.setTextColor(Color.BLACK); } return false; } }); complemento.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_NEXT) { checkTexts("bairro"); if (bairro.getText().toString().equals("Bairro")) { bairro.setText(""); bairro.setTextColor(Color.BLACK); } } return false; } }); bairro.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("bairro"); if (bairro.getText().toString().equals("Bairro")) { bairro.setText(""); bairro.setTextColor(Color.BLACK); } return false; } }); bairro.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_NEXT) { checkTexts("referencia"); if (referencia.getText().toString().equals("Ponto de referência")) { referencia.setText(""); referencia.setTextColor(Color.BLACK); } } return false; } }); referencia.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { checkTexts("referencia"); if (referencia.getText().toString().equals("Ponto de referência")) { referencia.setText(""); referencia.setTextColor(Color.BLACK); } return false; } }); referencia.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) { if (i == EditorInfo.IME_ACTION_DONE) { continuar.performClick(); } return false; } }); continuar.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { String ruatxt = ((EditText) getActivity().findViewById(R.id.editTextNomeRua)).getText().toString(); String numerotxt = ((EditText) getActivity().findViewById(R.id.editTextNumeroRua)).getText().toString(); String ceptxt = ((EditText) getActivity().findViewById(R.id.editTextCEP)).getText().toString(); String complementotxt = ((EditText) getActivity().findViewById(R.id.editTextComplemento)).getText().toString(); String bairrotxt = ((EditText) getActivity().findViewById(R.id.editTextBairro)).getText().toString(); String referenciatxt = ((EditText) getActivity().findViewById(R.id.editTextPontoDeReferencia)).getText().toString(); if (!ruatxt.equals("") && !ruatxt.equals("Rua") && !numerotxt.equals("") && !numerotxt.equals("Número") && !ceptxt.equals("CEP") && !ceptxt.equals("") && !bairrotxt.equals("Bairro") && !bairrotxt.equals("") && !referenciatxt.equals("Ponto de referência") && !referenciatxt.equals("")) { Bundle bundle = b; bundle.putString("rua", ruatxt); bundle.putString("numero", numerotxt); bundle.putString("cep", ceptxt); bundle.putString("complemento", complementotxt); bundle.putString("bairro", bairrotxt); bundle.putString("referencia", referenciatxt); bundle.putString("endereco", ruatxt + ", " + numerotxt + ", " + complementotxt + ", " + ceptxt + ", " + bairrotxt + ", " + referenciatxt); Fragment fragment = new InformacoesNovoUsuario(); fragment.setArguments(bundle); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.relativeEnderecoNovoUsuario, fragment); fragmentTransaction.commit(); } else { Toast.makeText(getActivity().getApplicationContext(), "Por favor, preencha todos os campos corretamente.", Toast.LENGTH_SHORT).show(); } } }); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "public abstract void update(UIReader event);", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}", "@Override\n\tpublic void update(Event e) {\n\t}", "public abstract void onInvoked(CommandSender sender, String[] args);", "@Override\r\n public void updateUI() {\r\n }", "@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}", "@Override\n\tpublic void inputChanged( Viewer arg0, Object arg1, Object arg2 ) {\n\t}", "@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "public void updateUI(){}", "private synchronized void updateScreen(String arg){\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n setChanged();\n notifyObservers(arg);\n }\n });\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "Event () {\n // Nothing to do here.\n }", "void onArgumentsChanged();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t}", "void eventChanged();", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override public void handle(ActionEvent e)\n\t {\n\t }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override //se repita\r\n public void actionPerformed(ActionEvent ae) {\r\n \r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "public abstract CommandResponse onCommand(CommandSender sender, String label, String[] args);", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n }", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n \r\n }", "public abstract void onCommand(MessageEvent context) throws Exception;", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "private void addParameterEventHandler(){\n\t\t\n\t\tgetParameterNameListBox().addDoubleClickHandler(new DoubleClickHandler() {\n\t\t\t@Override\n\t\t\tpublic void onDoubleClick(DoubleClickEvent event) {\n\t\t\t\tparameterAceEditor.clearAnnotations();\n\t\t\t\tparameterAceEditor.removeAllMarkers();\n\t\t\t\tparameterAceEditor.redisplay();\n\t\t\t\tSystem.out.println(\"In addParameterEventHandler on DoubleClick isPageDirty = \" + getIsPageDirty() + \" selectedIndex = \" + getParameterNameListBox().getSelectedIndex());\n\t\t\t\tsetIsDoubleClick(true);\n\t\t\t\tsetIsNavBarClick(false);\n\t\t\t\tif (getIsPageDirty()) {\n\t\t\t\t\tshowUnsavedChangesWarning();\n\t\t\t\t} else {\n\t\t\t\t\tint selectedIndex = getParameterNameListBox().getSelectedIndex();\n\t\t\t\t\tif (selectedIndex != -1) {\n\t\t\t\t\t\tfinal String selectedParamID = getParameterNameListBox().getValue(selectedIndex);\n\t\t\t\t\t\tcurrentSelectedParamerterObjId = selectedParamID;\n\t\t\t\t\t\tif(getParameterMap().get(selectedParamID) != null){\n\t\t\t\t\t\t\tgetParameterNameTxtArea().setText(getParameterMap().get(selectedParamID).getParameterName());\n\t\t\t\t\t\t\tgetParameterAceEditor().setText(getParameterMap().get(selectedParamID).getParameterLogic());\n\t\t\t\t\t\t\tSystem.out.println(\"In Parameter DoubleClickHandler, doing setText()\");\n\t\t\t\t\t\t\t//disable parameterName and Logic fields for Default Parameter\n\t\t\t\t\t\t\tboolean isReadOnly = getParameterMap().get(selectedParamID).isReadOnly();\n\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setTitle(\"Delete\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(MatContext.get().getMeasureLockService()\n\t\t\t\t\t\t\t\t\t.checkForEditPermission()){\n\t\t\t\t\t\t\t\tsetParameterWidgetReadOnly(!isReadOnly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// load most recent used cql artifacts\n\t\t\t\t\t\t\tMatContext.get().getMeasureService().getUsedCQLArtifacts(MatContext.get().getCurrentMeasureId(), new AsyncCallback<GetUsedCQLArtifactsResult>() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\tWindow.alert(MatContext.get().getMessageDelegate().getGenericErrorMessage());\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onSuccess(GetUsedCQLArtifactsResult result) {\n\t\t\t\t\t\t\t\t\tif(result.getUsedCQLParameters().contains(getParameterMap().get(selectedParamID).getParameterName())) {\n\t\t\t\t\t\t\t\t\t\tgetParameterButtonBar().getDeleteButton().setEnabled(false);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tsuccessMessageAlert.clearAlert();\n\t\t\t\t\terrorMessageAlert.clearAlert();\n\t\t\t\t\twarningMessageAlert.clearAlert();\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void handle(Event event) {\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void actionPerformed(AnActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n \n }", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "public void ImageView(ActionEvent event) {\n\t}", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void mouseDown(MouseEvent arg0) {\n\n\t\t\t\t\t\t}", "public void runInUi(ElexisEvent ev){}", "@Override\n public void delta() {\n \n }", "@Override\n\tpublic void onClick(ClickEvent arg0) {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent ev) {\n }", "@Override\n public void actionPerformed(ActionEvent e)\n {\n \n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\n public void update(Observable o, Object arg)\n {\n \n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }" ]
[ "0.6619185", "0.65246344", "0.6473144", "0.6473144", "0.64351684", "0.6325494", "0.62368196", "0.6189416", "0.6158721", "0.61455715", "0.6123594", "0.6107332", "0.6101038", "0.6092755", "0.6049496", "0.6049496", "0.60442764", "0.604003", "0.604003", "0.6007846", "0.59999037", "0.59848183", "0.59776366", "0.59587413", "0.5940049", "0.5925668", "0.5925668", "0.59208333", "0.5915737", "0.5915737", "0.5915737", "0.5915737", "0.5915737", "0.5915554", "0.5909643", "0.5895144", "0.58947057", "0.589277", "0.58885247", "0.58885247", "0.58885247", "0.58671176", "0.58671176", "0.58671176", "0.58636886", "0.5862447", "0.5862447", "0.58613557", "0.5855828", "0.5846504", "0.5846504", "0.5846504", "0.5846504", "0.5837475", "0.58366984", "0.5820788", "0.58068436", "0.58022934", "0.5772422", "0.57714665", "0.5770862", "0.5765655", "0.5763872", "0.57544947", "0.57542855", "0.57542855", "0.57450074", "0.57441026", "0.57441026", "0.57441026", "0.5741053", "0.574037", "0.5739314", "0.57367086", "0.57367086", "0.57367086", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57322264", "0.57235956", "0.57232994", "0.5721006", "0.571978", "0.571978", "0.57187414", "0.57177836", "0.57133436", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.57110935", "0.5707859", "0.5707546", "0.5704973", "0.57016516" ]
0.0
-1
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name public void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}", "public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }", "void onFragmentInteraction();", "void onFragmentInteraction();", "void onFragmentInteraction();", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }", "public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }", "public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}", "public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}", "public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }", "void onFragmentInteraction(Object ref);", "public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }", "public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }", "public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }", "public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }", "public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}", "public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}", "public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }", "public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }", "public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}", "public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface PersonalFragmentView extends BaseMvpView {\n\n}", "public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "void onFragmentInteraction(View v);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }", "void onFragmentInteractionMain();", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }", "public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}", "public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }", "void onFragmentInteraction(String id);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }", "public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}", "public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }", "public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}", "public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }", "public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}", "public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}", "public interface ChangeFragmentListener {\n void changeFragment();\n}", "public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }", "public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}", "@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }", "void onFragmentInteraction(int position);", "public interface AddFarmFragmentView extends BaseView {\n\n\n}", "void OpenFragmentInteraction();", "public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}", "public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}", "public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}", "public interface PesonageFragmentView extends MvpView {\n\n}", "public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }", "public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }", "public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}", "interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }" ]
[ "0.7323901", "0.720826", "0.71346456", "0.712432", "0.71223646", "0.7014406", "0.6975986", "0.6975986", "0.6975986", "0.6973731", "0.69676983", "0.69656146", "0.6960717", "0.69542384", "0.6943149", "0.6933716", "0.69288176", "0.69264686", "0.6922715", "0.6909953", "0.6902666", "0.68968815", "0.6894074", "0.68821484", "0.68811965", "0.6875028", "0.686441", "0.686059", "0.68592566", "0.68580437", "0.68551767", "0.6844014", "0.6839444", "0.68299013", "0.681755", "0.68166876", "0.680979", "0.6785827", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6769247", "0.6768809", "0.6765993", "0.67613", "0.675552", "0.6753091", "0.6698583", "0.66805714", "0.6673642", "0.6670421", "0.66695374", "0.66619104", "0.6660703", "0.66551346", "0.665202", "0.6643579", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6643505", "0.6638241", "0.66361165", "0.66311413", "0.662524", "0.66250277", "0.6618358", "0.6609611", "0.66091406", "0.6608578", "0.66044116", "0.6596916", "0.65967715", "0.65872806", "0.6572124", "0.6567792", "0.65597993", "0.65597713", "0.6555063", "0.6550386", "0.65484476", "0.65428716", "0.6538933", "0.65341264", "0.65341264", "0.65341264", "0.6519295", "0.65169215", "0.65164673" ]
0.0
-1
TODO: Update argument type and name
public void onFragmentInteraction(Uri uri);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }", "@Override\n\tpublic void traverseArg(UniArg node) {\n\t}", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "Object[] getArguments();", "Object[] getArguments();", "String getArguments();", "@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}", "@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }", "ArgList createArgList();", "public Object[] getArguments() { return args;}", "@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }", "@Override\n protected String getName() {return _parms.name;}", "private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }", "uicargs createuicargs();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}", "@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}", "public getType_args(getType_args other) {\n }", "Object[] args();", "protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }", "@Test\n void getArgString() {\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }", "int getArgIndex();", "@Override\n\tpublic void addArg(FormulaElement arg){\n\t}", "public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }", "@Override\n public Object[] getArguments() {\n return null;\n }", "public login_1_argument() {\n }", "Optional<String[]> arguments();", "private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }", "@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}", "protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "void setArguments(String arguments);", "@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}", "OpFunctionArgAgregate createOpFunctionArgAgregate();", "protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);", "void visitArgument(Argument argument);", "public Thaw_args(Thaw_args other) {\r\n }", "@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}", "private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }", "public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}", "@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }", "public abstract ValidationResults validArguments(String[] arguments);", "public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }", "public String getArgumentString() {\n\t\treturn null;\n\t}", "@Override\n public String kind() {\n return \"@param\";\n }", "@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}", "public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }", "void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }", "@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}", "void onArgumentsChanged();", "com.google.protobuf.ByteString\n\t\tgetArgBytes();", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "MyArg(int value){\n this.value = value;\n }", "public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }", "public Clear_args(Clear_args other) {\r\n }", "private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }", "public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }", "@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}", "@Override\n public int getArgent() {\n return _argent;\n }", "private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }", "private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}", "PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }", "public Type getArgumentDirection() {\n return direction;\n }", "public String argTypes() {\n return \"I\";//NOI18N\n }", "public static void main(String arg[]) {\n\n }", "godot.wire.Wire.Value getArgs(int index);", "@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }", "public void setArgs(java.lang.String value) {\n this.args = value;\n }", "private Argument(Builder builder) {\n super(builder);\n }", "@Override\n public void execute(String[] args) {\n\n }", "@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}", "UUID createArgument(ArgumentCreateRequest request);", "@Override\n public void initialise(String[] arguments) {\n\n }", "public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }", "protected abstract void parseArgs() throws IOException;" ]
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.59906125", "0.59906125", "0.5984017", "0.59791875", "0.5977681", "0.59532714", "0.5946838", "0.59457266", "0.59452903", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.59352577", "0.5909717", "0.5889277", "0.588111", "0.5871162", "0.5866624", "0.58613646", "0.58519953", "0.58381283", "0.58083445", "0.58059824", "0.5795826", "0.57816726", "0.57670826", "0.57556796", "0.57471323", "0.57418406", "0.5729463", "0.57291526", "0.5716928", "0.5713024", "0.56974274", "0.56782854", "0.56723106", "0.5664594", "0.5664104", "0.5660337", "0.5652865", "0.5647883", "0.5642134", "0.5635645", "0.5634968", "0.562251", "0.56210977", "0.56167537", "0.56138444", "0.56044126", "0.56044126", "0.5602371", "0.56012225", "0.55986875", "0.55893147", "0.5588273", "0.5583255", "0.5582767", "0.55681497", "0.55626017", "0.55577534", "0.55524325", "0.5549442", "0.55378276", "0.5536797", "0.5527675", "0.5511817", "0.55099154", "0.550257" ]
0.0
-1
public static ArrayList room = new ArrayList();
public static void main(String[] args) { /* DONE: Launch ChatClient from this main method * * Helpful link: * https://docs.oracle.com/javase/8/javafx/api/javafx/application/Application.html#launch-java.lang.Class-java.lang.String...- */ Application.launch(ChatClient.class, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList getRooms();", "public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }", "public ArrayList<Room> getRooms() {\n return rooms;\n }", "public void setRooms(ArrayList value);", "public void setRoomList (ArrayList<ItcRoom> roomList)\r\n\t {\r\n\t //this.roomList = roomList;\r\n\t }", "protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }", "public Hotel(ArrayList<Room> rooms) {\n this.rooms = rooms;\n }", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public List<Room> getRooms() {\n return rooms;\n }", "public static void main(String[] args) {\n Room room1 = new Room(14, 6, 2, false);\n Room room2 = new Room(8, 6, 2, false);\n Room room3 = new Room(18, 6, 2, false);\n\n ArrayList<Room> rooms = new ArrayList<>();\n rooms.add(room1);\n rooms.add(room2);\n rooms.add(room3);\n\n\n House house = new House(8, 2, 140.00, rooms);\n\n\n\n\n System.out.println(\"Aantal stoelen \" + house.aantalStoelenInHetHuis());\n\n }", "public void populateRooms(){\n }", "public void initRooms(Room room) {\n rooms.add(room);\n internalList.add(room);\n }", "public Room() {\r\n\t\troomObjects = new ArrayList<GameObject>();\r\n\t\troom_listener = new RoomListener();\r\n\t\tlisteners = new ListenerContainer(room_listener);\r\n\t}", "GARoute(){\n cityIndex = new ArrayList<Integer>();\n }", "public LinkedList getList() {\n\treturn this.roomList;\n}", "public static ArrayList<Player> getWinners(){return winners;}", "public void setRoomList(ArrayList<RoomList> RoomList) {\r\n this.RoomList = RoomList;\r\n }", "private void setRooms() {\r\n\t\tAccountBean bean = new AccountBean();\r\n\t\tbean.setCf(Session.getSession().getCurrUser().getAccount().getCf());\r\n\t\tRoomController ctrl = RoomController.getInstance();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tthis.myRooms=FXCollections.observableArrayList(ctrl.getMyRooms(bean));\r\n\t\t}\r\n\t\tcatch (DatabaseException ex1) {\r\n\t\t\tJOptionPane.showMessageDialog(null,ex1.getMessage(),ERROR, JOptionPane.ERROR_MESSAGE);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "public ChatRoom[] getChatRooms();", "public List<Room> getCurrentRooms() {\n return currentRooms;\n }", "public void generateRooms(){ //TODO it's public just for testing\n rooms = new ArrayList<>();\n for(Color color : roomsToBuild)\n rooms.add(new Room(color));\n }", "public Model() {\r\n// waiting_games = new ArrayList<>();\r\n// full_games = new ArrayList<>();\r\n games = new ArrayList<>();\r\n }", "public Molt(){\n molt=new ArrayList<>();\n }", "public MyRoom() {\r\n }", "private void setupRooms() {\n\t\tthis.listOfCoordinates = new ArrayList<Coordinates>();\r\n\t\tthis.rooms = new HashMap<String,Room>();\r\n\t\t\r\n\t\tArrayList<Coordinates> spaEntrances = new ArrayList<Coordinates>();\r\n\t\tspaEntrances.add(grid[5][6].getCoord());\r\n\r\n\t\tArrayList<Coordinates> theatreEntrances = new ArrayList<Coordinates>();\r\n\t\ttheatreEntrances.add(grid[13][2].getCoord());\r\n\t\ttheatreEntrances.add(grid[10][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> livingRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tlivingRoomEntrances.add(grid[13][5].getCoord());\r\n\t\tlivingRoomEntrances.add(grid[16][9].getCoord());\r\n\r\n\t\tArrayList<Coordinates> observatoryEntrances = new ArrayList<Coordinates>();\r\n\t\tobservatoryEntrances.add(grid[21][8].getCoord());\r\n\r\n\t\tArrayList<Coordinates> patioEntrances = new ArrayList<Coordinates>();\r\n\t\tpatioEntrances.add(grid[5][10].getCoord());\r\n\t\tpatioEntrances.add(grid[8][12].getCoord());\r\n\t\tpatioEntrances.add(grid[8][16].getCoord());\r\n\t\tpatioEntrances.add(grid[5][18].getCoord());\r\n\r\n\t\t// ...\r\n\t\tArrayList<Coordinates> poolEntrances = new ArrayList<Coordinates>();\r\n\t\tpoolEntrances.add(grid[10][17].getCoord());\r\n\t\tpoolEntrances.add(grid[17][17].getCoord());\r\n\t\tpoolEntrances.add(grid[14][10].getCoord());\r\n\r\n\t\tArrayList<Coordinates> hallEntrances = new ArrayList<Coordinates>();\r\n\t\thallEntrances.add(grid[22][10].getCoord());\r\n\t\thallEntrances.add(grid[18][13].getCoord());\r\n\t\thallEntrances.add(grid[18][14].getCoord());\r\n\r\n\t\tArrayList<Coordinates> kitchenEntrances = new ArrayList<Coordinates>();\r\n\t\tkitchenEntrances.add(grid[6][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> diningRoomEntrances = new ArrayList<Coordinates>();\r\n\t\tdiningRoomEntrances.add(grid[12][18].getCoord());\r\n\t\tdiningRoomEntrances.add(grid[16][21].getCoord());\r\n\r\n\t\tArrayList<Coordinates> guestHouseEntrances = new ArrayList<Coordinates>();\r\n\t\tguestHouseEntrances.add(grid[20][20].getCoord());\r\n\r\n\t\t// setup entrances map\r\n\t\tthis.roomEntrances = new HashMap<Coordinates, Room>();\r\n\t\tfor (LocationCard lc : this.listOfLocationCard) {\r\n\t\t\tString name = lc.getName();\r\n\t\t\tRoom r;\r\n\t\t\tif (name.equals(\"Spa\")) {\r\n\t\t\t\tr = new Room(name, lc, spaEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : spaEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Theatre\")) {\r\n\t\t\t\tr = new Room(name, lc,theatreEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : theatreEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"LivingRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,livingRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : livingRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Observatory\")) {\r\n\t\t\t\tr = new Room(name, lc,observatoryEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : observatoryEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Patio\")) {\r\n\t\t\t\tr = new Room(name,lc, patioEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : patioEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Pool\")) {\r\n\t\t\t\tr = new Room(name,lc,poolEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : poolEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Hall\")) {\r\n\t\t\t\tr = new Room(name, lc,hallEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : hallEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"Kitchen\")) {\r\n\t\t\t\tr = new Room(name, lc,kitchenEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : kitchenEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"DiningRoom\")) {\r\n\t\t\t\tr = new Room(name, lc,diningRoomEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : diningRoomEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t} else if (name.equals(\"GuestHouse\")) {\r\n\t\t\t\tr = new Room(name, lc,guestHouseEntrances);\r\n\t\t\t\tthis.rooms.put(name, r);\r\n\t\t\t\tfor (Coordinates c : guestHouseEntrances) {\r\n\t\t\t\t\tthis.roomEntrances.put(c, r);\r\n\t\t\t\t\tthis.listOfCoordinates.add(c);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Room getRoom()\r\n {\r\n return room;\r\n }", "public Floor(){\n populateRooms();\n level = new Room[5][5];\n }", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "public Player()\n {\n playerItem = new ArrayList();\n }", "public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }", "@RequestMapping(value = \"/vacantrooms\", method = RequestMethod.GET)\n public ArrayList<Room> vacantRooms(){\n ArrayList<Room> listroom = DatabaseRoom.getVacantRooms();\n return listroom;\n }", "public GameEnvironment() {\r\n this.collidObj = new ArrayList<Collidable>();\r\n }", "Room getRoom();", "Room getRoom();", "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }", "public ArrayList<Room> createMaze() {\n createRooms();\n createAccess(rooms);\n\n return rooms;\n }", "public void addRoomList(Detail list) {\n\t\t\tRoomList = list;\r\n\t\t}", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}", "public ArrayList<GameRoom> execute() {\n\t\tif(GameRooms.rooms == null) {\n\t\t\tGameRooms.rooms = new ArrayList<GameRoom>();\n\t\t}\n\t\treturn GameRooms.rooms;\n\t}", "public int getRoom(){\n\t\treturn room;\n\t}", "Sharks() {\n sharks = new ArrayList<Shark>(); // Initialize the ArrayList\n }", "private void createAccess(ArrayList<Room> rooms) {\n\n rooms.get(0).setNorth(rooms.get(1));\n\n rooms.get(1).setEast(rooms.get(2));\n rooms.get(1).setWest(rooms.get(4));\n rooms.get(1).setSouth(rooms.get(0));\n\n rooms.get(2).setWest(rooms.get(1));\n rooms.get(2).setNorth(rooms.get(10));\n rooms.get(2).setEast(rooms.get(3));\n\n rooms.get(3).setWest(rooms.get(2));\n\n rooms.get(4).setWest(rooms.get(5));\n rooms.get(4).setNorth(rooms.get(8));\n rooms.get(4).setEast(rooms.get(1));\n\n rooms.get(5).setNorth(rooms.get(7));\n rooms.get(5).setSouth(rooms.get(6));\n rooms.get(5).setEast(rooms.get(4));\n\n rooms.get(6).setNorth(rooms.get(5));\n\n rooms.get(7).setNorth(rooms.get(13));\n rooms.get(7).setSouth(rooms.get(5));\n\n rooms.get(8).setEast(rooms.get(9));\n rooms.get(8).setSouth(rooms.get(4));\n\n rooms.get(9).setWest(rooms.get(8));\n rooms.get(9).setNorth(rooms.get(15));\n rooms.get(9).setEast(rooms.get(10));\n\n rooms.get(10).setWest(rooms.get(9));\n rooms.get(10).setEast(rooms.get(11));\n rooms.get(10).setSouth(rooms.get(2));\n\n rooms.get(11).setWest(rooms.get(10));\n\n rooms.get(12).setEast(rooms.get(13));\n\n rooms.get(13).setWest(rooms.get(12));\n rooms.get(13).setEast(rooms.get(14));\n rooms.get(13).setSouth(rooms.get(7));\n\n rooms.get(14).setWest(rooms.get(13));\n rooms.get(14).setNorth(rooms.get(18));\n rooms.get(14).setEast(rooms.get(15));\n\n rooms.get(15).setWest(rooms.get(14));\n rooms.get(15).setNorth(rooms.get(19));\n rooms.get(15).setEast(rooms.get(16));\n rooms.get(15).setSouth(rooms.get(9));\n\n rooms.get(16).setWest(rooms.get(15));\n rooms.get(16).setEast(rooms.get(17));\n\n rooms.get(17).setWest(rooms.get(16));\n\n rooms.get(18).setSouth(rooms.get(14));\n\n rooms.get(19).setSouth(rooms.get(13));\n\n }", "@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}", "public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }", "public Room getRoom()\n {\n return currentRoom;\n }", "JoueurManager()\n\t{\n\t\tListJoueur = new ArrayList<Joueur>();\n\t}", "public Room() {\n roomDisplayArray = new String[roomHeight][roomWidth];\n }", "public ListPolygone() {\n this.list = new ArrayList();\n }", "public Set<Room> getRooms() {\n return rooms;\n }", "public void addRoom(Chatroom room){\n\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public GameBoard() {\r\n boards = new ArrayList<GameBoard>();\r\n }", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "Sporthall() {\n reservationsList = new ArrayList<>();\n }", "public List<Room> findAllRooms();", "@Override\r\n public void setRoom(Room room) {\n this.room = room; //set the hive room\r\n roomList.add(this.room); // add room to the list\r\n }", "public ContactList()\n {\n myList = new ArrayList<>();\n }", "public Hotel() throws FileNotFoundException\n {\n data_set = new ArrayList<Room>();\n get_rooms();\n }", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "public Room getRoom(){\n\t\treturn this.room;\n\t}", "public Room getLocalisation(){return this.aLocalisation;}", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "public ArrayListBag() {\n\t\tlist = new ArrayList<T>();\n\t}", "@Test\n public void canAddBedroomToArrayList() {\n hotel.addBedroom(bedroom1);\n assertEquals(5, hotel.checkNumberOfBedrooms());\n }", "public ArrayList<roomContents> getContents() {\n return contents;\n }", "public String getRoom() {\r\n return room;\r\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public Room() {\n }", "public PriorityQueue<Room> getRooms() {\n return this.rooms;\n }", "public Room getMyRoom() {\n return this.myRoom;\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public JsfVenda() {\r\n litem = new ArrayList();\r\n }", "ItcRoom()\r\n\t {\t }", "static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}", "public static ArrayList<Room> getTypicalRooms() {\n return new ArrayList<>(Arrays.asList(BEST_ROOM, WORST_ROOM));\n }", "public void initArrayList()\n {\n\tSQLiteDatabase db = getWritableDatabase();\n\tCursor cursor = db.rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n\n\tif (cursor.moveToFirst())\n\t{\n\t do\n\t {\n\t\tJacocDBLocation newLocation = new JacocDBLocation();\n\t\tnewLocation.setLocationName(cursor.getString(1));\n\t\tnewLocation.setRealLocation(new LocationBorder(new LatLng(cursor.getDouble(2), cursor.getDouble(3)), new LatLng(cursor.getDouble(4), cursor.getDouble(5))));\n\t\tnewLocation.setMapLocation(new LocationBorder(new LatLng(cursor.getInt(6), cursor.getInt(7)), new LatLng(cursor.getInt(8), cursor.getInt(9))));\n\t\tnewLocation.setHighSpectrumRange(cursor.getDouble(10));\n\t\tnewLocation.setLowSpectrumRange(cursor.getDouble(11));\n\n\t\t// adding the new Location to the collection\n\t\tlocationList.add(newLocation);\n\t }\n\t while (cursor.moveToNext()); // move to the next row in the DB\n\n\t}\n\tcursor.close();\n\tdb.close();\n }", "public ArrayList<String> getObjects(){\n ArrayList<String> objs = new ArrayList<>();\n for (int i = 0; i < field.length; i++){\n objs.add(\"Asteroid\");\n }\n return objs;\n }", "public ServerPlayers() {\n sockets = new ArrayList<Socket>();\n }", "public Pile(){\n pile = new ArrayList<Card>();\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public Room getRoom() {\n return currentRoom;\n }", "private void placeRooms() {\n if (roomList.size() == 0) {\n throw new IllegalArgumentException(\"roomList must have rooms\");\n }\n // This is a nice cool square\n map = new int[MAP_SIZE][MAP_SIZE];\n\n for (Room room : roomList) {\n assignPosition(room);\n }\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public Room getRoom0(){\n return basement;\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public ListeMessage() {\n\t\tmessagesEntrant = new ArrayList<Message>();\n\t\tmessagesSortant = new ArrayList<Message>();\n\t\tmessages = new ArrayList<Message>();\n\t}", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "public GameEnvironment() {\r\n this.collidables = new ArrayList<Collidable>();\r\n }", "public Teacher() {\n// coursesTaught = new ArrayList<Course>();\n }", "public Room(String description) \n {\n this.description = description;\n items = new ArrayList<>();\n exits = new HashMap<>();\n }", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}" ]
[ "0.7475172", "0.70396036", "0.6889544", "0.6846234", "0.684282", "0.6761073", "0.67000246", "0.6568288", "0.64564013", "0.64517754", "0.64354944", "0.64331913", "0.63489693", "0.62579054", "0.6236961", "0.62326396", "0.6198853", "0.61488295", "0.6140715", "0.61394286", "0.61157334", "0.6109339", "0.60974663", "0.6095332", "0.6072189", "0.60514957", "0.6034089", "0.6004632", "0.5995297", "0.5992745", "0.59898347", "0.5987952", "0.5987061", "0.5962639", "0.596022", "0.596022", "0.5947018", "0.5945568", "0.5945568", "0.5937132", "0.59225196", "0.5907849", "0.59049183", "0.5890137", "0.5881341", "0.58676577", "0.5856836", "0.58508646", "0.58339715", "0.58300644", "0.5809041", "0.58089554", "0.57964855", "0.5792336", "0.57686454", "0.5766756", "0.57601225", "0.575382", "0.572456", "0.57219344", "0.57181615", "0.5713365", "0.5704214", "0.5703319", "0.56783265", "0.56674033", "0.5655979", "0.56532663", "0.56511563", "0.5650478", "0.5647714", "0.56408024", "0.5618977", "0.5611773", "0.5602173", "0.56004953", "0.5590714", "0.55880845", "0.5587652", "0.5585326", "0.5580307", "0.5573947", "0.557243", "0.5572054", "0.5567379", "0.55524135", "0.5539731", "0.55362463", "0.55169165", "0.5511945", "0.5511134", "0.5510914", "0.54938704", "0.54807293", "0.54788816", "0.5477854", "0.5475464", "0.5474505", "0.54732203", "0.54672", "0.5466748" ]
0.0
-1
TODO Autogenerated method stub
@Override public User getUserById(String id) { User user = null; Connection connection = null; try{ connection = BaseDao.getConnection(); user = userMapper.getUserById(connection,id); }catch (Exception e) { // TODO: handle exception e.printStackTrace(); user = null; }finally{ BaseDao.closeResource(connection, null, null); } return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean modify(User user) { Connection connection = null; boolean flag = false; try { connection = BaseDao.getConnection(); if(userMapper.modify(connection,user) > 0) flag = true; } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }finally{ BaseDao.closeResource(connection, null, null); } return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean updatePwd(int id, String pwd) { boolean flag = false; Connection connection = null; try{ connection = BaseDao.getConnection(); if(userMapper.updatePwd(connection,id,pwd) > 0) flag = true; }catch (Exception e) { // TODO: handle exception e.printStackTrace(); }finally{ BaseDao.closeResource(connection, null, null); } return flag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Constructeur de ServiceClient sans argument
public ServiceClient() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ClienteServicio() {\n }", "public ClientServiceImpl() {\r\n\t}", "public TestServiceClient(final ApiClient apiClient) {\n super(apiClient);\n }", "public Client(Client client) {\n\n }", "public Client() {\n }", "public Client() {}", "public TurnoVOClient() {\r\n }", "public Client() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Cliente() {\n }", "private void createClient() {\n tc = new TestClient();\n }", "public Client() {\r\n\t// TODO Auto-generated constructor stub\r\n\t \r\n }", "public ProductsVOClient() {\r\n }", "public EO_ClientsImpl() {\n }", "Cliente(){}", "private CorrelationClient() { }", "public Service(){\n\t\t\n\t}", "private APIClient() {\n }", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "public Factory() {\n this(getInternalClient());\n }", "DevicesClient(DevicesImpl serviceClient) {\n this.serviceClient = serviceClient;\n }", "public Cliente() {\n\t\tsuper();\n\t}", "public TestService() {}", "public ClientCredentials() {\n }", "public interface Client {\n \n /**\n * Get the unique id of current client.\n *\n * @return id of client\n */\n String getClientId();\n \n /**\n * Whether is ephemeral of current client.\n *\n * @return true if client is ephemeral, otherwise false\n */\n boolean isEphemeral();\n \n /**\n * Set the last time for updating current client as current time.\n */\n void setLastUpdatedTime();\n \n /**\n * Get the last time for updating current client.\n *\n * @return last time for updating\n */\n long getLastUpdatedTime();\n \n /**\n * Add a new instance for service for current client.\n *\n * @param service publish service\n * @param instancePublishInfo instance\n * @return true if add successfully, otherwise false\n */\n boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);\n \n /**\n * Remove service instance from client.\n *\n * @param service service of instance\n * @return instance info if exist, otherwise {@code null}\n */\n InstancePublishInfo removeServiceInstance(Service service);\n \n /**\n * Get instance info of service from client.\n *\n * @param service service of instance\n * @return instance info\n */\n InstancePublishInfo getInstancePublishInfo(Service service);\n \n /**\n * Get all published service of current client.\n *\n * @return published services\n */\n Collection<Service> getAllPublishedService();\n \n /**\n * Add a new subscriber for target service.\n *\n * @param service subscribe service\n * @param subscriber subscriber\n * @return true if add successfully, otherwise false\n */\n boolean addServiceSubscriber(Service service, Subscriber subscriber);\n \n /**\n * Remove subscriber for service.\n *\n * @param service service of subscriber\n * @return true if remove successfully, otherwise false\n */\n boolean removeServiceSubscriber(Service service);\n \n /**\n * Get subscriber of service from client.\n *\n * @param service service of subscriber\n * @return subscriber\n */\n Subscriber getSubscriber(Service service);\n \n /**\n * Get all subscribe service of current client.\n *\n * @return subscribe services\n */\n Collection<Service> getAllSubscribeService();\n \n /**\n * Generate sync data.\n *\n * @return sync data\n */\n ClientSyncData generateSyncData();\n \n /**\n * Whether current client is expired.\n *\n * @param currentTime unified current timestamp\n * @return true if client has expired, otherwise false\n */\n boolean isExpire(long currentTime);\n \n /**\n * Release current client and release resources if neccessary.\n */\n void release();\n \n /**\n * Recalculate client revision and get its value.\n * @return recalculated revision value\n */\n long recalculateRevision();\n \n /**\n * Get client revision.\n * @return current revision without recalculation\n */\n long getRevision();\n \n /**\n * Set client revision.\n * @param revision revision of this client to update\n */\n void setRevision(long revision);\n \n}", "private Service() {}", "public ClienteBean() {\n }", "public CallService() {\n super(\"My\");\n }", "private NotificationClient() { }", "public DoorSensorClient(String serviceName) throws IOException {\n super(serviceName);\n }", "public ServiceCompte() {\n\t\tsuper();\n\t}", "public ApplicationHostService(HttpContext httpContext, NewRelicClient client)\n {\n super(httpContext, client);\n }", "private MatterAgentClient() {}", "private MyClientEndpoint(){\n // private to prevent anyone else from instantiating\n }", "public CreChqTrnValVerUVOClient() {\n }", "public ExampleModuleClient() {\r\n }", "private ClientController() {\n }", "public ArkFolioClientFactory(HttpClient client) {\n\t\tthis.client = client;\n\t}", "public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }", "public LpsClient() {\n super();\n }", "public HGDClient() {\n \n \t}", "public Ctacliente() {\n\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "<T> T createClientService(Class<T> clientKlass, @Nullable Map<String, Function<Object[], Object[]>> argumentProcessor, boolean useFNF);", "private ClientLoader() {\r\n }", "private ServiceFactory() {}", "protected RestClient() {\n }", "private RestClient() {\n }", "public AsyncService() {\n super(2, 2);\n }", "public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }", "public PublishingClientImpl() {\n this.httpClientSupplier = () -> HttpClients.createDefault();\n this.requestBuilder = new PublishingRequestBuilderImpl();\n }", "public ClientInformationTest()\n {\n }", "public HRModuleClient() {\n }", "public ClientController() {\n }", "RestClientBuilder(){\n\n }", "private WebServicesFabrica(){}", "public ClientManager(String ipAddress) {\n this.ipAddress = ipAddress;\n }", "public TicketClient(@Value(\"${app.ticket-catalog.url}\") String serverUrl) {\n this.serverUrl = serverUrl;\n this.restTemplate = new RestTemplate();\n var requestFactory = new SimpleClientHttpRequestFactory();\n this.restTemplate.setRequestFactory(requestFactory);\n }", "public RiftsawServiceLocator() {\n }", "public RestClient(){\n }", "RESTClient(String serverName, String omasServerURL)\n {\n this.serverName = serverName;\n this.omasServerURL = omasServerURL;\n this.restTemplate = new RestTemplate();\n }", "public ClientRepositoryFactory() {\n this(new ClientAdapterFactory());\n }", "Client createNewClient(Client client);", "public Servicio(String servicio){\n nombreServicio = servicio;\n }", "public GwtClientMessageSerializer(final Object serviceInstance) {\n super();\n this.serviceInstance = serviceInstance;\n }", "private ServiceGen() {\n }", "public InitService() {\n super(\"InitService\");\n }", "public ServicesInner(Retrofit retrofit, DataBoxManagementClientImpl client) {\n this.service = retrofit.create(ServicesService.class);\n this.client = client;\n }", "public abstract Client getClient();", "public ServiceInfo() {\n }", "private HttpClient() {\n\t}", "public Client(String nom, String prenom, String adresse,CalculerTarif calculerTarif) {\n // Initialisation des données du client.\n this.nom = nom;\n this.prenom = prenom;\n this.adresse = adresse;\n this.calculerTarif = calculerTarif;\n this.listeVehicule = new ArrayList<Vehicule>();\n \n // On ajoute le client à la liste des clients du parking, car le client est forcément un client du parking.\n Parking.getInstance().addClient(this);\n }", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public BeerServiceClient(RestTemplateBuilder restTemplateBuilder) {\n this.restTemplate = restTemplateBuilder.build();\n }", "Service(){\r\n\t\tserviceName =\"x\";\r\n\t\tserviceID = 0;\r\n\t\tserviceFee = 0.0;\r\n\t\tserviceDescrp = \"zztop\";\r\n\t}", "public AbstractClient(Properties options) {\n\t\tthis.options = options;\n\t}", "public ServiceMessage() {\r\n\t}", "public APIClient() {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n // Build base url\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .addCallAdapterFactory(RxJava3CallAdapterFactory.create())\n .build();\n }", "Service newService();", "public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }", "public Cliente(String nome) {\n super(nome);\n }", "Client(String host, int port) {\n super(host, port);\n }", "AmazonComprehendClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n this.advancedConfig = clientParams.getAdvancedConfig();\n init();\n }", "public SearchServiceRestClientImpl() {\n this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build());\n }", "public SampleModelDoctorImpl(Object client)\n {\n clientDoctor = (SampleClientDoctor) client;\n }", "private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}", "public ServiceFactoryImpl() {\n\t\tsuper();\n\t}", "private ServiceLocator(){}", "public RemoteFacadeServiceLocator() {\r\n }", "private ServiceGenerator() {\n }", "private ServiceGenerator() {\n }", "public RestService() {\r\n }", "public ClientDetailsEntity() {\n\t\t\n\t}", "private ServiceGenerator() {\n }", "protected HttpJsonServicesStub(ServicesStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new HttpJsonServicesCallableFactory());\n }", "private ClientController(){\n\n }", "public BrowseOffenceAMClient() {\r\n }", "private RedisClient() {\n\n }", "public AlbumService() {\n super();\n }", "protected ClientStatus() {\n }" ]
[ "0.80982107", "0.7595374", "0.7560232", "0.73243403", "0.7317023", "0.7211743", "0.7206089", "0.7130735", "0.7129057", "0.7036567", "0.70123404", "0.696759", "0.696658", "0.6964715", "0.6944388", "0.69322395", "0.6911959", "0.6897548", "0.68581676", "0.68517137", "0.6824151", "0.6810942", "0.67875266", "0.6785803", "0.67624056", "0.6756702", "0.67397666", "0.67168057", "0.6709456", "0.6692296", "0.66912234", "0.66371477", "0.6636819", "0.6636165", "0.6622493", "0.6622398", "0.6583074", "0.6580238", "0.6579792", "0.6577434", "0.6573331", "0.6571227", "0.65691507", "0.6568945", "0.65641326", "0.6551975", "0.653348", "0.6510183", "0.6505791", "0.65000725", "0.6496997", "0.6489942", "0.6476133", "0.64693666", "0.64454603", "0.6436704", "0.6423111", "0.6415776", "0.64144355", "0.64030486", "0.6389881", "0.6389614", "0.63887435", "0.6384473", "0.6377288", "0.63730204", "0.63662034", "0.6361691", "0.6360122", "0.635668", "0.63463134", "0.633755", "0.6321589", "0.6319218", "0.6316813", "0.631585", "0.6310209", "0.63095397", "0.63077587", "0.63041186", "0.6300237", "0.62948304", "0.6293882", "0.62912077", "0.6285457", "0.6282312", "0.6279215", "0.6277671", "0.6274599", "0.62690145", "0.62690145", "0.62642676", "0.6264098", "0.6263363", "0.6259336", "0.6258805", "0.6255618", "0.62530226", "0.6240055", "0.62314314" ]
0.8567346
0
Getter de l'attribut IDaoClient
public IDaoClient getDao() { return dao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cliente getCliente() {\n return objCliente;\n }", "public ICliente getCodCli();", "public Cliente getCliente() {\n return cliente;\n }", "public ClienteEntity getCliente() {\r\n return cliente;\r\n }", "public int getIdClient() {\r\n return idClient;\r\n }", "public String getClientId(){ return this.client_id;}", "public Object getClientId()\n {\n return clientId; // Field is final; no need to sync.\n }", "public Integer getClientId() { return clientId; }", "default Client getClient(Long id) {\r\n return get(Client.class, id);\r\n }", "@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}", "public String getClientID(){\n return clientID;\n }", "public Object clientId() {\n return this.clientId;\n }", "public int getIdCliente() {\n return idCliente;\n }", "java.lang.String getClientId();", "@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}", "public String getClientId() {\n \treturn clientId;\n }", "private Client lireClientServ(int idClient) {\n\t\tClient client = daoclient.readClientDaoById(idClient);\n\t\treturn client;\n\t}", "public static IClient clientAccessor() {\n return Application.getGame().getClientAccessor();\n }", "String getClientId();", "String getClientId();", "public String getClientId() {\n return clientId;\n }", "public String getClientId() {\n return clientId;\n }", "public java.lang.String getClienteID() {\n return clienteID;\n }", "public java.lang.String getClienteID() {\n return clienteID;\n }", "public java.lang.String getIdcliente() {\n return idcliente;\n }", "public DBSequence getClientId() {\n return (DBSequence)getAttributeInternal(CLIENTID);\n }", "public ClientID getClientID() {\n return clientID;\n }", "int getClientId();", "public String getClientId() {\n return clientId;\n }", "@Override\n\tpublic Client getClientById(int id) {\n\t\treturn null;\n\t}", "public String getClientePedido() {\n return ClientePedido;\n }", "public Integer getClientId() {\r\n\t\treturn clientId;\r\n\t}", "public String clientId() {\n return clientId;\n }", "public byte getClientId()\r\n\t{\r\n\t\treturn _clientId;\r\n\t}", "public final String getClientId() {\n return clientId;\n }", "public Client getClient() {\n return client;\n }", "public Client getClient() {\n return client;\n }", "public abstract Client getClient();", "public String getClient()\n {\n return \"DOE\";\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "@Override\n\tpublic GenericDAO<Cliente, Integer> getDao() {\n\t\treturn clienteDAO;\n\t}", "public Client getClient() {\r\n\t\treturn this.client;\r\n\t}", "@Nullable\n public String getClientId() {\n return this.clientId;\n }", "public Long getClientID() { return m_lClientID; }", "public ClientI getClient() {\n\t\treturn client;\n\t}", "public String getClientId() {\n\t\treturn clientId;\n\t}", "@Override\n public int getClientId() {\n return _entityCustomer.getClientId();\n }", "public GenericDao<Client> getClientDao();", "public UUID clientId() {\n return clientId;\n }", "@Override\n public Client get(String uuid) {\n return null;\n }", "Client findClientById(Long id) throws BaseException;", "public BCliente obtenerCliente(int codigo)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\treturn daoCliente.obtenerCliente(codigo);\r\n\t}", "Client getClientById(Integer id) throws SQLException;", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Object getClientData() {\r\n return clientData;\r\n }", "public Client getClientCode() {\r\n\t\treturn this.client;\r\n\t}", "public java.lang.StringBuilder getClientId()\n {\n return client_id_;\n }", "@Override\n public Cassandra.Client getAPI() {\n return client;\n }", "public Client getClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\treturn client;\n\t}", "public int getClientePorHora() {\r\n return clientePorHora;\r\n }", "private static Cliente llenarDatosCliente() {\r\n\t\tCliente cliente1 = new Cliente();\r\n\t\tcliente1.setApellido(\"De Assis\");\r\n\t\tcliente1.setDni(368638373);\r\n\t\tcliente1.setNombre(\"alexia\");\r\n\t\tcliente1.setId(100001);\r\n\r\n\t\treturn cliente1;\r\n\t}", "public static DucktalesClient getClient() {\n \treturn client;\n }", "Client getClient(int id) throws ClientNotFoundException;", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Object getClientData() {\n return clientData;\n }", "public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }", "@JsonProperty(\"client_id\")\n public String getClientId() {\n return clientId;\n }", "@Override\r\n public void getCliente(Cliente cliente) {\r\n if (cliente!=null){\r\n this.cliente = cliente;\r\n nomeClientejTextField.setText(cliente.getNome());\r\n }\r\n }", "public int getIdClientef() {\n return idClientef;\n }", "protected int getClientType() {\n\n return clientType;\n\n }", "public Cliente findByPrimaryKey(int idCliente) throws ClienteDaoException;", "public ClientIdentity getClientIdentity() {\n\t\treturn this.clientIdentity;\n\t}", "@Override\n public String getClientId(FacesContext context)\n {\n\n String clientId = getId() + \"_Client\";\n return clientId;\n }", "@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}", "public int getClientID() {\r\n\t\treturn this.clientID;\r\n\t}", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "public int getAD_Client_ID();", "protected Client getRealClient() {\n\t\treturn client;\n\t}", "public Client getClient() {\n\t\tcheckInit();\n\t\tfinal Client cli = tenant.getContext().getBean(Client.class);\n\t\tif (cli.getEventMapper()==null) {\n\t\t\tcli.setEventMapper(getEventMapper());\n\t\t}\n\t\treturn cli;\n\t}" ]
[ "0.7368975", "0.73600626", "0.7237941", "0.7179216", "0.7152529", "0.7065297", "0.70517236", "0.69959134", "0.6983905", "0.6939864", "0.6936247", "0.69140047", "0.68897116", "0.68815005", "0.68497854", "0.68320787", "0.67760515", "0.67530787", "0.67493445", "0.67493445", "0.6744025", "0.6711808", "0.6660114", "0.6660114", "0.6659642", "0.6653986", "0.6643772", "0.6631153", "0.66170615", "0.6612172", "0.658244", "0.65818024", "0.6574861", "0.6531649", "0.65287185", "0.6495406", "0.6495406", "0.64637876", "0.64530724", "0.6447559", "0.6447559", "0.6447559", "0.6447559", "0.6447559", "0.6447559", "0.6447559", "0.6441669", "0.64411503", "0.64391965", "0.6436798", "0.6427079", "0.64254564", "0.64029557", "0.63981885", "0.63925266", "0.63871104", "0.63805073", "0.6375928", "0.6361958", "0.63571936", "0.63571936", "0.63571936", "0.63535774", "0.6315829", "0.6304586", "0.6296377", "0.6296377", "0.6283381", "0.626997", "0.626642", "0.62656385", "0.62513596", "0.62513596", "0.62513596", "0.62513596", "0.6244494", "0.6237446", "0.62366396", "0.62324214", "0.6216897", "0.6214716", "0.6210781", "0.6203537", "0.6193281", "0.6182926", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.6166801", "0.61622304", "0.6154601" ]
0.632431
63
Setter de l'attribut IDaoClient
public void setDao(IDaoClient dao) { this.dao = dao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCodCli(ICliente codigo);", "public void setIdCliente(int value) {\n this.idCliente = value;\n }", "protected void setClient(Client _client) {\n\t\tclient = _client;\n\t}", "@Override\n\tpublic void altaCliente(Cliente cliente) {\n\t}", "public void setClient(ConnectionToClient client) {\n this.client = client;\n }", "public void setCliente(ClienteEntity cliente) {\r\n this.cliente = cliente;\r\n }", "public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }", "private void setClient(ClientImpl model) {\n if (client == null) {\n this.client = model;\n }\n }", "public void setClient(Client client) {\r\n\t\tthis.client = client;\r\n\t}", "public void setClient(Client client) {\n\t\tthis.client = client;\n\t}", "@Override\n\tpublic void setClient(Client client) {\n\t\tlog.warn(\"setClient is not implemented\");\n\t}", "public void setClient(Client client_) {\n\t\tclient = client_;\n\t}", "public void setIdcliente(java.lang.String idcliente) {\n this.idcliente = idcliente;\n }", "public final void setClientId(String value) {\n clientId = value;\n }", "public void setIdClientef(int idClientef) {\n this.idClientef = idClientef;\n }", "public void setClientId(DBSequence value) {\n setAttributeInternal(CLIENTID, value);\n }", "public void setClientID(Long lClientID) { m_lClientID = lClientID; }", "public void setClientID(String clientID){\n this.clientID = clientID;\n }", "public void setConnection(C4Client client) {\n this.client = client;\n }", "void setDefaultClient(String id);", "public void setClientePedido(String ClientePedido) {\n this.ClientePedido = ClientePedido;\n }", "public void setClientId(String s) {\n if (s == null) clientId = \"\";\n else clientId = s;\n }", "@Override\r\n public void getCliente(Cliente cliente) {\r\n if (cliente!=null){\r\n this.cliente = cliente;\r\n nomeClientejTextField.setText(cliente.getNome());\r\n }\r\n }", "public void clientId(UUID clientId) {\n this.clientId = clientId;\n }", "public String getClientId(){ return this.client_id;}", "public int getIdClient() {\r\n return idClient;\r\n }", "public Builder setClientId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00001000;\n clientId_ = value;\n onChanged();\n return this;\n }", "protected void setClient(MqttAsyncClient client) {\n this.client = client;\n }", "public static void setClient(DucktalesClient clientInstance) {\n \tclient = clientInstance;\n }", "@Override\n public void setClientId(int clientId) {\n _entityCustomer.setClientId(clientId);\n }", "public void setID(String username){\n this.clientID = username+\": \"+clientID;\n \n }", "public void setDriveClientId(String id) {this.databaseConfig.setProperty(\"driveClientId\", id);}", "public void setClientID(ClientID id) {\n this.clientID = id;\n }", "@Override\r\n\tpublic void updateclient(Client client) {\n\t\t\r\n\t}", "public void changeClientData(Client client) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n dbb.overwriteClient(client);\n dbb.commit();\n dbb.closeConnection();\n }", "public void setClientInfo(ClientInfo clientInfo) {\n this.clientInfo = clientInfo;\n }", "boolean editClient(IClient e);", "public void setClienteID(java.lang.String clienteID) {\n this.clienteID = clienteID;\n }", "public void setClienteID(java.lang.String clienteID) {\n this.clienteID = clienteID;\n }", "public int getIdCliente() {\n return idCliente;\n }", "private Client lireClientServ(int idClient) {\n\t\tClient client = daoclient.readClientDaoById(idClient);\n\t\treturn client;\n\t}", "public Cliente getCliente() {\n return objCliente;\n }", "public void setClDao(IClientDao clDao) {\r\n\t\tthis.clDao = clDao;\r\n\t}", "public Cliente getCliente() {\n return cliente;\n }", "@JacksonInject\n public void setClient(HttpClient client) {\n this.client = client;\n }", "public void setClientId(Integer clientId) {\r\n\t\tthis.clientId = clientId;\r\n\t}", "@Override\r\n\tpublic void setClient(Client cc) {\n\t\tthis.e2eValidationClient = (E2EValidationClient) cc;\r\n\t}", "@Override\r\n\t\tpublic void setClientInfo(String name, String value)\r\n\t\t\t\tthrows SQLClientInfoException {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void updateClient() {\n\t\t\n\t}", "public Integer getClientId() { return clientId; }", "public ICliente getCodCli();", "public void setIsClient(java.lang.Boolean _isClient)\n {\n isClient = _isClient;\n }", "public ClienteEntity getCliente() {\r\n return cliente;\r\n }", "public void setClientId(String clientId) {\n this.clientId = clientId;\n }", "@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}", "Client updateClient(Client client) throws BaseException;", "public void setClientId(@Nullable String clientId) {\n this.clientId = clientId;\n }", "public boolean setClient(Object clientApp){\r\n if (clientApp==null) return (false);\r\n varContextObject=clientApp; \r\n varContextFields=clientApp.getClass().getFields();\r\n return (true);\r\n }", "public void modifierClient(Client client) throws DaoException {\n\t\ttry {\n\t\t\tdaoClient.save(client);\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.modifierClient\" + e);\n\t\t}\n\t}", "public Object getClientId()\n {\n return clientId; // Field is final; no need to sync.\n }", "public String getClientId() {\n \treturn clientId;\n }", "@Override\n\t\tpublic Client getClient(int idClient) {\n\t\t\treturn null;\n\t\t}", "public void updateClient()\n\t{\n\t\t// TODO\n\t}", "public String getClientID(){\n return clientID;\n }", "@Test\n public void testSetClient() {\n\n Client client = client2;\n Beneficiaire instance = ben1;\n instance.setClient(client);\n assertEquals(client, instance.getClient());\n\n\n }", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "public void setClientNo(DBSequence value) {\n setAttributeInternal(CLIENTNO, value);\n }", "@Override\n\tpublic Cliente editarCliente(Integer idcliente) {\n\t\treturn clienteDao.editarCliente(idcliente);\n\t}", "@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}", "public void setApiClient(ApiClient apiClient) {\n this.apiClient = apiClient;\n }", "public void setApiClient(ApiClient apiClient) {\n this.apiClient = apiClient;\n }", "public TelaAlterarCliente() {\n\t\tinitComponents();\n\t}", "Cliente(){}", "public interface IClient {\n\n void setName(String name);\n}", "public String getClientId() {\n return clientId;\n }", "@Override\n\tpublic Client update(Client obj) {\n\t\treturn null;\n\t}", "@Override\n\tpublic int editarCliente(ClienteBean cliente) throws Exception {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void aggiornaUI() {\r\n\t\tString valore = input_ricerca_cliente.getText();\r\n\t\tthis.clienti.setAll(AppFacadeController.getInstance().getGestisciClientiController().cercaCliente(valore));\r\n\t}", "public ClientView(Client client) {\n initComponents();\n this.setLocationRelativeTo(null);\n this.client = client;\n \n if(client != null){\n lblAction.setText(\"Alterar Cliente\");\n txtCpf.setEditable(false);\n btnAction.setText(\"Alterar\");\n \n try {\n client = new ClientDAO().search(client);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(this, \"Erro de SQL: \\n\" + ex.getMessage(), \"Erro\", 0);\n } catch (ClassNotFoundException ex) {\n JOptionPane.showMessageDialog(this, \"Erro de Classe: \\n\" + ex.getMessage(), \"Erro\", 0);\n }\n \n txtCpf.setText(client.getCpf());\n txtName.setText(client.getName());\n cbCateg.setSelectedIndex(client.getCateg());\n }\n }", "public String getClientId() {\n return clientId;\n }", "Client updateClient(Client client) throws ClientNotFoundException;", "public String getClientId() {\n return clientId;\n }", "public void setClientProperty(ClientProperty clientProperty) {\n\t\tthis.clientProperty = clientProperty;\n\t}", "public void setClientId (String clientId) {\n\t\tthis.clientId = clientId;\n\t}", "public void setHttpClient( HttpClient req ) {\r\n\tclient=req;\r\n }", "public Cliente(Long id, String nome, int idade) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.nome = nome;\n\t\tthis.idade = idade;\n\t}", "public Object clientId() {\n return this.clientId;\n }", "public alterarSenhaCliente() {\n }", "public void novo() {\n cliente = new Cliente();\n }", "public void setClienteFK(Integer clienteFK) {\n\t\tthis.clienteFK.set(clienteFK);\n\t}", "public void setClientId(String clientId) {\n this.clientId = clientId == null ? null : clientId.trim();\n }", "public void setID(int number) {\n this.clientNumber = number;\n }", "public void emprestar(ClienteLivro cliente) {\n\t\tcliente.homem = 100;\n\n\t}", "@Override\n\tpublic void editar(Cliente cliente) throws ExceptionUtil {\n\t\t\n\t}", "public static void setEventClient(NetMapListener eventClient_) {\n eventClient = eventClient_;\n }", "public abstract void adaugaClient(NodAbstractStructura client);", "@Override\n public void setSqlMapClient(SqlMapClient sqlMapClient) {\n super.setSqlMapClient(sqlMapClient);\n }", "public java.lang.String getClienteID() {\n return clienteID;\n }", "public java.lang.String getClienteID() {\n return clienteID;\n }", "public Builder setClientIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00001000;\n clientId_ = value;\n onChanged();\n return this;\n }" ]
[ "0.7083928", "0.6992242", "0.69857913", "0.6969958", "0.69161737", "0.68536186", "0.68334454", "0.68073756", "0.6792115", "0.6766159", "0.6760142", "0.66826814", "0.6663244", "0.6647669", "0.66305524", "0.66235733", "0.66127217", "0.6595483", "0.6557566", "0.6500341", "0.64760756", "0.64700073", "0.64549226", "0.64134634", "0.64027417", "0.6390477", "0.6335674", "0.6313994", "0.62960666", "0.62923104", "0.62738997", "0.6264653", "0.62638474", "0.6260348", "0.6255529", "0.62072176", "0.62071437", "0.6205849", "0.6205849", "0.6203924", "0.619641", "0.61853194", "0.61590457", "0.61452097", "0.61261463", "0.6102505", "0.60902196", "0.6088064", "0.6063913", "0.60601336", "0.60421103", "0.60232335", "0.60040677", "0.599875", "0.5998362", "0.59958404", "0.5995247", "0.5987433", "0.5951951", "0.5922635", "0.5920766", "0.5919535", "0.5918249", "0.5915299", "0.5901124", "0.58937573", "0.5893061", "0.5881237", "0.5869282", "0.5863328", "0.5863328", "0.5850058", "0.5840555", "0.58311975", "0.5828279", "0.5819787", "0.58193314", "0.57990235", "0.57863116", "0.5780012", "0.5778582", "0.577413", "0.57642543", "0.5763707", "0.575901", "0.5752877", "0.5730212", "0.5724022", "0.5723451", "0.57160753", "0.5708002", "0.5707001", "0.57059366", "0.5699978", "0.56980854", "0.5695823", "0.5685756", "0.5681423", "0.5681423", "0.5670743" ]
0.626186
33
Methode qui retourne la liste de tous les clients
public List<Client> findAll() { return dao.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Clients> getallClients();", "@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}", "public List<Client> getAllClient();", "public List<T> showAllClients();", "private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}", "List<User> getAllClients();", "public ClientList getClients() {\r\n return this.clients;\r\n }", "public void printClientList(){\n for(String client : clientList){\n System.out.println(client);\n }\n System.out.println();\n }", "Set<Client> getAllClients();", "public List<ClientThread> getClients(){\n return clients;\n }", "public ArrayList<Client> getClients(String nameClient){\n ArrayList<Client> listClients = new ArrayList<Client>();\n \n \n this.serversList.forEach((server) -> {\n server.getClients().stream().filter((client) -> (client.getName().toLowerCase().contains(nameClient.toLowerCase()))).forEachOrdered((client) -> {\n client.setNameServer(server.getNameServer());\n listClients.add(client);\n });\n });\n \n return listClients;\n }", "public static void clientListUpdater() {\r\n\t\tclientList.clear();\r\n\t\tclientList.addAll(serverConnector.getAllClients());\r\n\t}", "public List BestClient();", "@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }", "public static ArrayList<Client> getClients() {\n return clients;\n }", "public List<UserModel> getListOfClient() {\n\t\treturn userDao.getListOfClients();\n\t}", "@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}", "public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}", "public List<Compte> getComptesClient(int numeroClient);", "public ArrayList<DataCliente> listarClientes();", "public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }", "public List<Cliente> consultarClientes();", "public ArrayList<ClientHandler> getClientList()\n {\n return clientList;\n }", "public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }", "public List<Client> getAllClient() {\n \tTypedQuery<Client> query = em.createQuery(\n \"SELECT g FROM Client g ORDER BY g.id\", Client.class);\n \treturn query.getResultList();\n }", "public Iterator getClients() {\n rrwl_serverclientlist.readLock().lock();\n try {\n return clientList.iterator();\n } finally {\n rrwl_serverclientlist.readLock().unlock();\n }\n }", "@Override\r\n\tpublic List<Client> selectclient() {\n\t\tList<Client> list=this.getSqlSessionTemplate().selectList(changToNameSpace(\"selectclient\"));\r\n\t\treturn list;\r\n\t}", "public void getClients(AsyncCallback<List<Client>> cb);", "public ArrayList<Client> getClientList() {\n return this.clientList;\n }", "public List<Client> listerTousClients() throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findAll();\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerTousClients\" + e);\n\t\t}\n\t}", "@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }", "protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}", "List<GroupUser> getConnectedClients();", "public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}", "public synchronized void sendUserList()\n {\n String userString = \"USERLIST#\" + getUsersToString();\n for (ClientHandler ch : clientList)\n {\n ch.sendUserList(userString);\n }\n }", "@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}", "public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}", "public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}", "public static void initializeClientList() {\r\n\t\tClient newClient1 = new Client(1, \"Bob Jones\", \"Brokerage\");\r\n\t\tclientList.add(newClient1);\r\n\t\t\r\n\t\tClient newClient2 = new Client(2, \"Sarah Davis\", \"Retirement\");\r\n\t\tclientList.add(newClient2);\r\n\t\t\r\n\t\tClient newClient3 = new Client(3, \"Amy Friendly\", \"Brokerage\");\r\n\t\tclientList.add(newClient3);\r\n\t\t\r\n\t\tClient newClient4 = new Client(4, \"Johnny Smith\", \"Brokerage\");\r\n\t\tclientList.add(newClient4);\r\n\t\t\r\n\t\tClient newClient5 = new Client(5, \"Carol Spears\", \"Retirement\");\r\n\t\tclientList.add(newClient5);\r\n\t}", "public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }", "public static ArrayList<MqttClient> getAllClients() {\n return clients;\n }", "public static ArrayList<Cliente> getClientes()\n {\n return SimulaDB.getInstance().getClientes();\n }", "public int clientsCount(){\n return clientsList.size();\n }", "public List<Integer> getAllIDClient(){\n\t\tPreparedStatement ps = null;\n\t\tResultSet resultatRequete =null;\n\t\t\n\t\ttry {\n\t\t\tString requeteSqlGetAll=\"SELECT id_client FROM clients\";\n\t\t\tps = this.connection.prepareStatement(requeteSqlGetAll);\n\t\t\t\n\t\t\tresultatRequete = ps.executeQuery();\n\n\t\t\tClient client = null;\n\t\t\t\n\t\t\tList<Integer> listeIDClient = new ArrayList <>();\n\n\t\t\twhile (resultatRequete.next()) {\n\t\t\t\tint idClient = resultatRequete.getInt(1);\n\t\t\t\t\n\t\t\t\tlisteIDClient.add(idClient);\n\t\t\t\t\n\t\t\t}//end while\n\t\t\treturn listeIDClient;\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(resultatRequete!= null) resultatRequete.close();\n\t\t\t\tif(ps!= null) ps.close();\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public List<String> getListOfClientNames() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n return getTableDataByColumn(clientsTable, 0);\n }", "@Override\n\tpublic Collection<Client> getAllClients() {\n\t\treturn null;\n\t}", "public ArrayList<ServerClient> displayAll() throws SQLException\n\t{\n\t\tString SQL_P = \"SELECT * FROM Clients\";\n\t\tResultSet rs;\n\n\t\tArrayList<ServerClient> array = new ArrayList<>();\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\trs = stmt.executeQuery(SQL_P);\n\t\t\twhile (rs.next())\n\t\t\t{\n\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}", "public void list(String user) {\n\t\tfor (HandleClient c : clients) {\n\t\t\tif (c.getUserName().equals(user)) {\n\t\t\t\tfor (int a = 0; a < clients.size(); a++) {\n\t\t\t\t\tc.sendList(clients.get(a).name, a);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }", "@Override\n\tpublic List<Socket> GetConnectedClients() {\n\t\t\n\t\tArrayList<Socket> list = new ArrayList<Socket>();\n\t\t\n\t\tif(clients == null)return list;\n\t\t\n\t\tfor(Socket s : clients)\n\t\t{\n\t\t\tlist.add(s);\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public static void main(String[] args) {\n\t\t\t\tList listClient = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\tClient client = new Client();\r\n\t\t\t\tclient.setFirstName(\"Eduardo\");\r\n\t\t\t\tclient.setSecondName(\"Mendoza\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tClient newClient = new Client();\r\n\t\t\t\tnewClient.setFirstName(\"Carlos\");\r\n\t\t\t\tnewClient.setSecondName(\"Fuentealba\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tlistClient.add(newClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tclient = new Client();\r\n\t\t\t\tclient.setFirstName(\"Pablo\");\r\n\t\t\t\tclient.setSecondName(\"Mondaca\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"listClient:\"+listClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Mostar los elementos de la lista\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIterator it = listClient.listIterator();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Detectar que tipo de objeto tiene la lista\r\n\t\t\t\t/*Object obj = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tobj = (Object) it.next();\r\n\t\t\t\t\tSystem.out.println(\"obj:\"+obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tClient nclient = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tnclient = (Client) it.next();\r\n\t\t\t\t\tSystem.out.println(\"nclient:\"+nclient);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"firstName:\"+nclient.getFirstName());\r\n\t\t\t\t\tSystem.out.println(\"secondName:\"+nclient.getSecondName());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t}", "@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}", "public List<Client> findAllClient() throws SQLException {\n\t\treturn iDaoClient.findAllClient();\n\t}", "private void getClientList(ActionEvent e){\r\n new ClientList().Display();\r\n }", "public List<Cliente> getClientes() {\n\t\ttry {\n\t\t\t\n\t\t\tList<Cliente> clientes = (List<Cliente>) db.findAll();\n\t\t\t\t\t\n\t\t\treturn clientes;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ArrayList<Cliente>();\n\n\t\t}\n\t}", "public Client[] getClients() {\r\n // Get all the contents from the table clients with columns as keys mapped\r\n // to an ArrayList of\r\n // ordered row values\r\n HashMap<String, ArrayList<String>> clientInfo = getAllTableContents(\"clients\");\r\n // Parse the clients into an ArrayList of Client objects\r\n ArrayList<Client> clients = parseClients(clientInfo);\r\n // Cast to an array of Client and return\r\n Client[] temp = new Client[clients.size()];\r\n return clients.toArray(temp);\r\n }", "public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }", "@Override\r\n\tpublic List<Client> consulterClients(String mc) {\n\t\treturn dao.consulterClients(mc);\r\n\t}", "public ClientInformation(){\n clientList = new ArrayList<>();\n\n }", "@Override\n\tpublic List<Client> getAll() {\n\t\treturn dao.getAll(Client.class);\n\t}", "@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}", "public List<String> allClients() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/automation/v2/clients\"));\n return mapper.readValue(httpResponse, new TypeReference<List<String>>() {\n });\n }", "public void UserClientAcceptor(ArrayList<User> cleints) {\r\n \tuserClient = (ArrayList<User>)cleints.clone();\r\n \t//System.out.println(userClient);\r\n\t\tList.addAll(cleints);\r\n\t\t}", "public void printClientList() {\n uiService.underDevelopment();\n }", "public int getClients()\r\n\t{\r\n\t\treturn numberOfClients;\r\n\t}", "@Override\n public KimbleClient[] clientStartInfo() {\n return clients;\n }", "private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }", "public List<Cliente> getClienteList () {\n\t\t\n\t\tCriteria crit = HibernateUtil.getSession().createCriteria(Cliente.class);\n\t\tList<Cliente> clienteList = crit.list();\n\t\t\n\t\treturn clienteList;\n\t}", "@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }", "public Set<String> getGameListClients() {\n return this.gameListClients;\n }", "public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }", "private void sortClients()\n {\n System.out.println(\"clients items (alphabetically):\");\n Set<Client> clients = ctrl.sortClientsAlphabetically();\n clients.stream().forEach(System.out::println);\n }", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "public ArrayList<Cliente> obtClientes(){\n return (ArrayList<Cliente>) clienteRepositori.findAll();\n }", "public List<Client> getClientsByConseillerId(long idConseiller) throws SQLException {\r\n\t\tPreparedStatement st = null;\r\n\t\tResultSet rs =null;\r\n\t\tClient client = new Client();\r\n\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = getConnection();\r\n\t\t\tString selectSQL = \"select surname, name, email , adress from client where idConseiller = ?\";\r\n\t\t\tst = connection.prepareStatement(selectSQL);\r\n\t\t\tst.setLong(1, idConseiller);\r\n\t\t\t\r\n\t\t\trs = st.executeQuery();\r\n\t\t\t\r\n\t\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tclient = new Client();\r\n\t\t\tclient.setSurname(rs.getString(\"surname\"));\r\n\t\t\tclient.setName(rs.getString(\"name\"));\r\n\t\t\tclient.setEmail(rs.getString(\"email\"));\r\n\t\t\tclient.setAdress(rs.getString(\"adress\"));\r\n\t\t\t\r\n\t\t\tclients.add(client);\r\n\t\t }\r\n\t\t\treturn clients;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (st != null)\r\n\t\t\t\t\tst.close();\r\n\t\t\t\tif (connection != null)\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=0; i<clients.size();i++) {\r\n\t\t\t\tSystem.out.println(\"la donnée associée à l'indice \"+ i + \" est \" + clients.get(i));\r\n\t\t\t}\r\n\t\t\treturn clients;\t\t\r\n\t\t\r\n\t}", "private void LoadClients(boolean Traitement) {\n\n\t\ttry {\n\t\t\tpanelBouton.getBtnCarteClient().setVisible(false);\n\t\t\tint i = 0;\n\t\t\tGetClientTableModel().clear();\n\t\t\tif (Traitement) {\n\t\t\t\tthis.nom = panelRecherche.getEtNom().getText();\n\t\t\t\tthis.prenom = panelRecherche.getEtPrenom().getText();\n\t\t\t\tliste = gestion.getClients(nom, prenom);\n\t\t\t} else {\n\t\t\t\tString numclient = panelRecherche.getEtNumclient().getText().toString();\n\t\t\t\tif (numclient.isEmpty()) {\n\t\t\t\t\ti = 0;\n\t\t\t\t} else {\n\t\t\t\t\tString patternId = \"^[0-9]+$\";\n\t\t\t\t\tboolean checkId = Pattern.matches(patternId, numclient);\n\t\t\t\t\tif (checkId) {\n\t\t\t\t\t\ti = Integer.parseInt(numclient);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Ce champ peut contenir uniquement des valeurs numériques\");\n\t\t\t\t\t\tRunnable clearText = new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tpanelRecherche.getEtNumclient().setText(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tSwingUtilities.invokeLater(clearText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tliste = gestion.getClient(i);\n\t\t\t}\n\t\t\tif (liste == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Client client : liste) {\n\t\t\t\tGetClientTableModel().addRow(client);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\tArrayList<Commande> cdes = null;\n\t\ttry {\n\t\t\tcdes = gestion.getCdes(resultat);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}", "private void fillClientsCbAndDispatcherCb() {\n List<Cliente> findClienteEntities = getUtils().getClienteController().findClienteEntities();\n ObservableList clientsList = FXCollections.observableArrayList();\n ObservableList dispatcherLst = FXCollections.observableArrayList();\n for (Cliente c : findClienteEntities) {\n if (c.getDespachante().equals(\"D\")) {\n dispatcherLst.add(c.getNombre());\n } else {\n clientsList.add(c.getNombre());\n }\n }\n getClientCb().setItems(clientsList);\n getDispatcherCb().setItems(dispatcherLst);\n }", "public List<Usuario> obtenerTodosLosClientes() {\n return this.usuarioFacade.obtenerTodosLosClientes();\n }", "public List getUserListShowToClient() {\n /*\n * Use the ConnectionFactory to retrieve an open\n * Hibernate Session.\n *\n */\n Session session = ConnectionFactory.getInstance().getSession();\n Query query;\n\n try {\n /*\n * Build HQL (Hibernate Query Language) query to retrieve a list\n * of all the items currently stored by Hibernate.\n */\n query = session.createQuery(\"select user from app.user.User user where user.currentEmployee = 'true' and user.clientShow = 'TRUE' order by user.lastName, user.firstName\");\n return query.list();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }", "public List<Cliente> getClientes() {\n List<Cliente> cli = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/archivo.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String nombreCliente = st.nextToken();\n String nombreEmpresa = st.nextToken();\n String ciudad = st.nextToken();\n String deuda = st.nextToken();\n String precioVentaSaco = st.nextToken();\n\n Cliente cliente = new Cliente(\n Integer.parseInt(id),\n nombreCliente,\n nombreEmpresa,\n ciudad,\n Float.parseFloat(deuda),\n Float.parseFloat(precioVentaSaco)\n );\n\n cli.add(cliente);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return cli;\n }", "@Override\n\tpublic List<Clientes> findAllClientes() throws Exception {\n\t\treturn clienteLogic.findAll();\n\t}", "public String[] getClientNames() {\n return clientNames;\n }", "List<ClientResponse> findUsersClient(User user) throws BaseException;", "public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}", "@Override\n\tpublic List<Cliente> getByIdCliente(long id) {\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Cliente> clients =getCurrentSession().createQuery(\"from Cliente c join fetch c.grupos grupos join fetch grupos.clientes where c.id='\"+id+\"' and c.activo=1\" ).list();\n return clients;\n\t}", "public List<HotspotClient> getHotspotClientsList() {\n List<HotspotClient> clients = new ArrayList<HotspotClient>();\n synchronized (mHotspotClients) {\n for (HotspotClient client : mHotspotClients.values()) {\n clients.add(new HotspotClient(client));\n }\n }\n return clients;\n }", "@Generated\n public List<Clientes> getClientes() {\n if (clientes == null) {\n __throwIfDetached();\n ClientesDao targetDao = daoSession.getClientesDao();\n List<Clientes> clientesNew = targetDao._queryUsuarios_Clientes(id);\n synchronized (this) {\n if(clientes == null) {\n clientes = clientesNew;\n }\n }\n }\n return clientes;\n }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public HashMap<String, Profile> getClients() {\n\t\treturn clients;\n\t}", "public List<PedidoIndividual> obtenerCuentaCliente(Long idCliente,String claveMesa) throws QRocksException;", "private void getClientList(String loginUserId) {\n if (!TextUtils.isEmpty(loginUserId) && NetworkUtil.isOnline(this)){\n initGetInvoiceAPIResources(loginUserId);\n\n }else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(mainLayout, \"Please Check Internet Connection\", Snackbar.LENGTH_LONG).show();\n }\n }", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}", "public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }", "@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }", "@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}", "@Override\r\n\tpublic String[] getClientNames() {\r\n\t\treturn initData.clientNames;\r\n\t}", "public List<Client> listerClientsDeConseiller(Long idConseiller) throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findByConseillerId(idConseiller);\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerClientsDeConseiller\" + e);\n\t\t}\n\t}" ]
[ "0.8319818", "0.80270195", "0.80128425", "0.7891971", "0.7866626", "0.7779001", "0.77351725", "0.7687418", "0.76563346", "0.76428527", "0.7565483", "0.74878204", "0.7485699", "0.74729085", "0.744428", "0.7437851", "0.74355793", "0.73973334", "0.7388367", "0.7385832", "0.7357822", "0.7338178", "0.7331818", "0.7326374", "0.7316951", "0.73114336", "0.7265897", "0.72639716", "0.72564566", "0.72535473", "0.72182465", "0.7217005", "0.72165364", "0.7203541", "0.71646005", "0.7158914", "0.7140877", "0.71279895", "0.7073799", "0.70711136", "0.7051629", "0.703784", "0.70257324", "0.70195746", "0.7010283", "0.6992591", "0.69701713", "0.69481003", "0.69454724", "0.69259286", "0.69253254", "0.69198793", "0.6903547", "0.68944025", "0.68901867", "0.6886428", "0.68789464", "0.68730104", "0.6858888", "0.68558353", "0.68400747", "0.68306524", "0.682428", "0.6820449", "0.68146414", "0.68076986", "0.67942333", "0.6790592", "0.67854595", "0.6782203", "0.6782143", "0.676213", "0.67576945", "0.67380625", "0.67179716", "0.66413105", "0.6626957", "0.6613896", "0.6610843", "0.65751463", "0.6560609", "0.65568423", "0.65560883", "0.65502703", "0.6544252", "0.6535322", "0.65260196", "0.6506399", "0.6498073", "0.649275", "0.6488092", "0.6473771", "0.64654505", "0.64645356", "0.6461106", "0.6460885", "0.6454352", "0.6451513", "0.6447716", "0.64383775" ]
0.65850127
79
Do any processing of the information input by the user, and/or perform step processing (if no user interaction required) It is this method's job to save any data to the underlying database, as necessary, and return error messages (if any) which can then be processed by the appropriate user interface (JSPUI or XMLUI) NOTE: If this step is a noninteractive step (i.e. requires no UI), then it should perform all of its processing in this method!
public int doProcessing(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException { // Get the values from the initial questions form boolean multipleTitles = Util.getBoolParameter(request, "multiple_titles"); //Expect publishedBefore unless stated otherwise boolean publishedBefore = Util.getBoolParameter(request, "published_before", true); boolean multipleFiles = Util.getBoolParameter(request, "multiple_files"); boolean isThesis = ConfigurationManager .getBooleanProperty("webui.submit.blocktheses") && Util.getBoolParameter(request, "is_thesis"); if (subInfo.isInWorkflow()) { // Thesis question does not appear in workflow mode.. isThesis = false; // Pretend "multiple files" is true in workflow mode // (There will always be the license file) multipleFiles = true; } // First and foremost - if it's a thesis, reject the submission if (isThesis) { WorkspaceItem wi = (WorkspaceItem) subInfo.getSubmissionItem(); wi.deleteAll(); subInfo.setSubmissionItem(null); // Remember that we've removed a thesis in the session request.getSession().setAttribute("removed_thesis", Boolean.TRUE); return STATUS_THESIS_REJECTED; // since theses are disabled, throw // an error! } // Next, check if we are pruning some existing metadata if (request.getParameter("do_not_prune") != null) { return STATUS_CANCEL_PRUNE; // cancelled pruning! } else if (request.getParameter("prune") != null) { processVerifyPrune(context, request, response, subInfo, multipleTitles, publishedBefore, multipleFiles); } else // otherwise, check if pruning is necessary { // Now check to see if the changes will remove any values // (i.e. multiple files, titles or an issue date.) if (subInfo.getSubmissionItem() != null) { // shouldn't need to check if submission is null, but just in case! if (!multipleTitles) { Metadatum[] altTitles = subInfo.getSubmissionItem().getItem() .getDC("title", "alternative", Item.ANY); willRemoveTitles = altTitles.length > 0; } if (!publishedBefore) { Metadatum[] dateIssued = subInfo.getSubmissionItem().getItem() .getDC("date", "issued", Item.ANY); Metadatum[] citation = subInfo.getSubmissionItem().getItem() .getDC("identifier", "citation", Item.ANY); Metadatum[] publisher = subInfo.getSubmissionItem().getItem() .getDC("publisher", null, Item.ANY); willRemoveDate = (dateIssued.length > 0) || (citation.length > 0) || (publisher.length > 0); } if (!multipleFiles) { // see if number of bitstreams in "ORIGINAL" bundle > 1 // FIXME: Assumes multiple bundles, clean up someday... Bundle[] bundles = subInfo.getSubmissionItem().getItem() .getBundles("ORIGINAL"); if (bundles.length > 0) { Bitstream[] bitstreams = bundles[0].getBitstreams(); willRemoveFiles = bitstreams.length > 1; } } } // If anything is going to be removed from the item as a result // of changing the answer to one of the questions, we need // to inform the user and make sure that's OK, before saving! if (willRemoveTitles || willRemoveDate || willRemoveFiles) { //save what we will need to prune to request (for UI to process) request.setAttribute("will.remove.titles", Boolean.valueOf(willRemoveTitles)); request.setAttribute("will.remove.date", Boolean.valueOf(willRemoveDate)); request.setAttribute("will.remove.files", Boolean.valueOf(willRemoveFiles)); return STATUS_VERIFY_PRUNE; // we will need to do pruning! } } // If step is complete, save the changes subInfo.getSubmissionItem().setMultipleTitles(multipleTitles); subInfo.getSubmissionItem().setPublishedBefore(publishedBefore); // "Multiple files" irrelevant in workflow mode if (!subInfo.isInWorkflow()) { subInfo.getSubmissionItem().setMultipleFiles(multipleFiles); } // If this work has not been published before & no issued date is set, // then the assumption is that TODAY is the issued date. // (This logic is necessary since the date field is hidden on DescribeStep when publishedBefore==false) if(!publishedBefore) { Metadatum[] dateIssued = subInfo.getSubmissionItem().getItem() .getDC("date", "issued", Item.ANY); if(dateIssued.length==0) { //Set issued date to "today" (NOTE: InstallItem will determine the actual date for us) subInfo.getSubmissionItem().getItem().addDC("date", "issued", null, "today"); } } // commit all changes to DB subInfo.getSubmissionItem().update(); context.commit(); return STATUS_COMPLETE; // no errors! }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void screeningProcessing() throws TCWebException {\n try {\n DataAccessInt dAccess = Util.getDataAccess(Constants.DW_DATA_SOURCE, true);\n\n Request dr = new Request();\n dr.setContentHandle(\"coderProblemInfo\");\n dr.setProperty(\"cr\", getRequest().getParameter(Constants.USER_ID));\n dr.setProperty(\"rd\", getRequest().getParameter(Constants.ROUND_ID));\n dr.setProperty(\"pm\", getRequest().getParameter(Constants.PROBLEM_ID));\n\n Map map = dAccess.getData(dr);\n if (map == null)\n throw new ScreeningException(\"getData failed!\");\n\n ResultSetContainer result =\n (ResultSetContainer) map.get(\"coderProblemSolution\");\n if (result.getRowCount() == 0) {\n throw new ScreeningException(\"Error retrieving code submission.\");\n }\n\n SubmissionInfo sinfo = new SubmissionInfo();\n sinfo.setCode(result.getItem(0, \"submission_text\").toString());\n sinfo.setTestResults((ResultSetContainer) map.get(\"coderProblemTestResults\"));\n getRequest().setAttribute(\"submissionInfo\", sinfo);\n } catch (TCWebException e) {\n throw e;\n } catch (Exception e) {\n throw(new TCWebException(e));\n }\n\n setNextPage(Constants.TC_PROBLEM_RESULT_PAGE);\n setIsNextPageInContext(true);\n }", "public void process() {\n\t\tSystem.out.println(RegisterUser(\"Instructor\", \"Instructor\"));\n\t\t/*\n\t\t * UserRegistration usr1 = new UserRegistration();\n\t\t * usr1.registerUser(userTable, \"raj\", \"raj\");\n\t\t * usr1.registerUser(userTable, \"mahesh\", \"mahesh\");\n\t\t */\n\n\t\t/*\n\t\t * LoginAndSeeDetails login = new LoginAndSeeDetails();\n\t\t * \n\t\t * HashMap<String,String> result = login.userLogin(userTable, \"raj1\",\n\t\t * \"raj\"); if(result.size()<1)\n\t\t * System.out.println(result+\"No images to display\"); else\n\t\t * if(result.containsKey(\"failure\"))\n\t\t * System.out.println(\"Unable to login\"); else\n\t\t * System.out.println(result);\n\t\t */\n\t}", "public void processUser() {\r\n Scanner sc = new Scanner(System.in);\r\n model.setAllparameters(inputIntValueWithScanner(sc, View.INPUT_INT_HOUR_DATA, GlobalConstants.PRIMARY_HOUR_MAX_BARRIER),// the correct input (hour,minute,second) is sent to the model\r\n inputIntValueWithScanner(sc, View.INPUT_INT_MINUTE_DATA, GlobalConstants.PRIMARY_MINUTE_MAX_BARRIER),\r\n inputIntValueWithScanner(sc, View.INPUT_INT_SECOND_DATA, GlobalConstants.PRIMARY_SECOND_MAX_BARRIER));\r\n int k = 0;\r\n do { //at least once the menu option is chosen (for option number 6 (break) for example)\r\n k = inputIntValueWithScanner(sc, View.CHOOSE_OPERATION, GlobalConstants.MENU_OPTION_MAX_VALUE);\r\n chooseOperation(k);\r\n } while (k != GlobalConstants.MENU_OPTION_MAX_VALUE); //menu loop until break option isn't chosen\r\n\r\n }", "public void inputItemDetails()\r\n\t{\r\n\t\tserialNum = inputValidSerialNum();\r\n\t\tweight = inputValidWeight();\r\n\t}", "private void saveInput(BBSStep aStep) {\n BBSStepData aStepData = BBSStepDataManager.getInstance().getStepData(aStep.getName());\n BBSStepData inheritedData = BBSStepDataManager.getInstance().getInheritedStepData(aStep);\n \n //normal sources\n ArrayList<String> sources = createList(stepExplorerNSourcesList);\n if(this.useAllSourcesCheckbox.isSelected()){\n sources = new ArrayList<>();\n }\n if(sources.equals(inheritedData.getSources())){\n aStepData.setSources(null);\n }else{\n if(this.useAllSourcesCheckbox.isSelected()){\n aStepData.setSources(new ArrayList<String>());\n }else{\n if(sources.size()>0){\n aStepData.setSources(new ArrayList<String>());\n }else{\n aStepData.setSources(null);\n }\n \n }\n }\n if(aStepData.getSources()!=null){\n if(!sources.equals(aStepData.getSources())){\n aStepData.setSources(sources);\n }\n }\n \n //instrument model \n \n ArrayList<String> imodels = createList(stepExplorerInstrumentModelList);\n if(this.noInstrumentModelCheckbox.isSelected()){\n imodels = new ArrayList<>();\n }\n if(imodels.equals(inheritedData.getInstrumentModel())){\n aStepData.setInstrumentModel(null);\n }else{\n if(this.noInstrumentModelCheckbox.isSelected()){\n aStepData.setInstrumentModel(new ArrayList<String>());\n }else{\n if(imodels.size()>0){\n aStepData.setInstrumentModel(new ArrayList<String>());\n }else{\n aStepData.setInstrumentModel(null);\n }\n \n }\n }\n if(aStepData.getInstrumentModel()!=null){\n if(!imodels.equals(aStepData.getInstrumentModel())){\n aStepData.setInstrumentModel(imodels);\n }\n }\n \n/* //instrument model \n \n ArrayList<String> imodels = createArrayListFromSelectionList(stepExplorerInstrumentModelList);\n if(this.noInstrumentModelCheckbox.isSelected()){\n imodels = new ArrayList<String>();\n }\n if(imodels.equals(inheritedData.getInstrumentModel())){\n aStepData.setInstrumentModel(null);\n }else{\n if(this.noInstrumentModelCheckbox.isSelected()){\n aStepData.setInstrumentModel(new ArrayList<String>());\n }else{\n if(imodels.size()>0){\n aStepData.setInstrumentModel(new ArrayList<String>());\n }else{\n aStepData.setInstrumentModel(null);\n }\n \n }\n }\n if(aStepData.getInstrumentModel()!=null){\n if(!imodels.equals(aStepData.getInstrumentModel())){\n aStepData.setInstrumentModel(imodels);\n }\n } \n*/ \n\n//extra sources\n// ArrayList<String> esources = createList(stepExplorerESourcesList);\n// if(!this.useExtraSourcesCheckbox.isSelected()){\n// esources = new ArrayList<String>();\n// }\n// if(esources.equals(inheritedData.getExtraSources())){\n// aStepData.setExtraSources(null);\n// }else{\n// if(!this.useExtraSourcesCheckbox.isSelected()){\n// aStepData.setExtraSources(new ArrayList<String>());\n// }else{\n// if(esources.size()>0){\n// aStepData.setExtraSources(new ArrayList<String>());\n// }else{\n// aStepData.setExtraSources(null);\n// }\n \n// }\n// }\n// if(aStepData.getExtraSources()!=null){\n// if(!esources.equals(aStepData.getExtraSources())){\n// aStepData.setExtraSources(esources);\n// }\n// }\n //output data column\n String outputdata = stepExplorerOutputDataText.getText();\n if(this.writeOutputCheckbox.isSelected()){\n outputdata = \"\";\n }\n if(outputdata.equals(inheritedData.getOutputDataColumn())){\n aStepData.setOutputDataColumn(null);\n }else{\n if(this.writeOutputCheckbox.isSelected()){\n aStepData.setOutputDataColumn(\"\");\n }else{\n if(!outputdata.equals(\"\")){\n aStepData.setOutputDataColumn(\"\");\n }else{\n aStepData.setOutputDataColumn(null);\n }\n \n }\n }\n if(aStepData.getOutputDataColumn()!=null){\n if(!outputdata.equals(aStepData.getOutputDataColumn())){\n aStepData.setOutputDataColumn(outputdata);\n }\n }\n \n\n \n //Integration\n //Time\n if(this.integrationTimeText.getText().equals(\"\")){\n aStepData.setIntegrationTime(-1.0);\n }else{\n if(Double.parseDouble(integrationTimeText.getText()) == inheritedData.getIntegrationTime()){\n aStepData.setIntegrationTime(-1.0);\n }else{\n aStepData.setIntegrationTime(0.0);\n }\n }\n if(aStepData.getIntegrationTime()!=-1.0){\n if(Double.parseDouble(integrationTimeText.getText()) != aStepData.getIntegrationTime()){\n aStepData.setIntegrationTime(Double.parseDouble(integrationTimeText.getText()));\n }\n }\n //Frequency\n if(this.integrationFrequencyText.getText().equals(\"\")){\n aStepData.setIntegrationFrequency(-1.0);\n }else{\n if(Double.parseDouble(integrationFrequencyText.getText()) == inheritedData.getIntegrationFrequency()){\n aStepData.setIntegrationFrequency(-1.0);\n }else{\n aStepData.setIntegrationFrequency(0.0);\n }\n }\n if(aStepData.getIntegrationFrequency()!=-1.0){\n if(Double.parseDouble(integrationFrequencyText.getText()) != aStepData.getIntegrationFrequency()){\n aStepData.setIntegrationFrequency(Double.parseDouble(integrationFrequencyText.getText()));\n }\n }\n \n //Correlation\n //Type\n if(this.createArrayListFromSelectionList(this.stepExplorerCorrelationTypeList).isEmpty()){\n aStepData.setCorrelationType(null);\n }else{\n if(createArrayListFromSelectionList(stepExplorerCorrelationTypeList).equals(inheritedData.getCorrelationType())){\n aStepData.setCorrelationType(null);\n }else{\n aStepData.setCorrelationType(new ArrayList<String>());\n }\n }\n if(aStepData.getCorrelationType()!=null){\n if(!createArrayListFromSelectionList(stepExplorerCorrelationTypeList).equals(aStepData.getCorrelationType())){\n aStepData.setCorrelationType(createArrayListFromSelectionList(stepExplorerCorrelationTypeList));\n }\n }\n //Selection\n String selectedCSelection = null;\n if(this.stepExplorerCorrelationSelectionBox.getSelectedItem() != null){\n selectedCSelection = this.stepExplorerCorrelationSelectionBox.getSelectedItem().toString();\n }\n if(selectedCSelection == null){\n aStepData.setCorrelationSelection(null);\n }else{\n if(selectedCSelection.equals(\"N/A\")){\n aStepData.setCorrelationSelection(null);\n }else{\n if(selectedCSelection.equals(inheritedData.getCorrelationSelection())){\n aStepData.setCorrelationSelection(null);\n }else{\n aStepData.setCorrelationSelection(\"Generated by BBS GUI\");\n }\n }\n }\n if(aStepData.getCorrelationSelection()!=null){\n if(selectedCSelection!= null && !selectedCSelection.equals(aStepData.getCorrelationSelection())){\n aStepData.setCorrelationSelection(selectedCSelection);\n }\n }\n \n //baseline selection\n ArrayList<ArrayList<String>> baselines = createArrayListsFromBaselineTable();\n ArrayList<String> station1 = baselines.get(0);\n ArrayList<String> station2 = baselines.get(1);\n if(this.baselineUseAllCheckbox.isSelected()){\n station1 = new ArrayList<>();\n station2 = new ArrayList<>();\n }\n if(station1.equals(inheritedData.getStation1Selection()) && station2.equals(inheritedData.getStation2Selection())){\n aStepData.setStation1Selection(null);\n }else{\n if(this.baselineUseAllCheckbox.isSelected()){\n aStepData.setStation1Selection(new ArrayList<String>());\n }else{\n if(station1.size()>0 && station2.size()>0){\n aStepData.setStation1Selection(new ArrayList<String>());\n }else{\n aStepData.setStation1Selection(null);\n }\n \n }\n \n }\n \n if(station1.equals(inheritedData.getStation1Selection()) && station2.equals(inheritedData.getStation2Selection())){\n aStepData.setStation2Selection(null);\n }else{\n if(this.baselineUseAllCheckbox.isSelected()){\n aStepData.setStation2Selection(new ArrayList<String>());\n }else{\n if(station1.size()>0 && station2.size()>0){\n aStepData.setStation2Selection(new ArrayList<String>());\n }else{\n aStepData.setStation2Selection(null);\n }\n \n }\n }\n \n if(aStepData.getStation1Selection()!=null){\n if(!station1.equals(aStepData.getStation1Selection())){\n aStepData.setStation1Selection(station1);\n }\n }\n if(aStepData.getStation2Selection()!=null){\n if(!station2.equals(aStepData.getStation2Selection())){\n aStepData.setStation2Selection(station2);\n }\n }\n \n //Operation\n \n //name\n String selectedOSelection = null;\n if(this.stepExplorerOperationComboBox.getSelectedItem() != null){\n selectedOSelection = this.stepExplorerOperationComboBox.getSelectedItem().toString();\n }\n if(selectedOSelection == null){\n aStepData.setOperationName(null);\n \n }else{\n if(selectedOSelection.equals(\"NOT DEFINED\")){\n aStepData.setOperationName(null);\n }else{\n if(selectedOSelection.equals(inheritedData.getOperationName())){\n aStepData.setOperationName(null);\n }else{\n aStepData.setOperationName(\"Generated by BBS GUI\");\n }\n }\n }\n if(aStepData.getOperationName()!=null){\n if(selectedOSelection!= null && !selectedOSelection.equals(aStepData.getOperationName())){\n aStepData.setOperationName(selectedOSelection);\n }\n }\n //fetch variables from operation attributes panel\n if(!selectedOSelection.equals(\"NOT DEFINED\") && currentStepOperationsPanel != null){\n if(this.currentStepOperationsPanel.getBBSStepOperationAttributes()!=null){\n \n HashMap<String,String> valuesFromForm = currentStepOperationsPanel.getBBSStepOperationAttributes();\n \n HashMap<String,String> oldValuesFromStep = aStepData.getOperationAttributes();\n \n if(oldValuesFromStep == null) oldValuesFromStep = new HashMap<>();\n \n for(String aKey : valuesFromForm.keySet()){\n if(oldValuesFromStep.containsKey(aKey)){\n if(valuesFromForm.get(aKey) == null){\n oldValuesFromStep.put(aKey,null);\n }else{\n if(valuesFromForm.get(aKey).equals(inheritedData.getOperationAttribute(aKey))){\n oldValuesFromStep.put(aKey,null);\n }else{\n oldValuesFromStep.put(aKey,\"Generated by BBS GUI\");\n }\n }\n if(oldValuesFromStep.get(aKey) != null){\n if(!valuesFromForm.get(aKey).equals(oldValuesFromStep.get(aKey))){\n oldValuesFromStep.put(aKey,valuesFromForm.get(aKey));\n aStepData.setOperationName(selectedOSelection);\n }\n }\n }else{\n String newValue = valuesFromForm.get(aKey);\n String inheritedValue = inheritedData.getOperationAttribute(aKey);\n if(newValue!= null && newValue.equals(inheritedValue)){\n oldValuesFromStep.put(aKey,null);\n }else{\n oldValuesFromStep.put(aKey,valuesFromForm.get(aKey));\n aStepData.setOperationName(selectedOSelection);\n }\n }\n }\n aStepData.setOperationAttributes(oldValuesFromStep);\n }\n }else if(currentStepOperationsPanel == null){\n aStepData.setOperationAttributes(null);\n }\n }", "public void processUser() {\r\n view.printMessage(View.GEM_POOL + model.getStonePool());\r\n chooseMenuOption(chooseParameters(INTEGER_DELIMITERS, View.INPUT_PARAMETERS, true));\r\n\r\n\r\n }", "private void submit() throws SQLException, IllegalArgumentException {\r\n\t\t\r\n\t\t//Get all the values\r\n\t\tString fname = \"\", lname = \"\";\r\n\t\tint age = 0, workExp = 0;\r\n\t\tint selfProd = 0, selfQoS = 0, selfExp = 0;\t\t//selfrating values\r\n\t\t\r\n\t\t//Mandatory fields\r\n\t\tfname = tfFirstname.getText();\r\n\t\tlname = tfLastname.getText();\r\n\t\t\r\n\t\tif (fname.equals(\"\") || lname.equals(\"\"))\r\n\t\t\tthrow new IllegalArgumentException(\"Firstname and Lastname are\"\r\n\t\t\t\t\t+ \" mandatory fields!\");\r\n\t\t\r\n\t\t//Non-mandatory fields\r\n\t\ttry {\r\n\t\t\tage = Integer.parseInt(tfAge.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tage = -1;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tworkExp = Integer.parseInt(tfWorkExp.getText());\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tworkExp = -1;\r\n\t\t}\r\n\t\t\r\n\t\t//slider values are default value (3) if untouched\r\n\t\tselfProd = sliderProd.getValue();\r\n\t\tselfQoS = sliderQoS.getValue();\r\n\t\tselfExp = sliderExp.getValue();\r\n\t\t\r\n\t\t\r\n\t\t//Create insert query for the values which are definitely set\r\n\t\tString query = \"INSERT INTO surveyresults (candidate, lastname, firstname,\"\r\n\t\t\t\t+ \"productivity, quality_of_service, exceeding_expectations) \"\r\n\t\t\t\t+ \"VALUES (\" + this.candidateID + \", '\" + lname + \"', '\" + fname \r\n\t\t\t\t+ \"', \" + selfProd + \", \" + selfQoS + \", \" + selfExp + \");\";\r\n\t\tdbc.executeUpdate(query);\r\n\t\t\r\n\t\t\r\n\t\t//Check the other values: age, workExp\r\n\t\tif (age >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET age = \" + age + \" \"\r\n\t\t\t\t\t+ \"WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\r\n\t\tif (workExp >= 0) {\r\n\t\t\tquery = \"UPDATE surveyresults SET working_experience = \" + workExp\r\n\t\t\t\t\t+ \" WHERE candidate = \" + this.candidateID + \";\";\r\n\t\t\tdbc.executeUpdate(query);\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t//set invitation status to completed (link is invalid now)\r\n\t\tquery = \"UPDATE invitations SET status = 'Completed' WHERE \"\r\n\t\t\t\t+ \"candidate = \" + this.candidateID + \";\";\r\n\t\tdbc.executeUpdate(query);\r\n\t}", "public void submitButtonPushed() throws IOException {\n\n if (vehicleRegistration.getText().isEmpty() || driverLicense.getText().isEmpty()\n || insuranceProvider.getText().isEmpty() || insuranceNumber.getText().isEmpty()) {\n\n Validator.errorBox(\"Incorrect Info\",\n \"Please Enter Valid Information\");\n\n } else {\n\n Stage stage = main.MainLogin.getPrimaryStage();\n\n Parent signInParent = FXMLLoader.load(getClass()\n .getResource(\"/backgroundcheck/BackGroundCheck.fxml\"));\n\n stage.setScene(new Scene(signInParent));\n\n stage.show();\n }\n }", "boolean stageAfterResultsImport(Object input) throws ValidationFailedException;", "void ProcessInput() throws SQLException {\n \n \n if (\"\".equals(jTextField1.getText()) || \"\".equals(buttonGroup1.getSelection().getActionCommand()) || \"\".equals(jTextField2.getText()))\n {JOptionPane.showMessageDialog(null , \"Isi Form dengan benar\");}\n else\n {\n String nama = jTextField1.getText();\n String tanggal = jLabel7.getText();\n String jenis = buttonGroup1.getSelection().getActionCommand();\n String kuantitas = jTextField2.getText();\n String idPesanan = jLabel4.getText();\n String pembayaran = jLabel10.getText();\n sql1 = \"INSERT INTO vermak(tanggal, nama, jenis, kuantitas) VALUES ('\"\n +tanggal+\"','\"\n +nama+\"','\"\n +jenis+\"','\"\n +kuantitas+\"')\";\n \n sql2 = \"insert into payvermak(idPesanan, pembayaran) values ('\"+idPesanan+\"','\"+pembayaran+\"')\";\n\n stat = (com.mysql.jdbc.Statement) connection.prepareStatement(sql1);\n stat.execute(sql1);\n\n stat1 = (com.mysql.jdbc.Statement) connection.prepareStatement(sql2);\n stat1.execute(sql2);\n\n stat.close();\n stat1.close();\n }\n \n \n }", "private void processInputs() {\n if (controller.escape) { parent.changeScreen(parent.PAUSE, parent.GAME_PLAY); }\r\n\r\n // Ask the controller if the left paddle has been told to do anything\r\n if (controller.leftUp) { leftPaddle.moveUp(); }\r\n else if (controller.leftDown) { leftPaddle.moveDown(); }\r\n else { leftPaddle.stayPut(); }\r\n // same for the right\r\n if (controller.rightUp) { rightPaddle.moveUp(); }\r\n else if (controller.rightDown) { rightPaddle.moveDown(); }\r\n else { rightPaddle.stayPut(); }\r\n\r\n }", "public abstract void performStep();", "public void process() {\r\n\t\tdisplayMenu();\r\n\t\tint command = getCommand();\r\n\t\twhile (command != EXIT) {\r\n\t\t\tswitch (command) {\r\n\t\t\tcase ADD_CUSTOMER:\r\n\t\t\t\taddCustomer();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_MODEL:\r\n\t\t\t\taddWasher();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_TO_INVENTORY:\r\n\t\t\t\taddToInventory();\r\n\t\t\t\tbreak;\r\n\t\t\tcase PURCHASE:\r\n\t\t\t\tpurchase();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_CUSTOMERS:\r\n\t\t\t\tlistCustomers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_WASHERS:\r\n\t\t\t\tlistWashers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DISPLAY_TOTAL:\r\n\t\t\t\tdisplayTotal();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SAVE:\r\n\t\t\t\tsave();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdisplayMenu();\r\n\t\t\tcommand = getCommand();\r\n\t\t}\r\n\t\tSystem.out.println(\"Goodbye.\");\r\n\t}", "public void processUser(){\n Scanner sc = new Scanner(System.in);\n\n InputNote inputNote = new InputNote(view, sc, note);\n inputNote.inputNote();\n\n notebook.addNote(note);\n note.formLastNameAndFirstLetterOfName();\n System.out.println(note.toString());\n }", "public void startInfo() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Enter your name:\");\n\t\tString name = this.getInputString();\n\t\tSystem.out.println(\"Enter your mobile number:\");\n\t\tint number = this.getInputInteger();\n\t\tSystem.out.println(\"Enter your email:\");\n\t\tString email = this.getInputString();\n\t}", "private void doAfterProcessValidations(final PhaseEvent arg0) {\n\t}", "@FXML\n private void handleUserInput() {\n String input = inputTextField.getText();\n storeUserInputHistory(input);\n try {\n Command command = ParserFactory.parse(input);\n command.execute(tasks, storage, history);\n } catch (ChronologerException e) {\n e.printStackTrace();\n }\n printUserMessage(\" \" + input);\n printChronologerMessage(UiMessageHandler.getOutputForGui());\n inputTextField.clear();\n }", "protected void secondStep() {\r\n panel.add(h3(new InlineHTML(\"EXPERIENCE:\")));\r\n panel.add(new InlineHTML(\"Please provide your assessment\"\r\n + \" of your health professional's experience level at treating this disease.\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"experience\", null, \"<br/>\",//\r\n \"Specialist\", \"<b>Specialist</b> - This person specializes in treating ME/CFS;\"\r\n + \" most of her/his patients have chronic fatigue syndrome.\",//\r\n \"Knowledgeable\", \"<b>Knowledgeable</b> - The 'Knowledgeable' may not specialize\"\r\n + \" in chronic fatigue syndrome (ME/CFS)\"\r\n + \" but these patients make up a significant portion of her/his practice.\",//\r\n \"Informed\", \"<b>Informed</b> - Chronic fatigue syndrome (ME/CFS)\"\r\n + \" is not a major part of this person's practice\"\r\n + \" but they appear to be knowledgeable about the disease and its treatment options.\",//\r\n \"Learner\", \"<b>Learner</b> - The 'Learner' does not treat\"\r\n + \" many chronic fatigue syndrome (ME/CFS) patients\"\r\n + \" but is willing to learn and listen to and review patient suggestions.\",//\r\n \"Uninformed\", \"<b>Uninformed</b> - The 'Uninformed' practitioner\"\r\n + \" doesn't know much about the disease and is not interested.\",//\r\n \"Skeptic\", \"<b>Skeptic</b> - The 'Skeptic' practitioner\" + \" does not believe ME/CFS exists\"\r\n + \" and appears to take its existence as a personal affront.\",//\r\n \"-\", \"<b>I don't know</b>\"));\r\n\r\n panel.add(h3(new InlineHTML(\"INITIAL COST:\")));\r\n panel.add(new InlineHTML(\r\n \"Since costs can vary greatly even for patients seeing the same health professional\"\r\n + \" - depending on the treatment regimen -\"\r\n + \" we'd like to know the approximate initial costs of seeing your health professional.\"\r\n + \" This includes the approximate fees for the first two visits;\"\r\n + \" the costs of the laboratory workup and whatever medications were prescribed.\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"initialCost\", null, \"<br/>\", \"<$100\", \"Less than $100\", \"$100-$500\", \"$100-$500\",\r\n \"$500-$1000\", \"$500-$1,000\", \"$1000-$2000\", \"$1.000-$2.000\", \"$2000-$5000\", \"$2,000-$5,000\",\r\n \">$5000\", \"&gt;$5,000\", \"NotSure\", \"Not Sure\"));\r\n\r\n panel.add(h3(new InlineHTML(\"COST:\")));\r\n panel\r\n .add(new InlineHTML(\"Average 6 months cost\"\r\n + \" - please include doctor's visits, tests and treatment program.\"\r\n + \" Please do not include travel\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"averageCost\", null, \"<br/>\", //\r\n \"<600\", \"Less than $600 (>$100/month)\", //\r\n \"600-1200\", \"$600-$1200 ($100-$200/month)\", //\r\n \"1200-2400\", \"$1200-$2400 ($200-400/month)\", //\r\n \"2400-4800\", \"$2400-$4800 ($400-$800/month)\", //\r\n \">4800\", \">$4800 (>$800/month)\"));\r\n\r\n panel.add(h3(new InlineHTML(\"ACCEPTS INSURANCE?\")));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"insurance\", \"-\", \"<br/>\", \"Yes\", \"Yes\", \"No\", \"No\", \"-\", \"Don't Know\"));\r\n\r\n panel.add(h3(new InlineHTML(\"AVERAGE LENGTH OF VISIT (not including the first two sessions):\")));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"visitLength\", null, \"<br/>\", \"<15m\", \"Less than 15 minutes\", \"15m-30m\",\r\n \"15 to 30 minutes\", \"30m-1h\", \"30 minutes to an hour\", \">1h\", \"Greater than an hour\"));\r\n\r\n panel.add(h3(new InlineHTML(\"About how many times do you physically see this practitioner a year?\")));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"visitFrequency\", null, \"<br/>\", //\r\n \"1\", \"1\", //\r\n \"2\", \"2\", //\r\n \"3-7\", \"3-7\", //\r\n \"7-12\", \"7-12\", //\r\n \">12\", \">12 times a year\"));\r\n\r\n panel.add(h3(new InlineHTML(\"TREATMENT BREADTH -\")));\r\n panel.add(new InlineHTML(\"This practitioner provides <b>significant</b> information on:\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(ratingBox(\"treatmentBreadth\", \"drugs\", \"Pharmaceutical Drugs\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(ratingBox(\"treatmentBreadth\", \"alternativeTreatments\",\r\n \"Alternative Treatments (vitamins, neutraceuticals, etc.)\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(ratingBox(\"treatmentBreadth\", \"lifestyle\",\r\n \"Lifestyle Management (envelope therapy, pacing, sleep hygiene, behavioral therapies, etc.)\"));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n\r\n panel.add(h3(new InlineHTML(\"MEDICATION PURCHASING\")));\r\n panel.add(new InlineHTML(\"<br/>\"));\r\n panel.add(radioInput(\"ripoff\", \"No\", \"<br/>\", \"Yes\",\r\n \"Practitioner requires that patients buy alternative medications/neutraceuticals from her/him\", \"No\",\r\n \"Practitioner allows patients to buy alternative medications/neutraceuticals from outside sources\"));\r\n\r\n panel.add(h3(new InlineHTML(\"OFFICE MANAGEMENT AND ORGANIZATION\")));\r\n panel.add(new HTML(\"Please rate on scale from 1-5 how well organized this practitioners office was\"\r\n + \" (1 = chaotic, 5 = humming like a well-oiled machine).\"\r\n + \" This applies to such things as scheduling, receiving test results on time,\"\r\n + \" getting documents to and from the practitioner, etc.\"));\r\n panel.add(radioNumeric(\"organization\", 1, 5));\r\n\r\n panel.add(h3(new InlineHTML(\"AVAILABILITY\")));\r\n panel\r\n .add(new HTML(\r\n \"Please rate on a scale from 1-5 how available was the practitioner to you\"\r\n + \" (1= not available outside of office visits, 5= quick response)?\"\r\n + \" Did they respond in a timely manner to request and questions or did you have to wait, wait, wait....?\"));\r\n panel.add(radioNumeric(\"availability\", 1, 5));\r\n\r\n final Command verifier = new Command() {\r\n @Override public void execute() {\r\n if (rating.getField(\"experience\") == null) {\r\n final HTML html = new HTML(\r\n \"<span style='color: red; font-size: larger'>Please assess the experience level! Thanks.</span>\");\r\n panel.add(html);\r\n Document.get().setScrollTop(\r\n html.getAbsoluteTop() + html.getOffsetHeight() - Window.getClientHeight());\r\n throw new CommandCanceledException(this);\r\n }\r\n }\r\n };\r\n panel.add(wizardNavigation(verifier));\r\n }", "private void doResearch() {\n\t\tSystem.out.println(\"Students must do research\");\n\t}", "public void SaveInfo() {\n if (NameSurname_enter.getText() != null && validateString(NameSurname_enter.getText())) {\n patient.setName(NameSurname_enter.getText());\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid name and surname. It should only contain characters and spaces. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Age_enter.getText() != null && validateInt(Age_enter.getText())) {\n patient.setAge(Integer.parseInt(Age_enter.getText()));\n } else {\n JOptionPane.showMessageDialog(null, \"Please, enter a valid age. It should be a number. \", \"Warning\", JOptionPane.INFORMATION_MESSAGE);\n }\n if (Sex_box.getSelectedItem().equals(\"Male\")) {\n patient.setSex(\"MALE\");\n } else {\n patient.setSex(\"FEMALE\");\n }\n\n }", "private void dataSubmission() {\n getPreferences(); // reload all the data\n\n String jsonObjectString = createJsonObject();\n StringBuilder url = new StringBuilder();\n url.append(serverUrl);\n\n if (vslaName == null || numberOfCycles == null || representativeName == null || representativePost == null\n || repPhoneNumber == null || grpBankAccount == null || physAddress == null\n || grpPhoneNumber == null || grpSupportType == null) {\n flashMessage(\"Please Fill all Fields\");\n\n } else if (IsEditing.equalsIgnoreCase(\"1\")) {\n url.append(\"editVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n\n } else { // Creating a new VSLA\n url.append(\"addNewVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n }\n }", "protected void processAction(Event e) {\n\n\t\t// First check to see if the fields are empty.\n\t\tif (typeNameTF.getText().isEmpty() || unitsTF.getText().isEmpty() || unitMeasureTF.getText().isEmpty()\n\t\t\t\t|| validityDaysTF.getText().isEmpty() || reorderPointTF.getText().isEmpty()\n\t\t\t\t|| notesTF.getText().isEmpty())\n\t\t\tmessageLBL.setText(\"All Item Type data must be filled\");\n\t\telse if(!isInt(unitsTF.getText())) {\n\t\t\tmessageLBL.setText(\"Units must be an integer.\");\n\t\t}\n\t\telse if(!isInt(validityDaysTF.getText())) {\n\t\t\tmessageLBL.setText(\"Validity days must be an integer.\");\n\t\t}\n\t\telse if(!isInt(reorderPointTF.getText())) {\n\t\t\tmessageLBL.setText(\"Reorder point must be an integer.\");\n\t\t}\n\t\t// Then check to see if it is the submit button.\n\t\telse if (e.getSource() == submitBTN)\n\t\t\taddInventoryItemType();\n\t}", "public void processInput() {\n\n\t}", "@Override\n\tprotected void processInput() {\n\t}", "private void saveResult() {\n\t\tBuild newBuild = assembleBuild();\n\t\t\n\t\t// last minute sanity checking on user's input before we write it to the database\n\t\tif (newBuild.getName() == null || newBuild.getName().matches(\"\")) {\n\t\t\t// TODO generate one automatically (Untitled Build #1...)\n\t\t\tshowMessage(R.string.edit_build_no_title_error);\n\t\t\treturn;\n\t\t}\n\t\tif (!newBuild.isWellOrdered()) {\n\t\t\tshowMessage(R.string.edit_build_not_well_ordered_error);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tlong buildId = -1;\n\t\tif (mCreatingNewBuild) {\n\t\t\t// set creation time\n\t\t\tDate now = new Date();\n\t\t\tnewBuild.setCreated(now);\n\t\t\tnewBuild.setModified(now);\n\t\t} else {\n\t\t\tif (userMadeChanges(newBuild)) {\n\t\t\t\t// set last modified time\n\t\t\t\tnewBuild.setModified(new Date());\t// current time\n\t\t\t\t\n\t\t\t\tbuildId = mBuildId;\n\t\t\t} else {\n\t\t\t\tfinish();\t// no changes made, just finish\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// finishes activity if successful\n\t\tnew WriteBuildTask(newBuild, buildId).execute();\n\t}", "@Override\n public void process() {\n if (this.mail.isEmpty() || this.password == null) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n } else {\n //Get all users with the given e-mail address (size of list is 1 if successful)\n DBFilter mailFilter = new DBFilter();\n mailFilter.addConstraint(User.CLMN_MAIL, SQLConstraintOperator.LIKE, this.mail);\n ArrayList<User> users = User.findAll(mailFilter);\n\n //We expect to find exactly one user. If we find more or less than one user, the verification failed.\n if (users != null && users.size() == 1) {\n User user = users.get(0);\n //Check password:\n if (Arrays.equals(user.getPassword(), this.password)) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", true);\n ScopeHandler.getInstance().store(this.request, \"user\", user);\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n }\n }", "@Test(priority = 1)\n\tpublic void enterInputs() throws Exception {\n\n\t\ttest = reports.startTest(pageName + \"Sample test to validate Webpage title\");\n\t\tif (homePage.validateTitle(test)) {\n\t\t\ttest.log(LogStatus.PASS, \"Text is Successfully inserted.\");\n\t\t\tBaseUtil.CaptureScreen(driver,passScreenShotPath + this.getClass().getSimpleName().replaceAll(\"Test\", \"\") + \"//isTitleCorrect\");\n\t\t} else {\n\t\t\tBaseUtil.CaptureScreen(driver,failScreenShotPath + this.getClass().getSimpleName().replaceAll(\"Test\", \"\") + \"//isTitleCorrect\");\n\t\t\ttest.log(LogStatus.FAIL, \"Text is not Successfully inserted.\");\n\t\t}\n\t\treports.endTest(test);\n\t\t// Thread.sleep(5000);\n\t}", "@Override\r\n\tprotected void doExecute(StepExecution stepExecution) throws Exception {\n\t\t\r\n\t}", "public static void main(String[] args) throws ParseException {\n ProcessEngine processEngine = initProcessEngine();\n ProcessDefinition processDefinition = initRepositoryService(processEngine);\n\n RuntimeService runtimeService = processEngine.getRuntimeService();\n ProcessInstance processInstance = initProcessInstance(runtimeService, \"onboarding\");\n\n TaskService taskService = processEngine.getTaskService();\n FormService formService = processEngine.getFormService();\n HistoryService historyService = processEngine.getHistoryService();\n\n Scanner scanner = new Scanner(System.in);\n\n while (processInstance != null && !processInstance.isEnded()) {\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"managers\").list();\n System.out.println(String.format(\"Active outstanding task:[%s]\", tasks.size()));\n for (Task task : tasks) {\n System.out.println(String.format(\"Processing Task [%s]\", task.getName()));\n Map<String, Object> variables = new HashMap<String, Object>();\n FormData formData = formService.getTaskFormData(task.getId());\n for (FormProperty formProperty : formData.getFormProperties()) {\n if (StringFormType.class.isInstance(formProperty.getType())) {\n System.out.println(formProperty.getName() + \"?\");\n String value = scanner.nextLine();\n variables.put(formProperty.getId(), value);\n } else if (LongFormType.class.isInstance(formProperty.getType())) {\n System.out.println(String.format(\"%s Must be a whole number\", formProperty.getName()));\n Long value = Long.valueOf(scanner.nextLine());\n variables.put(formProperty.getId(), value);\n } else if (DateFormType.class.isInstance(formProperty.getType())) {\n System.out.println(String.format(\"%s Must be a data m/d/yy\", formProperty.getName()));\n DateFormat dateFormat = new SimpleDateFormat(\"m/d/yy\");\n Date value = dateFormat.parse(scanner.nextLine());\n variables.put(formProperty.getId(), value);\n } else {\n System.out.println(String.format(\"<form type:%s not supported>\", formProperty.getType()));\n }\n }\n taskService.complete(task.getId(), variables);\n\n HistoricActivityInstance endActivity = null;\n List<HistoricActivityInstance> activityInstances =\n historyService.createHistoricActivityInstanceQuery()\n .processInstanceId(processInstance.getId()).finished()\n .orderByHistoricActivityInstanceEndTime().asc().list();\n for (HistoricActivityInstance activityInstance : activityInstances) {\n if (activityInstance.getActivityType().equals(\"startEvent \")) {\n System.out.println(String.format(\"BEGIN [%s] %s ms\", processDefinition.getName(), activityInstance.getDurationInMillis()));\n }\n if (activityInstance.getActivityType().equals(\"endEvent\")) {\n endActivity = activityInstance;\n } else {\n System.out.println(String.format(\"-- %s [%s] %s ms\", activityInstance.getActivityName(), activityInstance.getActivityId(), activityInstance.getDurationInMillis()));\n }\n }\n if (endActivity != null) {\n System.out.println(String.format(\"-- %s [%s] %s ms\", endActivity.getActivityName(), endActivity.getActivityId(), endActivity.getDurationInMillis()));\n System.out.println(String.format(\"COMPLETE %s [%s] %s\", processDefinition.getName(), processInstance.getProcessDefinitionKey(), endActivity.getEndTime()));\n }\n processInstance = runtimeService.createProcessInstanceQuery()\n .processInstanceId(processInstance.getId()).singleResult();\n }\n }\n scanner.close();\n }", "public void savePerson()\r\n { \r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\taddress = tfAddress.getText();\r\n\tphone = Integer.parseInt(tfPhone.getText());\r\n\temail = tfEmail.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null, \"Please enter person name.\");\r\n\t}else\r\n {\r\n\r\n\t /*create a new PersonInfo object and pass it to PersonDAO to save it*/\r\n\t PersonInfo person = new PersonInfo(name, address, phone, email);\r\n\t pDAO.savePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Record added\");\r\n }\r\n }", "@Override\r\n\tpublic void doWorkFlowAnalysis() {\n\t\t\r\n\t}", "public void process()\n {\n try\n {\n selectNow();\n handleSelectedKeys();\n }\n catch (final Exception e)\n {\n throw new RuntimeException(e);\n }\n }", "public void processAdding() {\n\t\t\n\t\tString iD = idIn.getText();\n\t\tString clName = classIn.getText();\n\t\tString tutName = tutorIn.getText();\n\n\t\tif (tutName.isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a tutor name\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\telse if (clName.isEmpty()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Please enter a class name\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\telse {\n\n\t\t\tint full = fitnessProg.getFirstAvailableClassTime();\n\n\t\t\tif (full == 1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"There are no available class times\",\n\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\n\t\t\telse {\n\n\t\t\t\tfc = fitnessProg.getFitnessClassWithID(iD);\n\n\n\t\t\t\tif (fc == null){\n\n\t\t\t\t\tint availableTime = fitnessProg.getFirstAvailableClassTime();\n\t\t\t\t\tFitnessClass newFC = new FitnessClass();\n\t\t\t\t\tnewFC.setClassID(iD);\n\t\t\t\t\tnewFC.setClassName(clName);\n\t\t\t\t\tnewFC.setStartTime(availableTime);\n\t\t\t\t\tnewFC.setTutorName(tutName);\n\t\t\t\t\tint [] newAttRecords = {0,0,0,0,0};\n\t\t\t\t\tnewFC.setAttendanceRecords(newAttRecords);\n\t\t\t\t\tfitnessProg.addFitnessClass(newFC);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"There is already a class scheduled with this ID\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void step3() {\n\t\tthis.demonstrationStep++;\n\t\tthis.editableFields = (this.getView().getUserInput().length - 2);\n\t\tthis.getView().getForwardingViewContainer().remove(this.getView().getProceed());\n\t\tthis.getView().setProceed(null);\n\t\tthis.getView().getUserInput()[1].setBorder(null);\n\t\tthis.getView().getUserOutput()[1].setBorder(null);\n\t\tfor (int i = 2; i < this.getView().getUserInput().length; i++) {\n\t\t\tthis.getView().getUserOutput()[i].setEditable(true);\n\t\t}\n\t\tthis.getView()\n\t\t\t\t.getExplanations()\n\t\t\t\t.setText(\n\t\t\t\t\t\tthis.wrapHtml(CryptoDemonstrationController.i18n\n\t\t\t\t\t\t\t\t.tr(\"Oh mighty Caesar. No one will ever be able to destroy you! Because of that fact lets end\"\n\t\t\t\t\t\t\t\t\t\t+ \" this childish games and finish the rest of the fields fast. Then we can send the courier again\"\n\t\t\t\t\t\t\t\t\t\t+ \" but this time your enemies will have no idea who wrote it and you will conquer the world.\")));\n\t\tthis.getView().getUserOutput()[2].requestFocus();\n\t\tthis.getView().validate();\n\n\t}", "private void checkAndSave(){\n if (haveEmptyField()){\n JOptionPane.showMessageDialog(dialog,\n \"Some field are empty!\",\n \"Not valid\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n saveStudent();\n }\n }", "public void takeUserInput() {\n\t\t\r\n\t}", "@Then(\"User sees the success message and travel details are saved successfully\")\n public void user_sees_the_success_message_and_travel_details_are_saved_successfully() throws Exception {\n throw new Exception(\"Validation step is failing, app needs to display a success message\");\n }", "@RequestMapping(\"/create\")\n\t@ResponseBody\n\t@Secured(CommonConstants.ROLE_ADMIN)\n\tpublic String process() {\n\t\treturn this.service.isUsersLoaded() ? \"There are existing records in DB\" : service.createData();\n\t}", "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "@Override\r\n\tpublic void execute() {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tSystem.out.println(\"请输入电影名称(title):\");\r\n\t\tString title = scanner.nextLine();\r\n\t\tSystem.out.println(\"请输入电影描述(description):\");\r\n\t\tString description = scanner.nextLine();\r\n\t\tSystem.out.println(\"请输入语言ID(language_id):\");\r\n\t\tString languageId = scanner.nextLine();\r\n\t\tif(!checkTitle(title)){\r\n\t\t\tSystem.out.println(\"Error:Title为空\");\r\n\t\t}\r\n\t\tif(!checkLanguageId(languageId)){\r\n\t\t\tSystem.out.println(\"Error:LanguageId错误\");\r\n\t\t}else{\r\n\t\t\ttry{\r\n\t\t\t\tFilm film = new Film();\r\n\t\t\t\tfilm.setTitle(title.trim());\r\n\t\t\t\tfilm.setDescription(description.trim());\r\n\t\t\t\tfilm.setLanguageId(Integer.parseInt(languageId.trim()));\r\n\t\t\t\tfilmService.addFilm(film);\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\tSystem.out.println(\"Exception:出现异常\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tscanner.close();\r\n\t}", "private static void doUserRequestedStepType(String stepType) {\n dvm.setStepType(stepType);\n dvm.executeProgram();\n //When focus returns back to the UI, print out the sourcecode again.\n displayXCode();\n }", "public void saveChanges ()\n\t{\n\t\n\t\tAppContext.cartogramWizard.setAdvancedOptionsEnabled(\n\t\t\tmAdvancedOptionsCheckBox.isSelected());\n\t\n\t\tAppContext.cartogramWizard.setCreateGridLayer(\n\t\t\tmGridLayerCheckBox.isSelected());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString gridSizeString = mGridSizeTextField.getText();\n\t\t\tInteger gridSizeInt = new Integer(gridSizeString);\n\t\t\tAppContext.cartogramWizard.setDeformationGridSize(\n\t\t\t\tgridSizeInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e1)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString gridSizeString = mCartogramGridSizeTextField.getText();\n\t\t\tInteger gridSizeInt = new Integer(gridSizeString);\n\t\t\tAppContext.cartogramWizard.setCartogramGridSizeInX(\n\t\t\t\tgridSizeInt.intValue());\n\t\t\tAppContext.cartogramWizard.setCartogramGridSizeInY(\n\t\t\t\tgridSizeInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e2)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString diffusionGridSizeString = \n\t\t\t\t(String)mDiffusionGridMenu.getSelectedItem();\n\t\t\t\n\t\t\tInteger diffusionGridSizeInt = new Integer(diffusionGridSizeString);\n\t\t\t\n\t\t\tAppContext.cartogramWizard.setDiffusionGridSize(\n\t\t\t\tdiffusionGridSizeInt);\n\t\t}\n\t\tcatch (NumberFormatException e3)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString iterationsString = mDiffusionIterationsTextField.getText();\n\t\t\tInteger iterationsInt = new Integer(iterationsString);\n\t\t\tAppContext.cartogramWizard.setDiffusionIteratations(\n\t\t\t\titerationsInt.intValue());\n\t\t}\n\t\tcatch (NumberFormatException e4)\n\t\t{\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\n\t}", "protected void runAfterStep() {}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n preprocess(request, response);\n User loggedIn = getUserFromSession(request, response);\n saveURL(request, response);\n \n if (firstTimeVisiting(request))\n showPage(\"ask.jsp\", request, response);\n else\n {\n String title = request.getParameter(\"title\");\n String body = request.getParameter(\"body\");\n String[] tags = extractTags(request);\n List<String> errors = searchForErrors(title, body, tags);\n if (errors.isEmpty())\n {\n Question q = new Question(title, body);\n q.addToDatabase(loggedIn);\n for (String t : tags)\n new Tag(t).addToDatabase(q);\n setNotification(Info.quesSuccess, request, response);\n response.sendRedirect(\"question?id=\" + q.getID());\n }\n else\n {\n setErrors(errors, request, response);\n showPage(\"ask.jsp\", request, response);\n }\n }\n }", "public boolean proceedOnErrors() {\n return false;\n }", "public static void SaveProcessedData()\n\t{\n\t\tSystem.out.println(\"\\r\\n... Saving processed Data....\");\n\t\t\n\t\tString date = new SimpleDateFormat(\"yyyyMMddhhmm\").format(new Date());\n\t\tString generalInput = \"FeatureExpressionCollection=\" + FeatureExpressionCollection.GetCount() + \";\" + FeatureExpressionCollection.GetLoc() + \";\" + FeatureExpressionCollection.GetMeanLofc() + \";\" + FeatureExpressionCollection.numberOfFeatureConstants;\n\t\t\n\t\t// Save files\n\t\ttry \n\t\t{\n\t\t\tFileUtils.write(new File(date + \"_\" + featuresPath), FeatureExpressionCollection.SerializeFeatures());\n\t\t\tFileUtils.write(new File(date + \"_\" + methodsPath), MethodCollection.SerializeMethods());\n\t\t\tFileUtils.write(new File(date + \"_\" + filesPath), FileCollection.SerializeFiles());\n\t\t\tFileUtils.write(new File(date + \"_\" + generalPath), generalInput);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"ERROR: Could not save processed data files\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"... done!\");\n\t}", "@Then(\"^Validate the fields present in the result page$\") // Move to UserStep Definition\r\n\tpublic void attribute_validation(){\r\n\t\tenduser.attri_field();\r\n\t}", "@Override\n\t public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\t \n\t\tAuthentificator authentificator = new Authentificator();\n\t\tint userID = authentificator.GetUserID(request,response);\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t int experimentID = 0;\n\t int expProcessID = 0;\n\t PreparedStatement pStmt = null;\n\t String status = \"ok\";\n\t \tString privilege = \"n\";\n\n\n\n\n \t \ttry{\n \t \t\texperimentID = Integer.parseInt(request.getParameter(\"expsample\")); \n \t \t\texpProcessID = Integer.parseInt(request.getParameter(\"pprocess\")); \n \t \t}\n \t \tcatch (Exception e1) {\n \t \t\tSystem.err.print(\"AddProcessStep: Parameters missing!\");\n \t \t}\n\n\t try {\n \t // Delete the user to the database\t \n \t \tDBconnection dBconn = new DBconnection();\n \t dBconn.startDB();\t \n \t \n \t // Check privileges\n \t pStmt = dBconn.conn.prepareStatement( \t\n \t\t\t\t\"SELECT getExperimentRights(vuserid:=?,vexperimentid:=?)\");\n \t\tpStmt.setInt(1,userID);\n \t\tpStmt.setInt(2,experimentID);\n \t\tprivilege = dBconn.getSingleStringValue(pStmt);\n \t\tpStmt.close();\n \t\t\n \t\tif (privilege.equals(\"w\")){\n \t \n \t\t\tpStmt = dBconn.conn.prepareStatement( \t\t\t\n \t\t\t\t\t\"INSERT INTO exp_plan_steps VALUES(default,?,?,\"+\n \t\t\t\t\t\"(SELECT recipe FROM exp_plan_processes WHERE exp_plan_processes.id=?),NULL,NOW(),?);\");\n \t\t \tpStmt.setInt(1, expProcessID);\n \t\t \tpStmt.setInt(2, experimentID);\n \t\t \tpStmt.setInt(3, experimentID);\n \t\t \tpStmt.setInt(4, userID);\n \t\t \tpStmt.executeUpdate();\n \t\t\tpStmt.close();\n \t\t} else{\n \t\t\tresponse.setStatus(401);\n \t\t}\n\t\tdBconn.closeDB();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"AddProcessStep: Problems with SQL query\");\n\t\t\tstatus = \"SQL Error; AddProcessStep\";\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"AddProcessStep: Strange Problems\");\n\t\t\tstatus = \"Error AddProcessStep\";\n\t\t}\t\n\t\t\n\t // tell client that everything is fine\n\t\tresponse.setContentType(\"application/json\");\n\t response.setCharacterEncoding(\"utf-8\");\n\t PrintWriter out = response.getWriter();\n\t try {\n\t JSONObject answer = new JSONObject();\n\t\t\tanswer.put(\"status\", status);\n\t\t\tout.println(answer.toString());\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.println(\"AddProcessStep: Problems creating JSON answer\");\n\t\t} \n\t}", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "@And(\"^user enters \\\"([^\\\"]*)\\\" as Total Employee$\")\n\t\tpublic void user_enters_as_Total_Employee(String arg1) throws Throwable {\n\t\t\ttry {\n\t\t\t SeleniumOperations.setText(\"//input[@class='textbox-text validatebox-text textbox-prompt']\", arg1);\n\t\t\t HTMLReportGenerator.StepDetails(\"Pass\", \"user enters Total Employee\", \"Expected:User should able to enter Total Employee,Actual:User enters Total Employee successfully\");\n\t\t\t //String op1=\"Expected:User should able to enter Total number of employees:\"+arg1+\",Actual:user entered total number of Employees Successfully,Exception:NA\";\n\t\t \t//System.out.println(op1);\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tHTMLReportGenerator.StepDetails(\"Fail\", \"user enters Total Employee\", \"Expected:User should able to enter Total Employee,Actual:Fail to enter Total Employee\");\n\t\t\t\t// String op1=\"Expected:User should able to enter Total number of employees:\"+arg1+\",Actual:Failed to enter total number of Employees ,Exception:\"+ex.getMessage();\n\t\t\t \t//System.out.println(op1);\n\t\t\t}\n\t\t}", "private void processGenerateOutputButton() {\n try {\n if(selectedFile != null) {\n //initialScannerOfDataFile();\n world = new World(\"My World\", 0, 0, selectedFile);\n String myTotalOutput = world.toString();\n dataOutputArea.setText(myTotalOutput);\n createTree();\n\n } else {\n JOptionPane.showMessageDialog(null, \"No selected file!\");\n }\n } catch(Exception e2) {\n System.out.println(\"Something is wrong with output generation!\\n\\n\" + e2.getMessage());\n } //end of catch()\n }", "public void formProcessingComplete()\r\n {\r\n return;\r\n }", "private void validateAndSave() {\n try {\n binder.writeBean(user);\n fireEvent(new SaveEvent(this, user));\n } catch (ValidationException e) {\n e.printStackTrace();\n }catch (DataIntegrityViolationException e){\n e.printStackTrace();\n Notification.show(\" Användarnamn används redan, försök med en ny.\",\n 2000, Notification.Position.MIDDLE ).addThemeVariants(NotificationVariant.LUMO_ERROR);\n }\n }", "public void run() \n\t\t{\n\t\t\tboolean exitMenu = false;\n\t\t\tdo \n\t\t\t{\t\t\t\t\t\n\t\t\t\tmenu.display();\n\t\t\t\tint choice = menu.getUserSelection();\n\t\t\t\t// the above method call will return 0 if the user did not\n\t\t\t\t// entered a valid selection in the opportunities given...\n\t\t\t\t// Otherwise, it is valid...\n\t\t\t\tif (choice == 0)\n\t\t\t\t{\n\t\t\t\t\t// here the user can be informed that fail to enter a\n\t\t\t\t\t// valid input after all the opportunities given....\n\t\t\t\t\t// for the moment, just exit....\n\t\t\t\t\texitMenu = true;\n\t\t\t\t}\n\t\t\t\telse if (choice == 1) \n\t\t\t\t{\n\t\t\t\t\t// here goes your code to initiate action associated to\n\t\t\t\t\t// menu option 1....\n\t\t\t\t\tProjectUtils.operationsOnNumbers();\n\t\t\t\t}\n\t\t\t\telse if (choice == 2)\n\t\t\t\t{\n\t\t\t\t\tProjectUtils.operationsOnStrings();\n\t\t\t\t}\n\t\t\t\telse if (choice == 3) \n\t\t\t\t{\n\t\t\t\t\tProjectUtils.showStatistics();\n\t\t\t\t}\n\t\t\t\telse if (choice == 4)\n\t\t\t\t{\n\t\t\t\t\texitMenu = true; \n\t\t\t\t\tProjectUtils.println(\"Exiting now... \\nGoodbye!\");\n\t\t\t\t}\n\t\t\t} while (!exitMenu);\n\t\t}", "@Security.Authenticated(Secured.class)\n @CheckPermission(category = Category.TASK, needs = {Operation.UPDATE})\n public Result applyChanges(long institutionId, long stepId) {\n System.out.println(\"Processing Data\");\n\n JsonNode formData = request().body().asJson();\n\n formData.fields().forEachRemaining(\n (node) ->\n {\n try {\n String value = node.getValue() instanceof TextNode ? node.getValue().asText() : node.getValue().toString();\n long componentPropertyId = Long.parseLong(node.getKey().toString());\n StepProperty stepProperty = stepPropertyRepository.getByStepAndComponentProperty(stepId, componentPropertyId);\n\n ComponentProperty componentProperty = componentPropertyRepository.get(componentPropertyId);\n if (stepProperty == null) {\n stepProperty = new StepProperty(value);\n stepProperty.setComponentProperty(componentProperty);\n stepProperty.setStep(stepRepository.get(stepId));\n stepPropertyRepository.add(stepProperty);\n } else {\n stepProperty.setValue(value);\n stepPropertyRepository.add(stepProperty);\n }\n\n if (componentProperty.getShortName().equals(\"stepName\")) {\n Step step = stepRepository.get(stepId);\n step.setLabel(value);\n stepRepository.add(step);\n }\n } catch (Exception e) {\n }\n }\n );\n\n return ok();\n }", "public void step()\n {\n status = stepInternal();\n }", "boolean stageAfterResultsToDocument(Object input) throws ValidationFailedException;", "protected abstract R runStep();", "public String inputForm() {\n return inputDataTraveler.validateData();\n }", "boolean stageAfterQueryParsing(Object input) throws ValidationFailedException;", "@Then(\"user inputs the answers of the questions as requirment information for GehaltsCheck\")\n public void user_inputs_the_answers_of_the_questions_as_requirment_information_for_GehaltsCheck() {\n throw new io.cucumber.java.PendingException();\n }", "public String execute() throws Exception {\t\t\n\t\t//Obtains user information from session, then sets it to Model.\n\t\tthis.yjaService.setUserInfoToModel(actionModel);\t\t\n\t\treturn initExecute();\t\t\n\t}", "@Override\n\tpublic void execute() {\n\t\tDMNModel model = getDmnRuntime().getModels().get(0); // assuming there is only one model in the KieBase\n\t\t\n\t\t// setting input data\n\t\tDMNContext dmnContext = createDmnContext(\n\t\t\t\tImmutablePair.of(\"customerData\", new CustomerData(\"Silver\", new BigDecimal(15)))\n\t\t);\n\t\t\n\t\t// executing decision logic\n\t\tDMNResult topLevelResult = getDmnRuntime().evaluateAll(model, dmnContext);\n\t\t\n\t\t// retrieving execution results\n\t\tSystem.out.println(\"--- results of evaluating all ---\");\n\t\ttopLevelResult.getDecisionResults().forEach(this::printAsJson);\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException ex) {\n Logger.getLogger(save_edited_services_provided.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tprotected OperationResult persistResult() throws IOException {\n\t\treturn App.getState().get(processInput());\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (Exception ex) {\n Logger.getLogger(ValidationScenarioHandlerServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "protected void succeed()\r\n {\r\n // inform user\r\n ((OwMainAppContext) getContext()).postMessage(getContext().localize(\"plug.owdocprops.OwFieldView.saved\", \"The changes have been applied.\"));\r\n }", "public void execute() throws NbaBaseException {\n\t\tboolean isSuccess = false;\t\t\n\t\tif (performingRequirementsEvaluation()) { //SPR2652\n\t\t\tsetPartyID(work); //ACN024\n\t\t\tisSuccess = processRequirementSummary();\n\t\t\tif (!isSuccess) {\t\t\t\t\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_RESULTS_ERROR + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY);\t//SPR2652\n\t\t\t}\n\t\t}\n\t}", "private void wizardChanged() {\r\n\t\t\r\n\t\tboolean valid = true;\r\n\t\t\r\n\t\t// The project name can't be empty\r\n\t\tif (nameText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NameEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// The project description can't be empty\r\n\t\tif (valid && descriptionText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DescriptionEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// TODO: validar que la fecha de inicio sea anterior a la de final\r\n\t\t\t\t\r\n\t\t// The project budget can't be empty\r\n\t\tif (valid && budgetText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.BudgetEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The quantity of lines of the project can't be empty\r\n\t\tif (valid && quantityLinesText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.NumberCodeLinesEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\t// The project domain of the project can't be empty\r\n\t\tif (valid && domainText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.DomainEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && progLanguageCombo.getSelectionIndex()==-1) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.ProgrammingLanguageNotSelected\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid && estimatedHoursText.getText().length() == 0) {\r\n\t\t\tupdateStatus(BundleInternationalization.getString(\"ErrorMessage.EstimatedHoursEmpty\"));\r\n\t\t\tvalid = false;\r\n\t\t}\r\n\t\t\r\n\t\tif (valid) \r\n\t\t\tupdateStatus(null);\r\n\t\t\r\n\t}", "public void execute() {\n String input;\n boolean isInputValid;\n\n do {\n isInputValid = true;\n\n System.out.print(\"Please send me the numbers using space between them like \\\"1 2 3\\\": \");\n input = sc.nextLine();\n\n try {\n validateData(input);\n } catch (NumberFormatException e) {\n System.err.println(\"NumberFormatException \" + e.getMessage());\n isInputValid = false;\n }\n\n } while (!isInputValid);\n\n System.out.println(\"Result: \" + find(input));\n }", "public void saveMeldingWizard() {\n\n\t\ttry {\n\n\t\t\tsetHasErrors(true);\n\n\t\t\t// Save Melding\n\t\t\tif (checkMeldingWizard(object)) {\n\n\t\t\t\tsetHasErrors(false);\n\t\t\t\tmodelRepository.saveObject(getMelding());\n\n\t\t\t\tmessages.info(\"Melding sucessvol verzonden naar TOV.\");\n\n\t\t\t\t// Email bevestiging sturen naar melder en medewerker\n\t\t\t\tBeans.getReference(OsyrisModelFunctions.class)\n\t\t\t\t\t\t.sendConfirmationMailMelding(object);\n\n\t\t\t\t// return reset();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tmessages.error(\"Melding niet verzonden:\" + e.getMessage());\n\t\t\tLOG.error(\"Can not save model object.\", e);\n\t\t}\n\t}", "public void dataUpdated() {\r\n finish = getConfiguration().getTransformTarget() != null;\r\n this.wizardControl.updateView();\r\n }", "protected void paceoder() {\n\t\t\n\t\tif(!homepage.isimport){\n\t\t\tJOptionPane.showMessageDialog(null, \"先导入用户数据吧\");\n\t\t}else if((text_num.getText().isEmpty())|(text_price.getText().isEmpty())){\n \t\t\t\n \t\tJOptionPane.showMessageDialog(null, \"先输入数值喔\");\n \t}\n \telse if(!Userinfochange.isNumeric(text_num.getText())\n \t\t\t|!Userinfochange.isNumeric(text_price.getText())){\n \t\t\n \t\tJOptionPane.showMessageDialog(null, \"输入数字喔\");\n \t}\n \telse if( Integer.parseInt(text_num.getText())<0\n \t\t\t||Integer.parseInt(text_num.getText())%100!=0){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"要输入整百股喔\");\n\t\t\t\t\n\t\t\t}\n \t \n \t\telse{\t\n \t\t\tMessageBox messagebox = new MessageBox(shell, SWT.YES | SWT.NO);\n \t\t\tmessagebox.setText(\"下单\");\n \t\t\tmessagebox.setMessage(\" 确认是否下单\");\n \n \t\t\tint val=messagebox.open();\n \t\t\t\n \t\t\tif(val == SWT.YES){\n \n \t\t\t\tString date = Integer.toString(text_dateTime.getYear())+\"/\"+Integer.toString(text_dateTime.getMonth()+1)+\n\t\t\t\t\t\t\t\"/\"+Integer.toString(text_dateTime.getDay());\n \t\t\tPlaceOder placeoder = new PlaceOder(tabitemindex,information[0].substring(21),text_code.getText(),\n\t\t\t\t\t\t\"卖空\",text_price.getText(),text_num.getText(),place,date);\n \t\t\tif(placeoder.update_trade()){\n \t\t\tMessagedialo window = new Messagedialo();\n \t\t\twindow.open(shell);\n \t\t\t}\n \t\t\telse{\n \t\t\t\t\n \t\t\t\thomepage.lbl_notice.setForeground(SWTResourceManager.getColor(SWT.COLOR_RED));\n \t\t\t\thomepage.lbl_notice.setText(\"*卖空失败\");\n \t\t\t\t\t\n \t\t\t\tMessagedialofail window = new Messagedialofail();\n \t\t\twindow.open(shell);\n \t\t\t}\n \t\t\t}\n \t\t\n \t\n }\n\t\t\n\t}", "private void doProcess(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception{\n\t\tUserBean userbean = new UserBean();\n\t\tRequestDispatcher dispatcher = null;\n\t\tHttpSession session = request.getSession(false);\n\t\tuserbean.setName(request.getParameter(\"name\"));\n\t\tuserbean.setPassword(request.getParameter(\"password\"));\n\t\tuserbean.setPhoneNumber(request.getParameter(\"phoneNumber\"));\n\t\tuserbean.setRole(request.getParameter(\"role\"));\n\t\tuserbean.setUserId(request.getParameter(\"userId\"));\n\t\tUpdatDao updateDao = new UpdatDao();\n\t\tif(\"success\".equals(updateDao.addUser(userbean))){\n\t\t\tdispatcher = session.getServletContext().getRequestDispatcher(\"/adminHome.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdispatcher = session.getServletContext().getRequestDispatcher(\"/adminHome.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t}\n\t\t\n\t}", "public void execute() {\n //this.$context.$Request.initialize();\n this.$context.$Request.extractAllVars();\n\n this.$context.$Response.writeHeader(\"Content-type\", \"text/html; charset=UTF-8\");\n\n // Check security code\n if (!this.$context.$Request.contains(\"code\")) {\n this.$context.$Response.end(\"Code is required!\");\n return;\n }\n String $code = this.$context.$Request.get(\"code\");\n if (!EQ($code, Config.SECURITY_CODE)) {\n this.$context.$Response.end(\"Incorrect code!\");\n return;\n }\n\n // Check package\n if (!this.$context.$Request.contains(\"package\")) {\n this.$context.$Response.end(\"Package is required!\");\n return;\n }\n String $package = this.$context.$Request.get(\"package\");\n if (BLANK($package)) {\n this.$context.$Response.end(\"Empty package!\");\n return;\n }\n String[] $packageChunks = Strings.split(\"-\", $package);\n for (int $n = 0; $n < SIZE($packageChunks); $n++)\n $packageChunks[$n] = Strings.firstCharToUpper($packageChunks[$n]);\n $package = Strings.join(\"/\", $packageChunks);\n\n // Check class\n if (!this.$context.$Request.contains(\"class\")) {\n this.$context.$Response.end(\"Class is required!\");\n return;\n }\n String $className = this.$context.$Request.get(\"class\");\n if (BLANK($className)) {\n this.$context.$Response.end(\"Empty class!\");\n return;\n }\n\n // Check method\n if (!this.$context.$Request.contains(\"method\")) {\n this.$context.$Response.end(\"Method is required!\");\n return;\n }\n String $method = this.$context.$Request.get(\"method\");\n if (BLANK($method)) {\n this.$context.$Response.end(\"Empty method!\");\n return;\n }\n\n // Fill array with parameters\n int $count = 0;\n TArrayList $pars = new TArrayList();\n for (int $n = 1; $n <= 6; $n++) {\n String $parName = CAT(\"par\", $n);\n if (!this.$context.$Request.contains($parName))\n break;\n String $parValue = this.$context.$Request.get($parName);\n if (EQ($parValue, \"_\"))\n $parValue = \"\";\n //$parsArray[] = $parValue;\n $pars.add($parValue);\n $count++;\n }\n\n String $buffer = null;\n Object $result = null;\n\n String $fullClass = CAT($package, \"/\", $className);\n\n $fullClass = Strings.replace(\"/\", \".\", $fullClass);\n TArrayList $pars0 = new TArrayList(new Object[] { this.$context.$Connection });\n $result = Bula.Internal.callMethod($fullClass, $pars0, $method, $pars);\n\n if ($result == null)\n $buffer = \"NULL\";\n else if ($result instanceof DataSet)\n $buffer = ((DataSet)$result).toXml(EOL);\n else\n $buffer = STR($result);\n this.$context.$Response.write($buffer);\n this.$context.$Response.end();\n }", "@Override\n\tprotected String validatePreSaveDataAndReturnIssues() {\n\t\t\n\t\tif(getImageOrder(selectedFolders[0])==null || getImageTotal(selectedFolders[0]) != 8)\n\t\t\treturn movement_warning;\n\t\t\n\t\tObject[] object = hook.getSelectedRow(selectedRow);\n\t\tif((Integer)object[1] == 0) return \"add changes to the table before saving\";\n\t\t\n\t\tif(changesPendingAdd){\n\t\t\t\n\t\t\tint dialogResult = JOptionPane.showConfirmDialog(null, \"Add changes to table before saving?\", \"Add To Table\", JOptionPane.YES_NO_OPTION);\n\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\n\t\t\t\treturn addResourceToTable(true);\n\t\t\t\t\n\t\t\t}else{\n\n\t\t\t\treturn \"save cancelled\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"no issues saving...\");\n\t\t\n\t\treturn null;\n\t}", "@Override\n public void executeTransaction() {\n System.out.println(\"Please make a selection first\");\n }", "private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void formProcessingComplete(){}", "public void run() {\n if (!getEditor().isDefinitionComplete()) {\r\n MessageDialog.openInformation(Display.getCurrent().getActiveShell(), RuleEditorMessages\r\n .getString(\"RuleEditor.Dlg.Error.Incomplete.Title\"), RuleEditorMessages\r\n .getString(\"RuleEditor.Dlg.Error.Incomplete.Msg\"));\r\n return;\r\n }\r\n \r\n getEditor().save(null);\r\n\r\n // disable the quick edit mode on save\r\n IAction action = getEditor().getAction(QuickEditAction.ID);\r\n if (action != null) {\r\n action.setChecked(false);\r\n }\r\n\r\n // quick fix\r\n updateEnableState();\r\n }", "protected abstract void executeActionsIfError();", "public void input_details_log()\r\n {\r\n System.out.print(\"\\n Enter your email id: \");\r\n Email=sc.nextLine();\r\n\r\n System.out.print(\" Enter your password: \");\r\n check_passwrd=sc.nextLine();\r\n }", "boolean stageBeforeResultsImport(Object input) throws ValidationFailedException;", "private void process(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tAddModel model = Util.getModel(request, Const.RESULT);\n\t\t\n\t\t// Print the \"VIEW\" using the \"MODEL\"\n\t\tprintView(response, model);\n\t}", "@Override\n\tpublic void process() {\n\n\t\tInputCommand cmd = InputManager.nextCommandPreserveKeyData();\n\t\tif (cmd != null) {\n\t\t\tswitch (cmd) {\n\n\t\t\tcase NEW:\n\t\t\t\tsetNextScreen(new NewGameScreen(terminal));\n\t\t\t\tbreak;\n\n\t\t\tcase LOAD:\n\t\t\t\tsetNextScreen(new MainScreen(this.terminal, loadGame()), false);\n\t\t\t\tbreak;\n\n\t\t\tcase CANCEL:\n\t\t\t\tSystem.exit(0);\n\n\t\t\tdefault:\n\t\t\t}\n\t\t}\n\t}", "private void doExit() {\n\t\tif (userMadeChanges()) {\n showSaveChangesBeforeExitPrompt();\n\t\t} else {\n\t\t\tfinish();\n\t\t}\n\t}", "@RequestMapping(value=\"/module/diagnosiscapturerwanda/vitals\", method=RequestMethod.POST)\n public String processVitalsSubmit(@ModelAttribute(\"vitalsCommand\") VitalsCommand vitalsCommand,\n BindingResult errors, HttpServletRequest request) {\n \n Visit visit = vitalsCommand.getVisit();\n Encounter encounter = vitalsCommand.getEncounter();\n for (Map.Entry<String, Concept> entry : getQuestions().entrySet()) {\n Double newValue = vitalsCommand.getValues().get(entry.getKey());\n Obs existingObs = vitalsCommand.getObs(entry.getValue());\n Obs newObs = null;\n if (existingObs != null) {\n if (!OpenmrsUtil.nullSafeEquals(existingObs.getValueNumeric(), newValue)) {\n if (newValue != null) {\n newObs = Obs.newInstance(existingObs);\n newObs.setPreviousVersion(existingObs);\n newObs.setValueNumeric(newValue);\n }\n existingObs.setVoided(true);\n existingObs.setVoidedBy(Context.getAuthenticatedUser());\n existingObs.setVoidReason(\"Obs value changed on vitals page\");\n }\n }\n else if (newValue != null) {\n newObs = new Obs();\n newObs.setConcept(entry.getValue());\n newObs.setValueNumeric(newValue);\n }\n if (newObs != null) {\n encounter.addObs(newObs);\n }\n }\n encounter.setVisit(visit);\n Context.getEncounterService().saveEncounter(encounter);\n \n return \"redirect:/module/diagnosiscapturerwanda/diagnosisPatientDashboard.list?patientId=\" + visit.getPatient().getPatientId();\n }", "@Override\n public void run() {\n if (checkFailure()) {\n throw new InvalidInputException(\"任务结果计算器暂时无法工作,因为未满足条件\");\n } else {\n analysisDistribution();\n File file = writeFile();\n task.setResult(OSSWriter.upload(file));\n task.setHasResult(true);\n taskController.update(task);\n }\n }", "public void process(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException {\n\n\t\tString firstName = request.getParameter(\"firstName\");\n\t\tString lastName = request.getParameter(\"lastName\");\n\t\tString password = request.getParameter(\"password\");\n\t\tString confirmPassword = request.getParameter(\"confirmPassword\");\n\t\tString emailId = request.getParameter(\"emailId\");\n\t\tString phoneNumber = request.getParameter(\"phoneNumber\");\n\t\n\t\t\n\t\t\tresponse.setContentType(\"text/html\");\n\t\t\tPrintWriter out = response.getWriter();\n\n\t\t\t// creating an object of model and setting the form values\n\t\t\tUser users = new User();\n\n\t\t\tusers.setFirstName(firstName);\n\t\t\tusers.setLastName(lastName);\n\t\t\tusers.setPassword(password);\n\t\t\tusers.setEmailId(emailId);\n\t\t\tusers.setPhoneNumber(phoneNumber);\n\t\t\tusers.setConfirmPassword(confirmPassword);\n\n\t\t\ttry {\n\t\t\t\tRegisterDAOImpl registerDAO = new RegisterDAOImpl();\n\t\t\t\tregisterDAO.insertUser(users);\n\t\t\t\t\n\t\t\t\tRequestDispatcher rd=request.getRequestDispatcher(\"welcome.jsp\");\n\t\t\t\t try {\n\t\t\t\t\trd.forward(request, response);\n\t\t\t\t} catch (ServletException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tout.println(\"data inserted\");\n\t\t}", "@Override\n public PageName execute(HttpServletRequest request){\n SessionRequestContent requestContent=new SessionRequestContent();\n requestContent.extractValues(request);\n Map<String,String> parameterValues=requestContent.getRequestParameters();\n List<String> wrongInputs= PatternCheck.checkRecipeForm(parameterValues);\n if (!wrongInputs.isEmpty()){\n request.getSession().setAttribute(SessionAttribute.WRONG_INPUTS,wrongInputs);\n request.getSession().setAttribute(ParameterName.LAST_PAGE, PageName.WRONG_INPUT_PAGE);\n return PageName.WRONG_INPUT_PAGE;\n }\n if (!MedicineService.necessaryRecipeMedicine(parameterValues)){\n request.getSession().setAttribute(SessionAttribute.ERROR_MESSAGE, ErrorPageMessage.NOT_NECESSARY_RECIPE);\n request.getSession().setAttribute(ParameterName.LAST_PAGE, PageName.ERROR_PAGE);\n return PageName.ERROR_PAGE;\n }\n Recipe recipe= RecipeService.createNewRecipe(parameterValues);\n if (recipe!=null){\n request.getSession().setAttribute(ParameterName.LAST_PAGE, PageName.NEW_RECIPE_SUCCESS);\n request.getSession().setAttribute(ParameterName.RECIPE,recipe);\n return PageName.NEW_RECIPE_SUCCESS;\n } else {\n request.getSession().setAttribute(SessionAttribute.ERROR_MESSAGE, ErrorPageMessage.NEW_RECIPE_ERROR);\n request.getSession().setAttribute(ParameterName.LAST_PAGE, PageName.ERROR_PAGE);\n return PageName.ERROR_PAGE;\n }\n }", "private void getUserInput() {\n getUserTextInput();\n getUserPhotoChoice();\n getUserRoomChoice();\n getUserBedroomsChoice();\n getUserBathroomsChoice();\n getUserCoownerChoice();\n getUserIsSoldChoice();\n getUserTypeChoice();\n mAmenitiesInput = Utils.getUserAmenitiesChoice(mBinding.chipGroupAmenities.chipSchool,\n mBinding.chipGroupAmenities.chipShop, mBinding.chipGroupAmenities.chipTransport,\n mBinding.chipGroupAmenities.chipGarden);\n }", "private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}", "public void inputInformation() throws IOException {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n System.out.println(\"Please enter shape: \");\n shape = input.readLine();\n\n System.out.println(\"Please enter color\");\n color = input.readLine();\n\n System.out.println(\"Please enter name: \");\n name = input.readLine();\n\n System.out.println(\"Please enter weight: \");\n weight = Double.parseDouble(input.readLine());\n } catch (NumberFormatException e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {\n //get a logger for debugging\n Logger mLogger= Logger.getLogger(SetupServlet.class.toString());\n\n //attempt to get all of the parameters\n String username=request.getParameter(\"username\");\n String password=request.getParameter(\"password\");\n String company=request.getParameter(\"company\");\n String street=request.getParameter(\"street\");\n String city=request.getParameter(\"city\");\n String state=request.getParameter(\"state\");\n String zipcode=request.getParameter(\"zipcode\");\n String range=request.getParameter(\"radius\");\n String normalHr=request.getParameter(\"normal\");\n String overtime=request.getParameter(\"overtime\");\n\n mLogger.log(Level.INFO,username);\n mLogger.log(Level.INFO,password);\n mLogger.log(Level.INFO,company);\n mLogger.log(Level.INFO,street);\n mLogger.log(Level.INFO,city);\n mLogger.log(Level.INFO,state);\n mLogger.log(Level.INFO,zipcode);\n mLogger.log(Level.INFO,range);\n mLogger.log(Level.INFO,normalHr);\n mLogger.log(Level.INFO,overtime);\n\n //make sure none of the fields are null, if they are...send the user back to the setup page\n if (!checkParameters(username,password,company,street,city,state,zipcode,range,normalHr,overtime)){\n response.sendRedirect(\"setupError.html\");\n }\n else{\n\n //try to add to the datastore\n Employer newEmployer=new Employer(username,password,company,street,city,state,zipcode,range,\n normalHr,overtime);\n EmployerDataStore.addNewUser(newEmployer);\n\n mLogger.log(Level.INFO,\"Successful Addition\");\n //redirect the employer to the welcome page\n response.sendRedirect(\"welcome.do?employername=\"+username+\"&password=\"+password);\n }\n }", "@Override\r\n public Resolution handleValidationErrors(ValidationErrors errors) throws Exception {\n trips = facade.getAllTrips();\r\n excursions = facade.getAllExcursions();\r\n //return null to let the event handling continue\r\n return null;\r\n }", "public String OnSubmit() {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tUser user1 = context.getApplication().evaluateExpressionGet(context, \"#{user}\", User.class);\r\n\t\t\r\n\t\t// test purposes, log results to console\r\n\t\tSystem.out.println(\"First Name is: \" + user1.getFirstName());\r\n\t\tSystem.out.println(\"Last Name: \" + user1.getLastName());\r\n\t\t\r\n\t\t// prints message to console to tell us which business service selected in beans.xml\r\n\t\tservice.test();\r\n\t\t\r\n\t\t// start timer when log is clicked\r\n\t\t\r\n\t\ttimer.setTimer(5000);\r\n\t\t\r\n\t\t// put user back in context\r\n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"user\", user1);\r\n\t\t\r\n\t\t// show next page\r\n\t\treturn \"Response.xhtml\";\r\n\t}", "public void validation() {\n ValidationData();\n if (Validation == null) {\n Toast.makeText(this, \"No Data Found\", Toast.LENGTH_SHORT).show();\n } else {\n getHistory();\n }\n }", "@Override\r\n protected void runComponent() {\r\n\r\n File theFile = this.getAttachment(0, 0);\r\n\r\n try {\r\n \tif (theFile != null && theFile.exists()) {\r\n \t\tverifyInputFile(this.getAttachment(0, 0));\r\n \t} else {\r\n \t\taddErrorMessage(\"Could not read required input file.\");\r\n \t}\r\n\r\n } catch (Exception e) {\r\n logger.info(\"Verify of first \" + NUM_INPUT_LINES_TO_CHECK + \" failed: \" + e);\r\n this.addErrorMessage(e.toString());\r\n }\r\n\r\n System.out.println(this.getOutput());\r\n }", "protected void runBeforeStep() {}" ]
[ "0.62118787", "0.61965907", "0.5937527", "0.5547366", "0.55229944", "0.54699755", "0.5434881", "0.53733283", "0.5355073", "0.5325096", "0.5322855", "0.5317737", "0.53129864", "0.5302749", "0.53010744", "0.5299605", "0.5297682", "0.52860653", "0.52820444", "0.5281098", "0.52783453", "0.5275679", "0.52672094", "0.5265414", "0.52427906", "0.52302295", "0.5229191", "0.52135754", "0.51960325", "0.5195066", "0.5192839", "0.51836824", "0.51826197", "0.51811284", "0.5179406", "0.5176972", "0.51638454", "0.5162606", "0.5161075", "0.51605207", "0.5160015", "0.5150826", "0.5150743", "0.51436627", "0.5128964", "0.5124086", "0.512212", "0.5102645", "0.51001906", "0.5087557", "0.5087034", "0.50826937", "0.50750303", "0.5066469", "0.5051595", "0.5049386", "0.5044808", "0.50425744", "0.503993", "0.50356513", "0.5032381", "0.5028974", "0.50182384", "0.5009451", "0.5003363", "0.49964908", "0.49918163", "0.49857718", "0.49834937", "0.49825835", "0.49763858", "0.4966317", "0.4965112", "0.4963709", "0.4962998", "0.49498928", "0.49468082", "0.49460745", "0.494305", "0.49429557", "0.4941383", "0.49364394", "0.49219733", "0.49194366", "0.4914979", "0.49127698", "0.49119425", "0.490827", "0.49065298", "0.48976684", "0.48915574", "0.48839277", "0.48788598", "0.48783398", "0.48782402", "0.48773977", "0.48747668", "0.4870333", "0.48663437", "0.48655364" ]
0.51769197
36
Retrieves the number of pages that this "step" extends over. This method is used to build the progress bar. This method may just return 1 for most steps (since most steps consist of a single page). But, it should return a number greater than 1 for any "step" which spans across a number of HTML pages. For example, the configurable "Describe" step (configured using inputforms.xml) overrides this method to return the number of pages that are defined by its configuration file. Steps which are noninteractive (i.e. they do not display an interface to the user) should return a value of 1, so that they are only processed once!
public int getNumberOfPages(HttpServletRequest request, SubmissionInfo subInfo) throws ServletException { // always just one page of initial questions return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPageCount()\n {\n return _pages.size();\n }", "public Integer getPageCount();", "int getPagesAmount();", "public int getPageCount() { return _pages.size(); }", "public int getTotalPageCount() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.pagesCount;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\n }\n }", "public int getTotalPages() {\r\n\t\treturn page.getTotalPages();\r\n\t}", "public int getPageCount() {\n return mPdfRenderer.getPageCount();\n }", "protected int getTotalPages(FacesContext context) {\n String forValue = (String) getAttributes().get(\"for\");\n UIData uiData = (UIData) getForm(context).findComponent(forValue);\n if (uiData == null) {\n return 0;\n }\n int rowsPerPage = uiData.getRows(); \n int totalRows = uiData.getRowCount();\n int result = totalRows / rowsPerPage;\n if (0 != (totalRows % rowsPerPage)) {\n result++;\n }\n return result;\n }", "public int getTotalPages() {\r\n return totalPages;\r\n }", "public int numPages() {\n \t//numOfPages = (int)(this.fileName.length()/BufferPool.PAGE_SIZE);\n return numOfPages;\n }", "public int numPages() {\n return numPages;\n }", "public int getTotalPage() {\n return getSize() == 0 ? 1 : (int) Math.ceil((double) total / (double) getSize());\n }", "public int numPages() {\n // some code goes here\n return (int) Math.ceil(m_f.length() / BufferPool.PAGE_SIZE);\n }", "public int getNumPages()\n {\n return numPages;\n }", "public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }", "public int numPages() {\n // some code goes here\n return (int)Math.ceil(f.length()/BufferPool.PAGE_SIZE);\n \n }", "public int numPages() {\n // some code goes here\n //System.out.println(\"File length :\" + f.length());\n\n return (int) Math.ceil(f.length() * 1.0 / BufferPool.PAGE_SIZE * 1.0);\n }", "public static int getTotalPage() {\n List<WebElement> PAGINATION = findElements(pagination);\n int size = PAGINATION.size() - 1;\n //Get the number of the second-last item which next to the \">\" icon\n WebElement lastPage = findElement(By.xpath(String.format(last_page, size)));\n return Integer.parseInt(lastPage.getText());\n }", "public int numberOfSteps() {\t\r\n\t\treturn steps.size();\r\n\t}", "public int getPageCount() {\n return (int) (getPageSize() > 0 ? Math.ceil(getTotalRecords() / getPageSize()) : 0);\n }", "public int pageCount()\n {\n return (int)Math.ceil((double)getTaskVector().size() /\n (double)getRecordsPerPage());\n }", "public int getPages() {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "Integer getTotalStepCount();", "public int getPages() {\n return pages;\n }", "public int getPagesize() {\n return pagesize_;\n }", "public Integer getPageItemCount() {\n return pageItemCount;\n }", "public int getPagesize() {\n return pagesize_;\n }", "public Integer getTotalPageCount() {\n return totalPageCount;\n }", "@Schema(example = \"10\", description = \"Amount of pages available in the file. Used only for multipage documents.\")\n public Integer getPageCount() {\n return pageCount;\n }", "int getNumPages();", "public int actualPageCount() {\n\t\tTestLog.log.info(\"get actual page count\");\n\t\tint actualpageNumbers = 0;\n\t\ttry{\n\t\t\tactualpageNumbers = driver.findElements(By.xpath(\"//div[@id='example_paginate']/span/a\")).size();\n\t\t\t\n\t\t}catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\tTestLog.log.info(\"Could not find page count\" + ex);\n\t\t}\n\t\treturn actualpageNumbers;\n\t}", "int getPagesize();", "public int getPages()\n {\n return pages;\n }", "@Override\n\tpublic Integer getTotalPages(ConditionInfo cf) {\n\t\treturn rd.getTotalPages(cf);\n\t}", "public int getActualPageNumber() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.page;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\n }\n }", "public int getGatheredPages() {\r\n return gatheredPages;\r\n }", "public int getStepCount() {\r\n\t\treturn stepCount;\r\n\t}", "public int getPagesDisplayed() {\n return getTableModelSource().getTableModel().getPageCount();\n }", "public int getPagesCrawled() {\n return pagesCrawled;\n }", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "public Long getTotalPageNum() {\n\t\treturn this.totalPageNum;\n\t}", "public long getStepCount(){\r\n\t\treturn steps;\r\n\t}", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getProgressCount() {\n return progress_.size();\n }", "public int getPagesPerBatch()\n {\n return m_pagesPerBatch;\n }", "public static int getPageHits() {\r\n return _count;\r\n }", "public int getPages(){\n return pages;\n }", "public int getpageCount(int pageSize) {\n\t\treturn 0;\n\t}", "public long getStepCount(){\n return steps;\n }", "Optional<Integer> getPageCount();", "public String getTotalPage() {\r\n return totalPage;\r\n }", "public int getPageIncrement() {\n \tcheckWidget();\n \treturn pageIncrement;\n }", "int getPageNumber();", "@Override\n public int numberOfPages() {\n // TODO Auto-generated method stub\n throw new UnsupportedOperationException(\"Unsupported operation\");\n }", "public Iterator<Integer> getPageCountIterator();", "public int getPageSize()\n {\n return bouquet.getSheaf().getPageSize();\n }", "public Integer getCurrentPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "public static int getPageSize() {\n\t\treturn PageSize;\n\t}", "double getStepSize();", "public int length() {\n return steps.size();\n }", "public int getSteps() {\n\t\treturn this.steps;\n\t}", "int getSequenceStepsCount();", "public int getPageSize() {\r\n\t\t\t\treturn pageCount;\r\n\t\t\t}", "public int getSteps() {\n\t\treturn steps;\n\t}", "int getPage();", "Integer getPage();", "public int getPageNumber() {\r\n\t\t\t\treturn currentPage;\r\n\t\t\t}", "public Integer getBookTotalPage() {\n return bookTotalPage;\n }", "public static int getPagesCount(int s) {\n if(s>10)\n return (s + ((s-6)/5));\n else\n return s;\n }", "public int getNumber() {\r\n\t\treturn page.getNumberOfElements();\r\n\t}", "public int getPrintProgress(){\n\t\treturn printProgress;\n\t}", "public int getPageEnd() {\n int val = (_pageIndex + 1) * _pageSize;\n return (val > _totalRecords) ? _totalRecords : val;\n }", "public Integer getPerPage();", "long getPageSize();", "long getPageSize();", "long getPageSize();", "public int getPageNumber ()\n {\n try {\n if (!isOfType (\"Page\"))\n throw new RuntimeException (\"invalid page reference\");\n return ((PDFDictionary) get (\"Parent\")).getPageOffset (this);\n } catch (Exception e) {\n Options.warn (e.getMessage ());\n return -1;\n }\n }", "public int getEndingPage() {\n return endingPage;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getPage() {\n return page;\n }", "public int getNumResultsPerPage() {\n return numResultsPerPage;\n }", "public int getPageNo() {\n return pageNo;\n }", "public long getTotal() {\r\n\t\treturn page.getTotalElements();\r\n\t}", "public String getPages() {\n return pages;\n }", "public int getTotalArticle() {\n int listLimit;\n int total;\n int totalPage;\n listLimit = getArticleRowCount();\n clickGoToLastPageBtn();\n // Has to used this method instead of goToPageBtn().size() since the maximum size of the goToPageBtn list is always 10\n totalPage = Integer.parseInt(goToPageBtn().get(goToPageBtn().size() - 1).getText().trim());\n total = getArticleRowCount() + listLimit * totalPage;\n return total;\n }", "private int pagesLeft() {\n return this.pages - this.pagesRead;\n }", "long getAmountPage();" ]
[ "0.73690283", "0.7209158", "0.71613735", "0.71163076", "0.7105777", "0.7105058", "0.7073932", "0.7068451", "0.7062639", "0.702975", "0.70065194", "0.6989511", "0.6986428", "0.68966025", "0.6875367", "0.6859267", "0.68361264", "0.6824217", "0.67472625", "0.67323536", "0.66887325", "0.66805613", "0.66805613", "0.6644902", "0.6629938", "0.66288686", "0.66144896", "0.6614067", "0.6607952", "0.6599478", "0.65989673", "0.6598723", "0.6594444", "0.65740734", "0.6510647", "0.6485698", "0.64600563", "0.63973814", "0.63865834", "0.6376158", "0.6353487", "0.6353487", "0.6353487", "0.625628", "0.62529767", "0.62381727", "0.62381727", "0.62381727", "0.62132967", "0.62132967", "0.62132967", "0.6193236", "0.6167701", "0.61550236", "0.6146637", "0.61437047", "0.6116826", "0.6048722", "0.60377884", "0.6021997", "0.6008859", "0.59515136", "0.5885359", "0.5883132", "0.58731985", "0.58731985", "0.58731985", "0.58731985", "0.5872758", "0.5871347", "0.58605224", "0.5845232", "0.5842874", "0.5838506", "0.58051515", "0.58015096", "0.57975215", "0.57765496", "0.57567465", "0.5741589", "0.57359874", "0.57331896", "0.5714225", "0.5710898", "0.5694906", "0.5694906", "0.5694906", "0.5694903", "0.5691976", "0.56773", "0.56773", "0.56773", "0.56773", "0.56732035", "0.56724125", "0.56539446", "0.56441534", "0.56422716", "0.56403875", "0.5638596" ]
0.6744237
19
Process input from "verify prune" page
protected void processVerifyPrune(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo, boolean multipleTitles, boolean publishedBefore, boolean multipleFiles) throws ServletException, IOException, SQLException, AuthorizeException { // get the item to prune Item item = subInfo.getSubmissionItem().getItem(); if (!multipleTitles && subInfo.getSubmissionItem().hasMultipleTitles()) { item.clearDC("title", "alternative", Item.ANY); } if (!publishedBefore && subInfo.getSubmissionItem().isPublishedBefore()) { item.clearDC("date", "issued", Item.ANY); item.clearDC("identifier", "citation", Item.ANY); item.clearDC("publisher", null, Item.ANY); } if (!multipleFiles && subInfo.getSubmissionItem().hasMultipleFiles()) { // remove all but first bitstream from bundle[0] // FIXME: Assumes multiple bundles, clean up someday... // (only messes with the first bundle.) Bundle[] bundles = item.getBundles("ORIGINAL"); if (bundles.length > 0) { Bitstream[] bitstreams = bundles[0].getBitstreams(); // Remove all but the first bitstream for (int i = 1; i < bitstreams.length; i++) { bundles[0].removeBitstream(bitstreams[i]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void prune() {\n\n }", "public int doProcessing(Context context, HttpServletRequest request,\n HttpServletResponse response, SubmissionInfo subInfo)\n throws ServletException, IOException, SQLException,\n AuthorizeException\n {\n // Get the values from the initial questions form\n boolean multipleTitles = Util.getBoolParameter(request,\n \"multiple_titles\");\n\t\t//Expect publishedBefore unless stated otherwise\n boolean publishedBefore = Util.getBoolParameter(request,\n \"published_before\", true);\n boolean multipleFiles = Util.getBoolParameter(request,\n \"multiple_files\");\n boolean isThesis = ConfigurationManager\n .getBooleanProperty(\"webui.submit.blocktheses\")\n && Util.getBoolParameter(request, \"is_thesis\");\n\n if (subInfo.isInWorkflow())\n {\n // Thesis question does not appear in workflow mode..\n isThesis = false;\n\n // Pretend \"multiple files\" is true in workflow mode\n // (There will always be the license file)\n multipleFiles = true;\n }\n\n // First and foremost - if it's a thesis, reject the submission\n if (isThesis)\n {\n WorkspaceItem wi = (WorkspaceItem) subInfo.getSubmissionItem();\n wi.deleteAll();\n subInfo.setSubmissionItem(null);\n\n // Remember that we've removed a thesis in the session\n request.getSession().setAttribute(\"removed_thesis\",\n Boolean.TRUE);\n\n return STATUS_THESIS_REJECTED; // since theses are disabled, throw\n // an error!\n }\n\n // Next, check if we are pruning some existing metadata\n if (request.getParameter(\"do_not_prune\") != null)\n {\n return STATUS_CANCEL_PRUNE; // cancelled pruning!\n }\n else if (request.getParameter(\"prune\") != null)\n {\n processVerifyPrune(context, request, response, subInfo,\n multipleTitles, publishedBefore, multipleFiles);\n }\n else\n // otherwise, check if pruning is necessary\n {\n // Now check to see if the changes will remove any values\n // (i.e. multiple files, titles or an issue date.)\n\n if (subInfo.getSubmissionItem() != null)\n {\n // shouldn't need to check if submission is null, but just in case!\n if (!multipleTitles)\n {\n Metadatum[] altTitles = subInfo.getSubmissionItem().getItem()\n .getDC(\"title\", \"alternative\", Item.ANY);\n\n willRemoveTitles = altTitles.length > 0;\n }\n\n if (!publishedBefore)\n {\n Metadatum[] dateIssued = subInfo.getSubmissionItem().getItem()\n .getDC(\"date\", \"issued\", Item.ANY);\n Metadatum[] citation = subInfo.getSubmissionItem().getItem()\n .getDC(\"identifier\", \"citation\", Item.ANY);\n Metadatum[] publisher = subInfo.getSubmissionItem().getItem()\n .getDC(\"publisher\", null, Item.ANY);\n\n willRemoveDate = (dateIssued.length > 0)\n || (citation.length > 0) || (publisher.length > 0);\n }\n\n if (!multipleFiles)\n {\n // see if number of bitstreams in \"ORIGINAL\" bundle > 1\n // FIXME: Assumes multiple bundles, clean up someday...\n Bundle[] bundles = subInfo.getSubmissionItem().getItem()\n .getBundles(\"ORIGINAL\");\n\n if (bundles.length > 0)\n {\n Bitstream[] bitstreams = bundles[0].getBitstreams();\n\n willRemoveFiles = bitstreams.length > 1;\n }\n }\n }\n\n // If anything is going to be removed from the item as a result\n // of changing the answer to one of the questions, we need\n // to inform the user and make sure that's OK, before saving!\n if (willRemoveTitles || willRemoveDate || willRemoveFiles)\n {\n //save what we will need to prune to request (for UI to process)\n request.setAttribute(\"will.remove.titles\", Boolean.valueOf(willRemoveTitles));\n request.setAttribute(\"will.remove.date\", Boolean.valueOf(willRemoveDate));\n request.setAttribute(\"will.remove.files\", Boolean.valueOf(willRemoveFiles));\n\n return STATUS_VERIFY_PRUNE; // we will need to do pruning!\n }\n }\n\n // If step is complete, save the changes\n subInfo.getSubmissionItem().setMultipleTitles(multipleTitles);\n subInfo.getSubmissionItem().setPublishedBefore(publishedBefore);\n\n // \"Multiple files\" irrelevant in workflow mode\n if (!subInfo.isInWorkflow())\n {\n subInfo.getSubmissionItem().setMultipleFiles(multipleFiles);\n }\n\n // If this work has not been published before & no issued date is set,\n // then the assumption is that TODAY is the issued date.\n // (This logic is necessary since the date field is hidden on DescribeStep when publishedBefore==false)\n if(!publishedBefore)\n {\n Metadatum[] dateIssued = subInfo.getSubmissionItem().getItem()\n .getDC(\"date\", \"issued\", Item.ANY);\n if(dateIssued.length==0)\n {\n //Set issued date to \"today\" (NOTE: InstallItem will determine the actual date for us)\n subInfo.getSubmissionItem().getItem().addDC(\"date\", \"issued\", null, \"today\");\n }\n }\n\n // commit all changes to DB\n subInfo.getSubmissionItem().update();\n context.commit();\n\n return STATUS_COMPLETE; // no errors!\n }", "private void \n\tprocessPieceChecks() \n\t{\n\t\tif ( piece_check_result_list.size() > 0 ){\n\n\t\t\tfinal List pieces;\n\n\t\t\t// process complete piece results\n\n\t\t\ttry{\n\t\t\t\tpiece_check_result_list_mon.enter();\n\n\t\t\t\tpieces = new ArrayList( piece_check_result_list );\n\n\t\t\t\tpiece_check_result_list.clear();\n\n\t\t\t}finally{\n\n\t\t\t\tpiece_check_result_list_mon.exit();\n\t\t\t}\n\n\t\t\tfinal Iterator it = pieces.iterator();\n\n\t\t\twhile (it.hasNext()) {\n\n\t\t\t\tfinal Object[]\tdata = (Object[])it.next();\n\n\t\t\t\tprocessPieceCheckResult((DiskManagerCheckRequest)data[0],((Integer)data[1]).intValue());\n\n\t\t\t}\n\t\t}\n\t}", "private static CheckResult test6(String reply, String attach) {\n\n String[] blocks = reply.split(\"\\n(\\n+)?\\n\");\n\n if (blocks.length != 12) {\n return new CheckResult(false,\n \"Your program shows wrong blocks of output. Expected: 12\\n\" +\n \"You have: \" + blocks.length + \"\\n\" +\n \"Make sure that you print an empty line after each chosen action\");\n }\n\n String balanceAfterDownloadingPurchases = blocks[3];\n\n if (!balanceAfterDownloadingPurchases.replace(\",\", \".\").contains(\"785.64\")) {\n return new CheckResult(false,\n \"Your program reads balance from file wrong!\");\n }\n\n //All purchases list\n\n String allPurchases = blocks[6];\n\n String[] expectedPurchases = {\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\",\n \"Gildan LT $8.61\",\n \"Men's Dual Defense Crew Socks 12 Pairs $13.00\",\n \"Wrangler Men's Stretch Cargo Pant $19.97\",\n \"LEGO DUPLO Town Farm Animals $10.10\",\n \"Cinema $8.73\",\n \"Skate rental $30.00\",\n \"Sensodyne Pronamel Toothpaste $19.74\",\n \"Chick-fil-A $10 Gift Card $10.00\",\n \"Debt $3.50\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!allPurchases.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your all purchases list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n String[] temp = allPurchases.split(\"\\n\");\n String totalSum = temp[temp.length - 1];\n\n Pattern doublePattern = Pattern.compile(\"\\\\d+[,.]\\\\d+\");\n Matcher matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of all purchases is wrong. Expected:\\n\" +\n \"Total sum: $214.36\\n\" +\n \"Your output:\\n\" +\n totalSum);\n }\n\n double allTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(allTotalSum - 214.36) > 0.0001) {\n return new CheckResult(false,\n \"Your all total sum is wrong!\");\n }\n\n //Food list\n\n String foodList = blocks[8];\n\n expectedPurchases = new String[]{\n \"Almond 250g $35.43\",\n \"Milk $3.50\",\n \"Red Fuji Apple $5.99\",\n \"Eggs $3.99\",\n \"FIJI Natural Artesian Water $25.98\",\n \"Hershey's milk chocolate bars $8.54\",\n \"Great Value Broccoli Florets $1.00\",\n \"Keystone Ground Bee $6.28\"\n };\n\n for (String expectedPurchase : expectedPurchases) {\n if (!foodList.contains(expectedPurchase)) {\n return new CheckResult(false,\n \"Your food list doesn't have purchase:\\n\" +\n expectedPurchase + \"\\n\" +\n \"But should have!\");\n }\n }\n\n temp = foodList.split(\"\\n\");\n totalSum = temp[temp.length - 1];\n\n matcher = doublePattern.matcher(totalSum);\n\n if (!matcher.find()) {\n return new CheckResult(false,\n \"Total sum of food list is wrong. Expected:\\n\" +\n \"Total sum: $90.71\\n\" +\n \"Your output:\\n\" + totalSum);\n }\n\n double foodTotalSum = Double.parseDouble(matcher.group());\n\n if (Math.abs(foodTotalSum - 90.71) > 0.0001) {\n return new CheckResult(false,\n \"Your food total sum is wrong!\");\n }\n\n return new CheckResult(true);\n }", "public static void main(String[] args) {\n BaseballElimination division = new BaseballElimination(args[0]);\n for (String team : division.teams()) {\n if (division.isEliminated(team)) {\n StdOut.print(team + \" is eliminated by the subset R = { \");\n for (String t : division.certificateOfElimination(team)) {\n StdOut.print(t + \" \");\n }\n StdOut.println(\"}\");\n }\n else {\n StdOut.println(team + \" is not eliminated\");\n }\n }\n }", "public static void main(String[] args) {\n String adeViewRoot = args[1].trim();\n String filelistpath=args[0].trim();\n String[] files=FamilyModuleHelper.getFileList(filelistpath, adeViewRoot); \n String label = args[2].trim();\n String family = args[3];\n\n String release = FamilyModuleHelper.getRelease(label);\n\n int releaseNum;\n\n try {\n releaseNum = Integer.parseInt(release);\n //run votuing_v2 on R9 and R10 branch, votuning_v3 on R11+ branches\n if (releaseNum < 11){\n System.out.println(\"Running votuing_v2 scan.\");\n oracle.apps.votuning_v3.JarAnalyzerPMC.process(files, adeViewRoot, label, family);\n }\n else{\n System.out.println(\"R11+ branch found. Running votuing_v3 scan.\");\n oracle.apps.votuning_v4.JarAnalyzerPMC.process(files, adeViewRoot, label, family);\n }\n } catch (NumberFormatException e) {\n System.out.println(\"Could not determine release. Skipping VOTuning_V3 check...\");\n return;\n }\n\n }", "public static void main(String[] args) {\n int n = 0;\n String pass = \"\";\n Scanner scanner = new Scanner(System.in);\n\n n = scanner.nextInt();\n scanner.nextLine();\n pass = scanner.nextLine().toLowerCase();\n\n if (n > 100) {\n System.out.println(\"NO\");\n } else {\n System.out.println(check(n, pass));\n }\n\n }", "private static void processRequest(String userRequest) {\n String arguments = \"\";\n if (userRequest.split(\" \").length > 1) arguments = userRequest.split(\" \",2)[1];\n userRequest = userRequest.split(\" \")[0];\n if (userRequest.startsWith(\"?\")||userRequest.startsWith(\"help\")) printHelp();\n else if (userRequest.matches(\"bp\") && arguments.matches(\"[\\\\d+\\\\s*]+\")) setBreakPoint(arguments);\n else if (userRequest.matches(\"cs\")) printFunctionCalls();\n else if (userRequest.matches(\"delbp\") && arguments.matches(\"[\\\\d+\\\\s*]+\")) removeBreakPoint(arguments);\n else if (userRequest.matches(\"delbp\")) removeBreakPoint();\n else if (userRequest.matches(\"in\")) doUserRequestedStepType(\"into\");\n else if (userRequest.matches(\"listbp\")) showCurrentBreakPoints();\n else if (userRequest.matches(\"out\")) doUserRequestedStepType(\"out\");\n else if (userRequest.matches(\"over\")) doUserRequestedStepType(\"over\");\n else if (userRequest.matches(\"q\") || userRequest.matches(\"quit\")) exit();\n else if (userRequest.matches(\"s\")) doUserRequestedStepType(\"step\");\n else if (userRequest.matches(\"sc\")) displayXCode();\n else if (userRequest.matches(\"trace\") && arguments.matches(\"on|off\")) setTraceONOFF(arguments);\n else if (userRequest.matches(\"vs\")) displayVariables();\n else System.out.println(\"Sorry, I didnt understand the request. Enter '?' for help and a list of accepted commands.\");\n }", "@Test\r\n\tpublic void testDomainPruning() {\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\twhile(in.hasNext()){\n\t\t\tint n=Integer.parseInt(in.nextLine());\n\t\t\tString strIn=in.nextLine();\n\t\t\tString [] strs=strIn.split(\" \");\n\t\t\tint [] array=new int[strs.length];\n\t\t\tfor(int i=0;i<strs.length;i++){\n\t\t\t\tarray[i]=Integer.parseInt(strs[i]);\n\t\t\t}\n\t\t\tboolean b=canDevided(array,n);\n\t\t\tSystem.out.println(b);\n\t\t}\n\t\tin.close();\n\t}", "public interface IPruner\r\n{\r\n\t/**\r\n\t * This is the function that is responsible for calling the pruning algorithm. The algorithm\r\n\t * will hierarchically traverse through the architectural elements and discover which elements\r\n\t * are not linked up to architecture and need to be \"pruned.\" All elements in the document\r\n\t * are cloned before pruning so that the original document is not altered. The result is a document\r\n * containing only the structures and types used in the architecture. Additionally, the pruner \r\n * removes any version graph whose internal nodes are not referenced by any type included in the \r\n * selected architecture.\r\n\t *\r\n\t * @param archURI \t\tThis is the URL of the xADL document that needs to be pruned\r\n\t * @param targetArchURI This is the URL of the new xADL document that will be created and store the pruned architecture\r\n\t * @param startingID \tThis is the ID of the element that the pruning algorithm should start from\r\n\t * @param isStructural \tIf this is true then the startingID is that of an archStruct, otherwise it is an\r\n\t *\t\t\t\t\t\t\tID to a type\r\n\t *\r\n\t * @throws InvalidURIException \t\t\tIf the provided URL to open an xArch document is invalid\r\n\t * @throws InvalidElementIDException \tIf the provided starting ID is invalid\r\n\t * @throws MissingElementException\t\tIf an expected element is missing\r\n\t * @throws MissingAttributeException\tIf an expected attribute on an element is missing\r\n\t * @throws BrokenLinkException\t\t\tIf a link between elements does not match up or exist\r\n\t */\t\r\n\tpublic void prune(String archURI, String targetArchURI, String startingID, boolean isStructural)\r\n\t\tthrows InvalidURIException, InvalidElementIDException, MissingElementException, \r\n\t\t\t\tMissingAttributeException, BrokenLinkException;\r\n}", "public static void main(String[] args) {\n\r\n\t\tchecker(\"email\",\"[email protected]\");\r\n\t\tchecker(\"number\",\"573-631-6423\");\r\n\t\tchecker(\"name\",\"Mary Ann\");\r\n\t\tchecker(\"email\",\"[email protected]\");\r\n\t\tchecker(\"email\",\"devin.king@@infosys.com\");\r\n\t\tchecker(\"email\",\"[email protected]\");\r\n\t\tchecker(\"email\", \"[email protected]\");\r\n\t\tchecker(\"email\", \"[email protected]\");\r\n\t\tchecker(\"email\", \"[email protected]\");\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext()) {\n\t\t\tString ip = scanner.nextLine();\n\t\t\tcheckIP(ip);\n\t\t}\n\t\tSystem.out.println(a + \" \" + b + \" \" + c + \" \" + d + \" \" + e + \" \" + err + \" \" + own);\n\t\tscanner.close();\n\t}", "@Test\n @Ignore\n public void main() throws ParsingException\n {\n PolicyFinder finder = new PolicyFinder();\n\n List<Document> policyList = new ArrayList<>();\n\n // TODO load the policy documents from Configuration (or classload in this case)\n\n InMemoryPolicyFinderModule mem = new InMemoryPolicyFinderModule(policyList);\n\n Set<PolicyFinderModule> policyModules = new HashSet<>();\n policyModules.add(mem);\n\n finder.setModules(policyModules);\n\n Balana balana = Balana.getInstance();\n PDPConfig pdpConfig = balana.getPdpConfig(); // This only has defaults, since we didn't load a PDPConfigFile\n pdpConfig = new PDPConfig(pdpConfig.getAttributeFinder(), finder, pdpConfig.getResourceFinder(), true);\n\n PDP pdp = new PDP(pdpConfig);\n\n String requestXml = \"\"; // TODO load\n\n AbstractRequestCtx requestCtx = RequestCtxFactory.getFactory().getRequestCtx(requestXml);\n\n ResponseCtx responseCtx = pdp.evaluate(requestCtx);\n }", "public void pruneDocuments(String pruner, float pruner_param) {\n\n // After pruning, make sure have max(RetrievalEnvironment.mCascade_K, |retained docs|)\n // documents!\n\n int[] mDocSet_tmp = new int[mDocSet.length];\n float[] accumulated_scores_tmp = new float[accumulated_scores.length];\n\n int retainSize = 0;\n\n if (pruner.equals(\"score\")) {\n float max_score = accumulated_scores[0];\n float min_score = accumulated_scores[accumulated_scores.length - 1];\n\n float score_threshold = (max_score - min_score) * pruner_param + min_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"mean-max\")) {\n float max_score = accumulated_scores[0];\n float mean_score = 0;\n for (int j = 0; j < accumulated_scores.length; j++) {\n mean_score += accumulated_scores[j];\n }\n mean_score = mean_score / (float) accumulated_scores.length;\n float score_threshold = pruner_param * max_score + (1.0f - pruner_param) * mean_score;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n if (score_threshold <= accumulated_scores[i]) {\n retainSize++;\n } else {\n break;\n }\n }\n } else if (pruner.equals(\"rank\")) {\n // if pruner_param = 0.3 --> remove bottom 30% of the docs!\n retainSize = (int) ((1.0 - pruner_param) * ((double) (mDocSet.length)));\n } else if (pruner.equals(\"z-score\")) {\n // compute mean\n float avgScores = 0.0f;\n\n for (int i = 0; i < accumulated_scores.length; i++) {\n avgScores += accumulated_scores[i];\n }\n avgScores = avgScores / (float) accumulated_scores.length;\n\n // compute variance\n float variance = 0.0f;\n for (int i = 0; i < accumulated_scores.length; i++) {\n variance += (accumulated_scores[i] - avgScores) * (accumulated_scores[i] - avgScores);\n }\n float stddev = (float) Math.sqrt(variance);\n\n float[] z_scores = new float[accumulated_scores.length];\n for (int i = 0; i < z_scores.length; i++) {\n z_scores[i] = (accumulated_scores[i] - avgScores) / stddev;\n }\n } else {\n throw new RetrievalException(\"PruningFunction \" + pruner + \" is not supported!\");\n }\n\n if (retainSize < mK) {\n if (mDocSet.length >= mK) {\n retainSize = mK;\n } else if (mK != defaultNumDocs) {\n // When training the model, set the # output docs large on purpose so that output size =\n // retained docs size\n\n retainSize = mDocSet.length;\n }\n }\n\n if (retainSize > mDocSet.length) {\n retainSize = mDocSet.length;\n }\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet_tmp[i] = mDocSet[i];\n accumulated_scores_tmp[i] = accumulated_scores[i];\n }\n mDocSet = new int[retainSize];\n accumulated_scores = new float[retainSize];\n\n for (int i = 0; i < retainSize; i++) {\n mDocSet[i] = mDocSet_tmp[i];\n accumulated_scores[i] = accumulated_scores_tmp[i];\n }\n\n }", "public static void main(String[] args){\n\t\tFile file = new File(\"C:\\\\Users\\\\Ezra Newman\\\\IdeaProjects\\\\Chordette\\\\src\\\\Extracted\");\n\t\t//List of all files and directories\n\t\tlistOfFiles(file);\n\t\tSystem.out.println(counter);\n\t\tSystem.out.println(filter);\n\t\tScanner scanner = new Scanner(System.in); // Create a Scanner object\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Password\");\n\n\t\t\tString pass = scanner.nextLine(); // Read user input\n\t\t\tSystem.out.println(filter.contains(pass) ? \"You have been hacked.\" : \"You haven't been hacked\"); // Output user input\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tinputInstance = Input.getInputInstance();\n\t\tinputInstance.validateInputURL(args);\n\t\t\n\t\t/*\n\t\t * Get the HTML document using the Jsoup library\n\t\t */\n\t\thtmlParser = HTMLParser.getHTMLParser();\n\t\thtmlParser.setURL(inputInstance.getURL());\n\t\thtmlParser.parse();\n\t\tDocument doc = htmlParser.getDocument();\n\t\t\n\t\t/*\n\t\t * Parse document for the stop and candidate words, get the count and display relevant\n\t\t * words accordingly.\n\t\t */\n\t\twordsParser = WordsParser.getWordsParser();\n\t\twordsParser.setDocument(doc);\n\t\twordsParser.parse();\n\t\tint maxDisplayCount = inputInstance.acceptMaximumDisplayCount();\n\t\twordsParser.displayRelevantTopics(maxDisplayCount);\n\n\t}", "public static void PaladinPruning(GatorDot2C myGator, ADAI2Dot myADAI) {\n\t\tHashMap<String, GatorDot2C.vertex> GatorBoxes = myGator.Boxes;\n\t\tHashSet<String> GatorActivity = new HashSet<String>();\n\t\tfor (Map.Entry<String, GatorDot2C.vertex> entry: GatorBoxes.entrySet()){\n\t\t\tString currentActivity = entry.getValue().act;\n\t\t\tif (!GatorActivity.contains(currentActivity)) {\n\t\t\t\tGatorActivity.add(currentActivity);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"=============\");\n\t\t\n\t\tLinkedList<ADAI2Dot.PathTree> PaladinPaths = myADAI.graphPaths;\n\t\tSystem.out.println(PaladinPaths.size());\n\t\t\n\t\tIterator<ADAI2Dot.PathTree> iter = PaladinPaths.iterator();\n\t\twhile (iter.hasNext()){\n\t\t\tADAI2Dot.PathTree currentPath = iter.next();\n\t\t\tString srcAct = currentPath.src;\n\t\t\tString tgtAct = currentPath.tgt;\n\t\t\tif (!GatorActivity.contains(srcAct) || !GatorActivity.contains(tgtAct)) {\n\t\t\t\titer.remove();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"After Cleaning\");\n\t\tSystem.out.println(PaladinPaths.size());\n\t\tSystem.out.println(\"=============\");\n\t\t\n\t\t// Find edges only between different activities\n\t\tint number = 0;\n\t\titer = PaladinPaths.iterator();\n\t\twhile (iter.hasNext()){\n\t\t\tADAI2Dot.PathTree currentPath = iter.next();\n\t\t\tString srcAct = currentPath.src;\n\t\t\tString tgtAct = currentPath.tgt;\n\t\t\tif (!srcAct.equals(tgtAct)) {\n\t\t\t\tnumber ++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"current connected edges \" + number);\n\t\tSystem.out.println(\"=============\");\n\t\t\n\t\tHashMap<String, Integer> PaladinActivity = myADAI.Activities;\n\t\tIterator<Map.Entry<String, Integer>> iter2 = PaladinActivity.entrySet().iterator();\n\t\twhile (iter2.hasNext()){\n\t\t\tMap.Entry<String, Integer> entry = iter2.next();\n\t\t\tif (!GatorActivity.contains(entry.getKey())) {\n\t\t\t\titer2.remove();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private Set<Integer> prune(Regex r) throws IOException{\n QueryConversionSideEffect sideEffect = new QueryConversionSideEffect();\n NFA nfa = RegexToNFAConverter.convert(r, sideEffect);\n // Now recursively prune\n return recursivePrune(r,sideEffect.getMap());\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint unos = 1;\n\t\twhile (unos != 0) {\n\n\t\t\tSystem.out.println(\"Unesite broj\");\n\t\t\tunos = in.nextInt();\n\t\t\tif (unos == 0) {\n\t\t\t\tSystem.out.println(\"Unijeli ste nulu, prekid programa\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Unesite parnost ( true za paran ) ili ( false za neparan)\");\n\t\t\tboolean parnost = in.nextBoolean();\n\n\t\t\tif (parnost) {\n\t\t\t\tpodBroj(unos, true);\n\t\t\t}\n\t\t\tif (!parnost) {\n\t\t\t\tpodBroj(unos, false);\n\t\t\t}\n\t\t}\n\t}", "private void handleVerify(boolean isDoubleVerify) {\n if (listVerifyResult.isEmpty()) {\n return;\n }\n\n // Extract zip file input\n String folderSaveResult = helper.getFolderSave(\"Choose extract folder zip files\");\n if (folderSaveResult.isEmpty() || folderSaveResult == null) {\n return;\n }\n\n boolean usingInputKey = this.gui.getCheckboxVerify().isSelected();\n\n for (ModelResult modelResult : listVerifyResult) {\n int id = modelResult.getId();\n long startVerify = System.nanoTime();\n updateVerifyFileStatus(\"Unzip file...\", 0, id);\n String fileNameNoEx = helper.getFileNameNoExtension(modelResult.getFileName());\n // Unzip file\n String unzipedFolder = folderSaveResult + \"\\\\\" + fileNameNoEx;\n modelResult.setFolderRS(unzipedFolder);\n boolean unzipRs = helper.unZip(modelResult.getFilePath(), unzipedFolder);\n\n if (unzipRs) {\n updateVerifyFileStatus(\"Unzip file successfully\", 0, id);\n } else {\n updateVerifyFileStatus(\"Unzip file failed\", 0, id);\n return;\n }\n\n // Read Input Files from unzip folder\n ModelInputVerify miv = helper.readInputVerify(unzipedFolder);\n if (miv == null || miv.getPublickey().isEmpty() && usingInputKey) {\n updateVerifyFileStatus(\"Public key from input not found\", 0, id);\n return;\n }\n\n ModelFriendKey mFriendKey = null;\n if (usingInputKey) {\n mFriendKey = new ModelFriendKey(\"\", miv.getPublickey(), \"\");\n mFriendKey.setAlgorithm(miv.getPublickeyAlgorithm());\n } else {\n String frKeyNameSelected = String.valueOf(gui.getCbbFriendKeyVerify().getSelectedItem());\n mFriendKey = friendKey.get(frKeyNameSelected);\n\n if (mFriendKey == null) {\n updateVerifyFileStatus(\"Friend key not found\", 0, id);\n return;\n }\n\n }\n\n String hash = miv.getSignatureHashAlgorithm();\n String cryptoAlgorithm = mFriendKey.getAlgorithm();\n String algorithm = hash + \"with\" + cryptoAlgorithm;\n\n if (hash.equals(\"SHA512\") && cryptoAlgorithm.equals(\"DSA\")) {\n updateVerifyFileStatus(cryptoAlgorithm + \" is Not support \" + hash + \" algorithm\", 0, id);\n return;\n }\n\n boolean verifyRs = false;\n\n if (!isDoubleVerify) {\n verifyRs = Verify(miv.getFilePath(), miv.getSignature(), mFriendKey, algorithm);\n } else {\n verifyRs = VerifyDoubleSign(miv.getFilePath(), miv.getSignature(), mFriendKey, algorithm);\n }\n\n long endTime = System.nanoTime();\n long duration = (endTime - startVerify) / 1000000; //divide by 1000000 to get milliseconds.\n if (verifyRs) {\n updateVerifyFileStatus(\"File Valid\", (int) duration, id);\n } else {\n updateVerifyFileStatus(\"File Invalid\", (int) duration, id);\n }\n }\n }", "public String deleteDegreePlan(String object, String data) {\n\n try {\n\n String[] objects = object.split(Constants.Object_SPLIT);\n String checkbox = objects[0];\n String delete_img = objects[1];\n\n String is_Element_Present = new KeywordEventsUtill().findElement(checkbox, data);\n if (is_Element_Present.contains(\"PASS\")) {\n new KeywordEventsUtill().checkCheckBox(checkbox, data);\n WebElement ele = wait.until(explicitWaitForElement(By.xpath(OR.getProperty(delete_img))));\n ele.click();\n new KeywordEventsUtill().isAlertAccept(\"\", \"\");\n // Thread.sleep(3000);\n if (new KeywordEventsUtill().isWebElementPresent(\"form_used_error_txt\", data).contains(\"PASS\")) {\n if (driver.findElements(By.linkText(OR.getProperty(\"first_link\"))).size() > 0) {\n driver.findElement(By.linkText(OR.getProperty(\"first_link\"))).click(); \n }\n return Constants.KEYWORD_FAIL + \" this form is being used, so it can't be removed. Choose different form\";\n } else {\n if (driver.findElements(By.linkText(OR.getProperty(\"first_link\"))).size() > 0) {\n driver.findElement(By.linkText(OR.getProperty(\"first_link\"))).click(); \n }\n return Constants.KEYWORD_PASS + \" Form has been removed\";\n }\n } else {\n if (driver.findElements(By.linkText(OR.getProperty(\"first_link\"))).size() > 0) {\n driver.findElement(By.linkText(OR.getProperty(\"first_link\"))).click(); \n }\n return Constants.KEYWORD_PASS + \" form has been removed\";\n }\n }\ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n catch (Exception e) {\n \n return Constants.KEYWORD_FAIL + \"-\" + e.getMessage();\n\n }\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning(1279);\n // Undeclared exception!\n try { \n naiveBayesMultinomialText0.pruneDictionary();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.bayes.NaiveBayesMultinomialText\", e);\n }\n }", "private void eliminate() {\n\t\t// when the election is not closed,\n\t\ttry{\n\t\t\tMap<String,Integer> results = election.getResultsFromPolls();\n\t\t\tList<Map.Entry<String,Integer>> entryList = new ArrayList(results.entrySet());\n\n\t\t\tCollection<Integer> values = results.values();\n\t\t\tint totalVotes = 0;\n\n\t\t\tfor(Integer i:values){\n\t\t\t\ttotalVotes += i;\n\t\t\t}\n\n\t\t\tif(entryList.get(entryList.size()-1).getValue()/(double)totalVotes > 0.5) {\n\t\t\t\t// when the election already has a winner,\n\t\t\t\tSystem.out.println(\"A candidate already has a majority of the votes.\");\n\t\t\t\tSystem.out.println(\"You cannot remove any more candidates.\");\n\t\t\t}else {\n\n\t\t\t\t// when we can eliminate a candidate,\n\t\t\t\tSystem.out.println(\"Eliminating the lowest-ranked candidate.\");\n\t\t\t\tList lowestCans = new ArrayList();\n\t\t\t\tlowestCans.add(entryList.get(0).getKey());\n\t\t\t\tint i = 1;\n\t\t\t\twhile (i<entryList.size() && entryList.get(i).getValue() == entryList.get(0).getValue() ){\n\t\t\t\t\tlowestCans.add(entryList.get(i).getKey());\n\t\t\t\t\ti++;\n\t\t\t\t}\n\n\t\t\t\tif (lowestCans.size() >1) {\n\t\t\t\t\tCollections.sort(lowestCans);\n\t\t\t\t\tCollections.reverse(lowestCans);\n\t\t\t\t}\n\t\t\t\t\telection.eliminateCandidateWithName((String) lowestCans.get(0));\n\n\t\t\t\tSystem.out.println(\"Eliminated \"+lowestCans.get(0)+\".\");\n\t\t\t}\n\n\t\t}catch(UnsupportedOperationException uso){\n\t\t\tSystem.out.println(\"The election is still open for votes.\");\n\t\t\tSystem.out.println(\"You must close the election before eliminating candidates.\");\n\t\t}\n\n\t}", "public static void main(String[] args) {\n Identification identification1 = new IdentificationGermany(\"ABC.203948ASFJH\");\n Identification identification2 = new IdentificationGermany(\"XYA-LKJASD\");\n Identification identification3 = new IdentificationGermany(\"12345678\");\n\n Identification identification4 = new IdentificationNetherlands(\"12345678\");\n Identification identification5 = new IdentificationNetherlands(\"123409\");\n Identification identification6 = new IdentificationNetherlands(\"ASBCLKJS\");\n\n validate(identification1);\n validate(identification2);\n validate(identification3);\n validate(identification4);\n validate(identification5);\n validate(identification6);\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning((-1));\n naiveBayesMultinomialText0.pruneDictionary();\n assertEquals((-1), naiveBayesMultinomialText0.getPeriodicPruning());\n }", "public void toCheckOut(String newCommand){\n if (this.serveOrNot == false ){\n this.println(\"Please serve first!\");\n }\n else if(this.searchOrNot == false){\n this.println(\"Please search first!\");\n }\n else{\n String bookNumbers = newCommand.substring(8).trim();\n if (bookNumbers.length() == 0){\n this.println(\"Please enter the book number to check out!\");\n }\n else{\n String[] bookNumberList = bookNumbers.split(\",\");\n //check see if the numberlist is out of range or not, if everything is correct, within the checkNum function, we implement checkOut\n if (bookNumberList.length <= 3){\n checkNum(bookNumberList, false);\n }\n else{\n this.println(\"No more than 3 books at a time!!!\");\n }\n }\n this.println(printPatronInfo());\n }\n \n }", "public void process(String line) {\n String checkResult = \"\";\n checkResult = CheckIBAN.process(line\n .replaceAll(\"\\\\W\", \"\")\n .toUpperCase()\n );\n System.out.println(line + \" \" + checkResult);\n }", "@Override\n\tpublic void runPrune(PruneSetting pSetting) throws Exception {\n\n\t}", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(br.readLine(), \" \");\n\t\tint tc = Integer.parseInt(st.nextToken());\n\t\tint n, half, remainder;\n\t\tint[] answer = new int[2];\n \t\tboolean[] primes = filterPrime();\n\t\tCollections.sort(primeList);\n\t\tfor (int t = 0; t < tc; t++) {\n\t\t\tst = new StringTokenizer(br.readLine(), \" \");\n\t\t\tn = Integer.parseInt(st.nextToken());\n\t\t\thalf = n / 2;\n\t\t\tfor (int num : primeList) {\n\t\t\t\tif (num > half) break;\n\t\t\t\tremainder = n - num;\n\t\t\t\tif (primes[remainder]) continue;\n\t\t\t\tanswer[0] = num;\n\t\t\t\tanswer[1] = remainder;\n\t\t\t}\n\t\t\tfor (int ans : answer) {\n\t\t\t\tSystem.out.print(ans + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws Exception {\n\tPhishTankBlackList.main(args);\n\tstr=PhishTankBlackList.url();\n\tString mstr=str;\n\tmstr = mstr.replaceAll(\"http://www.\",\"\");\n\tmstr = mstr.replaceAll(\"http://\",\"\");\n\tmstr = mstr.replaceAll(\"https://www.\", \"\");\n\tmstr = mstr.split(\".com\")[0];\n\tmstr = mstr.split(\".in\")[0];\n\tmstr = mstr.split(\".net\")[0];\n\tmstr = mstr.split(\".org\")[0];\n\tmstr = mstr.split(\".uk\")[0];\n\tmstr = mstr.split(\".eu\")[0];\n\tmstr = mstr.split(\".ac.in\")[0];\n\tSystem.out.println(mstr);\n\tint fullLength = mstr.length();\n\tString modifiedString = mstr.replaceAll(\"\\\\p{Punct}\",\"\");\n\tint modStringLength = modifiedString.length();\n\tint numberOfSpecialChars = fullLength - modStringLength;\n\t//number of tokens in domain\n\tSystem.out.println(\"The number of tokens in the domain are\");\n\t\n\tSystem.out.println(numberOfSpecialChars);\n\tSystem.out.println(\"\");\n\tif(numberOfSpecialChars>3)\n\tSystem.out.println(\"Probably Phishing site\");\n\t\n\t\n\t\n\t\n\t//number of dots in domain\n\t\n int ctr=0;\n\tString newstr=mstr;\n\t\t\tfor(int i=0;i<newstr.length();i++)\n\t\t\t{ if(newstr.charAt(i)=='.')\n\t\t\t {ctr = ctr+1;}}\n\t\t\tSystem.out.println(\"number of dots in the domain of the URL\");\n\t\t\tSystem.out.println(ctr);\n\t\t\tif(ctr>=4)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Probably Phishing\");\n\t\t\t}\n\t\t\t/*ctr=0;\nmstr=mstr.replaceAll(\".\", \"\");\n\t\t String sb=mstr;\n\t\t \n\t\t sb.toCharArray();\n\t\t for(int i=0;i<sb.length();i++)\n\t\t {\n\t\t \n\t\t ctr=ctr+1;\n\t\t }\n\t\t System.out.println(\"The digits present in the domain\");\n\t\t System.out.println(ctr);\n\t\t \n\t\t \n\t\t if(ctr>4)\n\t\t {\n\t\t \tSystem.out.println(\"Probably Phishing\");\n\t\t }}\n\t\t \n\n\n\t\t\t */\n\t\t\t}", "public static void main(String[] args) throws IOException {\n readCandidateName(\"/Users/macos/stv/Ballet/src/candidates.txt\");\n printCandidates();\n arrangeVoteStructure();\n outputVotes();\n System.out.println(\"Please enter the vote preference as a sequence: > \");\n }", "public void evaluate_anti_fixedpoint() {\n // DES_action_type = 0;\n // JOptionPane.showMessageDialog(null, \"Evaluating the Anti-FP && Action-Type = \" +\n // DES_action_type);\n int[] last2_anti_fixedpoint_rounds = new int[64];\n for (int i = 0; i < 32; i++) {\n last2_anti_fixedpoint_rounds[i] = DES_anti_fixedpoint_sequence[9][i];\n last2_anti_fixedpoint_rounds[32 + i] = DES_anti_fixedpoint_sequence[8][i];\n }\n DES_anti_fixedpoint = select(last2_anti_fixedpoint_rounds, FP);\n\n for (int i = 0; i < 64; i++)\n DES_anti_fixedpoint[i] = 1 ^ DES_anti_fixedpoint[i];\n }", "public void run() {\n\n ui.startDuke();\n storage.readFile(lists, ui);\n\n Scanner reader = new Scanner(System.in);\n\n while (true) {\n\n String inp = reader.nextLine();\n parse.checkInstruction(inp, storage, ui, lists, tasks);\n }\n }", "static void perform_rp(String passed){\n\t\tint type = type_of_rp(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\treturn_not_sign(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "private void cleanParameters(HttpRequestResponse requestResponseToClean) {\n IRequestInfo rinfo =\n ExtensionState.getCallbacks().getHelpers().analyzeRequest(requestResponseToClean.getRequest());\n ArrayList<IParameter> rParams = (ArrayList<IParameter>) rinfo.getParameters();\n\n for (IParameter rParam : rParams) {\n ExtensionState.getCallbacks().printOutput(rParam.getValue());\n double entropy =\n ExtensionState.getShannonEntropy(rParam.getValue());\n ExtensionState.getCallbacks().printOutput(\"Entropy: \" + entropy);\n if (entropy > ExtensionState.getInstance().getParameterEntropyLevel()) {\n Parameter parameter = new Parameter(rParam);\n parameter.setValue(\"redacted\");\n requestResponseToClean.setCleanedRequest(ExtensionState.getCallbacks().getHelpers().updateParameter(requestResponseToClean.getCleanedRequest(), parameter));\n }\n }\n }", "@Override\n\tpublic void runPrune(String forumPath) throws Exception {\n\n\t}", "static void backtocheckpoint1_version2() {\n System.out.println(\"You arrived to the main entrance of challenge 1... Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n if (strings.contains(\"n\")) {\n System.out.println(\"It's not an option\"); \n backtocheckpoint1_version2();\n }else if (strings.contains(\"y\")) { \n Door2challenge();\n }else {\n System.out.println(\"I don't understand...type it correctly\");\n backtocheckpoint1_version2();//in case the player types something else that the system can't read\n }\n \n \n \n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "public void delete() {\n boolean validate = true;\n code = \"\";\n System.out.print(\"Product code to delete: \");\n while (validate) {\n code = s.nextLine();\n if (Validation.validateString(code)) {\n tree.delete(code);\n validate = false;\n } else {\n System.err.println(\"Code must be required!\");\n System.err.print(\"Enter product code again: \");\n }\n }\n }", "public void v_Verify_Guest8_Hidden(){\n\t}", "public static void main(String[] args) throws IOException {\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tString input = \"\";\n\t\tdo {\n\t\t\tSystem.out.println(\"Page Replacement Algorithms:\\n\"\n\t\t\t\t\t+ \"1. FIFO with file input\\n\"\n\t\t\t\t\t+ \"2. LRU with file input\\n\"\n\t\t\t\t\t+ \"3. Optimal Algorithm with file input\\n\"\n\t\t\t\t\t+ \"4. FIFO, LRU, Optimal Algorithm with randomly generated input\\n\"\n\t\t\t\t\t+ \"5. Exit\");\n\t\t\tinput = keyboard.next();\n\t\t\tif(Integer.parseInt(input) == 1) {\n\t\t\t\tfirstInFirstOut();\n\t\t\t} else if(Integer.parseInt(input) == 2) {\n\t\t\t\tleastRecentlyUsed();\n\t\t\t} else if(Integer.parseInt(input) == 3) {\n\t\t\t\toptimalAlgorithm();\n\t\t\t} else if(Integer.parseInt(input) == 4) {\n\t\t\t\trandomlyGeneratedInput();\n\t\t\t} else if(Integer.parseInt(input) == 5) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} while(!input.matches(\"5\"));\n\t\tkeyboard.close();\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tPriorityQueue<record> pq = new PriorityQueue<>();\r\n\r\n\t\tSystem.out.println(\"Enter number of entries\");\r\n\t\tint num = scn.nextInt();\r\n\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tString option = scn.next();\r\n\r\n\t\t\tif (option.equals(\"SERVED\")) {\r\n\t\t\t\tpq.remove();\r\n\t\t\t} else {\r\n\t\t\t\tString name = scn.next();\r\n\t\t\t\tfloat cgpa = scn.nextFloat();\r\n\t\t\t\tint token = scn.nextInt();\r\n\r\n\t\t\t\trecord new_record = new record(name, cgpa, token);\r\n\t\t\t\tpq.add(new_record);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (pq.size() == 0) {\r\n\t\t\tSystem.out.println(\"EMPTY\");\r\n\t\t}else{\r\n\t\t\twhile (pq.size() > 0) {\r\n\t\t\t\tSystem.out.println(pq.remove().name);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args){\n //a\n /*HCTree hct=new HCTree(\"../HCT/huff_test_mssg.txt\",\"../HCT/test_key.txt\");\n hct.buildTreeFromMessage();*/\n //b\n HCTree hct=new HCTree(\"../HCT/huff_test_mssg.txt\",\"../HCT/test_key.txt\",\"../HCT/huff_test_tree_clean.txt\");\n hct.verify();\n }", "public void v_Verify_Guest3_Hidden(){\n\t}", "@Override\n public List<IEpisode> prune(List<IEpisode> candidates, IObserver observer, \n SessionInfo session)\n {\n if (DEBUG) { \n System.out.println(\"NegativeStrengthThreshold: pruning episodes base on individual predictions\");\n System.out.println(\"NegativeStrengthThreshold: start count ->\" + candidates.size());\n } \n observer.setExtent( candidates.size() );\n observer.startup();\n IEventDataStream sequence = session.getSequence();\n for (ListIterator<IEpisode> li = candidates.listIterator(); li.hasNext(); ) \n {\n IEpisode episode = li.next();\n if (episode.size() == 1) return candidates;\n \n if (DEBUG)\n {\n System.out.println(episode.toString(sequence.getEventFactor()) + \n \" : \" + episode.getVoteString() + \" < \" + episode.getRequiredVoteString());\n }\n \n boolean flag = false;\n for(int index = 0; index < session.getSegIndexLen(); index++)\n {\n if (episode.getVotes(index) > episode.getRequiredVotes(index))\n {\n flag = true;\n break;\n }\n }\n if (flag)\n {\n li.remove();\n }\n if (observer.update(li.nextIndex())) break;\n }\n observer.shutdown();\n if (DEBUG) System.out.println(\"NegativeStrengthThreshold: final count ->\" + candidates.size());\n return candidates;\n }", "public void v_Verify_Guest10_Hidden(){\n\t}", "public static void main (String[] args) {\n\t\tDocument doc = new Document(\", [email protected] (Daniel Kolle)\");\n\t\ttokenize (doc, doc.fullSpan());\n\t\tString[] tokens = gatherTokenStrings (doc, doc.fullSpan());\n\t\tif (tokens.length == 8 &&\n\t\t tokens[0].equals(\"'\") &&\n\t\t tokens[1].equals(\"grishman ... @cs.nyu.edu\") &&\n\t\t tokens[2].equals(\"'\") &&\n\t\t tokens[3].equals(\"sold\") &&\n\t\t tokens[4].equals(\"$\") &&\n\t\t tokens[5].equals(\"3,100\") &&\n\t\t tokens[6].equals(\"shares\") &&\n\t\t tokens[7].equals(\".\"))\n\t\t\tSystem.out.println (\"Tokenizer validation succeeds.\");\n\t\telse\n\t\t\tSystem.out.println (\"Tokenizer validation fails.\");\n\t\t\tfor (int i=0; i<tokens.length; i++)\n\t\t\t\tSystem.out.println (\" tokens[\" + i + \"] = \" + tokens[i]);\n\t}", "public boolean process(Patient patient) {\n By SPNB_LATERALITY_OF_PNB_RADIO_LEFT_LABEL = By.xpath(\"//*[@id='painNoteForm:primarySpnb:blockLateralityDecorate:blockLaterality']/tbody/tr/td[1]/label\");\n By SPNB_LATERALITY_OF_PNB_RADIO_RIGHT_LABEL = By.xpath(\"//*[@id='painNoteForm:primarySpnb:blockLateralityDecorate:blockLaterality']/tbody/tr/td[2]/label\");\n By SPNB_ADDITIONAL_BLOCK_RADIO_YES_LABEL = By.xpath(\"//*[@id='painNoteForm:primarySpnb:primarySpnbDecorator:secondaryBlockInd']/tbody/tr/td[1]/label\");\n By SPNB_ADDITIONAL_BLOCK_RADIO_NO_LABEL = By.xpath(\"//*[@id='painNoteForm:primarySpnb:primarySpnbDecorator:secondaryBlockInd']/tbody/tr/td[2]/label\");\n\n\n if (!Arguments.quiet) System.out.println(\" Processing Single Peripheral Nerve Block at \" + LocalTime.now() + \" for patient\" +\n (patient.patientSearch.firstName.isEmpty() ? \"\" : (\" \" + patient.patientSearch.firstName)) +\n (patient.patientSearch.lastName.isEmpty() ? \"\" : (\" \" + patient.patientSearch.lastName)) +\n (patient.patientSearch.ssn.isEmpty() ? \"\" : (\" ssn:\" + patient.patientSearch.ssn)) + \" ...\"\n );\n //\n // Find and click on the procedure notes tab, and wait for it to finish before trying to add any values to the fields.\n // There are often timing problems in this section. This should be reviewed.\n //\n logger.fine(\"\\tSinglePeripheralNerveBlock.process(), Will look for procedure notes tab, and then click on it\");\n try {\n WebElement procedureNotesTabElement = Utilities.waitForVisibility(procedureNotesTabBy, 10, \"SinglePeripheralNerveBlock.process()\");\n procedureNotesTabElement.click();\n procedureNotesTabElement.click(); // how about a second click? Help make it appear?\n //(new WebDriverWait(Driver.driver, 4)).until(Utilities.isFinishedAjax()); // screws stuff up now? If super slow, no\n }\n catch (StaleElementReferenceException e) {\n logger.fine(\"SinglePeripheralNerveBlock.process(), failed to get the Procedure Notes tab and click it. Unlikely. Exception: \" + Utilities.getMessageFirstLine(e));\n String fileName = ScreenShot.shoot(\"Error-\" + this.getClass().getSimpleName());\n if (!Arguments.quiet) System.out.println(\" Wrote error screenshot file \" + fileName);\n return false;\n }\n catch (Exception e) {\n logger.fine(\"SinglePeripheralNerveBlock.process(), failed to get the Procedure Notes tab and click it. Unlikely. Exception: \" + Utilities.getMessageFirstLine(e));\n String fileName = ScreenShot.shoot(\"Error-\" + this.getClass().getSimpleName());\n if (!Arguments.quiet) System.out.println(\" Wrote error screenshot file \" + fileName);\n return false; // fails after \"Note(s) successfully created!\", I think.\n }\n // The clickTab above restructures the DOM and if you go to the elements on the page too quickly\n // there are problems. So check that the target section is refreshed.\n try {\n Utilities.waitForRefreshedVisibility(procedureSectionBy, 10, \"SinglePeripheralNerveBlock, procedure section\");\n logger.fine(\"SinglePeripheralNerveBlock.process(), I guess we found the procedure section.\");\n }\n catch (Exception e) {\n logger.fine(\"SinglePeripheralNerveBlock.process(), Did not find the procedure section. Exception caught: \" + Utilities.getMessageFirstLine(e));\n return false; // fails:1 (at first startup) Sometimes it's just not there. Maybe you have to click twice?\n }\n // What's diff between previous and next section?\n String procedureNoteProcedure = \"Single Peripheral Nerve Block\";\n Utilities.sleep(1555, \"SPNB.process(), about to do dropdown to select procedure\");\n try {\n procedureNoteProcedure = Utilities.processDropdown(selectProcedureDropdownBy, procedureNoteProcedure, this.randomizeSection, true);\n }\n catch (Exception e) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), unable to select procedure note procedure. e: \" + e.getMessage()); ScreenShot.shoot(\"SevereError\");\n return false;\n }\n if (procedureNoteProcedure == null) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), unable to get procedure Note Procedure. Got null back.\"); ScreenShot.shoot(\"SevereError\");\n return false;\n }\n //(new WebDriverWait(Driver.driver, 10)).until(Utilities.isFinishedAjax()); // does this screw stuff up now too?\n Utilities.sleep(3555, \"SPNB.process(), about to wait for spnb section to show up\"); // nec? Perhaps essential for now. Was 2555\n\n try {\n// Utilities.waitForVisibility(singlePeripheralSectionBy, 2, \"SinglePeripheralNerveBlock.process()\");\n // Next line new 4/30/19\n Utilities.waitForRefreshedVisibility(singlePeripheralSectionBy, 2, \"SinglePeripheralNerveBlock.process()\");\n }\n catch (Exception e) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), timed out waiting for section after dropdown selection.\"); ScreenShot.shoot(\"SevereError\");\n return false;\n }\n\n\n //\n // Start filling in the fields.\n //\n if (Arguments.date != null && (this.timeOfPlacement == null || this.timeOfPlacement.isEmpty())) {\n this.timeOfPlacement = Arguments.date + \" \" + Utilities.getCurrentHourMinute();\n }\n this.timeOfPlacement = Utilities.processDateTime(spnbTimeOfPlacementBy, this.timeOfPlacement, this.randomizeSection, true);\n if (codeBranch != null && codeBranch.equalsIgnoreCase(\"Spring\")) {\n this.lateralityOfPnb = Utilities.processRadiosByLabel(this.lateralityOfPnb, this.randomizeSection, true, lateralityLeftBy, lateralityRightBy);\n }\n if (codeBranch != null && codeBranch.equalsIgnoreCase(\"Seam\")) {\n this.lateralityOfPnb = Utilities.processRadiosByLabel(this.lateralityOfPnb, this.randomizeSection, true, SPNB_LATERALITY_OF_PNB_RADIO_LEFT_LABEL, SPNB_LATERALITY_OF_PNB_RADIO_RIGHT_LABEL);\n }\n\n this.locationOfPnb = Utilities.processDropdown(locationOfPnbDropdownBy, this.locationOfPnb, this.randomizeSection, true);\n this.medication = Utilities.processDropdown(medicationDropdownBy, this.medication, this.randomizeSection, true);\n this.concentration = Utilities.processDoubleNumber(concentrationFieldBy, this.concentration, 0.1, 5.0, this.randomizeSection, true);\n this.volume = Utilities.processDoubleNumber(volumeFieldBy, this.volume, 0, 25, this.randomizeSection, true);\n this.preProcedureVerbalAnalogueScore = Utilities.processDropdown(preVerbalScoreDropdownBy, this.preProcedureVerbalAnalogueScore, this.randomizeSection, true);\n this.postProcedureVerbalAnalogueScore = Utilities.processDropdown(postVerbalScoreDropdownBy, this.postProcedureVerbalAnalogueScore, this.randomizeSection, true);\n this.blockPurpose = Utilities.processDropdown(blockPurposeDropdownBy, this.blockPurpose, this.randomizeSection, true);\n this.commentsNotesComplications = Utilities.processText(commentsTextAreaBy, this.commentsNotesComplications, Utilities.TextFieldType.COMMENTS_NOTES_COMPLICATIONS, this.randomizeSection, false);\n Utilities.sleep(555, \"SPNB.process(), will do add additional block stuff\");\n this.wantAdditionalBlock = \"No\"; // forcing this because not ready to loop\n if (codeBranch != null && codeBranch.equalsIgnoreCase(\"Spring\")) {\n this.wantAdditionalBlock = Utilities.processRadiosByLabel(this.wantAdditionalBlock, this.randomizeSection, true, yesRadioLabelBy, noRadioLabelBy);\n }\n if (codeBranch != null && codeBranch.equalsIgnoreCase(\"Seam\")) {\n this.wantAdditionalBlock = Utilities.processRadiosByLabel(this.wantAdditionalBlock, this.randomizeSection, true, SPNB_ADDITIONAL_BLOCK_RADIO_YES_LABEL, SPNB_ADDITIONAL_BLOCK_RADIO_NO_LABEL);\n }\n if (this.wantAdditionalBlock != null && this.wantAdditionalBlock.equalsIgnoreCase(\"Yes\")) {\n logger.fine(\"SinglePeripheralNerveBlock.process(), Want to add another Single Periph Nerve Block for this patient. But not going to at this time.\");\n }\n\n if (this.shoot != null && this.shoot) {\n String fileName = ScreenShot.shoot(this.getClass().getSimpleName());\n if (!Arguments.quiet) System.out.println(\" Wrote screenshot file \" + fileName);\n }\n //\n // Save the note.\n //\n Instant start;\n try {\n WebElement createNoteButton = Utilities.waitForRefreshedClickability(createNoteButtonBy, 10, \"SinglePeripheralNerveBlock.(), create note button\");\n if (Arguments.pauseSave > 0) {\n Utilities.sleep(Arguments.pauseSave * 1000, \"SPNB\");\n }\n start = Instant.now();\n if (!this.skipSave) {\n createNoteButton.click();\n }\n }\n catch (TimeoutException e) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), failed to get and click on the create note button. Timed out. Exception: \" + Utilities.getMessageFirstLine(e)); ScreenShot.shoot(\"SevereError\");\n return false;\n }\n catch (Exception e) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), failed to get and click on the create note button. Exception: \" + Utilities.getMessageFirstLine(e)); ScreenShot.shoot(\"SevereError\");\n return false;\n }\n\n // We need this sleep because of the table that gets populated and inserted prior to the message \"Note successfully created!\"\n // Otherwise we try to read it, and there's nothing there to read!\n Utilities.sleep(6555, \"SPNB.process(), will check 2 conditions next for messages\");\n\n ExpectedCondition<WebElement> problemOnTheServerMessageCondition = ExpectedConditions.visibilityOfElementLocated(problemOnTheServerMessageAreaBy);\n ExpectedCondition<WebElement> successfulMessageCondition = ExpectedConditions.visibilityOfElementLocated(painManagementNoteMessageAreaBy);\n ExpectedCondition<Boolean> successOrServerProblem = ExpectedConditions.or(successfulMessageCondition, problemOnTheServerMessageCondition);\n try {\n (new WebDriverWait(Driver.driver, 10)).until(successOrServerProblem);\n }\n catch (Exception e) {\n logger.severe(\"SinglePeripheralNerveBlock.process(), exception caught waiting for message.: \" + Utilities.getMessageFirstLine(e)); ScreenShot.shoot(\"SevereError\");\n timerLogger.fine(\"Exception 1 while processing \" + patient.patientSearch.firstName + \" \" + patient.patientSearch.lastName + \" after \" + ((Duration.between(start, Instant.now()).toMillis())/1000.0) + \"s\");\n return false;\n }\n // Check for \"Sorry, there was a problem on the server.\" message.\n try {\n WebElement problemOnTheServerElement = (new WebDriverWait(Driver.driver, 4)).until(problemOnTheServerMessageCondition); // was 1\n String message = problemOnTheServerElement.getText();\n if (message.contains(\"problem on the server\")) {\n if (!Arguments.quiet)\n System.err.println(\" ***Failed to save Single Peripheral Nerve Block Note for \" +\n patient.patientSearch.firstName + \" \" + patient.patientSearch.lastName + \" ssn:\" + patient.patientSearch.ssn + \" message: \" + message);\n timerLogger.fine(\"Problem on the server for \" + patient.patientSearch.firstName + \" \" + patient.patientSearch.lastName + \" after \" + ((Duration.between(start, Instant.now()).toMillis())/1000.0) + \"s\");\n return false; // wow, the message no longer displays, but it's still there.\n }\n }\n catch (Exception e) {\n logger.finest(\"SPNB.process(), Maybe no problem, because we were checking on the server problem. Continuing... e: \" + Utilities.getMessageFirstLine(e));\n }\n\n // Now we'll check for \"successfully\". Compare with CPNB, because that looks more complete.\n try {\n WebElement painManagementNoteMessageAreaElement = (new WebDriverWait(Driver.driver, 10)).until(successfulMessageCondition);\n String message = painManagementNoteMessageAreaElement.getText();\n if (!message.isEmpty() && (message.contains(\"successfully created\") || message.contains(\"sucessfully created\"))) {\n logger.finest(\"SPNB.process(), message indicates success. Fall through.\");\n } else {\n WebElement problemOnTheServerElement = (new WebDriverWait(Driver.driver, 10)).until(problemOnTheServerMessageCondition);\n message = problemOnTheServerElement.getText();\n if (message.contains(\"problem on the server\")) {\n if (!Arguments.quiet)\n System.err.println(\" ***Failed to save Single Peripheral Nerve Block Note for \" +\n patient.patientSearch.firstName + \" \" + patient.patientSearch.lastName + \" ssn:\" + patient.patientSearch.ssn + \" message: \" + message);\n timerLogger.fine(\"Problem on the server while processing \" + patient.patientSearch.firstName + \" \" + patient.patientSearch.lastName + \" after \" + ((Duration.between(start, Instant.now()).toMillis())/1000.0) + \"s\");\n return false;\n }\n else {\n logger.finest(\"Didn't find message saying problem on the server. So if this problem goes away, fix the code.\");\n }\n }\n }\n catch (Exception e) {\n logger.info(\"SinglePeripheralNerveBlock.process(), exception caught but prob okay?: \" + Utilities.getMessageFirstLine(e));\n }\n //\n // Report the results\n //\n timerLogger.info(\"Single Peripheral Nerve Block note saved in \" + ((Duration.between(start, Instant.now()).toMillis())/1000.0) + \"s\");\n if (!Arguments.quiet) {\n System.out.println(\" Saved Single Peripheral Nerve Block note at \" + LocalTime.now() + \" for patient\" +\n (patient.patientSearch.firstName.isEmpty() ? \"\" : (\" \" + patient.patientSearch.firstName)) +\n (patient.patientSearch.lastName.isEmpty() ? \"\" : (\" \" + patient.patientSearch.lastName)) +\n (patient.patientSearch.ssn.isEmpty() ? \"\" : (\" ssn:\" + patient.patientSearch.ssn)) + \" ...\"\n );\n }\n if (Arguments.pauseSection > 0) {\n Utilities.sleep(Arguments.pauseSection * 1000, \"SPNB\");\n }\n return true;\n }", "void cleanse() {\n\t\t\tSystem.out.println(\"liver cleansing\");\n\t\t\tSystem.out.println(\"age is: \" + age);\n\t\t\tSystem.out.println(\"weight is: \" + weight);\n\t\t\tSystem.out.println(\"id is: \" + id);\n\t\t\t\n\t\t}", "public void pruneRules_cbaLike() {\n LOGGER.info(\"STARTED Postpruning\");\n //HashMap<ExtendRule,Integer> ruleErrors = new HashMap();\n //HashMap<ExtendRule,AttributeValue> ruleDefClass = new HashMap();\n ArrayList<ExtendRule> rulesToRemove = new ArrayList(); \n int totalErrorsWithoutDefault = 0; \n AttributeValue defClassForLowestTotalErrorsRule = getDefaultRuleClass();\n int lowestTotalErrors = getDefaultRuleError(defClassForLowestTotalErrorsRule);;\n ExtendRule lowestTotalErrorsRule = null;\n // DETERMINE TOTAL ERROR AND DEFAULT CLASS ASSOCIATED WITH EACH RULE \n // REMOVE RULES MATCHING ZERO TRANSACTIONS AND OF ZERO LENGTH\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n rule.setQualityInRuleList(rule.getRuleQuality());\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"Processing rule {0}\", rule.toString());\n }\n\n if (rule.getAntecedentLength() == 0) {\n LOGGER.fine(\"Rule of length 0, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n LOGGER.fine(\"Rule classifying 0 instances correctly, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed \n }\n else\n {\n rule.removeTransactionsCoveredByAntecedent(true); \n totalErrorsWithoutDefault = totalErrorsWithoutDefault + rule.getRuleQuality().getB();\n // since transactions matching the current rule have been removed, the default class and error can change\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n int totalErrorWithDefault = newDefError + totalErrorsWithoutDefault;\n if (totalErrorWithDefault < lowestTotalErrors)\n {\n lowestTotalErrors = totalErrorWithDefault;\n lowestTotalErrorsRule = rule;\n defClassForLowestTotalErrorsRule= newDefClass;\n } \n //ruleErrors.put(rule,totalErrorWithDefault );\n //ruleDefClass.put(rule, newDefClass); \n }\n \n }\n boolean removeTail;\n // now we know the errors associated with each rule not marked for removal, we can perform pruning\n if (lowestTotalErrorsRule == null)\n {\n // no rule improves error over a classifier composed of only default rule\n // remove all rules\n removeTail = true;\n }\n else \n {\n removeTail = false;\n }\n \n data.getDataTable().unhideAllTransactions();\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n ExtendRule rule = it.next();\n if (rulesToRemove.contains(rule) || removeTail)\n {\n it.remove();\n continue;\n }\n if (rule.equals(lowestTotalErrorsRule))\n {\n removeTail = true;\n }\n rule.updateQuality(); \n }\n \n \n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Creating new default rule within narrow rule procedure\");\n }\n \n \n extendedRules.add(createNewDefaultRule(defClassForLowestTotalErrorsRule));\n \n \n LOGGER.info(\"FINISHED Postpruning\");\n }", "private static void doRequestLogic(Map<String, String[]> requestParameters) {\n if (requestParameters.containsKey(\"fortuneRequest\") && requestParameters.containsKey(\"msisdn\")) {\n String[] fortuneRequestStringArray = requestParameters.get(\"fortuneRequest\");\n if (fortuneRequestStringArray.length == 0) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"Request was attempted with no parameters\");\n } else {\n String fortuneRequest = fortuneRequestStringArray[0]; // get the bytecode data\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Received the ByteCode: {0}\", fortuneRequest);\n if (fortuneRequest.equalsIgnoreCase(\"0\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Request is for Fortune Data\");\n\n String outStream = null;\n String errStream = null;\n String fortune = null;\n try {\n // run the Fortune command\n Process p = Runtime.getRuntime().exec(\"/usr/local/bin/fortune\");\n\n BufferedReader stdIn = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));\n\n while ((outStream = stdIn.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDOUT: {0}\", outStream);\n if(!outStream.equalsIgnoreCase(\"null\")) {\n fortune += outStream;\n }\n }\n\n while ((errStream = stdErr.readLine()) != null) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"STDERR: {0}\", errStream);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"IOException when attmpeting to process Fortune command.\", ex);\n }\n \n if (fortune != null) {\n if (0 != fortune.length()) {\n\n ByteString bs = null;\n\n try {\n\n // regex by alex to replace any patters of > 2 spaces with 1 space\n \n fortune = fortune.trim().replaceAll(\" +\", \" \");\n\n if (fortune.length() > 70) {\n fortune = fortune.substring(0, 67) + \"...\";\n }\n\n byte[] fortuneAscii = fortune.getBytes(\"ASCII\");\n bs = new ByteString(fortuneAscii);\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.SEVERE, null, ex);\n doRequestLogic(requestParameters);\n }\n\n\n if (bs == null) {\n doRequestLogic(requestParameters);\n }\n\n // transmit the fortune message to the handset\n CardSettings cs = new CardSettings(\n \"0000\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"NONE\",\n \"NONE\",\n \"1\",\n \"555559\",\n \"0000000000\",\n \"0\",\n \"0\",\n requestParameters.get(\"msisdn\")[0]);\n \n String toHex = bs.toHex();\n \n toHex = toHex.replace(\"6E756C6C\", \"\");\n \n String transmit = \"0A010000\" + \n ((toHex.length() / 2 < 0x0F) ? \"0\" + Integer.toHexString(toHex.length() / 2) : Integer.toHexString(toHex.length() / 2)) + toHex;\n\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"Transmitting APDU: {0}\", transmit);\n\n if (SendSms.sendMessage(transmit, cs, \"http://simulity.co.uk/ota/ram/command\")) {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.INFO, \"The SMS {0} transmitted successfully.\", fortune);\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The SMS failed to transmit.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune length was zero.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The Fortune data was not set.\");\n }\n } else {\n Logger.getLogger(FortuneServer.class.getName()).log(Level.WARNING, \"The request is not supported.\");\n }\n }\n }\n }", "public static void main(String[] args)\n\t{\n\t\tIn in = new In(args[0]);\n\t\tint j = 0, i = 0;\n\t\tint[] whitelist = in.readAllInts();\n\n\t\t// sort the array\n\t\tArrays.sort(whitelist);\n\n\t\tint lowerN = rank(2, whitelist);\n\t\tSystem.out.println(\"lowerN \" + lowerN);\n\n\t\tint equalN = count(2, whitelist);\n\t\tSystem.out.println(\"equalN \" + equalN);\n\n\t\tfor(i = lowerN; i < lowerN + equalN; i++)\n\t\t\tSystem.out.println(whitelist[i]);\n\t}", "@Override\n public void onVertexStateUpdated(VertexStateUpdate stateUpdate) {\n pruner.processVertex(stateUpdate.getVertexName());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setPeriodicPruning(1072);\n int int0 = naiveBayesMultinomialText0.getPeriodicPruning();\n assertEquals(1072, int0);\n }", "public static void main(String[] args) {\n\t\t\n\t\tGerenciadorDeCupons gerenciador = new GerenciadorDeCupons();\n\t\t\n\t\tDouble desconto = gerenciador.validaCupons(\"CUP22\");\n\t\t\n\t\tif(desconto != null){\n\t\t\tSystem.out.println(\"Cupom de desconto valido!\");\n\t\t\tSystem.out.println(\"Valor de \" + desconto);\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom nao existe\");\n\t\t}\n\n\t\t\n\t\t//----------------------------------------------\n\t\t\nGerenciadorDeCupons1 gerenciador1 = new GerenciadorDeCupons1();\n\t\t\n\t\tif(gerenciador1.validaCupons(\"CUP231\")){\n\t\t\tSystem.out.println(\"Cupom TIPO 1 de desconto valido!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom TIPO 1 nao existe\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t//----------------------------------------------\n\t\tGerenciadorDeCupons2 gerenciador2 = new GerenciadorDeCupons2();\n\t\t\n\t\tif(gerenciador2.validaCupons(\"CUP54\")){\n\t\t\tSystem.out.println(\"Cupom TIPO 2 de desconto valido!\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Esse cupom TIPO 2 nao existe\");\n\t\t}\n\n\t}", "static public void main(String[] args)\n {\n try {\n ParserModel parser = new ParserModel();\n\n Map<String, String> options = getOptions(args);\n\n // process received options\n \n if (hasRequiredOptionsMissing(options)) {\n throw new IllegalArgumentException(\n \"Please provide all required options: \" + String.join(\",\", requiredOptions)\n );\n }\n\n String duration = options.get(\"duration\");\n if (!isValidDuration(duration.toUpperCase())) {\n throw new IllegalArgumentException(\"Unknown duration: \" + duration);\n }\n\n String startDateStr = options.get(\"startDate\");\n LocalDateTime startDate = null;\n try {\n startDate = parser.prepareDateArgument(startDateStr);\n } catch (DateTimeParseException e) {\n throw new IllegalArgumentException(\n \"Expected date pattern: \" + ParserModel.DATE_PATTERN\n );\n }\n\n String thresholdStr = options.get(\"threshold\");\n int threshold;\n try {\n threshold = Integer.parseInt(thresholdStr);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\n \"Expected int value for threshold, actual: \" + thresholdStr\n );\n }\n\n // take action based on processed options\n // if \"accesslog\" option is provided, also process log file\n if (options.containsKey(\"accesslog\")) {\n List<LogEntry> list = parser.parse(options.get(\"accesslog\"));\n parser.saveLogEntries(list);\n }\n \n duration = duration.toUpperCase();\n Map<String, Integer> result = parser.findAboveThresholdIPs(startDate, Duration.valueOf(duration), threshold);\n\n if (result.isEmpty()) {\n System.out.println(\"No above-threshold IPs for given arguments\");\n } else {\n result.keySet().forEach((ip) -> {\n System.out.println(ip);\n });\n\n parser.logBlockedIPs(result, startDate, Duration.valueOf(duration), threshold);\n }\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public void deletePromo() {\n\t\tviewPromoPackage();\n\t\t\n\t\tScanner dlSC = new Scanner(System.in);\n\t\tpp.clear();\n\t\t\n\t\tboolean checkRemove = true;\n\t\tboolean isRunning = true;\n\t\t\n\t\twhile (isRunning) {\n\t\t\tdo \n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t// Get data contents from saved file\n\t\t\t\t\tFileInputStream fis = new FileInputStream(\"promoData\");\n\t\t ObjectInputStream ois = new ObjectInputStream(fis);\n\t\t \n\t\t pp = (ArrayList<PromotionalPackage>) ois.readObject();\n\t\t \n\t\t ois.close();\n\t\t fis.close();\n\t\t \n\t\t System.out.println(\"Promotional Package to Delete (-1 to Complete):\");\n\t\t \t\tString promoPackID = dlSC.next();\n\t\t \n\t\t checkRemove = pp.removeIf(menuItem -> menuItem.getPackageID().equals(promoPackID.toUpperCase()));\n\t\t \n\t\t if (promoPackID.equals(\"-1\")) {\n\t\t\t\t\t\tisRunning = false;\n\t\t\t\t\t\tbreak;\n\t\t }\n\t\t \n\t\t if (checkRemove) {\n\t\t \ttry {\n\t\t \tFileOutputStream fos = new FileOutputStream(\"promoData\");\n\t\t \t\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t \t\t\t\toos.writeObject(pp);\n\t\t \t\t\t\toos.close();\n\t\t \t\t\t\tfos.close();\n\t\t }\n\t\t catch (IOException e) {\n\t\t \t\t\tSystem.out.println(\"Failed to delete promotion!\");\n\t\t \t\t\treturn;\n\t\t \t\t}\n\t\t \tbreak;\n\t\t }\n\t\t \n\t\t checkRemove = false;\n\t\t System.out.println(\"Promo Package not found. Please try again!\");\n\t\t\t\t} \n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"No promotions to delete!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tcatch (ClassNotFoundException c) {\n\t\t\t\t\tc.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (!checkRemove);\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n String URL = \"\";\n URL = bufferedReader.readLine();\n\n if (URL.isEmpty() || URL.indexOf(\"?\") == -1 || URL.indexOf(\"?\") == URL.length()-1)\n return;\n\n ArrayList<String> params = getParams(URL);\n\n if (params == null)\n return;\n\n printParams(params);\n processObj(params);\n// for (String s : params)\n// if (s.contains(\"obj=\")) {\n// callAlert(params);\n// break;\n// }\n }", "private void calculatePartialsPartialsPruning(int iNode1, int iNode2, int iNode3) {\n\t\t// prepare the stack\n\t\tm_nOperation[m_nTopOfStack] = OPERATION_PP;\n\t\tm_nNode1[m_nTopOfStack] = iNode1;\n\t\tm_nNode2[m_nTopOfStack] = iNode2;\n\t\tm_nNode3[m_nTopOfStack] = iNode3;\n\t\tm_nTopOfStack++;\n\t}", "void discardIrrelevantResponse(CruiseControlParameters parameters);", "public void v_Verify_Guest7_Hidden(){\n\t}", "public static void main(String[] args) {\n\t\tQueue<HtmlTag> tags = new LinkedList<HtmlTag>();\n\t\ttags.add(new HtmlTag(\"b\", true)); // <b>\n\t\ttags.add(new HtmlTag(\"b\", false)); // </b>\n\t\ttags.add(new HtmlTag(\"br\")); // <br/>\n\t\t\n\t\t// Your code here\t\n HtmlValidator test = new HtmlValidator(tags);\n System.out.println(\"Before modifications: \" + test.getTags()); \n HtmlTag tagC = new HtmlTag(\"c\"); \n test.addTag(tagC);\n System.out.println(\"After adding <C>:\" + test.getTags());\n test.removeAll(\"b\");\n System.out.println(\"After removing <b>:\" + test.getTags()); \n System.out.println(\"Validation:\");\n test.validate();\n\t}", "public void v_Verify_Guest12_Hidden(){\n\t}", "public void processInput(String command) {\r\n\t\t//begin\r\n\t\tString word = \"\";\r\n\t\tint i = 0;\r\n\t\tboolean processingInput = true;\r\n\t\t\r\n\t\t//loop that runs through whole command and breaks it apart\r\n\t\twhile(processingInput == true && i < command.length()) {\r\n\t\t\t\r\n\t\t\tif(command.charAt(i) == ',' && i < command.length()) {\r\n\t\t\t\t\r\n\t\t\t\ti += 2;\r\n\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t//word = word.trim();\r\n\t\t\t\tboolean hasError = false;\r\n\t\t\t\t\r\n\t\t\t\tif(word.compareTo(\"publish\") == 0 && checkIfHasCorrectFormat(command, \"publish\") == true) {\r\n\t\t\t\t\tString producer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\tString brandName = \"\";\r\n\t\t\t\t\t//loop that gets producer name from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tproducer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tproducer = producer.toLowerCase();\r\n\t\t\t\t\t//producer = producer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category from command line\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tprodCat += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets brand name from command line\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tbrandName += command.charAt(i);\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbrandName = brandName.toLowerCase();\r\n\t\t\t\t\t//brandName = brandName.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\t//adds producer to producerList\r\n\t\t\t\t\t\taddProducer(producer);\r\n\t\t\t\t\t\t//performs a publish for the given producer\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < producerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tProducer tempProducer = producerList.get(i);\r\n\t\t\t\t\t\t\tif(producer.compareTo(tempProducer.getPublisherName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempProducer.publish(brandName, prodCat);\r\n\t\t\t\t\t\t\t\tproducerList.set(i, tempProducer); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"subscribe\") == 0 && checkIfHasCorrectFormat(command, \"subscribe\") == true) { \r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\t\r\n\t\t\t\t\t\tretailer += command.charAt(i);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\t//retailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length() && i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\taddRetailer(retailer);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.subscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//broker.subscribeCommand(retailer, prodCat);\r\n\t\t\t\t}\r\n\t\t\t\telse if(word.compareTo(\"unsubscribe\") == 0 && checkIfHasCorrectFormat(command, \"unsubscribe\") == true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tString retailer = \"\";\r\n\t\t\t\t\tString prodCat = \"\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the retailer name\r\n\t\t\t\t\twhile(i < command.length() && command.charAt(i) != ',') {\r\n\t\t\t\t\t\tretailer += command.charAt(i);\t\t\t\t\t\t\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tretailer = retailer.toLowerCase();\r\n\t\t\t\t\tretailer = retailer.trim();\r\n\t\t\t\t\ti += 2;\r\n\t\t\t\t\t\r\n\t\t\t\t\t//loop that gets the product category\r\n\t\t\t\t\twhile(i < command.length()) {\r\n\t\t\t\t\t\tif(command.charAt(i) != ',') {\r\n\t\t\t\t\t\t\tprodCat += command.charAt(i);\t\r\n\t\t\t\t\t\t i++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\thasError = true;\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprodCat = prodCat.toLowerCase();\r\n\t\t\t\t\t//prodCat = prodCat.trim();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(hasError == false) {\r\n\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\t\t\twhile(i < retailerList.size() && foundMatch == false) {\r\n\t\t\t\t\t\t\tRetailer tempRetailer = retailerList.get(i);\r\n\t\t\t\t\t\t\tif(retailer.compareTo(tempRetailer.getSubscriberName()) == 0) {\r\n\t\t\t\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\t\t\t\ttempRetailer.unsubscribe(prodCat);\r\n\t\t\t\t\t\t\t\tretailerList.set(i, tempRetailer); //NOT SURE IF I OR I + 1 OR I - 1 ****************************************8\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tprocessingInput = false;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tword += command.charAt(i);\t\t\t\t\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t\r\n\t\t//end\r\n\t}", "@Test\r\n\t\tpublic void testParseNoWhitespace() {\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[2]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertFalse(elementText.contains(\":on_sp\") || elementText.contains(\":op_nl\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "public static void main(String[] args) {\nNotEqual ne=new NotEqual();\r\nne.value();\r\nne.process();\r\n\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tboolean flag = true;\r\n\r\n\t\tProductMgrImpl pdmgr = ProductMgrImpl.getInstance();\r\n\r\n\t\twhile (flag) {\r\n\r\n\t\t\tSystem.out.println(\"============================\");\r\n\t\t\tSystem.out.println(\"1. 상품 정보 입력\");\r\n\t\t\tSystem.out.println(\"2. 상품 정보 전체검색\");\r\n\t\t\tSystem.out.println(\"3. 상품 번호로 검색\");\r\n\t\t\tSystem.out.println(\"4. 상품명으로 검색 (상품명 부분검색가능)\");\r\n\t\t\tSystem.out.println(\"5. TV정보만 검색\");\r\n\t\t\tSystem.out.println(\"6. 냉장고만 검색\");\r\n\t\t\tSystem.out.println(\"7. 전체 재고 상품 금액을 구하기\");\r\n\t\t\tSystem.out.println(\"8. 상품번호로 삭제\");\r\n\t\t\tSystem.out.println(\"9. 상품 가격 변경하기\");\r\n\t\t\tSystem.out.println(\"10. ~이상의 TV 또는 냉장고 검색\");\r\n\t\t\tSystem.out.println(\"11. 저장하기\");\r\n\t\t\tSystem.out.println(\"0. 종료\");\r\n\t\t\tSystem.out.println(\"==============원하는 번호를 입력하시오:\");\r\n\t\t\tint n = sc.nextInt();\r\n\r\n\t\t\tswitch (n) {\r\n\t\t\tcase 0: {\r\n\t\t\t\tSystem.out.println(\"종료합니다.\");\r\n\t\t\t\tflag = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 1: { // 상품 정보 입력\r\n\t\t\t\tSystem.out.println(\" TV or 냉장고 인지 선택하시오.\");\r\n\t\t\t\tString info = sc.next();\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력하세요.\");\r\n\t\t\t\tint p_num = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품명을 입력하세요.\");\r\n\t\t\t\tString p_Name = sc.next();\r\n\t\t\t\tSystem.out.println(\"상품 가격을 입력하세요\");\r\n\t\t\t\tint price = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품 수량을 입력하세요.\");\r\n\t\t\t\tint amount = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"상품 용량을 입력하세요.\");\r\n\r\n\t\t\t\tint capacity = sc.nextInt();\r\n\t\t\t\tif (info.equals(\"TV\")) {\r\n\t\t\t\t\tTV tv = new TV(p_num, p_Name, price, info, amount, capacity);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpdmgr.add(tv);\r\n\t\t\t\t\t\t//저장하자\r\n\t\t\t\t\t\t//pdmgr.save();\r\n\t\t\t\t\t} catch (DuplicateException e) {\r\n\t\t\t\t\t\tSystem.out.println(\"상품 번호가 같으며 이미 존재하는 상품입니다.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (info.equals(\"냉장고\")) {\r\n\t\t\t\t\tRefrigerator re = new Refrigerator(p_num, p_Name, price, info, amount, capacity);\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpdmgr.add(re);\r\n\t\t\t\t\t\t//pdmgr.save();\r\n\t\t\t\t\t} catch (DuplicateException e) {\r\n\t\t\t\t\t\tSystem.out.println(\"상품 번호가 같으며 이미 존재하는 상품입니다.\");\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 2: {// 상품 정보 전체 검색\r\n\t\t\t\tArrayList<Product> list = new ArrayList<>();\r\n\t\t\t\tlist = pdmgr.serch();\r\n\t\t\t\tfor (int i = 0; i < pdmgr.getSize(); i++)\r\n\t\t\t\t\tSystem.out.println(list.get(i));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 3: {// 상품 번호검색\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력해주세요:\");\r\n\t\t\t\tint number = sc.nextInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (Product x : pdmgr.serch_Num(number)) {\r\n\t\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (CodeNotFoundException e) {\r\n\t\t\t\t\tSystem.out.println(\"상품번호가 존재하지 않습니다\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 4: {// 상품명으로 검색\r\n\t\t\t\tSystem.out.println(\"상품 이름을 입력해주세요:\");\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tfor (Product x : pdmgr.serch_Name(name)) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 5: {// TV정보만 검색\r\n\t\t\t\tfor (Product x : pdmgr.serch_Info(\"TV\")) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 6: { // 냉장고 정보만검색\r\n\t\t\t\tfor (Product x : pdmgr.serch_Info(\"냉장고\")) {\r\n\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 7: {// 전체재고상품금액 구하기\r\n\t\t\t\tSystem.out.println(pdmgr.sum_price() + \"원 입니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcase 8: { // 상품번호로 삭제\r\n\t\t\t\tSystem.out.println(\"삭제할 상품 번호를 입력하세요:\");\r\n\t\t\t\tint num = sc.nextInt();\r\n\t\t\t\tboolean b = pdmgr.delete(num);\r\n\t\t\t\tif (b)\r\n\t\t\t\t\tSystem.out.println(\"삭제되었습니다.\");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(\"삭제할 상품이 없습니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 9: {// 상품가격 변경\r\n\t\t\t\tSystem.out.println(\"상품 번호를 입력하세요:\");\r\n\t\t\t\tint num = sc.nextInt();\r\n\t\t\t\tSystem.out.println(\"변경할 가격을 입력하세요:\");\r\n\t\t\t\tint price = sc.nextInt();\r\n\t\t\t\tpdmgr.price_change(num, price);\r\n\t\t\t\tSystem.out.println(\"변경되었습니다.\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tcase 10: {\r\n\t\t\t\tSystem.out.println(\"무엇을 검색하시겠습니까? TV or 냉장고 \");\r\n\t\t\t\tString s = sc.next();\r\n\t\t\t\tSystem.out.println(\"용량 크기를 숫자로만 입력하세요.\");\r\n\t\t\t\tint size = sc.nextInt();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (Product x : pdmgr.serch_Info2(s, size)) {\r\n\t\t\t\t\t\tif (x != null) {\r\n\t\t\t\t\t\t\tSystem.out.println(x);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (ProductNotFoundException e) {\r\n\t\t\t\t\tSystem.out.println(\"그런 상품은 존재하지 않습니다.\");\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcase 11: {\r\n\t\t\t\tpdmgr.save();\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic long checkPrune(PruneSetting pSetting) throws Exception {\n\t\treturn 0;\n\t}", "private static ArrayList<Result> pruneResults(ArrayList<Result> pruneThis, int limit){\n\t\tArrayList<Result> sortednodups = sortByScore(pruneThis);\n\t\tArrayList<Result> pruned = new ArrayList<Result>();\n\t\tfor (int i = 0; i<limit && i < pruneThis.size(); i++){\n\t\t\tpruned.add(sortednodups.get(i));\n\t\t}\n\t\treturn pruned; \n\t}", "@Test(timeout = 4000)\n public void test84() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.periodicPruningTipText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(\"How often (number of instances) to prune the dictionary of low frequency terms. 0 means don't prune. Setting a positive integer n means prune after every n instances\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "public void v_Verify_Guest9_Hidden(){\n\t}", "public static void main(String[] args) {\n\t\t//String question = \"Which restaurants that serve Halal are good?\";\n\t\t//String question = \"Which restaurant nearby that doesn't have free wifi and good for kids?\";\n\t\t//String question = \"Which restaurant that is good for kids?\";\n\t\tString question = \"Is Teresa's Restaurant good?\";\n\t\t//String question = \"Where is Teresa's Restaurant?\";\n\t\t//String question = \"What kind of food does Teresa's Restaurant serve?\";\n\t\t\n\t\tResult answer = YelpGate.getInstance().process(question);\n\t\tSystem.out.println(answer.type);\n\t\tSystem.out.println(answer.name.toString());\n\t\tSystem.out.println(answer.query.toString());\n\t\tSystem.out.println(answer.highlight);\n\t}", "public static void main(String[] args) {\n try (Scanner scanner = new Scanner(System.in).useLocale(Locale.ENGLISH)) {\n int progressionType = (int) scanNumber(scanner, \"type of progression\", 0, 0, 1);\n double firstElement = scanNumber(scanner, \"first element\", 1, -Double.MAX_VALUE, Double.MAX_VALUE);\n double commonDifOrRatio = scanNumber(scanner, \"common difference or ratio\", 1, -Double.MAX_VALUE, Double.MAX_VALUE);\n int memberCount = (int) scanNumber(scanner, \"member count\", 0, 1, Integer.MAX_VALUE);\n displayProgression(progressionType, firstElement, commonDifOrRatio, memberCount);\n }\n }", "public abstract void\n bypassValidation_();", "public void acceptAndProceed()\r\n {\r\n\t driver.findElement(By.id(\"PCNChecked\")).click();\r\n\t driver.findElement(By.xpath(\"/html/body/div[1]/div/div/main/div/main/div/div/div[1]/div/div/form/fieldset/div[3]/div[2]/button\")).click();\r\n }", "@After\n \tpublic void confirm() {\n \t\tcheckGlobalStatus();\n \n \t\tIterator<CyNetworkView> viewIt = viewManager.getNetworkViewSet().iterator();\n \n \t\tCyNetworkView view = viewIt.next(); \n \t\tCyNetwork network = view.getModel();\n \t\t\n \t\tcheckNetwork(network);\n \t\tcheckNetworkView(network);\n \t\tcheckAttributes(network);\n \t}", "public void v_Verify_Guest4_Hidden(){\n\t}", "public static void main(final String[] args) {\n Josephus josephus = new Josephus();\n Scanner scan = new Scanner(System.in);\n int input = scan.nextInt();\n while (scan.hasNext()) {\n int persons = scan.nextInt();\n int spaces = scan.nextInt();\n josephus.antiQuity(persons, spaces);\n }\n }", "public void execute() {\n String input;\n boolean isInputValid;\n\n do {\n isInputValid = true;\n\n System.out.print(\"Please send me the numbers using space between them like \\\"1 2 3\\\": \");\n input = sc.nextLine();\n\n try {\n validateData(input);\n } catch (NumberFormatException e) {\n System.err.println(\"NumberFormatException \" + e.getMessage());\n isInputValid = false;\n }\n\n } while (!isInputValid);\n\n System.out.println(\"Result: \" + find(input));\n }", "@Step\n\tpublic void verify_the_DP_Topic_of_retire_status(String Page)throws Exception {\n\n\t\tLong dpKey=Serenity.sessionVariableCalled(\"DPkey\"); \n\n\t\tswitch(Page){\n\t\tcase \"AWB\": \n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tString medicalPolicy=Serenity.sessionVariableCalled(\"Medicalpolicy\");\n\t\t\tString MedPolicyXpath = StringUtils.replace(oCPWPage.MedPolicyAfterSearch, \"MedPolicyValue\", medicalPolicy);\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.PolicySelectionDrawerButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_10_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.MedPolicySearchBox, medicalPolicy);\n\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.MedPolicySearchButton);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_3_Seconds);\n\t\t\tobjSeleniumUtils.clickGivenXpath(MedPolicyXpath); \n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.ApplyToOpportunityGridBtn);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tboolean statusValue=oGenericUtils.isElementExist(oCPWPage.nonRecordsOfMedicalPolicies);\n\t\t\tif(statusValue)\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"Non Medical Policy / Topic \"+oCPWPage.nonRecordsOfMedicalPolicies+\"Status\",statusValue);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"RWO\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"No Disposition\");\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.reviewWorkedOpportunities);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tobjSeleniumUtils.Enter_given_Text_Element(oCPWPage.SearchFileldXpath, String.valueOf(dpKey));\n\t\t\tobjSeleniumUtils.clickGivenXpath(oCPWPage.SearchButtonXpath);\n\t\t\tobjSeleniumUtils.defaultWait(ProjectVariables.TImeout_6_Seconds);\n\t\t\tAssert.assertTrue(\"Non Records Opportunities \"+oCPWPage.nonRecordsOfOpportunities+\"Status\",oGenericUtils.isElementExist(oCPWPage.nonRecordsOfOpportunities));\n\t\t\tbreak;\n\t\tcase \"PM\":\n\t\t\tMongoDBUtils.getDPAndTopicRetire(\"Present\"); \n\t\t\tThread.sleep(2000);\n\t\t\t//Click on 'Reset' button\n\t\t\tobjSeleniumUtils.highlightElement(oFilterDrawer.sReset);\n\t\t\toGenericUtils.clickButton(By.xpath(oFilterDrawer.sReset));\n\t\t\tThread.sleep(2000);\n\t\t\tboolean bstatus=oCPWPage.Enter_the_given_MP_Topic_in_filter_Drawer(Serenity.sessionVariableCalled(\"Medicalpolicy\"));\n\n\t\t\tif(bstatus)\n\t\t\t{\n\t\t\t\tobjSeleniumUtils.clickGivenXpath(StringUtils.replace(oFilterDrawer.Medicalpolicy_Checkbox, \"value\", Serenity.sessionVariableCalled(\"Medicalpolicy\")));\n\t\t\t\toFilterDrawer.user_filters_by_clicking_on_Apply_for_Medical_Policy_Topic();\n\t\t\t\toOppurtunityDeck.validatethegivenDatainOpportunityDeck(Serenity.sessionVariableCalled(\"DPkey\").toString(), \"Updated DPkey\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAssert.assertTrue(\"DPKey not displayed as its retired\"+Serenity.sessionVariableCalled(\"DPkey\"), true);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t}", "public static void main(String[] args) throws Exception {\n int numFiles = 0;\n boolean keepValid = false;\n for (int i=0; i<args.length; i++) {\n if (args[i].startsWith(\"-\")) {\n if (args[i].equals(\"-valid\")) keepValid = true;\n else {\n System.err.println(\"Warning: ignoring unknown command line flag \\\"\" +\n args[i] + \"\\\"\");\n }\n }\n else numFiles++;\n }\n\n if (numFiles == 0) {\n // read from stdin\n process(new BufferedReader(new InputStreamReader(System.in)), keepValid);\n }\n else {\n // read from file(s)\n for (int i=0; i<args.length; i++) {\n if (!args[i].startsWith(\"-\")) {\n process(new BufferedReader(new FileReader(args[i])), keepValid);\n }\n }\n }\n }", "public void confirmation() throws InterruptedException {\n Scanner scan = new Scanner(System.in);\n String confirm = \"\";\n confirm = InputValidation.regexValidate(scan, \"yn\");\n\n if (confirm.equalsIgnoreCase(\"Y\")) {\n entryCheck();\n computeResult();\n System.out.println(Pet.petCollection.get(Pet.getIndex()).getCompetition());\n }\n Competition.c.setOpponent(Pet.PetGenerator());\n }", "public void fetchVerseLines() throws IncorrectInput{\n String strObject1 = \"\";\n PoetAndTheme object1 = poetsAndThemesList.get(0);\n String strObject2 = \"\";\n PoetAndTheme object2 = poetsAndThemesList.get(0);\n strObject1 = userInputToPoet(poet1, theme);\n strObject2 = userInputToPoet(poet2, theme);\n\n for(PoetAndTheme object: poetsAndThemesList){\n if (object.getNameAndTheme().equals(strObject1)){\n object1 = object;\n }\n if (object.getNameAndTheme().equals(strObject2)){\n object2 = object;\n }\n }\n //Poems length is a random number between 5 and 10\n int poemLength = getRandomPoemLength();\n\n if(poemLength % 2 == 0){\n for (int i=0; i < (poemLength/2); i++){\n if(i != (poemLength/2 - 1)){\n System.out.println(object1.getRandomVerseLine());\n System.out.println(object2.getRandomVerseLine());\n }else{\n System.out.println(object1.getRandomVerseLine());\n\n //Checking if the last verse line ends with period or question mark.\n //If not, get a new verse line.\n System.out.println(getLastPoemLine(object2));\n }\n }\n }else{\n for (int i=0; i < (poemLength/2 - 1); i++){\n System.out.println(object1.getRandomVerseLine());\n System.out.println(object2.getRandomVerseLine());\n }\n //Checking if the last verse line ends with period or question mark.\n //If not, get a new verse line.\n System.out.println(getLastPoemLine(object1));\n }\n }", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tHashMap<Character, Character> map = new HashMap<>();\n\t\tmap.put('(', ')');\n\t\tmap.put('{','}');\n\t\tmap.put('[', ']');\n\t\twhile(scanner.hasNext()) {\n\t\t\tString s = scanner.next();\n\t\t\tSystem.out.println(isBalanced(s,map) ? \"true\":\"false\");\n\t\t}\n\t}", "public String apavada_para_rupa(String X_anta, String X_adi)\n {\n\n // this will deal with para_rupa and purva_rupa aapavaads\n\n // making life easier by dealing with ITRANS CODING\n\n Log.info(\"*******ENTERED AAPAVADA NIYAMA 2**********\");\n String anta = EncodingUtil.convertSLPToUniformItrans(X_anta); // anta\n // is\n // ITRANS\n // equivalent\n String adi = EncodingUtil.convertSLPToUniformItrans(X_adi); // adi is\n // ITRANS\n // equivalent\n\n String return_me = \"UNAPPLICABLE\";\n\n // 216\n\n // 218 Vik Semantic Dependency\n // **********ELSE IF****************//\n if (VowelUtil.isAkaranta(anta) && (adi.equals(\"eva\")))\n\n {\n Log.info(\" Rules 215 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"eve caniyoge\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"akaranta word followed by the word 'eva' used to imply uncertainity.\\n\" + \" <a> (a/A/a3) + eva (implying uncertainty) = para-rupa ekadesha\\n\" + \"Blocks all other rules. If the condition of uncertainty is \" + \"not expressed this rule doesnot apply.\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 217 Vik Semantic Dependency not working\n // **********ELSE IF****************//\n else if (is_akaranta_upsarga(X_anta) && (X_adi.startsWith(\"e\") || X_adi.startsWith(\"o\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {\n Log.info(\" Came in Rule 217 \");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.97\");\n comments.setSutraPath(\"e~Ni pararUpam\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = depend + \"akaranta-upsarga followed by verbal form beginning with \" + \"'e' or 'o' results in 'para-rupa-ekadesha.\\n\" + \"<akranta-upasarga> a/A/a3 + <e~N> e/o-initial Verbal Form = para-rupa ekadesha\\n\" + \"This Condition will block autsargic vriddhi.\";\n comments.setConditions(cond1);\n\n }\n // **********END OF ELSE IF****************//\n\n // Removed Below We are not dealing with Internal sandhi any more\n\n /***********************************************************************\n * // From SKT Pathan Path Pg. 107 //**********ELSE IF\n **********************************************************************/\n //\n // else if ( /*(sandhi.internal == true ) && */ Vowel.is_aganta(X_anta)\n /***********************************************************************\n * && X_adi.equals(\"am\") ) { return_me = purva_rupa(X_anta,X_adi);\n * //sandhi_notes = PRV + apavada + sutra + \"'ami pUrvaH'(6.1.107).\" +\n * \"\\nBlocks Ayadi Sandhi\"; vowel_notes.start_adding_notes();\n * vowel_notes.set_sutra_num(\"6.1.107\") ; vowel_notes.setSutraPath(\"ami\n * pUrvaH\") ; vowel_notes.set_sutra_proc(\"purva-rupa-ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"Blocks Ayadi\n * Sandhi.\"; vowel_notes.set_conditions(cond1); } //**********END OF\n * ELSE IF\n **********************************************************************/\n //\n // 219\n // 220\n // **********ELSE IF****************//\n else if (anta.equals(\"sIma\") && (adi.equals(\"anta\"))) // USing X_adi,\n // switched to\n // Sharfe\n // Encoding\n {// checked:29-6\n Log.info(\" Rules 220 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"sImantaH kesheSu\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"if the word sImanta is used in relation to hairs of the \" + \"the head(kesha) this is the correct form.Otherwise not.\\n\" + \"sIma + anta = para-rupa ekadesh. If used in relation to hairs\";\n comments.setConditions(cond1);\n }\n\n // **********END OF ELSE IF****************//\n // 221\n else if (VowelUtil.isAkaranta(X_anta) && (adi.equals(\"otu\") || adi.equals(\"oSTha\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {// checked:29-6\n Log.info(\" Rules 220 applies\");\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + para_rupa(X_anta, X_adi) + \"**\";\n\n comments.start_adding_notes();\n comments.setSutraNum(\"\");\n comments.setVartikaPath(\"otvoSThayoH samAse vA\");\n comments.setSutraProc(\"para-rupa-ekadesh\");\n comments.setSource(Comments.vartika);\n String cond1 = depend + \"This is a optional form which is permitted along \" + \"with the regular form if an akaranta word is followed by 'otu' and 'oSTha' \" + \"to form a Compund Word.\\n\" + \" a + otu/oSTha = para-rupa, other Sandhis permitted\";\n comments.setConditions(cond1);\n\n }\n // 222\n // 223a -now working... make diff rule for \"A\" or consider it...did\n // check 223b\n // **********ELSE IF****************//\n else if (VowelUtil.isAkaranta(X_anta) && (adi.equals(\"om\") && adi.equals(\"A\"))) // USing\n // X_adi,\n // switched\n // to\n // Sharfe\n // Encoding\n {// checked:29-6\n return_me = para_rupa(X_anta, X_adi);\n // sandhi_notes = PAR + apavada + sutra + \"'omA~Nosca'(6.1.92).\" +\n // \"\\nBlocks Vrddhi Sandhi\";\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.92\");\n comments.setSutraPath(\"omA~Noshca\");\n comments.setSutraProc(\"para-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = \"om/aa~N + iti = para-rupa sandhi.Blocks Vrddhi and/or Dirgha Sandhi\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 223b\n // **********ELSE IF****************//\n /*\n * else if (Vowel.is_akaranta(X_anta) && adi.equals(\"A\") ) // USing\n * X_adi, switched to Sharfe Encoding { return_me =\n * utsarga_sandhi(X_anta,X_adi) + \", \" + para_rupa(X_anta,X_adi) + \"**\";\n * /*sandhi_notes = usg1 + sandhi_notes + \"\\n\" + usg2 ; //sandhi_notes+=\n * PAR + apavada + sutra + \"'omA~Nosca'(6.1.92).\" + depend + //\n * \"\\nCondition: If the 'A' of String 2 is 'A~N' then this rule is used \"+ // \"\n * which blocks Dirgha Sandhi\"; // vowel_notes.start_adding_notes();\n * vowel_notes.set_sutra_num(\"6.1.92\") ;\n * vowel_notes.setSutraPath(\"omA~Nosca\") ;\n * vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"If the 'A' of\n * String 2 is 'A~N' then this rule is used \"+ \" which blocks Dirgha\n * Sandhi\"; vowel_notes.set_conditions(cond1);\n * }\n */\n // **********END OF ELSE IF****************//\n // 224 Vik Semantic Dependency - apadAnta\n // **********ELSE IF****************//\n else if ( /*\n * (sandhi.internal == true ) && (SandhiBean.padanta ==\n * false) &&\n */\n VowelUtil.isAkaranta(X_anta) && adi.equals(\"us\"))\n {// checked:29-6\n return_me = para_rupa(X_anta, X_adi);\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.63\");\n comments.setSutraPath(\"usyapadAntAt\");\n comments.setSutraProc(\"para-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = \"Non-padanta <a> + 'us' affix = para-rupa.Blocks Vrddhi Sandhi\";\n comments.setConditions(cond1);\n }\n // **********END OF ELSE IF****************//\n\n // 225 Vik Semantic Dependency - apadAnta\n // **********ELSE IF****************//\n // else if ( /*(sandhi.internal == true )&& ( SandhiBean.padanta ==\n // false) && */\n /*\n * X_anta.endsWith(\"a\") && ( X_adi.startsWith(\"a\") ||\n * X_adi.startsWith(\"e\") || X_adi.startsWith(\"o\") ) ) {//checked:29-6\n * \n * return_me = para_rupa(X_anta,X_adi);\n * vowel_notes.start_adding_notes(); vowel_notes.set_sutra_num(\"6.1.94\") ;\n * vowel_notes.setSutraPath(\"ato guNe\") ;\n * vowel_notes.set_sutra_proc(\"para-rupa ekadesh\");\n * vowel_notes.set_source(tippani.sutra) ; String cond1 =\"Blocks Vrddhi\n * Sandhi\"; vowel_notes.set_conditions(cond1); }\n */// **********END OF ELSE IF****************//\n // 226 - 231\n // 232 Vik Semantic Dependency - padanta\n // Purva Rupa Sandhi Begins\n // **********ELSE IF****************//\n else if ( /* (SandhiBean.padanta == true ) && */\n (X_anta.endsWith(\"e\") || X_anta.endsWith(\"o\")) && X_adi.startsWith(\"a\"))\n {// checked:29-6\n if (anta.equals(\"go\"))\n ; // condition will be handled elsewhere\n else\n {\n\n return_me = utsarga_sandhi(X_anta, X_adi) + \", \" + purva_rupa(X_anta, X_adi);\n\n comments.start_adding_notes();\n comments.setSutraNum(\"6.1.105\");\n comments.setSutraPath(\"e~NaH padAntAdati\");\n comments.setSutraProc(\"purva-rupa ekadesh\");\n comments.setSource(Comments.sutra);\n String cond1 = padanta + \"If a padanta word ending in either 'e' or 'o' is followed by an 'a' purva-rupa ekadesh takes place\" + \"\\npadanta <e~N> 'e/o' + 'a' = purva-rupa ekadesha. Blocks Ayadi Sandhi\";\n comments.setConditions(cond1);\n\n }\n }\n // **********END OF ELSE IF****************//\n\n Log.info(\"return_me == \" + return_me);\n Log.info(\"*******EXITED AAPAVADA NIYAMA 2**********\");\n\n if (return_me.equals(\"UNAPPLICABLE\"))\n {\n return_me = apavada_prakruti_bhava(X_anta, X_adi); // search for\n // more apavada\n // rules\n }\n return return_me; // apavada rules formulated by Panini apply\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tBinaryTree bt = new BinaryTree();\n\t\tint key = sc.nextInt();\n\t\tbt.root = bt.createTreeByLevelTree(sc);\n\t\tbt.root = bt.replaceNegativeOne(bt.root);\n\t\tNode infected = bt.ifNodeExists(bt.root, key);\n\t\tSystem.out.println(bt.CovidTree(bt.root, infected));\n\t\tbt.deleteTree(bt.root);\n\t}", "public static void main(String[] args) throws MalformedURLException, IOException{\n TagStripper ts = new TagStripper();\n\n // open an url connection to the specified adress\n URL url = new URL(\"http://sv.wikipedia.org/wiki/Henrik_VIII_av_England\");\n InputStreamReader input = new InputStreamReader(url.openConnection().getInputStream());\n\n // use the tag stripper to strip most of the tags\n String result = ts.stripHTML(input);\n\n //print the result\n System.out.println(result);\n }", "public static String control_send_review_deletion_email_request() throws IOException {\r\n \r\n String output = \"\";\r\n String file_stream = \"\";\r\n \r\n if (send_review_deletion_email_request.equals(\"Delete\")) {\r\n \r\n connection = use_connection;\r\n \r\n set_security_code(new_security_code);\r\n set_row_id(row_id);\r\n set_item_id(item_id);\r\n \r\n if (change_security_code().equals(\"success\")) {\r\n\r\n if (!(search_particular_review().get(0).get(0).equals(\"fail\"))\r\n && !(search_particular_review().get(0).get(0).equals(\"no review\"))\r\n && search_particular_review().get(0).size() == 1) {\r\n \r\n URL url_for_post_request = new URL(Config.domain() + \"/third-party/email-forwarders/send-email-delete-review-request/\");\r\n \r\n Map<String, Object> parameter = new LinkedHashMap<>();\r\n \r\n parameter.put(\"domain\", Config.domain());\r\n parameter.put(\"row_id\", search_particular_review().get(0).get(0));\r\n parameter.put(\"item_id\", search_particular_review().get(1).get(0));\r\n parameter.put(\"rating\", search_particular_review().get(2).get(0));\r\n \r\n if (search_particular_review().get(3).get(0).equals(\"\")\r\n || search_particular_review().get(3).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"subject\", \"No subject\");\r\n } else {\r\n \r\n parameter.put(\"subject\", search_particular_review().get(3).get(0));\r\n }\r\n \r\n if (search_particular_review().get(4).get(0).equals(\"\")\r\n || search_particular_review().get(4).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"description\", \"No comment\");\r\n } else {\r\n \r\n parameter.put(\"description\", search_particular_review().get(4).get(0));\r\n }\r\n \r\n if (search_particular_review().get(5).get(0).equals(\"\")\r\n || search_particular_review().get(5).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"name\", \"Anonymous\");\r\n } else {\r\n \r\n parameter.put(\"name\", search_particular_review().get(5).get(0));\r\n }\r\n \r\n if (search_particular_review().get(6).get(0).equals(\"\")\r\n || search_particular_review().get(6).get(0).replaceAll(\" \", \"\").length() == 0) {\r\n \r\n parameter.put(\"email\", \"[email protected]\");\r\n } else {\r\n \r\n parameter.put(\"email\", search_particular_review().get(6).get(0));\r\n }\r\n \r\n parameter.put(\"security_code\", search_particular_review().get(7).get(0));\r\n \r\n StringBuilder post_data = new StringBuilder();\r\n \r\n for (Map.Entry<String, Object> each_parameter : parameter.entrySet()) {\r\n \r\n if (post_data.length() != 0) {\r\n \r\n post_data.append('&');\r\n }\r\n \r\n post_data.append(URLEncoder.encode(each_parameter.getKey(), \"UTF-8\"));\r\n post_data.append('=');\r\n post_data.append(URLEncoder.encode(String.valueOf(each_parameter.getValue()), \"UTF-8\"));\r\n }\r\n \r\n byte[] post_data_bytes = post_data.toString().getBytes(\"UTF-8\");\r\n \r\n HttpURLConnection file_connection = (HttpURLConnection)url_for_post_request.openConnection();\r\n file_connection.setRequestMethod(\"POST\");\r\n file_connection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n file_connection.setRequestProperty(\"Content-Length\", String.valueOf(post_data_bytes.length));\r\n file_connection.setDoOutput(true);\r\n file_connection.getOutputStream().write(post_data_bytes);\r\n \r\n Reader read_input = new BufferedReader(\r\n new InputStreamReader(file_connection.getInputStream(), \"UTF-8\"));\r\n \r\n for (int each_character; (each_character = read_input.read()) >= 0;) {\r\n \r\n file_stream += (char)each_character;\r\n }\r\n \r\n if (file_stream.equals(\"success\")) {\r\n \r\n Show_Reviews_Update.form_messages.add(\"success - send email delete review request\");\r\n } \r\n }\r\n }\r\n \r\n output = Show_Reviews_Update.show_form_messages();\r\n \r\n try {\r\n \r\n use_connection.close();\r\n } catch (SQLException e) {\r\n }\r\n \r\n Show_Reviews_Update.form_messages.clear();\r\n }\r\n \r\n return output;\r\n }", "public void VerifyCouponfieldsinCheckout(){\r\n\t\tString countriess1 = \"Denmark,France,PresselSwitzerland,Norway,Spain,BernardFrance,,BernardBelgium,PresselAustria,UK,PresselGermany\";\r\n\t\tString countriess2 = \"Germany,Spain\";\r\n\t\tString countriess3 = \"Netherland,Italy\";\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Cupon Input txt box and Apply button should be present\");\r\n\r\n\t\ttry{\r\n\t\t\tif(countriess1.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput3inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"3 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"3 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess2.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"1 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"1 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else if(countriess3.contains(countries.get(countrycount))){\r\n\t\t\t\tif(isElementPresent(locator_split(\"txtCouponinput1inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"txtCouponinput2inCheckout\")) &\r\n\t\t\t\t\t\tisElementPresent(locator_split(\"btnCuponApplybuttoninCheckout\"))){\r\n\t\t\t\t\tSystem.out.println(\"2 cupon input box and apply button is present for -\"+countries.get(countrycount));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tSystem.out.println(\"2 cupon or apply buttons is not present for -\"+countries.get(countrycount));\r\n\t\t\t\t\tthrow new Error();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"incorret country is entered in method for -\"+countries.get(countrycount));\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Incorrect country is entered in method for -\"+countries.get(countrycount)+\" or\"\r\n\t\t\t\t\t+ \" Element not found\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"imgShiptoStoreinCartinCheckout\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t\tcatch(Error e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t\tthrow new Error(\"Number of cupons is not matching for country or Apply button not present for-\"+countries.get(countrycount));\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"enter principal amount : \");\n\t\tdouble P = sc.nextInt();\n\t\tSystem.out.println(\"enter no of years: \");\n\t\tdouble Y = sc.nextInt();\n\t\tSystem.err.println(\"enter R percent: \");\n\t\tdouble R = sc.nextInt();\n\t\t\n\n\t\tutilities.payment(Y,R,P);\n\t}", "public void v_Verify_Guest5_Hidden(){\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int t = sc.nextInt();\n while (t-- > 0) {\n int n = sc.nextInt();\n int i =0;\n int[] page = new int[n];\n while (i< n){\n page[i] = sc.nextInt();\n i++;\n }\n int capacity = sc.nextInt();\n System.out.println(findNoOfPageFault(page,capacity));\n }\n\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(new BufferedReader(new StringReader(input)));\n\n long n = in.nextLong(); // Scanner has functions to read ints, longs, strings, chars, etc.\n for (int i = 0; i < n; i++) {\n int size = in.nextInt();\n int[][] matrix = new int[size][size];\n for (int j = 0; j < size; j++) {\n for (int k = 0; k < size; k++) {\n matrix[j][k] = in.nextInt();\n }\n }\n String result = vestigium(matrix, size);\n System.out.println(\"Case #\" + (i + 1) + \": \" + result);\n }\n }", "public static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Enter cutoff price for discount>>>\");\n\t\tprice = keyboard.nextDouble();\n\t\tSystem.out.print(\" Enter discount rate as a whole number>>>\");\n\t\tdiscount = keyboard.nextDouble();\n\t\tsavings = computeDiscountInfo(price, discount);\n\n\t\tSystem.out.println(\" Special this week on any service over \" + price);\n\t\tdisplayInfo();\n\t\tcomputeDiscountInfo(34, 34);\n\t}", "public void validateRequestToBuyPage(){\r\n\t\tsearchByShowMeAll();\r\n\t\tclickCheckboxAndRenewBuyButton();\r\n\t\tverifyRequestToBuyPage();\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner scnr = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"What kind of trip would you like to go on, musical, tropical, or adventurous? \");\n\t\tString vacationType = scnr.next();\n\t\t\n\t\tSystem.out.println(\"How many are in your group? \");\n\t\tint groupSize=0;\n\t\ttry {\n\t\t\tgroupSize = scnr.nextInt();\n\t\t\tString result = null;\n\t\t\tString destinationType = null;\n\t String travelType = null;\n\t\t\t \n\t //Vaction type \n\t\t\tif(vacationType.equalsIgnoreCase(\"Musical\")) {\n\t\t\t\tdestinationType=\"New Orleans\";\n\t\t\t}\n\t\t\telse if(vacationType.equalsIgnoreCase(\"Tropical\")) {\n\t\t\t\tdestinationType=\"Beach Vacation in Mexico\";\n\t\t\t}\n\t\t\telse if(vacationType.equalsIgnoreCase(\"Adventurous\")) {\n\t\t\t\tdestinationType=\"WhitewaternRating the Grand Canyon\";\n\t\t\t}\n\t\t\t\n\t\t\t//group size\n\t\t\tif(groupSize>=1 && groupSize<=2) {\n\t\t\t\ttravelType=\"First Class\";\n\t\t\t}\n\t\t\telse if(groupSize>=3 && groupSize<=5) {\n\t\t\t\ttravelType=\"Helicopter\";\n\t\t\t}\n\t\t\telse if(groupSize>=6) {\n\t\t\t\ttravelType=\"Charter Flight\";\n\t\t\t}\n\t\t\t\n\t\t\t//results\n\t\t\t\n\t\t\tif ( destinationType==null && travelType==null) {\n\t\t\t\tresult = \"unknown vacation type \"+ vacationType+\" there is no specific destination type Suggestion for the entered vacation Type and unknown group size \"+ groupSize+\", there is no specific Travel Suggestion for the entered Group Size\";\n\t System.out.println(\"\\n\\nINVALID INPUT\");\n\t System.out.println(\"**************\\n\");\n\t\n\t\t\t}\n\t\t else if(destinationType == null) {\n\t\t\t\tresult = \"unknown vacation type \"+ vacationType+\", there is no specific destination type Suggestion for the entered vacation Type\";\n\t System.out.println(\"\\n\\nINVALID INPUT\");\n\t System.out.println(\"**************\\n\");\n\t\n\t\t }\n\t\t\telse if (travelType ==null) {\n\t\t\t\tresult = \"unknown group size \"+ groupSize+\", there is no specific Travel Suggestion for the entered Group Size\";\n\t System.out.println(\"\\n\\nINVALID INPUT\");\n\t System.out.println(\"**************\\n\");\n\t\n\t\t\t}\t\t\n\t\t\telse {\n\t\t\t\tresult = \"since you're a group of \"+ groupSize+\" going on a \"+vacationType+\" vacation you should take a \"+travelType+\" to a \"+destinationType;\n\t System.out.println(\"\\n\\nVACATION DECISIONS\");\n\t System.out.println(\"******************\\n\");\n\t \n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(result);\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(\"\\n\\nINVALID INPUT\");\n System.out.println(\"**************\\n\");\n System.out.println(\"Available Vacation Types : Musical,Tropical,Adventurous\");\n System.out.println(\"Group size must be a number and > 0\");\n }\n\n\t}", "protected abstract void calculatePartialsPartialsPruning(double[] partials1, double[] matrices1,\n double[] partials2, double[] matrices2,\n double[] partials3);", "private boolean parseInput(byte[] input) {\r\n\t\tint p = 2;\t// pointer to first relevant character in input array\r\n\t\t// at least 13 bytes\r\n\t\tif(input.length > 12 && input.length < 500) {\r\n\t\t\tif(!(input[0] == (byte) 'A' && input[1] == (byte) '4')) return true;\r\n\t\t\t\r\n\t\t\tint checkSum = getByte(input[p]);\r\n\t\t\tif(debug) System.out.println(\"checkSum:\\t\\t\"+checkSum);\r\n\t\t\t\r\n\t\t\tint dataLength = getByte(input[p+1]) + ( getByte(input[p+2]) << 8 );\r\n\t\t\tif(debug) System.out.println(\"dataLength:\\t\"+dataLength); \r\n\t\t\t\r\n\t\t\t// ignore weird packets (usually 1st)\r\n\t\t\tif(dataLength > 1000) {\r\n\t\t\t\tif(debug) System.out.println();\r\n\t\t\t\treturn true;\t// return to clean out buffer\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint invDataLength = getByte(input[p+3]) + ( getByte(input[p+4]) << 8 );\r\n\t\t int check = ~invDataLength & 0xff;\r\n\t\t // TODO inverse check only works for 1-byte numbers \r\n\t\t\t\r\n\t\t int timestampLow = getByte(input[p+5]);\r\n\t\t int timestampSubseconds = getByte(input[p+6]) + ( getByte(input[p+7]) << 8 );\r\n\t\t float subseconds = timestampSubseconds / 65535.0f;\r\n\t\t if(debug) System.out.println(\"timestamp:\\t\\t\"+timestampLow+ \" + \"+ PApplet.nf(subseconds,1,2));\r\n\t\t \r\n\t\t int sequenceNo = getByte(input[p+8]);\r\n\t\t if(debug) System.out.println(\"sequenceNo:\\t\"+sequenceNo);\r\n\t\t\r\n\t\t byte[] data; \r\n\t\t try {\r\n\t\t data = PApplet.subset(input, p+9, dataLength);\r\n\t\t } catch (Exception e) {\r\n\t\t if(debug) System.out.println(\"ERROR: array not long enough for dataLength variable\");\r\n\t\t return false;\r\n\t\t }\r\n\t\t \r\n\t\t int dataType = getByte(data[0]);\r\n\t\t String dataTypeStr = getDataType(dataType);\r\n\t\t if(debug) System.out.println(\"dataType:\\t\\t\"+dataType+ \" (\"+dataTypeStr+\")\");\r\n\t\t \r\n\t\t int sum = 0;\r\n\t\t for(int i=0; i<data.length; i++) {\r\n\t\t sum+= getByte(data[i]);\r\n\t\t }\r\n\t\t if(debug) System.out.print(\"sum:\\t\\t\");\r\n\t\t if((sum%256) == checkSum) {\r\n\t\t \tif(debug) System.out.println(\"VALID\");\r\n\t\t } else {\r\n\t\t \tif(debug) System.out.println(\"SUM ERROR\");\r\n\t\t \treturn true;\t// return to clear out buffer\r\n\t\t }\r\n\t\t \r\n\t\t if(debug) System.out.print(\"data:\\t\\t\");\r\n\t\t for(int i=0; i<data.length; i++) {\r\n\t\t if(debug) System.out.print(getByte(data[i])+\" \");\r\n\t\t }\r\n\t\t if(debug) System.out.println();\r\n\t\t \r\n\t\t if(dataTypeStr == \"ZeoTimestamp\") {\r\n\t\t \t_timestamp = getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t \tif(debug) System.out.println(\"_timestamp:\\t\"+_timestamp);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"Version\") {\r\n\t\t _version = getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t if(debug) System.out.println(\"_version:\\t\"+_version);\r\n\t\t }\r\n\t\t \r\n\t\t // skip packet until version and timestamps arrive\r\n\t\t if(_timestamp == 0 || _version == 0) {\r\n\t\t if(debug) System.out.println();\r\n\t\t return true;\t// return and clear buffer \r\n\t\t }\r\n\t\t \r\n\t\t // construct full timestamp\r\n\t\t long timestamp = 0;\r\n\t\t if((_timestamp & 0xff) == timestampLow) timestamp = _timestamp;\r\n\t\t else if(((_timestamp -1) & 0xff) == timestampLow) timestamp = _timestamp - 1;\r\n\t\t else if(((_timestamp +1) & 0xff) == timestampLow) timestamp = _timestamp + 1;\r\n\t\t else timestamp = _timestamp;\r\n\t\t \r\n\t\t \r\n\t\t if(debug) {\r\n\t\t \tDate ts = new Date(timestamp);\r\n\t\t \tSystem.out.println(\"date:\\t\\t\"+ts);\r\n\t\t }\r\n\t\t \r\n\t\t // pass on data\r\n\t\t _slice.setTime(timestamp);\r\n\r\n\t\t if(dataTypeStr == \"FrequencyBins\") {\r\n\t\t _slice.setBins(data);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"SleepStage\") {\r\n\t\t \tsleepState = getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t if(debug) System.out.println(\"sleepstage:\\t\"+sleepState);\r\n\t\t triggerZeoSleepStateEvent();\r\n\t\t }\r\n\t\t \r\n\t\t _slice.setSleepState(sleepState);\r\n\t\t \r\n\t\t if(dataTypeStr == \"Waveform\") {\r\n\t\t _slice.setWaveForm(data);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"Impedance\") {\r\n\t\t \t_slice.impedance = (long) getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"BadSignal\") {\r\n\t\t \t_slice.badSignal = (long) getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"SQI\") {\r\n\t\t \t_slice.SQI = (long) getByte(data[1]) + (getByte(data[2]) << 8) + (getByte(data[3]) << 16) + (getByte(data[4]) << 24);\r\n\t\t }\r\n\t\t \r\n\t\t if(dataTypeStr == \"SliceEnd\") {\r\n\t\t // set public slice to tmp slice\r\n\t\t slice = _slice;\r\n\t\t // empty _slice\r\n\t\t _slice = new ZeoSlice();\r\n\t\t \r\n\t\t triggerZeoSliceEvent();\r\n\t\t }\r\n\t\t \r\n\t\t if(debug) System.out.println(); \r\n\t\t return true;\r\n\t\t} else return false; // return and keep buffer, because not long enough\r\n\t\t \r\n\t}", "public void processInput() {\n\n\t}" ]
[ "0.53641754", "0.5150743", "0.50554556", "0.5052145", "0.4971604", "0.47407994", "0.47289553", "0.47270685", "0.4682532", "0.46757168", "0.46683633", "0.46092156", "0.46083394", "0.45887202", "0.4582364", "0.45708612", "0.45651773", "0.4560604", "0.4560149", "0.45407024", "0.45269397", "0.452101", "0.45148733", "0.45040938", "0.44772232", "0.44674772", "0.44651183", "0.44594616", "0.44558707", "0.44479945", "0.4433493", "0.44264606", "0.44261035", "0.44257554", "0.44242248", "0.44229499", "0.44217747", "0.44196355", "0.44127938", "0.44124085", "0.44102392", "0.44015437", "0.43992886", "0.43957236", "0.43932652", "0.43910345", "0.43884894", "0.43773702", "0.4369262", "0.43687633", "0.43611157", "0.43596035", "0.43559313", "0.43552095", "0.4350072", "0.43482804", "0.43463454", "0.43416137", "0.43400073", "0.43384683", "0.43379828", "0.4337692", "0.43258265", "0.43119177", "0.43095663", "0.43072918", "0.4305316", "0.43049774", "0.43046436", "0.43034476", "0.43003994", "0.4300378", "0.42978856", "0.42968792", "0.42963302", "0.42914712", "0.4291406", "0.4289991", "0.42878613", "0.4281343", "0.4280021", "0.42757294", "0.4273019", "0.42725828", "0.42723495", "0.42701048", "0.42696866", "0.42683142", "0.4268247", "0.42681572", "0.42670214", "0.42665988", "0.42640835", "0.42612618", "0.42552862", "0.4254686", "0.42537704", "0.4246046", "0.42419508", "0.4239743" ]
0.6387492
0
Adds a value change listener. Anytime readable property value changes, the listener will be notified.
void addChangeListener(PropertyChangeListener<? super R> listener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addPropertyChangeListener(PropertyChangeListener listener);", "void addPropertyChangeListener(PropertyChangeListener listener);", "private static void usePropertyChangeListener() {\n SimpleStringProperty stringProperty = new SimpleStringProperty(\"xyz\");\n // Prints property's value\n System.out.println(stringProperty.getValue());\n // Adds a listener - action that will be run if property's value changes.\n stringProperty.addListener((observable, oldValue, newValue) -> {\n System.out.println(\"New value is set: \" + newValue);\n });\n // Sets new value\n stringProperty.setValue(\"Some new value\");\n }", "public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n }", "public abstract void addPropertyChangeListener(IPropertyChangeListener listener);", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n }", "public void addPropertyChangeListener(PropertyChangeListener l);", "public abstract void addPropertyChangeListener(PropertyChangeListener listener);", "public void addPropertyChangeListener(@NotNull PropertyChangeListener listener) {\n }", "@Override\n\tpublic void addValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}", "@Override\n public void addPropertyChangeListener(PropertyChangeListener listener)\n {\n if (changes == null)\n {\n changes = new PropertyChangeSupport(this);\n }\n changes.addPropertyChangeListener(listener);\n }", "void addPropertyListener(PropertyListener listener);", "public void addPropertyChangeListener(PropertyChangeListener listener) {\n\n\t}", "@Override\n public void addChangeListener(ChangeListener l) {}", "void addChangeListener(ChangeListener listener);", "public void onValueChange(final ChangeListener listener) {\n\t\tchangeListener = listener;\n\t\treturn;\n\t}", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().addPropertyChangeListener(listener);\r\n}", "@Override\n public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n listeners = new PropertyChangeSupport(this);\n }\n listeners.addPropertyChangeListener(listener);\n }", "void addChangeListener(ChangeListener cl);", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "@Override\n public void addChangeListener(ChangeListener l) {\n }", "default void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }", "public void addPropertyChangeListener(PropertyChangeListener listener) {\n \tmPropertyChangeSupport.addPropertyChangeListener(listener);\n }", "public synchronized void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().addPropertyChangeListener(listener);\n\t}", "public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addChangeListener(ChangeListener l) {\n }", "public void addListener(PropertyChangeListener listener, String propertyType);", "public String listen(String key, PropertyChangedCallback callback);", "public synchronized void addValueChangedListener(ValueChangedListener listener) {\n\t\tif (listener == null) {\n\t\t\tthrow new NullPointerException(\"Listener must not be null\"); \n\t\t}\n\t\tif (listeners == null) {\n\t\t\tlisteners = new ValueChangedListener[] { listener };\n\t\t} else {\n\t\t\tValueChangedListener[] tmp = new ValueChangedListener[listeners.length + 1];\n\t\t\tSystem.arraycopy(listeners, 0, tmp, 0, listeners.length);\n\t\t\ttmp[listeners.length] = listener;\n\t\t\tlisteners = tmp;\n\t\t}\n\t}", "public void addPropertyChangeListener(PropertyChangeListener listener) {\n\t\tthis.propertyChangeSupport.addPropertyChangeListener(listener);\n\t\tthis.messages.addPropertyChangeListener(listener);\n\t\tthis.endGameReached.addPropertyChangeListener(listener);\n\t}", "public void addChangeListener(ChangeListener listener) { _changeListeners.add(listener); }", "public void setChangeListener();", "public synchronized void addPropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n listeners = new java.util.Vector();\n }\n listeners.addElement(listener);\n }", "void addCalcValueListener(CalcValueListener l);", "public void addListener(ValueChangedListener listener) {\n\t\t_listenerManager.addListener(listener);\n\t}", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener( l );\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\r\n propertyChangeSupport.addPropertyChangeListener(l);\r\n }", "public void addPropertyChangeListener(PropertyChangeListener l) {\n getPropertyChangeSupport().addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\tmPcs.addPropertyChangeListener(listener);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.addPropertyChangeListener(l);\n }", "public void addPropertyChangeListener (PropertyChangeListener l)\n { pcs.addPropertyChangeListener (l); }", "public interface OnValueChangeListener {\n void onChanged(String fieldName, Object oldValue, Object newValue);\n}", "public void addPropertyChangeListener(PropertyChangeListener listener) {\n listeners.removePropertyChangeListener(listener);\n listeners.addPropertyChangeListener(listener);\n }", "public void addPropertyChangeListener (PropertyChangeListener l) {\n pcs.addPropertyChangeListener (l);\n }", "void onPropertyChange(String name, String newValue);", "public void addPropertyChangeListener(Property property, PropertyChangeListener listener) {\n this.propertyChangeSupport.addPropertyChangeListener(property.name(), listener);\n }", "public synchronized void addPropertyChangeListener(PropertyChangeListener l) {\n if (propertySupport == null) {\n propertySupport = new PropertyChangeSupport(this);\n }\n\n propertySupport.addPropertyChangeListener(l);\n }", "static public void addPropertyChangeListener(PropertyChangeListener l) {\n if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {\n accessibilityListener.installListeners();\n }\n listenerList.add(PropertyChangeListener.class, l);\n }", "public void addPropertyChangeListener(PropertyChangeListener pListener) {\n \tmodel.addPropertyChangeListener(pListener);\n }", "void onChangeEvent(CarPropertyValue value);", "public final void addPropertyChangeListener (PropertyChangeListener pl) {\n if (changeSupport == null)\n changeSupport = new PropertyChangeSupport (this);\n changeSupport.addPropertyChangeListener (pl);\n }", "public synchronized void addPropertyChangeListener(PropertyChangeListener l) {\n addLImpl(null, l);\n }", "public void addPropertyChangeListener (\n String propertyName,\n PropertyChangeListener l\n ) {\n pcs.addPropertyChangeListener (propertyName, l);\n }", "void valueChanged(T oldValue, T newValue);", "public interface ChangeListener {\n\t\tpublic void onValueChange(FloatPicker fpw, float value);\n\t}", "PropertyChangeListener[] getPropertyChangeListeners();", "public void addChangeListener (ChangeListener listener)\n {\n listenerList.add(ChangeListener.class, listener);\n }", "public void addChangeListener(ChangeListener listener)\r\n {\r\n listeners.add(listener);\r\n }", "void addListener(ChangeListener<? super T> listener);", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}", "public void addListener(@NotNull ValueListener<V> listener) {\n\t\tif (valueListeners.contains(listener)) {\n\t\t\treturn;\n\t\t}\n\t\tthis.valueListeners.add(listener);\n\t}", "@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\n\t}", "public void addPropertyChangeListener(PropertyChangeListener pcl) {\n\t\tproperties.addListener(pcl);\n\t}", "protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}", "public void addPropertyChangeListener(final PropertyChangeListener thePcl) {\n myPcs.addPropertyChangeListener(thePcl);\n }", "void addChangeListener( RegistryListener listener );", "@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0)\n\t{\n\t\t\n\t}", "public PropertyChangeListener[] getPropertyChangeListeners();", "protected PropertyChangeListener createPropertyChangeListener() {\n return new PropertyChangeHandler(); }", "public void addChangeListener(ChangeListener listener) {\n\t\tchangeListeners.add(listener);\n\t}", "public interface ValueChangeListener {\n public void onValueChange(CustomComponent view, String value);\n}", "public synchronized void addPropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n Iterator<WeakReference<PropertyChangeListener>> i = listeners.iterator();\r\n boolean add = true;\r\n\r\n while (i.hasNext()) {\r\n PropertyChangeListener l = i.next().get();\r\n\r\n if (l == null)\r\n i.remove();\r\n else if (l.equals(listener))\r\n add = false;\r\n }\r\n if (add && listeners.add(new WeakReference<>(listener))\r\n && !this.added) {\r\n addThisToNotifier();\r\n this.added = true;\r\n }\r\n }", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\r\n\t}", "public interface CalcValueListener {\n\n\t/**\n\t * Method notifies the implementing class that a value has changed.\n\t * \n\t * @param model\n\t * implementation of the CalcModel\n\t */\n\tvoid valueChanged(CalcModel model);\n}", "void addPropertyChangedObserver(PropertyChangeObserver observer);", "protected void addListenerForProperty(MapChangeListener<Object, Object> aMapChangeListener, String aProperty) {\n\n // Create a wrapper, which will only trigger the given Listener when the given property has changed.\n MapChangeListener<Object, Object> tmpListenerWrapper = (aChange -> {\n\n // Current document changed?\n if (aChange.getKey().equals(aProperty)) {\n\n aMapChangeListener.onChanged(aChange);\n }\n });\n\n // Add the wrapper listener to our List of added Listeners\n stagePropertiesListenersList.add(tmpListenerWrapper);\n\n // Add it to the stage properties.\n stage.getProperties().addListener(tmpListenerWrapper);\n }", "@Override\n\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\n\t}", "public void setOnPropertyChangedListener(OnPropertyChangedListener l){\n _onPropertyChange = l;\n }", "@Override\n \tpublic void propertyChange(PropertyChangeEvent arg0) {\n \t\t\n \t}", "public void valueChanged(ConfigurationIdentifier configurationIdentifier, Serializable value);", "@Override\n public void addPropertyChangeListener( String propertyName, PropertyChangeListener listener )\n {\n if( componentModel == null )\n return;\n\n if( propertyName==null )\n {\n componentModel.addPropertyChangeListener( listener );\n }\n else\n {\n Property prop = componentModel.findProperty( propertyName );\n if ( prop != null )\n {\n prop.addPropertyChangeListener( listener );\n }\n }\n }", "public interface OnSensorValueChangeListener {\n public void onSensorValueChanged(int newVal);\n}", "public abstract void addPropertyChangeListener(PropertyChangeListener listener, String kenaiHostUrl);", "void addModelEventListener(PropertyChangeListener listener, Object modelelement);", "public void addChangeListener(ChangeListener listener) {\n listenerList.add(ChangeListener.class, listener);\n }", "public void addPropertyChangeListener(String propertyName, java.beans.PropertyChangeListener listener) {\n\tmPcs.addPropertyChangeListener(propertyName, listener);\n }", "void addModelEventListener(PropertyChangeListener listener, Object modelelement, String propertyName);", "public void setPropertyChanged(com.app.tvp.cas.cliente.PropertyChangedEventHandler propertyChanged) {\n this.propertyChanged = propertyChanged;\n }", "public void addChangeListener(ChangeListener listener) {\n changeListeners.add(ChangeListener.class, listener);\n }", "public void valueChanged(IntegerStorageChange change);", "public void addCellValueListener(CellValueListener listener) {\n\t\tctx.getListenerList(sheetIndex).add(listener);\n\t}", "public void addPropertyChangeListener(ActionListener<PropertyChangeEvent> l) {\n if (root != null) {\n Property prop = property;\n if (prop == null && tags != null) {\n prop = root.getEntity().findProperty(tags);\n }\n if (prop != null) {\n root.getEntity().addPropertyChangeListener(prop, pcl());\n }\n } else {\n Entity leafEntity = getLeafEntity();\n Property leafProperty = getLeafProperty();\n if (leafEntity != null && leafProperty != null) {\n leafEntity.getEntity().addPropertyChangeListener(leafProperty, pcl());\n }\n parent.addVetoablePropertyChangeListener(vpcl());\n parent.addListChangeListener(listChangeListener());\n }\n if (listeners == null) {\n listeners = new EventDispatcher();\n }\n listeners.addListener(l);\n \n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "public void addChangeListener(ChangeListener l) {\r\n listenerList.add(ChangeListener.class, l);\r\n }", "@Override\n public void addListener(ChangeListener<? super String> listener) {\n }", "void addChangeListener(Consumer<ConfigurationSourceChangeEvent> changeListener);" ]
[ "0.7159817", "0.7152365", "0.7109498", "0.70381546", "0.6993073", "0.6991143", "0.69808644", "0.6969142", "0.6951882", "0.6874819", "0.6868556", "0.685957", "0.685276", "0.6844102", "0.68396735", "0.6801777", "0.6797266", "0.6738649", "0.66536707", "0.6652634", "0.6652634", "0.66448295", "0.6606745", "0.65918905", "0.6581189", "0.6547298", "0.6547298", "0.6511817", "0.648698", "0.6486377", "0.6468429", "0.6454683", "0.6454031", "0.6423451", "0.639956", "0.63886714", "0.63846886", "0.6376037", "0.63748044", "0.6362052", "0.63361746", "0.63361746", "0.63361746", "0.63044375", "0.6278481", "0.62681276", "0.62462205", "0.6232506", "0.616616", "0.61421174", "0.6135262", "0.6134893", "0.6131215", "0.61129946", "0.610402", "0.6103924", "0.61011", "0.60718894", "0.6070749", "0.60339236", "0.6020841", "0.6014448", "0.6013689", "0.6013689", "0.60074794", "0.60012966", "0.6001166", "0.5972948", "0.5954741", "0.59543514", "0.59424365", "0.5928714", "0.592428", "0.5920913", "0.5900315", "0.5893157", "0.5885295", "0.5875786", "0.58587354", "0.5853832", "0.58512634", "0.58471435", "0.5828143", "0.58240545", "0.58234745", "0.5812624", "0.5798487", "0.5790126", "0.57883364", "0.5774661", "0.57651424", "0.5761297", "0.5759617", "0.57541203", "0.5746537", "0.5746525", "0.57380825", "0.57380825", "0.5711679", "0.5697553" ]
0.720747
0
Removes the value change listener.
void removeChangeListener(PropertyChangeListener<? super R> listener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void removeValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}", "void removeCalcValueListener(CalcValueListener l);", "public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}", "@Override\r\n public void rmValueListener(PropertyChangeListener l) {\n\r\n }", "public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }", "public void removeListener(@NotNull ValueListener<V> listener) {\n\t\tlistener.listenerDetached();\n\t\tvalueListeners.remove(listener);\n\t}", "public synchronized void removeValueChangedListener(ValueChangedListener listener) {\n\t\tif (listeners != null && listeners.length > 0) {\n\t\t\tValueChangedListener[] tmp = new ValueChangedListener[listeners.length - 1];\n\t\t\tint idx = 0;\n\t\t\tfor (int i = 0; i < listeners.length; i++) {\n\t\t\t\tif (listeners[i] != listener) {\n\t\t\t\t\tif (idx == tmp.length) {\n\t\t\t\t\t\t// the listener was not registerd\n\t\t\t\t\t\treturn; // early exit\n\t\t\t\t\t}\n\t\t\t\t\ttmp[idx++] = listeners[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tlisteners = tmp;\n\t\t}\n\t}", "public void removeChangeListener(ChangeListener l) {\n\t\t//do nothing\n\t}", "@Override\n public void removePropertyChangeListener(PropertyChangeListener listener) {\n\n }", "public void removePropertyChangeListener(PropertyChangeListener l);", "void removeListener(ChangeListener<? super T> listener);", "public void removePropertyChangeListener(PropertyChangeListener listener);", "public void removeCellValueListener(CellValueListener listener) {\n\t\tctx.getListenerList(sheetIndex).remove(listener);\n\t}", "public void removePropertyChangeListener(PropertyChangeListener listener)\n {\n }", "@Override\n\tpublic void removePropertyChangeListener(PropertyChangeListener l) {\n\t\t//do nothing\n\t}", "public void removePropertyChangeListener (PropertyChangeListener l)\n { pcs.removePropertyChangeListener (l); }", "public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\tgetPropertyChange().removePropertyChangeListener(listener);\r\n}", "public void removePropertyChangeListener (PropertyChangeListener l) {\n pcs.removePropertyChangeListener (l);\n }", "void removePropertyChangeListener(PropertyChangeListener listener);", "void removePropertyChangeListener(PropertyChangeListener listener);", "public abstract void removePropertyChangeListener(PropertyChangeListener listener);", "@Override\n public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\n if (listeners != null) {\n listeners.removePropertyChangeListener(listener);\n }\n }", "public void removeChangeListener(ChangeListener listener) {\n\t\tchangeListeners.remove(listener);\n\t}", "public void stopListening(){\n\t\tcv.getConfigurer().getControlFieldProvider().removeChangeListener(this);\n\t}", "public void removePropertyChangeListener(PropertyChangeListener listener) {\n\n\t}", "public void removeChangeListener(ChangeListener<BufferedImage> listener) {\n observer.remove(listener);\n }", "public abstract void removePropertyChangeListener(IPropertyChangeListener listener);", "@Override\n public void removeListener(ChangeListener<? super String> listener) {\n }", "public void removePropertyChangeListener(PropertyChangeListener listener) {\n \tmPropertyChangeSupport.removePropertyChangeListener(listener);\n }", "default void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n }", "public void removeOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.remove(listener);\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\r\n propertyChangeSupport.removePropertyChangeListener(l);\r\n }", "@Override\r\n protected void unregisterChangeListener()\r\n {\r\n getTabbedPane().removeChangeListener(this);\r\n }", "public void removePropertyChangeListener(@NotNull PropertyChangeListener listener) {\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener( l );\n }", "public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\r\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\r\n\t}", "public void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\tmPcs.removePropertyChangeListener(listener);\n }", "@Override\r\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\r\n\t\tchangeNotifier.removeListener(notifyChangedListener);\r\n\t}", "public synchronized void removeChangeListener(ChangeListener l) {\n if (changeListeners != null && changeListeners.contains(l)) {\n Vector v = (Vector) changeListeners.clone();\n v.removeElement(l);\n changeListeners = v;\n }\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }", "public void removePropertyChangeListener(java.beans.PropertyChangeListener l) {\n propertyChangeSupport.removePropertyChangeListener(l);\n }", "public synchronized void removePropertyChangeListener(java.beans.PropertyChangeListener listener) {\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\n\t}", "public void removeChangeListener(ChangeListener stackEngineListener);", "public void removePropertyChangeListener(PropertyChangeListener l) {\n getPropertyChangeSupport().removePropertyChangeListener(l);\n }", "@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}", "@Override\n\tpublic void removeListener(INotifyChangedListener notifyChangedListener) {\n\t\tchangeNotifier.removeListener(notifyChangedListener);\n\t}", "public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\r\n\t\tgetPropertyChange().removePropertyChangeListener(listener);\r\n\t}", "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public void removeChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n listeners.remove(listener);\n }", "public void removeListener(PropertyChangeListener listener, String propertyType);", "public void removeListener(ICdtVariableChangeListener listener){\n\t\tfListeners.remove(listener);\n\t}", "public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n return;\n }\n listeners.removeElement(listener);\n }", "public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener) {\n }", "public void removeChangeListener(ChangeListener listener) {\n listenerList.remove(ChangeListener.class, listener);\n }", "public void onValueChange(final ChangeListener listener) {\n\t\tchangeListener = listener;\n\t\treturn;\n\t}", "public void clearChangeListeners() {\n observer.clear();\n }", "protected void uninstallListeners() {\n spinner.removePropertyChangeListener(propertyChangeListener); }", "public void removePropertyChangeListener(PropertyChangeListener pListener) {\n \tmodel.removePropertyChangeListener(pListener);\n }", "public synchronized void removePropertyChangeListener(PropertyChangeListener l) {\n if (propertySupport != null) {\n propertySupport.removePropertyChangeListener(l);\n }\n }", "public void removeChangeListener(final ChangeListener listener) {\n listeners.remove(ChangeListener.class, listener);\n }", "public void removePropertyChangeListener(PropertyChangeListener listener) {\n\t\tthis.propertyChangeSupport.removePropertyChangeListener(listener);\n\t}", "@Override\n public void removeListener(InvalidationListener listener) {\n }", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement);", "void removePropertyChangedObserver(PropertyChangeObserver observer);", "public synchronized void removePropertyChangeListener(PropertyChangeListener l) {\n int cnt = listeners.size();\n for (int i = 0; i < cnt; i++) {\n Object o = ((WeakReference)listeners.get(i)).get();\n if (o == null || o == l) { // remove null references and the required one\n listeners.remove(i);\n interestNames.remove(i);\n i--;\n cnt--;\n }\n }\n }", "protected void uninstallListeners() {\n frame.removePropertyChangeListener(propertyChangeListener);\n }", "@SuppressWarnings(\"unused\")\r\n public synchronized void removePropertyChangeListener(PropertyChangeListener listener)\r\n {\r\n Iterator<WeakReference<PropertyChangeListener>> i = listeners.iterator();\r\n while (i.hasNext()) {\r\n PropertyChangeListener l = i.next().get();\r\n\r\n if ((l == null) || l.equals(listener))\r\n i.remove();\r\n }\r\n if (this.added && (listeners.size() == 0)) {\r\n removeThisFromNotifier();\r\n this.added = false;\r\n }\r\n }", "@Override\n\tpublic void removeGraphChangeListener(GraphChangeListener<N, ET> listener)\n\t{\n\t\tgcs.removeGraphChangeListener(listener);\n\t}", "public final void removePropertyChangeListener (PropertyChangeListener pl) {\n if (changeSupport == null)\n return;\n changeSupport.removePropertyChangeListener (pl);\n }", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}", "public void removeAllObjectChangeListeners()\n\t{\n\t\tlistenerList = null;\n\t}", "static public void removePropertyChangeListener(PropertyChangeListener l) {\n listenerList.remove(PropertyChangeListener.class, l);\n if (listenerList.getListenerCount(PropertyChangeListener.class) == 0) {\n accessibilityListener.removeListeners();\n }\n }", "public void removeDeepChangeListener(DeepChangeListener aLstnr) { removeListener(DeepChangeListener.class, aLstnr); }", "public void removeRatioListener(IRatioListener listener)\r\n {\r\n ratioListeners.remove(listener);\r\n }", "void removeModelEventListener(UmlChangeListener listener, Object modelelement, String propertyName);", "public void removePropertyChangeListener(final PropertyChangeListener thePcl) {\n myPcs.removePropertyChangeListener(thePcl);\n }", "@Override\n\tpublic void removeSelectionChangeListener(SelectionChangeListener listener) {\n\n\t}", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement, String propertyName);", "public void unregisterListeners(){\n listeners.clear();\n }", "@Override\n public void removeChangeListener(ChangeListener listener, Event[] events) {\n boolean addEvent[] = selectEventsToModify(events);\n if (addEvent[Event.LOAD.ordinal()]) {\n loadListeners.removeChangeListener(listener);\n }\n if (addEvent[Event.STORE.ordinal()]) {\n storeListeners.removeChangeListener(listener);\n }\n if (addEvent[Event.REMOVE.ordinal()]) {\n removeListeners.removeChangeListener(listener);\n }\n }", "public void removePropertyChangeListener (\n String propertyName,\n PropertyChangeListener l\n ) {\n pcs.removePropertyChangeListener (propertyName, l);\n }", "public void removeListeners() {\n listeners = new ArrayList<MinMaxListener>();\n listeners.add(evalFct);\n }", "@Override\n public void removePropertyChangeListener( String propertyName,PropertyChangeListener listener )\n {\n if( componentModel == null )\n return;\n\n if( propertyName==null )\n {\n componentModel.removePropertyChangeListener( listener );\n }\n else\n {\n Property prop = componentModel.findProperty( propertyName );\n if ( prop != null )\n {\n prop.removePropertyChangeListener( listener );\n }\n }\n }", "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "void removePropertyListener(PropertyListener listener);", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "private void unregisterListener() {\n mSensorManager.unregisterListener(this);\n }", "void removeListener(MapChangeListener<? super K, ? super V> listener);", "public void removeListener(INotifyChangedListener notifyChangedListener)\n {\n changeNotifier.removeListener(notifyChangedListener);\n }", "public void removeRegistrationStateChangeListener(RegistrationStateChangeListener listener)\n {\n synchronized (registrationListeners) {\n registrationListeners.remove(listener);\n }\n }", "public void clearRegistrationStateChangeListener()\n {\n synchronized (registrationListeners) {\n registrationListeners.clear();\n }\n }", "public static void removeGenomeChangedListener(Listener<GenomeChangedEvent> l) {\n genomeController.removeListener(l);\n }", "public abstract void removePropertyChangeListener(PropertyChangeListener listener, String kenaiHostUrl);", "@Override\n protected void componentClosed() {\n WindowManager.getDefault().getRegistry().removePropertyChangeListener(this);\n }", "protected void uninstallListeners() { this.tipPane.removePropertyChangeListener(this.changeListener); }", "@Override\n public void onValueDeselected() {\n\n }", "@Override\n public void onValueDeselected() {\n\n }", "@Override\n public void onValueDeselected() {\n\n }" ]
[ "0.8324176", "0.7897351", "0.78724277", "0.7768827", "0.77495235", "0.76509666", "0.76424426", "0.75186044", "0.74569386", "0.74160016", "0.740847", "0.73994607", "0.7391362", "0.7351587", "0.7307303", "0.7291448", "0.72526973", "0.72405565", "0.7239652", "0.7239652", "0.72189033", "0.72055626", "0.7199648", "0.7174685", "0.71505755", "0.7092901", "0.7082708", "0.7069011", "0.70594597", "0.7049863", "0.7045333", "0.70064086", "0.6994611", "0.69803834", "0.697634", "0.69724345", "0.69718486", "0.6968089", "0.6964264", "0.6960759", "0.6960759", "0.6960759", "0.6957059", "0.6928615", "0.6912976", "0.6908274", "0.6908274", "0.68998265", "0.6884647", "0.68736035", "0.68657804", "0.686276", "0.6857723", "0.6853916", "0.6838101", "0.68143165", "0.6810714", "0.6737837", "0.67315006", "0.6724222", "0.6720229", "0.67165595", "0.6715289", "0.67072225", "0.67001253", "0.6671251", "0.66674733", "0.66669697", "0.6660603", "0.66598004", "0.66526234", "0.66429406", "0.66429406", "0.6629448", "0.6628167", "0.65942544", "0.6560983", "0.6532", "0.65096635", "0.6506658", "0.6493767", "0.64670336", "0.6465188", "0.64625514", "0.64503187", "0.64413434", "0.644059", "0.6438837", "0.6428864", "0.6427756", "0.6415564", "0.6405441", "0.63883406", "0.638647", "0.63791573", "0.63727283", "0.6347769", "0.63217264", "0.63217264", "0.63217264" ]
0.7274108
16
Gets the value of the property.
R getValue();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public Object getValue()\n {\n return getProperty(VALUE_KEY);\n }", "public String getPropValue() {\n return propValue;\n }", "public String getValueProperty() {\r\n return getAttributeAsString(\"valueProperty\");\r\n }", "Property getProperty();", "Property getProperty();", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "public String get() {\n return this.value;\n }", "public String getProperty();", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue(){\n\t\treturn _value;\n\t}", "public String getValue(){\n\t\treturn this.value;\n\t}", "public String getValue() {\n return getMethodValue(\"value\");\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n\t\tString value;\n\t\ttry {\n\t\t\tvalue = this.getString(\"value\");\n\t\t} catch (Exception e) {\n\t\t\tvalue = null;\n\t\t}\n\t\treturn value;\n\t}", "public String getValue()\n {\n return this.value;\n }", "public String getValue(String key) {\r\n\t\t\treturn prop.getProperty(key);\r\n\t\t}", "public String get() {\n return value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public String getValue() {\r\n\t\treturn value;\r\n\t}", "public String getValue() {\n\t\treturn mValue;\n\t}", "public String getValue()\r\n\t{\r\n\t\treturn value;\r\n\t}", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String get()\n {\n return val;\n }", "public String getValue()\n {\n return value;\n }", "public final Object get() {\n return getValue();\n }", "public Object getValue() {\n\t\t\treturn value;\n\t\t}", "public String getProperty() {\n Object ref = property_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getProperty() {\n Object ref = property_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n property_ = s;\n return s;\n }\n }", "public String getValue() {\n\n return this.value;\n\n }", "public String getValue()\n {\n return value;\n }", "public Object getValue()\r\n {\r\n return this.value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n\t\t\treturn mValue;\r\n\t\t}", "public Property getProperty() {\n\t\treturn _property;\n\t}", "public String getValue()\n {\n return mValue;\n }", "public Object getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\n\t\treturn value;\n\t}", "public String getValue()\n {\n return value;\n }", "public String getValue()\n {\n return value;\n }", "@Override\n public V getValue() {\n return m_value;\n }", "public java.lang.String getValue() {\n return value;\n }", "java.lang.String getProperty();", "public String getValue() {\n return value;\n }", "@JSProperty\n String getValue();", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public Object getValue() {\n return value;\n }", "public String getValue() {\n\t\treturn (String) get_Value(\"Value\");\n\t}", "V getValue() {\n return value;\n }", "@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}", "public Object getValue() {\r\n return value;\r\n }", "String getProperty();", "String getProperty();", "String getProperty();", "public String getValue () { return value; }", "@JsProperty String getValue();", "public String getValue(){\n return this.value;\n }", "@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}", "public Object getValue() { return this.value; }", "public String getValue(String key) {\n\t\t\treturn properties.get(key);\n\t\t}", "public final DoubleProperty valueProperty() {\n return value;\n }", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "<T> T getValue(Property<T> property);", "public String getValue() { return value; }" ]
[ "0.7723105", "0.7634112", "0.75822175", "0.7447672", "0.7447672", "0.7445438", "0.73201835", "0.7238095", "0.7236115", "0.7236115", "0.7236115", "0.7225842", "0.7221162", "0.71840405", "0.71759754", "0.71759754", "0.71759754", "0.71759754", "0.71759754", "0.71759754", "0.71759754", "0.71753794", "0.7171579", "0.716961", "0.7169348", "0.71592027", "0.71592027", "0.71592027", "0.71592027", "0.71592027", "0.7156913", "0.7152899", "0.7130249", "0.7125673", "0.7123757", "0.7123757", "0.7123757", "0.7123757", "0.7123757", "0.71171916", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.7116873", "0.711544", "0.71138877", "0.7111816", "0.71117723", "0.71117246", "0.71115184", "0.7100736", "0.70973676", "0.7097351", "0.70913434", "0.7089162", "0.7081685", "0.7070158", "0.70671326", "0.70671326", "0.70639145", "0.70639145", "0.70602775", "0.7045338", "0.70423424", "0.7041723", "0.70247287", "0.70206326", "0.70206326", "0.70206326", "0.70206326", "0.70206326", "0.70083934", "0.69942075", "0.69927347", "0.6992064", "0.69895965", "0.69895965", "0.69895965", "0.6986528", "0.6981574", "0.6974903", "0.6969018", "0.6955062", "0.6944187", "0.6942344", "0.69149184", "0.69067377", "0.69062024" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column favortie.favortieid
public Integer getFavortieid() { return favortieid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "MemberFav selectByPrimaryKey(Long id);", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "EcsFavourableActivity selectByPrimaryKey(Short act_id);", "public RecipeDbItem1 getFavourite(String id)\n {\n SQLiteDatabase db = this.getReadableDatabase();\n RecipeDbItem1 recipeDbItem1=new RecipeDbItem1(\"\",\"\");\n Cursor cursor = db.query(TABLE_FAVOURITES, new String[] { KEY_ID,\n KEY_TITLE }, KEY_ID + \"=?\",\n new String[] { id }, null, null, null, null);\n if (cursor != null) {\n if(cursor.moveToFirst()) {\n recipeDbItem1 = new RecipeDbItem1(cursor.getString(0), cursor.getString(1));\n // System.out.println(\"\\n\\nGetFavourite function clicked id: \" + cursor.getString(0));\n }\n // else{System.out.println(\"\\n\\nGetFavourite cursor not null\");}\n }\n\n return recipeDbItem1;\n }", "public int getFilmId()\r\n {\r\n return this.filmId;\r\n }", "public Long getFoilId() {\n return foilId;\n }", "public int getIdfilial(){\r\n return idfilial;\r\n }", "public java.lang.Integer getId_rango();", "boolean isFavorite(int id);", "public int getId() {\n return fid;\n }", "public Integer getRestaurantId() {\n return restaurantId;\n }", "java.lang.String getCouponId();", "public String getFilmId() {\n return filmId;\n }", "public int getBongattavaId() {\n return this.bongattavaId;\n }", "public java.lang.Integer getRestaurantId()\n {\n return restaurantId;\n }", "@Override\n\tpublic void getFavorit(int idUser) {\n\t\t\n\t}", "@Override\n public Propiedad getPropiedadId(String pNumFinca) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE \"\n + \"ID_PROPIEDAD = '\" + pNumFinca + \"'\");\n Propiedad propiedadSeleccionada = resultado.get(0);\n return propiedadSeleccionada;\n }", "public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}", "TCar selectByPrimaryKey(Integer fitemid);", "public Integer getId() {\n\t\treturn wishlistItemId;\n\t}", "int getOtherId();", "public Integer getFansId() {\n return fansId;\n }", "public long getItemShopBasketId();", "public int getNumOfFav() {\n return fullPhoto.getNumOfFav();\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "Visituser selectByPrimaryKey(Integer id);", "public int getId()\r\n\t{\r\n\t\treturn this.userId;\r\n\t}", "public int getFid() {\n return fid;\n }", "public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }", "long getPokemonId();", "@Override\n\tpublic FavoriteVO selectFavoriteVO(int pl_index, String mem_mail) {\n\t\treturn null;\n\t}", "public List<MovieDetails> getAllFavoriteMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<MovieDetails> movieDetailses = new ArrayList<>();\n List<Integer> favoritesMovieId = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n int id = getIdFromCursor(cursor);\n String selectFavoriteMovieQuery = \"SELECT * FROM \" + MoviesDetailsEntry.TABLE_NAME + \"WHERE \" + MoviesDetailsEntry._ID + \"= \" + id;\n Cursor movieCursor = database.rawQuery(selectFavoriteMovieQuery, null);\n if (movieCursor.moveToFirst()) {\n do {\n MovieDetails movieDetails = getMovieDetailsFromCursor(movieCursor);\n movieDetailses.add(movieDetails);\n } while (movieCursor.moveToNext());\n }\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieDetailses;\n }", "public String getFkId() {\r\n return fkId;\r\n }", "public Integer getIdProfilo() {\n\t\treturn idProfilo;\n\t}", "public Integer getIdProveedor() {\n return idProveedor;\n }", "@Transient\n\t/**\n\t * @return the idInstituicao\n\t */\n\tpublic Integer getIdInstituicao() {\n\t\treturn idInstituicao;\n\t}", "@Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();", "public java.lang.Long getId_cita_previa();", "java.lang.String getHotelId();", "public long addMovieToFavorites(long movieId) {\n if (!isMovieIsFavorite(movieId)) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = insertFavoriteMovieIntoContentValues(movieId);\n long rowId = database.insert(FavoriteMoviesEntry.TABLE_NAME, null, values);\n database.close();\n return rowId;\n } else return 0;\n }", "ExtraQuery id(Object value);", "public void addFavourite(RecipeDbItem1 recipeDbItem1)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,recipeDbItem1.getID());\n values.put(KEY_TITLE,recipeDbItem1.getTitle());\n //insert a row\n db.insert(TABLE_FAVOURITES,null,values);\n db.close();\n //System.out.println(\"\\n Inserted into Favourites Table: \"+recipeDbItem1.getID()+\" \"+recipeDbItem1.getTitle());\n }", "public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }", "public Long getPersonaId();", "@Select(\"select * from website_cooperativeuser where id =#{id}\")\r\n WebsiteCooperativeuser selectByPrimaryKey(String id);", "public LiveData<List<BookTable>> getFavoriteBooksIdsFromLocal() {\n return bookTableDAO.getAllFavoriteBooks();\n }", "public long getShopBasketId();", "protected abstract String getFavoriteColumnName();", "@Override\n public long getPrimaryKey() {\n return _partido.getPrimaryKey();\n }", "SelectUserRecruit selectByPrimaryKey(Integer deliverid);", "public Integer getId() {\n return aao.getId();\n }", "int getSaviId(String project, String feature, DataDate date) throws SQLException;", "public java.lang.String getIdFiche(){\r\n return this.idFiche;\r\n }", "public Integer getId() { return this.id; }", "public Integer getInspartid() {\n return inspartid;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "public Number getUserIdFk() {\r\n return (Number) getAttributeInternal(USERIDFK);\r\n }", "public IntColumn getFeatureId() {\n return (IntColumn) (isText ? textFields.computeIfAbsent(\"feature_id\", IntColumn::new) :\n getBinaryColumn(\"feature_id\"));\n }", "public Integer getIdPerfil() {\n return idPerfil;\n }", "public int getIdProducto() {\n return idProducto;\n }", "public String getInoId();", "@Override\n public int getProductFavouritesCount(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesCount(params);\n }", "GirlInfo selectByPrimaryKey(Integer id);", "public String getFirstKeyColumnName() {\n\t\treturn \"wishlistItemId\";\n\t}", "public Cursor fetchFavorite(long rowId) throws SQLException {\n\n Cursor mCursor =\n\n mDb.query(true, DATABASE_TABLE_FAVORITES, new String[] {KEY_ROWID,\n KEY_TITLE, KEY_BODY}, KEY_ROWID + \"=\" + rowId, null,\n null, null, null, null);\n if (mCursor != null) {\n mCursor.moveToFirst();\n }\n return mCursor;\n\n }", "public int getBeverageId() {\n return beverageId;\n }", "@Import(\"id\")\n\tint getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public Integer getaId() {\r\n return aId;\r\n }", "public Integer getId(){\n\t\treturn id;\n\t}", "void deleteFavorite(int id);", "ItoProduct selectByPrimaryKey(Integer id);", "public boolean isFavorite(long videoId) {\n try {\n int flag = 0;\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n String getFlagQuery = \"SELECT \" + VideoTable.KEY_VIDEO_IS_FAVORITE + \" FROM \" + VideoTable.VIDEO_TABLE + \" WHERE \" + VideoTable.KEY_VIDEO_ID + \" = \"\n + videoId;\n Cursor cursor = database.rawQuery(getFlagQuery, null);\n if (cursor.moveToFirst()) {\n do {\n flag = cursor.getInt(0);\n } while (cursor.moveToNext());\n\n }\n cursor.close();\n if (flag == 1) {\n return true;\n }\n\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }", "Integer getID();", "Integer getID();", "java.lang.String getFriendId();", "java.lang.String getFriendId();", "@Override\r\n\tpublic List<String> getFavoritePlaceIds(String userId) {\n\t\tif(conn == null) {\r\n\t\t\tSystem.err.println(\"DB connection failed\");\r\n\t\t\treturn new ArrayList<>();\r\n\t\t}\r\n\r\n\t\tList<String> favoritePlaces = new ArrayList<>();\r\n\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM favorites WHERE user_id = ?\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, userId);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tString placeId = rs.getString(\"place_id\");\r\n\t\t\t\tfavoritePlaces.add(placeId);\r\n\t\t\t}\r\n\r\n\t\t}catch(SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn favoritePlaces;\r\n\t}", "private int getMovieId() {\n\t\treturn 0;\n\t}", "public Integer getaId() {\n return aId;\n }", "public Integer getId() { return id; }", "public Jour_Ferie getIdJourFerie() {\r\n\t\treturn idJourFerie;\r\n\t}", "private int getProductIdFromDatabase() throws ClassNotFoundException, SQLException\r\n {\n String randomKey = Helper.getRandomString();\r\n \r\n //Importiamo il driver di mysql\r\n \r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n //Tramite l'oggetto conn, stiamo creando la connessione al database \r\n Connection con = Helper.getDatabaseConnection();\r\n \r\n //L'oggetto stmt esegue fisicamente la query sul db\r\n Statement stmt=con.createStatement();\r\n //Genero la query da eseguire\r\n String query = \"INSERT INTO products (price,name,randomkey) VALUES ('\" + this.price + \"','\" + this.name + \"','\" + randomKey + \"')\";\r\n //Eseguo la query di inserimento sul DB\r\n stmt.executeUpdate(query);\r\n \r\n //Genero la query che estrae l'id della macchinetta appena inserita\r\n query = \"SELECT products_id FROM products WHERE randomkey='\" + randomKey + \"'\";\r\n //Estraggo i dati della query, associati ad un oggetto di tipo ResultSet\r\n ResultSet rs=stmt.executeQuery(query);\r\n \r\n //Leggo la prima riga dei risultati dello statement\r\n rs.next();\r\n \r\n //Converto in intero il primo campo del resultset relativo alla query precedente\r\n int retvalue =rs.getInt(1);\r\n \r\n //Cancello dal database la randomkey che non mi serve più\r\n query = \"UPDATE products SET randomkey = NULL WHERE products_id = \" + retvalue;\r\n stmt.executeUpdate(query);\r\n \r\n return retvalue;\r\n }", "public void deleteFav(int itemId) {\n String selection = DbConstants.POST_ID + \"=?\";\n String[] selectionArgs = {String.valueOf(itemId)};\n\n db.delete(\n DbConstants.FAVOURITE_TABLE_NAME,\n selection,\n selectionArgs);\n }", "int getItemID();", "public Long getPopularizedId() {\n return popularizedId;\n }", "public void addGenre() {\n ResultSet result = null;\n try {\n result = server.executeStatement(\"SELECT genreID FROM productiongenre WHERE prodID = \" + \"'\" + getId() + \"'\" + \";\");\n if(result.next())\n genre = result.getString(\"genreID\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Select({\n \"select\",\n \"id, dept_name\",\n \"from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"cn.wuaijing.mapper.DeptMapper.BaseResultMap\")\n Dept selectByPrimaryKey(Integer id);", "public int getMovieID() {\n return movieID;\n }", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public Integer generateID(){\n String sqlSelect = \"SELECT max(id) from friends\";\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n int maxId=0;\n try {\n connection = new DBConnection().connect();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sqlSelect);\n while (resultSet.next())\n maxId = resultSet.getInt(1);\n \n } catch (SQLException e) {\n System.err.print(\"err in select \" + e);\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n if (statement != null) {\n statement.close();\n }\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException e) {\n System.err.print(\"err in close select \" + e);\n }\n }\n\n return ++maxId;\n }" ]
[ "0.6852634", "0.602115", "0.5525408", "0.5406923", "0.53856707", "0.5344146", "0.5328783", "0.5251514", "0.52082694", "0.5117984", "0.51102227", "0.50853074", "0.5083489", "0.50806296", "0.5071851", "0.5067027", "0.50471467", "0.5021015", "0.5017195", "0.5005894", "0.49966207", "0.4973866", "0.49677598", "0.49416295", "0.49333665", "0.49097773", "0.4904333", "0.49027258", "0.48851585", "0.48791844", "0.48733073", "0.4855252", "0.48514873", "0.48404422", "0.483705", "0.4828116", "0.48243555", "0.4824169", "0.48221874", "0.48185933", "0.48156956", "0.48145348", "0.48132125", "0.48129228", "0.48071384", "0.4794549", "0.47910973", "0.47856426", "0.47848096", "0.47752208", "0.4771758", "0.47708678", "0.4767279", "0.4762565", "0.47601253", "0.47599593", "0.47565278", "0.47565278", "0.47462007", "0.47393098", "0.4734219", "0.473295", "0.47320065", "0.4731515", "0.47288117", "0.47253856", "0.47179925", "0.4716841", "0.47118422", "0.47108954", "0.47084013", "0.47084013", "0.47084013", "0.47084013", "0.47084013", "0.47084013", "0.47084013", "0.47034055", "0.47021917", "0.47012806", "0.46994808", "0.46956277", "0.4695457", "0.4695457", "0.46943164", "0.46943164", "0.4688756", "0.46875945", "0.4685014", "0.4684093", "0.46804962", "0.46797547", "0.46792728", "0.46792313", "0.46789852", "0.4675995", "0.46736956", "0.4672836", "0.46660691", "0.4665096" ]
0.7444962
0
This method was generated by MyBatis Generator. This method sets the value of the database column favortie.favortieid
public void setFavortieid(Integer favortieid) { this.favortieid = favortieid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getFavortieid() {\n return favortieid;\n }", "public void makeFavorite(String title, int favorite)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n db.execSQL(\n \"UPDATE \" + TABLE_NAME +\n \" SET \" + COL8 + \" = \" + favorite +\n \" WHERE \" + COL2 + \" = '\" + title + \"'\");\n }", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "MemberFav selectByPrimaryKey(Long id);", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}", "@Override\n\tpublic void getFavorit(int idUser) {\n\t\t\n\t}", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public void setIdfilial(int idfilial){\r\n this.idfilial = idfilial;\r\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "public static void updateFavorite(String userId, final String foodId, final boolean option, final ImageButton favButton) {\n //get database reference\n final DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ArrayList<String> updated = new ArrayList<>();\n boolean exists = false;\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n if (!option) {\n if (foodId.equals(fav))\n Log.d(\"favor\", \"this one should be deleted \");\n else\n updated.add(fav);\n } else {\n if (foodId.equals(fav)) {\n exists = true;\n updated.add(fav);\n } else\n updated.add(fav);\n }\n }\n if (!exists && option) {\n favButton.setImageResource(R.drawable.ic_favorite);\n updated.add(foodId);\n }\n else\n favButton.setImageResource(R.drawable.ic_favorite_empty);\n dbref.child(\"favoritesList\").setValue(updated);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "public void setFavTitle(final String favTitle){\n\t\tthis.favTitle = favTitle;\n\t}", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public void setFavoriteFlag(int flag, long videoID) {\n try {\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n ContentValues contents = new ContentValues();\n contents.put(VideoTable.KEY_VIDEO_IS_FAVORITE, flag);\n database.update(VideoTable.VIDEO_TABLE, contents, VideoTable.KEY_VIDEO_ID + \"=?\", new String[]{\"\" + videoID});\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void addFavourite(RecipeDbItem1 recipeDbItem1)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,recipeDbItem1.getID());\n values.put(KEY_TITLE,recipeDbItem1.getTitle());\n //insert a row\n db.insert(TABLE_FAVOURITES,null,values);\n db.close();\n //System.out.println(\"\\n Inserted into Favourites Table: \"+recipeDbItem1.getID()+\" \"+recipeDbItem1.getTitle());\n }", "int updateByPrimaryKey(EcsFavourableActivity record);", "public long addMovieToFavorites(long movieId) {\n if (!isMovieIsFavorite(movieId)) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = insertFavoriteMovieIntoContentValues(movieId);\n long rowId = database.insert(FavoriteMoviesEntry.TABLE_NAME, null, values);\n database.close();\n return rowId;\n } else return 0;\n }", "int updateByPrimaryKey(MemberFav record);", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void setIdproducto(int idproducto) {\r\n\t\tthis.idproducto = idproducto;\r\n\t}", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateFav(itemCode, madeIt);\n }", "void deleteFavorite(int id);", "boolean isFavorite(int id);", "public void setIdJourFerie(Jour_Ferie idJourFerie) {\r\n\t\tthis.idJourFerie = idJourFerie;\r\n\t}", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "public void setFoilId(Long foilId) {\n this.foilId = foilId;\n }", "public void setIdProducto(int value) {\n this.idProducto = value;\n }", "int updateByPrimaryKeySelective(MemberFav record);", "public RecipeDbItem1 getFavourite(String id)\n {\n SQLiteDatabase db = this.getReadableDatabase();\n RecipeDbItem1 recipeDbItem1=new RecipeDbItem1(\"\",\"\");\n Cursor cursor = db.query(TABLE_FAVOURITES, new String[] { KEY_ID,\n KEY_TITLE }, KEY_ID + \"=?\",\n new String[] { id }, null, null, null, null);\n if (cursor != null) {\n if(cursor.moveToFirst()) {\n recipeDbItem1 = new RecipeDbItem1(cursor.getString(0), cursor.getString(1));\n // System.out.println(\"\\n\\nGetFavourite function clicked id: \" + cursor.getString(0));\n }\n // else{System.out.println(\"\\n\\nGetFavourite cursor not null\");}\n }\n\n return recipeDbItem1;\n }", "@Override\n\tpublic FavoriteVO selectFavoriteVO(int pl_index, String mem_mail) {\n\t\treturn null;\n\t}", "public static void saveFavourite(Long idRes, Long idUser) {\n\t\tArrayList<Favourite> allFav=loadFavourite();\n\t\tint size=allFav.size()-1;\n\t\tFavourite last=allFav.get(size);\n\t\tLong idLast=last.getIdF();\n\t\tFavourite save=new Favourite(idLast+1,idUser,idRes);\n\t\tallFav.add(save);\n\t\tsaveToFile(allFav);\n\t}", "EcsFavourableActivity selectByPrimaryKey(Short act_id);", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void setIdAmigo(int idAmigo) {\n\t\tthis.idAmigo = idAmigo;\n\t}", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public void addMovieToFavorites(Movie movie) {\n movie.setFavorite(true);\n isFavorite = true;\n //change the star from gray to yellow\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n //save the poster in local storage\n String imageName = saveMoviePoster();\n\n //load the necessary movie fields into the ContentValues object\n ContentValues values = new ContentValues();\n values.put(FavoriteMoviesContract.MovieEntry.MOVIEDB_ID, movie.getId());\n values.put(FavoriteMoviesContract.MovieEntry.AVERAGE_VOTE, movie.getVoteAverage());\n values.put(FavoriteMoviesContract.MovieEntry.ORIGINAL_TITLE, movie.getOriginalTitle());\n values.put(FavoriteMoviesContract.MovieEntry.RELEASE_YEAR, movie.getReleaseYear());\n values.put(FavoriteMoviesContract.MovieEntry.RUNTIME, movie.getRuntime());\n values.put(FavoriteMoviesContract.MovieEntry.SYNOPSIS, movie.getSynopsis());\n values.put(FavoriteMoviesContract.MovieEntry.POSTER_IMAGE_NAME, imageName);\n\n //insert the movie into the Favorites db\n Uri uri = getActivity().getContentResolver().\n insert(FavoriteMoviesContract.MovieEntry.CONTENT_URI, values);\n\n if (uri != null) {\n String successMessage = \"You have successfully added \" + movie.getOriginalTitle() +\n \" to the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n }\n }", "public void setIdProveedor(Integer idProveedor) {\n this.idProveedor = idProveedor;\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "@Override\n\tpublic void votaRisposta(Integer id, int voto) {\n\t\t\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\tlong hashCode = id.hashCode();\n\t\tRisposta risposta = risposte.get(hashCode);\n\t\trisposta.setVoto(voto);\n\t\trisposte.put(hashCode, risposta);\n\t\tdb.commit();\n\t}", "public void setIdVenta(String idVenta) {\n this.idVenta = idVenta;\n }", "@Override\n public void setIdFacebook(String idFacebook) {\n this.idFacebook = idFacebook;\n }", "public void setId(int id) {\r\n this.id = id;\r\n job = acceptFreelancerBean.getJob(id); \r\n if (job!= null){\r\n fid=job.getFid();\r\n }\r\n }", "void addToFavorites(int recipeId);", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public void setRestaurantId(Integer restaurantId) {\n this.restaurantId = restaurantId;\n }", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "@POST(\"/attractions/{attractionId}/favorite\")\n Call<Void> markFavoriteAttraction(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "@Override\n\tpublic void removeFavorit(int id) {\n\t\t\n\t}", "public void saveMovieToFavorites() {\n Cursor moviecursor = this.getContentResolver().query(MovieContract.MovieEntry.CONTENT_URI, null, MovieContract.MovieEntry.COLUMN_NAME_MOVIE_ID + \" = \" + mMovie.getID(), null, null, null);\n if(moviecursor.getCount() == 0) { // first time this movie has been favorited insert record\n Uri movieUri = this.getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, Constants.createMovieRecord(mMovie));\n long movieid = ContentUris.parseId(movieUri);\n int insertedTrailerCount = this.getContentResolver().bulkInsert(MovieContract.TrailerEntry.CONTENT_URI, Constants.createBulkTrailerValues(Constants.mTrailers, movieid));\n int insertedReviewCount = this.getContentResolver().bulkInsert(MovieContract.ReviewEntry.CONTENT_URI, Constants.createBulkReviewValues(Constants.mReviews, movieid));\n\n if(insertedTrailerCount < 1)\n Log.e(TAG,\"Trailer failed to insert\");\n\n if(insertedReviewCount < 1)\n Log.e(TAG, \" Review failed to insert\");\n }\n }", "public Long getFoilId() {\n return foilId;\n }", "public void setFid(int value) {\n this.fid = value;\n }", "public void drawFav(Recipe r, ImageView favIcon) {\n int imgFav;\n if (r.isFavorite()) {\n imgFav = getResources().getIdentifier(\"favstarylw\", \"drawable\", getPackageName());\n } else {\n imgFav = getResources().getIdentifier(\"favstargrey\", \"drawable\", getPackageName());\n }\n favIcon.setImageResource(imgFav);\n }", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setId(int value) {\n validate(fields()[1], value);\n this.id = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setFiIdHoso(Long fiIdHoso) {\n this.fiIdHoso = fiIdHoso;\n }", "public void setFiIdHoso(Long fiIdHoso) {\n this.fiIdHoso = fiIdHoso;\n }", "public void setFactionId(int val) {\n factionId = val;\n }", "public int getFilmId()\r\n {\r\n return this.filmId;\r\n }", "public void setIdProfilo(Integer idProfilo) {\n\t\tthis.idProfilo = idProfilo;\n\t}", "public static Uri buildFavouriteMovieUri(long id){\r\n return ContentUris.withAppendedId(CONTENT_URI, id);\r\n }", "public void setIdventa( Integer idventa ) {\n this.idventa = idventa ;\n }", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "public void setFlyerId(Integer value) {\n this.flyer_id = value;\n }", "public void setId2(int value) {\n this.id2 = value;\n }", "public void editMovie(int id, Movie movie)\n {\n // Since SQLite does not support Booleans, an Integer is used with 0 as false and 1 as true\n int favorite = 0;\n\n if (movie.isFavorite())\n\n favorite = 1;\n\n /* the execSQL Method simply executes this query on the Database, in this Query REPLACE INTO\n * replaces a Row in the table based on the movieId value specified\n */\n this.getWritableDatabase().execSQL(\n \"REPLACE INTO \" + TABLE_NAME +\n \" (movieId, title, year, director, actor_actress, rating, review, favorite)\" +\n \" Values(\" + id + \", '\" + movie.getTitle() + \"', '\" + movie.getYear() + \"', '\" + movie.getDirector() +\n \"', '\" + movie.getActorActress() + \"', \" + movie.getRating() + \", '\" + movie.getReview() +\n \"', \" + favorite + \")\");\n }", "public void setIdPerfil(Integer idPerfil) {\n this.idPerfil = idPerfil;\n }", "public void assignId(int id);", "public void setPerfilId( Long id );", "public void updateFeedItemAsFavorite(FeedItem item) {\n new updateFeedItemFavoriteAsync(itemDao).execute(item);\n }", "public void setIdAlumno(int value) {\n this.idAlumno = value;\n }", "public void saveFavoritesID(ArrayList<String> idList) {\n\n\t\tSAVE_FILE = FAVORITE_FILE;\n\t\tsaveIds(idList);\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setPopularizeId(Long popularizeId) {\n this.popularizeId = popularizeId;\n }", "public void setM_Product_ID (int M_Product_ID);", "public void setM_Product_ID (int M_Product_ID);", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "@RequestMapping(value = \"/update/{favJobId}/\", method = RequestMethod.PUT)\n\tpublic void updateFavouriteJob(@PathVariable Long favJobId, @RequestBody FavouriteJobs favJob) {\n\t\ttry {\n\t\t\tfavJobService.updateFavouriteJob(favJobId, favJob);\n\t\t} catch(Exception e) {\n\t\t\t//TODO: Exception to be handle\n\t\t}\n\t}", "public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "public void setIdperfil(int pIdperfil){\n this.idperfil = pIdperfil;\n }", "public void favorite(int index)\n {\n if (latest != null && latest.index == index)\n {\n if (this.showFavorites && !latest.morph.favorite)\n {\n this.toRemove.put(index, new MorphRemove(index, latest.typeIndex));\n this.remove(index);\n }\n\n latest = null;\n }\n }", "public int updateTermFavouritedFlag (Term term, String table) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_FAVOURITED, term.getFavourited());\n\n // updating row\n return db.update(table, values, KEY_ID + \" = ?\", new String[] { String.valueOf(term.getId())});\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void deliverResult(Cursor data) {\n favoriteIds = loadCursorDataArray(data);\n //check if the given movie is among them\n isFavorite = checkIfFavorite();\n movie.setFavorite(isFavorite);\n imageName = movie.getPosterPath();\n\n if (movie.isFavorite()) {\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n favoritesIdsData = data;\n super.deliverResult(data);\n\n } else {\n star.setImageResource(R.drawable.ic_grade_gray_36px);\n\n }\n }", "public void deleteFav(int itemId) {\n String selection = DbConstants.POST_ID + \"=?\";\n String[] selectionArgs = {String.valueOf(itemId)};\n\n db.delete(\n DbConstants.FAVOURITE_TABLE_NAME,\n selection,\n selectionArgs);\n }", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "public void setHotelId(int value) {\n this.hotelId = value;\n }", "public void setIdUser(int value) {\n this.idUser = value;\n }", "public void setIdUsuario(int value) {\n this.idUsuario = value;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }", "public void setId( Integer id )\n {\n this.id = id ;\n }" ]
[ "0.6938777", "0.5706033", "0.55862606", "0.5578838", "0.5553036", "0.55173266", "0.5407998", "0.5385753", "0.53834194", "0.53587323", "0.5355819", "0.534874", "0.5337137", "0.5333322", "0.5317858", "0.5307023", "0.52801514", "0.5273753", "0.5233443", "0.5172982", "0.5164661", "0.513668", "0.51207083", "0.5083083", "0.5048681", "0.5010876", "0.5003728", "0.49969456", "0.4994317", "0.49891683", "0.49824858", "0.49793825", "0.49488473", "0.4945485", "0.49211532", "0.4915942", "0.4909972", "0.49066964", "0.49038225", "0.48958772", "0.48904535", "0.4883344", "0.48718908", "0.48638076", "0.48615733", "0.48550552", "0.4850262", "0.48491877", "0.48470047", "0.4843242", "0.4834031", "0.48237357", "0.48202097", "0.4818124", "0.48091757", "0.4796384", "0.47943595", "0.4791541", "0.47901496", "0.47848764", "0.47769547", "0.47769547", "0.47756365", "0.47732717", "0.47697264", "0.47683448", "0.4768088", "0.4761833", "0.47500888", "0.4743283", "0.4740501", "0.47381973", "0.47374797", "0.47265407", "0.47253144", "0.47229445", "0.47178593", "0.47173077", "0.47164145", "0.4714141", "0.47130707", "0.47104773", "0.47104773", "0.47094083", "0.47042626", "0.4699385", "0.4697833", "0.46957803", "0.46929994", "0.4692324", "0.46903062", "0.46804512", "0.4676613", "0.4675897", "0.46754825", "0.46739772", "0.46730492", "0.4670633", "0.4665789", "0.4663837" ]
0.76851046
0
This method was generated by MyBatis Generator. This method returns the value of the database column favortie.userid
public Integer getUserid() { return userid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "Integer getUserId();", "public Long getUserid() {\r\n return userid;\r\n }", "public Integer getUserid() {\r\n\t\treturn userid;\r\n\t}", "String getUserId();", "String getUserId();", "public long getUserId();", "public long getUserId();", "public long getUserId();", "public long getUserId();", "Long getUserId();", "public Integer getUserid() {\n\t\treturn this.userid;\n\t}", "long getUserId();", "long getUserId();", "public int getUserId()\r\n\t{\r\n\t\treturn this.userId;\r\n\t}", "java.lang.String getUserIdOne();", "public Integer getUserId() {\r\n return userId;\r\n }", "public Integer getUserId() {\r\n return userId;\r\n }", "@Override\r\n\tpublic int useridselect(String userid) {\n\t\treturn sqlSession.selectOne(NAMESPACE + \".select_userid_list\", userid);\r\n\t}", "@Override\n\tpublic long getUserId();", "@Override\n\tpublic long getUserId();", "public int getUserId() {\r\n return this.UserId;\r\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public Integer getUserId() {\n return userId;\n }", "public String getUserId() {\r\n\t\treturn this.userid.getText();\r\n\t}", "public Integer getUserId() {\r\n\t\treturn userId;\r\n\t}", "public Integer getUserId() {\r\n\t\treturn userId;\r\n\t}", "public Integer getUserId() {\r\n\t\treturn userId;\r\n\t}", "public int getUserId() {\n return userId_;\n }", "public int getUserId() {\n return userId;\n }", "public int getUserId() {\n return userId;\n }", "public int getUserId() {\n return userId;\n }", "public int getUserId() {\n return userId;\n }", "public int getUserId() {\n return userId;\n }", "@UserIdInt\n public int getUserId() {\n return mUserId;\n }", "public Integer getUserId() {\n\t\treturn userId;\n\t}", "public String getUserid() {\n return userid;\n }", "public String getUserid() {\n return userid;\n }", "public int getUserId() {\r\n\t\treturn userId;\r\n\t}", "public Long getUserId() {\r\n return userId;\r\n }", "public Long getUserId() {\r\n return userId;\r\n }", "public Long getUserId() {\r\n return userId;\r\n }", "public int getUserId()\n {\n return userId;\n }", "public String getUserId()\r\n\t{\r\n\t\treturn userId;\r\n\t}", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId() {\r\n return userId;\r\n }", "public String getUserId() {\r\n return userId;\r\n }", "public int getuserId() {\n\t\treturn userId;\n\t}", "public Integer getUserID() {\n return userID;\n }", "public long getUserId() {\r\n return userId;\r\n }", "int getUserId() {\r\n\t\t\treturn userId;\r\n\t\t}", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }", "public Long getUserId() {\n return userId;\n }" ]
[ "0.7031802", "0.7031802", "0.7031802", "0.6893778", "0.6773492", "0.67656803", "0.67418116", "0.67418116", "0.67229277", "0.67229277", "0.67229277", "0.67229277", "0.67048955", "0.66574925", "0.6651344", "0.6651344", "0.6622214", "0.6617635", "0.6609251", "0.6609251", "0.65680856", "0.6544866", "0.6544866", "0.6541523", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6531048", "0.6528979", "0.6506301", "0.6506301", "0.6506301", "0.6499378", "0.64786506", "0.64786506", "0.64786506", "0.64786506", "0.64786506", "0.6459316", "0.6455101", "0.6455002", "0.6455002", "0.6454394", "0.6437324", "0.6437324", "0.6437324", "0.64331937", "0.6411831", "0.64112514", "0.64112514", "0.64112514", "0.64112514", "0.64112514", "0.64112514", "0.63932484", "0.63915867", "0.63906014", "0.63889295", "0.6363643", "0.6363643", "0.6363643", "0.6363643", "0.6363643", "0.6363643", "0.6363643", "0.6363643", "0.6363643" ]
0.6873857
15
This method was generated by MyBatis Generator. This method sets the value of the database column favortie.userid
public void setUserid(Integer userid) { this.userid = userid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUserId(int value) {\n this.userId = value;\n }", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserid(Long userid) {\r\n this.userid = userid;\r\n }", "public void setUserid(Integer userid) {\r\n\t\tthis.userid = userid;\r\n\t}", "@Override\n\tpublic void setUserId(long userId);", "@Override\n\tpublic void setUserId(long userId);", "private void setUserId(int value) {\n \n userId_ = value;\n }", "public void setUserID(int value) {\n this.userID = value;\n }", "void setUserId(Long userId);", "public void setIduser(int aIduser) {\n iduser = aIduser;\n }", "public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }", "public void setIdUser(int value) {\n this.idUser = value;\n }", "public void setUserId(Integer userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Integer userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserId(long value) {\r\n this.userId = value;\r\n }", "public void setId_user(int id_user) {\n this.id_user = id_user;\n }", "public void setUserId(int userId)\r\n\t{\r\n\t\tthis.userId = userId;\r\n\t}", "public void setUserid(java.lang.String userid) {\n this.userid = userid;\n }", "public void setUserId(long value) {\n this.userId = value;\n }", "public void setUserId( Integer userId ) {\n this.userId = userId;\n }", "void setUserId(int newId) {\r\n\t\t\tuserId = newId;\r\n\t\t}", "private void setUserId(long value) {\n \n userId_ = value;\n }", "public void setUserid(java.lang.String value) {\n this.userid = value;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(int userId) {\r\n\t\tthis.userId = userId;\r\n\t}", "public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}", "public void setUserId(Integer userId) {\r\n\t\tthis.userId = userId;\r\n\t}", "public void setUserId(Integer userId) {\r\n\t\tthis.userId = userId;\r\n\t}", "public void setUserId(Integer userId) {\r\n\t\tthis.userId = userId;\r\n\t}", "private void setUserId(long value) {\n\n userId_ = value;\n }", "public void setUserId(int userId) {\n\t\tthis.userId = userId;\n\t}", "public void setUserId(int userId) {\n this.mUserId = userId;\n }", "public void setUserId(Long userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Long userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Long userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Integer userId) {\n\t\tthis.userId = userId;\n\t}", "public void setUserID(long userID) {\n UserID = userID;\n }", "public void setUserId(int userId) {\n this.mUserId = userId;\n }", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setUserId(String userId)\n {\n this.userId = userId;\n }", "public void setUserId(String userId)\n {\n this.userId = userId;\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_employee.setUserId(userId);\n\t}", "public void setUserId(String userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(String userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(String userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(Long userId) {\n this.userId = userId;\n }", "public void setUserId(String userId) {\n this.userId = userId;\n }", "public void setUserId(String userId) {\n this.userId = userId;\n }", "private void setUserId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n userId_ = value;\n }" ]
[ "0.6897457", "0.68468875", "0.68468875", "0.68468875", "0.68468875", "0.6794163", "0.67836183", "0.6715539", "0.6715539", "0.6709606", "0.6651408", "0.66370225", "0.6619096", "0.6603802", "0.6589495", "0.65787923", "0.65787923", "0.65776527", "0.65776527", "0.65776527", "0.6577283", "0.6565258", "0.6559437", "0.65552217", "0.65359277", "0.6530478", "0.6521995", "0.6508362", "0.65067416", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6502757", "0.6499872", "0.649283", "0.6466395", "0.6466395", "0.6466395", "0.64571595", "0.6408424", "0.63991094", "0.6396908", "0.6396908", "0.6396908", "0.6380752", "0.6375055", "0.6373751", "0.635803", "0.63173795", "0.63173795", "0.63093066", "0.6308257", "0.6308257", "0.6308257", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.6307706", "0.62957466", "0.62957466", "0.62879944" ]
0.677697
16
This method was generated by MyBatis Generator. This method returns the value of the database column favortie.bookid
public Integer getBookid() { return bookid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "public int getBook_id() {\n\treturn book_id;\n}", "public String getBookId() {\r\n return bookId;\r\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n\t\treturn bookId;\n\t}", "public int getBookID() {\n return bookID;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "public void setBookid(Integer bookid) {\n this.bookid = bookid;\n }", "BookInfo selectByPrimaryKey(Integer id);", "Book selectByPrimaryKey(String bid);", "public long getBookId() {\n return _sTransaction.getBookId();\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "BookDO selectByPrimaryKey(String bookIsbn);", "public StrColumn getBookIdISBN() {\n return delegate.getColumn(\"book_id_ISBN\", DelegatingStrColumn::new);\n }", "Book getBookById(Integer id);", "public Book getBook(int bookID) throws SQLException {\n if (books.getBook(bookID)!=null){\n return books.getBook(bookID);}\n else\n return null;\n }", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "public Book getById(Long bookId) {\n\t\treturn (Book) entityManager.createQuery(\"from Book where id= :bookId\").setParameter(\"bookId\", bookId)\n\t\t\t\t.getSingleResult();\n\t}", "CmsRoomBook selectByPrimaryKey(String bookId);", "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "Book selectByPrimaryKey(String id);", "@Override\n\tpublic Optional<ShoppingCart> getBookById(int bookid) {\n\t\treturn dao.findById(bookid);\n\t}", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "IntegralBook selectByPrimaryKey(Long integralBookId);", "int getBookId(Book book) {\n\t\t\n\t\t// goes through all our books\n\t\tfor (int index = 0; index < this.bookCounter; index++) {\n\n\t\t\t// checks if the book is already in the library\n\t\t\tif (book == this.bookShelf[index]) {\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// we could not find the book \n\t\treturn -1; \n\t}", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Book findBooknum(int id) {\n\t\treturn this.borrowrecordMapper.findBooknum(id);\n\t}", "public Integer getFavortieid() {\n return favortieid;\n }", "@Override\n public MyBook findById(final int bookshelfId,\n final int userId, final int bookId) {\n System.err.println(\"MyBookRepositoryImpl:172 - not implement\");\n System.exit(1);\n return null;\n }", "public int getBookingId() {\n return booking_id;\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "public int getBookingId() {\n return bookingId;\n }", "public int getBookingId() {\n return bookingId;\n }", "int getBId();", "@Override\r\n\tpublic Book getBookInfo(int book_id) {\n\t\treturn null;\r\n\t}", "public Number getBookDocId() {\n return (Number)getAttributeInternal(BOOKDOCID);\n }", "public JSONObject book_details(int book_id) throws JSONException {\n startSession();\n\n Query query = session.createQuery(\"from Book where id = :i\");\n query.setParameter(\"i\", book_id);\n\n Book book = (Book) query.uniqueResult();\n User owner = (User) book.getOwner();\n JSONObject book_info = new JSONObject(book.getBook_info());\n JSONObject response = new JSONObject();\n\n response.put(\"success\",\"true\");\n response.put(\"book\", book.getName());\n response.put(\"author\", book.getAuthor());\n response.put(\"rent\", book.getRent());\n response.put(\"deposit\", book.getDeposit());\n response.put(\"genre\", book.getGenre());\n response.put(\"times_rented\", book.getTimes_rented());\n response.put(\"available\",book.isAvailable());\n\n response.put(\"print\", book_info.getString(\"print\"));\n response.put(\"condition\", book_info.getString(\"condition\"));\n response.put(\"year_bought\", book_info.getString(\"year_bought\"));\n response.put(\"review\", book_info.getString(\"review\"));\n\n response.put(\"owner_id\", owner.getId());\n response.put(\"owner_name\", owner.getFull_name());\n response.put(\"owner_location\", owner.getLocation());\n response.put(\"owner_contact\", owner.getContact_no());\n\n endSession();\n return response;\n }", "public org.jooq.test.h2.generatedclasses.tables.pojos.VBook fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.ID, value);\n\t}", "@Query(value=\"SELECT s FROM Shelf s, IN(s.book) b WHERE b.id = ?1\", nativeQuery=false\n )\n Optional<Shelf> findShelfByBookId(Integer bookId);", "@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "java.lang.String getHotelId();", "public BookBean retrieveBook(String bid) throws SQLException {\r\n\t\tString query = \"select * from BOOK where bid='\" + bid + \"'\";\t\t\r\n\t\tBookBean book = null;\r\n\t\tPreparedStatement p = con.prepareStatement(query);\t\t\r\n\t\tResultSet r = p.executeQuery();\r\n\t\t\r\n\t\twhile(r.next()){\r\n\t\t\tString bookID = r.getString(\"BID\");\r\n\t\t\tString title = r.getString(\"TITLE\");\r\n\t\t\tint price = r.getInt(\"PRICE\");\r\n\t\t\tString bookCategory = r.getString(\"CATEGORY\");\t\t\t\r\n\t\t\tbook = new BookBean(bookID, title, price,bookCategory);\r\n\t\t}\r\n\t\tr.close();\r\n\t\tp.close();\r\n\t\treturn book;\r\n\t}", "public long getItemShopBasketId();", "public long getShopBasketId();", "@Override\n public Optional<BookDto> getBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n LogUtils.getInfoLogger().info(\"Found the book: {}\", bookEntity.get());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not found\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "java.lang.String getBidid();", "public void setBookId(String bookId) {\r\n this.bookId = bookId == null ? null : bookId.trim();\r\n }", "public Medium getBook(String isbn) {\n\n Session session = getSessionFactory().openSession();\n session.beginTransaction();\n Book book = null;\n try {\n book = session.createQuery(\"from Book where isbn = :isbn\", Book.class).setParameter(\"isbn\", isbn).getSingleResult();\n } catch (NoResultException nre) {\n // book is already null. so nothing to do\n }\n session.getTransaction().commit();\n session.close();\n\n return book;\n //return bookList.stream().filter(i -> ((Book) i).getIsbn().equals(isbn)).findFirst().orElse(null);\n }", "public String getBookBookcaseNo() {\n return bookBookcaseNo;\n }", "public Book read(int bookId){\n System.out.println(\"looking for Book with id \" + bookId);\n Book b = new Book();\n \n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jbook = new JSONObject(resultAttribute);\n\n if(jbook.getInt(\"idBOOK\") == bookId){\n b = new Book(jbook);\n break;\n }\n keyIterator.next(); \n }\n }\n catch(Exception ex){\n ex.printStackTrace();\n } \n return b;\n }", "@Basic( optional = true )\n\t@Column( name = \"book_name\", length = 2147483647 )\n\tpublic String getBookName() {\n\t\treturn this.bookName;\n\t\t\n\t}", "public void setBookId(String bookId) {\n\t\tthis.bookId = bookId == null ? null : bookId.trim();\n\t}", "@Override\n\tpublic String removeBook(int bookId) {\n\t\treturn null;\n\t}", "List<Book> getBooksByAuthorId(Integer authorId);", "public java.lang.Integer getId_rango();", "TCar selectByPrimaryKey(Integer fitemid);", "public Book getBookById(int id) {\n\t\tBook result = null;\n\t\tfor (Book aux : _booksList) {\n\t\t\tif (aux.get_id() == id)\n\t\t\t\treturn aux;\n\t\t}\n\t\treturn result;\n\t}", "private int getProductIdFromDatabase() throws ClassNotFoundException, SQLException\r\n {\n String randomKey = Helper.getRandomString();\r\n \r\n //Importiamo il driver di mysql\r\n \r\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\r\n //Tramite l'oggetto conn, stiamo creando la connessione al database \r\n Connection con = Helper.getDatabaseConnection();\r\n \r\n //L'oggetto stmt esegue fisicamente la query sul db\r\n Statement stmt=con.createStatement();\r\n //Genero la query da eseguire\r\n String query = \"INSERT INTO products (price,name,randomkey) VALUES ('\" + this.price + \"','\" + this.name + \"','\" + randomKey + \"')\";\r\n //Eseguo la query di inserimento sul DB\r\n stmt.executeUpdate(query);\r\n \r\n //Genero la query che estrae l'id della macchinetta appena inserita\r\n query = \"SELECT products_id FROM products WHERE randomkey='\" + randomKey + \"'\";\r\n //Estraggo i dati della query, associati ad un oggetto di tipo ResultSet\r\n ResultSet rs=stmt.executeQuery(query);\r\n \r\n //Leggo la prima riga dei risultati dello statement\r\n rs.next();\r\n \r\n //Converto in intero il primo campo del resultset relativo alla query precedente\r\n int retvalue =rs.getInt(1);\r\n \r\n //Cancello dal database la randomkey che non mi serve più\r\n query = \"UPDATE products SET randomkey = NULL WHERE products_id = \" + retvalue;\r\n stmt.executeUpdate(query);\r\n \r\n return retvalue;\r\n }", "public LiveData<BookTable> checkIfFavoriteBookExistsLocally(String bookID) {\n return bookTableDAO.getFavoriteBookByID(bookID);\n }", "private void getBookItemIdForPlacingBook(HttpServletRequest request, HttpServletResponse response, HttpSession session, RequestDispatcher dispatcher) throws ServletException, IOException {\n\t\t\n\t\tString bookItemCode = (String) session.getAttribute(\"bookItemCodeFromPlacingBook\");\n\t\t//Get value properties from bookItem\n\t\t\n\t\tthis.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID] = \"\";\n\t\t\n\t\tthis.bookItem.getValueInformations(bookItemCode, BookItem.BOOK_ITEM_CODE);\n\t\t\n\t\tif(this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID].equals(\"\")) {\n\t\t\t//Display error \n\t\t\t\n\t\t\tsession.setAttribute(\"styleErrorPlaceBook\", \"display: block;\");\n\t\t\tsession.setAttribute(\"styleSuccessResutPlaceBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver15Days\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorOver10BooksLending\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorSameBook\", \"display: none;\");\n\t\t\tsession.setAttribute(\"errorNotExistBookItem\", \"display: block;\");\n\t\t\tsession.setAttribute(\"errorNotAvaiablePlaceBook\", \"display: none;\");\n\t\t\t//Create dispatcher and forward to main.jsp\n\t\t\t\n\t\t\tdispatcher = getServletContext().getRequestDispatcher(\"/main.jsp\");\n\t\t\tdispatcher.forward(request, response);\n\t\t\t\n\t\t\treturn;\n\t\t} else {\n\t\t\t//Set some attributes\n\t\t\t\n\t\t\tsession.setAttribute(\"bookItemIdFromController\", this.bookItem.getValueProperties()[BookItem.BOOK_ITEM_ID]);\n\t\t\tsession.setAttribute(\"typeRequestToLendingController\", \"returnGetBookItemFromBookItemController\");\n\t\t\t//Send direct to LendingBookController\n\t\t\t\n\t\t\tresponse.sendRedirect(\"LendingController\");\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "LuckyBag selectByPrimaryKey(Integer id);", "private String getDetail(final String dbBookId) {\n\t\tDB db = connectionManager.getConnection();\n\t\tDBCollection coll = db.getCollection(TableName.BOOKS);\n\t\tDBObject obj = coll.findOne(QueryCriteria.getById(dbBookId));\n\t\t\n\t\tif (obj != null) {\n\t\t\tobj.put(\"href\", Server.getBaseUrl() +\"/books/\" + dbBookId);\n\t\t\treplaceCollectionUuidsWObjRefs(obj);\n\t\t}\n\n\t\treturn obj != null ? obj.toString() : \"{'notFound':'\" + dbBookId + \"'}\";\n\t}", "@GetMapping(\"/getById/{id}\")\n public Book getBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n return bookService.getBookById(id);\n }", "public int getProductId(){\n connect();\n int id = 0;\n String sql = \"SELECT MAX(id_producto) FROM productos\";\n ResultSet result = null;\n \n try{\n PreparedStatement ps = connect.prepareStatement(sql);\n result = ps.executeQuery();\n //result = getQuery(sql);\n if(result != null){\n while(result.next()){\n id = result.getInt(1);\n }\n }\n connect.close();\n }catch(SQLException ex){\n ex.printStackTrace();\n }\n return id; \n }", "private int ricavaID(String itemSelected){\n String ogg = ricavaNome(itemSelected);\n String schema = ricavaSchema(itemSelected);\n int id = -1;\n \n Statement stmt; \n ResultSet rst;\n \n try{\n stmt = Database.getDefaultConnection().createStatement();\n \n if(modalita == TRIGGER)\n rst = stmt.executeQuery(\"SELECT T.id_trigger FROM trigger1 T WHERE T.nomeTrigger = '\" + ogg + \"' AND T.schema = '\" + schema + \"'\");\n else\n rst = stmt.executeQuery(\"SELECT P.ID_procedura FROM Procedura P WHERE P.nomeProcedura = '\" + ogg + \"' AND P.schema = '\" + schema + \"'\");\n \n while(rst.next()){\n id = rst.getInt(1);\n }\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n \n return id;\n }", "@RequestMapping(value=\"/{bookId}\",method = RequestMethod.GET)\n\tpublic @ResponseBody\n\tBook getBook(@PathVariable(\"bookId\")Integer bookId){\n\t\tBook book = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"entering into try\");\n\t\t\tbook = bookService.getBookById(bookId);\n\t\t\tSystem.out.println(\"got book by id\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"book returned\");\n\t\tSystem.out.println(book.getBookName());\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tStringWriter sw= new StringWriter();\n\t\ttry {\n\t\t\tSystem.out.println(\"1\");\n\t\t\tmapper.writeValue(sw, book);\n\t\t\tSystem.out.println(\"1.5\" + sw.toString());\n\t\t\tSystem.out.println(\"2\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn book;\n\t}", "@Override\n public MyBook findByAllIds(final int bookId,\n final int userId, final int bookshelfId) {\n try {\n MyBook book = jdbcTemplate.queryForObject(\"select * from MyBook \"\n + \"where book_id = ? and user_id = ? and bookshelf_id = ?\",\n new Object[] {bookId, userId,\n bookshelfId}, new MyBookRowMapper());\n return book;\n\n } catch (EmptyResultDataAccessException e) {\n return null;\n }\n }", "public LiveData<List<BookTable>> getFavoriteBooksIdsFromLocal() {\n return bookTableDAO.getAllFavoriteBooks();\n }", "public String getBookIsbn() {\n return bookIsbn;\n }", "@Override\n\tpublic List<Businessrecord> findBusinessrecordbyBookid(String bookid) {\n\t\treturn businessrecordDao.findBusinessrecordbyBookid(bookid);\n\t}", "public int getAvailableRatingPurchaseItemId(int uid, String bid) throws Exception {\n String query = \"SELECT poi.id AS pid FROM POItem poi INNER JOIN PO p ON poi.id=p.id WHERE p.uid=? AND p.status='ORDERED' AND poi.bid=? AND poi.rating=0 LIMIT 1\";\n try (Connection con = this.ds.getConnection();\n PreparedStatement p = con.prepareStatement(query)) {\n p.setInt(1, uid);\n p.setString(2, bid);\n ResultSet r = p.executeQuery();\n int pid = 0;\n if (r.next()) {\n pid = r.getInt(\"pid\");\n }\n r.close();\n p.close();\n con.close();\n return pid;\n }\n }", "PrimaryKey getPrimaryKey();", "public static Book getIdBook(Connection conn, int id) {\n\t\tBook book = null;\n\t\tString sql = \"select * from book where bookid = ?\";\n\t\ttry {\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\n\t\t\tpst.setInt(1, id);\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\tif(rs.next()) {\n\t\t\t\tString title = rs.getString(\"title\");\n\t\t\t\tString detail = rs.getString(\"detail\");\n\t\t\t\tfloat price = rs.getFloat(\"price\");\n\t\t\t\t\n\t\t\t\tbook = new Book(id, title, detail, price);\n\t\t\t}\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn book;\n\t}", "public Book search(String bookId) {\r\n for (Iterator iterator = books.iterator(); iterator.hasNext();) {\r\n Book book = (Book) iterator.next();\r\n if (book.getId().equals(bookId)) {\r\n return book;\r\n }\r\n }\r\n return null;\r\n }", "MemberFav selectByPrimaryKey(Long id);", "public int getHotelID() {\n return hotelID;\n }", "public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }", "public Integer getBookCommentId() {\n return bookCommentId;\n }", "@Override\n public MyBook findByUserAndBookShelfAndBookId(final String userid,\n final String shelfName, final String bookId) {\n // TODO Auto-generated method stub\n return null;\n }", "private int getDocIdColumnIndex(String[] columnNames, String docIdColumnName) throws PersistenceException {\n int itemIdColNum = -1;\n if (docIdColumnName != null) {\n for (int i = 0; i < columnNames.length; i++) {\n if (columnNames[i].equals(docIdColumnName)) {\n itemIdColNum = i + 1; // + 1 for JDBC\n break;\n }\n }\n if (itemIdColNum == -1) {\n throw new PersistenceException(\n String.format(\"The document ID column could not be found in the SQL result set. docIdColumn: '%s', SQL: %s, columns: %s.\",\n docIdColumnName, sqlStatement, String.join(\", \", columnNames)));\n }\n }\n return itemIdColNum;\n }", "public Booking findOne(int id) {\n String sql = getJoinedQuery() + \" WHERE b.id = ?\";\n List<Booking> bookings = jdbc.query(sql, new Object[] {id}, resultSetExtractor);\n return bookings.get(0);\n }", "ImMyFriend selectByPrimaryKey(Long myFriendId);", "public int getStudentId();", "Integer getID();", "Integer getID();" ]
[ "0.6880546", "0.6880546", "0.6880546", "0.685767", "0.6723067", "0.67169005", "0.6663629", "0.66119176", "0.66119176", "0.64920616", "0.64289176", "0.62001705", "0.62001705", "0.61311364", "0.61260134", "0.61055946", "0.6081582", "0.6081582", "0.6081582", "0.60722697", "0.60271436", "0.5985138", "0.5974504", "0.5969642", "0.59447026", "0.5934546", "0.5924805", "0.59214896", "0.588919", "0.58845246", "0.5878056", "0.58701956", "0.5844196", "0.5805133", "0.5804016", "0.57357913", "0.5684291", "0.5598854", "0.5550189", "0.5549998", "0.55463105", "0.55050296", "0.54820895", "0.5480151", "0.5480151", "0.5468829", "0.5423229", "0.54139686", "0.54105604", "0.5393319", "0.5386596", "0.53857446", "0.5381975", "0.5370245", "0.536578", "0.5347224", "0.53472114", "0.5322799", "0.5310888", "0.5213762", "0.5208163", "0.51999956", "0.51647973", "0.51509815", "0.5146897", "0.5144032", "0.5103231", "0.508433", "0.50819016", "0.50598514", "0.5010111", "0.50100785", "0.5004605", "0.49975738", "0.49962264", "0.4992047", "0.49915764", "0.49869978", "0.4983483", "0.49824542", "0.49824357", "0.49700433", "0.49671894", "0.49635777", "0.49612793", "0.49597463", "0.49512", "0.49453357", "0.49443808", "0.4941046", "0.4930662", "0.49255487", "0.49237055", "0.49186066", "0.49171132", "0.49144638", "0.49122247", "0.49067828", "0.49067828" ]
0.68935823
1
This method was generated by MyBatis Generator. This method sets the value of the database column favortie.bookid
public void setBookid(Integer bookid) { this.bookid = bookid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBook_id(int book_id) {\n\tthis.book_id = book_id;\n}", "public void setBookid(Integer bookid) {\r\n\t\tthis.bookid = bookid;\r\n\t}", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookID(int bookID) {\n this.bookID = bookID;\n }", "public void setBookId(String bookId) {\n this.bookId = bookId;\n }", "public void setBookId(long bookId) {\n _sTransaction.setBookId(bookId);\n }", "public void setBookId(String bookId) {\r\n this.bookId = bookId == null ? null : bookId.trim();\r\n }", "public void setBookId(String bookId) {\n\t\tthis.bookId = bookId == null ? null : bookId.trim();\n\t}", "public int getBook_id() {\n\treturn book_id;\n}", "public Integer getBookid() {\r\n\t\treturn bookid;\r\n\t}", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookId() {\n return bookId;\n }", "public Integer getBookid() {\n return bookid;\n }", "public Integer getBookid() {\n return bookid;\n }", "private void setORM_Book(i_book.Book value) {\r\n\t\tthis.book = value;\r\n\t}", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "public String getBookId() {\r\n return bookId;\r\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n return bookId;\n }", "public String getBookId() {\n\t\treturn bookId;\n\t}", "@Id \n\t@Basic( optional = false )\n\t@Column( name = \"book_id\", nullable = false )\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t\t\n\t}", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "public void setBook(Book book) {\n this.book = book;\n }", "public int getBookID() {\n return bookID;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "public BookBean getBook(String Bookid) throws SQLException {\n\t\tConnection con = DbConnection.getConnection();\n\t\tBookBean book = new BookBean();\n\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from books where bookid= ?\";\n\n\t\ttry {\n\t\t\tcon.setAutoCommit(false);// 鏇存敼JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t\tps = con.prepareStatement(sql);\n\t\t\t\n\t\t\tps.setString(1, Bookid);//ps锟斤拷锟斤拷锟斤拷锟絬ser锟斤拷锟斤拷锟斤拷锟斤拷要锟斤拷同锟斤拷\n\t\t\t\n\t\t\trs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tbook.setBookid(rs.getString(\"bookid\"));\n\t\t\t\tbook.setBookname(rs.getString(\"bookname\"));\n\t\t\t\tbook.setAuthor(rs.getString(\"author\"));\n\t\t\t\tbook.setCategoryid(rs.getString(\"categoryid\"));\n\t\t\t\tbook.setPublishing(rs.getString(\"publishing\"));\n\t\t\t\tbook.setPrice(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityin(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityout(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setQuantityloss(Double.parseDouble(rs.getString(\"bookname\")));\n\t\t\t\tbook.setPicture(rs.getString(\"bookname\"));\n\t\t\t}\n\t\t\tcon.commit();//鎻愪氦JDBC浜嬪姟\n\t\t\tcon.setAutoCommit(true);// 鎭㈠JDBC浜嬪姟鐨勯粯璁ゆ彁浜ゆ柟寮�\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tcon.rollback();//鍥炴粴JDBC浜嬪姟\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDbConnection.closeConnection(rs, ps, con);\n\t\t}\n\n\t\treturn book;\n\t}", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "Book selectByPrimaryKey(String bid);", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "@Override\r\n\tpublic boolean updateByBookId(Book book) {\n\t\tboolean flag=false;\r\n\t\tString sql=\"update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? \"\r\n\t\t\t\t+ \"where id=?\";\r\n\t\tList<Object> list=new ArrayList<Object>();\r\n\t\tif(book!=null){\r\n\t\t\tlist.add(book.getTitle());\r\n\t\t\tlist.add(book.getAuthor());\r\n\t\t\tlist.add(book.getPublisherId());\r\n\t\t\tlist.add(book.getPublishDate());\r\n\t\t\tlist.add(book.getIsbn());\r\n\t\t\tlist.add(book.getWordsCount());\r\n\t\t\tlist.add(book.getUnitPrice());\r\n\t\t\tlist.add(book.getContentDescription());\r\n\t\t\tlist.add(book.getAurhorDescription());\r\n\t\t\tlist.add(book.getEditorComment());\r\n\t\t\tlist.add(book.getTOC());\r\n\t\t\tlist.add(book.getCategoryId());\r\n\t\t\t\r\n\t\t\tlist.add(book.getBooksImages());\r\n\t\t\tlist.add(book.getQuantity());\r\n\t\t\t\r\n\t\t\tlist.add(book.getAddress());\r\n\t\t\tif(book.getBaoyou()==\"0\"){\r\n\t\t\t\tbook.setBaoyou(\"不包邮\");\r\n\t\t\t}else{\r\n\t\t\t\tbook.setBaoyou(\"包邮\");\r\n\t\t\t}\r\n\t\t\tlist.add(book.getBaoyou());\r\n\t\t\tlist.add(book.getId());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint update = runner.update(sql, list.toArray());\r\n\t\t\tif(update>0){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void setBookDocId(Number value) {\n setAttributeInternal(BOOKDOCID, value);\n }", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }", "public void setBooked(Integer booked) {\n this.booked = booked;\n }", "public Book updateBook(Long id, Book book) {\n return this.sRepo.save(book);\n\n\t}", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "@Override\n public MyBook findById(final int bookshelfId,\n final int userId, final int bookId) {\n System.err.println(\"MyBookRepositoryImpl:172 - not implement\");\n System.exit(1);\n return null;\n }", "BookDO selectByPrimaryKey(String bookIsbn);", "public int bookmarkUpdate(int ffid,String bookstate) {\n\t FileFolderMapper mapper = sqlSession.getMapper(FileFolderMapper.class);\r\n\t HashMap<String, Object> map = new HashMap<>();\r\n\t map.put(\"ffid\", ffid);\r\n\t map.put(\"bookstate\", bookstate);\r\n\t return mapper.bookmarkUpdate(map);\r\n\t }", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "public static void updateBook(Book book) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n //Update detail of the book to the database\r\n session.update(book);\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n }", "BookInfo selectByPrimaryKey(Integer id);", "public void establishSelectedBook(final long id) {\r\n selectedBook = dataManager.selectBook(id);\r\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void setHotelId(int value) {\n this.hotelId = value;\n }", "void setBookDao(final BookDao bookDao);", "CmsRoomBook selectByPrimaryKey(String bookId);", "public Book(Integer id) {\n\t\tthis.id = id;\n\t}", "public void book(long bookRecordId) {\n book(bookRecordId, false);\n }", "Book selectByPrimaryKey(String id);", "public void setBookCode(java.lang.String value);", "Book getBookById(Integer id);", "public String getNextBookId(){ \n return \"book-\" + dbmanager.getNextId(); \n }", "public void setIdProveedor(Integer idProveedor) {\n this.idProveedor = idProveedor;\n }", "public void update(int bookId, int quantity){ \n JSONObject jbook = dbmanager.getBmanager().readJSON(bookId);\n dbmanager.getBmanager().delete(bookId);\n jbook.remove(\"quantity\");\n jbook.put(\"quantity\", Integer.toString(quantity));\n dbmanager.open();\n dbmanager.createCommit(getNextBookId(),jbook);\n dbmanager.close();\n \n }", "@Override\n\tpublic Optional<ShoppingCart> getBookById(int bookid) {\n\t\treturn dao.findById(bookid);\n\t}", "public void setBookingId(int booking_id) {\n this.booking_id = booking_id;\n }", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "public com.huqiwen.demo.book.model.Books fetchByPrimaryKey(long bookId)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\n public MyBook findByUserAndBookShelfAndBookId(final String userid,\n final String shelfName, final String bookId) {\n // TODO Auto-generated method stub\n return null;\n }", "public void setIsbn(Long isbn) {\n this.isbn = isbn;\n }", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "public Integer getFavortieid() {\n return favortieid;\n }", "public void setPropertyBuyerId(int propertyBuyerId) {\n\t\tthis.propertyBuyerId = propertyBuyerId;\n\t}", "int updateByPrimaryKey(Book record);", "int updateByPrimaryKey(Book record);", "@Override\n\tpublic void put(Integer id, BookCopies object) throws SQLException {\n\t\t\n\t}", "public org.jooq.test.h2.generatedclasses.tables.pojos.VBook fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.ID, value);\n\t}", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "public void setBookStatus(Integer bookStatus) {\n this.bookStatus = bookStatus;\n }", "Book(int id, String judul, int tahun) {\n // nah disini mirip kayak override/overload, cuman pake nya keyword this\n // this ini merujuk ke variabel yang diatas(property) sedang yang nggak merujuk\n // ke parameter\n this.id = id;\n this.judul = judul;\n this.tahun = tahun;\n }", "IntegralBook selectByPrimaryKey(Long integralBookId);", "public void setIdCargaEmpleado(int idCargaEmpleado)\r\n/* 108: */ {\r\n/* 109:195 */ this.idCargaEmpleado = idCargaEmpleado;\r\n/* 110: */ }", "@Override\r\n\tpublic Book findOneBook(String id) {\n\t\t\r\n\t\tString sql=\"select * from books where id= ?\";\r\n\t\tString sql2 =\"select * from categories where id=?\";\r\n\t\tString sql3 =\"select * from publishers where id=?\";\r\n\t\ttry {\r\n\t\t\tBook book = runner.query(sql, new BeanHandler<Book>(Book.class), id);\r\n\t\t\tCategory category = runner.query(sql2, new BeanHandler<Category>(Category.class), book.getCategoryId());\r\n\t\t\tPublisher publisher = runner.query(sql3, new BeanHandler<Publisher>(Publisher.class), book.getPublisherId());\r\n\t\t\tbook.setPublisher(publisher);\r\n\t\t\tbook.setCategory(category);\r\n\t\t\tif(book!=null)\r\n\t\t\treturn book;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int updateByPrimaryKey(BookInfo record);", "@Override\r\n\tpublic Book getBook(long bookId) {\n\t\treturn bd.getOne(bookId);\r\n\t}", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "@PutMapping(\"/{username}/books/{bookId}\")\n public Book markBookInLibrary(@PathVariable String username,\n @PathVariable Long bookId,\n @RequestBody Book book) {\n\n UserBookStatus userBookStatus = UserBookStatus.valueOf(book.getStatus().toUpperCase());\n UserBook userBook = userService.markBook(username, bookId, userBookStatus);\n return userBookToBook.apply(userBook);\n }", "public void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);", "protected void setId(EmployeeLeave employeeLeave, ResultSet rs, int rowNumber) throws SQLException{\n\t\tString id = rs.getString(EmployeeLeaveTable.COLUMN_ID);\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\n\t\temployeeLeave.setId(id);\n\t}", "public void setIdperfil(int pIdperfil){\n this.idperfil = pIdperfil;\n }", "public void setIdBoleta(int value) {\n this.idBoleta = value;\n }", "@Override\n\tpublic String removeBook(int bookId) {\n\t\treturn null;\n\t}", "void setBookReservationDao(final BookReservationDao bookReservationDao);", "public void setBookName(java.lang.String value);", "int updateByPrimaryKeySelective(Book record);", "int updateByPrimaryKeySelective(Book record);", "public void setBookVersion(Integer bookVersion) {\n this.bookVersion = bookVersion;\n }" ]
[ "0.70099497", "0.6930392", "0.684707", "0.684707", "0.684707", "0.6585995", "0.6556206", "0.621511", "0.6177436", "0.6137287", "0.60499585", "0.60369164", "0.600789", "0.600789", "0.600789", "0.6006853", "0.6006853", "0.5921825", "0.59018046", "0.5899651", "0.5807922", "0.5807922", "0.574881", "0.5741504", "0.57055336", "0.5704796", "0.56510735", "0.56385404", "0.56385404", "0.55860335", "0.5552183", "0.5511851", "0.5391306", "0.5359557", "0.53587484", "0.53489393", "0.53213626", "0.5276885", "0.5267404", "0.5256531", "0.52541023", "0.52140385", "0.5192144", "0.51830727", "0.51767635", "0.5162339", "0.515961", "0.5155786", "0.5148318", "0.5136726", "0.513012", "0.5126005", "0.51224387", "0.51126796", "0.5092055", "0.50880045", "0.5084984", "0.50849634", "0.5083758", "0.5067953", "0.50668544", "0.50613767", "0.5053042", "0.5047695", "0.50208455", "0.50038344", "0.49944824", "0.49838468", "0.49497983", "0.49397716", "0.49260223", "0.49236947", "0.49236608", "0.49236608", "0.49151835", "0.49133387", "0.49097013", "0.49052468", "0.49006692", "0.49006692", "0.49006692", "0.4889432", "0.48866656", "0.48861408", "0.48792884", "0.48756042", "0.487174", "0.48613647", "0.48513687", "0.48475924", "0.48437428", "0.48390463", "0.48357245", "0.48341945", "0.48237503", "0.48171508", "0.48105982", "0.48105982", "0.47946706" ]
0.7036041
1
This method was generated by MyBatis Generator. This method returns the value of the database column favortie.favortiestate
public String getFavortiestate() { return favortiestate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "public Integer getFavortieid() {\n return favortieid;\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public Double[] getFavAM() {\n return FavoritosAM;\r\n }", "public Double[] getFavFM() {\n return FavoritosFM;\r\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "public int getNumOfFav() {\n return fullPhoto.getNumOfFav();\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void setFavTitle(final String favTitle){\n\t\tthis.favTitle = favTitle;\n\t}", "protected abstract String getFavoriteColumnName();", "public void makeFavorite(String title, int favorite)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n db.execSQL(\n \"UPDATE \" + TABLE_NAME +\n \" SET \" + COL8 + \" = \" + favorite +\n \" WHERE \" + COL2 + \" = '\" + title + \"'\");\n }", "public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}", "public Date getDateHired(){\n return profile.getDateHired();\n }", "public String getToday_fa() {\n return today_fa;\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public Date getDATE_APPROVED() {\r\n return DATE_APPROVED;\r\n }", "public String getDailyFortune()\r\n {\n return fortuneService.getFortune();\r\n }", "@Override\r\n\tpublic String getDailyFortune() {\n\t\treturn ifortune.getFortune();\r\n\t}", "public String getDailyFortune() {\n\t\treturn ifortune.getFortune();\n\t}", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "public Date getRecommendDate() {\n return recommendDate;\n }", "MemberFav selectByPrimaryKey(Long id);", "public Timestamp getDateInvoiced();", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "public List<String> getFavoriteFoods() {\n return new ArrayList<>(favoriteFoods);\n }", "public List<Restaurant> listRestaurantVotedToday(){\r\n\t\tList<Restaurant> restaurantList = new LinkedList<Restaurant>();\r\n\t\tList<Vote> votingList = DataDAO.getVotingList();\r\n\t\tList<Vote> voteListResult = votingList.stream().filter(l -> l.getVotingDate().equals(DateUtil.asDate(LocalDate.now()))).collect(Collectors.toList());;\r\n\t\tvoteListResult.forEach(v -> restaurantList.add(v.getRestaurant()) );\r\n\t\treturn restaurantList;\r\n\t\t\r\n\t}", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public String getToday_fb() {\n return today_fb;\n }", "protected abstract SQLQuery getFavoriteUpdateSQLQuery();", "@Override\n public String getDailyFortune() {\n return fortuneService.getFortune();\n\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public Date getPutawayDate() {\n return putawayDate;\n }", "Date getInvoicedDate();", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@Override\n\tpublic FavoriteVO selectFavoriteVO(int pl_index, String mem_mail) {\n\t\treturn null;\n\t}", "public String favoriteHeritages(boolean flag)\n\t{\n\t\tif(flag == false)\n\t\t\treturn \"Enter the Haritages which you like the most (use comma seperated list)\";\n\t\telse\n\t\t\treturn \"Favourite Haritages: \";\n\t}", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public LocalDate getRecommendDate() {\n\t\treturn RecommendDate;\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn this.fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn this.fortuneService.getFortune();\n\t}", "public boolean favouriteCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.favouriteAccount();\n }", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "@Override\npublic String getDailyFortune() {\n\treturn fortuneService.getFortune();\n}", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "public BigDecimal getFchargerebate() {\n return fchargerebate;\n }", "@Override\n\tpublic String getDailyFortune() {\n\t\t// TODO Auto-generated method stub\n\t\treturn fortuneService.getFortune();\n\t}", "@Select({\n \"select\",\n \"recommended_code, user_id, recommended_url, recommended_qrcode, update_time, \",\n \"create_time\",\n \"from user_recommended_code\",\n \"where recommended_code = #{recommendedCode,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"recommended_code\", property=\"recommendedCode\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_url\", property=\"recommendedUrl\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"recommended_qrcode\", property=\"recommendedQrcode\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"update_time\", property=\"updateTime\", jdbcType=JdbcType.TIMESTAMP),\n @Result(column=\"create_time\", property=\"createTime\", jdbcType=JdbcType.TIMESTAMP)\n })\n UserRecommendedCode selectByPrimaryKey(String recommendedCode);", "public Cursor displayFavouriteData(){\n SQLiteDatabase db = this.getReadableDatabase();\n String selectQuarry = \"SELECT * FROM \"+Db_Table+\" WHERE \" +FAVOURITES+\" LIKE 1\";\n Cursor cursor =db.rawQuery(selectQuarry,null);\n return cursor;\n }", "public static ArrayList<Restaurant> getFav(Long idUser) {\n\t\tArrayList<Favourite> allFav=loadFavourite();\n\t\tArrayList<Restaurant> allRes=RestaurantDao.loadRestaurants();\n\t\tArrayList<Restaurant> returnFavRes=new ArrayList<>();\n\t\tfor(Favourite f:allFav) {\n\t\t\tif(f.getUserId().equals(idUser)) {\n\t\t\t\tfor(Restaurant r:allRes) {\n\t\t\t\t\tif(f.getIdRes().equals(r.getId())) {\n\t\t\t\t\t\treturnFavRes.add(r);\n\t\t\t\t\t\tSystem.out.println(\"restoran\"+r.getName() +\"\" +r.getAddress());\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn returnFavRes;\n\t}", "@Override\n public int getProductFavouritesCount(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesCount(params);\n }", "public Date getEffectivedateTo() {\n return (Date) getAttributeInternal(EFFECTIVEDATETO);\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "private void getFavData() {\n favouriteViewModel.getFavouritePostData().observe(this, result -> {\n if (result != null) {\n if (result.status == Status.SUCCESS) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n itemViewModel.setItemDetailObj(itemViewModel.itemId, itemViewModel.historyFlag, loginUserId);\n }\n\n } else if (result.status == Status.ERROR) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n }\n }\n }\n });\n }", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortuneService.getFortune();\n\t}", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "EcsFavourableActivity selectByPrimaryKey(Short act_id);", "public int doMostFavourAction() {\n if (this.eatable > this.playable && this.eatable > this.ignorable) {\n this.raiseEatable(1.1, 0.9);\n return 0;\n } else if (this.playable > this.eatable && this.playable > this.ignorable) {\n this.raisePlayable(1.1, 0.9);\n return 1;\n } else if (this.ignorable > this.eatable && this.ignorable > this.playable) {\n this.raiseIgnorable(1.1, 0.9);\n return 2;\n } else {\n int random = (int) (Math.random()*3);\n if (random == 0) {\n this.raiseEatable(1.1, 0.9);\n } else if (random == 1) {\n this.raisePlayable(1.1, 0.9);\n } else {\n this.raiseIgnorable(1.1, 0.9);\n }\n return random;\n }\n }", "@Override\n\tpublic List<FestivalVO> festivalList() {\n\t\treturn sqlSession.selectList(\"com.project.app.festival.festivalList\");\n\t}", "@Override\n\tpublic List<DataTaxTaskDetailFavouredPolicy> getDetailFav(\n\t\t\tDataTaxTask entityview, Integer id) {\n\t\tList<DataTaxTaskDetailFavouredPolicy> list = taxTaskDao.getDetailFav(entityview,id);\n\t\treturn list;\n\t}", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "@Override\n public List<ProductPojo> getProductFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductFavouritesList(params);\n }", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "public Date getfPeticion() {\r\n return fPeticion;\r\n }", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public String getHaveFur(){\r\nreturn haveFur;\r\n }", "public Date getRatingDate() {\n return ratingDate;\n }", "public List<MovieDetails> getAllFavoriteMovies() {\n SQLiteDatabase database = this.getWritableDatabase();\n List<MovieDetails> movieDetailses = new ArrayList<>();\n List<Integer> favoritesMovieId = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + FavoriteMoviesEntry.TABLE_NAME;\n Cursor cursor = database.rawQuery(selectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n int id = getIdFromCursor(cursor);\n String selectFavoriteMovieQuery = \"SELECT * FROM \" + MoviesDetailsEntry.TABLE_NAME + \"WHERE \" + MoviesDetailsEntry._ID + \"= \" + id;\n Cursor movieCursor = database.rawQuery(selectFavoriteMovieQuery, null);\n if (movieCursor.moveToFirst()) {\n do {\n MovieDetails movieDetails = getMovieDetailsFromCursor(movieCursor);\n movieDetailses.add(movieDetails);\n } while (movieCursor.moveToNext());\n }\n } while (cursor.moveToNext());\n }\n database.close();\n\n return movieDetailses;\n }", "public String getFolioFlete() {\n return (String) getAttributeInternal(FOLIOFLETE);\n }", "@Override\n\tpublic LocalDate convertToEntityAttribute(Date dbData) {\n\t\treturn dbData.toLocalDate();\n\t}", "public Date getDataFine() {\n return (Date)this.getCampo(nomeDataFine).getValore();\n }", "public Timestamp getDateConfirm() {\n\t\treturn (Timestamp) get_Value(\"DateConfirm\");\n\t}", "@Optional\n @ImportColumn(\"FAKTOR\")\n Property<Double> faktorBereinigterKaufpreis();", "@Override\n public int getProductTypeFavouritesCount(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductTypeFavouritesCount(params);\n }", "public boolean insertFavToDB(Favorite favorite) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(mDBAccountString, favorite.getAccount());\n contentValues.put(mDBTitleString, favorite.getTitle());\n contentValues.put(mDBDescString, favorite.getDescription());\n contentValues.put(mDBURLString, favorite.getUrl());\n long rowId = mFavSQLiteDB.insert(\"Favorites\", null, contentValues);\n return rowId != -1; //If insert fails, rowID will equal -1\n }", "public String getFecha_Venta() {\n return fecha_Venta;\n }", "@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(13)\r\n java.lang.String favoriteService();", "public Date getUpddte() {\r\n return upddte;\r\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "public ArrayList<VideoDTO> getFavouriteVideosArrayList() {\n try {\n ArrayList<VideoDTO> arrayListNewVideoDTOs = new ArrayList<VideoDTO>();\n SQLiteDatabase database = this.getWritableDatabase();\n database.enableWriteAheadLogging();\n String getFavoutiteVideosListQuery = \"SELECT * FROM \" + VideoTable.VIDEO_TABLE + \" WHERE \" + VideoTable.KEY_VIDEO_IS_FAVORITE + \"=1 \" + \" GROUP BY \" + VideoTable.KEY_VIDEO_ID + \" ORDER BY \" + VideoTable.KEY_VIDEO_NAME + \" ASC\";\n Cursor cursor = database.rawQuery(getFavoutiteVideosListQuery, null);\n if (cursor.moveToFirst()) {\n do {\n VideoDTO videoDTO = new VideoDTO();\n videoDTO.setVideoId(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_VIDEO_ID)));\n videoDTO.setVideoName(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_NAME)));\n videoDTO.setVideoShortDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SHORT_DESC)));\n videoDTO.setVideoLongDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_LONG_DESC)));\n videoDTO.setVideoShortUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SHORT_URL)));\n videoDTO.setVideoLongUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_LONG_URL)));\n videoDTO.setVideoThumbnailUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_THUMB_URL)));\n videoDTO.setVideoStillUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_STILL_URL)));\n videoDTO.setVideoCoverUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_COVER_URL)));\n videoDTO.setVideoWideStillUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_WIDE_STILL_URL)));\n videoDTO.setVideoBadgeUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_BADGE_URL)));\n videoDTO.setVideoDuration(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_VIDEO_DURATION)));\n videoDTO.setVideoTags(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_TAGS)));\n if (cursor.getInt(cursor.getColumnIndex(VideoTable.KEY_VIDEO_IS_FAVORITE)) == 0)\n videoDTO.setVideoIsFavorite(false);\n else\n videoDTO.setVideoIsFavorite(true);\n\n videoDTO.setVideoIndex(cursor.getInt(cursor.getColumnIndex(VideoTable.KEY_VIDEO_INDEX)));\n videoDTO.setPlaylistName(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_NAME)));\n videoDTO.setPlaylistId(cursor.getLong(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_ID)));\n videoDTO.setPlaylistThumbnailUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_THUMB_URL)));\n videoDTO.setPlaylistShortDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_SHORT_DESC)));\n videoDTO.setPlaylistLongDescription(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_LONG_DESC)));\n videoDTO.setPlaylistTags(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_TAGS)));\n videoDTO.setPlaylistReferenceId(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_PLAYLIST_REFERENCE_ID)));\n videoDTO.setVideoSocialUrl(cursor.getString(cursor.getColumnIndex(VideoTable.KEY_VIDEO_SOCIAL_URL)));\n\n arrayListNewVideoDTOs.add(videoDTO);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n return arrayListNewVideoDTOs;\n } catch (Exception e) {\n e.printStackTrace();\n return new ArrayList<VideoDTO>();\n }\n\n }", "public java.util.Date getApproveExpenseDate () {\n\t\treturn approveExpenseDate;\n\t}", "@Override\n public List<ProductPojo> getProductTypeFavouritesList(Map<String, Object> params) {\n return yourFavouritesDetaildao.getProductTypeFavouritesList(params);\n }", "@Override\n\tpublic void getFavorit(int idUser) {\n\t\t\n\t}", "List<String> getFavoriteRecipeTitle();", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "public String getRetentionFlag() {\n return (String) getAttributeInternal(RETENTIONFLAG);\n }", "public void setFavSubTitle(final String favSubTitle){\n\t\tthis.favSubTitle = favSubTitle;\n\t}", "@Override\r\n\tpublic String getDailyFortune() {\n\t\treturn \"Just do it: \" + fortuneService.getFortune();\r\n\t}", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "public java.lang.String getApproveExpenseTime () {\n\t\treturn approveExpenseTime;\n\t}", "public StrColumn getDateRevised() {\n return delegate.getColumn(\"date_revised\", DelegatingStrColumn::new);\n }", "public static String getUltimaFiesta() {\n Map<String, DiaFiestaMeta> diasFiestas;\n Iterator<String> itDiasFiestasMeta;\n SimpleDateFormat formatoDelTexto ;\n Map<String, Date> mapFiestaDia = new HashMap<>(); // \"uidFiesta:tituloDiaFiestaFormateado\"\n HashSet<Fiestas> fiestas;\n Date fechaMasReciente;\n String uidFiestaMasReciente;\n Iterator<String> itmapFiestaDia;\n\n Date date = new Date();\n formatoDelTexto = new SimpleDateFormat(\"dd MMMM yyyy\",new Locale(\"es\",\"ES\"));\n String strDate =formatoDelTexto.format(date);\n uidFiestaMasReciente =\"\";\n try {\n fechaMasReciente = formatoDelTexto.parse(\"15 Junio 1980\");\n } catch (ParseException e) {\n fechaMasReciente = new Date();\n e.printStackTrace();\n }\n fiestas = (HashSet) baseDatos.get(Tablas.Fiestas.name());\n for (Fiestas fiesta : fiestas){\n diasFiestas = fiesta.getDiasFiestas();\n itDiasFiestasMeta = diasFiestas.keySet().iterator();\n while (itDiasFiestasMeta.hasNext()){\n String keyDia = itDiasFiestasMeta.next();\n DiaFiestaMeta diaFiestaMeta = diasFiestas.get(keyDia);\n mapFiestaDia.put(fiesta.getUidFiestas(), formatearDia(diaFiestaMeta.getTituloDiaFiesta(), fiesta.getUidFiestas()));\n }\n }\n\n itmapFiestaDia = mapFiestaDia.keySet().iterator();\n while (itmapFiestaDia.hasNext()) {\n String key = itmapFiestaDia.next();\n Date fechaI = mapFiestaDia.get(key);\n if (fechaI.after(fechaMasReciente)) {\n uidFiestaMasReciente = key;\n fechaMasReciente = fechaI;\n }\n }\n return uidFiestaMasReciente;\n }", "@Override\n\tpublic String getDailyFortune() {\n\t\treturn fortune.getDailyFortune();\n\t}", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateFav(itemCode, madeIt);\n }" ]
[ "0.7006244", "0.62197435", "0.5279439", "0.51945174", "0.5165863", "0.50141364", "0.49733233", "0.49719942", "0.496343", "0.496343", "0.49156702", "0.4895498", "0.48903614", "0.48770455", "0.48767924", "0.4852443", "0.4803276", "0.4791209", "0.47851017", "0.47850734", "0.47669762", "0.47540742", "0.4742726", "0.47375268", "0.4690085", "0.4684571", "0.46763918", "0.46634227", "0.465142", "0.46332884", "0.46331567", "0.46049955", "0.45934227", "0.458652", "0.45809352", "0.4577523", "0.45603317", "0.4559862", "0.45386338", "0.45358327", "0.4534526", "0.45261073", "0.45197156", "0.45129758", "0.45129758", "0.4511804", "0.4503981", "0.45036438", "0.4492387", "0.4474522", "0.44737047", "0.44706994", "0.44649044", "0.44638154", "0.4463125", "0.44613573", "0.44595453", "0.44512266", "0.44496673", "0.44496673", "0.44496673", "0.44474754", "0.44331187", "0.44167244", "0.44093484", "0.4397998", "0.4394305", "0.4393267", "0.43913627", "0.43893772", "0.43861485", "0.43829224", "0.4368388", "0.43662307", "0.43637246", "0.4362711", "0.4360302", "0.43544963", "0.4343899", "0.43390432", "0.433592", "0.43327397", "0.43290913", "0.43234554", "0.4320229", "0.43199912", "0.43140236", "0.43072158", "0.43033677", "0.4286671", "0.42846817", "0.4283236", "0.42631343", "0.4255042", "0.4251071", "0.423778", "0.42370167", "0.42363322", "0.42344505", "0.42315978" ]
0.7459405
0
This method was generated by MyBatis Generator. This method sets the value of the database column favortie.favortiestate
public void setFavortiestate(String favortiestate) { this.favortiestate = favortiestate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFavortiestate() {\n return favortiestate;\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}", "public void makeFavorite(String title, int favorite)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n\n /* the execSQL Method simply executes this query on the Database, in this Query UPDATE is\n * used to specify the Table Name to Update, SET specifies the Column name to Update in this\n * case COL8 contains favorites and WHERE is the condition in this case it is to make sure\n * that the Movie Title Matches with the given title\n */\n db.execSQL(\n \"UPDATE \" + TABLE_NAME +\n \" SET \" + COL8 + \" = \" + favorite +\n \" WHERE \" + COL2 + \" = '\" + title + \"'\");\n }", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "public void setFavTitle(final String favTitle){\n\t\tthis.favTitle = favTitle;\n\t}", "public Integer getFavortieid() {\n return favortieid;\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "public void setIsUserFav(User user) {\n if(user.isUsersFavouritePost(this.mPost))\n this.isFavourite.set(true);\n else\n this.isFavourite.set(false);\n\n //if(this.mPost.getFavourite().contains(user))\n // this.isFavourite.set(true);\n //this.isFavourite.set(false);\n }", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "public void changeFavorite(boolean a) {\r\n favorite = a;\r\n }", "public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateFav(itemCode, madeIt);\n }", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "public void setFavoriteFlag(int flag, long videoID) {\n try {\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n ContentValues contents = new ContentValues();\n contents.put(VideoTable.KEY_VIDEO_IS_FAVORITE, flag);\n database.update(VideoTable.VIDEO_TABLE, contents, VideoTable.KEY_VIDEO_ID + \"=?\", new String[]{\"\" + videoID});\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void setFavAM(int i, Double n) {\n FavoritosAM[i] = n;\r\n }", "@POST(\"/attractions/{attractionId}/favorite\")\n Call<Void> markFavoriteAttraction(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "public void setFavorite(boolean favorite, boolean animated) {\n if (favorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(favorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(favorite);\n mAnimateUnfavorite = orig;\n }\n }", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setFavFM(int i, Double n) {\n FavoritosFM[i] = n;\r\n }", "public void updateFeedItemAsFavorite(FeedItem item) {\n new updateFeedItemFavoriteAsync(itemDao).execute(item);\n }", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "public void favorite(int index)\n {\n if (latest != null && latest.index == index)\n {\n if (this.showFavorites && !latest.morph.favorite)\n {\n this.toRemove.put(index, new MorphRemove(index, latest.typeIndex));\n this.remove(index);\n }\n\n latest = null;\n }\n }", "public void addMovieToFavorites(Movie movie) {\n movie.setFavorite(true);\n isFavorite = true;\n //change the star from gray to yellow\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n //save the poster in local storage\n String imageName = saveMoviePoster();\n\n //load the necessary movie fields into the ContentValues object\n ContentValues values = new ContentValues();\n values.put(FavoriteMoviesContract.MovieEntry.MOVIEDB_ID, movie.getId());\n values.put(FavoriteMoviesContract.MovieEntry.AVERAGE_VOTE, movie.getVoteAverage());\n values.put(FavoriteMoviesContract.MovieEntry.ORIGINAL_TITLE, movie.getOriginalTitle());\n values.put(FavoriteMoviesContract.MovieEntry.RELEASE_YEAR, movie.getReleaseYear());\n values.put(FavoriteMoviesContract.MovieEntry.RUNTIME, movie.getRuntime());\n values.put(FavoriteMoviesContract.MovieEntry.SYNOPSIS, movie.getSynopsis());\n values.put(FavoriteMoviesContract.MovieEntry.POSTER_IMAGE_NAME, imageName);\n\n //insert the movie into the Favorites db\n Uri uri = getActivity().getContentResolver().\n insert(FavoriteMoviesContract.MovieEntry.CONTENT_URI, values);\n\n if (uri != null) {\n String successMessage = \"You have successfully added \" + movie.getOriginalTitle() +\n \" to the Favorites collection\";\n Toast.makeText(getActivity(), successMessage, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "public void setFavAutomated(Group g) throws IllegalArgumentException {\r\n\r\n\t\tArrayList<Integer> fav = listItemMapper.autoSetFav(g);\r\n\r\n\t\tfor (int a = 0; a < fav.size(); a++) {\r\n\r\n\t\t\tint item_id = fav.get(a);\r\n\t\t\tBoolean available = favoriteItemMapper.checkById(item_id);\r\n\r\n\t\t\tif (available == false) {\r\n\r\n\t\t\t\tItem i = new Item();\r\n\t\t\t\ti.setId(item_id);\r\n\t\t\t\tfavoriteItemMapper.insert(i, g);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "public static void updateFavorite(String userId, final String foodId, final boolean option, final ImageButton favButton) {\n //get database reference\n final DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ArrayList<String> updated = new ArrayList<>();\n boolean exists = false;\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n if (!option) {\n if (foodId.equals(fav))\n Log.d(\"favor\", \"this one should be deleted \");\n else\n updated.add(fav);\n } else {\n if (foodId.equals(fav)) {\n exists = true;\n updated.add(fav);\n } else\n updated.add(fav);\n }\n }\n if (!exists && option) {\n favButton.setImageResource(R.drawable.ic_favorite);\n updated.add(foodId);\n }\n else\n favButton.setImageResource(R.drawable.ic_favorite_empty);\n dbref.child(\"favoritesList\").setValue(updated);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void setFavSubTitle(final String favSubTitle){\n\t\tthis.favSubTitle = favSubTitle;\n\t}", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "public void saveMovieToFavorites() {\n Cursor moviecursor = this.getContentResolver().query(MovieContract.MovieEntry.CONTENT_URI, null, MovieContract.MovieEntry.COLUMN_NAME_MOVIE_ID + \" = \" + mMovie.getID(), null, null, null);\n if(moviecursor.getCount() == 0) { // first time this movie has been favorited insert record\n Uri movieUri = this.getContentResolver().insert(MovieContract.MovieEntry.CONTENT_URI, Constants.createMovieRecord(mMovie));\n long movieid = ContentUris.parseId(movieUri);\n int insertedTrailerCount = this.getContentResolver().bulkInsert(MovieContract.TrailerEntry.CONTENT_URI, Constants.createBulkTrailerValues(Constants.mTrailers, movieid));\n int insertedReviewCount = this.getContentResolver().bulkInsert(MovieContract.ReviewEntry.CONTENT_URI, Constants.createBulkReviewValues(Constants.mReviews, movieid));\n\n if(insertedTrailerCount < 1)\n Log.e(TAG,\"Trailer failed to insert\");\n\n if(insertedReviewCount < 1)\n Log.e(TAG, \" Review failed to insert\");\n }\n }", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "public void setTeachingPercentageFavor(float teachingPercentageFavor)\r\n\t{\r\n\t\tthis.teachingPercentageFavor = teachingPercentageFavor;\r\n\t}", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "private void premium_isFavOrLike(Context context, ArticleBean articleBean, final ListingIconView favStartImg, final ListingIconView toggleLikeDisLikeImg) {\n ApiManager.isExistFavNdLike(context, articleBean.getArticleId())\n .subscribe(likeVal -> {\n int like = (int) likeVal;\n if (articleBean != null) {\n articleBean.setIsFavourite(like);\n }\n favStartImg.setVisibility(View.VISIBLE);\n favStartImg.setEnabled(true);\n toggleLikeDisLikeImg.setVisibility(View.VISIBLE);\n toggleLikeDisLikeImg.setEnabled(true);\n\n if(THPConstants.IS_USE_SEVER_THEME) {\n if (like == NetConstants.LIKE_NEUTRAL) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_YES) {\n // 2 = app:iconType=\"favourite\"\n favStartImg.updateIcon(2);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_NO) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 6 = app:iconType=\"like\"\n toggleLikeDisLikeImg.updateIcon(6);\n }\n }\n else {\n if (like == NetConstants.LIKE_NEUTRAL) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_YES) {\n favStartImg.setImageResource(R.drawable.ic_like_selected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_NO) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_on_copy);\n }\n }\n\n }, val -> {\n Log.i(\"\", \"\");\n });\n }", "void updateFavor(HouseFavor houseFavor);", "public int updateTermFavouritedFlag (Term term, String table) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_FAVOURITED, term.getFavourited());\n\n // updating row\n return db.update(table, values, KEY_ID + \" = ?\", new String[] { String.valueOf(term.getId())});\n }", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public static void saveFavourite(Long idRes, Long idUser) {\n\t\tArrayList<Favourite> allFav=loadFavourite();\n\t\tint size=allFav.size()-1;\n\t\tFavourite last=allFav.get(size);\n\t\tLong idLast=last.getIdF();\n\t\tFavourite save=new Favourite(idLast+1,idUser,idRes);\n\t\tallFav.add(save);\n\t\tsaveToFile(allFav);\n\t}", "public void handleStar(boolean isFavorite) {\n isLoadingFinished = true;\n isLoadingFinished_isFavorite = isFavorite;\n if (mStarMenuItem == null) {\n return;\n }\n //endof workaround\n mStarMenuItem.setVisible(true);\n if (isFavorite) { //column in database is null when not starred.\n mStarMenuItem.setChecked(true);\n mStarMenuItem.setTitle(R.string.action_star_remove);\n mStarMenuItem.setIcon(android.R.drawable.btn_star_big_on);\n //Google Play Games\n try {\n Games.Achievements.increment(apiClientGetter.getGoogleApiClient(), getActivity().getString(R.string.achievement_personal_schedule), 1);\n } catch(IllegalStateException e){\n //This happens when GoogleApiClient is not connected yet.\n //Ignore this error, user gets Achievement next time.\n }\n } else {\n mStarMenuItem.setChecked(false);\n mStarMenuItem.setTitle(R.string.action_star_add);\n mStarMenuItem.setIcon(android.R.drawable.btn_star_big_off);\n }\n persistFavorite(isFavorite);\n }", "@Override\n\tpublic FavoriteVO selectFavoriteVO(int pl_index, String mem_mail) {\n\t\treturn null;\n\t}", "public void onFavouritesIconPressed() {\n if (currentAdvertIsFavourite()) {\n dataModel.removeFromFavourites(advertisement);\n view.setIsNotAFavouriteIcon();\n } else {\n dataModel.addToFavourites(advertisement);\n view.setIsAFavouriteIcon();\n }\n }", "public void saveAsMyFavorite(View v){\n\n MyFavoriteLocations myFavoriteLocation=new MyFavoriteLocations();\n myFavoriteLocation.setMyFavoriteLocations(new Locations(1,titleText, address, descriptionText, budgetText, lt, ln, \"df\"));\n\n myFavoriteLocation.save();\n }", "public Double[] getFavAM() {\n return FavoritosAM;\r\n }", "public void addFavourite(RecipeDbItem1 recipeDbItem1)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,recipeDbItem1.getID());\n values.put(KEY_TITLE,recipeDbItem1.getTitle());\n //insert a row\n db.insert(TABLE_FAVOURITES,null,values);\n db.close();\n //System.out.println(\"\\n Inserted into Favourites Table: \"+recipeDbItem1.getID()+\" \"+recipeDbItem1.getTitle());\n }", "@PrePersist\n protected void onPersist() {\n this.data = LocalDate.now();\n }", "int updateByPrimaryKeySelective(MemberFav record);", "protected abstract String getFavoriteColumnName();", "public void addTermToFavourites(Term term) {\n // Set the favourited status of the term\n term.setFavourited(1);\n // Add the term to the table favourites\n addTermWithId(term, TABLE_FAVOURITES);\n // Update the favourite status of the term in the table terms\n updateTermFavouritedFlag(term, TABLE_TERMS);\n }", "void setInvoicedDate(Date invoicedDate);", "@Override\r\n\tpublic String saveStudntFavouritetutor(int studentUserId, int tutorUserId) {\r\n\t\tFavouriteTutor favouriteTutor = daoFavouriteTutor.CheckFavouriteTutor(daoStudentProfileDetail.getStudentProfileByStudentId(studentUserId).getStudent_Profile_Id(),daoTutorProfileDetail.getTutorProfileDetailByUserId(tutorUserId).getTutor_Profile_Id());\r\n\t\tString saveStatus=\"alreadyExist\";\r\n\t\tif(favouriteTutor==null){\r\n\t\tfavouriteTutor = new FavouriteTutor();\r\n\t\tfavouriteTutor.setStudentProfileDetail(daoStudentProfileDetail.getStudentProfileByStudentId(studentUserId));\r\n\t\tfavouriteTutor.setTutorProfileDetail(daoTutorProfileDetail.getTutorProfileDetailByUserId(tutorUserId));\r\n\t\tdaoFavouriteTutor.saveOrUpdate(favouriteTutor);\r\n\t\tsaveStatus=\"success\";\r\n\t\t}\r\n\t\treturn saveStatus;\r\n\t\t\r\n\t}", "@Override\n\tpublic void getFavorit(int idUser) {\n\t\t\n\t}", "protected abstract SQLQuery getFavoriteUpdateSQLQuery();", "public void onClick(View v) {\n favorite_league = selected_league;\n favorite_team = selected_team;\n startWriteFavorite(v);\n if( !(favorite_team.equals(\"\")) && !(favorite_league.equals(\"\"))) favorite.setText(favorite_team +\" (\" +favorite_league +\")\");\n }", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "@Override\n public String getEntityName() {\n return \"FavouriteAssociations\";\n }", "public void setIsHot(Boolean isHot) {\n this.isHot = isHot;\n }", "public boolean insertFavToDB(Favorite favorite) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(mDBAccountString, favorite.getAccount());\n contentValues.put(mDBTitleString, favorite.getTitle());\n contentValues.put(mDBDescString, favorite.getDescription());\n contentValues.put(mDBURLString, favorite.getUrl());\n long rowId = mFavSQLiteDB.insert(\"Favorites\", null, contentValues);\n return rowId != -1; //If insert fails, rowID will equal -1\n }", "int updateByPrimaryKey(MemberFav record);", "public void setFavoriteLogList(List<FavoriteLog> favoriteLogList) {\n _favoriteLogList = favoriteLogList;\n }", "public void alterarVencimentoFatura(Fatura fatura) throws ErroRepositorioException ;", "public void deliverResult(Cursor data) {\n favoriteIds = loadCursorDataArray(data);\n //check if the given movie is among them\n isFavorite = checkIfFavorite();\n movie.setFavorite(isFavorite);\n imageName = movie.getPosterPath();\n\n if (movie.isFavorite()) {\n star.setImageResource(R.drawable.ic_grade_yellow_36px);\n favoritesIdsData = data;\n super.deliverResult(data);\n\n } else {\n star.setImageResource(R.drawable.ic_grade_gray_36px);\n\n }\n }", "int updateByPrimaryKey(EcsFavourableActivity record);", "@DISPID(1003) //= 0x3eb. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n void favoriteService(\r\n java.lang.String prop);", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "public boolean addToFavourites(String name){\n SQLiteDatabase db =this.getReadableDatabase();\n ContentValues contentVal = new ContentValues();\n contentVal.put(FAVOURITES,true);\n db.update(Db_Table,contentVal, \"movie_name = ?\",new String[]{ name });\n return true;\n }", "public void toggleFavorite(boolean animated) {\n if (!mFavorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(!mFavorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(!mFavorite);\n mAnimateUnfavorite = orig;\n }\n }", "public void setRecommendDate(Date recommendDate) {\n this.recommendDate = recommendDate;\n }", "@MediumTest\n\tpublic void testFavMensaPersistedBetweenLaunches() {\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), false);\n\n\t\tactivity.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmFavButton.setChecked(true);\n\t\t\t}\n\t\t});\n\n\t\t// close the activity\n\t\tactivity.finish();\n\t\tsetActivity(null);//force creation of a new Activity\n\t\t// relaunch the activity\n\t\tactivity = this.getActivity();\n\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), true);\n\n\t\tactivity.runOnUiThread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tmFavButton.setChecked(false);\n\t\t\t}\n\t\t});\n\n\t\tactivity.finish();\n\t\tsetActivity(null);\n\t\tactivity = this.getActivity();\n\n\t\tmFavButton = (ToggleButton) getActivity()\n\t\t\t\t.findViewById(R.id.tgl_favorite);\n\t\tassertEquals(mFavButton.isChecked(), false);\n\t}", "public Double[] getFavFM() {\n return FavoritosFM;\r\n }", "public void setFavorTokens(int flavorTokens){\n\n this.favorTokens=flavorTokens;\n\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "private ArrayList<MovieItem> getFavoriteMovies(){\n //get list of favorite movies from buffer\n ArrayList<MovieItem> movies = mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE);\n\n //check if favorite movie list has changed\n if(mFavoriteChanged){\n //list has changed, show new movie list\n showMovieList(movies, PosterHelper.NAME_ID_FAVORITE);\n }\n\n //return movie list\n return movies;\n }", "public void setEffectivedateTo(Date value) {\n setAttributeInternal(EFFECTIVEDATETO, value);\n }", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "@FXML\n private void toggleFavorite() {\n raise(new ToggleFavoritePersonEvent(id.getText().substring(0, id.getText().indexOf(\".\"))));\n }", "public void drawFav(Recipe r, ImageView favIcon) {\n int imgFav;\n if (r.isFavorite()) {\n imgFav = getResources().getIdentifier(\"favstarylw\", \"drawable\", getPackageName());\n } else {\n imgFav = getResources().getIdentifier(\"favstargrey\", \"drawable\", getPackageName());\n }\n favIcon.setImageResource(imgFav);\n }", "public void setQuestionPercentageFavor(float questionPercentageFavor)\r\n\t{\r\n\t\tthis.questionPercentageFavor = questionPercentageFavor;\r\n\t}", "public void setDateInvoiced (Timestamp DateInvoiced);", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }" ]
[ "0.6674943", "0.62148994", "0.6184169", "0.61313915", "0.61021847", "0.60436916", "0.59816563", "0.58824456", "0.5855134", "0.57957506", "0.5776221", "0.5738585", "0.57080334", "0.5698658", "0.56851214", "0.55794525", "0.5559764", "0.5467099", "0.5337306", "0.53175974", "0.52846664", "0.52759576", "0.52369636", "0.51896214", "0.5164245", "0.5096801", "0.50847316", "0.50836897", "0.5028929", "0.5022582", "0.49694732", "0.49631116", "0.4950354", "0.49285972", "0.49168187", "0.49095225", "0.49095225", "0.48948416", "0.48847288", "0.48800015", "0.48732272", "0.48653635", "0.48522437", "0.4849441", "0.48303252", "0.48078176", "0.47978336", "0.4796688", "0.47749007", "0.4765573", "0.47502294", "0.47418147", "0.47414967", "0.47310337", "0.4727997", "0.47270954", "0.4723408", "0.46811277", "0.46805292", "0.4673223", "0.4665034", "0.46614653", "0.46299943", "0.46242383", "0.461674", "0.46086568", "0.45949146", "0.4590766", "0.45899123", "0.45827773", "0.45691147", "0.45635918", "0.45627168", "0.45558202", "0.4547672", "0.45383492", "0.45348004", "0.4532546", "0.45244262", "0.45215172", "0.4507598", "0.44885367", "0.44862783", "0.44830057", "0.44644916", "0.4461294", "0.44601956", "0.44510657", "0.44307125", "0.44247308", "0.44004613", "0.43826514", "0.43775886", "0.4377468", "0.43755192", "0.43592688", "0.43570933", "0.43501008", "0.43416834", "0.43369135" ]
0.7720147
0
Creates an empty inventory.
public Inventory () { weaponsInventory = new ArrayList<>(); pointInventory = 0; lenInventory = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }", "private Inventory createInventory() {\n\n\t\tInventory inv;\n\n\t\tif (guiMetadata.getInvType() == InventoryType.CHEST) {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getSize(), guiMetadata.getGuiName());\n\t\t} else {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getInvType(), guiMetadata.getGuiName());\n\t\t}\n\n\t\treturn inv;\n\t}", "public Inventory() {\r\n initialize();\r\n }", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "public static ItemStack createItemStack()\r\n \t{\r\n \t\treturn new ItemStack(0);\r\n \t}", "public Inventory() {\r\n invPower = 0;\r\n invDefense = 0;\r\n invSpeed = 0;\r\n invAwareness = 0;\r\n treasures = new ArrayList<>();\r\n }", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn 0;\n\t}", "public Inventory(int INVENTORY_SLOTS) {\n\t\tsuper();\n\t\tthis.inventoryItems = new Item[INVENTORY_SLOTS];\n\t\tthis.INVENTORY_SLOTS = INVENTORY_SLOTS;\n\t}", "public Inventory() {\n \titems = new ArrayList<Collectable>();\n \tnumTokens = 0;\n }", "@Test\n\tpublic void testAddInventory() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\",\"7\",\"0\",\"9\");\n\t}", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "public InventoryTemplate() {\n this.layoutDatabase = null;\n this.layoutItemDatabase = null;\n this.guiButtons = new HashMap<>();\n this.inventoryType = InventoryType.CHEST;\n this.placeholders = new ArrayList<>();\n this.layout = new HashMap<>();\n this.rawLayout = new ArrayList<>();\n }", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }", "public void fillChest(Inventory inv);", "public InventoryEntry() {\n super();\n }", "public InventoryList() {\n super(\"Inventory List\");\n }", "ProductInventory()\n\t{\n\n\t\t// Initialize the Product Inventory Array List\n\t\tmyProductInventory = new ArrayList<Product>();\n\n\t}", "public Inventory()\r\n\t{\r\n\t\t_tiles = new ArrayList<Tile>();\r\n\t\t\r\n\t\tfor(int i = 'A'; i <= 'Z'; i++)\r\n\t\t{\r\n\t\t\tswitch(i)\r\n\t\t\t{\r\n\t\t\tcase 'A':\r\n\t\t\tcase 'E':\r\n\t\t\tcase 'I':\r\n\t\t\tcase 'O':\r\n\t\t\tcase 'U':\r\n\t\t\t\tfor(int j = 0; j < 29; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'Y':\r\n\t\t\t\tfor(int j = 0; j < 15; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tfor(int j = 0; j < 12; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\t_tiles.add(new Tile((char) i));\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\tthis.shuffle();\r\n\t}", "public InventoryItem(String name) { \n\t\tthis(name, 1);\n\t}", "IEquipableItem createDefault();", "public static void emptyInventoryListMessage() {\n System.out.println(\"You do not have any Items in your inventory:(\");\n }", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public static boolean inventoryIsEmpty() {\n\t\treturn Inventory.getCount() == 0;\n\t}", "@Test\r\n\tpublic void testAddItem_not_occupied() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"A\");\r\n\t\tassertEquals(test, vendMachine.getItem(\"A\"));\r\n\t}", "public Inventory(int max) {\n items = new Item[max];\n }", "public void createCardInventory() {\n try {\n if (cardInventoryDataBean != null) {\n String response = cardInventoryTransformerBean.createCardInventory(cardInventoryDataBean);\n if (SystemConstantUtil.SUCCESS.equals(response)) {\n System.out.println(\"Create CardInventory Successfully\");\n messageDataBean.setMessage(\"CardInventory added successfully.\");\n messageDataBean.setIsSuccess(Boolean.TRUE);\n cardInventoryDataBean.setNull();\n this.retrieveCardInventoryList();\n } else {\n System.out.println(\"CardInventory not created\");\n messageDataBean.setMessage(response);\n messageDataBean.setIsSuccess(Boolean.FALSE);\n }\n }\n } catch (Exception e) {\n messageDataBean.setMessage(e.toString());\n messageDataBean.setIsSuccess(Boolean.FALSE);\n System.out.println(e);\n }\n }", "public static void createItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 4 && \"create\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = new Inventory();\r\n\t\t\tinventory.setItemName(value[1]);\r\n\t\t\tinventory.setItemCostPrice(Double.parseDouble(value[2]));\r\n\t\t\tinventory.setItemSellPrice(Double.parseDouble(value[3]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "public Inventory(Integer size, ItemStack... items) {\n this.setSize((size == 0) ? 2147483647 : size);\n for (ItemStack stack : items) {\n ITEMS.add(stack);\n }\n }", "ItemStack make();", "public VendingMachine(){\n\n inventory = new ArrayList<>();\n balance = new Coin();\n vending_balance = 0;\n validPurchase = false;\n }", "public Builder clearInventoryItemData() {\n if (inventoryItemDataBuilder_ == null) {\n if (inventoryItemCase_ == 3) {\n inventoryItemCase_ = 0;\n inventoryItem_ = null;\n onChanged();\n }\n } else {\n if (inventoryItemCase_ == 3) {\n inventoryItemCase_ = 0;\n inventoryItem_ = null;\n }\n inventoryItemDataBuilder_.clear();\n }\n return this;\n }", "@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"-15\", \"0\");\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddSugarPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"15\", \"0\");\n\t}", "public Player()\n {\n inventory = new ArrayList<Item>();\n currentRoom=0;\n }", "public Inventory(final T[] enums) {\n final Map<T, Integer> blankMap = new HashMap<>();\n for (T t : enums) {\n blankMap.put(t, 0);\n }\n this.items = Collections.unmodifiableMap(blankMap);\n this.enums = Arrays.copyOf(enums, enums.length);\n }", "public static Items initialVendingMachine() {\n Items items = new Items();\n Item cola = new Item(R.drawable.cola, \"Cola\", 30, 100, 3000, 0);\n Item chips = new Item(R.drawable.chips, \"Chips\", 30, 50, 3000, 0);\n Item candy = new Item(R.drawable.candy, \"Candy\", 30, 65, 3000, 0);\n items.addItem(cola);\n items.addItem(chips);\n items.addItem(candy);\n items.addMachineCredit(5000);\n return items;\n }", "@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}", "public BaseInventory (long id) {\r\n\t\tsuper(id);\r\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddSugarNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"abcd\", \"0\");\n\t}", "public Player(Room room)\n {\n Inventory = new HashMap<String, Items>();\n currentRoom = room; //Starting Room Number 1\n itemsHeld = 0; //Start with no items being held\n itemLimit = 2; // can only hold 2 items until a backpack\n Inventory = new HashMap<String, Items>();\n \n roomHistory = new Stack<Room>();\n \n haveBackpack = false; //no backpack at start\n usingFlashlight = false;\n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public void fillInventory(TheGroceryStore g);", "@Override\n public void onInventoryClick(InventoryClickEvent event) {\n // Do nothing here\n }", "public void writeInventoryToNBT(CompoundNBT tag) {\n IInventory inventory = this;\n ListNBT nbttaglist = new ListNBT();\n\n for (int i = 0; i < inventory.getSizeInventory(); i++) {\n if (!inventory.getStackInSlot(i).isEmpty()) {\n CompoundNBT itemTag = new CompoundNBT();\n itemTag.putByte(TAG_SLOT, (byte) i);\n inventory.getStackInSlot(i).write(itemTag);\n nbttaglist.add(itemTag);\n }\n }\n\n tag.put(TAG_ITEMS, nbttaglist);\n }", "private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }", "@Test\r\n public void testResetInventory2()\r\n {\r\n testLongTermStorage.addItem(item2, testLongTermStorage.getCapacity() / item2.getVolume());\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "@Test\r\n public void testAddInventory() throws InventoryException {\r\n coffeeMaker.addInventory(\"4\", \"7\", \"0\", \"9\");\r\n coffeeMaker.addInventory(\"0\", \"0\", \"0\", \"0\");\r\n coffeeMaker.addInventory(\"3\", \"6\", \"9\", \"12\"); // this should not fail\r\n coffeeMaker.addInventory(\"10\", \"10\", \"10\", \"10\");// this should not fail\r\n }", "@Override\n\tpublic Inventory getInventory() {\n\t\treturn null;\n\t}", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "@Test\n\tpublic void testInventoryNotEnoughSugar() {\n\t\tcoffeeMaker.addRecipe(recipe8);\n\t\tassertEquals(1000, coffeeMaker.makeCoffee(0, 1000));\n\t}", "public Inventory(Inventory referenceInventory) {\n \titems = new ArrayList<Collectable>();\n \t//Clone items list.\n \tfor (Collectable item : referenceInventory.getItems()) {\n \t\titems.add(item);\n \t}\n \t//Clone num tokens.\n \tnumTokens =\treferenceInventory.numTokens;\n }", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public Equipos() {\n\t\tthis(\"equipos\", null);\n\t}", "public ShoeInventory(int size)\r\n\t{\r\n\t\tif(size == 0)\r\n\t\t\tSystem.out.println(\"Cannot set array to size 0.\"); \r\n\t\telse\r\n\t\t{\r\n\t\t\tcounter = 0;\r\n\t\t\tarraySize = size;\r\n\t\t\ttypeArray = new ShoeType[arraySize];\r\n\t\t}\r\n\t}", "@RequestMapping(method = RequestMethod.POST, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> createInventory(@Valid @RequestBody InventoryRequest inventoryRequest){\n Product product = productService.getProductById(inventoryRequest.getProductId());\n\n //Criando produto no estoque\n Inventory inventory = inventoryService.createInventoryItem(new Inventory(inventoryRequest.getAmount()));\n product.setInventory(inventory);\n inventory.setProduct(product);\n\n //Atualizando associações entre estoque e produto\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.status(HttpStatus.CREATED).build();\n }", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public void dumpInventory() {\n\t\tFileWriter writer;\n\t\ttry {\n\t\t\twriter = new FileWriter(inventoryFilePath);\n\t\t\tyaml.dump(testInventoryData, writer);\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public InteractiveEntity(ArrayList<Item> items) {\n\t\tsuper();\n\t\tthis.inventory.addAll(items);\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddCoffeeNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"-15\", \"0\", \"0\", \"0\");\n\t}", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "ItemStack createItemStack(CompoundTag tag);", "private void setUpInventoryViewModel() {\n // mock equipment\n Equipment equipment = Mockito.mock(Equipment.class);\n when(equipment.getTotalSlots()).thenReturn(5);\n when(equipment.getMaxTotalWeight()).thenReturn(10);\n when(equipment.getMaxTotalVolume()).thenReturn(10);\n when(equipment.getCurrentTotalWeight()).thenReturn(3);\n when(equipment.getCurrentTotalVolume()).thenReturn(5);\n\n // mock items\n ArrayList<Item> items = new ArrayList<>();\n Item itemOne = Mockito.mock(Item.class);\n when(itemOne.getName()).thenReturn(\"Item One\");\n when(itemOne.getWeight()).thenReturn(1);\n when(itemOne.getVolume()).thenReturn(1);\n items.add(itemOne);\n items.add(itemOne);\n when(equipment.getItems()).thenReturn(items);\n\n // mock gameManager\n GameManager gameManager = Mockito.mock(GameManager.class);\n when(gameManager.getEquipment()).thenReturn(equipment);\n\n contentViewModel = new InventoryViewModel(gameManager, null);\n }", "@Test(expected = InventoryException.class)\n\tpublic void testAddMilkNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"-15\", \"0\", \"0\");\n\t}", "@Test\r\n public void testResetInventory1()\r\n {\r\n testLongTermStorage.resetInventory();\r\n assertEquals(\"Storage should be empty\", new HashMap<>(), testLongTermStorage.getInventory());\r\n }", "public SkillInventory(int capacity) {\n inventory = new Skill[capacity];\n isActive = new boolean[capacity];\n cooldown = new float[capacity];\n weighting = new float[capacity];\n projectiles = new DynamicHitbox[capacity];\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "@Test(expected = InventoryException.class)\n\tpublic void testAddInventoryException() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\", \"-1\", \"asdf\", \"3\");\n\t}", "@Test\n void testAdding100Items() {\n Inventory inventory = new Inventory();\n int itemsToAdd = 100;\n\n assertEquals(0, inventory.getItems(\"\").size());\n\n for (int i = 0; i < itemsToAdd; i++) {\n inventory.addItem(\"XXXXXXXX\" + String.format(\"%02d\", i), \"Name\", 20.00, i);\n }\n\n assertEquals(100, inventory.getItems(\"\").size());\n }", "public InventoryEntity(int id) {\n\t\tthis.id = id;\n\t}", "public Basket(Inventory inventory){\n myBasket = new HashMap<>();\n totalCost = 0;\n isPaid = false;\n Random randomGenerator = new Random();\n invoiceNumber = randomGenerator.nextInt(30000) + 1;\n this.inventory = inventory;\n }", "@Override\n\tpublic void openInventory() {\n\t\t\n\t}", "public NewItems() {\n super();\n }", "@Test(expected = InventoryException.class)\n\tpublic void testAddChocolateNotPositiveInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"0\", \"-15\");\n\t}", "@Test\n public void execute_showEmptyItemList() {\n ModelStubWithRecipeList modelStub = new ModelStubWithRecipeList(new RecipeList());\n CommandResult expectedCommandResult = new CommandResult(ListRecipeCommand.MESSAGE_NO_RECIPES,\n false, false, DisplayedInventoryType.RECIPES);\n assertCommandSuccess(listRecipeCommand, modelStub, expectedCommandResult, modelStub);\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String SQL_CREATE_INVENTORY_TABLE = \"CREATE TABLE \" + InventoryEntry.TABLE_NAME + \" (\"\n + InventoryEntry._ID + \" INTEGER PRIMARY KEY AUTOINCREMENT, \"\n + InventoryEntry.COLUMN_INVENTORY_NAME + \" TEXT NOT NULL, \"\n + InventoryEntry.COLUMN_INVENTORY_PRICE + \" INTEGER DEFAULT 0, \"\n + InventoryEntry.COLUMN_INVENTORY_QUANTITY + \" INTEGER DEFAULT 0, \"\n + InventoryEntry.COLUMN_INVENTORY_SUPPLIER + \" TEXT, \"\n + InventoryEntry.COLUMN_INVENTORY_BLOB + \" BLOB );\";\n\n // Execute the SQL statement\n db.execSQL(SQL_CREATE_INVENTORY_TABLE);\n }", "public void onInventoryChanged()\n\t{\n\t\tfor (int i = 0; i < this.items.length; i++)\n\t\t{\n\t\t\tItemStack stack = this.items[i];\n\t\t\tif (stack != null && stack.stackSize <= 0)\n\t\t\t{\n\t\t\t\tthis.items[i] = null;\n\t\t\t}\n\n\t\t}\n\t}", "public interface IInventoryBase extends IInventory {\n\n @Override\n default public int getInventoryStackLimit() {\n return 64;\n }\n\n @Override\n default public void openInventory(EntityPlayer player) {}\n\n @Override\n default public void closeInventory(EntityPlayer player) {}\n\n @Override\n default public boolean isItemValidForSlot(int index, ItemStack stack) {\n return true;\n }\n\n @Override\n default public int getField(int id) {\n return 0;\n }\n\n @Override\n default public void setField(int id, int value) {}\n\n @Override\n default public int getFieldCount() {\n return 0;\n }\n\n @Override\n default public boolean hasCustomName() {\n return false;\n }\n\n @Override\n default public ITextComponent getDisplayName() {\n return new TextComponentTranslation(getName());\n }\n\n}", "IEquipableItem create(int power, int min, int max);", "@Test(expected = InventoryException.class)\n\tpublic void testAddMilkNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"abcd\", \"0\", \"0\");\n\t}", "public static Inventory createStorageInventory(UserShop shop) {\n\t\tInventory inv = Bukkit.createInventory(null, 27, shop.getTitle() + \" §7- §6Lager\");\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tinv.setItem(i, spacer);\n\t\t}\n\t\tinv.setItem(8, back);\n\t\tfor (ShopItemEntry offer : shop.getStoredItems()) {\n\t\t\tinv.addItem(offer.getItem());\n\t\t}\n\t\treturn inv;\n\t}", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "@Nonnull\n public static UBL23WriterBuilder <InventoryReportType> inventoryReport ()\n {\n return UBL23WriterBuilder.create (InventoryReportType.class);\n }", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "protected void addInventoryItemType() {\n\t\tProperties props = new Properties();\n\n\t\t/* DEBUG\n\t\t\n\t\tSystem.out.println(typeNameTF.getText());\n\t\tSystem.out.println(unitsTF.getText());\n\t\tSystem.out.println(unitMeasureTF.getText());\n\t\tSystem.out.println(validityDaysTF.getText());\n\t\tSystem.out.println(reorderPointTF.getText());\n\t\tSystem.out.println(notesTF.getText());\n\t\tSystem.out.println(statusCB.getValue());\n\t\n\t\t*/ \n\n\t\t// Set the values.\n\t\tprops.setProperty(\"ItemTypeName\", typeNameTF.getText());\n\t\tprops.setProperty(\"Units\", unitsTF.getText());\n\t\tprops.setProperty(\"UnitMeasure\", unitMeasureTF.getText());\n\t\tprops.setProperty(\"ValidityDays\", validityDaysTF.getText());\n\t\tprops.setProperty(\"ReorderPoint\", reorderPointTF.getText());\n\t\tprops.setProperty(\"Notes\", notesTF.getText());\n\t\tprops.setProperty(\"Status\", (String) statusCB.getValue());\n\n\t\t// Create the inventory item type.\n\t\tInventoryItemType iit = new InventoryItemType(props);\n\n\t\t// Save it into the database.\n\t\tiit.update();\n\n\t\tpopulateFields();\n\t\t\n\t\t// Display message on GUI.\n\t\t//submitBTN.setVisible(false);\n\t\tcancelBTN.setText(\"Back\");\n\t\tmessageLBL.setText(\"Inventory Item Type added.\");\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddChocolateNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"0\", \"0\", \"0\", \"abcd\");\n\t}", "@Test(expected = InsufficientStockException.class)\n\tpublic void testInventoryCheckOnAddingItemsToShoppingCart() throws InsufficientStockException {\n\t\tShoppingCartAggregate shoppingCartAggregate = storeFrontService.getStoreFront()\n\t\t\t\t.getShoppingCounter(SHOPPING_COUNTER_NAME).get().startShoppingCart(CUSTOMER_NAME);\n\n\t\tBigDecimal orderQuantity = TestProductInventory.iphoneInventory.getAvailableStock().add(new BigDecimal(1));\n\t\tshoppingCartAggregate.addToCart(TestProduct.phone.getProductId(), orderQuantity);\n\n\t}", "@Test(expected = InsufficientInventoryException.class)\n\tpublic void testTypeInStockWhenOutOfStock() {\n\t\tfinal Inventory inventory = new InventoryImpl();\n\t\tinventory.setUidPk(INVENTORY_UID_1000);\n\t\tinventory.setQuantityOnHand(QUANTITY_OF_10);\n\t\tinventory.setReservedQuantity(QUANTITY_OF_5);\n\t\tinventory.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tfinal ProductSku productSku = new ProductSkuImpl();\n\t\tproductSku.setSkuCode(SKU_CODE);\n\t\tfinal ProductImpl product = new ProductImpl();\n\t\tproduct.setAvailabilityCriteria(AvailabilityCriteria.AVAILABLE_WHEN_IN_STOCK);\n\t\tproduct.setGuid(PRODUCT);\n\t\tproductSku.setProduct(product);\n\n\t\tinventory.setSkuCode(productSku.getSkuCode());\n\n\t\tfinal Order order = new OrderImpl();\n\t\torder.setUidPk(ORDER_UID_2000);\n\t\torder.setStoreCode(store.getCode());\n\t\tfinal PhysicalOrderShipmentImpl shipment = getMockPhysicalOrderShipment();\n\t\tfinal OrderSku orderSku = new OrderSkuImpl();\n\t\torderSku.setProductSku(productSku);\n\t\torderSku.setQuantity(QUANTITY_OF_5);\n\t\tshipment.addShipmentOrderSku(orderSku);\n\t\torder.addShipment(shipment);\n\n\t\tfinal IndexNotificationService indexNotificationService = context.mock(IndexNotificationService.class);\n\t\tproductInventoryManagementService.setIndexNotificationService(indexNotificationService);\n\n\t\tfinal InventoryKey inventoryKey = new InventoryKey();\n\t\tinventoryKey.setSkuCode(SKU_CODE);\n\t\tinventoryKey.setWarehouseUid(WAREHOUSE_UID);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tInventoryJournalImpl inventoryJournal = new InventoryJournalImpl();\n\t\t\t\toneOf(beanFactory).getBean(INVENTORY_JOURNAL); will(returnValue(inventoryJournal));\n\t\t\t\toneOf(beanFactory).getBean(EXECUTION_RESULT); will(returnValue(new InventoryExecutionResultImpl()));\n\t\t\t\tatLeast(1).of(beanFactory).getBean(ALLOCATION_RESULT); will(returnValue(new AllocationResultImpl()));\n\n\t\t\t\tallowing(inventoryDao).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory));\n\t\t\t\tallowing(inventoryJournalDao).getRollup(inventoryKey); will(returnValue(new InventoryJournalRollupImpl()));\n\t\t\t\toneOf(inventoryJournalDao).saveOrUpdate(inventoryJournal); will(returnValue(new InventoryJournalImpl()));\n\n\t\t\t\toneOf(indexNotificationService).addNotificationForEntityIndexUpdate(IndexType.PRODUCT, product.getUidPk());\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_PLACED, \"\", QUANTITY_OF_5, \"\");\n\n\t\tfinal InventoryJournalRollupImpl ijRollup2 = new InventoryJournalRollupImpl();\n\t\tijRollup2.setAllocatedQuantityDelta(QUANTITY_5);\n\n\t\tfinal InventoryJournalDao inventoryJournalDao2 = context.mock(InventoryJournalDao.class, INVENTORY_JOURNAL_DAO2);\n\t\tjournalingInventoryStrategy.setInventoryJournalDao(inventoryJournalDao2);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(inventoryJournalDao2).getRollup(inventoryKey); will(returnValue(ijRollup2));\n\t\t\t}\n\t\t});\n\n\t\tInventoryDto inventoryDto = productInventoryManagementService.getInventory(inventory.getSkuCode(), inventory.getWarehouseUid());\n\t\tassertEquals(QUANTITY_OF_10, inventoryDto.getQuantityOnHand());\n\t\tassertEquals(0, inventoryDto.getAvailableQuantityInStock());\n\t\tassertEquals(QUANTITY_OF_5, inventoryDto.getAllocatedQuantity());\n\n\t\tfinal Inventory inventory3 = assembler.assembleDomainFromDto(inventoryDto);\n\t\tfinal InventoryDao inventoryDao3 = context.mock(InventoryDao.class, \"inventoryDao3\");\n\t\tjournalingInventoryStrategy.setInventoryDao(inventoryDao3);\n\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tatLeast(1).of(inventoryDao3).getInventory(SKU_CODE, WAREHOUSE_UID); will(returnValue(inventory3));\n\t\t\t}\n\t\t});\n\n\t\tallocationService.processAllocationEvent(orderSku, AllocationEventType.ORDER_PLACED, \"\", QUANTITY_OF_5, \"\");\n\t}", "@Test(expected = InventoryException.class)\n\tpublic void testAddCoffeeNotInteger() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"abcd\", \"0\", \"0\", \"0\");\n\t}", "void loadInventory() {\n\n // make sure there isn't already an inventory record\n MrnInventory checkInv[] =\n new MrnInventory(survey.getSurveyId()).get();\n\n if (dbg3) System.out.println(\"<br>loadInventory: survey.getSurveyId() = \" +\n survey.getSurveyId());\n if (dbg3) System.out.println(\"<br>loadInventory: checkInv.length = \" +\n checkInv.length);\n\n if (checkInv.length == 0) {\n\n inventory.setSurveyId(survey.getSurveyId());\n\n // defaults\n inventory.setDataCentre(\"SADCO\");\n inventory.setTargetCountryCode(0); // unknown\n inventory.setStnidPrefix(survey.getInstitute());\n inventory.setDataRecorded(\"Y\");\n\n // from screen - done in LoadMRNData.getArgsFromFile()\n //inventory.setCountryCode(screenInv.getCountryCode());\n //inventory.setPlanamCode(screenInv.getPlanamCode());\n //inventory.setInstitCode(screenInv.getInstitCode());\n //inventory.setCruiseName(screenInv.getCruiseName());\n //inventory.setProjectName(screenInv.getProjectName());\n //inventory.setAreaname(screenInv.getAreaname()); // use as default to show on screen\n //inventory.setDomain(screenInv.getDomain()); // use as default to show on screen\n\n inventory.setCountryCode(0); // unknown\n\n inventory.setSciCode1(1); // unknown\n inventory.setSciCode2(1); // unknown // new\n inventory.setCoordCode(1); // unknown\n\n inventory.setProjectionCode(1); // unknown\n inventory.setSpheroidCode(1); // unknown\n inventory.setDatumCode(1); // unknown\n\n inventory.setSurveyTypeCode(1); // hydro\n if (dbg) System.out.println(\"loadInventory: put inventory = \" + inventory);\n\n try {\n inventory.put();\n } catch(Exception e) {\n System.err.println(\"loadInventory: put inventory = \" + inventory);\n System.err.println(\"loadInventory: put sql = \" + inventory.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadInventory: put inventory = \" +\n inventory);\n\n } // if (checkInv.length > 0)\n\n }", "public suiluppo_equip_allocation create(long equip_allocat_id);", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "@Test\n\tpublic void createItemNotEqual() {\n\t\tItem item = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\tSystem.out.println(item);\n\t\tassertNotEquals(new Item(), item);\n\t}", "@Test\n public void testEmpty() {\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.empty();\n \n } catch(Exception e){\n \n }\n \n assertEquals(instance.getItemCount(), 0, 0.0);\n \n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "void checkInventoryExists() {\n\n MrnInventory[] checkInventory =\n new MrnInventory(survey.getSurveyId()).get();\n inventoryExists = false;\n if (checkInventory.length > 0) {\n inventoryExists = true;\n } // if (checkInventory.length > 0)\n\n\n }", "public InventoryNew(String server, String username, String password) {\n\t\tcreateConnection(server,username,password,pharmacyName);\n\t\tinitialize();\n\t}" ]
[ "0.7530712", "0.74884194", "0.72076935", "0.6993207", "0.69400394", "0.6922179", "0.6831903", "0.67947", "0.6653159", "0.66177857", "0.66096354", "0.64711255", "0.6387326", "0.6331005", "0.6291809", "0.6272743", "0.6268088", "0.62409526", "0.62039864", "0.6185635", "0.617429", "0.6129481", "0.6124466", "0.61242014", "0.61137575", "0.60919523", "0.60583556", "0.6050865", "0.6040418", "0.59972554", "0.59890574", "0.59658414", "0.59634197", "0.5961918", "0.59427714", "0.5939045", "0.59215426", "0.5885709", "0.5871859", "0.5829157", "0.57919836", "0.5788574", "0.57786703", "0.57763517", "0.5768078", "0.5762157", "0.5741345", "0.5738611", "0.57117695", "0.5706915", "0.56812334", "0.5675831", "0.5669335", "0.56501293", "0.5637451", "0.5637081", "0.56295246", "0.5627822", "0.5627822", "0.5626865", "0.5619015", "0.5615994", "0.5608329", "0.56047565", "0.5581693", "0.5573775", "0.557291", "0.5549264", "0.55450195", "0.55442613", "0.55400854", "0.5533821", "0.5519168", "0.55110335", "0.5507009", "0.5506983", "0.55055094", "0.5501763", "0.5501751", "0.54899347", "0.5484662", "0.5483682", "0.54812574", "0.5467921", "0.54629904", "0.5461785", "0.545785", "0.544861", "0.54468894", "0.5444709", "0.5443426", "0.54337525", "0.5429196", "0.5421808", "0.5410399", "0.53958696", "0.5368894", "0.5357375", "0.53571767", "0.53498244" ]
0.6908214
6
Returns the weapons inventory list.
public List<IWeapon> getWeaponsInventory(){ return weaponsInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}", "public ArrayList<Weapon> getWeapons() {\n return weapons;\n }", "public Weapon[] getWeapons(){\n\t\tSystem.out.println(\"Creating Weapons...\");\n\t\tfor(int i=0; i<boardWeapons.length; i++){\n\t\t\tSystem.out.println(boardWeapons[i].getName());\n\t\t}\n\t\treturn boardWeapons;\n\t}", "List<InventoryItem> getInventory();", "public List<CardWeapon> getWeapons() {\n return weapons;\n }", "public Vector<EntityWeapon> getWeaponList();", "public ArrayList<Item> getList() {\r\n\t\treturn inventory;\r\n\t}", "public ArrayList<WeaponClient> getWeapons() {\n return weapons;\n }", "public Item[] getInventoryItems(){\n\t\treturn inventoryItems;\n\t}", "Collection<Item> getInventory();", "public ArrayList<Item> getItemList(){\n\t\treturn inventoryList;\n\t}", "public ArrayList<Gun> getGuns() {\n\t\tArrayList<Gun> guns = new ArrayList<Gun>(); \n\t\tfor (Item item : inventory) {\n\t\t\tif (item.asGun() != null) {\n\t\t\t\t guns.add(item.asGun());\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\treturn guns;\n\t }", "public List<Inventory> getInventory();", "public ArrayList<Weapon> getWeaponList() {\n return new ArrayList<>(weaponList);\n }", "List<SimpleInventory> getInventories();", "public int getWeapons() {\n return weapons;\n }", "public List<Equipment> getEquipments() {\n return equipments;\n }", "public ArrayList<Pair<Byte, Short>> getWeapons() {\n return weapons;\n }", "public abstract List<String> getInventory();", "public List<Treasure> giveInventory() {\r\n return treasures;\r\n }", "public List<ItemStack> getItems()\n {\n return items;\n }", "@Override\n\tpublic List<Equipment> getAllEquipmet() {\n\t\treturn dao.getAllEquipmet();\n\t}", "public List<InventoryEntity> getAllInventory() {\n\t\treturn inventoryDao.getAllInventory();\n\t}", "public List<InventoryEntry> getInventoryEntries();", "public List<ItemStack> getItems() {\n return this.items;\n }", "public List<equipment> getAllEquipments (){\n return equiomentResprositery.findAll();\n }", "Set<String> getInventory();", "public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }", "@Override\n\tpublic List<Inventory> getAllInventories() {\n\t\tArrayList<Inventory> inventories = new ArrayList<Inventory>();\n\t\tinventoryDao.findAll().forEach(inventories::add);\n\t\treturn inventories;\n\t}", "private Set<BoardObject> createWeapons(){\r\n\t\tSet<BoardObject> weaps = new HashSet<BoardObject>();\r\n\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/revolver1.png\"), new Coordinate(3,12), \"Revolver\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/candlestick3.png\"), new Coordinate(2,3), \"Candlestick\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/knife1.png\"), new Coordinate(12,3), \"Knife\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/leadpipe1.png\"), new Coordinate(20,3), \"LeadPipe\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/rope1.png\"), new Coordinate(20,10), \"Rope\"));\r\n\t\tweaps.add(new BoardObject(getImage(\"xboardObjects/spanner1.png\"), new Coordinate(20,16), \"Wrench\"));\r\n\t\treturn weaps;\r\n\t}", "@Override\n\tpublic List<Equipment> getAllAviableEquipmet() {\n\t\treturn dao.getAllAviableEquipmet();\n\t}", "@Override\n public ItemStack[] getContents() {\n final ItemStack[] items = new ItemStack[36];\n\n items[0] = this.getSword();\n\n for(int i = 0; i < this.getAbilities().length; i++) {\n final Ability ability = this.getAbilities()[i];\n\n if (ability instanceof ItemAbility) {\n items[i+1] = new ItemStack(((ItemAbility) ability).getMaterial());\n }\n }\n\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = this.getHealthType();\n }\n }\n\n return items;\n }", "@GetMapping(\"/equipment\")\n\tpublic List<Equipment> findAll() {\n\t\treturn inventoryService.findAll();\n\t}", "public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }", "public abstract List<String> getUserInventory();", "java.util.List<com.message.EquipmentProto.PlayerEquipmentMsg> \n getListPlayerEquipmentsList();", "public List<Equipment> findAllEquipment() {\n Iterable<Equipment> itEquipment = equipmentRepository.findAll();\n List<Equipment> equipment = new ArrayList<>();\n\n itEquipment.forEach(equipment::add);\n\n return equipment;\n }", "public String printAllInventory(){\r\n\r\n String returnString = \"Items:\";\r\n for(Item item : playerItem){\r\n returnString += \" \" + item.getName(); \r\n }\r\n return returnString;\r\n }", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "@Shadow public abstract Iterable<ItemStack> getArmorSlots();", "List<InventoryItem> getInventory(String username);", "public Set<Material> getAllowedWeapons()\r\n\t{\treturn Collections.unmodifiableSet(this.allowedWeapons);\t}", "public Inventory getEquipment() {\n return equipment;\n }", "public String getPlayerInventory() {\r\n String res = \"You have the following items in your inventory:\" + System.getProperty(\"line.separator\");\r\n for (int i = 0; i < player.getInventory().size(); i++) {\r\n res += i + \": \" + player.getInventory().get(i).toString() + System.getProperty(\"line.separator\");\r\n }\r\n return res;\r\n }", "@Override\n\t@Transactional(readOnly=true)\n\tpublic List<Inventory> getInventoryUpdates() {\n\t\treturn inventorydao.getInventoryUpdates();\n\t}", "public String getItemsString()\n {\n String returnString =\"\";\n if(Inventory.isEmpty()){\n returnString = \"You are not holding any items\";\n } else {\n returnString = \"Items you are holding:\";\n String temp = \"\";\n for(Items item : Inventory.values()) {\n temp += \", \" + item.getName() ; \n }\n returnString += temp.substring(1);\n }\n return returnString;\n }", "public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}", "public List<String> getWeaponCardList() {\n return weaponCardList;\n }", "public Inventory getInventory() {\n return inventory;\n }", "private HashMap<String, Weapon> readWeapons() {\n JSONObject weaponsData = getAssetJson(\"weapons.json\").getJSONObject(\"weapons\");\n HashMap<String, Weapon> weapons = new HashMap<>();\n\n for(String categoryName : weaponsData.keySet()) {\n Weapon.CATEGORY category = Weapon.CATEGORY.fromName(categoryName);\n JSONObject categoryWeaponsData = weaponsData.getJSONObject(categoryName);\n final String categoryPath = Weapon.BASE_PATH + categoryName + \"/\";\n\n for(String weaponId : categoryWeaponsData.keySet()) {\n JSONObject weaponData = categoryWeaponsData.getJSONObject(weaponId);\n\n weapons.put(\n weaponId,\n new Weapon(\n weaponId,\n weaponData.getString(NAME_KEY),\n category,\n weaponData.getInt(\"cost\"),\n resourceHandler.getImageResource(categoryPath + weaponId + \".png\")\n )\n );\n }\n }\n\n return weapons;\n }", "public Inventory getEnchantInventory(Player p){\n Inventory inv = Bukkit.createInventory(null, 27, \"Enchant Pickaxe\");\n for(CustomEnchantment ce : enchants.keySet()){\n ItemStack item = new ItemStack(ce.getIcon());\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(ce.getColor() + ce.getDisplayName());\n List<String> lore = new ArrayList<>();\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Current Level: \" + Changeables.CHAT_INFO + getEnchantLevel(ce, p));\n lore.add(Changeables.CHAT + \"Max Level: \" + Changeables.CHAT_INFO + ce.getMaxLevel());\n lore.add(Changeables.CHAT + \"Current Price: \" + Changeables.CHAT_INFO + ce.getPrice(getEnchantLevel(ce, p)));\n lore.add(\"\");\n lore.add(Changeables.CHAT + \"Left Click to \" + Changeables.CHAT_INFO + \" Buy 1\");\n lore.add(Changeables.CHAT + \"Right Click to \" + Changeables.CHAT_INFO + \" Buy Max\");\n meta.setLore(lore);\n item.setItemMeta(meta);\n inv.setItem(enchants.get(ce), item);\n }\n\n\n\n\n\n return inv;\n }", "@RequestMapping(method = RequestMethod.GET, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<List<InventoryResponse>> getInventory(){\n List<InventoryResponse> inventoryResponse = new ArrayList<>();\n inventoryService.getInventory().stream().forEach(inventoryItem -> inventoryResponse.add(\n new InventoryResponse(inventoryItem.getProduct().getId(), inventoryItem.getAmount())));\n\n return ResponseEntity.ok(inventoryResponse);\n }", "public PlayerInventory getInventory ( ) {\n\t\treturn extract ( handle -> handle.getInventory ( ) );\n\t}", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "public List<Order> showAllInventory() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\t//I may need to change the query criteria\r\n\t\tTypedQuery<Order> typedQuery = em.createQuery(\"select orderNumber from Order orderNumber\", Order.class);\r\n\t\tList<Order> allInventory = typedQuery.getResultList();\r\n\t\tem.close();\r\n\t\treturn allInventory;\r\n\t}", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "public Vector<ArtilleryModifier> getWeaponModifiers(Mounted mounted) {\n Vector<ArtilleryModifier> result = weapons.get(mounted);\n if (result == null) {\n result = new Vector<ArtilleryModifier>();\n weapons.put(mounted, result);\n }\n return result;\n }", "public Inventory () {\n weaponsInventory = new ArrayList<>();\n pointInventory = 0;\n lenInventory = 0;\n }", "public WeaponDetails[] getWeaponsOnSquare() {\n return this.weaponsOnSquare;\n }", "public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }", "public final ArrayList<String> getEquipment() {\r\n\t\tArrayList<String> allEquipment = new ArrayList<String>();\r\n\r\n\t\t// for every workout in the workoutList\r\n\t\tfor (Workout i : workoutList) {\r\n\t\t\tallEquipment.add(String.valueOf(i.getEquipment()));\r\n\t\t}\r\n\r\n\t\tallEquipment = (ArrayList<String>) allEquipment.stream().distinct().collect(Collectors.toList());\r\n\r\n\t\treturn allEquipment;\r\n\t}", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}", "public int getUnitsInventory(){\n\t\treturn unitsInventory;\n\t}", "public Inventory getInventory() {\r\n\t\treturn inventory;\r\n\t}", "public ArrayList<Stock> getAvaiableStock (){\n\t\treturn inventory;\n\t}", "static Weapon[] getWeapons() throws FileNotFoundException{\n\t\tString[] weaponData = readFile(\"Data/Weapons.txt\");\n\t\tWeapon[] weapons = new Weapon[weaponData.length];\n\t\t\n\t\tfor (int i = 0; i < weaponData.length; i++){\n\t\t\tString[] thisWeaponData = weaponData[i].split(\"/\");\n\t\t\tweapons[i] = new Weapon(\n\t\t\t\t\tthisWeaponData[0],\n\t\t\t\t\tInteger.parseInt(thisWeaponData[1]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[2]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[3]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[4]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[5]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[6]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[7]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[8]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[9]),\n\t\t\t\t\tDouble.parseDouble(thisWeaponData[10]),\n\t\t\t\t\tInteger.parseInt(thisWeaponData[11]));\n\t\t}\n\t\t\n\t\treturn weapons;\n\t}", "public List<ReturnItem> getItems() {\n return (List<ReturnItem>) get(\"items\");\n }", "public String getEquippedWeaponName() {\n return \"\";\n }", "public Hurtbox[] getHurtboxes() {\n return this.weapon.getHurtboxes();\n }", "public int getWeaponSlots() {\n return base.getWeaponSlots();\n }", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public static int[] guthansEquipment() {\n return new int[]{\n Items.GUTHANS_HELM_4724,\n Items.GUTHANS_HELM_100_4904,\n Items.GUTHANS_HELM_75_4905,\n Items.GUTHANS_HELM_50_4906,\n Items.GUTHANS_HELM_25_4907,\n Items.GUTHANS_PLATEBODY_4728,\n Items.GUTHANS_PLATEBODY_100_4916,\n Items.GUTHANS_PLATEBODY_75_4917,\n Items.GUTHANS_PLATEBODY_50_4918,\n Items.GUTHANS_PLATEBODY_25_4919,\n Items.GUTHANS_CHAINSKIRT_4730,\n Items.GUTHANS_CHAINSKIRT_100_4922,\n Items.GUTHANS_CHAINSKIRT_75_4923,\n Items.GUTHANS_CHAINSKIRT_50_4924,\n Items.GUTHANS_CHAINSKIRT_25_4925,\n Items.GUTHANS_WARSPEAR_4726,\n Items.GUTHANS_WARSPEAR_100_4910,\n Items.GUTHANS_WARSPEAR_75_4911,\n Items.GUTHANS_WARSPEAR_50_4912,\n Items.GUTHANS_WARSPEAR_25_4913,\n Items.BERSERKER_RING_I_11773\n };\n }", "@Override\n public Type getItemType() {\n return Type.WEAPON;\n }", "public List<Enemy> getEnemies();", "ArrayList<Ability> getAbilities() throws RemoteException;", "public int weaponCount(){\n\t\treturn weaponList.size();\n\t}", "public Collection<Item> shopItems() {\n\t\treturn this.itemRepository.shopItems();\n\t}", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "public Collection<Item> itemsPurchased() {\n\t\treturn this.itemRepository.itemsPurchased();\n\t}", "public static Data<Weapon> weaponList(){\n\t\tData<Weapon> res = new Data<Weapon>();\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée bâtarde\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,35,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes\",Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,10,3), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Bolas\",TypeDamage.C,\"_\",5,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gourdin\",Type.CAC_1M,TypeDamage.C, TypeMaterial.WOOD,0,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,100,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court composite\", new Munition(\"Flèche\",0.075),TypeDamage.P,TypeMaterial.WOOD,75,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Dague\", Type.CAC_LIGHT ,TypeDamage.P_T,TypeMaterial.STEEL,2,0.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Fléchette\", TypeDamage.P, \"_\",0.5,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hache d’armes naine\", Type.CAC_1M ,TypeDamage.T, TypeMaterial.STEEL,15,3), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre à deux mains\", Type.CAC_2M,TypeDamage.T, TypeMaterial.STEEL,75,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Gantelet\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.STEEL,2,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Coutille\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,8,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Grande hache\", Type.CAC_2M,TypeDamage.T,TypeMaterial.STEEL,20,6), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Massue\",Type.CAC_2M ,TypeDamage.C, TypeMaterial.WOOD,5,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée à deux mains\", Type.CAC_2M, TypeDamage.T, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hallebarde\", Type.CAC_2M ,TypeDamage.P_T, TypeMaterial.STEEL,10,6), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Hachette\", Type.CAC_LIGHT ,TypeDamage.T, TypeMaterial.STEEL,6,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète lourde\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,50,4), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes lourd\", Type.CAC_2M,TypeDamage.C, TypeMaterial.STEEL,15,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes lourde\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,4), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance d’arçon\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,10,5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arbalète légère\", new Munition(\"Carreau\",0.05),TypeDamage.P, TypeMaterial.STEEL,35,2), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fléau d’armes léger\", Type.CAC_1M, TypeDamage.C, TypeMaterial.STEEL,8,2.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau léger\", Type.CAC_LIGHT ,TypeDamage.C, TypeMaterial.STEEL,1,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Masse d’armes légère\", Type.CAC_LIGHT,TypeDamage.C, TypeMaterial.STEEL,5,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pic de guerre léger\", Type.CAC_LIGHT ,TypeDamage.P, TypeMaterial.STEEL,4,1.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc long\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,75,1.5), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Pique\", Type.CAC_2M,TypeDamage.P, TypeMaterial.WOOD,5,4.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée longue\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,15,2), 7));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Morgenstern\", Type.CAC_1M, TypeDamage.C_P,TypeMaterial.STEEL,8,3), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Nunchaku\", Type.CAC_LIGHT, TypeDamage.C, TypeMaterial.WOOD,2,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Bâton\", Type.CAC_2M, TypeDamage.C, TypeMaterial.WOOD,0,2), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Rapière\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,20,1), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Sai\", Type.CAC_LIGHT, TypeDamage.C_P ,TypeMaterial.STEEL,1,0.5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Matraque\", Type.CAC_LIGHT, TypeDamage.C ,TypeMaterial.WOOD,1,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Cimeterre\", Type.CAC_1M, TypeDamage.T ,TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Faux\", Type.CAC_2M, TypeDamage.C_P ,TypeMaterial.STEEL,18,5), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Arc court\", new Munition(\"Flèche\",0.075),TypeDamage.P, TypeMaterial.WOOD,30,1), 4));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epieu\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,1,1.5), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Epée courte\", Type.CAC_1M, TypeDamage.P ,TypeMaterial.STEEL,10,1), 5));\n\t\tres.add(new Tuple<Weapon, Integer>(new Munition(\"Shuriken\",TypeDamage.P,\"_\",1,0.25), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Serpe\", Type.CAC_LIGHT, TypeDamage.T ,TypeMaterial.STEEL,6,1), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Fronde\", new Munition(\"Bille\",0.25),TypeDamage.C,null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Lance\", Type.CAC_2M, TypeDamage.P, TypeMaterial.STEEL,2,3), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Trident\", Type.CAC_1M,TypeDamage.P, TypeMaterial.STEEL,15,2), 1));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Marteau de guerre\", Type.CAC_1M,TypeDamage.C, TypeMaterial.STEEL,12,2.5), 3));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Fouet\", Type.CAC_1M, TypeDamage.T, TypeMaterial.STEEL,1,1), 1));\n\t\t//Cas des armes a choisir manuellement.\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps légère\", Type.CAC_LIGHT, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à une main\", Type.CAC_1M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new MeleeWeapon(\"Autre arme de corps à corps à deux mains\", Type.CAC_2M, TypeDamage.NOTHING, null,0,0), 2));\n\t\tres.add(new Tuple<Weapon, Integer>(new RangeWeapon(\"Autre arme à distance\", new Munition(\"Autre munition\",0), TypeDamage.NOTHING,null,0,0), 2));\n\t\t\n\t\treturn res;\n\t}", "@Override\n\tpublic List<InventoryManagement> findAll() {\n\t\treturn inventoryManagementDao.findAll();\n\t}", "@GetMapping ( BASE_PATH + \"/inventory\" )\n public ResponseEntity getInventory () {\n final Inventory inventory = inventoryService.getInventory();\n return new ResponseEntity( inventory, HttpStatus.OK );\n }", "public Product getProductInventory() {\n return productInventory;\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public List<T> getItems() {\n if (items == null) {\n items = this.ejbFacade.findAll();\n }\n return items;\n }", "List<InventoryItem> getInventory(int appId);", "public List<Item> getAllItemsAvailable();", "public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }", "public Inventory getItemsAt(int x, int y) {\n\t\tTile tile = getTileAt(x, y);\n\t\treturn tile.getItems();\n\t}", "public List<PlayerItem> getAll();", "public List<String> getAVEquipmentList() {\r\n\t\treturn AVEquipmentList;\r\n\t}", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "public int getInventoryLength() {\n return items.length;\n }", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "public Inventory getInventory(){\n return inventory;\n }", "@SideOnly(Side.CLIENT)\n/* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list)\n/* 35: */ {\n/* 36:35 */ for (int i = 0; i < 13; i++)\n/* 37: */ {\n/* 38:36 */ ItemStack is = new ItemStack(itemId);\n/* 39:37 */ is.stackTagCompound = new NBTTagCompound();\n/* 40:38 */ is.stackTagCompound.setShort(\"Shield\", (short)i);\n/* 41:39 */ list.add(is);\n/* 42: */ }\n/* 43: */ }", "public List<MenuItem> getUncookedMenuItems() {\n return uncookedMenuItems;\n }", "public HashMap<String, List<String>> getItemMap() {\r\n\r\n\t\thelmet_abilities.add(Game_constants.INTELLIGENCE);\r\n\t\thelmet_abilities.add(Game_constants.WISDOM);\r\n\t\thelmet_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tarmor_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tshield_abilities.add(Game_constants.ARMOR_CLASS);\r\n\r\n\t\tring_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tring_abilities.add(Game_constants.STRENGTH);\r\n\t\tring_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tring_abilities.add(Game_constants.WISDOM);\r\n\t\tring_abilities.add(Game_constants.CHARISMA);\r\n\r\n\t\tbelt_abilities.add(Game_constants.CONSTITUTION);\r\n\t\tbelt_abilities.add(Game_constants.STRENGTH);\r\n\r\n\t\tboots_abilities.add(Game_constants.ARMOR_CLASS);\r\n\t\tboots_abilities.add(Game_constants.DEXTERITY);\r\n\r\n\t\tweapon_abilities.add(Game_constants.ATTACK_BONUS);\r\n\t\tweapon_abilities.add(Game_constants.DAMAGE_BONUS);\r\n\r\n\t\titem_map.put(Game_constants.HELMET, helmet_abilities);\r\n\t\titem_map.put(Game_constants.ARMOR, armor_abilities);\r\n\t\titem_map.put(Game_constants.SHIELD, shield_abilities);\r\n\t\titem_map.put(Game_constants.RING, ring_abilities);\r\n\t\titem_map.put(Game_constants.BELT, belt_abilities);\r\n\t\titem_map.put(Game_constants.BOOTS, boots_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_MELEE, weapon_abilities);\r\n\t\titem_map.put(Game_constants.WEAPON_RANGE, weapon_abilities);\r\n\r\n\t\treturn item_map;\r\n\r\n\t}" ]
[ "0.7280217", "0.72741485", "0.72560495", "0.7231269", "0.7199272", "0.7183721", "0.7149359", "0.71000355", "0.7025738", "0.7023921", "0.7022078", "0.692207", "0.69195575", "0.6912207", "0.69036555", "0.68821883", "0.68726057", "0.68159527", "0.680629", "0.67211485", "0.66949224", "0.66931856", "0.66232044", "0.66048366", "0.6564719", "0.6461717", "0.64498276", "0.64296484", "0.64193124", "0.6403342", "0.6399476", "0.63982046", "0.6381451", "0.6350429", "0.6339257", "0.63147193", "0.63011044", "0.6148121", "0.6133838", "0.6132824", "0.61208886", "0.6086862", "0.6076381", "0.60744804", "0.6045285", "0.6007594", "0.59932965", "0.59806246", "0.597106", "0.59689015", "0.5966575", "0.5961672", "0.59543765", "0.59452426", "0.594237", "0.59347785", "0.59314805", "0.5917778", "0.59038746", "0.59022784", "0.5898946", "0.5893107", "0.5886779", "0.5886059", "0.5885452", "0.58575106", "0.58523244", "0.5837027", "0.5813811", "0.5806514", "0.5791147", "0.57702094", "0.57582206", "0.575755", "0.574295", "0.5742553", "0.57397", "0.57263595", "0.57156867", "0.5710824", "0.57086676", "0.56953114", "0.5692603", "0.56833774", "0.56807965", "0.5667718", "0.56629527", "0.5649835", "0.56363994", "0.5632785", "0.56100786", "0.5604166", "0.56023663", "0.55981296", "0.558479", "0.55847126", "0.55846244", "0.5582296", "0.55803", "0.55774724" ]
0.7614183
0
Returns len of the weapons inventory list.
public int getLen(){ return this.lenInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getInventoryLength() {\n return items.length;\n }", "public int getItemListLength() {\n\t\treturn inventoryList.size();\n\t}", "public int weaponCount(){\n\t\treturn weaponList.size();\n\t}", "public int getInventorySize(){\n return inventory.size();\n }", "public int getInventorySize() {\r\n\t\treturn items.size();\r\n\t}", "public int getSizeInventory()\n {\n return this.furnaceItemStacks.length;\n }", "public int getSize()\n\t{\n\n\t\t// Return the number of Products in the inventory\n\t\treturn myProductInventory.size();\n\n\t}", "public int getSizeInventory()\n {\n return waterjetStacks.length;\n }", "public int getInventoryCount() {\n\t\treturn inventory == null ? 0 : inventory.size();\n\t}", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn field_145900_a.length;\n\t}", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int getSizeInventory() {\n\t\treturn this.slots.length;\n\t}", "public int getSizeInventory()\n {\n return this.slotsCount;\n }", "public int getInventorySize() {\n\t\treturn inventory.getSize();\n\t}", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn inputInventory.length + outputInventory.length ;\n\t}", "public int length() {\n return numberOfItems;\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "public int numberOfItems()\n {\n return dessertList.size();\n }", "public int getWeapons() {\n return weapons;\n }", "public int size() {\n return enemies.size();\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return items.size();\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\n return nItems;\n }", "public int getEquipmentCount() {\r\n\t\tint ret = 0;\r\n\t\tPerson p = model.getData();\r\n\t\tif ( p!=null ) {\r\n\t\t\tret = p.getEquipmentCount();\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public int size() {\n return menuItems.size();\n }", "public int size() {\n return numItems;\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "public int size() {\n \treturn numItems;\n }", "@Override\n\tpublic int getSizeInventory(){\n\t return modularStacks.length;\n\t}", "public int size ()\n\t{\n\t\treturn playerList.size();\n\t}", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "@Nonnegative\n public int getSize()\n {\n return items.size();\n }", "public int getNumHurtboxes() {\n return this.weapon.getNumHurtboxes();\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "public int getItemsCount() {\n if (itemsBuilder_ == null) {\n return items_.size();\n } else {\n return itemsBuilder_.getCount();\n }\n }", "public List<Integer> getPurchasedWeapons() {\r\n\t\treturn collectionManager.getPurchasedWeapons();\r\n\t}", "public int getItemsCount() {\n return items_.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public int size(){\n return numItems;\n }", "public int size(){\n return items.size();\n }", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "public int getSize() {\r\n return list.getItemCount();\r\n }", "public int getLengthAvailableProducts(Player customer){\n\t\treturn this.getAvailableProducts(customer).size();\n\t}", "public int size() {\n return itemsets.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public int getLength() {\n return collection.size();\n }", "public int inventorySize (TheGroceryStore g);", "int getItemsCount();", "int getItemsCount();", "@Override\n\tpublic int getSizeInventory() {\n\t\treturn 0;\n\t}", "public int length()\n {\n return cards.size();\n }", "int getLength() {\n return levels.length;\n }", "public int getSize() {\r\n return dice.size();\r\n }", "public int size()\r\n\t{\r\n\t\treturn deck.size();\r\n\t}", "public int size() {\n\t\treturn summonTemplates.size();\n\t}", "public int getPurchasedListCount()\r\n\t{\r\n\t\treturn m_purechaseList.size();\r\n\t}", "public int getSize() {\n\t\treturn cart.size();\n\t}", "@Override\n public int getLength()\n {\n int length = 0;\n\n for(int i = 0; i < this.movies.length; i++)\n {\n if(this.movies.get(i) != null)\n length++;\n }\n\n return length;\n }", "@Override\n public int getSize() {\n return this.numItems;\n }", "public int size() {\n return this.deck.size();\n }", "public int getSize() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an array.\");\n }", "protected int getWoodCount() {\n\t\treturn ent.getItemCount(Block.wood.blockID);\n\t}", "public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int size()\n\t{\n\t\treturn creatures.size();\n\t}", "public int length()\n {\n if(integerList == null)\n return 0;\n else\n return integerList.length;\n }", "public int length() {\n return size();\n }", "int getNumItems();", "public int size() {\n\t\treturn vehicles.size();\n\t}", "public int getWeaponSlots() {\n return base.getWeaponSlots();\n }", "public int getNumberOfItems() {\r\n return decorItems.size();\r\n }", "public int getNbBodyInList()\r\n\t{\n\t\treturn this.listUnityEnemy.size();\r\n\t}", "public int numberOfHotels() {\r\n \tint anzahlHotel=hotelDAO.getHotelList().size();\r\n \treturn anzahlHotel;\r\n }", "default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }", "public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public int sizeOfVolumeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(VOLUME$4);\r\n }\r\n }", "public int getSize() {\n return cart.size();\n }", "public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }", "public int getNumOfMenuItems(){\n return numOfMenuItems;\n }", "public int size() {\r\n\t\treturn geheim.length;\r\n\t}", "public int sizeOfSoftwareArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SOFTWARE$20);\n }\n }", "public int getNumberOfProducts(){\n return this.products.size();\n }", "public int size() {\n return deck.size();\n }", "public int getFleetSize() {\n return fleet.size();\n }", "@Override\n public int getItemCount() {\n return daftarGuild.size();\n }", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "public int size() {\n return bag.size();\n }", "public int numSpaceLeft()\n {\n \n return itemLimit - itemsHeld;\n }", "public int size()\n \t{\n \t\treturn getLength();\n \t}", "@Override\n public int getSize() {\n return numItems;\n }", "public int size() {\n\t\treturn wc.size();\n\t}", "public int length() {\n\t\treturn CarerAccounts.size();\n\t}", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "public int getInventoryFull ()\n {\n return (inventoryFull);\n }", "public int getInventoryStackLimit()\n {\n return 64;\n }", "public int getInventoryStackLimit()\n {\n return 64;\n }", "public int getInventoryStackLimit()\n {\n return 64;\n }" ]
[ "0.8146224", "0.79590297", "0.7942876", "0.77899736", "0.76605", "0.7487652", "0.74364483", "0.7413749", "0.7345006", "0.73196274", "0.7245503", "0.7239789", "0.71706045", "0.71410495", "0.6936736", "0.6896089", "0.6880197", "0.68625957", "0.6815899", "0.6795947", "0.6729988", "0.6717511", "0.67106664", "0.67100483", "0.67100483", "0.6685428", "0.6677864", "0.6660733", "0.6611154", "0.65627134", "0.6552751", "0.6548202", "0.6543985", "0.65384966", "0.65261996", "0.64976305", "0.64414436", "0.6434352", "0.64017045", "0.6401307", "0.63930416", "0.63930416", "0.6389234", "0.63850796", "0.63805294", "0.6379388", "0.63532794", "0.63516766", "0.63475734", "0.6331228", "0.6330584", "0.6322472", "0.6322472", "0.63222975", "0.630135", "0.6290152", "0.628819", "0.62700754", "0.62698126", "0.6253048", "0.6252764", "0.6248479", "0.6243234", "0.623832", "0.62342113", "0.6232041", "0.6231305", "0.62288934", "0.62158495", "0.6202698", "0.61945987", "0.6192762", "0.61887264", "0.618549", "0.61824405", "0.61767155", "0.6176326", "0.61731946", "0.6167192", "0.6167172", "0.61580783", "0.61380345", "0.61365104", "0.6131388", "0.6129974", "0.61242706", "0.6095947", "0.60887444", "0.60804343", "0.6072012", "0.6065451", "0.60645336", "0.60605526", "0.605876", "0.6058465", "0.60550934", "0.60523814", "0.60507196", "0.60507196", "0.60507196" ]
0.7162947
13
Adds "weapon" to inventory list and adds 1 to the inventory len.
public void addToInventory(IWeapon weapon){ if (weaponsInventory.size() < 12) { this.weaponsInventory.add(weapon); lenInventory += 1; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "public void add(Weapon weapon) {\n\t\tif (weaponList.size() < 2) {\n\t\t\tweaponList.add(weapon);\n\t\t}\n\t}", "public void add(Weapon weapon){\n\t\tsetCount(getCount() + weapon.getCount());\n\t\tweapon.expire();\n\t}", "public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }", "public void add(Weapon weapon) {\n\t\tweaponList.add(weapon);\n\t}", "public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }", "public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}", "@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }", "@Override\n\tpublic void addEquipment(Weapon w) {\n\t\tif (nbWeapons() > 0)\n\t\t\tthrow new BreakingRuleException();\n\t\tsuper.addEquipment(w);\n\t}", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }", "public void equipWeaponToCharacter (IPlayerCharacter character) {\n if (lenInventory > 1){\n character.equip(this.weaponsInventory.get(this.pointInventory));\n }\n }", "public Inventory () {\n weaponsInventory = new ArrayList<>();\n pointInventory = 0;\n lenInventory = 0;\n }", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}", "public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}", "public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}", "public void equipSelectedWeapon() {\n }", "public static void addSpecialBar(Player player, int weapon) {\n\t\tif (player.getTank()) {\n\t\t\tplayer.setSpecialAttackAmount(10.0, false);\n\t\t}\n\n\t\tif (GameType.isPreEoc()) {\n\t\t\tif (weapon == 11696 || weapon == 11698 || weapon == 11700) { //godswords except ags\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (weapon == 13902) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\tif (weapon == 19780) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t} else if (weapon == 21371) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (GameType.isOsrs() && Misc.arrayHasNumber(ServerConstants.ARMADYL_GODSWORDS_OSRS, weapon, 0) || GameType.isPreEoc() && weapon == 11694) {\n\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\treturn;\n\t\t}\n\t\tif (Combat.hasAbyssalTentacle(player, weapon)) {\n\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\treturn;\n\t\t}\n\t\tif (ItemAssistant.getItemName(weapon).equals(\"Dragon claws\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7800);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7812);\n\t\t\treturn;\n\t\t}\n\n\t\tif (ItemAssistant.getItemName(weapon).contains(\"Granite maul\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\treturn;\n\t\t}\n\n\t\t// Dragon crossbow\n\t\tif (weapon == 21902 && ServerConfiguration.DEBUG_MODE) {\n\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\treturn;\n\t\t}\n\n\t\tif (GameType.isOsrs()) {\n\n\t\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\t\tif (itemName.equals(\"Heavy ballista\") || itemName.equals(\"Light ballista\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (itemName.equals(\"Armadyl crossbow\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tswitch (weapon) {\n\n\n\t\t\tcase 4151: // Abyssal whip\n\t\t\tcase 12773: // Volcanic abyssal whip\n\t\t\tcase 12774: // Frozen abyssal whip\n\t\t\tcase 15_441:\n\t\t\tcase 15_442:\n\t\t\tcase 15_443:\n\t\t\tcase 15_444:\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\tbreak;\n\t\t\tcase 859:\n\t\t\t\t// Magic bows\n\t\t\tcase 861:\n\t\t\tcase 12788: // Magic shortbow (i).\n\t\t\tcase 11235:\n\t\t\tcase 12765:\n\t\t\tcase 12766:\n\t\t\tcase 12767:\n\t\t\tcase 12768:\n\t\t\tcase 13879:\n\t\t\tcase 13883:\n\t\t\tcase 15241 : // Hand cannon\n\t\t\tcase 20849: // Dragon thrown axe\n\t\t\tcase 22634: // Morrigan's throwing axe osrs\n\t\t\tcase 22636: // Morrigan's javelin osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\tbreak;\n\n\t\t\tcase 22622: // Statius's warhammer osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 4587:\n\t\t\tcase 13899:\n\t\t\tcase 13901:\n\t\t\tcase 20000:\n\t\t\tcase 1305: // Dragon longsword\n\t\t\tcase 12904: // Toxic staff of the dead\n\t\t\tcase 16209: // Toxic staff of the dead\n\t\t\tcase 11791: // Staff of the dead\n\t\t\tcase 16272: // Toxic staff of the dead\n\t\t\tcase 22296: // Staff of light\n\t\t\tcase 15486:\n\t\t\tcase 22613: // Vesta's longsword osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7599);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7611);\n\t\t\t\tbreak;\n\t\t\tcase 11802:\n\t\t\tcase 11806:\n\t\t\tcase 11808:\n\t\t\tcase 11804:\n\t\t\tcase 20368: // Ags\n\t\t\tcase 20374: // Zgs\n\t\t\tcase 20372: // Sgs\n\t\t\tcase 20370: // Bgs\n\t\t\tcase 11838:\n\t\t\tcase 12808: // Sara's blessed sword.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\tbreak;\n\t\t\tcase 3204:\n\t\t\t\t// d hally\n\t\t\t\tplayer.getPA().sendFrame171(0, 8493);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 8505);\n\t\t\t\tbreak;\n\t\t\tcase 1377:\n\t\t\t\t// d battleaxe\n\t\t\t\tplayer.getPA().sendFrame171(0, 7499);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7511);\n\t\t\t\tbreak;\n\n\t\t\tcase 12848:\n\t\t\tcase 13576:\n\t\t\tcase 21015: // Dinh's bulwark\n\t\t\tcase 16259:\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 1249:\n\t\t\tcase 11824:\n\t\t\t\t// dspear //zammy spear\n\t\t\tcase 13905:\n\t\t\tcase 13907:\n\t\t\tcase 11889: // Zamorakian hasta\n\t\t\tcase 22610: // Vesta's spear osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7674);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7686);\n\t\t\t\tbreak;\n\n\t\t\tcase 12926: // Toxic blowpipe.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7649);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7661);\n\t\t\t\tbreak;\n\n\t\t\tcase 1215:\n\t\t\t\t// dragon dagger\n\t\t\tcase 1231:\n\t\t\tcase 5680:\n\t\t\tcase 5698:\n\t\t\tcase 13271: // Abyssal dagger.\n\t\t\tcase 21009: // Dragon sword\n\t\t\t\tplayer.getPA().sendFrame171(0, 7574);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7586);\n\t\t\t\tbreak;\n\t\t\tcase 1434:\n\t\t\tcase 10887:\n\t\t\t\t// dragon mace\n\t\t\tcase 11061: // Ancient mace\n\t\t\t\tplayer.getPA().sendFrame171(0, 7624);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7636);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tplayer.getPA().sendFrame171(1, 7649);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7674);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7800);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7624); // mace interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7474); // hammer, gmaul\n\t\t\t\tplayer.getPA().sendFrame171(1, 7499); // axe\n\t\t\t\tplayer.getPA().sendFrame171(1, 7549); // bow interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7574); // sword interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7599); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 7699); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 8493);\n\t\t\t\tplayer.getPA().sendFrame171(1, 12323); // whip interface\n\n\t\t\t\tshowCombatInterface(player, weapon);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void addPreferedWeapon() {\n\t\tfor(int i = 0; i < killers.size(); i++) {\n\t\t\t\n\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\n\t\t\tfor(String key : killers.get(i).getWeapons().keySet()) {\n\t\t\t\tlist.add(killers.get(i).getWeapons().get(key) + \";\" + key);\n\t\t\t}\n\t\t\t\n\t\t\tComparator<String> comp = (s1, s2) -> {\n\t\t\t\treturn s1.compareTo(s2);\n\t\t\t};\n\t\t\t\n\t\t\tCollections.sort(list, Collections.reverseOrder(comp));\n\t\t\tList<String> list2 = new ArrayList<>();\n\t\t\t\n\t\t\tif(!list.isEmpty()) {\n\t\t\t\tint control = extractNumberFromText(list.get(0));\n\t\t\t\t\n\t\t\t\tlist.forEach(s -> {\n\t\t\t\t\tif(extractNumberFromText(s) == control)\n\t\t\t\t\t\tlist2.add(s);\n\t\t\t\t});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tkillers.get(i).setWeaponMoreUsed(list2);\n\t\t}\n\t}", "public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }", "public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}", "public int weaponCount(){\n\t\treturn weaponList.size();\n\t}", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "public void equip(Equipment e){\n equipment.add(e);\n }", "private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}", "@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}", "public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "@Override\n public Type getItemType() {\n return Type.WEAPON;\n }", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}", "private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }", "private void addPlayerSheild() {\n this.playerShield += 1;\n }", "public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}", "private void updateShop(List<ItemType> items, int level) {\n\t\tfor (ItemType item : items) {\n\t\t\tString text = item.getTextureString();\n\t\t\ttext = item instanceof SpecialType ? text\n\t\t\t\t\t: text.substring(0, text.length() - 1)\n\t\t\t\t\t\t\t+ Integer.toString(level);\n\t\t\tTexture texture = textureManager.getTexture(text);\n\t\t\tImageButton button = generateItemButton(texture);\n\n\t\t\tbutton.addListener(new ClickListener() {\n\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\tstatus.setText(item.getName());\n\t\t\t\t\tif (selectedHero == null) {\n\t\t\t\t\t\tstatus.setText(\"Unsuccessful shopping, No hero exist.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectedHero.getHealth() <= 0) {\n\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\"Your Commander is dead. Can't buy anything.\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tboolean enoughResources = checkCost(selectedHero.getOwner(),\n\t\t\t\t\t\t\titem);\n\t\t\t\t\tif (enoughResources) {\n\t\t\t\t\t\tif (item instanceof WeaponType) {\n\t\t\t\t\t\t\tWeapon weapon = new Weapon((WeaponType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(weapon);\n\t\t\t\t\t\t\tstatus.setText(boughtString + weapon.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Weapon) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else if (item instanceof ArmourType) {\n\t\t\t\t\t\t\tArmour armour = new Armour((ArmourType) item,\n\t\t\t\t\t\t\t\t\tlevel);\n\t\t\t\t\t\t\tselectedHero.addItemToInventory(armour);\n\t\t\t\t\t\t\tstatus.setText(boughtString + armour.getName()\n\t\t\t\t\t\t\t\t\t+ \"(Armour) for \"\n\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tboolean transactSuccess;\n\t\t\t\t\t\t\tSpecial special = new Special((SpecialType) item);\n\t\t\t\t\t\t\ttransactSuccess = selectedHero\n\t\t\t\t\t\t\t\t\t.addItemToInventory(special);\n\t\t\t\t\t\t\tif (transactSuccess) {\n\t\t\t\t\t\t\t\tstatus.setText(boughtString + special.getName()\n\t\t\t\t\t\t\t\t\t\t+ \"(Special) for \"\n\t\t\t\t\t\t\t\t\t\t+ selectedHero.toString());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tstatus.setText(\n\t\t\t\t\t\t\t\t\t\t\"Unsuccessful Shopping, can only hold 4 specials\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselectedHero.setStatsChange(true);\n\t\t\t\t\t\ttransact(selectedHero.getOwner(), item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tString mes = \"Not enough resources.\";\n\t\t\t\t\t\tstatus.setText(mes);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprivate boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tscrollTable.add(button).width(iconSize).height(iconSize).top();\n\t\t\tString stats = getItemStats(item, level);\n\t\t\tString cost = getItemCost(item, level);\n\t\t\tscrollTable.add(new Label(stats, skin)).width(iconSize).top()\n\t\t\t\t\t.left();\n\t\t\tscrollTable.add(new Label(cost, skin)).width(iconSize).top().left();\n\t\t\tscrollTable.row();\n\t\t}\n\t}", "public void softAddItem(ItemStack item, Player player){\n\t\tHashMap<Integer,ItemStack> excess = player.getInventory().addItem(item);\n\t\tfor( Map.Entry<Integer, ItemStack> me : excess.entrySet() ){\n\t\t\tplayer.getWorld().dropItem(player.getLocation(), me.getValue() );\n\t\t}\n\t}", "public void eatItem(Command command) {\n if (!command.hasSecondWord()) { // check if there's a second word\n System.out.println(\"Eat what?\");\n return;\n }\n String itemToBeEaten = command.getSecondWord();\n List<Item> playerInventory = player.getPlayerInventory(); // load the inventory of the player\n\n boolean somethingToUse = false;\n int notThisItem = 0;\n int loop;\n\n for (loop = 0; loop < playerInventory.size(); loop++) { // loop through the player inventory\n Item currentItem = playerInventory.get(loop); // set currentitem on the item that is currently in the loop\n if (itemToBeEaten.equals(currentItem.getItemName()) ){ // get the item name, then check if that matches the secondWord\n if (currentItem.getItemCategory().equals(\"food\")){ // check if the item used is an item in the \"food\" category\n if((player.getHealth())<(20)) { // check if the player's health is full\n player.addHealth(currentItem.getHealAmount()); // heal the player\n player.removeItemFromInventory(currentItem); // remove item from inventory\n System.out.println(\"You eat the \" + itemToBeEaten + \". It heals for \" + currentItem.getHealAmount()+\".\");\n } else { // the player's health is full\n System.out.println(\"Your are at full health!\");\n }\n } else { // item is not a food item\n System.out.println(\"You can't eat that item!\");\n }\n } else { // the item did not match the player provided name\n notThisItem++;\n }\n somethingToUse = true;\n }\n\n //errors afvangen\n if (!somethingToUse) { // the item is not found in the player inventory\n System.out.println(\"You can't eat that!\");\n }\n\n if (loop == notThisItem) { // the player has nothing to burn secondWord with\n //ThisItem is the same amount as loop. Then the player put something in that is not in the room\n System.out.println(\"You cannot eat \" + itemToBeEaten + \" because you don't have it in your inventory!\");\n }\n }", "public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }", "public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }", "@SideOnly(Side.CLIENT)\n/* 34: */ public void getSubItems(Item itemId, CreativeTabs table, List list)\n/* 35: */ {\n/* 36:35 */ for (int i = 0; i < 13; i++)\n/* 37: */ {\n/* 38:36 */ ItemStack is = new ItemStack(itemId);\n/* 39:37 */ is.stackTagCompound = new NBTTagCompound();\n/* 40:38 */ is.stackTagCompound.setShort(\"Shield\", (short)i);\n/* 41:39 */ list.add(is);\n/* 42: */ }\n/* 43: */ }", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "void addElementToInventory(String elementName);", "private void addEnemySheild() {\n this.enemyShield += 1;\n }", "private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }", "private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }", "@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}", "private boolean alreadyHasWeapon(Actor actor) {\n\t\tboolean hasWeapon = false;\n\t\t\n\t\tList<Item> inventory = actor.getInventory();\n\t\t\n\t\tfor (int x = 0; x < inventory.size(); x++) {\n\t\t\tif (inventory.get(x) instanceof Weapon) {\n\t\t\t\thasWeapon = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn hasWeapon;\n\t}", "public String getEquippedWeaponName() {\n return \"\";\n }", "@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "public void setWeaponSlots(int weaponSlots) {\n base.setWeaponSlots(weaponSlots);\n }", "public ItemStack createItem(ItemType type, int damage,List<Text> lore);", "public void fireOnItemAddedToInventoryCommands();", "public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}", "boolean addSteam(ItemStack me, int amount, EntityPlayer player);", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "protected void putItems() {\n\t\tlevelSetup[0][5].putItem(new Dynamite());\n\t\tlevelSetup[6][6].putItem(new Flint());\n\t\tlevelSetup[6][3].putItem(new ManaPotion());\n\t\tlevelSetup[5][0].putItem(new ManaPotion());\n\t\tlevelSetup[2][1].putItem(new HealthPotion());\n\t\tlevelSetup[3][6].putItem(new HealthPotion());\n\t\tlevelSetup[4][2].putItem(new Spinach());\n\t}", "public void equip();", "public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }", "public void buy() throws CannotAffordException {\r\n\t\tGame game = Game.getInstance();\r\n\t\tgame.decreaseBudget(price);\r\n\t\tgame.getInventory().add(id);\r\n\t}", "@POST(\"/AddWeapon\")\n\tint addWeapon(@Body Weapon weapon,@Body int id) throws GameNotFoundException;", "private void setWeapons()\n {\n sewers.setWeapon(woodSword);\n promenade.setWeapon(woodSword);\n depths.setWeapon(rustedSword);\n forest.setWeapon(goldSword);\n bridge.setWeapon(silverSpear);\n ramparts.setWeapon(infantryBow);\n }", "public WeaponList(Weapon weapon1, MainGame mainGame, GameState gameState, boolean testing) {\n\t\tthis.weaponList = new ArrayList<Weapon>();\n\t\tweaponList.add(weapon1);\n\t\tthis.mainGame = mainGame;\n\t\tthis.gameState = gameState;\n\t\t\n\t\tif (!testing) {\n\t\t\ttry {\n\t\t\t\tinitImages();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"exception\");\n\t\t\t}\n\t\t} \n\t}", "public Weapon(){\n \n name = \"Claw\"; // will be treated as a sword\n type = 'R';\n advType = 'G';\n disType = 'B';\n mt = 4;\n hit = 85;\n crit = 0;\n wt = 1;\n isMagic = true;\n \n }", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "public Weapon (String name) {\n\t\tsuper(name, weight, itemDamage, 0, 0, quantity);\n\t}", "public void unequip(Hero h) {\n\t\t// TODO Auto-generated method stub\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.equipped && w.getName().equals(this.getName())) {\n\t\t\t\tsetEquipped(false);\n\t\t\t\tstatsDecrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public List<IWeapon> getWeaponsInventory(){\n return weaponsInventory;\n }", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public int getEquippedWeaponDamage() {\n return 0;\n }", "@SideOnly(Side.CLIENT)\n/* */ public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List<String> par3List, boolean par4) {\n/* 59 */ if (GuiScreen.isShiftKeyDown()) {\n/* 60 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome1.lore\"));\n/* 61 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome2.lore\"));\n/* 62 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome3.lore\"));\n/* 63 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 64 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome4.lore\"));\n/* 65 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome5.lore\"));\n/* 66 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 67 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome6.lore\"));\n/* 68 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome7.lore\"));\n/* 69 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome8.lore\"));\n/* 70 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* 71 */ par3List.add(StatCollector.translateToLocal(\"item.ItemSoulTome9.lore\"));\n/* 72 */ } else if (GuiScreen.isCtrlKeyDown()) {\n/* 73 */ par3List.add(StatCollector.translateToLocal(\"item.FRVisPerSecond.lore\"));\n/* 74 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRAerCost.lore\") + (AerCost / 100.0D * 10.0D));\n/* 75 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRTerraCost.lore\") + (TerraCost / 100.0D * 10.0D));\n/* 76 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRIgnisCost.lore\") + (IgnisCost / 100.0D * 10.0D));\n/* 77 */ this; par3List.add(\" \" + StatCollector.translateToLocal(\"item.FRPerditioCost.lore\") + (PerditioCost / 100.0D * 10.0D));\n/* */ } else {\n/* */ \n/* 80 */ par3List.add(StatCollector.translateToLocal(\"item.FRShiftTooltip.lore\"));\n/* 81 */ par3List.add(StatCollector.translateToLocal(\"item.FRViscostTooltip.lore\"));\n/* */ } \n/* */ \n/* 84 */ par3List.add(StatCollector.translateToLocal(\"item.FREmpty.lore\"));\n/* */ }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "public void addIngredient(Ingredient ingredient) {\n stock.put(ingredient, inventoryMax);\n }", "private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "public Weapon()\n {\n name = \"None\";\n speed = 2;\n damage = 1;\n range = 1;\n }", "public String getWeapon() {\n return weapon1;\n }", "private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }", "public void withdrawAll() {\r\n for (int i = 0; i < container.capacity(); i++) {\r\n Item item = container.get(i);\r\n if (item == null) {\r\n continue;\r\n }\r\n int amount = owner.getInventory().getMaximumAdd(item);\r\n if (item.getCount() > amount) {\r\n item = new Item(item.getId(), amount);\r\n container.remove(item, false);\r\n owner.getInventory().add(item, false);\r\n } else {\r\n container.replace(null, i, false);\r\n owner.getInventory().add(item, false);\r\n }\r\n }\r\n container.update();\r\n owner.getInventory().update();\r\n }", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t// + \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.removePower(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getCustomName())) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString tier = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantmentCategory(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchant);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tier.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T1\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore1.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T2\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore2.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T3\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore3.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T4\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore4.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T5\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore5.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else if (tier\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"T6\")) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore6.add(0, Methods\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.color(ench));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ enchNumber + \"&d&l]\";\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.7249407", "0.72290266", "0.7193756", "0.7157891", "0.70182204", "0.6989073", "0.69572526", "0.67510545", "0.6688268", "0.6667882", "0.6649934", "0.6538827", "0.6455517", "0.62809336", "0.6274706", "0.6268788", "0.6239787", "0.62344456", "0.62170494", "0.61457884", "0.61424273", "0.6129923", "0.6122048", "0.6107901", "0.6096235", "0.6095567", "0.6073118", "0.60673505", "0.60627145", "0.6058617", "0.60214305", "0.60069907", "0.60061705", "0.6003977", "0.5994313", "0.5989833", "0.5983619", "0.59815", "0.5979587", "0.59356207", "0.5918268", "0.5909284", "0.5897617", "0.58813053", "0.58688706", "0.58667195", "0.586613", "0.58643216", "0.5862235", "0.5851282", "0.585011", "0.5828742", "0.58262193", "0.57931566", "0.57926047", "0.57760215", "0.5739824", "0.5737727", "0.5736502", "0.5725366", "0.5722895", "0.57085294", "0.57056206", "0.5694865", "0.5664319", "0.5663746", "0.56631935", "0.56613547", "0.5638864", "0.563606", "0.5629448", "0.56201017", "0.5614425", "0.5597208", "0.5589927", "0.558479", "0.55683124", "0.5562137", "0.55586445", "0.5555123", "0.5550578", "0.55504733", "0.5527668", "0.5527463", "0.5513856", "0.55062336", "0.55008656", "0.5491168", "0.5489181", "0.5487067", "0.5486123", "0.54845315", "0.5480554", "0.5473668", "0.54553974", "0.5451445", "0.54510397", "0.5450927", "0.5448736", "0.54464746" ]
0.84398043
0
Returns the index of the weapon pointed in the inventory.
public int getPointer(){ return this.pointInventory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getKeyEquip() {\r\n return Input.Keys.valueOf(keyShootName);\r\n }", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public int getKeyInventory() {\r\n return Input.Keys.valueOf(keyInventoryName);\r\n }", "public int getSlotForId(int itemId) {\n\t\tif (summonedFamiliar.familiarType == FamiliarType.BOB) {\n\t\t\tfor (int i = 0; i < burdenedItems.length; i++) {\n\t\t\t\tif ((burdenedItems[i] + 1) == itemId)\n\t\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "protected int getItemIndex(String key){\n for (int i = 0; i < itemsInTable.size(); i++){\n if (itemsInTable.get(i).equals(key)) return i;\n }\n return -1;\n }", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int getKeySellItem() {\r\n return getKeyShoot();\r\n }", "public Item getItem(int itemIndex){\n\t\treturn inventoryItems[itemIndex];\n\t}", "public int getKeyHireShip() {\r\n return getKeyShoot();\r\n }", "private static int getItemPosition(String name){\n\t\tfor(int i=0;i<ItemListController.getItemListInstance().size();i++){\n\t\t\tif (ItemListController.getItemListInstance().get(i).getName()==name){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int weaponCount(){\n\t\treturn weaponList.size();\n\t}", "public Weapon getWeapon(){\n return this.weaponPos;\n }", "int getMonsterIndex();", "int getMonsterIndex();", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "InventoryItem getInventoryItem();", "public int getKeyBuyItem() {\r\n return getKeyShoot();\r\n }", "public int getEquippedWeaponDamage() {\n return 0;\n }", "public int getItemStack(ItemStack itemStack) {\n return this.ITEMS.lastIndexOf(itemStack);\n }", "public int getKeyEquip2() {\r\n return Input.Keys.valueOf(getKeyShoot2Name());\r\n }", "private int findIngredientByName(String name){\r\n for(int i = 0; i < ingredients.size(); i++){\r\n if(ingredients.get(i).getName().equals(name)){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }", "public int getSelectedWeaponDamage() {\n return 0;\n }", "public int getWeaponSlots() {\n return base.getWeaponSlots();\n }", "public int getModifier(Mounted weapon, Coords coords) {\n Vector<ArtilleryModifier> weaponMods = getWeaponModifiers(weapon);\n ArtilleryModifier am = getModifierByCoords(weaponMods, coords);\n if (am != null) {\n return am.getModifier();\n }\n return 0;\n }", "public int getWeaponOffset(int frame) {\n\t\tint x, y;\n\t\tif (weaponOffsets == null) {\n\t\t\tx = y = 255;\n\t\t} else {\n\t\t\t// x could be 255 (see read_info())\n\t\t\tx = weaponOffsets[frame * 2]&0xff;\n\t\t\ty = weaponOffsets[frame * 2 + 1]&0xff;\n\t\t}\n\t\treturn (x<<8)|y;\n\t}", "public int findStackableItem(Item pickingUpItem){\n\t\tif(pickingUpItem.stackable()){\r\n\t\tint index=0;\r\n\t\t\r\n\t\tif(tileItems.getItem(0)!=null\t//inital check necessary for index 0\r\n\t\t\t\t&& (tileItems.getItem(0).stackEquivalent(pickingUpItem)\r\n\t\t\t\t&& !tileItems.getItem(0).stackFull())){\t\t\t\t\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\r\n\t\twhile(index<tileItems.getItemCount()\r\n\t\t\t&&!tileItems.getItem(index).stackEquivalent(pickingUpItem)\r\n\t\t\t&&tileItems.getItem(index)!=null){\r\n\t\t\tindex++;\r\n\t\t\t\tif(tileItems.getItem(index)!=null\r\n\t\t\t\t&& (tileItems.getItem(index).stackEquivalent(pickingUpItem)\r\n\t\t\t\t&& !tileItems.getItem(index).stackFull()))\t\t\t\t\t\r\n\t\t\t\t\treturn index;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\t//means \"no stackable item found\"\r\n\t}", "@Override\n\tpublic Integer getInventoryForAIngredient(Ingredient ingredient){\n\t\treturn beverageInventoryMap.get(ingredient);\n\t}", "public Product getProduct(int i){\n return inventory.get(i);\n }", "int getLeftMonsterIndex();", "private int findItemIndex(StudentClass searchItem)\n {\n int searchedHash = generateHash(searchItem) % tableSize;\n int workingIndex = searchedHash;\n int probe = 0; \n int QUAD_VAL = 2;\n StudentClass accessedItem;\n\n while(workingIndex < tableSize)\n {\n accessedItem = tableArray[workingIndex];\n\n if(searchItem.compareTo(accessedItem) == 0)\n {\n return workingIndex;\n }\n probe++;\n\n if(probeFlag == QUADRATIC_PROBING)\n {\n workingIndex = searchedHash + toPower(probe, QUAD_VAL);\n }\n else\n {\n workingIndex += 1;\n }\n workingIndex %= tableSize;\n }\n return ITEM_NOT_FOUND;\n }", "private int findIndex(T item){\n for(int i = 0; i < numItems; i++){\n if(arr[i].equals(item))\n return i;\n }\n return -1;\n }", "@Override\r\n\tpublic final ItemStack getItemAt(final int slot) {\r\n\t\treturn slot < this.tools.size() ? this.tools.get(slot).get(this.getViewer()) : null;\r\n\t}", "public int getIndexOfItem(String name) {\n\n\t\tString item;\n\t\tint i = 0;\n\t\twhile ((item = comboBoxName.getItemAt(i)) != null) {\n\t\t\tif (item.equals(name)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn -1;\n\t}", "public int getSizeInventory()\n {\n return this.furnaceItemStacks.length;\n }", "public int getEquippedWeaponWeight() {\n return 0;\n }", "public String getKeyEquipName() {\r\n return getKeyShootName();\r\n }", "public int getProductIndex(String choice) {\n\t\tString name = \"\";\n\t\tint x = 0;\n\t\tif(products.size() > 0) {\n\t\t\twhile(x < alphabet.length()) {\n\t\t\t\tif(choice.equals(alphabet.substring(x,x+1))) {\n\t\t\t\t\tname = products.get(x).name;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tx++;\t\n\t\t\t}\n\t\t}\n\t\treturn x;\n\t}", "public int getWeaponDamage()\n\t{\n\t\treturn weaponDamage;\n\t}", "public Integer getEquipId() {\n return equipId;\n }", "private int findItem(String searchItem){\n return myGrocery.indexOf(searchItem);\n }", "public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}", "public short getSiegeWeaponDamage();", "public int getArmorId() {\r\n\t\treturn super.getItemId();\r\n\t}", "public int getInventoryFull ()\n {\n return (inventoryFull);\n }", "public int getUnitsInventory(){\n\t\treturn unitsInventory;\n\t}", "@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}", "int getItem(int index);", "public WeaponInterface getWeaponTab() {\r\n return player.getExtension(WeaponInterface.class);\r\n }", "private int getKillerIndex(String killer) {\n\t\tfor (int i = 0; i < killers.size(); i++) {\n\t\t\tif (killers.get(i).getName().equals(killer))\n\t\t\t\treturn i;\n\t\t}\n\t\treturn -1;\n\t}", "public int getIndexOfProduct(Product p){\r\n for (int i = 0; i <allProducts.size() ; i++) {\r\n if(p.equals(allProducts.get(i))){\r\n return i ;\r\n }\r\n }\r\n return -1;\r\n }", "ItemStack getItem();", "public int getWeapons() {\n return weapons;\n }", "private int findIndexInStock(FoodItem itemToCheck) {\n // for each item in stock\n for (int i = 0; i < this._noOfItems; i++) {\n // if they're the same\n if (isSameFoodItem(this._stock[i], itemToCheck)) {\n // return current index.\n return i;\n }\n }\n return -1;\n }", "public int getEquipment() throws java.rmi.RemoteException;", "@Override\n public int elementIndex(Object elem) {\n IntArray ia = (IntArray)elem;\n if (ia.equals(zeroIA)) return 0;\n return invPowerMap.get(ia) + 1;\n }", "int getArmor();", "private int findIndexByName(String name) {\n // for each item in stock, while item var isn't unassigned:\n for (int i = 0; i < this._noOfItems; i++) {\n // if name is the same, return current index - to the first place where the same name was found\n if (this._stock[i].getName().equals(name))\n return i;\n }\n // if not found, return -1\n return -1;\n }", "public int attack(Weapon byWeapon) {\n\t\treturn byWeapon.getDamage();\n\t}", "public int getItemIndex() {\n return itemIndex;\n }", "public int getRunespanInventoryPoints() {\n\t\tif (getArguments() == null || getArguments().length == 0)\n\t\t\treturn 0;\n\t\treturn (Integer) getArguments()[0];\n\t}", "private int getIndexForEnemy(String enemyName) {\r\n\r\n\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(enemyName)) {\r\n\t\t\t\treturn i;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\r\n\t}", "public int getAxe(Player p) {\n\t\tint lv = p.getCurStat(14);\n\t\tfor (int i = 0; i < Formulae.miningAxeIDs.length; i++) {\n\t\t\tif (p.getInventory().countId(Formulae.miningAxeIDs[i]) > 0) {\n\t\t\t\tif (lv >= Formulae.miningAxeLvls[i]) {\n\t\t\t\t\treturn Formulae.miningAxeIDs[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public Weapon getWeapon() {\n\t\treturn weapon;\n\t}", "public int getIndex();", "public int getIndex();", "public int getIndex();", "public int getIndex()\n {\n return m_index;\n }", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }", "public String getWeaponName()\r\n\t{\r\n\t\treturn this.weaponName;\r\n\t}", "public int getSizeInventory() {\n\t\treturn this.slots.length;\n\t}", "public Integer getItemDamage(Material material)\r\n\t{\treturn this.itemDamage.get(material);\t}", "public String inventoryItemId() {\n return this.innerProperties() == null ? null : this.innerProperties().inventoryItemId();\n }", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "public int getShieldID(ItemStack is)\n/* 46: */ {\n/* 47:45 */ if (is.stackTagCompound != null) {\n/* 48:46 */ return is.stackTagCompound.getShort(\"Shield\");\n/* 49: */ }\n/* 50:48 */ return super.getShieldID(is);\n/* 51: */ }", "public int alreadyExists(FoodItem item){\n for(int i = 0; i < numItems; i++) {\n\n if(inventory[i]!= null) {\n if(item.isEqual(inventory[i])){\n return i;\n }\n }\n }\n return -1;\n }", "public int getItemIndex() {\n return this.itemIndex;\n }", "public int getIndexOfItem(T item) {\n int index = -1;\n\n Iterator<T> iterator = this.iterator();\n for (int i = 0; iterator.hasNext(); i++) {\n if (item == iterator.next()) {\n index = i;\n break;\n }\n }\n\n return index;\n }", "@Override\n public Type getItemType() {\n return Type.WEAPON;\n }", "public int getPokemonIndex(Pokemon p)\n\t{\n\t\tint pokemonIndex = -1;\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tif(p.compareTo(m_pokemon[i]) == 0)\n\t\t\t\t{\n\t\t\t\t\tpokemonIndex = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\treturn pokemonIndex;\n\t}", "ItemStack getEggItem(IGeneticMob geneticMob);", "public static int getArmorValueOfItem(ItemStack stack){\n\t\tif(stack == null || stack.getType() == Material.AIR) return 0;\n\t\t\n\t\tswitch(stack.getType()){\n\t\t\t//LeatherArmor stuff\n\t\t\tcase LEATHER_BOOTS: return 1;\n\t\t\tcase LEATHER_HELMET: return 1;\n\t\t\tcase LEATHER_LEGGINGS: return 2;\n\t\t\tcase LEATHER_CHESTPLATE: return 3;\n\t\t\t\n\t\t\t//GoldArmor stuff\n\t\t\tcase GOLD_BOOTS: return 1;\n\t\t\tcase GOLD_HELMET: return 2;\n\t\t\tcase GOLD_LEGGINGS: return 3;\n\t\t\tcase GOLD_CHESTPLATE: return 5;\n\t\t\t\n\t\t\t//ChainArmor stuff\n\t\t\tcase CHAINMAIL_BOOTS: return 1;\n\t\t\tcase CHAINMAIL_HELMET: return 2;\n\t\t\tcase CHAINMAIL_LEGGINGS: return 4;\n\t\t\tcase CHAINMAIL_CHESTPLATE: return 5;\n\t\t\t\n\t\t\t//IronArmor stuff\n\t\t\tcase IRON_BOOTS: return 2;\n\t\t\tcase IRON_HELMET: return 2;\n\t\t\tcase IRON_LEGGINGS: return 5;\n\t\t\tcase IRON_CHESTPLATE: return 6;\n\t\t\t\n\t\t\t//DiamondArmor stuff\n\t\t\tcase DIAMOND_BOOTS: return 3;\n\t\t\tcase DIAMOND_HELMET: return 3;\n\t\t\tcase DIAMOND_LEGGINGS: return 6;\n\t\t\tcase DIAMOND_CHESTPLATE: return 8;\n\t\t\t\n\t\t\tdefault: return 0;\n\t\t}\n\t}", "public static int getFirstItemSlot(Player player, ItemStack istack) {\n\t\tPlayerInventory inv = player.getInventory();\n\t\tItemStack[] contents = inv.getContents();\n\t\tfor (int i = 0; i < contents.length; i++) {\n\t\t\tif (contents[i] != null) {\n\t\t\t\tif (contents[i].getType() == istack.getType()) {\n\t\t\t\t\treturn i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public String getEquippedWeaponName() {\n return \"\";\n }", "public int getWeaponRange() {\n\t\treturn Math.round(type.getWeaponRange() * type.getItemLevelMultipliers()\n\t\t\t\t[level - 1]);\n\t}", "@SideOnly(Side.CLIENT)\n public int getTabIconItemIndex()\n {\n \n return modHPC.glasses.itemID;\n }", "public void equipSelectedWeapon() {\n }" ]
[ "0.69157386", "0.69092387", "0.6364109", "0.63191485", "0.62667596", "0.62338144", "0.61782795", "0.6048243", "0.60264426", "0.6011747", "0.5994714", "0.5971999", "0.59663486", "0.59663486", "0.59479064", "0.59479064", "0.5928393", "0.5926702", "0.588779", "0.5884181", "0.5847466", "0.5840438", "0.5831997", "0.57939816", "0.576611", "0.5761656", "0.5750001", "0.5745555", "0.57425445", "0.5728577", "0.57281274", "0.5715953", "0.5667853", "0.5666647", "0.5648696", "0.56458414", "0.56424695", "0.5640926", "0.5627898", "0.56270194", "0.56095195", "0.5600036", "0.5597178", "0.55941504", "0.5590898", "0.5586957", "0.55865484", "0.5578059", "0.5574755", "0.556947", "0.55589586", "0.5557358", "0.555531", "0.55513036", "0.55446845", "0.5544423", "0.55264956", "0.5522332", "0.5516992", "0.5516811", "0.55122155", "0.5510553", "0.5508729", "0.5508655", "0.55066407", "0.55066407", "0.55066407", "0.5482678", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.54811746", "0.5478033", "0.5474262", "0.5460533", "0.5455946", "0.54541034", "0.54517823", "0.54401207", "0.54358894", "0.5435325", "0.54297686", "0.5422674", "0.54217833", "0.54195887", "0.5409034", "0.5404653", "0.5403357", "0.5401718", "0.54010314", "0.5399597" ]
0.5546116
54
Move the pointer adding slot to index without over passing the list.
public void movePoint(int slots) { if (0 >= this.pointInventory + slots) { this.pointInventory = 0; } else this.pointInventory = Math.min(this.lenInventory - 1, this.pointInventory + slots); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}", "public abstract void move(int p_index) ;", "public void helpAdd(Object x, int index) {\n\tif ( _size >= _data.length )\n\t expand();\n\n\tfor( int i = _size; i > index; i-- ) {\n\t _data[i] = _data[i-1]; //each slot gets value of left neighbor\n\t}\n\n\t_data[index] = x;\n\t_size++;\n }", "public void add(int index, E e) {\n resize();\n for(int i = size-1; i >= index; i--) {\n list[i+1] = list[i];\n }\n list[index] = e;\n size++;\n }", "public void addAfter(E val, int idx) throws IndexOutOfBoundsException {\n addNodeAfter(new SinglyLinkedList.Node<>(val), idx);\n }", "public void add(int index, Object value) {\n if (index > _size) {\n throw new ListIndexOutOfBoundsException(\"Error\");\n }\n ListNode node = new ListNode(value);\n if (index == 0) {\n node.next = start;\n start = node;\n } else {\n ListNode prev = start;\n for (int i = 0; i<index - 1; i++ ) {\n prev = prev.next;\n }\n ListNode temp = prev.next;\n prev.next = node;\n node.next = temp;\n } \n _size++;\n }", "@Override\n public int nextIndex()\n {\n return idx+1; \n }", "public void addAtIndex(int index, int val) {\n if(index>size || index<0)\n return;\n ListNode ptr=new ListNode(val);\n ListNode p=head,follow=head;\n int count=0;\n while (p!=null && count!=index){\n count++;\n follow=p;\n p=p.next;\n }\n if(p==head) {\n if(p == null) {\n head = ptr;\n tail=ptr;\n }\n else {\n ptr.next = head;\n head = ptr;\n }\n size++;\n }\n else if(p==tail){\n ptr.next=p;\n follow.next=ptr;\n size++;\n }\n else if(p==null){\n follow.next=ptr;\n tail=ptr;\n size++;\n }\n else {\n ptr.next = p;\n follow.next = ptr;\n size++;\n }\n }", "public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}", "private void add(E e, int index) {\r\n\t\t\tif (hasRoom(index)) {\r\n\t\t\t\tshiftElements(data, index);\r\n\t\t\t\tdata[index] = e;\r\n\t\t\t} else {\r\n\t\t\t\tNode toAdd = new Node();\r\n\t\t\t\tthis.next.prev = toAdd;\r\n\t\t\t\ttoAdd.next = this.next;\r\n\t\t\t\ttoAdd.prev = this;\r\n\t\t\t\tthis.next = toAdd;\r\n\r\n\t\t\t\ttoAdd.data[0] = this.data[data.length - 1];\r\n\t\t\t\t// Shifts everything over one spot, the end element gets lost\r\n\t\t\t\tSystem.arraycopy(this.data, index, this.data, index + 1, data.length - index - 1);\r\n\t\t\t\tthis.data[index] = e;\r\n\t\t\t}\r\n\t\t}", "void add(int index, int value) {\n int[] newItems = new int[size++];\n\n System.arraycopy(items, 0, newItems, 0, index);\n\n newItems[index] = value;\n\n System.arraycopy(items, index, newItems, index + 1, items.length - index);\n\n items = newItems;\n }", "public void put_next_index(long next_index, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13), next_index);\n }", "void add(int index, Object element);", "public void addAtIndex(int idx, Node node) {\n if (!checkIndexBounds(idx)) {\n return;\n }\n\n Node pre = getNodeBeforeIndex(idx);\n Node curr = pre.next;\n pre.next = node;\n node.next = curr;\n this.length++;\n }", "void addAll(intList list, int index) throws IllegalAccessException;", "public void addBefore(E val, int idx) throws IndexOutOfBoundsException {\n addNodeBefore(new SinglyLinkedList.Node<>(val), idx);\n }", "@Override\n\tpublic void add(int index, Object e) throws IndexOutOfBoundsException\n\t{\n\t\t//just to check if the index is valid\n\t\tif ( index < 0 || index > size )\n \t\tthrow new IndexOutOfBoundsException();\n\t\t//check arraylist size\n\t\tif (size == myArray.length)\n\t\t\tresizeUp();\n\t\t//move all the proceeding elements to make room for the desired element\n\t\tfor ( int i = size; i > index; i-- )\n \t\tmyArray[i] = myArray[i-1];\n \t//plug the element\n\t\tmyArray[index] = e;\n \t++this.size;\n\n\t\t\n\t}", "private void addNodeAtIndex(int data, int index) {\n ListNode newNode = new ListNode(data);\n if (head == null) {\n head = newNode;\n return;\n }\n int count = 0;\n ListNode current = head;\n while (count < index - 1) {\n count++;\n current = current.next;\n }\n newNode.next = current.next;\n current.next = newNode;\n }", "private void addNodeAfter(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n SinglyLinkedList.Node<E> before = indexNode(idx);\n\n node.next = before.next;\n before.next = node;\n\n len += 1;\n }", "public void move(int index)\n\t{\n\t\tnextSpot = index + moveDirection(index);\n\t}", "public void reorder(Object obj, int newIndex);", "@Override\n\tpublic void add(int idx, T obj) throws IndexOutOfBoundsException {\n\t\tboolean found = false;\n\t\tint n = 0;\n\t\tListNode tmp = new ListNode(obj);\n\t\tListNode current = head;\n\t\t\n\t\tif (idx < 0 || idx > size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse if (idx == 0) {\n\t\t\ttmp.next = head;\n\t\t\thead = tmp;\n\t\t\tsize++;\n\t\t}\n\t\telse {\n\t\t\twhile (!found) {\n\t\t\t\tif (n == idx - 1) {\n\t\t\t\t\ttmp.next = current.next;\n\t\t\t\t\tcurrent.next = tmp;\n\t\t\t\t\tfound = true;\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void moveToPos(int pos) {\r\n\t\tassert (pos >= 0) && (pos <= cnt) : \"Position out of range\";\r\n\t\tcurr = head;\r\n\t\tfor (int i = 0; i < pos; i++)\r\n\t\t\tcurr = curr.next();\r\n\t}", "public void moveChild( ChildType child, int index );", "void insert(int idx, int val);", "@Override\n\tpublic void add(int idx, E element) {\n\t\tif (element == null)\n\t\t\tthrow new NullPointerException();\n\t\tif (idx < 0 || idx > size())\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (element.equals(list[i]))\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t// Element is added to the end of the list\n\t\tif (idx == size)\n\t\t\tlist[idx] = element;\n\n\t\t// Element is added at the beginning or middle\n\t\telse {\n\t\t\tfor (int i = size; i > idx; i--) {\n\t\t\t\tlist[i] = list[i - 1];\n\t\t\t}\n\t\t\tlist[idx] = element;\n\t\t}\n\n\t\tsize++;\n\t\tif (size == list.length)\n\t\t\tgrowArray();\n\n\t}", "private void addNodeBefore(SinglyLinkedList.Node<E> node, int idx) throws IndexOutOfBoundsException {\n if (idx == 0) {\n node.next = head;\n head = node;\n\n len += 1;\n return;\n }\n\n addNodeAfter(node, idx - 1);\n }", "@Deprecated\n\tpublic int pushIndex() {\n\t\tint i = (positions.size()-2)/2;\n\t\tindices.add(i);\n\t\treturn i;\n\t}", "public abstract void add(int index, E e);", "private void InsertAt(IntRepList.OpNode node, IntRepList.OpNode current) {\n current.prev.next = node;\n node.prev = current.prev;\n node.next = current;\n }", "void moveAdded(int playerIndex, Move move);", "@Override\n public void move() {\n _location.x++;\n }", "public void addAtIndex(int index, int data)\n {\n Node newNode = new Node(data);\n Node oldNode = head;\n\n for (int i=1;i<size;i++)\n {\n if (i == index)\n {\n Node myNode = oldNode.next;\n oldNode.next = newNode;\n newNode.next = myNode;\n break;\n }\n oldNode = oldNode.next;\n }\n size++ ;\n }", "public void add( int index, Comparable newVal ) { \n \t//checks if there is a meaningful value at index\n \tif (index> _lastPos){\n\t System.out.println(\"No meaningful int at index\");\n \t} else {\n\t //If _data is full, increase length of _data\n\t if (_size == _data.length) {\n\t\texpand();\n\t }\t\t\n\t //copies everything before index from _data to temp \n\t for (int i = _lastPos; i >= index; i--) {\n\t\t_data[i+1]= _data[i];\n\t }\n\t _data[index]= newVal;\n\t _size++;\n\t _lastPos++;\n\t}//end else\n\t \n }", "public void insert(int index, T value) {\n extend();\n for (int i = this.list.length-1; i >index; i--) {\n this.list[i] = this.list[i-1];\n }\n this.list[index] = value;\n this.size++;\n }", "protected void addMove(Move move) {\n moveHistory.add(move);\n pointer++;\n }", "public void addAtIndex(int index, int val) {\n if (index > size) return;\n //Add at head\n if (index <= 0) {\n addAtHead(val);\n }\n //Add at end\n else if (index == size) {\n addAtTail(val);\n } else {\n ListNode newNode = new ListNode(val);\n ListNode curr = head;\n //Add somewhere in between\n for (int i = 0; i < index - 1; i++) {\n curr = curr.next;\n }\n newNode.next = curr.next;\n curr.next = newNode;\n size++;\n }\n }", "public void move()\n {\n if(!pause)\n {\n if(up)\n { \n list.remove(0); \n head = new Location(head.getA(),head.getB()-15); \n list.add(head); \n }\n else if(down)\n {\n list.remove(0); \n head = new Location(head.getA(),head.getB()+15); \n list.add(head); \n }\n else if(left)\n {\n list.remove(0); \n head = new Location(head.getA()-15,head.getB()); \n list.add(head);\n }\n else if(right)\n {\n list.remove(0); \n head = new Location(head.getA()+15,head.getB()); \n list.add(head); \n }\n \n repaint();\n }\n }", "void add(int index, T element);", "void add(int index, T element);", "public void add(int index, Object object) {\n\t\tif (nextItem.getIndex() == index) {\n\t\t\tItem newItem = new Item(object, index);\n\t\t\tnewItem.setNext(nextItem);\n\t\t\tnextItem = newItem;\n\t\t\tnextItem.getNext().incrementIndex();\n\t\t} else {\n\t\t\tnextItem.add(index, object);\n\t\t}\n\t}", "public void add(int index, E obj){\n Node n = head;\n Node foo = new Node<E>(obj);\n Node temp = new Node<E>(null);\n int count = 0;\n if(index >= size()){\n index = size(); \n }\n else if (index < 0){\n index = 0;\n }\n while(n.getNext() != null && count != index)\n {\n n = n.getNext();\n temp = n;\n count++;\n }\n temp = n.getNext();\n n.setNext(foo);\n foo.setNext(temp);\n }", "public void addAtIndex(int index, int val) {\n if (index < 0 || index > size) {\n return;\n }\n Node prev = dummyHead;\n for (int i = 0; i < index; i++) {\n prev = prev.next;\n }\n prev.next = new Node(val, prev.next);\n size++;\n }", "public void insertElementAt(Object obj, int index);", "public DoublyLinkedListHeader addObject(DoublyLinkedListHeader list) {\r\n\t\tSystem.out.println(\"Enter an index!\");\r\n\t\tint index = scanInt();\r\n\t\tSystem.out.println(\"Enter the Integer Object!\");\r\n\t\tInteger obj = scanInt();\r\n\t\tif(!list.insert(obj, index)) {\r\n\t\t\tSystem.out.println(\"Invalid Index! The list is not modified\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"The list has been modified!\");\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\r\n public void insert(int index, Copiable value) throws IndexRangeException {\r\n if (index >= 0 && index <= count) {\r\n if (list.length == count) {\r\n Copiable[] list2 = new Copiable[2 * list.length];\r\n for (int k = 0; k < list.length; k++) {\r\n list2[k] = list[k];\r\n }\r\n list = list2;\r\n }\r\n for (int i = count; i > index; i--) {\r\n list[i] = list[i - 1];\r\n }\r\n list[index] = value;\r\n count++;\r\n } else {\r\n throw new IndexRangeException(0, count, index);\r\n }\r\n }", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "private void makeRoom(int givenPosition) {\n int newIndex = givenPosition;\n int lastIndex = numberOfElements;\n\n// Move each entry to next higher index, starting at end of\n// list and continuing until the entry at newIndex is moved\n for (int index = lastIndex; index >= newIndex; index--)\n listArray[index + 1] = listArray[index];\n }", "void insert(int index, T value) throws ListException;", "public void insertAtPos(int val , int pos)\n {\n List nptr = new List(val, null, null); \n if (pos == 1)\n {\n insertAtStart(val);\n return;\n } \n List ptr = start;\n for (int i = 2; i <= size; i++)\n {\n if (i == pos)\n {\n List tmp = ptr.getListNext();\n ptr.setListNext(nptr);\n nptr.setListPrev(ptr);\n nptr.setListNext(tmp);\n tmp.setListPrev(nptr);\n }\n ptr = ptr.getListNext(); \n }\n size++ ;\n }", "public void add(T item) {\n if (nextindex >= list.length) {\n resize();\n }\n list[nextindex] = item;\n nextindex++;\n }", "void itemAddedToIndex(Object key, Object o);", "@Override\r\n public void add(int index, T b) {\r\n head = head.add(index, b);\r\n }", "@Override\n\tpublic void addAt(int n, int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size+1)) { //check if index is valid\n\t\t\tfor (int i=size; i>index; i--) {\n\t\t\t\tvalues[i] = values[i-1]; //move every value one step right until index\n\t\t\t}\n\t\t\tvalues[index] = n; //place the new value at index\n\t\t\tsize++; //increment size\n\t\t\tif (size == values.length) { //if the list is full expand it\n\t\t\t\tresize();\n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}", "protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}", "public void add(int index, E x) {\n\t\tif (index < 0 || index > mSize) // == mSize allowed\n\t\t\tthrow new IndexOutOfBoundsException();\n\n\t\tif (size() == 0)\n\t\t\taddFirst(x);\n\t\telse {\n\t\t\taddBefore(getNode(index, 0, size()), x);\n\t\t\tmSize++;\n\t\t\tmodCount++;\n\t\t}\n\t}", "public void moveHead() {\n if (this.head == ram.length - 1) {\n head = 0;\n } else {\n head += 1;\n }\n }", "@Override\n public void add(int index, int element) {\n Entry newElement = new Entry(element);\n Entry tmp = getEntry(index);\n newElement.next = tmp;\n newElement.previous = tmp.previous;\n tmp.previous.next = newElement;\n tmp.previous = newElement;\n size++;\n }", "private int getInternalListIndex(int index) {\n return index-1;\n }", "void add(Element p,int pos)\n {\n if(pos==0)\n {\n\t Sequence temp = new Sequence(this.val, this.next);\n\t\t\t//swap head element\n\t\t\tthis.val = p;\n\t\t\t//change link to copied head\n\t\t\tthis.next = temp;\n }\n else\n {\n int count=1;\n Sequence test=this;\n while(count<pos)\n {\n test=test.next;\n count++;\n }\n Sequence no=new Sequence();\n no.val=p;\n no.next=test.next;\n test.next=no;\n }\n }", "@Override\n public void add(int index, T elem) {\n if(index < 0 || index >= size()) {//if the required index is not valid, give error\n throw new IndexOutOfBoundsException();\n }\n //if we want to add at the beginning of the list\n if(index == 0) {\n prepend(elem); //reuse prepend method when adding at the start of list\n return;\n }\n //if we want to add inside the list\n DLNode<T> predecessor = first; //create a reference, point it to the first node\n for(int i = 0; i < index - 1; i++) {//locate the preceeding index of the required index\n predecessor = predecessor.next;\n \n }\n DLNode<T> successor = predecessor.next; //another reference, now points to the index we want to add the new node to\n \n DLNode<T> middle = new DLNode(elem, predecessor, successor);//create new node, it's previous node is predecessor, the one after it is successor\n predecessor.next = middle; //new node is assigned to the required index, after predecessor, before successor\n \n if(successor == null) {//if there's no node after the new node\n last = middle; //new node is the last one \n }\n else{ //if there is a successor node exist\n successor.prev = middle; //new node preceeds it's successor\n } \n \n }", "private void addAtIndex(int index, FoodItem item) {\n // store the \"pushed\" forward item\n FoodItem toMoveNext = this._stock[index];\n // and set the new item in index\n this._stock[index] = new FoodItem(item);\n\n // \"push\" forward in the array each item, until no more items to push.\n for (int i = index+1; i < _noOfItems+1; i++) {\n FoodItem tempToMoveNext = _stock[i];\n _stock[i] = toMoveNext;\n toMoveNext = tempToMoveNext;\n }\n\n // we added a new item for _stock, so now increase the noOfItem:\n this._noOfItems++;\n }", "public void add(int index, Type t);", "public void AssegnaSlot(Slot S)\r\n {\r\n position = S;\r\n }", "public Article moveArticleAt(Article a, int newPos) {\n for (Article article : list) {\n if (article.equals(a)) {\n list.remove(article);\n list.add(newPos, article);\n return article;\n }\n }\n return null;\n }", "public synchronized void add(int index, T obj) {\n\t\tfor(int i = mIds.size(); i > index; i--) {\n\t\t\tmObjects.put(i, mObjects.get(i - 1));\n\t\t}\n\t\t// Add object to actual end of list\n\t\tmObjects.put(index, obj);\n\t\t// Add null for that object to id list\n\t\tmIds.add(index, null);\n\t\tif(mAutoCommit) AndSync.save(obj);\n\t}", "private static void copyRemainder(ArrayList<Integer> inputList, int inputIndex, ArrayList<Integer> outList, int outIndex) {\n while (inputIndex < inputList.size()) {\n outList.set(outIndex, inputList.get(inputIndex));\n\n inputIndex++;\n outIndex++;\n }\n }", "public void put_pointer(IndexPointer poniter, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0]), poniter.node_id);\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].put((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 8), (byte) (poniter.canonical ? 0 : 1));\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putInt((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 9), poniter.position);\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13), poniter.next_index);\n }", "public void setIndex(int index)\n/* */ {\n/* 39 */ this.index = index;\n/* */ }", "public abstract void add(T element, int index);", "public void add(E s,int index) {\t//O(n)\r\n\t\t//checks if the index is valid\r\n\t\tif(index>=0 && index<=size) {\t//index is valid\r\n\t\t\t//checks if there is any space left in the array\r\n\t\t\tif(size>=capacity)\r\n\t\t\t\tresize(this.capacity*2);\t//increases size of the array\r\n\t\t\tfor (int k=size-1; k>=index;k--) {\t//shifting element\r\n\t\t\t\tlist[k+1]=list[k];\r\n\t\t\t}\r\n\t\t\tlist[index]=s;\t//add element to the index\r\n\t\t\tsize++;\t//increases size\r\n\t\t} else {\t//index is not valid\r\n\t\t\tSystem.out.println(\"index \"+index+\" is out or range!\");\r\n\t\t}\r\n\t}", "private void testAddAtIndex(){\n System.out.println(\"------ TESTING : add(int index, int element) ------\");\n try{\n // The insertion will add values to the front\n // the sequence should be iSize-1....,1,0\n for(int i = 0; i < iSize ; i++){\n if(!iTestList.add(0,i))\n throw new RuntimeException(\"FAILED -> add(index,element) not working correctly\");\n }\n // we should test the out of edge cases\n // if we try the following code and the return value is true or if the\n // program crashes then there is a problem\n if(iTestList.add(iSize+10, 999 )){\n throw new RuntimeException(\"FAILED -> index should not be > SIZE\");\n }\n if(iTestList.add(-2,999 )){\n throw new RuntimeException(\"FAILED -> index should not be < 0\");\n }\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "public void moveQueueItem(int index1, int index2) {\n\t\tsynchronized (this) {\n\t\t\tif (index1 >= mPlayListLen) {\n\t\t\t\tindex1 = mPlayListLen - 1;\n\t\t\t}\n\t\t\tif (index2 >= mPlayListLen) {\n\t\t\t\tindex2 = mPlayListLen - 1;\n\t\t\t}\n\t\t\tif (index1 < index2) {\n\t\t\t\tSong tmp = mPlayList[index1];\n\t\t\t\tfor (int i = index1; i < index2; i++) {\n\t\t\t\t\tmPlayList[i] = mPlayList[i + 1];\n\t\t\t\t}\n\t\t\t\tmPlayList[index2] = tmp;\n\t\t\t\tif (mPlayPos == index1) {\n\t\t\t\t\tmPlayPos = index2;\n\t\t\t\t} else if (mPlayPos >= index1 && mPlayPos <= index2) {\n\t\t\t\t\tmPlayPos--;\n\t\t\t\t}\n\t\t\t} else if (index2 < index1) {\n\t\t\t\tSong tmp = mPlayList[index1];\n\t\t\t\tfor (int i = index1; i > index2; i--) {\n\t\t\t\t\tmPlayList[i] = mPlayList[i - 1];\n\t\t\t\t}\n\t\t\t\tmPlayList[index2] = tmp;\n\t\t\t\tif (mPlayPos == index1) {\n\t\t\t\t\tmPlayPos = index2;\n\t\t\t\t} else if (mPlayPos >= index2 && mPlayPos <= index1) {\n\t\t\t\t\tmPlayPos++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tnotifyChange(EVENT_QUEUE_CHANGED);\n\t\t}\n\t}", "@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }", "public void add(int index, E obj) {\n\t\tif (obj == null) {\n\t\t\tthrow new NullPointerException(\"Object to add cannot be null\");\n\t\t}\n\t\tif (index < 0 || index > this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\t// Check for dupes\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tif (obj.equals(get(i))) {\n\t\t\t\tthrow new IllegalArgumentException(\"Object to add cannot be a duplicate\");\n\t\t\t}\n\t\t}\n\t\t// Check if capacity needs to be increased\n\t\tif (this.size() == size) {\n\t\t\tthis.growArray();\n\t\t}\n\t\t// Add element to end\n\t\tif (index == size()) {\n\t\t\tlist[index] = obj;\n\t\t}\n\t\t// Add element to front or middle\n\t\telse if (index < size()) {\n\t\t\t// Shift elements after index to the right\n\t\t\tfor (int i = size(); i > index; i--) {\n\t\t\t\tlist[i] = list[i - 1];\n\t\t\t}\n\t\t\tset(index, obj);\n\t\t}\n\t}", "public native String insertItemBefore(String newItem, Number index);", "public synchronized void elementMoved(Object source, int fromIndex,\n\t\t\tint fromNewSize, Object to, int toIndex) {\n\n\t}", "public void addAtIndex(int index, int val) {\n if (index > this.size) {\n return;\n }\n\n if (index < 0) {\n index = 0;\n }\n\n ListNode pred = this.head;\n\n for (int i = 0; i < index; ++i) {\n pred = pred.next;\n }\n\n ListNode node = new ListNode(val);\n node.next = pred.next;\n pred.next = node;\n\n this.size++;\n }", "private int next(int index)\n\t{\n\t\tif (index == list.length - 1)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn index + 1;\n\t\t}\n\t}", "public void add(Object x, int index) {\n\tint counter = 0;\n\twhile (counter < _size) {\n\t if (get(counter) == x) {\n\t\thelpAdd( x, index);\n\t }\n\t counter +=1;\n\t}\n\tadd(x);\n\t\n }", "public synchronized void elementMoved(Object source, int fromIndex,\n\t\t\tint toIndex) {\n\n\t}", "public void addSongInThePlayList(int index1, int index2){\n index1 = index1-1;\n index2 = index2-1;\n thePlayLists[index1].addSongatOne(poolSong[index2]);\n }", "private int moveForward(int i, int s) {\n if (i + s >= items.length) {\n return ((i + s) - items.length);\n }\n return i + s;\n }", "private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}", "public void access(E e) {\n Position<Item<E>> p = findPosition(e); // try to locate existing element\n if (p == null) // new element\n p = list.addLast(new Item<E>(e)); // if new , place at end\n p.getElement().increment(); // always increment count\n moveUp(p);\n }", "public void add(int index, E element);", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "private int calculateNewIndex(float x, float y) {\n final float cellWidth = homeViewForAdapter.getWidth() / homeViewForAdapter.getColumnCount();\n final int column = (int) (x / cellWidth);\n\n // calculate which row to move to\n final float cellHeight = homeViewForAdapter.getHeight() / homeViewForAdapter.getRowCount();\n final int row = (int) Math.floor(y / cellHeight);\n\n // the items in the GridLayout is organized as a wrapping list\n // and not as an actual grid, so this is how to get the new index\n int index = row * homeViewForAdapter.getColumnCount() + column;\n if (index >= homeViewForAdapter.getChildCount()) {\n index = homeViewForAdapter.getChildCount() - 1;\n }\n\n return index;\n }", "public void insert(int newItem){\n itemArray[count] = newItem;\n count++;\n }", "public boolean addTimeSlotAt(TimeSlot aTimeSlot, int index)\n { \n boolean wasAdded = false;\n if(addTimeSlot(aTimeSlot))\n {\n if(index < 0 ) { index = 0; }\n if(index > numberOfTimeSlots()) { index = numberOfTimeSlots() - 1; }\n timeSlots.remove(aTimeSlot);\n timeSlots.add(index, aTimeSlot);\n wasAdded = true;\n }\n return wasAdded;\n }", "private int indexToSlot(int listIndexPosition)\n {\n Integer slot = indexToSlotList.get(listIndexPosition);\n\n return slot.intValue();\n }", "private int increment(int index) {\n\t\treturn (++index < this.capacity) ? index : 0;\n\t}", "@Override\n public void add(int index, T element) {\n Object[] newArray = new Object[size + 1];\n for (int i = 0; i < index; i++) {\n newArray[i] = data[i];\n }\n newArray[index] = element;\n for (int i = index + 1; i < newArray.length; i++) {\n newArray[i] = data[i - 1];\n }\n data = newArray;\n size++;\n }", "public void putValueBeforeArrayAddrIndex() {\n\t\tObj index = Tab.currentScope().findSymbol(\"@@TEMPOBJ\");\n\t\tObj address = Tab.currentScope().findSymbol(\"@@TEMPOBJ2\");\n\t\tObj value = Tab.currentScope().findSymbol(\"@@TEMPOBJ3\");\n\t\t\n\t\tCode.store(index);\n\t\tCode.store(address);\n\t\tCode.store(value);\n\t\t\n\t\tCode.load(address);\n\t\tCode.load(index);\n\t\tCode.load(value);\t\t\n\t}", "public void addAtIndex(int index, int val) {\n if (index < 0 || index > size) return;\n\n Node node = head;\n\n for (int i = 0; i < index; i++) {\n node = node.next;\n }\n\n Node newNode = new Node(val);\n newNode.next = node.next;\n newNode.next.prev = newNode;\n node.next = newNode;\n newNode.prev = node;\n size++;\n }", "@Override\n public void add(int i, E e) throws IndexOutOfBoundsException,\n IllegalStateException {\n if (i == size){\n addLast(e);\n }\n else {\n validIndex(i);\n checkSize();\n for (int j = size - 1; j >= i; j--) {\n data[j + 1] = data[j];\n }\n data[i] = e;\n size++;\n }\n }", "private void move(int newIndex, int oldIndex){\r\n \tassign(newIndex, keys[oldIndex], vals[oldIndex]); //get(keys[oldIndex]) could be used but doesn't seem intuitive when you are already accessing the keys array\r\n \tremove(oldIndex);\r\n }", "private void resize() {\n int listSize = numItemInList();\n //debug\n //System.out.println(\"resize: \" + nextindex + \"/\" + list.length + \" items:\" + listSize);\n if (listSize <= list.length / 2) {\n for (int i = 0; i < listSize; i++) {\n list[i] = list[startIndex + i];\n }\n } else {\n Object[] newList = new Object[this.list.length * 2];\n\n// System.arraycopy(this.list, startIndex, newList, 0, this.list.length-startIndex);\n for (int i = 0; i < listSize; i++) {\n newList[i] = list[i + startIndex];\n }\n this.list = newList;\n //debug\n //System.out.println(\"After resize:\" + nextindex + \" / \" + list.length + \" items:\" + numItemInList());\n }\n nextindex = nextindex - startIndex;\n startIndex = 0;\n }", "public void insertAt(int index,int data){\n Node node =new Node();\n node.data=data;\n node.next=null;\n\n if (index == 0) {\n insertAtStart(data);\n }\n\n\nelse{\n Node n = head;\n for (int i=0; i < index-1;i++){\n n =n.next;\n }\n node.next =n.next;\n n.next = node;\n\n}}", "void add(int idx, float incr);" ]
[ "0.6594519", "0.64162683", "0.6281055", "0.59696954", "0.59187376", "0.5881525", "0.584295", "0.5827337", "0.58104336", "0.5789368", "0.5777147", "0.5775809", "0.5754944", "0.5741155", "0.57310843", "0.57218814", "0.5713994", "0.5706958", "0.57064366", "0.5700789", "0.56925267", "0.5675415", "0.56617063", "0.5622038", "0.56131524", "0.56018764", "0.558949", "0.55865645", "0.55843985", "0.5577264", "0.5574064", "0.5547028", "0.55463755", "0.5545876", "0.552142", "0.5505202", "0.5499374", "0.5497346", "0.5494538", "0.5494538", "0.54932785", "0.5485476", "0.54613507", "0.5460658", "0.5453966", "0.54524326", "0.5446074", "0.5443937", "0.5440615", "0.54263973", "0.54261434", "0.541742", "0.5416689", "0.54160964", "0.541354", "0.54112107", "0.5405168", "0.5403085", "0.5398047", "0.5390007", "0.5388255", "0.53826153", "0.53777146", "0.53767574", "0.53747386", "0.5374212", "0.5365218", "0.5363752", "0.5363328", "0.5360967", "0.5356847", "0.535233", "0.5340055", "0.53375745", "0.5337124", "0.5319824", "0.53105927", "0.53101504", "0.5307269", "0.53012705", "0.5298452", "0.52982605", "0.52959013", "0.5290995", "0.5269778", "0.5267813", "0.5249318", "0.5241089", "0.52346754", "0.52316844", "0.5225456", "0.5222649", "0.5220164", "0.52198446", "0.5217809", "0.5216598", "0.521285", "0.521268", "0.52080977", "0.5203795" ]
0.5902906
5
Tries to equip the pointed weapon to "character".
public void equipWeaponToCharacter (IPlayerCharacter character) { if (lenInventory > 1){ character.equip(this.weaponsInventory.get(this.pointInventory)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void equip(@NotNull IWeapon weapon) {\n weapon.equipToMage(this);\n }", "static void weapon(char item)\r\n {\r\n \tString pClass = MainApp.playerClass;\r\n \tif(MainApp.alreadyEquipped == false)\r\n\t\t{\r\n\t\t\tif(pClass == \"Warrior\")\r\n\t\t\t{\r\n\t \t\tif(item == '0')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Warrior Equipped!\");\r\n\t \t\t}\r\n\t \t\t//System.out.print(\"Post Equip Warrior\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Archer\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '&')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Archer Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Archer\");\r\n\t\t\t}\r\n\t\t\tif(pClass == \"Rogue\")\r\n\t\t\t{\r\n\t\t\t\tif(item == '!')\r\n\t \t\t{\r\n\t \t\t\tMainApp.playerStats[0] += 5;\r\n\t \t\t\tMainApp.alreadyEquipped = true;\r\n\t \t\t\t//System.out.print(\"Rogue Equipped!\");\r\n\t \t\t}\r\n\t\t\t\t//System.out.print(\"Post Equip Rogue\");\r\n\t\t\t}\r\n\t }\r\n }", "public void equipSelectedWeapon() {\n }", "public void equip();", "public void setEquippedWeapon(String w)\n\t{\n\t\tstrEquippedWeapon = w;\n\t\t\n\t}", "public void weaponAbility() {\n \tlogger.info(\"weapon abilities aren't implemented yet. Using slash ability\");\n \t//ability(map.getCurrentTurnHero().getWeaponAbility());\n \tability(new Slash());\n }", "public void equip(Equip equipment)\r\n { \r\n if (equipment.getType() == Equip.WEAPON)\r\n {\r\n if (weapon!=null) unequip(weapon);\r\n items.remove(equipment);\r\n weapon = equipment;\r\n attack = attack + equipment.getRating();\r\n }\r\n else //if (equipment.getType() == Equip.ARMOR)\r\n {\r\n if (armor!=null) unequip(armor);\r\n items.remove(equipment);\r\n armor = equipment;\r\n defense += equipment.getRating();\r\n }\r\n }", "private void tryEquipItem() {\n if (fakePlayer.get().getHeldItem(EnumHand.MAIN_HAND).isEmpty()) {\n ItemStack unbreakingPickaxe = new ItemStack(Items.DIAMOND_PICKAXE, 1);\n unbreakingPickaxe.addEnchantment(Enchantments.EFFICIENCY, 3);\n unbreakingPickaxe.setTagCompound(new NBTTagCompound());\n unbreakingPickaxe.getTagCompound().setBoolean(\"Unbreakable\", true);\n fakePlayer.get().setItemStackToSlot(EntityEquipmentSlot.MAINHAND, unbreakingPickaxe);\n }\n }", "public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }", "public void pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }", "public void equip(Hero h) {\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.getName().equals(this.getName())) {\n\t\t\t\tw.setEquipped(true);\n\t\t\t\tw.statsIncrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t} else {\n\t\t\t\tw.unequip(h);\n\t\t\t}\n\t\t}\n\t}", "public void useWeapon(Character victim) {\n Weapons weapons = this.getInventory().getFirstWeapon();\n if (weapons == null)\n this.hit(victim);\n else {\n int vStrength = victim.getStrength();\n int mStrength = this.getStrength() * Hero.HERO_BONUS_OVER_ALL_CHARS + weapons.getDamage();\n if (vStrength >= mStrength) return;\n int strDif = mStrength - vStrength;\n int vLife = victim.getLife();\n vLife -= strDif;\n victim.setLife(vLife);\n this.getInventory().removeItems(weapons);\n }\n }", "public void pickUp(Item item) {\n this.curItem = item;\n this.curItem.setNonDamagablePlayer(this);\n if (item instanceof PickupableWeaponHolder) {\n this.weapon = ((PickupableWeaponHolder)(item)).getWeapon();\n }\n }", "public void equip(Equipment e){\n equipment.add(e);\n }", "public void toSelectingWeapon() {\n }", "public void giveWeapon(Weapon weapon) throws RuntimeException {\n if (weaponList.size() > 2)\n throw new RuntimeException(\"This player can't receive any more weapons\");\n weaponList.add(weapon);\n }", "public void throwItem() {\n this.curItem.setState(Item.THROWING);\n this.curItem.setX((int)(this.x));\n this.curItem.setY((int)(this.y));\n this.curItem.setXVel(Item.X_SPEED*this.dir);\n if (this.curItem instanceof PickupableWeaponHolder) {\n this.weapon = this.fist;\n }\n this.curItem = null;\n }", "@Override\r\n\tpublic void equipArmor() {\n\t\tSystem.out.println(\"아머 장착\");\r\n\t}", "public void setWeapon(int weapon)\n\t{\n\t\tthis.weapon = weapon;\n\t}", "public void addWeapon(Pair<Byte,Short> weapon){\n //Total number of weapons player can carry is 5 (inc. default weapon)\n //If player has <3 weapons, simply add weapon.\n //Otherwise, first remove oldest weapon in inventory then add at that\n //position.\n //oldest weapon tracked by linked list of weapon entries.\n if(this.weapons.size() < 3) {\n this.weapons.add(weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n }else{\n //Checks for duplicates, if duplicate weapons\n //found, new weapons ammo is just added to the current\n //weapon already in inventory\n for(Pair<Byte,Short> w : this.weapons){\n if(Objects.equals(w.getKey(), weapon.getKey())){\n if(weaponEntryTracker.size() == 1){\n weaponEntryTracker = new LinkedList<>();\n }\n else{\n for(int tracker : weaponEntryTracker){\n if(tracker == this.weapons.indexOf(w)){\n weaponEntryTracker.remove((Integer) tracker);\n }\n }\n }\n Pair<Byte,Short> newWeapon = new Pair<>(weapon.getKey(), (short) (w.getValue()+weapon.getValue()));\n if(this.currentWeapon == w){\n this.setCurrentWeapon(newWeapon);\n }\n this.weapons.set(this.weapons.indexOf(w),newWeapon);\n weaponEntryTracker.add((byte) this.weapons.indexOf(newWeapon));\n return;\n }\n }\n //check for any no weapon entries - indicates\n //player dropped weapon.\n for(Pair<Byte,Short> w : this.weapons){\n if(w.getKey() == NO_WEAPON_ID){\n this.weapons.set(this.weapons.indexOf(w),weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n return;\n }\n }\n //If no null entries are found, remove oldest weapon\n int oldestWeapon = this.weaponEntryTracker.poll();\n byte oldestWeaponKey = this.weapons.get(oldestWeapon).getKey();\n this.weapons.set(oldestWeapon, weapon);\n this.weaponEntryTracker.add((byte) this.weapons.indexOf(weapon));\n if(oldestWeaponKey == currentWeapon.getKey()){\n setCurrentWeapon(weapon);\n }\n\n }\n }", "public void selectWeaponFromInventory(int weaponIndex) {\n }", "public static void genWeaponList() {\r\n int i;\r\n\r\n auxItemVector.clear();\r\n \r\n if(currentChar == null) return;\r\n\r\n for (i = 0; i < currentChar.getItemsNumber(); i++) {\r\n if(currentChar.getItem(i).getType() == weapon)\r\n auxItemVector.add(currentChar.getItem(i));\r\n }\r\n }", "public final void receiveAttack(Weapon weapon) {\n this.availableLifePower = damageStrategy.processAttack(this, weapon);\n }", "@Override\n\tpublic void addEquipment(Weapon w) {\n\t\tif (nbWeapons() > 0)\n\t\t\tthrow new BreakingRuleException();\n\t\tsuper.addEquipment(w);\n\t}", "private Card murderWeapon(UI ui, Player currentPlayer) {\n CardPanel cardPanel = new CardPanel(ui.getBoard(), ui.getCmd(), \"weapons\");\n ui.getLayers().add(cardPanel, Integer.valueOf(6));\n cardPanel.showPanel();\n ui.getInfo().addText(\"Enter the weapon you think \" + murderer.getName() + \" killed Gunther in \" + location.getName() + \". Listed Below\"); // prompt\n\n // display all the characters to the player that they can select\n for (int i = 0; i < WEAPON_NAMES.length; i++) {\n ui.getInfo().addText(WEAPON_NAMES[i].toString().substring(0,1) + WEAPON_NAMES[i].toString().substring(1).toLowerCase());\n }\n\n WeaponTypes murderWeapon = null;\n String weapon;\n\n // check the input from the user whether it is a weapon, help command, notes command or the wrong input\n do {\n weapon = ui.getCmd().getCommand().toLowerCase();\n switch (weapon) {\n case \"rope\":\n murderWeapon = WeaponTypes.ROPE;\n break;\n case \"dagger\":\n murderWeapon = WeaponTypes.DAGGER;\n break;\n case \"wrench\":\n murderWeapon = WeaponTypes.WRENCH;\n break;\n case \"pistol\":\n murderWeapon = WeaponTypes.PISTOL;\n break;\n case \"candlestick\":\n murderWeapon = WeaponTypes.CANDLESTICK;\n break;\n case \"pipe\":\n murderWeapon = WeaponTypes.PIPE;\n break;\n case \"notes\":\n currentPlayer.getPlayerNotes().showNotes(currentPlayer);\n break;\n case \"help\":\n ui.getInfo().addText(\"Select a weapon from the list above for the questioning!\");\n break;\n default:\n ui.getInfo().addText(\"That was an invalid entry, enter a weapon from the list above for the questioning!\");\n break;\n }\n } while (murderWeapon == null); // while the player input was not a weapon\n\n cardPanel.removePanel();\n ui.getLayers().remove(cardPanel);\n return new Card(murderWeapon.toString()); // return a card with the murder weapon selected by the user\n }", "public boolean hitBy(Pweapon weapon, Tower tower) {\r\n\t\tif (!spawned)\r\n\t\t\treturn false;\r\n\r\n\t\t// System.out.println(\"Tir avec arme : \" + weapon.getNameWeapon());\r\n\t\tif (!tower.isControledByPlayer()) {\r\n\t\t\t// if (decideShootMiss(tower)) {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t\t// }\r\n\t\t} else {\r\n\t\t\tthis.health -= weapon.getDamage();\r\n\t\t}\r\n\t\tif (this.health <= 0) {\r\n\t\t\tthis.health = 0;\r\n\t\t\tthis.spawned = false;\r\n\t\t}\r\n\t\treturn this.health == 0;\r\n\t}", "private void getWeaponItem(double x, double y, String option,\r\n\t\t\tBufferedImage itemimage, SpriteGroup items) {\r\n\t\tint weaponoption = Resources.getInt(option);\r\n\t\tItem newGun = new WeaponItem(player, new Sprite(itemimage),\r\n\t\t\t\tweaponoption, x, y);\r\n\t\titems.add(newGun);\r\n\t\tnewGun.setActive(true);\r\n\t}", "@Test\n public void testGivenCharacterAndWeaponWhenEquippingWeaponThenVerifyEntitiesUpdated() throws InvalidActionException {\n Clan clan = new Clan();\n clan.setId(1);\n clan.setName(\"Dragons\");\n\n Character character = new Character();\n character.setId(2);\n character.setName(\"Rusty Nick\");\n character.setClan(clan);\n character.setState(CharacterState.READY);\n\n ItemDetails weaponDetails = new ItemDetails();\n weaponDetails.setItemType(ItemType.WEAPON);\n\n Item weapon = new Item();\n weapon.setId(3);\n weapon.setDetails(weaponDetails);\n weapon.setClan(clan);\n\n Set<Item> items = new HashSet<>();\n items.add(weapon);\n clan.setItems(items);\n\n // when equipping weapon\n Mockito.when(itemRepository.getOne(3)).thenReturn(weapon);\n Mockito.when(characterRepository.getOne(2)).thenReturn(character);\n\n itemService.equipItem(3,2, 1);\n\n // then verify entities updated\n assertEquals(character, weapon.getCharacter());\n assertNull(weapon.getClan());\n assertEquals(weapon, character.getWeapon());\n assertEquals(0, clan.getItems().size());\n }", "public void setCurrentWeapon(Pair<Byte,Short> weapon){\n currentWeapon = weapon;\n }", "public boolean deployWeapon(int x, int y, Player opponent, Map attacked_map, Map current_player_map, Player current_player, int method_choice) {\n Ship temp_ship = new Minesweeper();\n //Catches if current player is trying to use a bomb on an underwater map or space map, returns false for not successful\n if (current_player.player_weapons.contains(this) && (attacked_map.getName().equals(\"UnderwaterMap\") || attacked_map.getName().equals(\"SpaceMap\"))) {\n bombOutputs(method_choice, 1, attacked_map, temp_ship, x, y);\n return false;\n }\n\n //Checks if coordinate is in bounds\n if (x > 10 || x < 0 || y > 10 || y < 0) {\n bombOutputs(method_choice, 2, attacked_map, temp_ship, x, y);\n return false;\n }\n\n int is_occupied = attacked_map.defensiveGrid.checkCellStatus(x,y);\n\n //Checks if there is a ship at the attacked location: 0 = no ship, 1 = ship exists, 2 = ship exists and already hit\n if (is_occupied == 0) {\n //no ship: miss!\n bombOutputs(method_choice, 3, attacked_map, temp_ship, x, y);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n } else if (is_occupied == 1) {\n //ship there: first time attacking!\n Ship attacked_ship = new Minesweeper();\n\n for (int i = 0; i < attacked_map.existing_ships.size(); i++){\n Ship shipy = attacked_map.existing_ships.get(i);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(shipy);\n for (Coordinate coordinate : coordsList) {\n if (coordinate.x == x && coordinate.y == y) {\n attacked_ship = shipy;\n break;\n }\n }\n }\n\n //Check if captain's quarters at location\n Coordinate capt_quart = attacked_map.captains_quarters.get(attacked_ship);\n if (capt_quart.x == x && capt_quart.y == y) {\n //Check for armoured captain's quarters\n if (attacked_ship instanceof ArmoredShip) {\n //Armoured!\n //Armoured captains quarters hasn't been hit before\n if (((ArmoredShip) attacked_ship).getHitCount() == 0) {\n //Prints out a miss - some sneaky captain's quarters here\n bombOutputs(method_choice, 4, attacked_map, attacked_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(1, x, y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n //Armoured captains quarters has been hit before\n else if (((ArmoredShip) attacked_ship).getHitCount() == 1){\n //Destroys entire ship!\n bombOutputs(method_choice, 5, attacked_map, attacked_ship, x, y);\n bombOutputs(method_choice, 6, attacked_map, attacked_ship, x, y);\n\n attacked_map.sinkShip(attacked_ship);\n\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n ((ArmoredShip) attacked_ship).updateHitCount();\n }\n }\n //Hit a captain's quarters but not armoured\n else {\n //Destroy the ship!\n bombOutputs(method_choice, 7, attacked_map, attacked_ship, x, y);\n attacked_map.sinkShip(attacked_ship);\n if (method_choice == 2 || method_choice == 3) {\n current_player.incrementShipSunkCount();\n current_player.hasSunkFirstShip();\n }\n\n attacked_map.ship_health.replace(attacked_ship, 0);\n ArrayList<Coordinate> coordsList = attacked_map.ship_coordinates.get(attacked_ship);\n for (Coordinate coordinate : coordsList) {\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, coordinate.x, coordinate.y);\n }\n }\n }\n //Not a captain's quarters there\n else {\n //Attack and hit!\n int current_health = attacked_map.ship_health.get(attacked_ship);\n current_health -= 1;\n attacked_map.ship_health.replace(attacked_ship, current_health);\n\n bombOutputs(method_choice, 8, attacked_map, temp_ship, x, y);\n if (method_choice == 2 || method_choice == 3) {\n current_player_map.offensiveGrid.setCellStatus(2, x, y);\n }\n attacked_map.defensiveGrid.setCellStatus(2, x, y);\n }\n } else if (method_choice == 2 || method_choice == 3) {\n //Already attacked, already hit a ship!\n bombOutputs(method_choice, 9, attacked_map, temp_ship, x, y);\n }\n\n return true;\n }", "public void addWeapon(Weapon weapon) {\n setAttack(getAttack() + weapon.getDamage());\n setWeaponSlots(getWeaponSlots() - 1);\n }", "public void addToInventory(IWeapon weapon){\n if (weaponsInventory.size() < 12) {\n this.weaponsInventory.add(weapon);\n lenInventory += 1;\n }\n }", "protected void addAllowedWeapon(Material weapon) {\r\n\t\tthis.allowedWeapons.add(weapon);\r\n\t}", "@Test\n public void testGivenCharacterAndWeaponWhenUnequippingWeaponThenVerifyEntitiesUpdated() throws InvalidActionException {\n Clan clan = new Clan();\n clan.setId(1);\n clan.setName(\"Dragons\");\n\n Character character = new Character();\n character.setId(2);\n character.setName(\"Rusty Nick\");\n character.setState(CharacterState.READY);\n character.setClan(clan);\n\n ItemDetails weaponDetails = new ItemDetails();\n weaponDetails.setItemType(ItemType.WEAPON);\n\n Item weapon = new Item();\n weapon.setId(3);\n weapon.setDetails(weaponDetails);\n weapon.setClan(null);\n weapon.setCharacter(character);\n character.getItems().add(weapon);\n\n Set<Item> weapons = new HashSet<>();\n clan.setItems(weapons);\n\n // when unequipping weapon\n Mockito.when(characterRepository.getOne(2)).thenReturn(character);\n Mockito.when(itemRepository.getOne(3)).thenReturn(weapon);\n\n itemService.unequipItem(3,2, 1);\n\n // then verify entities updated\n assertNull(weapon.getCharacter());\n assertEquals(clan, weapon.getClan());\n assertNull(character.getWeapon());\n assertEquals(weapon, clan.getItems().iterator().next());\n }", "private void unequip(Equip e)\r\n { \r\n if (e.getType()==Equip.WEAPON)\r\n {\r\n attack -= e.getRating();\r\n items.add(e);\r\n }\r\n else if (e.getType() == Equip.ARMOR)\r\n {\r\n items.add(e);\r\n defense -= e.getRating();\r\n }\r\n }", "@Override\n public void setEquippedItem(IEquipableItem item) {}", "private void setArmor() {\n\n if (VersionChecker.currentVersionIsUnder(12, 2)) return;\n if (!ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_ARMOR)) return;\n\n eliteMob.getEquipment().setItemInMainHandDropChance(0);\n eliteMob.getEquipment().setHelmetDropChance(0);\n eliteMob.getEquipment().setChestplateDropChance(0);\n eliteMob.getEquipment().setLeggingsDropChance(0);\n eliteMob.getEquipment().setBootsDropChance(0);\n\n if (hasCustomArmor) return;\n\n if (!(eliteMob instanceof Zombie || eliteMob instanceof PigZombie ||\n eliteMob instanceof Skeleton || eliteMob instanceof WitherSkeleton)) return;\n\n eliteMob.getEquipment().setBoots(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.AIR));\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.AIR));\n\n if (eliteMobLevel >= 12)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.LEATHER_HELMET));\n\n if (eliteMobLevel >= 14)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));\n\n if (eliteMobLevel >= 16)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));\n\n if (eliteMobLevel >= 18)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));\n\n if (eliteMobLevel >= 20)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.CHAINMAIL_HELMET));\n\n if (eliteMobLevel >= 22)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.CHAINMAIL_BOOTS));\n\n if (eliteMobLevel >= 24)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.CHAINMAIL_LEGGINGS));\n\n if (eliteMobLevel >= 26)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.CHAINMAIL_CHESTPLATE));\n\n if (eliteMobLevel >= 28)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.IRON_HELMET));\n\n if (eliteMobLevel >= 30)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.IRON_BOOTS));\n\n if (eliteMobLevel >= 32)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.IRON_LEGGINGS));\n\n if (eliteMobLevel >= 34)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.IRON_CHESTPLATE));\n\n if (eliteMobLevel >= 36)\n eliteMob.getEquipment().setBoots(new ItemStack(Material.DIAMOND_BOOTS));\n\n if (eliteMobLevel >= 38)\n if (ConfigValues.mobCombatSettingsConfig.getBoolean(MobCombatSettingsConfig.ELITE_HELMETS))\n eliteMob.getEquipment().setHelmet(new ItemStack(Material.DIAMOND_HELMET));\n\n if (eliteMobLevel >= 40)\n eliteMob.getEquipment().setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));\n\n if (eliteMobLevel >= 42)\n eliteMob.getEquipment().setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));\n\n }", "public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }", "@Test\n public void weaponCorrectlyEquipped_valid_shouldPass(){\n RPGCharacter warrior = CreateCharacter.createChar(4);\n Axe axe = new Axe(ItemType.Weapon, \"Common Axe\", 1, SlotType.WeaponSlot, WeaponType.Axe, 7, 1.1);\n try{\n warrior.EquipWeapon(axe);\n assertEquals(true, warrior.getWeaponHashMap().containsKey(WeaponSlot));\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "private boolean canEquip(Item item,String target){\n\n\t\tif (! (item instanceof Equippable))return false;\n\t\tEquippable toEquip = (Equippable)item;\n\t\tswitch(toEquip.getEquipType()){\n\t\tcase HEAD:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.HEAD)) return true;\n\t\t\tbreak;\n\t\tcase CHEST:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.CHEST)) return true;\n\t\t\tbreak;\n\t\tcase WEAPON:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.WEAPON)) return true;\n\t\t\tbreak;\n\t\tcase LEGS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.LEGS)) return true;\n\t\t\tbreak;\n\t\tcase NECK:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.NECK)) return true;\n\t\t\tbreak;\n\t\tcase BELT:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BELT)) return true;\n\t\t\tbreak;\n\t\tcase BOOTS:\n\t\t\tif (target.startsWith(\"EquipPos\"+EquipType.BOOTS)) return true;\n\t\t}\n\t\treturn false;\n\t}", "public void addWeapon(Weapon x){\n\t\tplayerWeapon=new Weapon(x);\n\t\tHealth+=x.gethealthStat();\n\t\tAttackForce+=x.getafStat();\n\t\tDefense+=x.getdefenseStat();\n\t}", "public void attack(ItemWeapon w, Monster target) {\n\t\ttarget.takeDamage(w.getDamage()+level*20);\n\t}", "public void getKilledProduct() \n {\n try{\n Player.getInstance().getInventory().add(new CowMeat());\n } catch (IllegalAccessException e) {\n //Do nothing\n }\n }", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "@Test\n void equipWeaponTest() {\n\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(axeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(swordTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(bowTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(knifeTest);\n assertNull(characterEquipWeaponTest.getEquippedWeapon());\n\n characterEquipWeaponTest.equipWeapon(staffTest);\n assertEquals(characterEquipWeaponTest.getEquippedWeapon(), staffTest);\n\n characterEquipWeaponTest0.equipWeapon(staffTest);\n assertNull(characterEquipWeaponTest0.getEquippedWeapon());\n\n }", "public static void giveStuff(GamePlayer player) {\r\n\t\tItemStack sword = new ItemStack(Material.WOOD_SWORD);\r\n\t\tItemStack bow = new ItemStack(Material.BOW);\r\n\t\tItemStack arrow = new ItemStack(Material.ARROW);\r\n\t\tItemStack compass = new ItemStack(Material.COMPASS);\r\n\t\tItemMeta compassMeta = sword.getItemMeta();\r\n\t\tItemMeta swordMeta = sword.getItemMeta();\r\n\t\tItemMeta bowMeta = sword.getItemMeta();\r\n\t\t\r\n\t\tplayer.getPlayer().getInventory().clear();\r\n\t\tswordMeta.spigot().setUnbreakable(true);\r\n\t\tsword.setItemMeta(swordMeta);\r\n\t\tsword.setAmount(1);\r\n\t\t\r\n\t\tbowMeta.spigot().setUnbreakable(true);\r\n\t\tbowMeta.setDisplayName(\"§aSniper§r §7(One Shot Kill)\");\r\n\t\tbow.setItemMeta(bowMeta);\r\n\t\tbow.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 10);\r\n\t\tbow.setAmount(1);\r\n\t\t\r\n\t\tarrow.setAmount(1);\r\n\t\t\r\n\t\tcompassMeta.setDisplayName(\"§aTarget Tracker\");\r\n\t\tcompass.setItemMeta(compassMeta);\r\n\t\tcompass.setAmount(1);\r\n\t\t\r\n player.getPlayer().getInventory().addItem(sword);\r\n player.getPlayer().getInventory().addItem(bow);\r\n player.getPlayer().getInventory().addItem(arrow);\r\n player.getPlayer().getInventory().addItem(compass);\r\n\t}", "@Override\n @Test\n public void equipTest() {\n Axe axes;\n Sword sword;\n Staff staff;\n Spear spear;\n Luz luz;\n Oscuridad oscuridad;\n Anima anima;\n Bow bow;\n axes = new Axe(\"Axe\", 20, 1, 2);\n sword = new Sword(\"Sword\", 20, 1, 2);\n spear = new Spear(\"Spear\", 20, 1, 2);\n staff = new Staff(\"Staff\", 20, 1, 2);\n bow = new Bow(\"Bow\", 20, 2, 3);\n anima = new Anima(\"Anima\", 20, 1, 2);\n luz = new Luz(\"Luz\", 20, 1, 2);\n oscuridad = new Oscuridad(\"Oscuridad\", 20, 1, 2);\n sorcererAnima.addItem(axes);\n sorcererAnima.equipItem(axes);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(axes);\n sorcererAnima.addItem(sword);\n sorcererAnima.equipItem(sword);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(sword);\n sorcererAnima.addItem(spear);\n sorcererAnima.equipItem(spear);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(spear);\n sorcererAnima.addItem(staff);\n sorcererAnima.equipItem(staff);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(staff);\n sorcererAnima.addItem(bow);\n sorcererAnima.equipItem(bow);\n assertNull(sorcererAnima.getEquippedItem());\n sorcererAnima.items.remove(bow);}", "@Override\n public void useWeapon(ResponseInput responseMessage)\n {\n basicMode(((ResponseRocketLauncher) responseMessage).getTargetPlayerBasicMode(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringPlayerToMove(), ((ResponseRocketLauncher) responseMessage).getTargetSquareCoordinatesAsStringTargetToMove(), ((ResponseRocketLauncher) responseMessage).isWithFragWarhead() ) ;\n }", "public String getEquippedWeapon()\n\t{\n\t\treturn strEquippedWeapon;\n\t\t\n\t}", "public void changeWeapon(String weaponName)\r\n\t{\r\n\t\tm_weapon.changeAttack(weaponName);\r\n\t}", "public void removeWeapon(Weapon w) {\n try {\n this.validChoice(w);\n weaponSpawnpoint.removeWeapon(w);\n } catch (WrongValueException wvE) {\n wvE.wrong();\n }\n }", "public String getEquippedWeaponName() {\n return \"\";\n }", "public static void showCombatInterface(Player player, int weapon) {\n\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\tfor (int i = 0; i < unarmedItemNames.length; i++) {\n\t\t\tif (itemName.toLowerCase().equals(unarmedItemNames[i])) {\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5855); // punch, kick, block\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 5857);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tCombatInterface.updateClickedCombatStyle(player);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tboolean doNotChange = false;\n\t\tif ((GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705);\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"whip\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"abyssal tentacle\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 12290); // flick, lash, deflect\n\t\t\tplayer.getPA().sendFrame246(12291, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 12293);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"chinchompa\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 27500); // first param\n\t\t\tplayer.getPA().sendFrame126(itemName, 27503); // first param + 2\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"dagger\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"bow\") || itemName.toLowerCase().contains(\"ballista\") || itemName.toLowerCase().contains(\"cannon\") || itemName.toLowerCase().contains(\"javelin\") || itemName.toLowerCase().contains(\"throwing\") || itemName.toLowerCase().contains(\"dragon thrownaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1764); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(1765, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1767);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (!itemName.toLowerCase().contains(\"saradomin sword\") && !itemName.toLowerCase().contains(\"blessed sword\") && !itemName.toLowerCase().contains(\"2h\") && (\n\t\t\t\titemName.toLowerCase().contains(\"rapier\") || itemName.toLowerCase().contains(\"sword\") && !itemName.toLowerCase().contains(\"godsword\") && !itemName.toLowerCase()\n\t\t\t\t .contains(\n\t\t\t\t\t\t \"longsword\"))\n\t\t\t\t|| itemName.toLowerCase().contains(\"toktz-xil-ek\") || itemName.toLowerCase().contains(\"toktz-xil-ak\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2276); // stab, lunge, slash, block\n\t\t\tplayer.getPA().sendFrame246(2277, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2279);\n\t\t} else if (itemName.toLowerCase().contains(\"staff\") || itemName.toLowerCase().contains(\"wand\") || itemName.toLowerCase().contains(\"staff of light\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"trident\") || itemName.toLowerCase().contains(\"thammaron's sceptre\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 328); // bash, pound, focus.\n\t\t\tplayer.getPA().sendFrame246(329, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 331);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t}\n\t\telse if (itemName.toLowerCase().contains(\"dart\") || itemName.toLowerCase().contains(\"knife\") || itemName.toLowerCase().contains(\"blowpipe\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"toktz-xil-ul\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4446); // accurate, rapid, longrange\n\t\t\tplayer.getPA().sendFrame246(4447, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4449);\n\t\t\treAdjustCombatStyle(player, \"DEFENSIVE\", ServerConstants.CONTROLLED);\n\t\t} else if (itemName.toLowerCase().contains(\"pickaxe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 5570); // spike, impale, smash, block\n\t\t\tplayer.getPA().sendFrame246(5571, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 5573);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"axe\") || itemName.toLowerCase().contains(\"hatchet\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 1698); // chop, hack, smash, block\n\t\t\tplayer.getPA().sendFrame246(1699, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 1701);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"claws\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 7762);\n\t\t\tplayer.getPA().sendFrame246(7763, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 7765);\n\t\t} else if (itemName.toLowerCase().contains(\"halberd\") || itemName.toLowerCase().contains(\"scythe\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 8460); // jab, swipe, fend\n\t\t\tplayer.getPA().sendFrame246(8461, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 8463);\n\t\t\treAdjustCombatStyle(player, \"ACCURATE\", ServerConstants.AGGRESSIVE);\n\t\t} else if (itemName.toLowerCase().contains(\"spear\") || itemName.toLowerCase().contains(\"hasta\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4679); // lunge, swipe, pound, block\n\t\t\tplayer.getPA().sendFrame246(4680, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4682);\n\t\t\treAdjustCombatStyle(player, \"AGGRESSIVE ACCURATE\", ServerConstants.CONTROLLED);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"mace\") || itemName.toLowerCase().contains(\"barrelchest\") || itemName.toLowerCase().contains(\"flail\") || itemName.toLowerCase()\n\t\t .contains(\n\t\t\t\t \"cane\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 3796);\n\t\t\tplayer.getPA().sendFrame246(3797, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 3799);\n\t\t} else if (itemName.toLowerCase().contains(\"maul\") || itemName.toLowerCase().contains(\"hammer\") || itemName.toLowerCase().contains(\"tzhaar-ket-om\")\n\t\t || itemName.toLowerCase().contains(\"dinh's\") || itemName.contains(\"spade\") || itemName.contains(\"club\")) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else if (itemName.toLowerCase().contains(\"godsword\") || itemName.toLowerCase().contains(\"2h\") || itemName.toLowerCase().contains(\"saradomin sword\")\n\t\t\t\t|| itemName.toLowerCase().contains(\"sara's blessed sword\")\n\t\t\t\t|| (GameType.isPreEoc() && weapon == 19780)) {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 4705); // Godsword.\n\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 4708);\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\tdoNotChange = true;\n\t\t} else {\n\t\t\tplayer.playerAssistant.setSidebarInterface(0, 2423); // chop, slash, lunge, block\n\t\t\tplayer.getPA().sendFrame246(2424, 200, weapon);\n\t\t\tplayer.getPA().sendFrame126(itemName, 2426);\n\t\t}\n\t\tswitch (weapon) {\n\t\t\tcase 20779:\n\t\t\t\tplayer.playerAssistant.setSidebarInterface(0, 425); // war hamer equip.\n\t\t\t\tplayer.getPA().sendFrame246(426, 200, weapon);\n\t\t\t\tplayer.getPA().sendFrame126(itemName, 428);\n\t\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t\t\tdoNotChange = true;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Whip is the only main weapon where the aggressive option is controlled, so make it easier by if i use whip and switch to another weapon, it puts the other weapon\n\t\t//on aggressive instead of longrange/lunge.\n\t\tif (player.wasWearingAggressiveSharedXpWeapon && !doNotChange) {\n\t\t\treAdjustCombatStyle(player, \"CONTROLLED\", ServerConstants.AGGRESSIVE);\n\t\t}\n\t\tplayer.wasWearingAggressiveSharedXpWeapon = false;\n\t\tCombatInterface.updateClickedCombatStyle(player);\n\t}", "private void checkWeaponCollisions(GObject element) {\r\n\t\tGObject topLeft = getElementAt(element.getX() - 1, element.getY());\r\n\t\tGObject topRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY());\r\n\t\tGObject bottomLeft = getElementAt(element.getX() - 1, element.getY() + element.getHeight());\r\n\t\tGObject bottomRight = getElementAt(element.getX() + element.getWidth() + 1, element.getY() + element.getHeight());\r\n\t\tif(topLeft == player || topRight == player || bottomLeft == player || bottomRight == player) {\r\n\t\t\tremove(element);\r\n\t\t\telement = null;\r\n\t\t\thits++;\r\n\t\t\tloseLife();\r\n\t\t}\r\n\t}", "public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }", "public Weapon (Player player) {\n\t\tthis.player = player;\n\t}", "public IntrinsicWeapon getIntrinsicWeapon() {\r\n\t\treturn new IntrinsicWeapon(10, \"bombard\");\r\n\t}", "public String equipItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tswitch (this.getPlayer().getItem(itemName).getClassName()) {\r\n\t\t\t\t\tcase \"game.BodyArmor\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBodyArmor(itemName);\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Headgear\":\r\n\t\t\t\t\t\tthis.getPlayer().switchHeadgear(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Gloves\":\r\n\t\t\t\t\t\tthis.getPlayer().switchGloves(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Boots\":\r\n\t\t\t\t\t\tthis.getPlayer().switchBoots(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"game.Weapon\":\r\n\t\t\t\t\t\tthis.getPlayer().switchWeapon(itemName);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault: return \"You cannot equip this item.\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"You equip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic int buy(Weapon item) {\n\t\treturn 0;\n\t}", "public void unequip(Hero h) {\n\t\t// TODO Auto-generated method stub\n\t\tfor(Weapon w : h.getInventory().getWeaponList()) {\n\t\t\tif(w.equipped && w.getName().equals(this.getName())) {\n\t\t\t\tsetEquipped(false);\n\t\t\t\tstatsDecrease(h, StatType.STRENGTH, getWeaponDmg());\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public boolean equipped() {\n\treturn this.equipped;\n }", "public void selectWeapon( final int weaponIndex ) throws RemoteException {\r\n if ( weaponIndex < weapons.length ) {\r\n playerState.weaponIndex = weaponIndex;\r\n playerState.weapon = weapons[ playerState.weaponIndex ];\r\n }\r\n }", "public void attack(String spell, character opponent){\n Random rand = new Random();\n int prob;\n String attack;\n \n prob = rand.nextInt(2); //we need two random numbers to allow us to use the two attacks:\n if(prob==0){\n attack = \"punch\";\n opponent.setHealth(opponent.getHealth() - 10);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n else if(prob==1){\n attack = \"kick\";\n opponent.setHealth(opponent.getHealth() - 15);\n System.out.println(getName() + \" has landed \" + attack);\n System.out.println(opponent.getName() + \" health now \" + opponent.getHealth());\n }\n \n \n }", "public Weapon useWeapon() {\n\t\tWeapon weapon = weaponList.get(weaponList.size() - 1);\n\t\tif(weaponList.size() > 1){\n\t\t\tweaponList.remove(weaponList.size() - 1);\n\t\t}\n\t\telse {\n\t\t}\n\t\treturn weapon;\n\t}", "public Weapon getWeapon(){\n return this.weaponPos;\n }", "public WeaponComponent() {\n weaponName = \"none\";\n owned = false;\n damagePower = 1;\n }", "@Override\n\tpublic void use(GameCharacter character) {\n\t\tcharacter.setEnergy(character.getEnergy() - 50);\n\t\tswitch((int)(Math.random() * 3)) {\n\t\t\tcase 0 :\n\t\t\t\tcharacter.setEnergy(character.getEnergy() + ENERGY);\n\t\t\t\tbreak;\n\t\t\tcase 1 :\n\t\t\t\tcharacter.setEnergy(character.getEnergy() - ENERGY);\n\t\t\t\tbreak;\n\t\t\tcase 2 :\n\t\t\t\tcharacter.setStrength(character.getStrength() + STRENGTH);\n\t\t\t\tcharacter.setMaxStrength(character.getMaxStrength() + STRENGTH);\n\t\t}\n\t}", "public Item giveItem(String itemName, Player character) {\n Item item = items.remove(itemName);\n if(item != null) {\n character.items.put(item.getName(), item);\n }\n return item;\n }", "public static Weapon spawnWeapon()\r\n\t{\r\n\t\tfinal int numberOfWeapons = 5; //update as weapons are added\r\n\t\t\r\n\t\t//Create weapons in order to access attributes / randomly select a weapon\r\n\t\tSword sword = new Sword();\r\n\t\tStick stick = new Stick();\r\n\t\tBazooka bazooka = new Bazooka();\r\n\t\tAtomicBomb atomicBomb = new AtomicBomb();\r\n\t\tPotatoCannon potatoCannon = new PotatoCannon();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tWeapon[] weapons = new Weapon[] {sword, stick,bazooka,atomicBomb,potatoCannon}; //store weapons in an array to randomly grab one to use in Game\r\n\t\t\r\n\t\tint randomWeapon; //weapon chosen\t\t\r\n\t\tRandom rng = new Random (); //create generator based upon current number of weapons\r\n\t\trandomWeapon = rng.nextInt(numberOfWeapons); //get a weapon object at random from array\r\n\r\n\t\treturn (weapons[randomWeapon]); //we have no need to create separate instance\r\n\t}", "@Override\n\tpublic int use() {\n\t\treturn Game.getInstance().getPlayer().equip(this);\n\t}", "public static void addSpecialBar(Player player, int weapon) {\n\t\tif (player.getTank()) {\n\t\t\tplayer.setSpecialAttackAmount(10.0, false);\n\t\t}\n\n\t\tif (GameType.isPreEoc()) {\n\t\t\tif (weapon == 11696 || weapon == 11698 || weapon == 11700) { //godswords except ags\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (weapon == 13902) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\treturn;\n\t\t\t} else\n\t\t\tif (weapon == 19780) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\treturn;\n\t\t\t} else if (weapon == 21371) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (GameType.isOsrs() && Misc.arrayHasNumber(ServerConstants.ARMADYL_GODSWORDS_OSRS, weapon, 0) || GameType.isPreEoc() && weapon == 11694) {\n\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\treturn;\n\t\t}\n\t\tif (Combat.hasAbyssalTentacle(player, weapon)) {\n\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\treturn;\n\t\t}\n\t\tif (ItemAssistant.getItemName(weapon).equals(\"Dragon claws\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7800);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7812);\n\t\t\treturn;\n\t\t}\n\n\t\tif (ItemAssistant.getItemName(weapon).contains(\"Granite maul\")) {\n\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\treturn;\n\t\t}\n\n\t\t// Dragon crossbow\n\t\tif (weapon == 21902 && ServerConfiguration.DEBUG_MODE) {\n\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\treturn;\n\t\t}\n\n\t\tif (GameType.isOsrs()) {\n\n\t\t\tString itemName = ItemAssistant.getItemName(weapon);\n\t\t\tif (itemName.equals(\"Heavy ballista\") || itemName.equals(\"Light ballista\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (itemName.equals(\"Armadyl crossbow\")) {\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tswitch (weapon) {\n\n\n\t\t\tcase 4151: // Abyssal whip\n\t\t\tcase 12773: // Volcanic abyssal whip\n\t\t\tcase 12774: // Frozen abyssal whip\n\t\t\tcase 15_441:\n\t\t\tcase 15_442:\n\t\t\tcase 15_443:\n\t\t\tcase 15_444:\n\t\t\t\tplayer.getPA().sendFrame171(0, 12323);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 12335);\n\t\t\t\tbreak;\n\t\t\tcase 859:\n\t\t\t\t// Magic bows\n\t\t\tcase 861:\n\t\t\tcase 12788: // Magic shortbow (i).\n\t\t\tcase 11235:\n\t\t\tcase 12765:\n\t\t\tcase 12766:\n\t\t\tcase 12767:\n\t\t\tcase 12768:\n\t\t\tcase 13879:\n\t\t\tcase 13883:\n\t\t\tcase 15241 : // Hand cannon\n\t\t\tcase 20849: // Dragon thrown axe\n\t\t\tcase 22634: // Morrigan's throwing axe osrs\n\t\t\tcase 22636: // Morrigan's javelin osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7549);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7561);\n\t\t\t\tbreak;\n\n\t\t\tcase 22622: // Statius's warhammer osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 4587:\n\t\t\tcase 13899:\n\t\t\tcase 13901:\n\t\t\tcase 20000:\n\t\t\tcase 1305: // Dragon longsword\n\t\t\tcase 12904: // Toxic staff of the dead\n\t\t\tcase 16209: // Toxic staff of the dead\n\t\t\tcase 11791: // Staff of the dead\n\t\t\tcase 16272: // Toxic staff of the dead\n\t\t\tcase 22296: // Staff of light\n\t\t\tcase 15486:\n\t\t\tcase 22613: // Vesta's longsword osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7599);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7611);\n\t\t\t\tbreak;\n\t\t\tcase 11802:\n\t\t\tcase 11806:\n\t\t\tcase 11808:\n\t\t\tcase 11804:\n\t\t\tcase 20368: // Ags\n\t\t\tcase 20374: // Zgs\n\t\t\tcase 20372: // Sgs\n\t\t\tcase 20370: // Bgs\n\t\t\tcase 11838:\n\t\t\tcase 12808: // Sara's blessed sword.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7699);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7711);\n\t\t\t\tbreak;\n\t\t\tcase 3204:\n\t\t\t\t// d hally\n\t\t\t\tplayer.getPA().sendFrame171(0, 8493);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 8505);\n\t\t\t\tbreak;\n\t\t\tcase 1377:\n\t\t\t\t// d battleaxe\n\t\t\t\tplayer.getPA().sendFrame171(0, 7499);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7511);\n\t\t\t\tbreak;\n\n\t\t\tcase 12848:\n\t\t\tcase 13576:\n\t\t\tcase 21015: // Dinh's bulwark\n\t\t\tcase 16259:\n\t\t\t\tplayer.getPA().sendFrame171(0, 7474);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7486);\n\t\t\t\tbreak;\n\t\t\tcase 1249:\n\t\t\tcase 11824:\n\t\t\t\t// dspear //zammy spear\n\t\t\tcase 13905:\n\t\t\tcase 13907:\n\t\t\tcase 11889: // Zamorakian hasta\n\t\t\tcase 22610: // Vesta's spear osrs\n\t\t\t\tplayer.getPA().sendFrame171(0, 7674);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7686);\n\t\t\t\tbreak;\n\n\t\t\tcase 12926: // Toxic blowpipe.\n\t\t\t\tplayer.getPA().sendFrame171(0, 7649);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7661);\n\t\t\t\tbreak;\n\n\t\t\tcase 1215:\n\t\t\t\t// dragon dagger\n\t\t\tcase 1231:\n\t\t\tcase 5680:\n\t\t\tcase 5698:\n\t\t\tcase 13271: // Abyssal dagger.\n\t\t\tcase 21009: // Dragon sword\n\t\t\t\tplayer.getPA().sendFrame171(0, 7574);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7586);\n\t\t\t\tbreak;\n\t\t\tcase 1434:\n\t\t\tcase 10887:\n\t\t\t\t// dragon mace\n\t\t\tcase 11061: // Ancient mace\n\t\t\t\tplayer.getPA().sendFrame171(0, 7624);\n\t\t\t\tCombatInterface.specialAmount(player, weapon, player.getSpecialAttackAmount(), 7636);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tplayer.getPA().sendFrame171(1, 7649);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7674);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7800);\n\t\t\t\tplayer.getPA().sendFrame171(1, 7624); // mace interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7474); // hammer, gmaul\n\t\t\t\tplayer.getPA().sendFrame171(1, 7499); // axe\n\t\t\t\tplayer.getPA().sendFrame171(1, 7549); // bow interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7574); // sword interface\n\t\t\t\tplayer.getPA().sendFrame171(1, 7599); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 7699); // scimmy sword interface, for most swords.\n\t\t\t\tplayer.getPA().sendFrame171(1, 8493);\n\t\t\t\tplayer.getPA().sendFrame171(1, 12323); // whip interface\n\n\t\t\t\tshowCombatInterface(player, weapon);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void addWeapon(CardWeapon cw)\n {\n this.weapons.add(cw);\n }", "public String getWeapon() {\n return weapon1;\n }", "public void purchaseTower(Tower towerType){ //This method will pruchase a tower from the player class given a Attacker Object\n if(this.coins()<towerType.getPrice()){ //checks to make sure that the player has neough money, if not it returns\n return;\n }\n\n myGame.addTower(Tower towerType); //calls the addTower method from the game class. Game will be resopnsible for storing towers not the player class\n this.coins-=towerType.getPrice(); //decrement the appropriate number of coins after purchsing the tower\n }", "private void buyItem(ShopItem item) {\n int gold = world.getCharacter().getGold().get();\n if (world.isSurvivalMode() && item.getName().equals(\"Potion\")){\n this.potionNum = 0;\n System.out.println(\"This shop has 0 Potion left.\");\n }\n if (world.isBerserkerMode() && \n (item.getName().equals(\"Helmet\")\n || item.getName().equals(\"Shield\")\n || item.getName().equals(\"Armour\"))){\n this.defenseNum = 0;\n System.out.println(\"This shop has 0 defensive item left.\");\n }\n if (item.getPrice() > gold) {\n System.out.println(\"You don't have enough money.\");\n }\n loadItem(item.getName());\n world.getCharacter().setGold(gold - item.getPrice());\n System.out.println(\"You have bought Item : \" + item.getName() + \".\");\n }", "public Weapon(Weapon weapon) \n\t{\n\t\tsuper(weapon.getName());\n\t\tweaponDamage = weapon.getWeaponDamage();\n\t}", "private void itemIntersectsPlayer(Entity item){\n WeaponComponent weaponComponent = player.weaponComponent;\n HealthComponent healthComponent = (HealthComponent) player.getComponent(ComponentType.HEALTH);\n\n EntityType type = item.getEntityType();\n\n\n switch (type){\n\n case ASSAULT_RIFLE:\n AssaultRifle rifle = (AssaultRifle) item;\n rifle.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(rifle);\n break;\n\n case SHOTGUN:\n Shotgun shotgun = (Shotgun) item;\n shotgun.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(shotgun);\n break;\n\n case SWORD:\n Sword sword = (Sword) item;\n sword.setInInventory(true);\n weaponComponent.addWeapon(item);\n room.getEntityManager().removeEntity(sword);\n break;\n\n\n case SHIELD:\n Shield shield = (Shield) item;\n shield.setInInventory(true);\n healthComponent.setHasShield(true);\n room.getEntityManager().removeEntity(shield);\n break;\n\n case SPEEDBOOST:\n SpeedBoost speedBoost = (SpeedBoost) item;\n speedBoost.setInInventory(true);\n player.startBoost(10000);\n room.getEntityManager().removeEntity(speedBoost);\n break;\n\n case HEART:\n Heart heart = (Heart) item;\n heart.setInInventory(true);\n healthComponent.incrementCurrentHealth();\n //do player logic here\n room.getEntityManager().removeEntity(heart);\n break;\n\n\n }\n\n\n }", "public PickupWeaponBase(Vec2 position, WeaponBase weaponBarrel) {\n super(position, Vec2.ZERO, new Sprite(\"items/weaponBody\"));\n setSize(new Vec2(0.7, 0.7));\n setRenderLayer(RenderLayer.RenderLayerName.HIGH_BLOCKS);\n\n this.cli = weaponBarrel;\n\n collider = new CircleCollider(this, 30);\n collider.setTag(\"Item\");\n collider.addInteractionLayer(\"Walk\");\n\n }", "public WeaponType getEquippedWeaponType() {\n return WeaponType.NULL;\n }", "public void fire(Vector2 dir, Vector2 weaponPos, Boolean multiplayer) {\n\t\t\n\t}", "public void equipHero() {\n\t\ttipo = 'A';\n\t}", "public void triggerInteraction(Player p, Tile newTile) {\n\t\tTile playerTil = p.getTile();\n\t\tGameObject object = newTile.getGameObject();\n\t\tif (object instanceof Item) {\n\t\t\tif (!p.inventoryIsFull()) {\n\t\t\t\tif (object instanceof Key) {\n\t\t\t\t\tint keyCount = 0;\n\t\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\t\t\tkeyCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keyCount >= PLAYER_KEY_LIMIT) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"You already have 3 keys, Harambe does not appreciate your greed, sharpen up soldier!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tp.pickUpItem((Item) object);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t}\n\t\t} else if (object instanceof Chest) {\n\t\t\tChest c = (Chest) object;\n\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\tKey k = ((Key) i);\n\t\t\t\t\tif (k.getCode() == c.getCode()) {\n\t\t\t\t\t\tif (c.getContents() != null) {\n\t\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\t\tp.pickUpItem(c.getContents());\n\t\t\t\t\t\t\tc.setContents(null);\n\t\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\t\"With the chest you recognise a distinct glow, a Banana!\", p);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\"You don't have a key with the correct code to open this chest soldier!\", p);\n\n\t\t} else if (object instanceof Door) {\n\t\t\tDoor door = (Door) object;\n\t\t\tp.getTile().setGameObject(null);\n\t\t\tp.setLocation(door.getLocationID());\n\t\t\tp.setTile(p.getLocation().getTileAtPosition(door.getDoorPosition()));\n\t\t\tp.getTile().setGameObject(p);\n\n\t\t} else if (object instanceof NPC) {\n\t\t\tif (!nightTime) {\n\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\tif (i instanceof Fish) {\n\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\tp.pickUpItem(new Banana(\"Banana\"));\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"The Pretty Penguin was overwhelmed as you handed her the fish, in response she gave you a golden reward!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"The Pretty Penguin did not offer a response, consider offering her a present\", p);\n\t\t\t}else{\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"Ssssh!, Harambe does not approve of your intentions to wake a sleeping woman\", p);\n\t\t\t}\n\t\t}\n\t}", "public Weapon getWeapon() {\n\t\treturn weapon;\n\t}", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "public final void give(final Player player) {\n\t\tplayer.getInventory().addItem(this.getItem());\n\t}", "public boolean colidesWith(Weapon w){\n\t\tthis.setBounds((int) x, (int)y, Tile.size, Tile.size);\n\t\tRectangle weapon = new Rectangle();\n\t\tweapon.setBounds((int)w.getX(), (int)w.getX(), (int)w.getWidth(), (int)w.getHeight());\n\t\treturn this.intersects(weapon);\n\t}", "@RequiredObject(\"whetstone\")\n\tpublic Response whet(Entity actor, @Carried Weapon weapon) throws ActionException {\n\t\t// Check can be whetted\n\t\tif(!weapon.descriptor().damage().type().isWhetWeapon()) throw ActionException.of(\"whet.invalid.weapon\");\n\t\tif(!weapon.isDamaged()) throw ActionException.of(\"whet.not.damaged\");\n\n\t\t// Create stamina modifier\n\t\t// TODO - tx can only be used once!\n\t\tfinal Transaction transaction = actor.model().values().transaction(EntityValue.STAMINA, 1, \"whet.exhausted\");\n\t\ttransaction.check();\n\n\t\t// Create repeating whet induction\n\t\tfinal Induction induction = () -> {\n\t\t\t// Consume stamina\n\t\t\ttransaction.check();\n\t\t\ttransaction.complete();\n\n\t\t\t// Stop when fully whetted\n\t\t\tweapon.repair(1);\n\t\t\tif(!weapon.isDamaged()) throw ActionException.of(\"whet.finished\");\n\n\t\t\treturn Response.EMPTY;\n\t\t};\n\n\t\t// Build response\n\t\tfinal Induction.Descriptor descriptor = new Induction.Descriptor.Builder()\n\t\t\t.period(duration)\n\t\t\t.flag(Induction.Flag.SPINNER)\n\t\t\t.flag(Induction.Flag.REPEATING)\n\t\t\t.build();\n\t\treturn Response.of(new Induction.Instance(descriptor, induction));\n\t}", "public String loseWeapon(String comp1Choice, String comp2Choice) {\n\n\t\t// Make two lists, one that contains the choices made and other with all weapons\n\t\tList<String> chosenWeaps = Arrays.asList(comp1Choice, comp2Choice);\n\t\tList<String> allWeaps = Arrays.asList(\"Rock\", \"Paper\", \"Scissors\");\n\n\t\t// Combine the two lists together in a union\n\t\tList<String> union = new ArrayList<String>(chosenWeaps);\n\t\tunion.addAll(allWeaps);\n\n\t\t// Find where they intersect, aka find where they both have the same\n\t\t// variables inside\n\t\tList<String> intersection = new ArrayList<String>(chosenWeaps);\n\t\tintersection.retainAll(allWeaps);\n\n\t\t// Remove everything that matches\n\t\tunion.removeAll(intersection);\n\n\t\tString newCompWeap = \"\";\n\n\t\t// Iterating through the union array\n\t\tfor (String newWeapon : union) {\n\n\t\t\tswitch (newWeapon) {\n\t\t\tcase \"Rock\":\n\t\t\t\tweapon = new Rock();\n\t\t\t\tbreak;\n\t\t\tcase \"Paper\":\n\t\t\t\tweapon = new Paper();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tweapon = new Scissors();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tnewCompWeap = newWeapon;\n\t\t}\n\n\t\treturn newCompWeap;\n\t}", "public Weapon getWeapon(int position, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].getWeapon(position);\r\n\t\treturn null;\t\r\n\t}", "public void changeWeapon(Graphics graphics) {\r\n\t\tlevelManager.changeWeapon(graphics);\r\n\t}", "public abstract void use(PlayerCharacter character);", "boolean useVoicedCommand(String command, Player activeChar, String target);", "public boolean addWeapon(Weapon wp, int row, int col)\r\n\t{\r\n\t\tif(row < rows && row >= 0 && col < columns && col >= 0)\r\n\t\t\treturn cells[row][col].addWeapon(wp);\r\n\t\treturn false;\r\n\t}", "public void attackTargetCharacter() {\n }", "public static boolean useWrench (String item, Tile tile, Player player) {\n Validation v = new Validation();\n //If not holding wrench\n if (!v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\")) {\n //If player on 2C\n if(tile.gettIntractable().equalsIgnoreCase(\"pipeline\")){\n System.out.println(\"If you had a tool you might be able to fix the pipe\");\n }else\n System.out.println(\"I'm not holding an item like that\");\n return false;\n }\n //If wrench is in inventory and on 2C\n else if(v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\") && tile.gettIntractable().equalsIgnoreCase(\"pipeline\")) {\n System.out.println(\"You use the wrench to fix the pipe\");\n calculateDamage(player, tile);\n return true;\n }\n //If wrench is in inventory and not on 2C\n else if (v.validateInput(item, player.getInventory()).equalsIgnoreCase(\"wrench\") && !tile.gettIntractable().equalsIgnoreCase(\"pipeline\")){\n System.out.println(\"I'm not sure what I would use that for here\");\n return false;\n } else\n return false;\n }", "@RequiredObject(\"whetstone\")\n\tpublic Response whet(Entity actor) throws ActionException {\n\t\tfinal Weapon weapon = actor.contents().equipment().weapon().orElseThrow(() -> ActionException.of(\"whet.requires.weapon\"));\n\t\treturn whet(actor, weapon);\n\t}", "public void attack(Person victim)\r\n { \r\n int victimDef = 0;\r\n int hits = 0;\r\n String weaponName = \"bare hands\";\r\n \r\n victimDef = victim.getDef();\r\n \r\n //1/4 chance of critical or twice damage \r\n hits = (attack - victimDef) + (int)((Math.random()*(attack*.3))-(attack*.15));\r\n if (hits < 0)\r\n hits = 0;\r\n \r\n if (weapon!=null)\r\n weaponName = weapon.getName();\r\n \r\n //1/6 chance of missing when attacking\r\n if (!victim.equals(this))\r\n {\r\n if(Game.random(6)!=0)\r\n {\r\n //1/4 chance of double damage\r\n if (Game.random(8)!=0)\r\n say(\"I attack \" + victim.getName() + \" with my \" + weaponName);\r\n else \r\n {\r\n say(\"I inflict critical damage on \" + victim.getName() + \" with my \" + weaponName);\r\n hits += hits;\r\n }\r\n victim.suffer(hits);\r\n }\r\n else\r\n say(\"AHHH I attacked, but \" + victim.getName() + \" dodged my attack!\");\r\n }\r\n \r\n //if victim dies, hero's maxHealth increases\r\n if (victim.getHealth()<=0)\r\n {\r\n maxHealth += 10;\r\n attack += 2;\r\n defense += 1;\r\n }\r\n }", "@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }", "public void useWheelChair(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Take who?\");\n }\n else{\n //if there are items in the rooms\n if(currentRoom.emptyRoom() == false){\n Item chairWheel = null;\n for(Item chairWheelItem : inventory){\n if(chairWheelItem.getId().equals(\"wheelchair\")){\n chairWheel = chairWheelItem;\n }\n }\n if(chairWheel != null){\n maxWeight = 100;\n Item patient = currentRoom.getItemRoom(secondWord);\n if(patient != null){\n patient.changePickUpItem(true);\n if(patient.canBePickedUp() == true){\n if((inventoryWeight + patient.getItemWeight()) <= maxWeight){\n //take current item\n inventory.add(patient);\n inventoryWeight += patient.getItemWeight();\n currentRoom.removeItem(patient.getId());\n System.out.println(\"You are moving the patient: \" + patient.getId() + \".\");\n }\n else{\n System.out.println(\"You canīt get over the max weight.\");\n }\n }\n else{\n System.out.println(\"This patient canīt be moved.\");\n }\n }\n else{\n System.out.println(\"This patient donīt exist.\");\n }\n }\n else{\n System.out.println(\"You havenīt the wheelchair in your inventory.\");\n }\n }\n else{\n System.out.println(\"There are no items to take in this room.\");\n }\n }\n }", "public static void updateEquipment(Player player) {\n\t\tCombat.updatePlayerStance(player);\n\t}" ]
[ "0.7484595", "0.72874904", "0.7281916", "0.70336413", "0.7013687", "0.6882019", "0.6805368", "0.67781645", "0.6776489", "0.6710464", "0.65073705", "0.64994884", "0.6464585", "0.64281136", "0.6419106", "0.64132917", "0.63248503", "0.6262601", "0.626219", "0.625429", "0.6209152", "0.6134117", "0.6124507", "0.611355", "0.6108669", "0.6107825", "0.60896385", "0.60807127", "0.6058463", "0.60410213", "0.60381335", "0.6018119", "0.60037863", "0.5999369", "0.59978455", "0.5961925", "0.5939952", "0.5920606", "0.5909756", "0.5905724", "0.58890384", "0.58887786", "0.5885133", "0.58849365", "0.5881195", "0.58487743", "0.58482516", "0.5828751", "0.58272153", "0.58210045", "0.5812407", "0.58019763", "0.5795972", "0.57852656", "0.5773001", "0.5769282", "0.57572377", "0.57492447", "0.5747918", "0.57472974", "0.5734058", "0.57274836", "0.5697938", "0.56935185", "0.56852496", "0.5661988", "0.5647755", "0.56293803", "0.56281203", "0.5617018", "0.56155723", "0.56011695", "0.55991757", "0.5599021", "0.5593058", "0.5592236", "0.5580392", "0.55791736", "0.5577739", "0.55770063", "0.5571528", "0.556816", "0.5562076", "0.5561557", "0.5555118", "0.5552123", "0.5549372", "0.5545146", "0.5543837", "0.55418414", "0.5539392", "0.55393595", "0.55361295", "0.5512707", "0.5511269", "0.5507611", "0.55055994", "0.5504731", "0.55000794", "0.54907894" ]
0.85619754
0
/ Show all the different kind of sorting algorithm by applying into (num array). Display the execution time for each sorting.Example in below. Use any databases[MongoDB, Oracle or MySql] to store data and retrieve data. At the end. After running all the sorting algo, come to a conclusion which one is suitable on given data set.
public static void main(String[] args) throws Exception { int [] num = new int[10]; storeRandomNumbers(num); ConnectToSqlDB connectToSqlDB = new ConnectToSqlDB(); String DATABASE_URL = "jdbc:mysql://localhost:3306/SortingNumbers"; Connection connection; Statement statement; ResultSet resultSet; String query; public ConnectToSqlDB() { try{ //connect to the database and create the Prepared Statements //latest version jdbc driver Class.forName("com.mysql.cj.jdbc.Driver"); connection=DriverManager.getConnection(DATABASE_URL,"root","christniru"); statement=connection.createStatement(); }catch(Exception e){ System.out.println(e);} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}", "private static String testSorts(int[] arr) {\n\t\tint[] initial = arr.clone();\n\t\tdouble start;\n\t\tdouble[] heapTime = new double[10];\n\t\tdouble[] quickTime = new double[10];\n\t\tdouble[] mergeTime = new double[10];\n\t\t\n\t\tfor (int i=0; i < 10; i++){ //runs 10 times\n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t Sorting.heapSort(arr);\n\t heapTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.quickSort(arr); \n\t quickTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.mergeSort(arr); \n\t mergeTime[i] = System.nanoTime()-start;\n\t\t}\n\t\t\n\t double heapMean= meanVal(heapTime) ;\n\t double quickMean= meanVal(quickTime);\n\t double mergeMean= meanVal(mergeTime);\n\t \n\t String result = \"Means | HeapSort: \" +heapMean + \" QuickSort: \" + quickMean + \" MergeSort: \" + mergeMean + \"\\n\" + \n\t \"Variance| HeapSort: \"+ varianceVal(heapTime, heapMean)+ \" QuickSort: \" + varianceVal(quickTime, quickMean)+\n\t \" MergeSort: \" +varianceVal(mergeTime, mergeMean);\n\t \n\t return result;\n\t\t\n\t}", "public static void main(String[] args) {\n for (int N = 100; N <= 100000; N *= 10) {\n int[] nums = new int[N];\n Random random = new Random();\n for (int i = 0; i < N; i++) {\n nums[i] = random.nextInt(N * 10);\n }\n Long start = 0L, end = 0L;\n int[] quickSortArray = Arrays.copyOf(nums, nums.length);\n int[] InsertSortArray = Arrays.copyOf(nums, nums.length);\n int[] shellSortArray = Arrays.copyOf(nums, nums.length);\n int[] bubbleSortArray = Arrays.copyOf(nums, nums.length);\n int[] selectionSortArray = Arrays.copyOf(nums, nums.length);\n int[] mergeSortArray = Arrays.copyOf(nums, nums.length);\n System.out.println(\"数据量为:\" + N);\n start = System.currentTimeMillis();\n QuickSort.quickSort(quickSortArray, 0, N - 1);\n end = System.currentTimeMillis();\n System.out.println(\"快速排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n InsertSort.insertSort(InsertSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"插入排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n ShellSort.shellSort(shellSortArray, 8);\n end = System.currentTimeMillis();\n System.out.println(\"希尔排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n BubbleSort.bubbleSort(bubbleSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"冒泡排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n SelectionSort.selectionSort(selectionSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"选择排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n MergeSort.mergeSort(mergeSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"归并排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n }\n }", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "public static void main(String[] args)\n {\n //reading the size of array\n Scanner in = new Scanner(System.in);\n int size = 0;\n System.out.println(\"Enter the size of the array\\n\");\n size = in.nextInt();\n\n // creating a random array of given size\n Random rd = new Random();\n int[] array = new int[size];\n for (int i = 0; i < array.length; i++)\n array[i] = rd.nextInt(size);\n\n //System.nanoTime() is used to calculate the time taken by the algorithm to multiply the numbers\n //implementing selection sort and timing the performance\n final long startTimeS = System.nanoTime();\n selectionSort(array);\n System.out.print(\"Sorted array via selection sort: \");\n printArray(array);\n final long elapsedTimeS = System.nanoTime() - startTimeS;\n System.out.println(\"The time taken: \" + elapsedTimeS);\n\n //implementing bogo sort and timing the performance\n final long startTime = System.nanoTime();\n bogoSort(array);\n System.out.print(\"Sorted array via bogo sort: \");\n printArray(array);\n final long elapsedTime = System.nanoTime() - startTime;\n System.out.println(\"The time taken: \" + elapsedTime);\n\n //implementing insertion sort and timing the performance\n final long startTimeI = System.nanoTime();\n insertSort(array);\n System.out.print(\"Sorted array via insertion sort: \");\n printArray(array);\n final long elapsedTimeI = System.nanoTime() - startTimeI;\n System.out.println(\"The time taken: \" + elapsedTimeI);\n\n //implementing merge sort and timing the performance\n final long startTimeM = System.nanoTime();\n mergeSort(array, size);\n System.out.print(\"Sorted array via merge sort: \");\n printArray(array);\n final long elapsedTimeM = System.nanoTime() - startTimeM;\n System.out.println(\"The time taken: \" + elapsedTimeM);\n\n //implementing enhanced merge sort and timing the performance\n final long startTimeEm = System.nanoTime();\n enhancedMergeSort(array, size);\n System.out.print(\"Sorted array via enhanced merge sort: \");\n printArray(array);\n final long elapsedTimeEm = System.nanoTime() - startTimeEm;\n System.out.println(\"The time taken: \" + elapsedTimeEm);\n\n //implementing quick sort and timing the performance\n final long startTimeQ= System.nanoTime();\n quickSort(array);\n System.out.print(\"Sorted array via quick sort: \");\n printArray(array);\n final long elapsedTimeQ = System.nanoTime() - startTimeQ;\n System.out.println(\"The time taken: \" + elapsedTimeQ);\n\n //implementing enhanced quick sort and timing the performance\n final long startTimeEq = System.nanoTime();\n enhancedQuickSort(array);\n System.out.print(\"Sorted array via enhanced quick sort: \");\n printArray(array);\n final long elapsedTimeEq= System.nanoTime() - startTimeEq;\n System.out.println(\"The time taken: \" + elapsedTimeEq);\n\n }", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "private void timedSort(SortingAlgorithm algo) throws Exception {\n algo.insertArray(intSelect.getArray());\n long start = System.nanoTime();\n algo.sort();\n long elapsedTime = System.nanoTime() - start;\n\n System.out.print(\"\\n\" + algo + \":\" + elapsedTime / 1000000.0 + \"ms\");\n if (showArray) {\n System.out.println(\" \" + Arrays.toString(algo.getSortTarget()));\n }\n System.out.println();\n }", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }", "public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}", "private void Sort(int[] list)\r\n {\r\n switch (SortField.getText())\r\n {\r\n case \"Insertion Sort\":\r\n {\r\n InsertionSort insertionSort = new InsertionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n insertionSort.insertionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(insertionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(insertionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*2)\");\r\n\r\n break;\r\n }\r\n case \"Selection Sort\":\r\n {\r\n SelectionSort selectionSort = new SelectionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n selectionSort.selectionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(selectionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(selectionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n2)\");\r\n\r\n break;\r\n }\r\n case \"Quick Sort\":\r\n {\r\n QuickSort quickSort = new QuickSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n quickSort.quickSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(quickSort.getComparisons()));\r\n MovementField.setText(String.valueOf(quickSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n log n)\");\r\n\r\n break;\r\n }\r\n case \"Merge Sort\":\r\n {\r\n MergeSort mergeSort = new MergeSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n mergeSort.mergeSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(mergeSort.getComparisons()));\r\n MovementField.setText(String.valueOf(mergeSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"T(n) = 2T(n/2) + θ(n)\");\r\n\r\n break;\r\n }\r\n case \"Heap Sort\":\r\n {\r\n HeapSort heapSort = new HeapSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n heapSort.heapSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(heapSort.getComparisons()));\r\n MovementField.setText(String.valueOf(heapSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(nLogn)\");\r\n\r\n break;\r\n }\r\n case \"Radix Sort\":\r\n {\r\n RadixSort radixSort = new RadixSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n radixSort.radixSort(list, Integer.parseInt(SizeField.getText()));\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(\"Radix Sort has 0 comparisons\");\r\n MovementField.setText(String.valueOf(radixSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(kn)\");\r\n\r\n break;\r\n }\r\n\r\n case \"Bubble Sort\":\r\n {\r\n BubbleSort bubbleSort = new BubbleSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n bubbleSort.bubbleSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(bubbleSort.getComparisons()));\r\n MovementField.setText(String.valueOf(bubbleSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*n)\");\r\n\r\n break;\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n int sampleArray[] = arrayInitializer(15000);\n SortArray testArray = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray.toString());\n\n // Sort the array with Bubbles method\n long startTime = System.currentTimeMillis();\n testArray.sortArray();\n long stopTime = System.currentTimeMillis();\n System.out.println(\"Sorted by Bubbles method array is:\");\n //System.out.println(testArray.toString());\n showTime(\"Bubbles sorting took: \", startTime, stopTime);\n\n // Sort the array with Binary Tree method\n SortArray testArray2 = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray2.toString());\n\n System.out.println(\"Sorted by Binary tree method array is:\");\n startTime = System.currentTimeMillis();\n testArray2.sortArrayBinaryTree();\n stopTime = System.currentTimeMillis();\n //System.out.println(testArray2.toString());\n showTime(\"Tree sorting took: \", startTime, stopTime);\n System.out.println(\"Job is done!\");\n }", "public static void main(String[] args){\n\t\t\n\t\tdouble selectionTime, mergeTime, quickTime; \n\t\t\n\t\tSystem.out.println(\"Running All Sorting Algorithms on smaller arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tSelection\\t Merge\\t Quick\\n\");\n\t\t\n\t\t// sort arrays with lengths from *sizes* array (selection, merge & quick)\n\t\tfor (int num = 0; num < sizes.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(sizes[num],0,Integer.MAX_VALUE-1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tselectionTime \t = testSelectionSort(list);\n\t\t\tmergeTime \t = testMergeSort(list);\n\t quickTime \t = testQuickSort(list);\n\t \n\t // generate output (average time for each algo)\n\t System.out.printf(\"%s\\t%.2f\\t\\t %.2f\\t %.2f\\n\",sizes[num],selectionTime,mergeTime,quickTime);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nRunning Merge & Quick Sort Algorithms on big arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tMergeSort\\tQuickSort\\n\");\n\t\t\n\t\t// sort arrays with lengths from *bigger* array (merge & quick)\n\t\tfor (int num = 0; num < bigger.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(bigger[num],0, Integer.MAX_VALUE - 1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tmergeTime \t\t = testMergeSort(list);\n\t\t\tquickTime \t\t = testQuickSort(list);\n\t\t\t\n\t\t\t// generate output (average time for each algo)\n\t\t\tSystem.out.printf(\"%s\\t%.2f\\t\\t%.2f\\n\",bigger[num],mergeTime,quickTime);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException{\n final int ELEMENT_SIZE = 1000;\n \n // How large (how many elements) the arrays will be\n int dataSize = 0;\n // How many times the program will run\n int trials = 1;\n // User-inputted number that dictates what sort the program will use\n int sortSelector = 0;\n // Variables for running time caculations\n long startTime = 0;\n long endTime = 0;\n long duration = 0;\n // The longest time a sort ran, in seconds\n double maxTime = 0;\n // The fastest time a sort ran, in seconds\n double minTime = Double.MAX_VALUE;\n // The average time a sort ran, running \"trials\" times\n double average = 0;\n // A duration a sort ran, in seconds\n double durationSeconds = 0;\n\n Scanner reader = new Scanner(System.in);\n \n System.out.println(\"Please enter a size for the test array: \");\n dataSize = reader.nextInt();\n \n System.out.println(\"Please enter the amount of times you would like the sort to run: \");\n trials = reader.nextInt();\n // Slection menu for which sort to run\n System.out.println(\"Please designate the sorting algorithim you would like the program to use: \");\n System.out.println(\"Enter \\\"1\\\" for BubbleSort \");\n System.out.println(\"Enter \\\"2\\\" for SelectionSort \");\n System.out.println(\"Enter \\\"3\\\" for InsertionSort \");\n System.out.println(\"Enter \\\"4\\\" for QuickSort \");\n System.out.println(\"Enter \\\"5\\\" for MergeSort \");\n sortSelector = reader.nextInt();\n // Print sorting results header and begin running sort(s)\n System.out.println();\n System.out.println(\"Trial Running times (in seconds): \");\n \n int[] original = new int[dataSize];\n int[] sortingArray = new int[dataSize];\n \n // This loop controls the amount of times a sorting algorithim will run\n for(int i = 1; i <= trials; i++){\n // Start by generating test array\n for(int j = 0; j < dataSize; j++){\n original[j] = (int)((Math.random() * ELEMENT_SIZE) + 1);\n }\n // Copy the original to a working array\n for(int j = 0; j < dataSize; j++){\n sortingArray[j] = original[j];\n }\n // Start the \"timer\"\n startTime = System.nanoTime();\n // Run whatever sort the user selected, BubbleSort is default\n switch(sortSelector){\n case 1:\n BubbleSort.runSort(sortingArray);\n break;\n case 2:\n SelectionSort.runSort(sortingArray);\n break;\n case 3:\n InsertionSort.runSort(sortingArray);\n break;\n case 4:\n QuickSort.runSort(sortingArray);\n break;\n case 5:\n MergeSort.runSort(sortingArray);\n break;\n default:\n BubbleSort.runSort(sortingArray);\n break;\n }\n // End the \"timer\"\n endTime = System.nanoTime();\n // Generate the program's running duration\n duration = endTime - startTime;\n // Convert running time to seconds\n durationSeconds = ((double)duration / 1000000000.0);\n // Print the duration (to file)\n System.out.println(durationSeconds);\n // Update min/max running times\n if(durationSeconds < minTime){\n minTime = durationSeconds;\n }\n if(durationSeconds > maxTime){\n maxTime = durationSeconds;\n }\n // Add latest trial to running average\n average += durationSeconds;\n }\n // After trials conclude, the average running time has to be calculated\n average /= ((double)trials);\n \n System.out.println(\"\\nAfter running your selected sort \" + trials + \" times: \");\n System.out.println(\"The slowest sort took \" + maxTime + \" seconds, \");\n System.out.println(\"the fastest sort took \" + minTime + \" seconds, \");\n System.out.println(\"and the average running time was \" + average + \" seconds. \");\n \n // Left this in for testing the sorting algorithims themselves\n /*\n System.out.println();\n for(int element : original){\n System.out.println(element);\n }\n System.out.println();\n for(int element : sortingArray){\n System.out.println(element);\n }\n */\n }", "public static void main(String[] args) throws IOException {\n\t\tint[] hundredRand = new int[100]; \n\t \t for(int i = 0; i < hundredRand.length; i++) {\n\t \thundredRand[i] = (int)(Math.random()*100 + 1);\n\t }\t \n\t //Generating 1000 Random numbers\n\t int[] ThousandRand = new int[1000]; \n\t for(int i = 0; i < ThousandRand.length; i++) {\n\t \tThousandRand[i] = (int)(Math.random()*1000 + 1);\n\t }\t\n\t //Generating 10,000 Random integers\n\t int[] TenThousandRand = new int[10000]; \n\t for(int i = 0; i < TenThousandRand.length; i++) {\n\t \tTenThousandRand[i] = (int)(Math.random()*10000 + 1);\n\t }\t\n\t //Generating 1,00,000 Random integers\n\t int[] onelakhRand = new int[100000]; \n\t for(int i = 0; i < onelakhRand.length; i++) {\n\t \tonelakhRand[i] = (int)(Math.random()*100000 + 1);\n\t }\t\n\t \n\t //Time needed to sort hundred random integers using Bubble sort\t\n\t long hunBubbleSortStart =System.nanoTime();\n\t BubbleSort(hundredRand);\n\t long hunBubbleSortEnd=System.nanoTime();\n\t long hunBubble=hunBubbleSortEnd-hunBubbleSortStart;\n\t \n\t //Time needed to sort hundred random integers using Insertion sort\n\t long hunInsertionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunInsertionSortEnd=System.nanoTime();\n\t long hunInsertion=hunInsertionSortEnd-hunInsertionSortStart;\n\n\t //Time needed to sort hundred random integers using Selection sort\n\t long hunSelectionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunSelectionSortEnd=System.nanoTime();\n\t long hunSelection=hunSelectionSortEnd-hunSelectionSortStart;\n\t \n\t //Time needed to sort Hundred random integers using Merge sort\n\t long hunMergeSortStart =System.nanoTime();\n\t mergeSort(hundredRand);\n\t long hunMergeSortEnd=System.nanoTime();\n\t long hunMerge=hunMergeSortEnd-hunMergeSortStart;\n\t \n\t //Time needed to sort hundred random integers using Heap sort\t\n\t long hunHeapSortStart =System.nanoTime();\n\t HeapSort(hundredRand);\n\t long hunHeapSortEnd=System.nanoTime();\n\t long hunHeap=hunHeapSortEnd-hunHeapSortStart;\n\t \n\n\t //Time needed to sort Hundred random integers using Quick sort\n\t long hunQuickSortStart =System.nanoTime();\n\t QuickSort(hundredRand);\n\t long hunQuickSortEnd=System.nanoTime();\n\t long hunQuick=hunQuickSortEnd-hunQuickSortStart;\n\n\t //Time needed to sort Thousand Random Integers using Bubble Sort\n\t long ThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(ThousandRand);\n\t long ThousandBubbleSortEnd=System.nanoTime();\n\t long ThousandBubble=ThousandBubbleSortEnd-ThousandBubbleSortStart;\n\t \n\t //Time needed to sort Thousand random integers using Insertion sort\n\t long ThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(ThousandRand);\n\t long ThousandInsertionSortEnd=System.nanoTime();\n\t long ThousandInsertion=ThousandInsertionSortEnd-ThousandInsertionSortStart;\n\n\t //Time needed to sort Thousand random integers using Selection sort\n\t long ThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(ThousandRand);\n\t long ThousandSelectionSortEnd=System.nanoTime();\n\t long ThousandSelection=ThousandSelectionSortEnd-ThousandSelectionSortStart;\n\t \n\t //Time needed to sort Thousand Random Integers using Merge Sort\n\t long ThousandMergeSortStart =System.nanoTime();\n\t mergeSort(ThousandRand);\n\t long ThousandMergeSortEnd=System.nanoTime();\n\t long ThousandMerge=ThousandMergeSortEnd-ThousandMergeSortStart;\n\n\t\t //Time needed to sort Thousand Random Integers using Quick Sort\n\t\t long ThousandQuickSortStart =System.nanoTime();\n\t\t QuickSort(ThousandRand);\n\t\t long ThousandQuickSortEnd=System.nanoTime();\n\t\t long ThousandQuick=ThousandQuickSortEnd-ThousandQuickSortStart;\n\t\t \n\t\t //Time needed to sort Thousand Random Integers using HeapSort\n\t\t long ThousandHeapSortStart =System.nanoTime();\n\t\t HeapSort(ThousandRand);\n\t\t long ThousandHeapSortEnd=System.nanoTime();\n\t\t long ThousandHeap=ThousandHeapSortEnd-ThousandHeapSortStart;\n\t\t \n\t\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Bubble Sort\n\t long TenThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(TenThousandRand);\n\t long TenThousandBubbleSortEnd=System.nanoTime();\n\t long TenThousandBubble=TenThousandBubbleSortEnd-TenThousandBubbleSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Insertion sort\n\t long TenThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(TenThousandRand);\n\t long TenThousandInsertionSortEnd=System.nanoTime();\n\t long TenThousandInsertion=TenThousandInsertionSortEnd-TenThousandInsertionSortStart;\n\n\t //Time needed to sort TenThousand random integers using Selection sort\n\t long TenThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(TenThousandRand);\n\t long TenThousandSelectionSortEnd=System.nanoTime();\n\t long TenThousandSelection=TenThousandSelectionSortEnd-TenThousandSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long TenThousandMergeSortStart =System.nanoTime();\n\t mergeSort(TenThousandRand);\n\t long TenThousandMergeSortEnd=System.nanoTime();\n\t long TenThousandMerge=TenThousandMergeSortEnd-TenThousandMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long TenThousandQuickSortStart =System.nanoTime();\n\t QuickSort(TenThousandRand);\n\t long TenThousandQuickSortEnd=System.nanoTime();\n\t long TenThousandQuick=TenThousandQuickSortEnd-TenThousandQuickSortStart;\n\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Heap Sort\n\t long TenThousandHeapSortStart =System.nanoTime();\n\t HeapSort(TenThousandRand);\n\t long TenThousandHeapSortEnd=System.nanoTime();\n\t long TenThousandHeap=TenThousandHeapSortEnd-TenThousandHeapSortStart;\n\n\t //Time needed to sort oneLakh Random Integers using Bubble Sort\n\t long OnelakhBubbleSortStart =System.nanoTime();\n\t BubbleSort(onelakhRand);\n\t long OnelakhBubbleSortEnd=System.nanoTime();\n\t long OnelakhBubble=OnelakhBubbleSortEnd-OnelakhBubbleSortStart;\n\t \n\t //Time needed to sort oneLakh random integers using Insertion sort\n\t long OnelakhInsertionSortStart =System.nanoTime();\n\t Insertionsort(onelakhRand);\n\t long OnelakhInsertionSortEnd=System.nanoTime();\n\t long OnelakhInsertion=OnelakhInsertionSortEnd-OnelakhInsertionSortStart;\n\n\t //Time needed to sort OneLakhrandom integers using Selection sort\n\t long OnelakhSelectionSortStart =System.nanoTime();\n\t Selectionsort(onelakhRand);\n\t long OnelakhSelectionSortEnd=System.nanoTime();\n\t long OnelakhSelection=OnelakhSelectionSortEnd-OnelakhSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long OnelakhMergeSortStart =System.nanoTime();\n\t mergeSort(onelakhRand);\n\t long OnelakhMergeSortEnd=System.nanoTime();\n\t long OnelakhMerge=OnelakhMergeSortEnd-OnelakhMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long OnelakhQuickSortStart =System.nanoTime();\n\t QuickSort(onelakhRand);\n\t long OnelakhQuickSortEnd=System.nanoTime();\n\t long OnelakhQuick=OnelakhQuickSortEnd-OnelakhQuickSortStart;\n\t \n\t //Time needed to sort one Lakh Random Integers using Bubble Sort\n\t long OnelakhHeapSortStart =System.nanoTime();\n\t HeapSort(onelakhRand);\n\t long OnelakhHeapSortEnd=System.nanoTime();\n\t long OnelakhHeap=OnelakhHeapSortEnd-OnelakhHeapSortStart;\n\n\t \n\n\t File f = new File(\"Output.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(f.getAbsoluteFile()));\n\t\tbw.write(\"Array size \"+\"Bubble Sort(ns) \"+\"Insertion sort(ns) \"+\"Selection sort(ns) \"+\"Merge sort(ns) \"+\" Quick Sort(ns) \"+\" HeapSort(ns)\"+\"\\n\");\n\t\tbw.write(\"100 \"+hunBubble+\"(ns) \"+hunInsertion+\"(ns) \"+hunSelection+\"(ns)\t\t\"+hunMerge+\"(ns) \"+hunQuick+\"(ns)\"+\" \"+hunHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"1000 \"+ThousandBubble+\"(ns) \"+ThousandInsertion+\"(ns) \"+ThousandSelection+\"(ns)\t \t\"+ThousandMerge+\"(ns) \"+ThousandQuick+\"(ns)\"+\" \"+ThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"10000 \"+TenThousandBubble+\"(ns) \"+TenThousandInsertion+\"(ns)\t \"+TenThousandSelection+\"(ns) \"+TenThousandMerge+\"(ns) \"+TenThousandQuick+\"(ns)\"+\" \"+TenThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"100000 \"+OnelakhBubble+\"(ns) \"+OnelakhInsertion+\"(ns)\t \"+OnelakhSelection+\"(ns)\t\"+OnelakhMerge+\"(ns) \"+OnelakhQuick+\"(ns) \"+OnelakhHeap+\"(ns)\"+\"\\n\");\n\n\t\tbw.close();\n\t\n\n\t}", "public static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }", "public static void main(String[] args) {\n Integer[] s = {39, 20, 40, 1, 2, 3, 4, 5, 6, 7};\n Stopwatch timer = new Stopwatch();\n\n sort(s);\n\n double time = timer.elapsedTime();\n assert isSorted(s);\n StdOut.print(\"time: \" + time);\n StdOut.println();\n show(s);\n }", "public static void main(String[] args) {\n int[] inputSize={100000,300000,500000,700000,900000,1100000,1300000,1500000,1700000,1900000,};\n for (int i = 0; i < inputSize.length; i++) {\n System.out.println(\"for array of size \"+inputSize[i]);\n pass(inputSize[i]);\n System.out.println(\"************************************************\");\n \n }\n \n //result list \n System.out.println(\"The result running time (in milli second) for the size inputs: \\n100k,300k,300k,500k,700k,900k,1.1M, 1.3M, 1.5M, 1.7M, 1.9M\");\n System.out.print(\"Insertion Sort: \");\n for(Long a: insertionList )\n {\n System.out.print( a +\" \");\n }\n System.out.print(\"\\nMerge Sort: \");\n \n for(Long b: mergeList )\n {\n System.out.print( b +\" \");\n }\n System.out.print(\"\\nQuick Sort: \");\n for(Long c: quickList )\n {\n System.out.print( c +\" \");\n }\n System.out.println(\"\");\n \n \n // printArray(arr); \n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "public String stats()\n\t{\n\t\tString algo = null;//set up algo return null if error\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\talgo = \"SelectionSort\";\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\talgo = \"InsertionSort\";\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\talgo = \"MergeSort\";\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\talgo = \"QuickSort\";\n\t\t\tbreak;\n\t\t}\n\t\treturn algo + \"\\t\" + points.length + \"\\t\" + scanTime; \n\t}", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "public static void main(String[] args) {\n\t\tSelectionSort ss = new SelectionSort();\n\t\tInsertionSort is = new InsertionSort();\n\t\tint [] listToSort = ss.listToSort();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tis.insertionSort(listToSort);\n\t\tSystem.out.println(\"Time Taken to Sort :: \"+(System.currentTimeMillis()-startTime)+\"ms\");\n\t\tss.printList(listToSort);\n\n\t}", "public static void main(String[] args) {\n\n\t\tint num;\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor (;;) {\n\t\t\tnum = scan.nextInt();\n\t\t\tif (num == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint data[] = new int[num];\n\t\t\tRandom random = new Random();\n\t\t\tfor (int i = 0; i < num; i++) {\n\t\t\t\tdata[i] = random.nextInt(num);\n\t\t\t}\n\t\n\t\t\tint data1[] = Arrays.copyOf(data, num);\n\t\t\tint data2[] = Arrays.copyOf(data, num);\n\t\t\tint data3[] = Arrays.copyOf(data, num);\n\t\t\tint data4[] = Arrays.copyOf(data, num);\n\t\t\t System.out.println(\"原始数据:\");\n\t\t\tprintArray(data);\n\t\t\t// 测试冒泡\n\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.bubbleSort(data);\n\t\t\t System.out.println(\"冒泡排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data);\n\t\t\t// 测试选择\n\t\t\t currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.selectSort(data1);\n\t\t\t System.out.println(\"選擇排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data1);\n\t\t\t// 测试插入\n\t\t\t currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.insertSort(data2);\n\t\t\t System.out.println(\"插入排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data2);\n\t\t\t// 测试快排\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\tSortUtil.quickSort(data3, 0, data3.length - 1);\n\t\t\tSystem.out.println(\"快速排序用时间:\" + (System.currentTimeMillis() - currentTime));\n\t\t\tprintArray(data3);\n\t\t\t// 测试堆排\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\tSortUtil.heapSort(data4);\n\t\t\tSystem.out.println(\"堆排序用时间:\" + (System.currentTimeMillis() - currentTime));\n\t\t\tprintArray(data4);\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tStopwatch timer = new Stopwatch();\n \tString[] s1 = {\"LS3A3PS\",\"130N740\",\"53KD8Y60\",\"D48P1L3D\",\"Y7M\"};\n\t\tString[] s2 = {\"U45\",\"J6Y\",\"VRW\",\"L60\",\"ZVN\"};\n\t\tString[] s3 = {\"NCDJMN\",\"0BTWJ\",\"TK5FLT\",\"JNYJO\",\"C1LA9H\"};\n\t\tString[] s4 = {\"K32Z\",\"KJH6\",\"5G9O\",\"9JOL\",\"VJNY\"};\n\t\tString[] s5 = {\"3J4\",\"TFHX\",\"A5QOR4\",\"L7\",\"L9T7K8ZG\"};\n\t\t\n int n = s1.length;\n sort(s1);\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 1\\n\");\n for (int x = 0; x < n; x++) {\n \tStdOut.println(s1[x]);\n }\n StdOut.println();\n double time = timer.elapsedTime();\n \t\t//display the execution time second test\n \t\tStdOut.println(\"Execution time \" + time + \" seconds.\\n\");\n \n //start stop watch for second test\n Stopwatch timer2 = new Stopwatch();\n int n1 = s2.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 2\\n\");\n sort(s2);\n for (int x = 0; x < n1; x++) {\n \tStdOut.println(s2[x]);\n }\n StdOut.println();\n double time2 = timer2.elapsedTime();\n \t\t//display the execution time second test\n \t\tStdOut.println(\"Execution time \" + time2 + \" seconds.\\n\");\n \n //start stop watch for third test\n Stopwatch timer3 = new Stopwatch();\n int n2 = s3.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 3\\n\");\n sort(s3);\n for (int x = 0; x < n2; x++) {\n \tStdOut.println(s3[x]);\n }\n StdOut.println();\n double time3 = timer3.elapsedTime();\n \t\t//display the execution time third test\n \t\tStdOut.println(\"Execution time \" + time3 + \" seconds.\\n\");\n \n //start stop watch for fourth test\n Stopwatch timer4 = new Stopwatch();\n int n3 = s4.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 4\\n\");\n sort(s4);\n for (int x = 0; x < n3; x++) {\n \tStdOut.println(s4[x]);\n }\n StdOut.println();\n double time4 = timer4.elapsedTime();\n \t\t//display the execution time fourth test\n \t\tStdOut.println(\"Execution time \" + time4 + \" seconds.\\n\");\n \n //start stop watch for fifth test\n Stopwatch timer5 = new Stopwatch();\n int n4 = s5.length;\n StdOut.println(\"Asad Zaheer\\n\\nThree-way Quicksort Test 5\\n\");\n sort(s5);\n for (int x = 0; x < n4; x++) {\n \tStdOut.println(s5[x]);\n }\n StdOut.println();\n double time5 = timer5.elapsedTime();\n \t\t//display the execution time fifth test\n \t\tStdOut.println(\"Execution time \" + time5 + \" seconds.\\n\");\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public static void performSort(Integer[] list, String sortType) {\r\n // make a copy of unsorted list\r\n Integer[] listCopy = new Integer[list.length];\r\n System.arraycopy(list,0,listCopy,0,list.length);\r\n System.out.println(sortType);\r\n // choose sort method. start timer. sort list\r\n long start = 0, end=0;\r\n if(sortType.equals(\"bubbleSort\")){\r\n start = System.nanoTime();\r\n Sorting.bubbleSort(listCopy);\r\n end = System.nanoTime();\r\n }\r\n else if(sortType.equals(\"bubbleSort2\")){\r\n start = System.nanoTime();\r\n Sorting.bubbleSort2(listCopy);\r\n end = System.nanoTime();\r\n }\r\n else if(sortType.equals(\"shellSort\")){\r\n start = System.nanoTime();\r\n Sorting.shellSort(listCopy);\r\n end = System.nanoTime();\r\n }\r\n // end timer. calculate and print duration\r\n //long end = System.nanoTime();\r\n long duration = (end - start);\r\n System.out.println(\"time to sort: \" + duration + \" nanoseconds\");\r\n // print sorted list\r\n System.out.println(\"sorted list\");\r\n for(Integer i: listCopy){\r\n System.out.print(i + \" \");\r\n }\r\n System.out.println(\"\\n\");\r\n }", "public static void printSort(int[] num) {\n\t\tSystem.out.println(\"\");\n\t\tfor (int i = 0; i < num.length; i++) {\n\n\t\t\tSystem.out.println(num[i]);\n\n\t\t}\n\t\tfinal long endTime = System.currentTimeMillis();\n\t\tfinal long executionTime = endTime - startTime;\n\t\tSystem.out.println(\"Total Execution Time in ms : \" + executionTime + \" sec\");\n\t\tstartTime = System.currentTimeMillis();\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\tlong start;//Start time\r\n\t\tlong end; //End time\r\n\t\tlong elapsedTime;//Elapsed time\r\n\r\n\t\tSystem.out.println(\"\\tList of Sorting Techniques :\");\r\n\t\tSystem.out.println(\"\\t============================\");\r\n\t\tSystem.out.println(\"1.Binary Search Method for Integer.\");\r\n\t\tSystem.out.println(\"2.Binary Search Method for String.\");\r\n\t\tSystem.out.println(\"3.Insertion Sort Method for Integer.\");\r\n\t\tSystem.out.println(\"4.Insertin Sort Method for String.\");\r\n\t\tSystem.out.println(\"5.Bubble Sort Method for Integer.\");\r\n\t\tSystem.out.println(\"6.Bubble Sort Method for String.\");\r\n\r\n\t\tSystem.out.print(\"Enter You Choice : \");\r\n\t\tint choice = Utility.getInt();\r\n\t\t/**\r\n\t\t * getting user choice and responding \r\n\t\t */\r\n\t\tswitch(choice)\r\n\t\t{\r\n\t\t\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Binary Search Technique for Integer..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\r\n\t\t\tSystem.out.print(\"Enter the size of an Array : \");\r\n\t\t\tint []arr=Utility.createIntArr();\r\n\t\t\tUtility.bubbleSortInt(arr);\r\n\r\n\t\t\tSystem.out.print(\"Enter the element you want to search : \");\r\n\t\t\tint searchInt=Utility.getInt();\r\n\r\n\t\t\tint searchedIndex=Utility.binarySearchInt(arr, 0, arr.length-1, searchInt);\r\n\t\t\tif(searchedIndex!=-1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The searched Element \"+searchInt+\" Present in : \"+searchedIndex);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Not Found..!\");\r\n\t\t\t}\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Binary Search Technique for String..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\r\n\r\n\r\n\t\t\tString []strArr=Utility.createStrArr();\r\n\t\t\tUtility.stringBubbleSort(strArr);\r\n\t\t\tSystem.out.print(\"Enter the element you want to search : \");\r\n\t\t\tString search=Utility.getWord();\r\n\t\t\tint strSearchedIndex=Utility.stringBinarySearch(strArr, 0, search.length()-1, search);\r\n\r\n\t\t\tif(strSearchedIndex!=-1)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"The searched Element \"+search+\" Present in : \"+strSearchedIndex);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Not Found..!\");\r\n\t\t\t}\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Insertion Sort Technique for Integer..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\r\n\t\t\tSystem.out.print(\"Enter the size of an array : \");\r\n\t\t\tint[] createIntArr = Utility.createIntArr();\r\n\r\n\t\t\tSystem.out.println(\"Unsorted Array Integers \");\r\n\t\t\tSystem.out.println(\"=======================\");\r\n\t\t\tUtility.displayArr(createIntArr);\r\n\r\n\t\t\tSystem.out.println(\"Sorted Integer Array\");\r\n\t\t\tUtility.insertionSortInt(createIntArr);\r\n\t\t\tUtility.displayArr(createIntArr);\r\n\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Insertion Sort Technique for String..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\t\t\tString[] createStrArr = Utility.createStrArr();\r\n\r\n\t\t\tSystem.out.println(\"Unsorted Array Strings \");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tUtility.displayStrArr(createStrArr);\r\n\r\n\t\t\tSystem.out.println(\"Sorted String Array\");\r\n\t\t\tUtility.stringInsertionSort(createStrArr);\r\n\t\t\tUtility.displayStrArr(createStrArr);\r\n\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Bubble Sort technique for Integer..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\r\n\t\t\tSystem.out.print(\"Enter the size of an array : \");\r\n\t\t\tint[] createIntArr2 = Utility.createIntArr();\r\n\r\n\t\t\tSystem.out.println(\"Unsorted Array Integers \");\r\n\t\t\tSystem.out.println(\"=======================\");\r\n\t\t\tUtility.displayArr(createIntArr2);\r\n\r\n\t\t\tSystem.out.println(\"Sorted Integer Array\");\r\n\t\t\tUtility.bubbleSortInt(createIntArr2);\r\n\t\t\tUtility.displayArr(createIntArr2);\r\n\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"\\tYou Chosed Bubble Sort Technique for String..!\");\r\n\t\t\tSystem.out.println(\"Process Started..!\");\r\n\t\t\tstart=System.currentTimeMillis();\r\n\t\t\tString[] createStrArr2 = Utility.createStrArr();\r\n\r\n\t\t\tSystem.out.println(\"Unsorted Array Strings \");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tUtility.displayStrArr(createStrArr2);\r\n\r\n\t\t\tSystem.out.println(\"Sorted String Array\");\r\n\t\t\tUtility.stringInsertionSort(createStrArr2);\r\n\t\t\tUtility.displayStrArr(createStrArr2);\r\n\r\n\t\t\tend=System.currentTimeMillis();\r\n\t\t\tSystem.out.println(\"Process End..!\");\r\n\r\n\t\t\telapsedTime=(end-start)/1000;\r\n\t\t\tSystem.out.println(\"Elapsed Time is : \"+elapsedTime+\"seconds\");\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"You Chosed Wrong Option..!\");\r\n\t\t\r\n\t\t}\r\n\t}", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public static void main(String[] args) {\n SortSelection SelectionSort = new SortSelection();\n\n // mencetak data awal sebelum dilakukan sorting\n System.out.println(\"Data awal : \");\n\n // mendeklarsikan angka pada elenen array data bertipe data integer\n int data[] = {3, 10, 4, 6, 8, 9, 7, 2, 1, 5};\n\n // menampilkan function SelectionSort tampil dari array data\n SelectionSort.tampil(data);\n System.out.println();\n\n // memulai waktu jalannya proses program dengan currentTimeMillis\n long awal = System.currentTimeMillis();\n\n // proses perulangan untuk mengurutkan data menggunakan SelectionSort\n for (int i = 0; i < data.length; i++) {\n int min = i;\n for (int s = i + 1; s < data.length; s++) {\n if (data[s] < data[min]) {\n min = s;\n }\n }\n\n // menyimpan data hasil pengurutan pada variable array min\n int temp = data[min];\n data[min] = data[i];\n data[i] = temp;\n\n // mencetak data hasil SelectionSort\n System.out.println(\"index ke \" + i + \" dan index ke \" + min);\n SelectionSort.tampil(data);\n }\n System.out.println();\n\n // mencetak waktu sorting SelectionSort\n long waktu = System.currentTimeMillis() - awal;\n System.out.println(\"Waktu Sorting : \" + waktu);\n\n // Mencetak hasil akhit dari SelectionSort\n System.out.println(\"Hasil AKhir Sorting \");\n SelectionSort.tampil(data);\n }", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "static void sortAndCalculateTime(int[] A, int[] B) {\n\t\t// A random integer in the range 0 to 1\n\t\tint sortNum = (int)(Math.random() * 2);\n\t\t\n\t\t// if sortNum is 0 the Insertion method is used, otherwise the Selection one\n\t\tif(sortNum == 0) {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Insertion method\n\t\t\tinsertionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with insertionSort(): \" + runTime);\n\t\t} else {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Selection method\n\t\t\tselectionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with selectionSort(): \" + runTime);\n\t\t}\n\t\t\n\t\t// Take the initial time\n\t\tlong startTime = System.currentTimeMillis();\n\t\t// sort the B array with Arrays.sort() method\n\t\tArrays.sort(B);\n\t\t// Calculate how much time has passed\n\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\tSystem.out.println(\"Time in millisecond to sort array with Arrays.sort(): \" + runTime);\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(\"Bubble Sort\");\r\n\t\tint[] arr1 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\tBubble.sort(arr1);\r\n\t\tSystem.out.println(Arrays.toString(arr1));\r\n\t\t\r\n\t\tSystem.out.println(\"Select Sort\");\r\n\t\tint[] arr2 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr2));\r\n\t\tSelect.sort(arr2);\r\n\t\tSystem.out.println(Arrays.toString(arr2));\r\n\t\t\r\n\t\tSystem.out.println(\"Insert Sort\");\r\n\t\tint[] arr3 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr3));\r\n\t\tInsert.sort(arr3);\r\n\t\tSystem.out.println(Arrays.toString(arr3));\r\n\t\t\r\n\t\tSystem.out.println(\"Quick Sort\");\r\n\t\tint[] arr4 = {8,3,2,1,4,6,5,7};\r\n\t\tSystem.out.println(Arrays.toString(arr4));\r\n\t\tQuickSort.sort(arr4, 0, arr4.length-1);\r\n\t\tSystem.out.println(Arrays.toString(arr4));\r\n\t\t\r\n\t\tbyte b = -127;\r\n\t\tb = (byte) (b << 1);\r\n\t\tSystem.out.println(b);\r\n\t}", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String arg []) {\r\n\t\tint n = 8; //problem size\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Insertion(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Selection(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Bubble(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortFateful(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortCentralElement(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortMedianOfThree(n));\r\n\t}", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "private static void evaluateMergesortUniversityWashington() {\n\n // LOGGER.info(\"evaluating sequential mergesort by the University of Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n MergesortUniversityWashington.parallelMergeSort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Sequential (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static boolean testSort(int sortMode, int arraySize, int timeOutLength) {\r\n long totalTime = 0;\r\n long bestCase = 0;\r\n long worstCase = 0;\r\n boolean lengthOk = true;\r\n\r\n for (int i = 0; i < 10; i++) {\r\n //make array of arraySize\r\n long startTime = 0;\r\n long duration = 0;\r\n int[] a = generateRandomArray(arraySize);//generate and populate a random array \r\n //switch statement to choose sorting method. \r\n //timer starts AFTER method is chosen to avoid timing issues\r\n switch (sortMode) {\r\n case BUBBLE_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n bubbleSort(a); //call bubble sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case INSERTION_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n insertionSort(a); //sort with insertion sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case SELECTION_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n selectionSort(a); //sort with selection sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case MERGE_SORT:\r\n int[] temp = new int[arraySize];\r\n startTime = System.nanoTime();//start the clock!\r\n mergeSort(a, temp, 0, arraySize - 1); //sort with merge sort\r\n duration = System.nanoTime() - startTime; //stop the clock!\r\n break;\r\n case QUICK_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n quickSort(a, 0, arraySize - 1);//sort with quick sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n }//end switch\r\n\r\n //\r\n totalTime += duration;//add run time to total run Times (will be averaged later)\r\n if (bestCase == 0 || duration < bestCase) {\r\n bestCase = duration; //sets sbest case method if not set or better than last best\r\n }\r\n if (worstCase == 0 || worstCase < duration) {\r\n worstCase = duration;//sets worst case method if not set or worse than last worst\r\n }\r\n //typecaste to double, for division. if runtime > timeout value, exit loop\r\n if ((double) totalTime / 1000000000 > timeOutLength) {\r\n lengthOk = false;//set boolean to false\r\n break;//exit for statement! this will take too long\r\n }//end if tooLong\r\n\r\n }//end for \r\n //if operation timed out boolean will be false\r\n if (!lengthOk) {\r\n System.out.printf(\"%40s\", \"Test Aborted: Run Time > \" +timeOutLength );\r\n } //end if\r\n else { //successfully completed\r\n //print formatted output: \r\n double avgTime = (double) totalTime / 10000000000f;\r\n double bCase = (double) bestCase / 1000000000f;\r\n double wCase = (double) worstCase / 1000000000f;\r\n System.out.printf(\"%15.5f\", avgTime);\r\n System.out.printf(\"%15.5f\", bCase);\r\n System.out.printf(\"%15.5f\", wCase);\r\n \r\n \r\n \r\n }//end else\r\n //return boolean indicating success or timeout\r\n return lengthOk;\r\n }", "public static void main(String[] args) {\r\n int[] numbers = {25, 43, 29, 50, -6, 32, -20, 43, 8, -6};\r\n\t\r\n\tSystem.out.print(\"before sorting: \");\r\n\toutputArray(numbers);\r\n \r\n\tbubbleSort(numbers);\r\n\t\r\n\tSystem.out.print(\"after sorting: \");\r\n\toutputArray(numbers);\r\n }", "public static void main(String[] args) {\n\t\t// Part 1 Bench Testing\n\t\t// -----------------------------------\n\n\t\t// -----------------------------------\n\t\t// Array and other declarations\n\t\t// -----------------------------------\n\t\tStopWatch sw = new StopWatch(); // timer for measuring execution speed\n\t\tfinal int SIZE = 100000; // size of array we are using\n\n\t\tint[] sourceArray, copyArray; // arrays for testing insertionSort and selectionSort\n\t\tInteger[] sourceArray2, copyArray2; // arrays for testing shell, merge, quicksort\n\n\t\t// -------------------------------------------------\n\t\t// Array initialization to a predetermined shuffle\n\t\t// -------------------------------------------------\n\t\tsourceArray = new int[SIZE]; // for use in selection, insertion sort\n\t\tscrambleArray(sourceArray, true); // scramble to a random state\n\t\tsourceArray2 = new Integer[SIZE]; // for use in shell,merge,quicksort\n\t\tscrambleArray(sourceArray2, true); // scramble to a random state\n\n\t\t// ---------------------------------------\n\t\t// SELECTION SORT\n\t\t// ---------------------------------------\n\t\t// for all sorts, we must reset copyArray\n\t\t// to sourceArray before sorting\n\t\t// ---------------------------------------\n\t\tcopyArray = Arrays.copyOf(sourceArray, SIZE);\n\n\t\tSystem.out.println(\"Before Selection Sort\");\n\t\t// printArray(copyArray);\n\t\tSystem.out.println(\"Selection Sort\");\n\t\tsw.start(); // start timer\n\t\tSortArray.selectionSort(copyArray, SIZE);\n\t\tsw.stop(); // stop timer\n\t\tSystem.out.println(\"selection sort took \" + sw.getElapsedTime() + \" msec\");\n\t\tSystem.out.println(\"After Selection Sort\");\n\t\t// printArray(copyArray);\n\n\t\t// -----------------------------------------\n\t\t// INSERTION SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 2 here\n\n\t\t// -----------------------------------------\n\t\t// SHELL SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 3 here\n\n\t\t// -----------------------------------------\n\t\t// MERGE SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 4 here\n\n\t\t// -----------------------------------------\n\t\t// QUICK SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 5 here\n\n\t}", "public static void main(String[] args) {\n int listSize = 100000;\n\n // Randomly generates and assigns number quantity to an array\n double[] numbers = new double[listSize];\n for(int i = 0; i < numbers.length; i++){\n numbers[i] = Math.random() * numbers.length;\n }\n // Initial the stop watch method, start clock and start sorting the array then stop clock\n StopWatch StopWatch = new StopWatch();\n StopWatch stopWatchPrinter = new StopWatch();\n Arrays.sort(numbers);\n stopWatchPrinter.stop();\n\n // Print time elapsed from StopWatch class values\n System.out.print(\"The time elapsed is \" + stopWatchPrinter.getElapsedTime());\n\n }", "public static void main(String args[])\r\n {\r\n JavaSort ob = new JavaSort();\r\n \r\n CatalogueItem arr[] = {\r\n new CatalogueItem( 3, \"Life of Pi\",\"Books\"),\r\n new CatalogueItem( 7, \"Deelongie 4 way toaster\",\"Home and Kitchen\"),\r\n new CatalogueItem( 2, \"Glorbarl knife set\",\"Home and Kitchen\"),\r\n new CatalogueItem( 4, \"Diesorn vacuum cleaner\",\"Appliances\"),\r\n new CatalogueItem( 5, \"Jennie Olivier sauce pan\",\"Home and Kitchen\"),\r\n new CatalogueItem( 6, \"This book will save your life\",\"Books\"),\r\n new CatalogueItem( 9, \"Kemwould hand mixer\",\"Appliances\"),\r\n new CatalogueItem( 1, \"Java for Dummies\",\"Books\"),\r\n };\r\n System.out.println(\"The Unsorted array is\");\r\n ob.printArray(arr);\r\n\r\n /*\r\n //apply sort\r\n ob.doOptimisedBubbleSort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n */\r\n\r\n sort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n\r\n System.out.println(\"The algorithm that is most efficient is the Java built in sort.\\n\\n\" +\r\n \"It uses Timsort, which has on average is the same level of time complexity\\n\" +\r\n \"as Quicksort - O(n log(n)). But Timsort is better at it's best and worst\\n\" +\r\n \"when compared with Quicksort.\\n\\n\" +\r\n \"Quicksort best = O(n log(n)) worst = O(n^2)\\n\" +\r\n \"Timsort best = O(n) worst = O(n log(n))\\n\" +\r\n \"\\n\" +\r\n \"This means at it's best, Timsort will only have to traverse the array 'n' times, to sort.\\n\" +\r\n \"And Quicksort at it's worst will have to check an array length squared amount of elements.\\n\");\r\n\r\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\t int s = in.nextInt();\n\t int[] ar = new int[s];\n\t \n\t for(int i=0;i<s;i++){\n\t ar[i]=in.nextInt(); \n\t }\n\t \n\t long start = System.nanoTime();\n\t sort(ar);\n\t long end = System.nanoTime();\n\t \n\t long duration = (end-start);\n\t \n\t \n\t \n\t\tSystem.out.println(\"The Insertion sort was completed in \"+duration +\" nanoseconds\");\n\t\tprintArray(ar);\n\t}", "public static void main(String[] args) {\n\t\tint[] arrays = {20,3,6,84,95,-5};\n\t\t\n\t\tint temp = 0;\n\t\t//时间复杂度(O (n^2))\n\t\tboolean flag = false; //优化算法\n\t\tfor(int i = 0; i < arrays.length-1; i++) {\n\t\t\tfor(int j = 0; j < arrays.length - 1 - i; j++) {\n\t\t\t\tif(arrays[j] > arrays[j+1]){\n\t\t\t\t\tflag = true;\n\t\t\t\t\ttemp = arrays[j];\n\t\t\t\t\tarrays[j] = arrays[j+1];\n\t\t\t\t\tarrays[j+1] = temp;\n\t\t\t\t}\t\n\t\t\t\tSystem.out.println(Arrays.toString(arrays));\n\t\t}\n\t\t\tif(!flag) {\n\t\t\t\t//数组过程中没有进行排序,说明数组已经排序好了\n\t\t\t\tbreak;\n\t\t\t}else {\n\t\t\t\tflag = true;\n\t\t\t}\n\t}\n\n\t\tfor(int i = 0; i < arrays.length; i++) {\n\t\t\tSystem.out.print(arrays[i] + \" \");\n\t\t}\n }", "public void timSort(int[] nums) {\n\t\t\t\n\t}", "public static void apply_alg(String name)\n {\n String[] a = {\"hello\", \"how\" , \"are\" , \"you\"};\n Double [] d = {2.13,37.3,45.01,21.3,3.0,1.223,21.213,42.112,5.2};\n Character[] word = { 'S', 'H', 'E', 'L', 'L', 'S', 'O', 'R', 'T', 'E', 'X', 'A', 'M', 'P', 'L', 'E'};\n Date [] col = new Date[6];\n\n //insertion counter\n int c = 0;\n\n //initialize years in descending order\n for (int i = 5; i >= 0; i--)\n {\n //construct date object\n Date whenever = new Date (1,1, Integer.parseInt(\"201\" + i));\n\n //add date to array\n col[c] = whenever;\n\n //increment insertion counter\n c++;\n }\n\n System.out.println(\"Sorting an array using \" + name + \" sort!\\n\");\n\n switch (name)\n {\n case \"selection\":\n\n System.out.println(\"Sorting an array of strings!\");\n sorting.selection_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.selection_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.selection_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"insertion\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"shell\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n System.out.println(\"\\nSorting array of Characters!\");\n sorting.shell_sort(word);\n assert sorting.isSorted(word);\n sorting.print_array(word);\n\n break;\n\n\n default:\n\n System.out.println(\"No valid algorithm inputted!\");\n\n break;\n\n\n\n\n }\n\n\n }", "public static void performanceTester() {\n logger.warn(\"Random Array created as final.\");\n logger.warn(\"Potential for issues within sort methods\");\n final int[] testArray = ArrayCreator.createRandomArray();\n for (int sortNumber = 1 ; sortNumber <= 6 ; sortNumber++) {\n Printer.printMessage(\"\");\n Printer.printMessage(Factory.ReturnSortType(sortNumber));\n long start = System.nanoTime();\n Printer.printMessage(\"Sorted Array : \" + Arrays.toString(ConsoleInteraction.initialiseSorter(sortNumber, testArray)));\n // Want to include a logger here for testArray to make sure it doesn't change (immutable for next loop)\n long finish = System.nanoTime();\n Printer.printMessage(\"Time taken : \" + (finish - start) + \" \" + \"nanoseconds\");\n }\n }", "public static void main(String[] args) {\n\t\tint[] nums = {2,3,8,7,1,2,2,2,7,3,9,8,2,1,4,2,6,9,2};\n\t\tSystem.out.println(\"排序前:\");\n\t\tshow(nums);\n\t\tint[] numsSorted = countSort(nums);\n\t\tSystem.out.println(\"排序后:\");\n\t\tshow(numsSorted);\n\t}", "public static void main(String[] args) { \n\t\tint[] try1 = new int[1000000000];\n\t\tRandom rand = new Random();\n\t\tfor(int i = 0; i < try1.length; i++) {\n\t\t\ttry1[i] = rand.nextInt();\n\t\t}\n // System.out.println(toString1(try1));\n\t\tLong startTime = new Long(System.currentTimeMillis());\n\t\tquickSortIn(try1, 0, try1.length - 1, 20);\n\t\tLong endTime = new Long(System.currentTimeMillis());\n\t\tSystem.out.println(endTime.intValue() - startTime.intValue());\n // System.out.println(toString1(try1));\n\n\n // Which test to run?\n\t // test();\n\t // test2();\n\t // test3();\n\t // test4();\n\t\n\t}", "private static void evaluateMergesortVogellaOpenMP() {\n\n // LOGGER.info(\"evaluating parallel mergesort with OpenMP based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort @TODO\n //msVogellaOMP.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: OpenMP (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static void main(String[] args) {\n\t\tint a[]= {9,5,6,9,3,0,1,3,5,7,8,5,9,6,2,3,7};\n\t\t\n\t\t/*\n\t\t * the basic functionality of bubble sort is that it kind of takes a scan\n\t\t * through all the array elements and take the maximum element to the last\n\t\t */\n\t\t//using nanoTime instead of currentTimeMillis as have more precision here\n\t\tif(a!=null) {\n\t\t\tdouble start_time=System.nanoTime();\t\t//marking the start time\n\t\t\tBubble_sort(a);\t\t\t\t\t\t\t//performing the function\n\t\t\tdouble end_time=System.nanoTime();\n\t\t\tdouble running_time=(end_time-start_time)/(1.0E9);\t//total runtime\n\t\t\tSystem.out.println(\"It took a total running time of \"+running_time+\" seconds\");\n\t\t}\t\t\n\t\t\n\t\tfor(int i=0;i<a.length;i++)\t\t\t\t\t\t//printing the array\n\t\t\tSystem.out.print(a[i]);\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "public static void main(String [] args) {\n int n = 10000000;\n int [] i = new int[n];\n double [] d = new double[n];\n\n for(int j = 0; j < n; j++) {\n i[j] = 0 + (int) (Math.random()*((n - 0)+ 1 ));\n d[j] = Math.random();\n }\n\n long iSortTimeStart = System.nanoTime();\n intQSort(i, 0, n - 1);\n long iSortTimeEnd = System.nanoTime();\n long iSortDuration = iSortTimeEnd - iSortTimeStart;\n\n long dSortTimeStart = System.nanoTime();\n dbQSort(d, 0, n - 1);\n long dSortTimeEnd = System.nanoTime();\n long dSortDuration = dSortTimeEnd - dSortTimeStart;\n\n System.out.println(\"iQsort time: \" + iSortDuration + \"\\n\");\n System.out.println(\"dbQSort time: \" + dSortDuration + \"\\n\");\n\n System.out.println(\"Is int array sorted: ?\" + isSorted(i));\n System.out.println(\"Is double array sorted: ?\" + dIsSorted(d));\n }", "public String doSort();", "public static void main(String[] args) {\n\r\n\t\tint[] a;\r\n\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.bubble(a);\r\n\r\n\t\tSystem.out.println(\"BubbleSort: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\t\t\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.selection(a);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nSelection: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\t\t\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.insertion(a);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nInsertion: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.mergeSort(a, 0, a.length-1);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nMerge: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\t\t\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.quickSort(a, 0, a.length-1);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nQuick: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\t\t\r\n\t\ta= new int[] {2,8,3,6,2,7,1,9,6,8};\r\n\r\n\t\tSort.qs(a, 0, a.length-1);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\nQuick1: \\n\");\r\n\t\tfor (int i = 0; i < a.length; i++) {\r\n\t\t\tSystem.out.print(a[i] + \" \");\r\n\t\t}\r\n\t\t\r\n\t}", "private static void evaluateMergesortUniversityWashingtonOpenMP() {\n\n // LOGGER.info(\"evaluating parallel mergesort with OpenMP based on the version of the University of\n // Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort @TODO\n // MergesortUniversityWashingtonOpenMP.parallelMerge(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: OpenMP (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "private static void evaluateMergesortVogella() {\n\n // LOGGER.info(\"evaluating sequential Mergesort by Vogella\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n //System.out.println(\"Array (unsortiert): \" + arrayToString(numbers));\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n //System.out.println(\"Array (unsortiert): \" + arrayToString(numbers));\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogella.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Sequential (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static void randomArraySorts() {\n int[] randomArr = new int[1000];\n for (int i = 0; i < randomArr.length; i++) {\n randomArr[i] = (int) (Math.random() * 5000 + 1);\n }\n\n // Heap Sort of random array\n int arr[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr[i] = randomArr[i];\n }\n\n HeapSort hs = new HeapSort();\n\n System.out.println(\"Given Array: \");\n hs.printArray(arr);\n\n long start = System.currentTimeMillis();\n hs.sort(arr);\n long end = System.currentTimeMillis();\n long time = end - start;\n\n System.out.println(\"Heap Sorted Array: \");\n hs.printArray(arr);\n System.out.println(\"Heap Sort Time: \" + time);\n\n // Merge Sort of random array\n System.out.println();\n int arr2[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr2[i] = randomArr[i];\n }\n\n MergeSort ms = new MergeSort();\n\n System.out.println(\"Given Array: \");\n ms.printArray(arr2);\n\n start = System.currentTimeMillis();\n ms.sort(arr2, 0, arr.length - 1);\n end = System.currentTimeMillis();\n time = end - start;\n\n System.out.println(\"Merge Sorted Array: \");\n ms.printArray(arr2);\n System.out.println(\"Merge Sort Time: \" + time);\n\n // Insert Sort of random array\n System.out.println();\n int arr3[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr3[i] = randomArr[i];\n }\n\n System.out.println(\"Given Array: \");\n print(arr3, arr3.length);\n\n start = System.currentTimeMillis();\n insertSort(arr3);\n end = System.currentTimeMillis();\n time = end - start;\n\n System.out.println(\"Insert Sorted Array: \");\n print(arr3, arr3.length);\n System.out.println(\"Insert Sort Time: \" + time);\n }", "private static void evaluateMergesortUniversityWashingtonThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the version of the University\n // of Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n MergesortUniversityWashingtonThreaded.parallelMergeSort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public ArrayList<paintIntegers[]> sort(String algo){\n start = System.nanoTime(); // starts the timer for the time elapsed\n if(algo.equals(\"Insertion\")){\n insertionSort();\n }else if(algo.equals(\"Merge\")){\n mergeSort();\n }else if(algo.equals(\"Heap\")){\n heapSort();\n }else if(algo.equals(\"Quick\")){\n quickSort();\n }else if(algo.equals(\"Radix\")){\n radixSort();\n }else if(algo.equals(\"Counting\")){\n countingSort();\n }else if(algo.equals(\"Selection\")){\n selectionSort();\n }else if(algo.equals(\"Bubble\")){\n bubbleSort();\n }else if(algo.equals(\"Shell\")){\n shellSort();\n }else if(algo.equals(\"Pigeonhole\")){\n pigeonHoleSort();\n }else if(algo.equals(\"Cycle\")){\n cycleSort();\n }else if(algo.equals(\"Cocktail\")){\n cocktailSort();\n }else if(algo.equals(\"Comb\")){\n combSort();\n }else if(algo.equals(\"Bogo\")){\n bogoSort();\n }else if(algo.equals(\"Gnome\")){\n gnomeSort();\n }else if(algo.equals(\"Stooge\")){\n stoogeSort();\n }else if(algo.equals(\"Brick\")){\n brickSort();\n }else if(algo.equals(\"Pancake\")){\n pancakeSort();\n }else{\n System.out.println(\"Tf u doing\");\n }\n end = System.nanoTime();\n timeElapsed = end - start; // gets how long the algorithm took to sort\n //returns the arraylist of the animation\n return sorting;\n }", "public void timSort(int[] nums) {\n\n\t}", "double getSortTime();", "public static void main(String[] args) {\n tenArray(); hundredArray(); thousandArray(); //runs methods for 10,100 and 1000 element arrays\n \n System.out.println(\"QUESTION 4: AVERAGE NUMBER OF COMPARISONS\"); System.out.println(\"-----------------------------------------------------\");\n \n System.out.println(\"For arrays containing 10 elements:\");\n avg=btemp1/10; System.out.println(\" Average Number of Comparisons for Bubble Sort: \"+avg); //calculating averages\n avg=itemp1/10; System.out.println(\" Average Number of Comparisons for Insertion Sort: \"+avg);\n avg=qstemp1/10; System.out.println(\" Average Number of Comparisons for Quicksort: \"+avg);\n System.out.println(\"\");\n \n System.out.println(\"For arrays containing 100 elements:\");\n avg=btemp2/10; System.out.println(\" Average Number of Comparisons for Bubble Sort: \"+avg); //calculating averages\n avg=itemp2/10; System.out.println(\" Average Number of Comparisons for Insertion Sort: \"+avg);\n avg=qstemp2/10; System.out.println(\" Average Number of Comparisons for Quicksort: \"+avg);\n System.out.println(\"\");\n \n System.out.println(\"For arrays containing 1000 elements:\");\n avg=btemp3/10; System.out.println(\" Average Number of Comparisons for Bubble Sort: \"+avg); //calculating averages\n avg=itemp3/10; System.out.println(\" Average Number of Comparisons for Insertion Sort: \"+avg);\n avg=qstemp3/10; System.out.println(\" Average Number of Comparisons for Quicksort: \"+avg);\n System.out.println(\"\");\n }", "public static void main(String[] args) {\n\t\tint[] data = { 2, 5, 7, 10, 1, 3, 8 };\n\t\tSystem.out.print(\"排序前:\\t\");\n\t\tfor(int i=0;i<data.length;i++)\n\t\t{\n\t\t\tSystem.out.print(Integer.toString(data[i]));\n\t\t\tSystem.out.print(\" \");\n\t\t}\n\t\tSystem.out.println();\n\n\t\tint[] sort=MergeSort(data, 0, data.length);\n\t\tSystem.out.print(\"排序后:\\t\");\n\t\tfor(int i=0;i<sort.length;i++)\n\t\t{\n\t\t\tSystem.out.print(Integer.toString(sort[i]));\n\t\t\tSystem.out.print(\" \");\n\t\t}\n\n\t}", "public static void main(String...args){\nbyte[] byte_arr = new byte[]{69,66,65,68,67,70};\r\nchar[] char_arr = new char[]{'D','F','C','A','E','B'};\r\ndouble[] double_arr = new double[6];\r\nfloat [] float_arr = new float[]{25F,21F,27F,19F,59F,3F};\r\nint[] int_arr = new int[]{16,7,28,9,13,10};\r\nlong [] long_arr = new long[]{25L,16L,37L,8L,9L,20L};\r\nshort[] short_arr = new short[]{15,66,37,68,69,70};\r\nString[] str_arr = new String[]{\"One\",\"Two\",\"Three\",\"Four\",\"Five\"};//will be used for Objects\r\n//Will use the the car array to work with comparators\r\nCar[] car_arr = new Car[]{new Car(\"Toyota Rav4\",12300),new Car(\"Nissan Almera\",65000),new Car(\"Honda Civic\",132000)};\r\n\r\n\r\n// use of the static sort() method// it returns void\r\nSystem.out.println(\"SORTING AN ARRAY\");\r\nArrays.sort(byte_arr);\r\nSystem.out.print(\"byte_arr sorted: \");\r\nfor(byte b:byte_arr){ System.out.print(b+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(float_arr);\r\nSystem.out.print(\"float_arr sorted: \");\r\nfor(float f:float_arr){ System.out.print(f+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(str_arr);\r\nSystem.out.print(\"str_arr sorted: \");\r\nfor(String s:str_arr){ System.out.print(s+\" \");}\r\n\r\nSystem.out.println();\r\n\r\n//Because Car is an Object and does not implement Comparable interface, it's sorted using a comparator\r\n//Our comparator compares based on the millage in descending order\r\nArrays.sort(car_arr,new Car_Comparator());\r\nSystem.out.print(\"car_arr sorted: \");\r\nfor(Car c:car_arr){ System.out.print(c+\" \");}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nSEARCHING FOR AN ELEMENT IN AN ARRAY WITH binarySearch()\");\r\n\r\n//The binarySearch() search for an element and returns the index\r\n//It is useful when when the array is sorted\r\nSystem.out.println(\"Index of 37L for long_arr unsorted: \"+Arrays.binarySearch(long_arr,37L));\r\nArrays.sort(long_arr);\r\nSystem.out.println(\"Index of 37L for long_arr sorted: \"+Arrays.binarySearch(long_arr,37L));\r\n\r\nSystem.out.println(\"\\nCOPYING AN ARRAY TO ANOTHER\");\r\nshort[] short_arr_copy1 = Arrays.copyOf(short_arr, 6);\r\nSystem.out.print(\"copy of short_arr for length=6: \");\r\nfor(short sh:short_arr_copy1){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\nSystem.out.println(\"\\nIf lenght<short_arr, short_arr is partially copied from the beginning: \");\r\nshort[] short_arr_copy2 = Arrays.copyOf(short_arr, 3);\r\nSystem.out.print(\"copy of short_arr for length=3: \");\r\nfor(short sh:short_arr_copy2){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nIf lenght>short_arr, the copy is populated with zeros: \");\r\nshort[] short_arr_copy3 = Arrays.copyOf(short_arr, 8);\r\nSystem.out.print(\"copy of short_arr for length=8: \");\r\nfor(short sh:short_arr_copy3){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n \r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOPYING A RANGE OF AN ARRAY TO ANOTHER\");\r\nint[] int_arr_range_copy = Arrays.copyOfRange(int_arr,2,4);\r\nSystem.out.print(\"initial int_arr: \");\r\nfor(int i:int_arr)System.out.print(i+\" \");\r\nSystem.out.print(\"\\ncopy of int_arr from index 2 to 4: \");\r\nfor(int sh:int_arr_range_copy){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOMPARE AN ARRAYS USING equals()\");\r\n//retruns true if both arrays have the same content, otherwise, fasle\r\nSystem.out.println(\"Compare int_arr to its duplicate: \"+Arrays.equals(int_arr, new int[]{16,7,28,9,13,10}));\r\nSystem.out.println(\"Compare int_arr to a different one: \"+Arrays.equals(int_arr, new int[6]));\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nFILL AN ARRAY OR PORTION OF ARRAY USING fill(): \");\r\nSystem.out.print(\"char_arr contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//fill char_arr with a special value\r\nArrays.fill(char_arr,'T');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//Fill a portion of char_arr\r\nArrays.fill(char_arr,2, 5, 'E');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n\t\r\n\tSystem.out.println();\r\n\tSystem.out.println(\"\\nUSE OF SPLITERATOR WITH ARRAYS: \");\r\n\t//Populate the double_arr\r\n\tfor(int i=0;i<double_arr.length;i++){\r\n\t\tdouble_arr[i] = i*(-1*2.17)+1;}\r\n\t\r\n\t\r\n\t//print double_arr\r\n\tSystem.out.print(\"\\ndouble_arr now contains: \");\r\n\tfor(double d : double_arr)System.out.print(d+\" \");\r\n\t\t\r\n}", "public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr= {5,8,2,4,3};\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tArrays.parallelSort(arr);\r\n\t\tSystem.out.println(\"Elements after sort\");\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\r\n\t}", "public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\n\t\tArrayList<Integer> arrayList = new ArrayList<Integer>();\n\t\tarrayList.add(11);\n\t\tarrayList.add(2);\n\t\tarrayList.add(7);\n\t\tarrayList.add(3);\n\t\t\n\t\t// ArrayList before the sorting\n\t\tSystem.out.println(\"Before Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t\t\n\t\t// Sorting of arrayList using Collections.sort\n\t\tCollections.sort(arrayList);\n\t\t\n\t\t// ArrayList after sorting\n\t\tSystem.out.println(\"\\nAfter Sorting: \");\n\t\tfor(int counter: arrayList)\n\t\t\tSystem.out.println(counter);\n\t}", "public static void main(String[] args) {\r\n System.out.println(\"Searching and sorting algorithms\");\r\n \r\n \r\n // TO-DO: Add code that tests the searching and sorting\r\n // methods.\r\n System.out.println(\"Selection sort.\");\r\n List<Integer> data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n selectionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Insertion sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n insertionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Merge sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n mergeSort(data);\r\n printList(data);\r\n }", "public static void main(String[] args) {\n\t\tint []array = {1,10,2,6,3,11,13,41};\r\n\t\tSystem.out.println(\"Before Sorting: \"+Arrays.toString(array));\r\n\t\tselectionSort(array);\r\n\t\tSystem.out.println(\"After Sorting: \"+Arrays.toString(array));\r\n\r\n\t}", "public static <T> long Sort( T[] array, Comparator<? super T> comp )\n\t{\n\t\tlong start = System.currentTimeMillis();\n\t\tmergeSort( array, 0, array.length - 1, comp );\n\t\tlong end = System.currentTimeMillis();\n\t\treturn ( end - start );\n\t}", "public static void main(String[] args) throws Exception{\n\t\tint[] arr = { 3, 1, 7, 4, 9 };\n\t\tdisplay(arr);\n\t\t// bubbleSort(arr);\n\t\t// selectionSort(arr);\n\t\t// insertionSort(arr);\n\t\t// shellSort(arr);\n\t\t// mergeSort(arr, 0, arr.length - 1);\n\t\tquickSort(arr, 0, arr.length - 1);\n\t\tdisplay(arr);\n\t\t\n//\t\tAll_Sorting1 a = new All_Sorting1();\n//\t\ta.clone();\n//\t\ta.equals(a);\n//\t\ta.finalize();\n//\t\ta.hashCode();\n//\t\ta.notify();\n//\t\ta.notifyAll();\n//\t\ta.toString();\n//\t\ta.wait();\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tArrayTest at = new ArrayTest();\n\t\tint[] array = new int[300000];\n\t\tat.creatArray(array);\n\t\t// at.printArray(array);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tSystem.out.println(cal.getTime());\n\t\t// at.insertSort(array);\n\t\t// at.bubbleSort(array);\n\t\t// at.selectSort(array);\n\t\tat.quickSort(array, 0, at.len - 1);\n\t\t// at.printArray(array);\n\t\tcal = Calendar.getInstance();\n\t\tSystem.out.println(cal.getTime());\n\t}", "public interface SortAlgorithm {\n\tpublic int[] sort(int[] numbers);\n}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public static void main(String[] args) {\n ContextSorting contextSorting = new ContextSorting();\r\n //set strategy sorting\r\n ConcreteStrategyBubbleSort b = new ConcreteStrategyBubbleSort();\r\n contextSorting.setStrategy(b);\r\n //perform sorting\r\n contextSorting.performSorting();\r\n }", "public static void main(String[] args) {\n\n\t\tMAV_QSort cQSort = new MAV_QSort();\n\t\tMAV_BSort cBSort = new MAV_BSort();\n\t\t\n\t\t// Инициализируем массивы\n\t\tinitarray();\n\t\t// Стандартная сортировка массивов\n\t\tArrays.sort(aSort_ST);\n\t\tSystem.out.print(\"Пузырек: \");\n\t\tfor (int i = 0; i< aSort_Et.length; i++) System.out.print(aSort_B[i]+ \", \");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"Quick : \");\n\t\tfor (int i = 0; i< aSort_Et.length; i++) System.out.print(aSort_Q[i]+ \", \");\n\t\t\n\t\t// Сортируем массив по пузырьку\n\t\tcBSort.make_BSort(aSort_B);\n\t\t\n\t\t// Выводим результаты сортировки\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Результаты сортировки\");\n\t\tSystem.out.print(\"Пузырек рез: \");\n\t\tfor (int i = 0; i< aSort_Et.length; i++) System.out.print(aSort_B[i]+ \", \");\n\t\tcQSort.make_QSort(aSort_Q);\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.print(\"Quick рез : \");\n\t\tfor (int i = 0; i< aSort_Et.length; i++) System.out.print(aSort_Q[i]+ \", \");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Равенство массивов сортировки пузырьком и быстрой сортировки:\"+Arrays.equals(aSort_B, aSort_Q));\n\t\tSystem.out.println(\"Равенство массивов стандарной сортировки и быстрой сортировки:\"+Arrays.equals(aSort_ST, aSort_Q));\n\n\t}", "public static void main(String[] args) {\n\t\tint[] arr={45,56,73,34,21};\r\n\t\tSystem.out.println(\"정렬전 : \");\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tSystem.out.println(\"정렬후 : \");\r\n\t\tfor(int i=0;i<4;i++){\r\n\t\t\tfor(int j=i+1;j<5;j++){\r\n\t\t\t\tif(arr[i]<arr[j]){\r\n\t\t\t\t\tint temp=arr[i];\r\n\t\t\t\t\tarr[i]=arr[j];\r\n\t\t\t\t\tarr[j]=temp;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\tfor(int i=0;i<5;i++){\r\n\t\t\tSystem.out.print(arr[i]+\" \");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n List<SortBase<Integer>> list = Arrays.asList(new Select<>(), new Insert<>(), new Shell<>(), new MergeImpl2<>(), new Quick<>(),new HeapSort<>());\n for (SortBase<Integer> sort : list) {\n StdOut.print(sort.getClass().getSimpleName()+\"\\n\");\n sort.testCorrectness(new Integer[]{3, 2, 1, 5, 7, 8, 32, 12, 0, -4, -12});\n }\n }", "public static void main(String arg[])\n {\n\tScanner sc=new Scanner(System.in);\n\tSystem.out.println(\"How many no you are goinig to enter?\");\n\tint value =sc.nextInt();\n\tString arr[]= new String[value];\n for(int k=0;k<value;k++)\n\t{\n \tarr[k]=sc.next();\n }\n int len=arr.length;\n\n //par2:sort compare\n \tfor(int i=0; i<len;i++)\n\t{\n \tfor(int k=0;k<len-1;k++)\n\t {\t \n\t if(arr[k].compareTo(arr[k+1]) > 0)\n\t {\n\n \t\tString temp=arr[k];\n \t\tarr[k]=arr[k+1];\n \t\tarr[k+1]=temp;\n }\n\t }\n }\n\n//print\n\t for(int l=0;l<len;l++)\n\t {\n\t System.out.println(\" after sort \"+arr[l]+\"\\n\");\n\t }\n\t}", "public static void main(String[] args) throws FileNotFoundException { \n \t\n In in = new In(args[0]);\n \n\t\t // Storing file input in an array\n int[] a = in.readAllInts();\n\n // b contains sorted integers from a (You can use Java Arrays.sort() method)\n int[] b = new int[a.length];\n for(int i = 0; i < a.length; i++) {\n \tb[i] = a[i];\n }\n Arrays.sort(b);\n // c contains all integers stored in reverse order \n int[] c = new int[b.length];\n for(int i = 0; i < b.length; i++) {\n \tc[i] = b[b.length - 1 - i];\n }\n // (you can have your own O(n) solution to get c from b\n \n // d contains almost sorted array \n int[] d = new int[b.length];\n\t\tfor(int i = 0 ; i < b.length; i++) {\n\t\t\td[i] = b[i];\n\t\t}\n\t\tfor(int i = 0; i < d.length * 0.1; i++) {\n\t\t\tint temp = d[i];\n\t\t\td[i] = d[d.length - 1 - i];\n\t\t\td[d.length - 1 - i] = temp;\n\t\t}\n //(You can copy b to a and then perform (0.1 * d.length) many swaps to acheive this. \n \n //TODO: \n // Read the second argument and based on input select the sorting algorithm\n // * 0 = Arrays.sort() (Java Default)\n // Perform sorting on a,b,c,d. Pring runtime for each case along with timestamp and record those. \n // For runtime and priting, you can use the same code from Lab 4 as follows:\n \n // * 1 = Bubble Sort\n // * 3 = Insertion Sort \n // * 4 = Mergesort\n // * 5 = Quicksort\n\t\t\n\t\t//performs the default java sort on each array\n if(args[1].equals(\"0\")) {\n \t\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n //TODO: Replace with the algorithm used \n String algorithmUsed = \"Java default (Arrays.sort())\";\n //starts the clock \n Stopwatch timer = new Stopwatch();\n //sorts the array\n Arrays.sort(a);\n //gets the time when done sorting\n double time = timer.elapsedTimeMillis();\n String arrayUsed = \"a\";\n //prints to the terminal all the relevant information\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n //prints the now sorted array to a text file\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n // Write the resultant array to a file (Each time you run a program 4 output files should be generated. (one for each a,b,c, and d)\n Stopwatch timer2 = new Stopwatch(); \n Arrays.sort(b);\n time = timer2.elapsedTimeMillis();\n arrayUsed = \"b\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n Stopwatch timer3 = new Stopwatch();\n Arrays.sort(c);\n time = timer3.elapsedTimeMillis();\n arrayUsed = \"c\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n Stopwatch timer4 = new Stopwatch();\n Arrays.sort(d);\n time = timer4.elapsedTimeMillis();\n arrayUsed = \"d\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"1\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Bubble sort\";\n Stopwatch timer1 = new Stopwatch();\n for(int i = 0; i < a.length; i++) {\n \tfor(int j = a.length-1; j > i; j--) {\n \t\tif(a[j] < a[j-1]) {\n \t\t\tint temp = a[j];\n \t\t\ta[j] = a[j-1];\n \t\t\ta[j-1] = temp;\n \t\t}\n \t}\n }\n double time = timer1.elapsedTimeMillis();\n String arrayUsed = \"a\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n\n arrayUsed = \"b\";\n Stopwatch timer2 = new Stopwatch();\n for(int i = 0; i < b.length; i++) {\n \tfor(int j = b.length - 1; j > 1; j--) {\n \t\tif(b[j] < b[j-1]) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\tb[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer2.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"c\";\n Stopwatch timer3 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = c.length -1; j > 0; j--) {\n \t\t\tif(c[j] < c[j-1]) {\n \t\t\t\tint temp = c[j];\n \t\t\t\t\tc[j] = c[j-1];\n \t\t\t\t\t\tc[i] = temp;\n \t\t}\n \t}\n }\n time = timer3.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"d\";\n Stopwatch timer4 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = d.length -1; j > 1; j--) {\n \t\t\tif(d[j] < d[j-1]) {\n \t\t\t\tint temp = d[j];\n \t\t\t\t\td[j] = d[j-1];\n \t\t\t\t\t\td[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer4.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n }\n if(args[1].equals(\"2\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Selection sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer5 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = a.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > a[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = a[minIndex];\n \ta[minIndex] = a[i];\n \ta[i] = temp;\n }\n double time = timer5.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out);\n for(int i = 0; i < a.length; i++) {\n \tSystem.out.print(a[i] + \" \");\n }\n arrayUsed = \"b\";\n Stopwatch timer6 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = b.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > b[j])\n \t\t\tminIndex = j;\n \t}\n \tint temp = b[minIndex];\n \tb[minIndex] = b[i];\n \tb[i] = temp;\n }\n time = timer6.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \t\n arrayUsed = \"c\";\n Stopwatch timer7 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = c.length - 1; j > i; j--) {\n \t\t\t\tif(c[minIndex] > c[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = c[minIndex];\n \tc[minIndex] = c[i];\n \tc[i] = temp;\n }\n time = timer7.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out2);\n for(int i = 0; i < c.length; i++) {\n \tSystem.out.print(c[i] + \" \");\n }\n arrayUsed = \"d\";\n Stopwatch timer8 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = d.length - 1; j > i; j--) {\n \t\t\t\tif(d[minIndex] > d[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = d[minIndex];\n \t\td[minIndex] = d[i];\n \t\td[i] = temp;\n }\n time = timer8.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"3\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Insertion sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer9 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i++) {\n \t\tfor(int j = i; (j > 0) && (a[j] < a[j-1]); j--) {\n \t\t\tint temp = a[j];\n \t\t\t\ta[j] = a[j-1];\n \t\t\t\t\ta[j-1] = temp;\n \t}\n }\n double time = timer9.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer10 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i++) {\n \t\tfor(int j = i; (j>0) && (b[j] < b[j-1]); j--) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\t\tb[j-1] = temp;\n \t}\n }\n time = timer10.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer11 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = i; (j>0) && (c[j] < c[j-1]); j--) {\n \t\t\tint temp = c[j];\n \t\t\tc[j] = c[j-1];\n \t\t\t\tc[j-1] = temp;\n \t}\n }\n time = timer11.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n Stopwatch timer12 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = i; (j > 0) && (d[j] < d[j-1]); j--) {\n \t\t\tint temp = d[j];\n \t\t\t\td[j] = d[j-1];\n \t\t\t\t\td[j-1] = temp;\n \t}\n }\n time = timer12.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"4\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Merge sort\";\n \n String arrayUsed = \"a\";\n int[] temp1 = new int[a.length];\n Stopwatch timer13 = new Stopwatch();\n mergeSort(a, temp1, 0, a.length-1);\n double time = timer13.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0 ; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n int[] temp2 = new int[b.length];\n Stopwatch timer14 = new Stopwatch();\n mergeSort(b, temp2, 0, b.length -1);\n time = timer14.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n int[] temp3 = new int[c.length];\n Stopwatch timer15 = new Stopwatch();\n mergeSort(c, temp3, 0, c.length-1);\n time = timer15.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n int[] temp4 = new int[d.length];\n Stopwatch timer16 = new Stopwatch();\n mergeSort(d, temp4, 0, d.length -1);\n time = timer16.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"5\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Quick sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer17 = new Stopwatch();\n quickSort(a, 0, a.length-1);\n double time = timer17.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer18 = new Stopwatch();\n quickSort(b, 0, b.length-1);\n time = timer18.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer19 = new Stopwatch();\n quickSort(c, 0, c.length-1);\n time = timer19.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++)\n \t\tSystem.out.print(c[i] + \" \");\n \n arrayUsed = \"d\";\n Stopwatch timer20 = new Stopwatch();\n quickSort(d, 0, d.length -1);\n time = timer20.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++)\n \t\tSystem.out.print(d[i] + \" \");\n }\n \n }", "public static void main(String[] args) {\n \t\tsortTest(\"\");\n \t\tsortTest(\"A\");\n \t\tsortTest(\"HE\");\n \t\tsortTest(\"HEA\");\n \t\tsortTest(\"HEAPS\");\n \t\tsortTest(\"HEAPSORT\");\n\t\tsortTest(\"HEAPSORTEXAMPLE\");\n\t\tsortTest(\"QUICK\");\n\t\tsortTest(\"QUICKS\");\n\t\tsortTest(\"QUICKSO\");\n\t\tsortTest(\"QUICKSORT\");\n\t\tsortTest(\"QUICKSORTEXAMPLE\");\n\n\t\tsortTest(\"bottomupmergesortconsistsofasequenceofpassesoverthewholearray\");\n\t\tsortTest(\"thefirststepinastudyofcomplexityistoestablishamodelofcomputation.generally,researchersstrivetounderstandthesimplestmodelrelevanttoaproblem.\");\n }", "public static <T> long Sort( T[] array )\n\t{\n\t\tlong start = System.currentTimeMillis();\n\t\tmergeSort( array, 0, array.length - 1, null );\n\t\tlong end = System.currentTimeMillis();\n\t\treturn ( end - start );\n\t}", "@Override\n public void sort() {\n int cont = 0;\n int mov = 0;\n for (int i = 0; i < (100 - 1); i++) {\n int menor = i;\n for (int j = (i + 1); j < 100; j++){\n if (array[menor] > array[j]){\n cont= cont + 1;\n menor = j;\n mov = mov + 1;\n }\n }\n swap(menor, i);\n mov = mov + 3;\n }\n System.out.println(cont + \" comparações\");\n System.out.println(mov + \" Movimenteções\");\n }", "public static void main(String[] args) {\n\n\t\tArraySorting as=new ArraySorting();\n\t\tint arr[]= {0,1,1,0,1,2,1,2,0,0,0,1};\n\t\tint n= arr.length;\n\t\t\n\t\tas.sortArray(arr, n);\n\t}", "public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"In this testrun the squenz has \" + ARRAY_SIZE + \" Elements.\\n\");\n // evaluate Mergesort Vogella\n evaluateMergesortVogella();\n\n // evaluate Mergesort Vogella with Java Threads\n evaluateMergesortVogellaThreaded();\n\n // evaluate Mergesort Vogella with openMP\n// evaluateMergesortVogellaOpenMP();\n\n // evaluate Mergesort University Washington\n evaluateMergesortUniversityWashington();\n\n // evaluate Mergesort University Washington with Java Threads\n evaluateMergesortUniversityWashingtonThreaded();\n\n // evaluate Mergesort University Washington with openMP\n// evaluateMergesortUniversityWashingtonOpenMP();\n }", "public static void main(String[] args) {\n\t\tList<StatetostateDetail> list = new ArrayList<StatetostateDetail>();\n\t\tfor(int i = 1; i < 16; i++){\n\t\t\tStatetostateDetail s = new StatetostateDetail();\n\t\t\ts.setId(i);\n\t\t\ts.setStatue(0);\n\t\t\ts.setTime(System.currentTimeMillis() + (i + i * 100));\n\t\t\tlist.add(s);\n\t\t}\n\t\tlist.get(3).setStatue(1);\n\t\tlist.get(5).setStatue(1);\n\t\tlist.get(10).setStatue(1);\n\t\tlist.get(14).setStatue(1);\n\t\tlist.get(7).setStatue(2);\n\t\tlist.get(9).setStatue(2);\n\t\tSystem.out.println(\"list:\" + list);\n\t\n\t\t\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \tLong t1 = null;\n \tLong t2 = null;\n \ttry{\n \t\tt1 = s1.getTime();\n\t \tt2 = s2.getTime();\n \t}catch(Exception e){\n \t\te.printStackTrace();\n \t}\n \n return t2.compareTo(t1);\n }\n });\n\t\tCollections.sort(list, new Comparator<StatetostateDetail>(){\n public int compare(StatetostateDetail s1, StatetostateDetail s2) {\n \treturn s1.getStatue()>s2.getStatue()?1:(s1.getStatue()==s2.getStatue()?0:(s2.getTime()>s1.getTime()?-1:0));\n }\n });\n\t\t\n\t\tSystem.out.println(\"list:\" + list);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random();\r\n for (int i = 0; i < a.length; i++) {\r\n a[i] = r.nextInt(20000);\r\n }\r\n \r\n //a = new int[] {10, 20, 8, -4, -7, 22 };\r\n\r\n // Copy list to new array\r\n int[] a2 = new int[listSize];\r\n System.arraycopy(a, 0, a2, 0, a.length);\r\n\r\n TestUtil.print(a);\r\n // Sort the two arrays\r\n long time = System.currentTimeMillis();\r\n countSort(a);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Count sort took: \" + time);\r\n TestUtil.print(a);\r\n time = System.currentTimeMillis();\r\n Arrays.sort(a2);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Java sort took: \" + time);\r\n\r\n // Compare the two arrays\r\n for (int i = 0; i < listSize; i++) {\r\n if (a[i] != a2[i]) {\r\n System.out.println(\"Error: Results do not match.\");\r\n return;\r\n }\r\n }\r\n System.out.println(\"Sort successful\");\t\t\r\n\t}", "public static void main(String[] args) {\n ArrayList<Comparable> BestBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstBubble = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstSelection = new ArrayList<Comparable>();\r\n ArrayList<Comparable> BestInsertion = new ArrayList<Comparable>();\r\n ArrayList<Comparable> WorstInsertion = new ArrayList<Comparable>();\r\n\r\n // Best and worst case bubbleSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestBubble.add(i * 2);\r\n } System.out.println(\"BestBubble in pre-sorted ascending order...\\n\" + BestBubble + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstBubble.add(x);\r\n }\r\n System.out.println(\"WorstBubble in descending order...\\n\" + WorstBubble + \"\\n\");\r\n\r\n // Best and worst case selectionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestSelection.add(i * 2);\r\n } System.out.println(\"BestSelection in pre-sorted ascending order...\\n\" + BestSelection + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstSelection.add(x);\r\n }\r\n System.out.println(\"WorstSelection in descending order...\\n\" + WorstSelection + \"\\n\");\r\n\r\n // Best and worst case insertionSortV testing...\r\n for (int i = 0; i < 10; i++) {\r\n BestInsertion.add(i * 2);\r\n } System.out.println(\"BestInsertion in pre-sorted ascending order...\\n\" + BestInsertion + \"\\n\");\r\n\r\n for (int x = 10; x > 0; x--) {\r\n WorstInsertion.add(x);\r\n }\r\n System.out.println(\"WorstInsertion in descending order...\\n\" + WorstInsertion + \"\\n\");\r\n\r\n // Sort every single instantiation of ArrayList\r\n MySorts.bubbleSortV(BestBubble);\r\n MySorts.bubbleSortV(WorstBubble);\r\n\r\n MySorts.selectionSortV(BestSelection);\r\n MySorts.selectionSortV(WorstSelection);\r\n\r\n MySorts.insertionSortV(BestInsertion);\r\n MySorts.insertionSortV(WorstInsertion);\r\n\r\n // Prints all the instantiations of ArrayList\r\n System.out.println(\"Sorted BestBubble...\\n\" + BestBubble + \"\\n\");\r\n System.out.println(\"Sorted WorstBubble...\\n\" + WorstBubble + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestSelection...\\n\" + BestSelection + \"\\n\");\r\n System.out.println(\"Sorted WorstSelection...\\n\" + WorstSelection + \"\\n\");\r\n\r\n System.out.println(\"Sorted BestInsertion...\\n\" + BestInsertion + \"\\n\");\r\n System.out.println(\"Sorted WorstInsertion...\\n\" + WorstInsertion + \"\\n\");\r\n }", "public double run(int choice) {\n double startTime = System.nanoTime(); // we save the time at the start of calculation\n switch (choice) {\n case 1:\n bubbleSort(arr);\n break;\n case 2:\n selectionSort(arr);\n break;\n case 3:\n insertionSort(arr);\n break;\n case 4:\n new MergeSort().start(arr);\n break;\n case 5:\n new QuickSort().start(arr);\n break;\n default:\n throw new InputMismatchException();\n }\n return (System.nanoTime() - startTime) / Math.pow(10, 9); // we return the time spent on calculation\n }", "public void sort() {\n }", "public long timeTakenSelectionSort(UnorderedArray dataSize, boolean isCoreData){\r\n long start, end;\r\n if (isCoreData){\r\n start = System.currentTimeMillis();\r\n dataSize.selectionSort();\r\n end = System.currentTimeMillis();\r\n }\r\n else {\r\n start = System.nanoTime();\r\n dataSize.selectionSort();\r\n end = System.nanoTime();\r\n }\r\n return end - start;\r\n }", "public static void main(String[] args) {\n\t\tCountingSort sort = new CountingSort();\r\n//\t\tint A[] = {3,44,38,5,47,15,36,26,27,2,46,4,19,50,48};\r\n\t\tint A[] = {4, 2, 5, 6, 7};\r\n\t\tint B[] = sort.countingSort(A, 15);\r\n\t\tfor (int i = 0; i < B.length; i++) {\r\n\t\t\tSystem.out.println(B[i]);\r\n\t\t}\r\n\t}", "public String name_of_sort()\r\n\t{\r\n\t\treturn \"Merge sort\";\r\n\t}", "public static void main(String[] args) {\n sortGeneric list = new sortGeneric();\n list.add(100);\n list.add(7);\n list.add(6);\n list.add(20);\n list.add(1);\n list.add(15);\n System.out.print(\"trc khi sap xep : \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n list.sort();\n System.out.print(\"sau khi sap xep: \");\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n\n\n }", "public static void main(String[] args) {\n\t\tCars[] arr = new Cars[5];\n\t\tarr[0] = new Cars(200, 10, \"White\");\n\t\tarr[1] = new Cars(1000, 20, \"Black\");\n\t\tarr[2] = new Cars(345, 3, \"Yellow\");\n\t\tarr[3] = new Cars(34, 89, \"Grey\");\n\t\tarr[4] = new Cars(8907, 6, \"Red\");\n//\t\t// Arrays.sort(arr);\n//\t\tSort(arr, new CarCompareterSpeed());\n//\t\tDisplay(arr);\n//\t\tSystem.out.println(\"*************\");\n//\t\tSort(arr, new CarCOmparaterPrice());\n//\t\t\n//\t\tDisplay(arr);\n//\t\tSystem.out.println(\"*************\");\n//\t\tSort(arr, new CarComparaterColor());\n//\t\tDisplay(arr);\n\n\t\tArrays.sort(arr, new Comparator<Cars>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Cars o1, Cars o2) {\n\t\t\t\t return o1.speed - o2.speed;\n\t\t\t\t//return o2.price - o1.price;\n\t\t\t}\n\t\t});\n\t\tDisplay(arr);\n\t}" ]
[ "0.7621797", "0.74841356", "0.7464871", "0.72247547", "0.71906805", "0.71817386", "0.7141358", "0.7140602", "0.71380955", "0.7073149", "0.7033847", "0.70264286", "0.6979787", "0.69740105", "0.6922179", "0.6920319", "0.6914739", "0.68993866", "0.6849338", "0.67869824", "0.67864376", "0.676872", "0.67684126", "0.6738996", "0.67229444", "0.6655704", "0.66145027", "0.65885913", "0.65884084", "0.65613073", "0.6540654", "0.64658356", "0.64591986", "0.6453888", "0.6421015", "0.64182144", "0.6414915", "0.6406091", "0.6390508", "0.6384746", "0.63830894", "0.6381014", "0.63780683", "0.63686323", "0.6363189", "0.6356899", "0.6343638", "0.6343133", "0.63381255", "0.6337946", "0.63219184", "0.63179827", "0.630514", "0.6290523", "0.6289984", "0.6261999", "0.6254459", "0.6251548", "0.62506837", "0.62425387", "0.62381077", "0.6232017", "0.6222271", "0.62166524", "0.6206979", "0.6186604", "0.6186149", "0.6159371", "0.60951835", "0.6084409", "0.6072882", "0.6061172", "0.60570484", "0.6025721", "0.60114306", "0.60108525", "0.60036916", "0.5996212", "0.5984985", "0.5974053", "0.5972154", "0.59692013", "0.5967536", "0.5957251", "0.59545594", "0.59535366", "0.5949132", "0.594454", "0.59430254", "0.5939907", "0.59391534", "0.5899839", "0.5894722", "0.58944035", "0.5893696", "0.58933824", "0.58842516", "0.5868698", "0.58642536", "0.586378", "0.5860127" ]
0.0
-1
Come to conclusion about which Sorting Algo is better in given data set of 1000000.
public static void storeRandomNumbers(int [] num){ Random rand = new Random(); for(int i=0; i<num.length; i++){ num[i] = rand.nextInt(1000000); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n for (int N = 100; N <= 100000; N *= 10) {\n int[] nums = new int[N];\n Random random = new Random();\n for (int i = 0; i < N; i++) {\n nums[i] = random.nextInt(N * 10);\n }\n Long start = 0L, end = 0L;\n int[] quickSortArray = Arrays.copyOf(nums, nums.length);\n int[] InsertSortArray = Arrays.copyOf(nums, nums.length);\n int[] shellSortArray = Arrays.copyOf(nums, nums.length);\n int[] bubbleSortArray = Arrays.copyOf(nums, nums.length);\n int[] selectionSortArray = Arrays.copyOf(nums, nums.length);\n int[] mergeSortArray = Arrays.copyOf(nums, nums.length);\n System.out.println(\"数据量为:\" + N);\n start = System.currentTimeMillis();\n QuickSort.quickSort(quickSortArray, 0, N - 1);\n end = System.currentTimeMillis();\n System.out.println(\"快速排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n InsertSort.insertSort(InsertSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"插入排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n ShellSort.shellSort(shellSortArray, 8);\n end = System.currentTimeMillis();\n System.out.println(\"希尔排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n BubbleSort.bubbleSort(bubbleSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"冒泡排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n SelectionSort.selectionSort(selectionSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"选择排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n MergeSort.mergeSort(mergeSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"归并排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "private static void sortingMemo() {\n\t\t\n\t}", "private static String testSorts(int[] arr) {\n\t\tint[] initial = arr.clone();\n\t\tdouble start;\n\t\tdouble[] heapTime = new double[10];\n\t\tdouble[] quickTime = new double[10];\n\t\tdouble[] mergeTime = new double[10];\n\t\t\n\t\tfor (int i=0; i < 10; i++){ //runs 10 times\n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t Sorting.heapSort(arr);\n\t heapTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.quickSort(arr); \n\t quickTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.mergeSort(arr); \n\t mergeTime[i] = System.nanoTime()-start;\n\t\t}\n\t\t\n\t double heapMean= meanVal(heapTime) ;\n\t double quickMean= meanVal(quickTime);\n\t double mergeMean= meanVal(mergeTime);\n\t \n\t String result = \"Means | HeapSort: \" +heapMean + \" QuickSort: \" + quickMean + \" MergeSort: \" + mergeMean + \"\\n\" + \n\t \"Variance| HeapSort: \"+ varianceVal(heapTime, heapMean)+ \" QuickSort: \" + varianceVal(quickTime, quickMean)+\n\t \" MergeSort: \" +varianceVal(mergeTime, mergeMean);\n\t \n\t return result;\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tint[] hundredRand = new int[100]; \n\t \t for(int i = 0; i < hundredRand.length; i++) {\n\t \thundredRand[i] = (int)(Math.random()*100 + 1);\n\t }\t \n\t //Generating 1000 Random numbers\n\t int[] ThousandRand = new int[1000]; \n\t for(int i = 0; i < ThousandRand.length; i++) {\n\t \tThousandRand[i] = (int)(Math.random()*1000 + 1);\n\t }\t\n\t //Generating 10,000 Random integers\n\t int[] TenThousandRand = new int[10000]; \n\t for(int i = 0; i < TenThousandRand.length; i++) {\n\t \tTenThousandRand[i] = (int)(Math.random()*10000 + 1);\n\t }\t\n\t //Generating 1,00,000 Random integers\n\t int[] onelakhRand = new int[100000]; \n\t for(int i = 0; i < onelakhRand.length; i++) {\n\t \tonelakhRand[i] = (int)(Math.random()*100000 + 1);\n\t }\t\n\t \n\t //Time needed to sort hundred random integers using Bubble sort\t\n\t long hunBubbleSortStart =System.nanoTime();\n\t BubbleSort(hundredRand);\n\t long hunBubbleSortEnd=System.nanoTime();\n\t long hunBubble=hunBubbleSortEnd-hunBubbleSortStart;\n\t \n\t //Time needed to sort hundred random integers using Insertion sort\n\t long hunInsertionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunInsertionSortEnd=System.nanoTime();\n\t long hunInsertion=hunInsertionSortEnd-hunInsertionSortStart;\n\n\t //Time needed to sort hundred random integers using Selection sort\n\t long hunSelectionSortStart =System.nanoTime();\n\t Insertionsort(hundredRand);\n\t long hunSelectionSortEnd=System.nanoTime();\n\t long hunSelection=hunSelectionSortEnd-hunSelectionSortStart;\n\t \n\t //Time needed to sort Hundred random integers using Merge sort\n\t long hunMergeSortStart =System.nanoTime();\n\t mergeSort(hundredRand);\n\t long hunMergeSortEnd=System.nanoTime();\n\t long hunMerge=hunMergeSortEnd-hunMergeSortStart;\n\t \n\t //Time needed to sort hundred random integers using Heap sort\t\n\t long hunHeapSortStart =System.nanoTime();\n\t HeapSort(hundredRand);\n\t long hunHeapSortEnd=System.nanoTime();\n\t long hunHeap=hunHeapSortEnd-hunHeapSortStart;\n\t \n\n\t //Time needed to sort Hundred random integers using Quick sort\n\t long hunQuickSortStart =System.nanoTime();\n\t QuickSort(hundredRand);\n\t long hunQuickSortEnd=System.nanoTime();\n\t long hunQuick=hunQuickSortEnd-hunQuickSortStart;\n\n\t //Time needed to sort Thousand Random Integers using Bubble Sort\n\t long ThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(ThousandRand);\n\t long ThousandBubbleSortEnd=System.nanoTime();\n\t long ThousandBubble=ThousandBubbleSortEnd-ThousandBubbleSortStart;\n\t \n\t //Time needed to sort Thousand random integers using Insertion sort\n\t long ThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(ThousandRand);\n\t long ThousandInsertionSortEnd=System.nanoTime();\n\t long ThousandInsertion=ThousandInsertionSortEnd-ThousandInsertionSortStart;\n\n\t //Time needed to sort Thousand random integers using Selection sort\n\t long ThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(ThousandRand);\n\t long ThousandSelectionSortEnd=System.nanoTime();\n\t long ThousandSelection=ThousandSelectionSortEnd-ThousandSelectionSortStart;\n\t \n\t //Time needed to sort Thousand Random Integers using Merge Sort\n\t long ThousandMergeSortStart =System.nanoTime();\n\t mergeSort(ThousandRand);\n\t long ThousandMergeSortEnd=System.nanoTime();\n\t long ThousandMerge=ThousandMergeSortEnd-ThousandMergeSortStart;\n\n\t\t //Time needed to sort Thousand Random Integers using Quick Sort\n\t\t long ThousandQuickSortStart =System.nanoTime();\n\t\t QuickSort(ThousandRand);\n\t\t long ThousandQuickSortEnd=System.nanoTime();\n\t\t long ThousandQuick=ThousandQuickSortEnd-ThousandQuickSortStart;\n\t\t \n\t\t //Time needed to sort Thousand Random Integers using HeapSort\n\t\t long ThousandHeapSortStart =System.nanoTime();\n\t\t HeapSort(ThousandRand);\n\t\t long ThousandHeapSortEnd=System.nanoTime();\n\t\t long ThousandHeap=ThousandHeapSortEnd-ThousandHeapSortStart;\n\t\t \n\t\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Bubble Sort\n\t long TenThousandBubbleSortStart =System.nanoTime();\n\t BubbleSort(TenThousandRand);\n\t long TenThousandBubbleSortEnd=System.nanoTime();\n\t long TenThousandBubble=TenThousandBubbleSortEnd-TenThousandBubbleSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Insertion sort\n\t long TenThousandInsertionSortStart =System.nanoTime();\n\t Insertionsort(TenThousandRand);\n\t long TenThousandInsertionSortEnd=System.nanoTime();\n\t long TenThousandInsertion=TenThousandInsertionSortEnd-TenThousandInsertionSortStart;\n\n\t //Time needed to sort TenThousand random integers using Selection sort\n\t long TenThousandSelectionSortStart =System.nanoTime();\n\t Selectionsort(TenThousandRand);\n\t long TenThousandSelectionSortEnd=System.nanoTime();\n\t long TenThousandSelection=TenThousandSelectionSortEnd-TenThousandSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long TenThousandMergeSortStart =System.nanoTime();\n\t mergeSort(TenThousandRand);\n\t long TenThousandMergeSortEnd=System.nanoTime();\n\t long TenThousandMerge=TenThousandMergeSortEnd-TenThousandMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long TenThousandQuickSortStart =System.nanoTime();\n\t QuickSort(TenThousandRand);\n\t long TenThousandQuickSortEnd=System.nanoTime();\n\t long TenThousandQuick=TenThousandQuickSortEnd-TenThousandQuickSortStart;\n\t \n\t \n\t //Time needed to sort TenThousand Random Integers using Heap Sort\n\t long TenThousandHeapSortStart =System.nanoTime();\n\t HeapSort(TenThousandRand);\n\t long TenThousandHeapSortEnd=System.nanoTime();\n\t long TenThousandHeap=TenThousandHeapSortEnd-TenThousandHeapSortStart;\n\n\t //Time needed to sort oneLakh Random Integers using Bubble Sort\n\t long OnelakhBubbleSortStart =System.nanoTime();\n\t BubbleSort(onelakhRand);\n\t long OnelakhBubbleSortEnd=System.nanoTime();\n\t long OnelakhBubble=OnelakhBubbleSortEnd-OnelakhBubbleSortStart;\n\t \n\t //Time needed to sort oneLakh random integers using Insertion sort\n\t long OnelakhInsertionSortStart =System.nanoTime();\n\t Insertionsort(onelakhRand);\n\t long OnelakhInsertionSortEnd=System.nanoTime();\n\t long OnelakhInsertion=OnelakhInsertionSortEnd-OnelakhInsertionSortStart;\n\n\t //Time needed to sort OneLakhrandom integers using Selection sort\n\t long OnelakhSelectionSortStart =System.nanoTime();\n\t Selectionsort(onelakhRand);\n\t long OnelakhSelectionSortEnd=System.nanoTime();\n\t long OnelakhSelection=OnelakhSelectionSortEnd-OnelakhSelectionSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Merge sort\n\t long OnelakhMergeSortStart =System.nanoTime();\n\t mergeSort(onelakhRand);\n\t long OnelakhMergeSortEnd=System.nanoTime();\n\t long OnelakhMerge=OnelakhMergeSortEnd-OnelakhMergeSortStart;\n\t \n\t //Time needed to sort TenThousand random integers using Quick sort\n\t long OnelakhQuickSortStart =System.nanoTime();\n\t QuickSort(onelakhRand);\n\t long OnelakhQuickSortEnd=System.nanoTime();\n\t long OnelakhQuick=OnelakhQuickSortEnd-OnelakhQuickSortStart;\n\t \n\t //Time needed to sort one Lakh Random Integers using Bubble Sort\n\t long OnelakhHeapSortStart =System.nanoTime();\n\t HeapSort(onelakhRand);\n\t long OnelakhHeapSortEnd=System.nanoTime();\n\t long OnelakhHeap=OnelakhHeapSortEnd-OnelakhHeapSortStart;\n\n\t \n\n\t File f = new File(\"Output.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(f.getAbsoluteFile()));\n\t\tbw.write(\"Array size \"+\"Bubble Sort(ns) \"+\"Insertion sort(ns) \"+\"Selection sort(ns) \"+\"Merge sort(ns) \"+\" Quick Sort(ns) \"+\" HeapSort(ns)\"+\"\\n\");\n\t\tbw.write(\"100 \"+hunBubble+\"(ns) \"+hunInsertion+\"(ns) \"+hunSelection+\"(ns)\t\t\"+hunMerge+\"(ns) \"+hunQuick+\"(ns)\"+\" \"+hunHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"1000 \"+ThousandBubble+\"(ns) \"+ThousandInsertion+\"(ns) \"+ThousandSelection+\"(ns)\t \t\"+ThousandMerge+\"(ns) \"+ThousandQuick+\"(ns)\"+\" \"+ThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"10000 \"+TenThousandBubble+\"(ns) \"+TenThousandInsertion+\"(ns)\t \"+TenThousandSelection+\"(ns) \"+TenThousandMerge+\"(ns) \"+TenThousandQuick+\"(ns)\"+\" \"+TenThousandHeap+\"(ns)\"+\"\\n\");\n\t bw.write(\"100000 \"+OnelakhBubble+\"(ns) \"+OnelakhInsertion+\"(ns)\t \"+OnelakhSelection+\"(ns)\t\"+OnelakhMerge+\"(ns) \"+OnelakhQuick+\"(ns) \"+OnelakhHeap+\"(ns)\"+\"\\n\");\n\n\t\tbw.close();\n\t\n\n\t}", "private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random();\r\n for (int i = 0; i < a.length; i++) {\r\n a[i] = r.nextInt(20000);\r\n }\r\n \r\n //a = new int[] {10, 20, 8, -4, -7, 22 };\r\n\r\n // Copy list to new array\r\n int[] a2 = new int[listSize];\r\n System.arraycopy(a, 0, a2, 0, a.length);\r\n\r\n TestUtil.print(a);\r\n // Sort the two arrays\r\n long time = System.currentTimeMillis();\r\n countSort(a);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Count sort took: \" + time);\r\n TestUtil.print(a);\r\n time = System.currentTimeMillis();\r\n Arrays.sort(a2);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Java sort took: \" + time);\r\n\r\n // Compare the two arrays\r\n for (int i = 0; i < listSize; i++) {\r\n if (a[i] != a2[i]) {\r\n System.out.println(\"Error: Results do not match.\");\r\n return;\r\n }\r\n }\r\n System.out.println(\"Sort successful\");\t\t\r\n\t}", "public static void s1DescendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Descending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n Integer[] bi = new Integer[ai.length];\n int count = 0;\n for (int i = ai.length - 1; i >= 0; i--) {\n bi[count] = ai[i];\n count++;\n }\n start = System.nanoTime();\n sli.sort1(bi);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args)\n {\n //reading the size of array\n Scanner in = new Scanner(System.in);\n int size = 0;\n System.out.println(\"Enter the size of the array\\n\");\n size = in.nextInt();\n\n // creating a random array of given size\n Random rd = new Random();\n int[] array = new int[size];\n for (int i = 0; i < array.length; i++)\n array[i] = rd.nextInt(size);\n\n //System.nanoTime() is used to calculate the time taken by the algorithm to multiply the numbers\n //implementing selection sort and timing the performance\n final long startTimeS = System.nanoTime();\n selectionSort(array);\n System.out.print(\"Sorted array via selection sort: \");\n printArray(array);\n final long elapsedTimeS = System.nanoTime() - startTimeS;\n System.out.println(\"The time taken: \" + elapsedTimeS);\n\n //implementing bogo sort and timing the performance\n final long startTime = System.nanoTime();\n bogoSort(array);\n System.out.print(\"Sorted array via bogo sort: \");\n printArray(array);\n final long elapsedTime = System.nanoTime() - startTime;\n System.out.println(\"The time taken: \" + elapsedTime);\n\n //implementing insertion sort and timing the performance\n final long startTimeI = System.nanoTime();\n insertSort(array);\n System.out.print(\"Sorted array via insertion sort: \");\n printArray(array);\n final long elapsedTimeI = System.nanoTime() - startTimeI;\n System.out.println(\"The time taken: \" + elapsedTimeI);\n\n //implementing merge sort and timing the performance\n final long startTimeM = System.nanoTime();\n mergeSort(array, size);\n System.out.print(\"Sorted array via merge sort: \");\n printArray(array);\n final long elapsedTimeM = System.nanoTime() - startTimeM;\n System.out.println(\"The time taken: \" + elapsedTimeM);\n\n //implementing enhanced merge sort and timing the performance\n final long startTimeEm = System.nanoTime();\n enhancedMergeSort(array, size);\n System.out.print(\"Sorted array via enhanced merge sort: \");\n printArray(array);\n final long elapsedTimeEm = System.nanoTime() - startTimeEm;\n System.out.println(\"The time taken: \" + elapsedTimeEm);\n\n //implementing quick sort and timing the performance\n final long startTimeQ= System.nanoTime();\n quickSort(array);\n System.out.print(\"Sorted array via quick sort: \");\n printArray(array);\n final long elapsedTimeQ = System.nanoTime() - startTimeQ;\n System.out.println(\"The time taken: \" + elapsedTimeQ);\n\n //implementing enhanced quick sort and timing the performance\n final long startTimeEq = System.nanoTime();\n enhancedQuickSort(array);\n System.out.print(\"Sorted array via enhanced quick sort: \");\n printArray(array);\n final long elapsedTimeEq= System.nanoTime() - startTimeEq;\n System.out.println(\"The time taken: \" + elapsedTimeEq);\n\n }", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "public static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }", "public static void main(String [] args) {\n int n = 10000000;\n int [] i = new int[n];\n double [] d = new double[n];\n\n for(int j = 0; j < n; j++) {\n i[j] = 0 + (int) (Math.random()*((n - 0)+ 1 ));\n d[j] = Math.random();\n }\n\n long iSortTimeStart = System.nanoTime();\n intQSort(i, 0, n - 1);\n long iSortTimeEnd = System.nanoTime();\n long iSortDuration = iSortTimeEnd - iSortTimeStart;\n\n long dSortTimeStart = System.nanoTime();\n dbQSort(d, 0, n - 1);\n long dSortTimeEnd = System.nanoTime();\n long dSortDuration = dSortTimeEnd - dSortTimeStart;\n\n System.out.println(\"iQsort time: \" + iSortDuration + \"\\n\");\n System.out.println(\"dbQSort time: \" + dSortDuration + \"\\n\");\n\n System.out.println(\"Is int array sorted: ?\" + isSorted(i));\n System.out.println(\"Is double array sorted: ?\" + dIsSorted(d));\n }", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "public static void specialSets() {\n\t\tSystem.out.printf(\"%12s%15s%15s%10s%10s%10s%10s%n\",\"Size\",\"Range\",\"Pre-Sort Type\",\"Insertion\",\"Selectuon\",\"Quick\",\"Merge\");\n\t\tint[] array;\n\t\t//200K\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 200000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Sorted array\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Sorted\");\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//Reverse Sorted\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-200k\",\"Reverse Sorted\");\n\t\tint[] temp = new int[array.length];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\ttemp[i] = array[array.length -1 -i];\n\t\t}\n\t\tfourSorts(temp);\n\t\tSystem.out.println();\n\t\t//Range 1-20\n\t\tSystem.out.printf(\"%12d%15s%15s\",200000,\"1-20\",\"N/A\");\n\t\tarray = generateArray(200000, 1, 20);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "public static void s1RandomTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Random\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }", "public FastNondominatedSorting() {\r\n\t\tthis(new ParetoDominanceComparator());\r\n\t}", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveInsertionSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[3] = new IntPlus(-1);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [0, 2, 4, -1, 8, 10]\n Should require 7 comparisons to sort\n */\n comp.resetCount();\n Sorting.insertionSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public static void main(String[] args) throws IOException{\n final int ELEMENT_SIZE = 1000;\n \n // How large (how many elements) the arrays will be\n int dataSize = 0;\n // How many times the program will run\n int trials = 1;\n // User-inputted number that dictates what sort the program will use\n int sortSelector = 0;\n // Variables for running time caculations\n long startTime = 0;\n long endTime = 0;\n long duration = 0;\n // The longest time a sort ran, in seconds\n double maxTime = 0;\n // The fastest time a sort ran, in seconds\n double minTime = Double.MAX_VALUE;\n // The average time a sort ran, running \"trials\" times\n double average = 0;\n // A duration a sort ran, in seconds\n double durationSeconds = 0;\n\n Scanner reader = new Scanner(System.in);\n \n System.out.println(\"Please enter a size for the test array: \");\n dataSize = reader.nextInt();\n \n System.out.println(\"Please enter the amount of times you would like the sort to run: \");\n trials = reader.nextInt();\n // Slection menu for which sort to run\n System.out.println(\"Please designate the sorting algorithim you would like the program to use: \");\n System.out.println(\"Enter \\\"1\\\" for BubbleSort \");\n System.out.println(\"Enter \\\"2\\\" for SelectionSort \");\n System.out.println(\"Enter \\\"3\\\" for InsertionSort \");\n System.out.println(\"Enter \\\"4\\\" for QuickSort \");\n System.out.println(\"Enter \\\"5\\\" for MergeSort \");\n sortSelector = reader.nextInt();\n // Print sorting results header and begin running sort(s)\n System.out.println();\n System.out.println(\"Trial Running times (in seconds): \");\n \n int[] original = new int[dataSize];\n int[] sortingArray = new int[dataSize];\n \n // This loop controls the amount of times a sorting algorithim will run\n for(int i = 1; i <= trials; i++){\n // Start by generating test array\n for(int j = 0; j < dataSize; j++){\n original[j] = (int)((Math.random() * ELEMENT_SIZE) + 1);\n }\n // Copy the original to a working array\n for(int j = 0; j < dataSize; j++){\n sortingArray[j] = original[j];\n }\n // Start the \"timer\"\n startTime = System.nanoTime();\n // Run whatever sort the user selected, BubbleSort is default\n switch(sortSelector){\n case 1:\n BubbleSort.runSort(sortingArray);\n break;\n case 2:\n SelectionSort.runSort(sortingArray);\n break;\n case 3:\n InsertionSort.runSort(sortingArray);\n break;\n case 4:\n QuickSort.runSort(sortingArray);\n break;\n case 5:\n MergeSort.runSort(sortingArray);\n break;\n default:\n BubbleSort.runSort(sortingArray);\n break;\n }\n // End the \"timer\"\n endTime = System.nanoTime();\n // Generate the program's running duration\n duration = endTime - startTime;\n // Convert running time to seconds\n durationSeconds = ((double)duration / 1000000000.0);\n // Print the duration (to file)\n System.out.println(durationSeconds);\n // Update min/max running times\n if(durationSeconds < minTime){\n minTime = durationSeconds;\n }\n if(durationSeconds > maxTime){\n maxTime = durationSeconds;\n }\n // Add latest trial to running average\n average += durationSeconds;\n }\n // After trials conclude, the average running time has to be calculated\n average /= ((double)trials);\n \n System.out.println(\"\\nAfter running your selected sort \" + trials + \" times: \");\n System.out.println(\"The slowest sort took \" + maxTime + \" seconds, \");\n System.out.println(\"the fastest sort took \" + minTime + \" seconds, \");\n System.out.println(\"and the average running time was \" + average + \" seconds. \");\n \n // Left this in for testing the sorting algorithims themselves\n /*\n System.out.println();\n for(int element : original){\n System.out.println(element);\n }\n System.out.println();\n for(int element : sortingArray){\n System.out.println(element);\n }\n */\n }", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "public void radixSorting() {\n\t\t\n\t}", "@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }", "public static void main(String[] args) {\n\n\t\tint num;\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor (;;) {\n\t\t\tnum = scan.nextInt();\n\t\t\tif (num == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint data[] = new int[num];\n\t\t\tRandom random = new Random();\n\t\t\tfor (int i = 0; i < num; i++) {\n\t\t\t\tdata[i] = random.nextInt(num);\n\t\t\t}\n\t\n\t\t\tint data1[] = Arrays.copyOf(data, num);\n\t\t\tint data2[] = Arrays.copyOf(data, num);\n\t\t\tint data3[] = Arrays.copyOf(data, num);\n\t\t\tint data4[] = Arrays.copyOf(data, num);\n\t\t\t System.out.println(\"原始数据:\");\n\t\t\tprintArray(data);\n\t\t\t// 测试冒泡\n\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.bubbleSort(data);\n\t\t\t System.out.println(\"冒泡排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data);\n\t\t\t// 测试选择\n\t\t\t currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.selectSort(data1);\n\t\t\t System.out.println(\"選擇排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data1);\n\t\t\t// 测试插入\n\t\t\t currentTime = System.currentTimeMillis();\n\t\t\t SortUtil.insertSort(data2);\n\t\t\t System.out.println(\"插入排序用时间:\"+(System.currentTimeMillis()-currentTime));\n\t\t\t printArray(data2);\n\t\t\t// 测试快排\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\tSortUtil.quickSort(data3, 0, data3.length - 1);\n\t\t\tSystem.out.println(\"快速排序用时间:\" + (System.currentTimeMillis() - currentTime));\n\t\t\tprintArray(data3);\n\t\t\t// 测试堆排\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\tSortUtil.heapSort(data4);\n\t\t\tSystem.out.println(\"堆排序用时间:\" + (System.currentTimeMillis() - currentTime));\n\t\t\tprintArray(data4);\n\t\t}\n\n\t}", "private PerfectMergeSort() {}", "public String doSort();", "public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "public static void main(String arg []) {\r\n\t\tint n = 8; //problem size\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Insertion(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Selection(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new Bubble(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortFateful(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortCentralElement(n));\r\n\t\t\r\n\t\ttestSortingAlgorithm(new QuicksortMedianOfThree(n));\r\n\t}", "void sort();", "void sort();", "public static void main(String[] args) {\n Integer[] s = {39, 20, 40, 1, 2, 3, 4, 5, 6, 7};\n Stopwatch timer = new Stopwatch();\n\n sort(s);\n\n double time = timer.elapsedTime();\n assert isSorted(s);\n StdOut.print(\"time: \" + time);\n StdOut.println();\n show(s);\n }", "public static void main(String[] args) { \n\t\tint[] try1 = new int[1000000000];\n\t\tRandom rand = new Random();\n\t\tfor(int i = 0; i < try1.length; i++) {\n\t\t\ttry1[i] = rand.nextInt();\n\t\t}\n // System.out.println(toString1(try1));\n\t\tLong startTime = new Long(System.currentTimeMillis());\n\t\tquickSortIn(try1, 0, try1.length - 1, 20);\n\t\tLong endTime = new Long(System.currentTimeMillis());\n\t\tSystem.out.println(endTime.intValue() - startTime.intValue());\n // System.out.println(toString1(try1));\n\n\n // Which test to run?\n\t // test();\n\t // test2();\n\t // test3();\n\t // test4();\n\t\n\t}", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public double[] sort(double[] data) {\r\n for (int pass = 1; pass < data.length; pass++) {\r\n for (int element=0;element<data.length-1;element++) {\r\n if (data[element] > data[element + 1]){\r\n double hold = data[element];\r\n this.countOp();\r\n data[element] = data[element + 1];\r\n this.countOp();\r\n data[element + 1] = hold;\r\n this.countOp();\r\n }\r\n }\r\n }\r\n return data;\r\n }", "private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t// Part 1 Bench Testing\n\t\t// -----------------------------------\n\n\t\t// -----------------------------------\n\t\t// Array and other declarations\n\t\t// -----------------------------------\n\t\tStopWatch sw = new StopWatch(); // timer for measuring execution speed\n\t\tfinal int SIZE = 100000; // size of array we are using\n\n\t\tint[] sourceArray, copyArray; // arrays for testing insertionSort and selectionSort\n\t\tInteger[] sourceArray2, copyArray2; // arrays for testing shell, merge, quicksort\n\n\t\t// -------------------------------------------------\n\t\t// Array initialization to a predetermined shuffle\n\t\t// -------------------------------------------------\n\t\tsourceArray = new int[SIZE]; // for use in selection, insertion sort\n\t\tscrambleArray(sourceArray, true); // scramble to a random state\n\t\tsourceArray2 = new Integer[SIZE]; // for use in shell,merge,quicksort\n\t\tscrambleArray(sourceArray2, true); // scramble to a random state\n\n\t\t// ---------------------------------------\n\t\t// SELECTION SORT\n\t\t// ---------------------------------------\n\t\t// for all sorts, we must reset copyArray\n\t\t// to sourceArray before sorting\n\t\t// ---------------------------------------\n\t\tcopyArray = Arrays.copyOf(sourceArray, SIZE);\n\n\t\tSystem.out.println(\"Before Selection Sort\");\n\t\t// printArray(copyArray);\n\t\tSystem.out.println(\"Selection Sort\");\n\t\tsw.start(); // start timer\n\t\tSortArray.selectionSort(copyArray, SIZE);\n\t\tsw.stop(); // stop timer\n\t\tSystem.out.println(\"selection sort took \" + sw.getElapsedTime() + \" msec\");\n\t\tSystem.out.println(\"After Selection Sort\");\n\t\t// printArray(copyArray);\n\n\t\t// -----------------------------------------\n\t\t// INSERTION SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 2 here\n\n\t\t// -----------------------------------------\n\t\t// SHELL SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 3 here\n\n\t\t// -----------------------------------------\n\t\t// MERGE SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 4 here\n\n\t\t// -----------------------------------------\n\t\t// QUICK SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 5 here\n\n\t}", "public void bucketSort() {\n MyArray ten = new MyArray();\n MyArray hundred = new MyArray();\n MyArray thousand = new MyArray();\n MyArray tenThousand = new MyArray();\n MyArray hundredThousand = new MyArray();\n MyArray million = new MyArray();\n MyArray tenMillion = new MyArray();\n MyArray hundredMillion = new MyArray();\n MyArray billion = new MyArray();\n\n for (int i = 0; i < array.length; i++) {\n if ((int) array[i] / 10 < 0) {\n ten.add(array[i]);\n } else if ((int) array[i] / 100 < 0) {\n hundred.add(array[i]);\n } else if ((int) array[i] / 1000 < 0) {\n thousand.add(array[i]);\n } else if ((int) array[i] / 10000 < 0) {\n tenThousand.add(array[i]);\n } else if ((int) array[i] / 100000 < 0) {\n hundredThousand.add(array[i]);\n } else if ((int) array[i] / 1000000 < 0) {\n million.add(array[i]);\n } else if ((int) array[i] / 10000000 < 0) {\n tenMillion.add(array[i]);\n } else if ((int) array[i] / 100000000 < 0) {\n hundredMillion.add(array[i]);\n } else {\n billion.add(array[i]);\n }\n }\n\n ten = ten.radixSort(ten);\n hundred = hundred.radixSort(hundred);\n thousand = thousand.radixSort(thousand);\n tenThousand = tenThousand.radixSort(tenThousand);\n hundredThousand = hundredThousand.radixSort(hundredThousand);\n million = million.radixSort(million);\n tenMillion = tenMillion.radixSort(tenMillion);\n hundredMillion = hundredMillion.radixSort(hundredMillion);\n billion = billion.radixSort(billion);\n\n int j = 0;\n for (int i = 0; i < ten.getSize(); i++) {\n array[i] = (T) ten.get(i);\n j++;\n }\n for (int i = 0; i < hundred.getSize(); i++) {\n array[i] = (T) hundred.get(i);\n j++;\n }\n for (int i = 0; i < thousand.getSize(); i++) {\n array[i] = (T) thousand.get(i);\n j++;\n }\n for (int i = 0; i < tenThousand.getSize(); i++) {\n array[i] = (T) tenThousand.get(i);\n j++;\n }\n for (int i = 0; i < hundredThousand.getSize(); i++) {\n array[i] = (T) hundredThousand.get(i);\n j++;\n }\n for (int i = 0; i < million.getSize(); i++) {\n array[i] = (T) million.get(i);\n j++;\n }\n for (int i = 0; i < tenMillion.getSize(); i++) {\n array[i] = (T) tenMillion.get(i);\n j++;\n }\n for (int i = 0; i < hundredMillion.getSize(); i++) {\n array[j] = (T) hundredMillion.get(i);\n j++;\n }\n for (int i = 0; i < billion.getSize(); i++) {\n array[j] = (T) billion.get(i);\n j++;\n }\n\n }", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public static void main(String args[])\r\n {\r\n JavaSort ob = new JavaSort();\r\n \r\n CatalogueItem arr[] = {\r\n new CatalogueItem( 3, \"Life of Pi\",\"Books\"),\r\n new CatalogueItem( 7, \"Deelongie 4 way toaster\",\"Home and Kitchen\"),\r\n new CatalogueItem( 2, \"Glorbarl knife set\",\"Home and Kitchen\"),\r\n new CatalogueItem( 4, \"Diesorn vacuum cleaner\",\"Appliances\"),\r\n new CatalogueItem( 5, \"Jennie Olivier sauce pan\",\"Home and Kitchen\"),\r\n new CatalogueItem( 6, \"This book will save your life\",\"Books\"),\r\n new CatalogueItem( 9, \"Kemwould hand mixer\",\"Appliances\"),\r\n new CatalogueItem( 1, \"Java for Dummies\",\"Books\"),\r\n };\r\n System.out.println(\"The Unsorted array is\");\r\n ob.printArray(arr);\r\n\r\n /*\r\n //apply sort\r\n ob.doOptimisedBubbleSort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n */\r\n\r\n sort(arr);\r\n System.out.println(\"The array sorted by category using Java built in sort is\");\r\n ob.printArray(arr);\r\n\r\n System.out.println(\"The algorithm that is most efficient is the Java built in sort.\\n\\n\" +\r\n \"It uses Timsort, which has on average is the same level of time complexity\\n\" +\r\n \"as Quicksort - O(n log(n)). But Timsort is better at it's best and worst\\n\" +\r\n \"when compared with Quicksort.\\n\\n\" +\r\n \"Quicksort best = O(n log(n)) worst = O(n^2)\\n\" +\r\n \"Timsort best = O(n) worst = O(n log(n))\\n\" +\r\n \"\\n\" +\r\n \"This means at it's best, Timsort will only have to traverse the array 'n' times, to sort.\\n\" +\r\n \"And Quicksort at it's worst will have to check an array length squared amount of elements.\\n\");\r\n\r\n }", "public static double testSelectionSort(Integer[] list){\n\t\tdouble totalTime = 0;\n\t\tfor (int i = 0; i < TEST_RUNS; i++){\n\t\t\tInteger[] tmp = Arrays.copyOf(list, list.length);\t// make copy of list\n\t\t\tt.start();\t\t\t\t\t\t\t\t\t\t\t// start clock\t\n\t\t\tSelectionSort.sort(tmp);\t\t\t\t\t\t\t// sort copy\n\t\t\ttotalTime += t.getTime();\t\t\t\t\t\t\t// end clock and increment total\n\t\t\tSystem.gc();\n\t\t}\n\t\treturn totalTime / TEST_RUNS;\n\t}", "public static void sort (int[] data)\n {\n \t\n \tfor(int i = 0; i < data.length-1; i++)\n \t{\n \t\tint max = data[i];\n \t\tint indexOfMax = i;\n \t\t\n \t\tfor(int j = i + 1; j < data.length; j++)\n \t\t{\n \t\t\tif(data[j] > max)\n \t\t\t{\n \t\t\t\tmax = data[j];\n \t\t\t\tindexOfMax = j;\n \t\t\t}\n \t\t}\n \t\t\n \t\tdata[indexOfMax] = data[i];\n \t\tdata[i] = max;\n \t}\n \t\n // Your TA will help you write selection sort in lab. \n }", "public static void randomArraySorts() {\n int[] randomArr = new int[1000];\n for (int i = 0; i < randomArr.length; i++) {\n randomArr[i] = (int) (Math.random() * 5000 + 1);\n }\n\n // Heap Sort of random array\n int arr[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr[i] = randomArr[i];\n }\n\n HeapSort hs = new HeapSort();\n\n System.out.println(\"Given Array: \");\n hs.printArray(arr);\n\n long start = System.currentTimeMillis();\n hs.sort(arr);\n long end = System.currentTimeMillis();\n long time = end - start;\n\n System.out.println(\"Heap Sorted Array: \");\n hs.printArray(arr);\n System.out.println(\"Heap Sort Time: \" + time);\n\n // Merge Sort of random array\n System.out.println();\n int arr2[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr2[i] = randomArr[i];\n }\n\n MergeSort ms = new MergeSort();\n\n System.out.println(\"Given Array: \");\n ms.printArray(arr2);\n\n start = System.currentTimeMillis();\n ms.sort(arr2, 0, arr.length - 1);\n end = System.currentTimeMillis();\n time = end - start;\n\n System.out.println(\"Merge Sorted Array: \");\n ms.printArray(arr2);\n System.out.println(\"Merge Sort Time: \" + time);\n\n // Insert Sort of random array\n System.out.println();\n int arr3[] = new int[1000];\n for (int i = 0; i < 1000; i++) {\n arr3[i] = randomArr[i];\n }\n\n System.out.println(\"Given Array: \");\n print(arr3, arr3.length);\n\n start = System.currentTimeMillis();\n insertSort(arr3);\n end = System.currentTimeMillis();\n time = end - start;\n\n System.out.println(\"Insert Sorted Array: \");\n print(arr3, arr3.length);\n System.out.println(\"Insert Sort Time: \" + time);\n }", "private void doSort (Column A, int [] i, int p, int r, int begin) {//double[] A, int p, int r, MutableTable t) {\n\t\tif (p < r) {\n\t\t\tint q = partition(A, i, p, r, begin);\n\t\t\tdoSort(A, i, p, q, begin);\n\t\t\tdoSort(A, i, q + 1, r, begin);\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException { \n \t\n In in = new In(args[0]);\n \n\t\t // Storing file input in an array\n int[] a = in.readAllInts();\n\n // b contains sorted integers from a (You can use Java Arrays.sort() method)\n int[] b = new int[a.length];\n for(int i = 0; i < a.length; i++) {\n \tb[i] = a[i];\n }\n Arrays.sort(b);\n // c contains all integers stored in reverse order \n int[] c = new int[b.length];\n for(int i = 0; i < b.length; i++) {\n \tc[i] = b[b.length - 1 - i];\n }\n // (you can have your own O(n) solution to get c from b\n \n // d contains almost sorted array \n int[] d = new int[b.length];\n\t\tfor(int i = 0 ; i < b.length; i++) {\n\t\t\td[i] = b[i];\n\t\t}\n\t\tfor(int i = 0; i < d.length * 0.1; i++) {\n\t\t\tint temp = d[i];\n\t\t\td[i] = d[d.length - 1 - i];\n\t\t\td[d.length - 1 - i] = temp;\n\t\t}\n //(You can copy b to a and then perform (0.1 * d.length) many swaps to acheive this. \n \n //TODO: \n // Read the second argument and based on input select the sorting algorithm\n // * 0 = Arrays.sort() (Java Default)\n // Perform sorting on a,b,c,d. Pring runtime for each case along with timestamp and record those. \n // For runtime and priting, you can use the same code from Lab 4 as follows:\n \n // * 1 = Bubble Sort\n // * 3 = Insertion Sort \n // * 4 = Mergesort\n // * 5 = Quicksort\n\t\t\n\t\t//performs the default java sort on each array\n if(args[1].equals(\"0\")) {\n \t\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n //TODO: Replace with the algorithm used \n String algorithmUsed = \"Java default (Arrays.sort())\";\n //starts the clock \n Stopwatch timer = new Stopwatch();\n //sorts the array\n Arrays.sort(a);\n //gets the time when done sorting\n double time = timer.elapsedTimeMillis();\n String arrayUsed = \"a\";\n //prints to the terminal all the relevant information\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n //prints the now sorted array to a text file\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n // Write the resultant array to a file (Each time you run a program 4 output files should be generated. (one for each a,b,c, and d)\n Stopwatch timer2 = new Stopwatch(); \n Arrays.sort(b);\n time = timer2.elapsedTimeMillis();\n arrayUsed = \"b\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n Stopwatch timer3 = new Stopwatch();\n Arrays.sort(c);\n time = timer3.elapsedTimeMillis();\n arrayUsed = \"c\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n Stopwatch timer4 = new Stopwatch();\n Arrays.sort(d);\n time = timer4.elapsedTimeMillis();\n arrayUsed = \"d\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"1\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Bubble sort\";\n Stopwatch timer1 = new Stopwatch();\n for(int i = 0; i < a.length; i++) {\n \tfor(int j = a.length-1; j > i; j--) {\n \t\tif(a[j] < a[j-1]) {\n \t\t\tint temp = a[j];\n \t\t\ta[j] = a[j-1];\n \t\t\ta[j-1] = temp;\n \t\t}\n \t}\n }\n double time = timer1.elapsedTimeMillis();\n String arrayUsed = \"a\";\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n\n arrayUsed = \"b\";\n Stopwatch timer2 = new Stopwatch();\n for(int i = 0; i < b.length; i++) {\n \tfor(int j = b.length - 1; j > 1; j--) {\n \t\tif(b[j] < b[j-1]) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\tb[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer2.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"c\";\n Stopwatch timer3 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = c.length -1; j > 0; j--) {\n \t\t\tif(c[j] < c[j-1]) {\n \t\t\t\tint temp = c[j];\n \t\t\t\t\tc[j] = c[j-1];\n \t\t\t\t\t\tc[i] = temp;\n \t\t}\n \t}\n }\n time = timer3.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n \n arrayUsed = \"d\";\n Stopwatch timer4 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = d.length -1; j > 1; j--) {\n \t\t\tif(d[j] < d[j-1]) {\n \t\t\t\tint temp = d[j];\n \t\t\t\t\td[j] = d[j-1];\n \t\t\t\t\t\td[j-1] = temp;\n \t\t}\n \t}\n }\n time = timer4.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n }\n if(args[1].equals(\"2\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Selection sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer5 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = a.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > a[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = a[minIndex];\n \ta[minIndex] = a[i];\n \ta[i] = temp;\n }\n double time = timer5.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out);\n for(int i = 0; i < a.length; i++) {\n \tSystem.out.print(a[i] + \" \");\n }\n arrayUsed = \"b\";\n Stopwatch timer6 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = b.length - 1; j > i; j--) {\n \t\t\t\tif(a[minIndex] > b[j])\n \t\t\tminIndex = j;\n \t}\n \tint temp = b[minIndex];\n \tb[minIndex] = b[i];\n \tb[i] = temp;\n }\n time = timer6.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \t\n arrayUsed = \"c\";\n Stopwatch timer7 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = c.length - 1; j > i; j--) {\n \t\t\t\tif(c[minIndex] > c[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = c[minIndex];\n \tc[minIndex] = c[i];\n \tc[i] = temp;\n }\n time = timer7.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out2);\n for(int i = 0; i < c.length; i++) {\n \tSystem.out.print(c[i] + \" \");\n }\n arrayUsed = \"d\";\n Stopwatch timer8 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i ++) {\n \t\tint minIndex = i;\n \t\t\tfor(int j = d.length - 1; j > i; j--) {\n \t\t\t\tif(d[minIndex] > d[j])\n \t\t\t\t\tminIndex = j;\n \t}\n \tint temp = d[minIndex];\n \t\td[minIndex] = d[i];\n \t\td[i] = temp;\n }\n time = timer8.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"3\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n //TODO: Replace with your own netid\n String netID = \"amusaa\";\n \n String algorithmUsed = \"Insertion sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer9 = new Stopwatch();\n \tfor(int i = 0; i < a.length; i++) {\n \t\tfor(int j = i; (j > 0) && (a[j] < a[j-1]); j--) {\n \t\t\tint temp = a[j];\n \t\t\t\ta[j] = a[j-1];\n \t\t\t\t\ta[j-1] = temp;\n \t}\n }\n double time = timer9.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer10 = new Stopwatch();\n \tfor(int i = 0; i < b.length; i++) {\n \t\tfor(int j = i; (j>0) && (b[j] < b[j-1]); j--) {\n \t\t\tint temp = b[j];\n \t\t\tb[j] = b[j-1];\n \t\t\t\tb[j-1] = temp;\n \t}\n }\n time = timer10.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer11 = new Stopwatch();\n \tfor(int i = 0; i < c.length; i++) {\n \t\tfor(int j = i; (j>0) && (c[j] < c[j-1]); j--) {\n \t\t\tint temp = c[j];\n \t\t\tc[j] = c[j-1];\n \t\t\t\tc[j-1] = temp;\n \t}\n }\n time = timer11.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n Stopwatch timer12 = new Stopwatch();\n \tfor(int i = 0; i < d.length; i++) {\n \t\tfor(int j = i; (j > 0) && (d[j] < d[j-1]); j--) {\n \t\t\tint temp = d[j];\n \t\t\t\td[j] = d[j-1];\n \t\t\t\t\td[j-1] = temp;\n \t}\n }\n time = timer12.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"4\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Merge sort\";\n \n String arrayUsed = \"a\";\n int[] temp1 = new int[a.length];\n Stopwatch timer13 = new Stopwatch();\n mergeSort(a, temp1, 0, a.length-1);\n double time = timer13.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0 ; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n int[] temp2 = new int[b.length];\n Stopwatch timer14 = new Stopwatch();\n mergeSort(b, temp2, 0, b.length -1);\n time = timer14.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n int[] temp3 = new int[c.length];\n Stopwatch timer15 = new Stopwatch();\n mergeSort(c, temp3, 0, c.length-1);\n time = timer15.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++) {\n \t\tSystem.out.print(c[i] + \" \");\n }\n \n arrayUsed = \"d\";\n int[] temp4 = new int[d.length];\n Stopwatch timer16 = new Stopwatch();\n mergeSort(d, temp4, 0, d.length -1);\n time = timer16.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++) {\n \t\tSystem.out.print(d[i] + \" \");\n }\n }\n if(args[1].equals(\"5\")) {\n \tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n String netID = \"amusaa\";\n String algorithmUsed = \"Quick sort\";\n \n String arrayUsed = \"a\";\n Stopwatch timer17 = new Stopwatch();\n quickSort(a, 0, a.length-1);\n double time = timer17.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out1 = new PrintStream(new FileOutputStream(\"a.txt\"));\n System.setOut(out1);\n \tfor(int i = 0; i < a.length; i++) {\n \t\tSystem.out.print(a[i] + \" \");\n }\n \n arrayUsed = \"b\";\n Stopwatch timer18 = new Stopwatch();\n quickSort(b, 0, b.length-1);\n time = timer18.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out2 = new PrintStream(new FileOutputStream(\"b.txt\"));\n System.setOut(out2);\n \tfor(int i = 0; i < b.length; i++) {\n \t\tSystem.out.print(b[i] + \" \");\n }\n \n arrayUsed = \"c\";\n Stopwatch timer19 = new Stopwatch();\n quickSort(c, 0, c.length-1);\n time = timer19.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out3 = new PrintStream(new FileOutputStream(\"c.txt\"));\n System.setOut(out3);\n \tfor(int i = 0; i < c.length; i++)\n \t\tSystem.out.print(c[i] + \" \");\n \n arrayUsed = \"d\";\n Stopwatch timer20 = new Stopwatch();\n quickSort(d, 0, d.length -1);\n time = timer20.elapsedTimeMillis();\n StdOut.printf(\"%s %s %8.1f %s %s %s\\n\", algorithmUsed, arrayUsed, time, timeStamp, netID, args[0]);\n PrintStream out4 = new PrintStream(new FileOutputStream(\"d.txt\"));\n System.setOut(out4);\n \tfor(int i = 0; i < d.length; i++)\n \t\tSystem.out.print(d[i] + \" \");\n }\n \n }", "private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}", "private void Sort(int[] list)\r\n {\r\n switch (SortField.getText())\r\n {\r\n case \"Insertion Sort\":\r\n {\r\n InsertionSort insertionSort = new InsertionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n insertionSort.insertionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(insertionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(insertionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*2)\");\r\n\r\n break;\r\n }\r\n case \"Selection Sort\":\r\n {\r\n SelectionSort selectionSort = new SelectionSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n selectionSort.selectionSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(selectionSort.getComparisons()));\r\n MovementField.setText(String.valueOf(selectionSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n2)\");\r\n\r\n break;\r\n }\r\n case \"Quick Sort\":\r\n {\r\n QuickSort quickSort = new QuickSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n quickSort.quickSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(quickSort.getComparisons()));\r\n MovementField.setText(String.valueOf(quickSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n log n)\");\r\n\r\n break;\r\n }\r\n case \"Merge Sort\":\r\n {\r\n MergeSort mergeSort = new MergeSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n mergeSort.mergeSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(mergeSort.getComparisons()));\r\n MovementField.setText(String.valueOf(mergeSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"T(n) = 2T(n/2) + θ(n)\");\r\n\r\n break;\r\n }\r\n case \"Heap Sort\":\r\n {\r\n HeapSort heapSort = new HeapSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n heapSort.heapSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(heapSort.getComparisons()));\r\n MovementField.setText(String.valueOf(heapSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(nLogn)\");\r\n\r\n break;\r\n }\r\n case \"Radix Sort\":\r\n {\r\n RadixSort radixSort = new RadixSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n radixSort.radixSort(list, Integer.parseInt(SizeField.getText()));\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(\"Radix Sort has 0 comparisons\");\r\n MovementField.setText(String.valueOf(radixSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(kn)\");\r\n\r\n break;\r\n }\r\n\r\n case \"Bubble Sort\":\r\n {\r\n BubbleSort bubbleSort = new BubbleSort();\r\n\r\n long startTime = System.currentTimeMillis();\r\n\r\n bubbleSort.bubbleSort(list);\r\n\r\n long endTime = System.currentTimeMillis();\r\n\r\n CompareField.setText(String.valueOf(bubbleSort.getComparisons()));\r\n MovementField.setText(String.valueOf(bubbleSort.getMovements()));\r\n TimeField.setText((endTime - startTime + \" milliseconds\"));\r\n TimeComField.setText(\"O(n*n)\");\r\n\r\n break;\r\n }\r\n }\r\n }", "public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}", "private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }", "public static void main(String[] args) {\n int sampleArray[] = arrayInitializer(15000);\n SortArray testArray = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray.toString());\n\n // Sort the array with Bubbles method\n long startTime = System.currentTimeMillis();\n testArray.sortArray();\n long stopTime = System.currentTimeMillis();\n System.out.println(\"Sorted by Bubbles method array is:\");\n //System.out.println(testArray.toString());\n showTime(\"Bubbles sorting took: \", startTime, stopTime);\n\n // Sort the array with Binary Tree method\n SortArray testArray2 = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray2.toString());\n\n System.out.println(\"Sorted by Binary tree method array is:\");\n startTime = System.currentTimeMillis();\n testArray2.sortArrayBinaryTree();\n stopTime = System.currentTimeMillis();\n //System.out.println(testArray2.toString());\n showTime(\"Tree sorting took: \", startTime, stopTime);\n System.out.println(\"Job is done!\");\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "static long[] radixsort(int arr[], int n)\r\n\r\n {\n\r\n int m = getMax(arr, n);\r\n\r\n long st = System.nanoTime();\r\n\r\n\r\n\r\n for (int exp = 1; m/exp > 0; exp *= 10)\r\n\r\n countSort(arr, n, exp);\r\n\r\n \r\n\r\n long et = System.nanoTime();\r\n\r\n threeVals[2] = et - st;\r\n\r\n return threeVals;\r\n\r\n }", "public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}", "public static void test() {\n\t\tdouble[][] data = new double[90][4];\n\t\tint trials = 10;\n\t\tint count = 0;\n\t\tRandom rand = new Random();\n\n\t\tfor(int n = 10000000; n < 100000000; n = n + 1000000) {\n\t\t\tint sum = 0;\n\t\t\tfor(int k = 0; k < trials; k++) {\n\t\t\t\tint[] array = new int[n];\n\t\t\t\tfor(int j = 0; j < array.length; j++) {\n\t\t\t\t\tarray[j] = rand.nextInt();\n\t\t\t\t}\n\t\t\t\tLong startTime = new Long(System.currentTimeMillis());\n\t\t\t\tquickSort(array, 0, array.length - 1);\n\t\t\t\tLong endTime = new Long(System.currentTimeMillis());\n\t\t\t\tsum = sum + (endTime.intValue() - startTime.intValue());\n\t\t\t}\n\t\t\n\t\t\tdouble average = sum / ((double) trials);\n\t\t\tdata[count][0] = count;\n\t\t\tdata[count][1] = n;\n\t\t\tdata[count][2] = average;\n\t\t\tdata[count][3] = average / (n * (Math.log(n)/Math.log(2)));\n\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(toString(data));\n\t}", "public long timeTakenInsertionSort(UnorderedArray dataSize, String numItems, boolean isCoreData){\r\n System.out.println(\"***** Times Taken for set of \" + numItems +\" ******\");\r\n long start, end;\r\n if (isCoreData){\r\n start = System.currentTimeMillis();\r\n dataSize.insertionSortAsc();\r\n end = System.currentTimeMillis();\r\n }\r\n else{\r\n start = System.nanoTime();\r\n dataSize.insertionSortAsc();\r\n end = System.nanoTime();\r\n }\r\n return end - start;\r\n }", "public void sort(int[] a) {\n\t\tint n = a.length;\n\t\tint temp;\n\t\tfor (int gap = n / 2; gap > 0; gap /= 2) {\n\t\t\tfor (int i = gap; i < n; i++) {\n\t\t\t\tfor (int j = i - gap; j >= 0; j -= gap) {\n\t\t\t\t ++totalValCmp;\n\t\t\t\t if (a[j] > a[j + gap]) {\n\t\t\t\t\t temp = a[j];\n\t\t\t\t\t a[j] = a[j + gap];\n\t\t\t\t\t a[j + gap] = temp;\n\t\t\t\t\t ++totalswaps;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void Insertionsort(int a[]) \n\t { \n\t int n = a.length; \n\t for (int i=1; i<n; ++i) \n\t { \n\t int key = a[i]; \n\t int j = i-1;\n\t while (j>=0 && a[j] > key) \n\t { \n\t a[j+1] = a[j]; \n\t j = j-1; \n\t } \n\t a[j+1] = key; \n\t } \n\t }", "public static void main(String[] args){\n\t\t\n\t\tdouble selectionTime, mergeTime, quickTime; \n\t\t\n\t\tSystem.out.println(\"Running All Sorting Algorithms on smaller arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tSelection\\t Merge\\t Quick\\n\");\n\t\t\n\t\t// sort arrays with lengths from *sizes* array (selection, merge & quick)\n\t\tfor (int num = 0; num < sizes.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(sizes[num],0,Integer.MAX_VALUE-1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tselectionTime \t = testSelectionSort(list);\n\t\t\tmergeTime \t = testMergeSort(list);\n\t quickTime \t = testQuickSort(list);\n\t \n\t // generate output (average time for each algo)\n\t System.out.printf(\"%s\\t%.2f\\t\\t %.2f\\t %.2f\\n\",sizes[num],selectionTime,mergeTime,quickTime);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nRunning Merge & Quick Sort Algorithms on big arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tMergeSort\\tQuickSort\\n\");\n\t\t\n\t\t// sort arrays with lengths from *bigger* array (merge & quick)\n\t\tfor (int num = 0; num < bigger.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(bigger[num],0, Integer.MAX_VALUE - 1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tmergeTime \t\t = testMergeSort(list);\n\t\t\tquickTime \t\t = testQuickSort(list);\n\t\t\t\n\t\t\t// generate output (average time for each algo)\n\t\t\tSystem.out.printf(\"%s\\t%.2f\\t\\t%.2f\\n\",bigger[num],mergeTime,quickTime);\n\t\t}\n\t}", "public static boolean testSort(int sortMode, int arraySize, int timeOutLength) {\r\n long totalTime = 0;\r\n long bestCase = 0;\r\n long worstCase = 0;\r\n boolean lengthOk = true;\r\n\r\n for (int i = 0; i < 10; i++) {\r\n //make array of arraySize\r\n long startTime = 0;\r\n long duration = 0;\r\n int[] a = generateRandomArray(arraySize);//generate and populate a random array \r\n //switch statement to choose sorting method. \r\n //timer starts AFTER method is chosen to avoid timing issues\r\n switch (sortMode) {\r\n case BUBBLE_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n bubbleSort(a); //call bubble sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case INSERTION_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n insertionSort(a); //sort with insertion sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case SELECTION_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n selectionSort(a); //sort with selection sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n case MERGE_SORT:\r\n int[] temp = new int[arraySize];\r\n startTime = System.nanoTime();//start the clock!\r\n mergeSort(a, temp, 0, arraySize - 1); //sort with merge sort\r\n duration = System.nanoTime() - startTime; //stop the clock!\r\n break;\r\n case QUICK_SORT:\r\n startTime = System.nanoTime();//start the clock!\r\n quickSort(a, 0, arraySize - 1);//sort with quick sort\r\n duration = System.nanoTime() - startTime; //stop the clock\r\n break;\r\n }//end switch\r\n\r\n //\r\n totalTime += duration;//add run time to total run Times (will be averaged later)\r\n if (bestCase == 0 || duration < bestCase) {\r\n bestCase = duration; //sets sbest case method if not set or better than last best\r\n }\r\n if (worstCase == 0 || worstCase < duration) {\r\n worstCase = duration;//sets worst case method if not set or worse than last worst\r\n }\r\n //typecaste to double, for division. if runtime > timeout value, exit loop\r\n if ((double) totalTime / 1000000000 > timeOutLength) {\r\n lengthOk = false;//set boolean to false\r\n break;//exit for statement! this will take too long\r\n }//end if tooLong\r\n\r\n }//end for \r\n //if operation timed out boolean will be false\r\n if (!lengthOk) {\r\n System.out.printf(\"%40s\", \"Test Aborted: Run Time > \" +timeOutLength );\r\n } //end if\r\n else { //successfully completed\r\n //print formatted output: \r\n double avgTime = (double) totalTime / 10000000000f;\r\n double bCase = (double) bestCase / 1000000000f;\r\n double wCase = (double) worstCase / 1000000000f;\r\n System.out.printf(\"%15.5f\", avgTime);\r\n System.out.printf(\"%15.5f\", bCase);\r\n System.out.printf(\"%15.5f\", wCase);\r\n \r\n \r\n \r\n }//end else\r\n //return boolean indicating success or timeout\r\n return lengthOk;\r\n }", "private void timedSort(SortingAlgorithm algo) throws Exception {\n algo.insertArray(intSelect.getArray());\n long start = System.nanoTime();\n algo.sort();\n long elapsedTime = System.nanoTime() - start;\n\n System.out.print(\"\\n\" + algo + \":\" + elapsedTime / 1000000.0 + \"ms\");\n if (showArray) {\n System.out.println(\" \" + Arrays.toString(algo.getSortTarget()));\n }\n System.out.println();\n }", "public static void searchTest() {\n\t\t//linear tests\n\t\tStopWatch1 timer;\n\t\tint[] array = generateArray(5000000,1,5000000);\n\t\tSystem.out.printf(\"%15s%10s%10s%10s%10s%10s%n\",\"Size\",\"Sort Type\",\"Pre-sort\",\"Value\",\"Index\",\"Time\");\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Random\",temp);\n\t\t\ttimer.start();\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\ttimer.stop();\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t\t\n\t\t}\n\t\tSort.mergeSort(array);\n\t\tfor(int i = 0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Linear\",\"Sorted\",temp);\n\t\t\tint result = Search.linearSearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t\tfor(int i =0; i< 5; i++) {\n\t\t\ttimer = new StopWatch1();\n\t\t\tint temp = (int)(Math.random() * (5000000)) +1;\n\t\t\tSystem.out.printf(\"%15d%10s%10s%10d\",5000000,\"Binary\",\"Sorted\",temp);\n\t\t\tint result = Search.binarySearch(array, temp);\n\t\t\tif(result>0) {\n\t\t\t\tSystem.out.printf(\"%10d\",result);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.printf(\"%10s\",\"Not Found\");\n\t\t\t}\n\t\t\tSystem.out.printf(\"%10d%n\", timer.getElapsedTime());\n\t\t}\n\t}", "public static Integer[] sort(Integer[] X)\n\t{RadixSorting z = new RadixSorting(); //Where elements will be stored from array \n\t int place = 0;\n\t//maxIndex is assigned to numberLength function\n\t int maxIndex = numberLength(findMax(X ,0, X.length-1), 1); \n while (!(place > maxIndex))\n { //Inv: elements in X[0..X.length-1] are sorted && place<maxIndex \n \tbucketize(X, z, place);\n \t//Inv: elements in X[0..length-1]-1 are sorted and place>maxIndex\n debucketize(X);\n //Inv:elements in X[0..length-1] are sorted and place>maxIndex\n place = place + 1; \n //Inv: elements in X[0..X.length-1] are sorted && place<maxIndex \n } \n return (X); \n //Termination: place starts at 0. It is looped every time until finally place will be smaller\n //than maxIndex in which it will then terminate. \n\t}", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static void main(String[] args) {\n\t\tSelectionSort ss = new SelectionSort();\n\t\tInsertionSort is = new InsertionSort();\n\t\tint [] listToSort = ss.listToSort();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tis.insertionSort(listToSort);\n\t\tSystem.out.println(\"Time Taken to Sort :: \"+(System.currentTimeMillis()-startTime)+\"ms\");\n\t\tss.printList(listToSort);\n\n\t}", "private void trIntroSort(int r34, int r35, int r36, int r37, int r38, io.netty.handler.codec.compression.Bzip2DivSufSort.TRBudget r39, int r40) {\n /*\n r33 = this;\n r0 = r33;\n r0 = r0.SA;\n r16 = r0;\n r4 = 64;\n r0 = new io.netty.handler.codec.compression.Bzip2DivSufSort.StackEntry[r4];\n r29 = r0;\n r32 = 0;\n r27 = 0;\n r4 = r38 - r37;\n r22 = trLog(r4);\n r28 = r27;\n r23 = r22;\n L_0x001a:\n if (r23 >= 0) goto L_0x02b6;\n L_0x001c:\n r4 = -1;\n r0 = r23;\n if (r0 != r4) goto L_0x01a4;\n L_0x0021:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x0050;\n L_0x002d:\n r22 = r23;\n L_0x002f:\n r26 = 0;\n L_0x0031:\n r0 = r26;\n r1 = r28;\n if (r0 >= r1) goto L_0x072a;\n L_0x0037:\n r4 = r29[r26];\n r4 = r4.d;\n r5 = -3;\n if (r4 != r5) goto L_0x004d;\n L_0x003e:\n r4 = r29[r26];\n r4 = r4.b;\n r5 = r29[r26];\n r5 = r5.c;\n r0 = r33;\n r1 = r34;\n r0.lsUpdateGroup(r1, r4, r5);\n L_0x004d:\n r26 = r26 + 1;\n goto L_0x0031;\n L_0x0050:\n r6 = r35 + -1;\n r10 = r38 + -1;\n r4 = r33;\n r5 = r34;\n r7 = r36;\n r8 = r37;\n r9 = r38;\n r25 = r4.trPartition(r5, r6, r7, r8, r9, r10);\n r0 = r25;\n r8 = r0.first;\n r0 = r25;\n r9 = r0.last;\n r0 = r37;\n if (r0 < r8) goto L_0x0072;\n L_0x006e:\n r0 = r38;\n if (r9 >= r0) goto L_0x016d;\n L_0x0072:\n r0 = r38;\n if (r8 >= r0) goto L_0x0087;\n L_0x0076:\n r17 = r37;\n r31 = r8 + -1;\n L_0x007a:\n r0 = r17;\n if (r0 >= r8) goto L_0x0087;\n L_0x007e:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x007a;\n L_0x0087:\n r0 = r38;\n if (r9 >= r0) goto L_0x009c;\n L_0x008b:\n r17 = r8;\n r31 = r9 + -1;\n L_0x008f:\n r0 = r17;\n if (r0 >= r9) goto L_0x009c;\n L_0x0093:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x008f;\n L_0x009c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = 0;\n r6 = 0;\n r4.<init>(r5, r8, r9, r6);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + -1;\n r6 = -2;\n r0 = r37;\n r1 = r38;\n r4.<init>(r5, r0, r1, r6);\n r29[r27] = r4;\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x0117;\n L_0x00bd:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x00e3;\n L_0x00c2:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r38 - r9;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r9, r1, r5);\n r29[r28] = r4;\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n L_0x00dd:\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x00e3:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x00f3;\n L_0x00e8:\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x00f3:\n if (r28 != 0) goto L_0x00fa;\n L_0x00f5:\n r27 = r28;\n r22 = r23;\n L_0x00f9:\n return;\n L_0x00fa:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x0117:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0138;\n L_0x011c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r8 - r37;\n r5 = trLog(r5);\n r0 = r35;\n r1 = r37;\n r4.<init>(r0, r1, r8, r5);\n r29[r28] = r4;\n r37 = r9;\n r4 = r38 - r9;\n r22 = trLog(r4);\n goto L_0x00dd;\n L_0x0138:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0148;\n L_0x013d:\n r38 = r8;\n r4 = r8 - r37;\n r22 = trLog(r4);\n r27 = r28;\n goto L_0x00dd;\n L_0x0148:\n if (r28 != 0) goto L_0x014f;\n L_0x014a:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x014f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x016d:\n r17 = r37;\n L_0x016f:\n r0 = r17;\n r1 = r38;\n if (r0 >= r1) goto L_0x017e;\n L_0x0175:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r17;\n r17 = r17 + 1;\n goto L_0x016f;\n L_0x017e:\n if (r28 != 0) goto L_0x0186;\n L_0x0180:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0186:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n goto L_0x00dd;\n L_0x01a4:\n r4 = -2;\n r0 = r23;\n if (r0 != r4) goto L_0x01ea;\n L_0x01a9:\n r27 = r28 + -1;\n r4 = r29[r27];\n r8 = r4.b;\n r4 = r29[r27];\n r9 = r4.c;\n r11 = r35 - r34;\n r4 = r33;\n r5 = r34;\n r6 = r36;\n r7 = r37;\n r10 = r38;\n r4.trCopy(r5, r6, r7, r8, r9, r10, r11);\n if (r27 != 0) goto L_0x01c8;\n L_0x01c4:\n r22 = r23;\n goto L_0x00f9;\n L_0x01c8:\n r27 = r27 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x01ea:\n r4 = r16[r37];\n if (r4 < 0) goto L_0x0202;\n L_0x01ee:\n r8 = r37;\n L_0x01f0:\n r4 = r16[r8];\n r4 = r4 + r34;\n r16[r4] = r8;\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0200;\n L_0x01fc:\n r4 = r16[r8];\n if (r4 >= 0) goto L_0x01f0;\n L_0x0200:\n r37 = r8;\n L_0x0202:\n r0 = r37;\n r1 = r38;\n if (r0 >= r1) goto L_0x028c;\n L_0x0208:\n r8 = r37;\n L_0x020a:\n r4 = r16[r8];\n r4 = r4 ^ -1;\n r16[r8] = r4;\n r8 = r8 + 1;\n r4 = r16[r8];\n if (r4 < 0) goto L_0x020a;\n L_0x0216:\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r5 = r16[r8];\n r5 = r5 + r35;\n r5 = r16[r5];\n if (r4 == r5) goto L_0x0241;\n L_0x0224:\n r4 = r8 - r37;\n r4 = r4 + 1;\n r24 = trLog(r4);\n L_0x022c:\n r8 = r8 + 1;\n r0 = r38;\n if (r8 >= r0) goto L_0x0244;\n L_0x0232:\n r9 = r37;\n r31 = r8 + -1;\n L_0x0236:\n if (r9 >= r8) goto L_0x0244;\n L_0x0238:\n r4 = r16[r9];\n r4 = r4 + r34;\n r16[r4] = r31;\n r9 = r9 + 1;\n goto L_0x0236;\n L_0x0241:\n r24 = -1;\n goto L_0x022c;\n L_0x0244:\n r4 = r8 - r37;\n r5 = r38 - r8;\n if (r4 > r5) goto L_0x0264;\n L_0x024a:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = -3;\n r0 = r35;\n r1 = r38;\n r4.<init>(r0, r8, r1, r5);\n r29[r28] = r4;\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0264:\n r4 = 1;\n r5 = r38 - r8;\n if (r4 >= r5) goto L_0x0282;\n L_0x0269:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r37;\n r1 = r24;\n r4.<init>(r5, r0, r8, r1);\n r29[r28] = r4;\n r37 = r8;\n r22 = -3;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0282:\n r35 = r35 + 1;\n r38 = r8;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x028c:\n if (r28 != 0) goto L_0x0294;\n L_0x028e:\n r27 = r28;\n r22 = r23;\n goto L_0x00f9;\n L_0x0294:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x02b6:\n r4 = r38 - r37;\n r5 = 8;\n if (r4 > r5) goto L_0x02d5;\n L_0x02bc:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 != 0) goto L_0x02cc;\n L_0x02c8:\n r22 = r23;\n goto L_0x002f;\n L_0x02cc:\n r33.trInsertionSort(r34, r35, r36, r37, r38);\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x02d5:\n r22 = r23 + -1;\n if (r23 != 0) goto L_0x0331;\n L_0x02d9:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x02e5:\n r15 = r38 - r37;\n r10 = r33;\n r11 = r34;\n r12 = r35;\n r13 = r36;\n r14 = r37;\n r10.trHeapSort(r11, r12, r13, r14, r15);\n r8 = r38 + -1;\n L_0x02f6:\n r0 = r37;\n if (r0 >= r8) goto L_0x032b;\n L_0x02fa:\n r4 = r16[r8];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r9 = r8 + -1;\n L_0x030a:\n r0 = r37;\n if (r0 > r9) goto L_0x0329;\n L_0x030e:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r4 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n if (r4 != r0) goto L_0x0329;\n L_0x0320:\n r4 = r16[r9];\n r4 = r4 ^ -1;\n r16[r9] = r4;\n r9 = r9 + -1;\n goto L_0x030a;\n L_0x0329:\n r8 = r9;\n goto L_0x02f6;\n L_0x032b:\n r22 = -3;\n r23 = r22;\n goto L_0x001a;\n L_0x0331:\n r8 = r33.trPivot(r34, r35, r36, r37, r38);\n r0 = r16;\n r1 = r37;\n r2 = r16;\n swapElements(r0, r1, r2, r8);\n r4 = r16[r37];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r31 = r0.trGetC(r1, r2, r3, r4);\n r9 = r37 + 1;\n L_0x034e:\n r0 = r38;\n if (r9 >= r0) goto L_0x0369;\n L_0x0352:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0369;\n L_0x0366:\n r9 = r9 + 1;\n goto L_0x034e;\n L_0x0369:\n r8 = r9;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x036e:\n r0 = r32;\n r1 = r31;\n if (r0 >= r1) goto L_0x039e;\n L_0x0374:\n r9 = r9 + 1;\n r0 = r38;\n if (r9 >= r0) goto L_0x039e;\n L_0x037a:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x039e;\n L_0x038e:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0374;\n L_0x0394:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0374;\n L_0x039e:\n r17 = r38 + -1;\n L_0x03a0:\n r0 = r17;\n if (r9 >= r0) goto L_0x03bb;\n L_0x03a4:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03bb;\n L_0x03b8:\n r17 = r17 + -1;\n goto L_0x03a0;\n L_0x03bb:\n r18 = r17;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03c1:\n r0 = r32;\n r1 = r31;\n if (r0 <= r1) goto L_0x03f5;\n L_0x03c7:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x03cd:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x03e1:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x03c7;\n L_0x03e7:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x03c7;\n L_0x03f5:\n r0 = r17;\n if (r9 >= r0) goto L_0x045a;\n L_0x03f9:\n r0 = r16;\n r1 = r16;\n r2 = r17;\n swapElements(r0, r9, r1, r2);\n L_0x0402:\n r9 = r9 + 1;\n r0 = r17;\n if (r9 >= r0) goto L_0x042c;\n L_0x0408:\n r4 = r16[r9];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 > r1) goto L_0x042c;\n L_0x041c:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x0402;\n L_0x0422:\n r0 = r16;\n r1 = r16;\n swapElements(r0, r9, r1, r8);\n r8 = r8 + 1;\n goto L_0x0402;\n L_0x042c:\n r17 = r17 + -1;\n r0 = r17;\n if (r9 >= r0) goto L_0x03f5;\n L_0x0432:\n r4 = r16[r17];\n r0 = r33;\n r1 = r34;\n r2 = r35;\n r3 = r36;\n r32 = r0.trGetC(r1, r2, r3, r4);\n r0 = r32;\n r1 = r31;\n if (r0 < r1) goto L_0x03f5;\n L_0x0446:\n r0 = r32;\n r1 = r31;\n if (r0 != r1) goto L_0x042c;\n L_0x044c:\n r0 = r16;\n r1 = r17;\n r2 = r16;\n r3 = r18;\n swapElements(r0, r1, r2, r3);\n r18 = r18 + -1;\n goto L_0x042c;\n L_0x045a:\n r0 = r18;\n if (r8 > r0) goto L_0x0716;\n L_0x045e:\n r17 = r9 + -1;\n r26 = r8 - r37;\n r30 = r9 - r8;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x046c;\n L_0x046a:\n r26 = r30;\n L_0x046c:\n r19 = r37;\n r21 = r9 - r26;\n L_0x0470:\n if (r26 <= 0) goto L_0x0484;\n L_0x0472:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0470;\n L_0x0484:\n r26 = r18 - r17;\n r4 = r38 - r18;\n r30 = r4 + -1;\n r0 = r26;\n r1 = r30;\n if (r0 <= r1) goto L_0x0492;\n L_0x0490:\n r26 = r30;\n L_0x0492:\n r19 = r9;\n r21 = r38 - r26;\n L_0x0496:\n if (r26 <= 0) goto L_0x04aa;\n L_0x0498:\n r0 = r16;\n r1 = r19;\n r2 = r16;\n r3 = r21;\n swapElements(r0, r1, r2, r3);\n r26 = r26 + -1;\n r19 = r19 + 1;\n r21 = r21 + 1;\n goto L_0x0496;\n L_0x04aa:\n r4 = r9 - r8;\n r8 = r37 + r4;\n r4 = r18 - r17;\n r9 = r38 - r4;\n r4 = r16[r8];\n r4 = r4 + r34;\n r4 = r16[r4];\n r0 = r31;\n if (r4 == r0) goto L_0x04d3;\n L_0x04bc:\n r4 = r9 - r8;\n r24 = trLog(r4);\n L_0x04c2:\n r17 = r37;\n r31 = r8 + -1;\n L_0x04c6:\n r0 = r17;\n if (r0 >= r8) goto L_0x04d6;\n L_0x04ca:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04c6;\n L_0x04d3:\n r24 = -1;\n goto L_0x04c2;\n L_0x04d6:\n r0 = r38;\n if (r9 >= r0) goto L_0x04eb;\n L_0x04da:\n r17 = r8;\n r31 = r9 + -1;\n L_0x04de:\n r0 = r17;\n if (r0 >= r9) goto L_0x04eb;\n L_0x04e2:\n r4 = r16[r17];\n r4 = r4 + r34;\n r16[r4] = r31;\n r17 = r17 + 1;\n goto L_0x04de;\n L_0x04eb:\n r4 = r8 - r37;\n r5 = r38 - r9;\n if (r4 > r5) goto L_0x060c;\n L_0x04f1:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x0571;\n L_0x04f7:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x051e;\n L_0x04fc:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x051e:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0538;\n L_0x0523:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0538:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0549;\n L_0x053d:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0549:\n if (r28 != 0) goto L_0x054f;\n L_0x054b:\n r27 = r28;\n goto L_0x00f9;\n L_0x054f:\n r27 = r28 + -1;\n r20 = r29[r27];\n r0 = r20;\n r0 = r0.a_isRightVersion;\n r35 = r0;\n r0 = r20;\n r0 = r0.b;\n r37 = r0;\n r0 = r20;\n r0 = r0.c;\n r38 = r0;\n r0 = r20;\n r0 = r0.d;\n r22 = r0;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0571:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x05c6;\n L_0x0577:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x059e;\n L_0x057c:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x059e:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05c0;\n L_0x05a3:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x05c0:\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x05c6:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x05f5;\n L_0x05cb:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x05f5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x060c:\n r4 = r8 - r37;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x067b;\n L_0x0612:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x0639;\n L_0x0617:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x0639:\n r4 = 1;\n r5 = r8 - r37;\n if (r4 >= r5) goto L_0x0653;\n L_0x063e:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r28] = r4;\n r38 = r8;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0653:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x0664;\n L_0x0658:\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x0664:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r38;\n r3 = r22;\n r4.<init>(r0, r1, r2, r3);\n r29[r28] = r4;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x067b:\n r4 = r38 - r9;\n r5 = r9 - r8;\n if (r4 > r5) goto L_0x06d0;\n L_0x0681:\n r4 = 1;\n r5 = r38 - r9;\n if (r4 >= r5) goto L_0x06a8;\n L_0x0686:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r5 = r35 + 1;\n r0 = r24;\n r4.<init>(r5, r8, r9, r0);\n r29[r27] = r4;\n r37 = r9;\n r23 = r22;\n goto L_0x001a;\n L_0x06a8:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ca;\n L_0x06ad:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x06ca:\n r38 = r8;\n r23 = r22;\n goto L_0x001a;\n L_0x06d0:\n r4 = 1;\n r5 = r9 - r8;\n if (r4 >= r5) goto L_0x06ff;\n L_0x06d5:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r28 = r27 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r38;\n r2 = r22;\n r4.<init>(r0, r9, r1, r2);\n r29[r27] = r4;\n r35 = r35 + 1;\n r37 = r8;\n r38 = r9;\n r22 = r24;\n r23 = r22;\n goto L_0x001a;\n L_0x06ff:\n r27 = r28 + 1;\n r4 = new io.netty.handler.codec.compression.Bzip2DivSufSort$StackEntry;\n r0 = r35;\n r1 = r37;\n r2 = r22;\n r4.<init>(r0, r1, r8, r2);\n r29[r28] = r4;\n r37 = r9;\n r28 = r27;\n r23 = r22;\n goto L_0x001a;\n L_0x0716:\n r4 = r38 - r37;\n r0 = r39;\n r1 = r40;\n r4 = r0.update(r1, r4);\n if (r4 == 0) goto L_0x002f;\n L_0x0722:\n r22 = r22 + 1;\n r35 = r35 + 1;\n r23 = r22;\n goto L_0x001a;\n L_0x072a:\n r27 = r28;\n goto L_0x00f9;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.netty.handler.codec.compression.Bzip2DivSufSort.trIntroSort(int, int, int, int, int, io.netty.handler.codec.compression.Bzip2DivSufSort$TRBudget, int):void\");\n }", "private static void sort1(int[] x, IntComparator comp, int off, int len) {\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && comp.compare(x[j-1],x[j])>0; j--)\n\t\t\t\t\tswap(x, j, j-1);\n\t\t}\n\t\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x,comp, l, l+s, l+2*s);\n\t\t\t\tm = med3(x,comp, m-s, m, m+s);\n\t\t\t\tn = med3(x,comp, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x,comp, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\t\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && comp.compare(x[b],v)<=0) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && comp.compare(x[c],v)>=0) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x, b++, c--);\n\t\t}\n\t\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,b, n-s, s);\n\t\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,comp, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,comp, n-s, s);\n\t}", "public static boolean testSort() {\r\n Manager inst;\r\n try {\r\n inst = new PokemonTable();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n LinkedList<Pokemon> list;\r\n list = inst.sortByAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() < list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getAttack() > list.get(i).getAttack()) {\r\n System.out.println(\"attack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() < list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getDefense() > list.get(i).getDefense()) {\r\n System.out.println(\"defense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).getFavorite() && list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByFavorite(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getFavorite() && !list.get(i).getFavorite()) {\r\n System.out.println(\"favorite sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() < list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByHp(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getHp() > list.get(i).getHp()) {\r\n System.out.println(\"hp sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (!list.get(i - 1).isLegendary() && list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByLegendary(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).isLegendary() && !list.get(i).isLegendary()) {\r\n System.out.println(\"legendary sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) > 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortByName(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getName().compareTo(list.get(i).getName()) < 0) {\r\n System.out.println(\"name sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() < list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpAttack(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpAttack() > list.get(i).getSpAttack()) {\r\n System.out.println(\"spAttack sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() < list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpDefense(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpDefense() > list.get(i).getSpDefense()) {\r\n System.out.println(\"spDefense sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(true);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() < list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n list = inst.sortBySpeed(false);\r\n for (int i = 1; i < list.size(); i++) {\r\n if (list.get(i - 1).getSpeed() > list.get(i).getSpeed()) {\r\n System.out.println(\"speed sort\");\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "@Override\n\t\tpublic void run() {\n\t\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\t\tint[] a = Util.generateRandomArray(500, 200000);\n\t\t\t\tint[] b = a.clone();\n\t\t\t\t\n\t\t\t\ta = sort(a);\n\t\t\t\tArrays.sort(b);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < b.length; j++) {\n\t\t\t\t\tUtil.Assert(a[j] == b[j], \"shit\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Heap sort ok\");\n\t\t}", "private static void sort1(int x[], double[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x, a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tint v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2,a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x, a2,c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x,a2, off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x,a2, b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x, a2,off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x, a2,n-s, s);\n\t}", "static void sort(int[] a)\n {\n for ( int j = 1; j<a.length; j++)\n {\n int i = j - 1;\n while(i>=0 && a[i]>a[i+1])\n {\n int temp = a[i];\n a[i] = a[i+1];\n a[i+1] = temp;\n i--;\n }\n }\n }", "public void sort() {\n }", "@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }", "static void sortAndCalculateTime(int[] A, int[] B) {\n\t\t// A random integer in the range 0 to 1\n\t\tint sortNum = (int)(Math.random() * 2);\n\t\t\n\t\t// if sortNum is 0 the Insertion method is used, otherwise the Selection one\n\t\tif(sortNum == 0) {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Insertion method\n\t\t\tinsertionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with insertionSort(): \" + runTime);\n\t\t} else {\n\t\t\t// Take the initial time\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\t// sort the A array with Selection method\n\t\t\tselectionSort(A);\n\t\t\t// Calculate how much time has passed\n\t\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\t\tSystem.out.println(\"Time in millisecond to sort array with selectionSort(): \" + runTime);\n\t\t}\n\t\t\n\t\t// Take the initial time\n\t\tlong startTime = System.currentTimeMillis();\n\t\t// sort the B array with Arrays.sort() method\n\t\tArrays.sort(B);\n\t\t// Calculate how much time has passed\n\t\tlong runTime = (System.currentTimeMillis() - startTime);\n\t\tSystem.out.println(\"Time in millisecond to sort array with Arrays.sort(): \" + runTime);\n\t}", "private static void evaluateMergesortVogella() {\n\n // LOGGER.info(\"evaluating sequential Mergesort by Vogella\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n //System.out.println(\"Array (unsortiert): \" + arrayToString(numbers));\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n //System.out.println(\"Array (unsortiert): \" + arrayToString(numbers));\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogella.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Sequential (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "@Test\r\n public void confirmNumericalSortTest() {\r\n int[] unsorted = new int[]{2,10,1,3,4,100,20};\r\n int[] expResult = new int[]{1,2,3,4,10,20,100};\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\r\n }", "public void scan()\n\t{\n\t\t// TODO \n\t\tAbstractSorter aSorter = null; \n\t\tscanTime = 0;\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\taSorter = new SelectionSorter(points);\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\taSorter = new InsertionSorter(points);\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\taSorter = new MergeSorter(points);\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\taSorter = new QuickSorter(points);\n\t\t\tbreak;\n\t\t}\n\t\t// set up x\n\t\taSorter.setComparator(0);\n\t\tlong st = System.nanoTime();\n\t\taSorter.sort();\n\t\tint mx = aSorter.getMedian().getX();//median x\n\t\tscanTime = System.nanoTime() - st;\n\t\t//set up y\n\t\taSorter.setComparator(1);\n\t\tst = System.nanoTime();\n\t\taSorter.sort();\n\t\tscanTime = scanTime + (System.nanoTime() - st);\n\t\tint my = aSorter.getMedian().getY();//median y\n\t\tmedianCoordinatePoint = new Point(mx, my);\n\t\tst = System.nanoTime();\n\t\taSorter.sort();\n\t\tscanTime = scanTime + (System.nanoTime() - st);\n\t\taSorter.getPoints(points);\n\t\t// create an object to be referenced by aSorter according to sortingAlgorithm. for each of the two \n\t\t// rounds of sorting, have aSorter do the following: \n\t\t// \n\t\t// a) call setComparator() with an argument 0 or 1. \n\t\t//\n\t\t// b) call sort(). \t\t\n\t\t// \n\t\t// c) use a new Point object to store the coordinates of the Median Coordinate Point\n\t\t//\n\t\t// d) set the medianCoordinatePoint reference to the object with the correct coordinates.\n\t\t//\n\t\t// e) sum up the times spent on the two sorting rounds and set the instance variable scanTime. \n\t\t\n\t}", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }" ]
[ "0.7391809", "0.7236514", "0.7122138", "0.706443", "0.7043802", "0.6940194", "0.68907636", "0.6851048", "0.6836351", "0.68037117", "0.6780683", "0.66709477", "0.66405773", "0.65352947", "0.6488178", "0.6471974", "0.6466819", "0.6440438", "0.6422076", "0.63938373", "0.63829386", "0.6370964", "0.63496286", "0.6340435", "0.6307421", "0.6305539", "0.6299938", "0.62808424", "0.6275294", "0.6270704", "0.6269089", "0.6264614", "0.6259355", "0.62508756", "0.62484103", "0.62484103", "0.6245731", "0.6217757", "0.62125623", "0.62078", "0.62027335", "0.61931705", "0.61912173", "0.61868775", "0.6181889", "0.61666685", "0.61525995", "0.6131409", "0.61241513", "0.6114241", "0.61135995", "0.6113208", "0.61051947", "0.6098031", "0.6083717", "0.6075618", "0.6075042", "0.6065125", "0.6064875", "0.605183", "0.6048661", "0.60477114", "0.6043568", "0.604031", "0.60309273", "0.603077", "0.6026008", "0.6025847", "0.602182", "0.6018541", "0.6005687", "0.5985369", "0.5983344", "0.597521", "0.596789", "0.59602916", "0.5952272", "0.59388655", "0.5937404", "0.5936397", "0.5931039", "0.5925785", "0.59240925", "0.59228873", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999", "0.5918999" ]
0.0
-1
this method used to set Create account TextView text and click event( maltipal colors for TextView yet not supported in Xml so i have done it programmatically)
private void initCreateAccountTextView() { TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewLogin); textViewCreateAccount.setText(fromHtml("<font color='#000000'>Sudah Memiliki Akun ? </font><font color='#03A9F4'>Login</font>")); textViewCreateAccount.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(daftar.this, activity_login.class); startActivity(intent); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initCreateAccountTextView() {\n\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewCreateAccount);\n // El que hizo esto es un Dios\n textViewCreateAccount.setText(fromHtml(\"<font color='#000'>¿No tienes cuenta? </font><font color='#6dbaf8'>Registrate</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }\n });\n }", "public void createAccountOnClick(View v){\n\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n createEmailAndPasswordAccount(email, password);\n\n }", "private TextView m25232e(Context context) {\n View textView = new TextView(context);\n context = new LayoutParams(-2, -2);\n context.addRule(12, -1);\n context.addRule(14, -1);\n context.setMargins(0, 0, 0, SizeUtil.dp5);\n textView.setPadding(SizeUtil.dp20, SizeUtil.dp5, SizeUtil.dp20, SizeUtil.dp5);\n textView.setLayoutParams(context);\n textView.setText(this.options.getAcceptButtonText());\n textView.setTextColor(this.options.getAcceptButtonTextColor());\n textView.setTypeface(null, 1);\n BitmapUtil.stateBackgroundDarkerByPercentage(textView, this.options.getAcceptButtonBackgroundColor(), 30);\n textView.setTextSize(2, 18.0f);\n textView.setOnClickListener(new C57457(this));\n return textView;\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "public void onViewCreated(View view, @Nullable Bundle savedInstance) {\n generate = getView().findViewById(R.id.color_generate_bt);\n textview1 = getView().findViewById(R.id.color_textview_1);\n textview2 = getView().findViewById(R.id.color_textview_2);\n Mview = getView().findViewById(R.id.color_Relative_background);\n\n\n\n generate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n color = colorRNG.getColorInt();\n //history5.add(color);\n //contextList.add((Integer)color);\n Mview.setBackgroundColor(color);\n generate.setTextColor(color);\n //toastShort(Integer.toString(color));\n System.out.println(color);\n textview1.setText(\"#\" + Integer.toHexString(color).toUpperCase());\n textview2.setText(Integer.toString(-1*color));\n }\n });\n// additional .setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n//\n// }\n// });\n\n }", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.brwn));\n }", "public void onClick(View v) {\n \tsetTxtViews();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t storedPassword = \"\";\n\t\t\t\t userName = \"\";\n\t\t\t\t login.setClickable(true);\n\t\t\t\t login.setBackgroundColor(getResources().getColor(R.color.CornflowerBlue));\n\t\t\t\t// create.setClickable(true);\n\t\t\t\t// create.setBackgroundColor(getResources().getColor(R.color.CornflowerBlue));\n\t\t\t\t logout.setClickable(false);\n\t\t\t\t logout.setBackgroundColor(color.gray);\n\t\t\t\t sync.setClickable(false);\n\t\t\t\t sync.setBackgroundColor(color.gray);\n\t\t\t}", "@Override\n public void onClick(View v) {\n Settings.Section section;\n section = MainActivity.instance.themeSettings.getSection(Res.THEME_SECTION_ACCENT);\n\n EditText red, green, blue;\n red = (EditText) view.findViewById(R.id.rgb_red);\n green = (EditText) view.findViewById(R.id.rgb_green);\n blue = (EditText) view.findViewById(R.id.rgb_blue);\n\n String r, g, b;\n r = red.getText().toString();\n g = green.getText().toString();\n b = blue.getText().toString();\n\n section.setProperty(Res.THEME_KEY_RED, Integer.parseInt(r));\n section.setProperty(Res.THEME_KEY_GREEN, Integer.parseInt(g));\n section.setProperty(Res.THEME_KEY_BLUE, Integer.parseInt(b));\n MainActivity.instance.themeSettings.save();\n\n // go back to theme settings\n content.removeAllViews();\n content.addView(settings);\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tTableRow tr1=(TableRow)v;\n\t\t\t\t\t\tTextView tv1= (TextView)tr1.getChildAt(0);\n\t\t\t\t\t\tString a = tv1.getText().toString();\n\t\t\t\t\t\t//tr1.setBackgroundColor(Color.BLACK);\n\t\t\t\t\t\tfirstname_et.setText(a);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(),tv1.getText().toString()+\" Selected\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "@Override\n public void onClick(View view) {\n\n mConditionRef.setValue(mCustomText.getText().toString());\n\n// mConditionRef.setValue(\"Test Text\");\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBeginNewText();\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.darkGreen));\n //background color to original\n findViewById(R.id.parent).setBackgroundColor(getResources().getColor(R.color.whiteGreen));\n //text content to original\n ((TextView) findViewById(R.id.text)).setText(\"Hello from Shiying!\");\n\n }", "public void Create(View view) {\n disableButton = findViewById(R.id.newAccountButton);\n disableButton.setEnabled(false);\n username = ((EditText)findViewById(R.id.createName)).getText().toString();\n password = ((EditText)findViewById(R.id.createPassword)).getText().toString();\n String password2 = ((EditText)findViewById(R.id.recreatePassword)).getText().toString();\n if (username.length() == 0 || password.length() == 0) {\n Toast.makeText(this, \"Fill in all boxes\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else if (!password.equals(password2)) {\n Toast.makeText(this, \"passwords must be the same\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else {\n PostuserHelper helper = new PostuserHelper(username, password, getApplicationContext(),\n NewaccountActivity.this);\n }\n }", "public void btnNewQuote(View view){\n setupTextView();\n newQuote();\n quoteTextView.setText(Variables.quote);\n }", "private void setUpTextViews() {\n // Find views\n TextView userName0 = (TextView) findViewById(R.id.user_name_0);\n TextView userInfo0 = (TextView) findViewById(R.id.user_info_0);\n TextView userName1 = (TextView) findViewById(R.id.user_name_1);\n TextView userInfo1 = (TextView) findViewById(R.id.user_info_1);\n TextView userName2 = (TextView) findViewById(R.id.user_name_2);\n TextView userInfo2 = (TextView) findViewById(R.id.user_info_2);\n\n // Set text\n userName0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo0.setText(mGroupMembers.get(0).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(0).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo1.setText(mGroupMembers.get(1).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(1).getString(ParseConstants.KEY_HOMETOWN)));\n\n userName2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_FIRST_NAME));\n userInfo2.setText(mGroupMembers.get(2).getString(ParseConstants.KEY_AGE) +\n \" : : \" +\n (mGroupMembers.get(2).getString(ParseConstants.KEY_HOMETOWN)));\n }", "public void createAccount(View view) {\n Intent intent = new Intent(this, UserAccountCreateActivity.class);\n startActivity(intent);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.layout);\n\n colorPickerDialog = new AmbilWarnaDialog(this, Color.BLACK, this);\n ToggleButton boldToggle = (ToggleButton) findViewById(R.id.btnBold);\n ToggleButton italicsToggle = (ToggleButton) findViewById(R.id.btnItalics);\n ToggleButton underlinedToggle = (ToggleButton) findViewById(R.id.btnUnderline);\n imgChangeColor = (ImageView) findViewById(R.id.btnChangeTextColor);\n lnl = (LinearLayout) findViewById(R.id.lnlAction);\n lnl.setVisibility(View.VISIBLE);\n\n customEditor = (CustomEditText) findViewById(R.id.CustomEditor);\n customEditor.setSingleLine(false);\n customEditor.setMinLines(10);\n customEditor.setBoldToggleButton(boldToggle);\n customEditor.setItalicsToggleButton(italicsToggle);\n customEditor.setUnderlineToggleButton(underlinedToggle);\n customEditor.setOnFocusChangeListener(new OnFocusChangeListener() {\n\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n lnl.setVisibility(View.VISIBLE);\n }\n else\n {\n lnl.setVisibility(View.GONE);\n }\n }\n });\n customEditor.setEventBack(eventBack);\n customEditor.setOnClickListener(clickListener);\n imgChangeColor.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n selectionStart = customEditor.getSelectionStart();\n selectionEnd = customEditor.getSelectionEnd();\n colorPickerDialog.show();\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n\n mainTextView.setText(\"Hello from Omar!\");\n mainButton.setBackground(getResources().getDrawable(R.drawable.preset_button_1));\n mainButton.setTextColor(getResources().getColor(R.color.colorPrimary));\n mainEditText.setTextColor(getResources().getColor(R.color.colorPrimary));\n mainTextView.setTextColor(getResources().getColor(R.color.colorPrimary));\n findViewById(R.id.rootView).setBackgroundColor(getResources().getColor(R.color.white));\n secondTextView.setTextColor(getResources().getColor(R.color.grey));\n }", "public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }", "private void setupUsernameAndFullNameTextView() {\n usernameTextView.setText(prismUser.getUsername());\n userFullNameText.setText(prismUser.getFullName());\n }", "public void setTextColor( Color txtColor ) {\r\n textColor = txtColor;\r\n }", "@Override\n protected void initViews(View view) {\n mTwitterBtn.setText(\"\");\n mTwitterBtn.setBackgroundResource(R.drawable.twitter_login_btn);\n mTwitterBtn.setCompoundDrawables(null, null, null, null);\n //callDigitLogin();\n }", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAccountManager.get(MainActivity.this)\n\t\t\t\t\t\t.setAuthToken(\n\t\t\t\t\t\t\t\tauthAccountManager.getActiveAccount(getString(R.string.auth_account_type), false),\n\t\t\t\t\t\t\t\tgetString(R.string.auth_token_type),\n\t\t\t\t\t\t\t\t\"some-invalid-token\"\n\t\t\t\t\t\t);\n\t\t\t}", "@Override\n public void onClick(View view) {\n //Metodos Getters y Setters\n tvSaludo.setVisibility(View.VISIBLE);\n tvSaludo.setText(\"HOLA ANDROIDS JUNIORS\"); // hard coding\n }", "@Override\n public void viewCreated() {\n TextView title = (TextView) inflater.inflate(R.layout.layout_custom_title, null);\n title.setId(R.id.txt_title);\n title.setText(R.string.balance_title);\n layout.addView(title);\n // [END Creating the title textview]\n\n // [START Creating amount textview]\n // Filling it with content, changing the design and moving it below the title\n amount = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n amount.setId(R.id.txt_amount);\n amount.setTextSize(TypedValue.COMPLEX_UNIT_PT, 30f);\n amount.setAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.fade_in));\n amount.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n\n RelativeLayout.LayoutParams amountParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n );\n amountParams.addRule(RelativeLayout.BELOW, title.getId());\n amountParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n amountParams.setMargins(20, 20, 20, 20);\n\n layout.addView(amount, amountParams);\n // [END Creating amount textview]\n\n // [START Creating a description textview]\n // to describe what the amount means and moving it below the amount\n TextView description = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n description.setId(R.id.txt_description);\n description.setText(R.string.balance_description);\n\n RelativeLayout.LayoutParams descParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n );\n descParams.addRule(RelativeLayout.BELOW, amount.getId());\n\n layout.addView(description, descParams);\n // [END Creating a description textview]\n }", "@Override\n public void setActive(View view, boolean state){\n\n TextView textViewActivated = (TextView) view.findViewById(R.id.day);\n\n if(textViewActivated != null){\n if(state) {\n textViewActivated.setBackgroundResource(R.drawable.btn_select_week_day);\n textViewActivated.setTextColor(ContextCompat.getColor(context, R.color.white));\n }\n else {\n textViewActivated.setBackgroundResource(R.drawable.btn_profile_admin);\n textViewActivated.setTextColor(ContextCompat.getColor(context, R.color.deep_purple_400));\n }\n\n }\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n if (!flag) {\n\n check_passwd_text.setTransformationMethod(SingleLineTransformationMethod.getInstance());\n flag = !flag;\n } else {\n check_passwd_text.setTransformationMethod(PasswordTransformationMethod.getInstance());\n flag = !flag;\n }\n }", "public interface AddTextFragmentListener {\n\n void OnAddTextButtonClick(Typeface typeface, String text, int color,String textStyle,String textalligment,float spacing,int textsize);\n}", "public void configure(T aView) { aView.setText(\"Button\"); aView.setPadding(2,2,2,2); }", "private void createContents() {\n shell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER);\n shell.setSize(450, 353);\n shell.setText(\"修改邮箱\");\n shell.setLayout(new FormLayout());\n\n Label lblNewLabel = new Label(shell, SWT.NONE);\n FormData fd_lblNewLabel = new FormData();\n fd_lblNewLabel.top = new FormAttachment(0, 31);\n fd_lblNewLabel.left = new FormAttachment(0, 50);\n lblNewLabel.setLayoutData(fd_lblNewLabel);\n lblNewLabel.setText(\"旧邮箱地址\");\n\n text = new Text(shell, SWT.BORDER);\n FormData fd_text = new FormData();\n fd_text.left = new FormAttachment(lblNewLabel, 62);\n fd_text.top = new FormAttachment(0, 31);\n text.setLayoutData(fd_text);\n\n Label label = new Label(shell, SWT.NONE);\n FormData fd_label = new FormData();\n fd_label.right = new FormAttachment(0, 126);\n fd_label.top = new FormAttachment(0, 99);\n fd_label.left = new FormAttachment(0, 50);\n label.setLayoutData(fd_label);\n label.setText(\"验证码\");\n\n text_1 = new Text(shell, SWT.BORDER);\n FormData fd_text_1 = new FormData();\n fd_text_1.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_1.right = new FormAttachment(100, -47);\n fd_text_1.top = new FormAttachment(label, -3, SWT.TOP);\n text_1.setLayoutData(fd_text_1);\n\n Button button = new Button(shell, SWT.NONE);\n button.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n\n YanZhengma();\n\n }\n });\n FormData fd_button = new FormData();\n fd_button.right = new FormAttachment(100, -10);\n button.setLayoutData(fd_button);\n button.setText(\"获取验证码\");\n\n Button btnNewButton = new Button(shell, SWT.NONE);\n btnNewButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n changeEmail();\n } catch (BizException bizException) {\n bizException.printStackTrace();\n // SwtHelper.message(bizException.getMessage(),shell);\n }\n shell.dispose();\n\n\n }\n });\n FormData fd_btnNewButton = new FormData();\n fd_btnNewButton.right = new FormAttachment(0, 178);\n fd_btnNewButton.bottom = new FormAttachment(100, -10);\n fd_btnNewButton.left = new FormAttachment(0, 80);\n btnNewButton.setLayoutData(fd_btnNewButton);\n btnNewButton.setText(\"确认\");\n\n Button btnNewButton_1 = new Button(shell, SWT.NONE);\n btnNewButton_1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n shell.dispose();\n }\n });\n fd_text.right = new FormAttachment(btnNewButton_1, 0, SWT.RIGHT);\n fd_button.left = new FormAttachment(btnNewButton_1, 49, SWT.LEFT);\n FormData fd_btnNewButton_1 = new FormData();\n fd_btnNewButton_1.bottom = new FormAttachment(100, -10);\n fd_btnNewButton_1.right = new FormAttachment(100, -47);\n fd_btnNewButton_1.left = new FormAttachment(100, -157);\n btnNewButton_1.setLayoutData(fd_btnNewButton_1);\n btnNewButton_1.setText(\"返回\");\n\n Label label_1 = new Label(shell, SWT.NONE);\n FormData fd_label_1 = new FormData();\n fd_label_1.top = new FormAttachment(label, 49);\n fd_label_1.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);\n label_1.setLayoutData(fd_label_1);\n label_1.setText(\"新邮箱地址\");\n\n text_2 = new Text(shell, SWT.BORDER);\n fd_button.top = new FormAttachment(text_2, 19);\n FormData fd_text_2 = new FormData();\n fd_text_2.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_2.right = new FormAttachment(100, -47);\n fd_text_2.top = new FormAttachment(label_1, -3, SWT.TOP);\n text_2.setLayoutData(fd_text_2);\n\n text.setText(email);\n }", "private void initRegisterUserFlowFlow(){\n TextView register = (TextView)findViewById(R.id.lnkRegister);\n register.setMovementMethod(LinkMovementMethod.getInstance());\n register.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, RegistrationActivity.class);\n startActivity(intent);\n }\n });\n }", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }", "@Override\n public void onClick(View view) {\n Editable userEditable = userName.getText();\n if (userEditable == null || userEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserName));\n return;\n }\n userNameStr = userEditable.toString();\n if (!Checker.isUserName(userNameStr)) {\n toastMessage(getString(R.string.inputSuitableUserName));\n return;\n }\n Log.i(TAG, \"get the user name: \" + userNameStr);\n\n\n //************************************************************************//\n //************************************************************************//\n // Get the passwd.\n Editable passwdEditable = passwd.getText();\n if (passwdEditable == null || passwdEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswd));\n return;\n }\n passwdStr = passwdEditable.toString();\n if (!Checker.isPasswd(passwdStr)) {\n toastMessage(getString(R.string.inputSuitableUserPasswd));\n return;\n }\n\n\n //************************************************************************//\n //************************************************************************//\n // confirm the passwd.\n Editable passwdConfirmEditable = confirm.getText();\n if (passwdConfirmEditable == null\n || passwdConfirmEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswdAgain));\n return;\n }\n String passwdConfirm = passwdConfirmEditable.toString();\n if (!passwdConfirm.equals(passwdStr)) {\n toastMessage(getString(R.string.inputSamePasswd));\n return;\n }\n Log.i(\"Register\", \"get the userPasswd: \" + passwdStr);\n\n AsyncInetClient.getInstance().addUser(userNameStr, passwdStr, signUpResponseHandler);\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString userName = input.getText().toString();\r\n\t\t\t\tString userColour = sprCoun.getSelectedItem()\r\n\t\t\t\t\t\t.toString();\r\n\t\t\t\tString userLangName = userLang;\r\n\r\n\t\t\t\tcontext.addNewUser(userName, userColour);\r\n\t\t\t\t\r\n\t\t\t\talertDialog.dismiss();\r\n\t\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_profile_account, container, false);\n\n TextView statistic_data = (TextView) view.findViewById(R.id.account_link_to_statistic_data);\n statistic_data.setOnClickListener(this);\n\n TextView password_change = (TextView) view.findViewById(R.id.account_link_to_password_change);\n password_change.setOnClickListener(this);\n\n /*TextView notifications_settings = (TextView) view.findViewById(R.id.account_link_to_notifications_settings);\n notifications_settings.setOnClickListener(this);\n\n\n\n TextView help = (TextView) view.findViewById(R.id.account_link_to_help);\n help.setOnClickListener(this);\n\n TextView privacy = (TextView) view.findViewById(R.id.account_link_to_privacy);\n privacy.setOnClickListener(this);\n\n TextView terms_of_service = (TextView) view.findViewById(R.id.account_link_to_terms_of_service_title);\n terms_of_service.setOnClickListener(this);*/\n\n TextView recieved_rates = (TextView)view.findViewById(R.id.account_link_to_recieved_rates);\n recieved_rates.setOnClickListener(this);\n return view;\n }", "private void setupNameLayout() {\n nameText.setInputType(InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);\n nameText.setOnKeyListener(new View.OnKeyListener() {\n @Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() != KeyEvent.ACTION_DOWN) {\n String input = nameText.getText().toString();\n\n //Check if valid input, otherwise reset name.\n //If valid input, trim and send event\n if (input.equalsIgnoreCase(\"\") || input.equalsIgnoreCase(null)) {\n nameText.setText(backupName);\n } else {\n nameText.setText(input.trim());\n EventBus.getDefault().post(new TaskEditedEvent());\n }\n\n setShowKeyboard(false, v);\n nameText.clearFocus();\n }\n return false;\n }\n });\n\n nameText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus) {\n ColorStateList csl = new ColorStateList(new int[][]{new int[0]}, new int[]{R.color.colorAccent});\n nameText.setBackgroundTintList(csl);\n } else {\n ColorStateList csl = new ColorStateList(new int[][]{new int[0]}, new int[]{Color.TRANSPARENT});\n nameText.setBackgroundTintList(csl);\n }\n }\n });\n }", "@Override\n protected void initView() {\n pushTxt = (TextView) findViewById(R.id.push_txt);\n pushActivity = (TextView)findViewById(R.id.push_activity);\n pushArticle = (TextView)findViewById(R.id.push_article);\n pushProduce = (TextView)findViewById(R.id.push_produce);\n\n\n pushTxt.setOnClickListener(this);\n pushActivity.setOnClickListener(this);\n pushArticle.setOnClickListener(this);\n pushProduce.setOnClickListener(this);\n }", "public void setTextColor(String textColor);", "public void onClick(View view){\n if(password.getText().toString().equals(confirm.getText().toString()))\n creatAccount(email.getText().toString(), password.getText().toString(), username.getText().toString());\n else\n showMessage(\"Confirmed Password is not the same as Password\");\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttx.setText(editText.getText().toString());\r\n\t\t\t\t\t}", "private void m116772S() {\n if (isViewValid() && this.f94525K != null && this.f94531Q != null) {\n if (!this.f94531Q.isSecret() && this.f94531Q.nicknameUpdateReminder()) {\n String str = \" T\";\n SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();\n spannableStringBuilder.append(this.f94525K.getText());\n spannableStringBuilder.append(str);\n spannableStringBuilder.setSpan(new C36728am(getContext(), R.drawable.a6w, 1), (spannableStringBuilder.length() - str.length()) + 1, spannableStringBuilder.length(), 17);\n this.f94525K.setText(spannableStringBuilder);\n if (ProfileNewStyleExperiment.INSTANCE.getUSE_T_NEW()) {\n this.f94525K.setTextColor(getResources().getColor(R.color.ab0));\n } else {\n this.f94525K.setTextColor(getResources().getColor(R.color.ac9));\n }\n } else if (ProfileNewStyleExperiment.INSTANCE.getUSE_T_NEW()) {\n this.f94525K.setTextColor(getResources().getColor(R.color.ab0));\n } else {\n this.f94525K.setTextColor(getResources().getColor(R.color.ac8));\n }\n }\n }", "public void setNewButtonText(String text) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ if (text == null) {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().remove(\"overviewSmall_newButton_propertyText\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_newButton_propertyText\", text);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setNewButtonText(\" + escapeString(text) + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "@Override\n public void onClick(View v) {\n firstNameText = capitalizeFirstLetter(firstNameET.getText().toString());\n lastNameText = capitalizeFirstLetter(lastNameET.getText().toString());\n emailText = (emailET.getText().toString()).toLowerCase();\n passwordText = passwordET.getText().toString();\n reEnterPasswordText = reEnterPasswordET.getText().toString();\n\n // Using the user-inputted information to register the user via this method\n registerUser(firstNameText, lastNameText, emailText, passwordText, reEnterPasswordText);\n }", "private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }", "@Override\n public void onClick(View view) {\n userManager.setPerson(new Person(\"吴洪春\",\"2018\"));\n }", "@Override\n public void onClick(View v) {\n Settings.Section section;\n section = MainActivity.instance.themeSettings.getSection(Res.THEME_SECTION_SECONDARY);\n\n EditText red, green, blue;\n red = (EditText) view.findViewById(R.id.rgb_red);\n green = (EditText) view.findViewById(R.id.rgb_green);\n blue = (EditText) view.findViewById(R.id.rgb_blue);\n\n String r, g, b;\n r = red.getText().toString();\n g = green.getText().toString();\n b = blue.getText().toString();\n\n section.setProperty(Res.THEME_KEY_RED, Integer.parseInt(r));\n section.setProperty(Res.THEME_KEY_GREEN, Integer.parseInt(g));\n section.setProperty(Res.THEME_KEY_BLUE, Integer.parseInt(b));\n MainActivity.instance.themeSettings.save();\n\n // go back to theme settings\n content.removeAllViews();\n content.addView(settings);\n }", "@Override\n public void onClick(ClickEvent event) {\n String fName = content.getRegisterView().getNewtxtFname().getText();\n String lName = content.getRegisterView().getNewtxtLname().getText();\n String email = content.getRegisterView().getNewtxtEmail().getText();\n String address = content.getRegisterView().getNewtxtAddress().getText();\n String mobileno = content.getRegisterView().getNewtxtMobileNo().getText();\n String education = content.getRegisterView().getNewtxtEducation().getText();\n String experience = content.getRegisterView().getNewtxtExperience().getText();\n Integer hoursPrWeek = content.getRegisterView().getNewtxtHoursPrWeek().getValue();\n String password = content.getRegisterView().getNewtxtPassword().getText();\n\n // Here we check which radiobutton the user choose and give them the right teamtype_teamID\n String teamtype = null;\n int teamtype_teamID = 0;\n\n if (content.getRegisterView().getNewCrossfitBtn().getValue() == true) {\n teamtype = \"Crossfit\";\n teamtype_teamID = 1;\n }\n if (content.getRegisterView().getNewSpinningBtn().getValue() == true) {\n teamtype = \"Spinning\";\n teamtype_teamID = 3;\n }\n if (content.getRegisterView().getNewHitBtn().getValue() == true) {\n teamtype = \"H.I.T.\";\n teamtype_teamID = 2;\n }\n if (content.getRegisterView().getNewStramopBtn().getValue() == true) {\n teamtype = \"Stram op\";\n teamtype_teamID = 4;\n }\n\n // Here we check for mistakes and if there is no mistake we create the user\n if (!FieldVerifier.isValidFname(fName)){content.getRegisterView().getNewtxtFname().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidLname(lName)){content.getRegisterView().getNewtxtLname().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidEmail(email)){content.getRegisterView().getNewtxtEmail().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidAddress(address)){content.getRegisterView().getNewtxtAddress().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidMobileNo(mobileno)){content.getRegisterView().getNewtxtMobileNo().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidEducation(education)){content.getRegisterView().getNewtxtEducation().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidExperience(experience)){content.getRegisterView().getNewtxtExperience().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidHoursPrWeek(hoursPrWeek)){content.getRegisterView().getNewtxtHoursPrWeek().setStyleName(\"textBox-invalidEntry\");}\n else if (!FieldVerifier.isValidPassword(password)){content.getRegisterView().getNewtxtPassword().setStyleName(\"textBox-invalidEntry\");}\n else {\n User user = new User();\n user.setFname(fName);\n user.setLname(lName);\n user.setEmail(email);\n user.setAddress(address);\n user.setMobilenr(mobileno);\n user.setEducation(education);\n user.setExperience(experience);\n user.setHoursPrWeek(hoursPrWeek);\n user.setPassword(password);\n user.setType(2);\n user.setIsApproved(false);\n user.setTeamtype(teamtype);\n user.setTeamtype_teamID(teamtype_teamID);\n\n // RPC authenticating user method\n motionCBSTestService.createUser(user, new AsyncCallback<Boolean>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Something went wrong\");\n }\n\n @Override\n public void onSuccess(Boolean isCreated) {\n if (!isCreated) {\n Window.alert(\"Could not create user\");\n } else {\n content.getRegisterView().clearTextBoxFields();\n Window.alert(\"You have successfully been created. Please wait for Admin to approve you\");\n }\n }\n });\n }\n }", "@Override\r\n\tprotected void initListener() {\n\t\trly_personal_info.setOnClickListener(this);\r\n\t}", "private void define_select_color(){\n\n TextView white_panel = (TextView) findViewById(R.id.palette_white);\n TextView black_panel = (TextView) findViewById(R.id.palette_black);\n TextView red_panel = (TextView) findViewById(R.id.palette_red);\n TextView blue_panel = (TextView) findViewById(R.id.palette_blue);\n\n white_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=WHITE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n black_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=BLACK;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n red_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = RED;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n blue_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = BLUE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n\n\n\n }", "@Override\n public void choiced(String result) {\n target.setText(result);\n target.setTextColor(getResources().getColor(R.color.app_color));\n }", "private void initView() {\n mEmailView = findViewById(R.id.edEmail);\n mPasswordView = findViewById(R.id.edPassword);\n\n //mEmailView.setText(\"[email protected]\");\n //mPasswordView.setText(\"Ek@kash1!125\");\n TextView tvForgotPassword = findViewById(R.id.tvForgotPass);\n TextView btnRegister = findViewById(R.id.btnRegister);\n Button mEmailSignInButton = findViewById(R.id.btnLogin);\n ImageView btnFacebook = findViewById(R.id.imgFacebook);\n ImageView btnGoogle = findViewById(R.id.imgGoogle);\n ImageView btnTwitter = findViewById(R.id.imgTwitter);\n btnLoginFacebook = findViewById(R.id.btnLoginFacebook);\n\n mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {\n if (id == EditorInfo.IME_ACTION_DONE) {\n attemptLogin();\n return true;\n }\n return false;\n }\n });\n\n //Forgot password Button\n tvForgotPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showForgotPasswordScreen();\n }\n });\n\n //Register Button\n btnRegister.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showRegisterScreen();\n }\n });\n\n //Sign in Email Button\n mEmailSignInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n attemptLogin();\n }\n });\n\n //Sign in Facebook Button\n btnFacebook.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n loginType = LOGIN_FACEBOOK;\n //btnLoginFacebook.performClick();\n //loginFacebook();\n showSimpleMessage(getString(R.string.message_next_phase));\n }\n });\n\n //Sign in Google Button\n btnGoogle.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n loginType = LOGIN_GOOGLE;\n //loginGoogle();\n showSimpleMessage(getString(R.string.message_next_phase));\n }\n });\n\n btnTwitter.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n loginType = LOGIN_TWITTER;\n //loginTwitter();\n showSimpleMessage(getString(R.string.message_next_phase));\n }\n });\n }", "@Override\n\t\tpublic void bindView(View view, Context context, Cursor cursor)\n\t\t{\n\t\t\tTextView txtView = (TextView) view.findViewById(android.R.id.text1);\n\t\t\ttxtView.setTextColor(Color.BLACK);\n\t\t\ttxtView.setText(cursor.getString(cursor.getColumnIndex(\"login\")));\n\t\t}", "@Override\n public void onClick(final View v) {\n mStrASName = mEdtTxtASName.getText().toString();\n mStrASEmail = mEdtTxtASEmail.getText().toString();\n mStrASPassword = mEdtTxtASPassword.getText().toString();\n mStrASPasswordRep = mEdtTxtASPasswordRep.getText().toString();\n mStrASPhone = mEdtTxtASPhone.getText().toString();\n\n if (mStrASName.isEmpty()) {\n mEdtTxtASName.setError(\"Please Fill This Field\");\n } else if (mStrASEmail.isEmpty()) {\n mEdtTxtASEmail.setError(\"Please Fill This Field\");\n } else if (mStrASPassword.isEmpty()) {\n mEdtTxtASPassword.setError(\"Please Fill This Field\");\n } else if (mStrASPasswordRep.isEmpty()) {\n mEdtTxtASPasswordRep.setError(\"Please Fill This Field\");\n } else if (mStrASPhone.isEmpty()) {\n mEdtTxtASPhone.setError(\"Please Fill This Field\");\n } else if (mStrASPassword.length() < 8) {\n mEdtTxtASPassword.setError(\"Password Should Be Greater Than 8\");\n } else if (mStrASPasswordRep.length() < 8) {\n mEdtTxtASPasswordRep.setError(\"Password Should Be Greater Than 8\");\n } else if (!(mStrASPassword.equalsIgnoreCase(mStrASPasswordRep))) {\n mEdtTxtASPasswordRep.setError(\"Password Didn't Matched\");\n mEdtTxtASPassword.setError(\"Password Didn't Matched\");\n } else if (!(Patterns.EMAIL_ADDRESS.matcher(mStrASEmail).matches())) {\n mEdtTxtASEmail.setError(\"Email Not Valid\");\n } else if (!(mEdtTxtASPhone.length() == 11)) {\n mEdtTxtASPhone.setError(\"Phone Number Must Be 11 Digits Long\");\n } else {\n kProgressHUD= KProgressHUD.create(getContext())\n .setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)\n .setAnimationSpeed(2)\n .setBackgroundColor(getResources().getColor(R.color.colorPrimaryDark))\n .setLabel(\"Registering\")\n .setDetailsLabel(\"Please Wait...\")\n .setDimAmount(0.3f)\n .show();\n auth.createUserWithEmailAndPassword(mStrASEmail, mStrASPassword).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n adminSignupModel = new AdminSignupModel(mStrASName, mStrASEmail, mStrASPassword, mStrASPhone, mStrAdmin);\n databaseReference.push().setValue(adminSignupModel).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n mEdtTxtASName.getText().clear();\n mEdtTxtASEmail.getText().clear();\n mEdtTxtASPassword.getText().clear();\n mEdtTxtASPasswordRep.getText().clear();\n mEdtTxtASPhone.getText().clear();\n Snackbar.make(v, \"Admin Registered\", Snackbar.LENGTH_SHORT).show();\n kProgressHUD.dismiss();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(v, e.getMessage(), Snackbar.LENGTH_LONG).show();\n kProgressHUD.dismiss();\n }\n });\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n kProgressHUD.dismiss();\n Snackbar.make(v, e.getMessage(), Snackbar.LENGTH_SHORT).show();\n }\n });\n }\n }", "private void m50376a(TextView textView, EditText editText, View view, String str) {\n textView.setVisibility(0);\n textView.setText(str);\n view.setBackground(C0841b.m4928c(this.f30720S, C10232R.C10235drawable.bg_border_red_1_5));\n editText.setTextColor(C0841b.m4915a(this.f30720S, (int) C10232R.C10234color.red_lite_3));\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t super.onClick(v);\n\t\t \n\t\t // Calendar c = Calendar.getInstance();\n\t\t //SimpleDateFormat sdf = new SimpleDateFormat(\"EEE, MMM d, yyyy\");\n\t\t if(v == bNext)\n\t\t {\n\t\t \tNewPassword np = NewPassword.getInstance();\n\t\t \tnp.genPassword=tvGenPassowrd.getText().toString();\n\t\t \t\n\t\t \tIntent intent = new Intent(this, Step2CreateActivity.class);\n\t\t \tintent.putExtra(Constants.INTENT_EXTRA_STEP2_FIELD2, getString(R.string.usage));\n\t\t \tintent.putExtra(Constants.INTENT_EXTRA_STEP2_FIELD1, getString(R.string.title));// sdf.format(c.getTime()) );\n\t\t \tintent.putExtra(Constants.INTENT_EXTRA_IS_GENPASSWORD, \"true\" );\n\t\t \tstartActivity(intent);\n\t\t \t\n\t\t }\n\t\t else if(v == tbSpecialChar)\n\t\t {\n\t\t \ttbUseNumbers.setChecked(true);\n\t\t }\n\t\t \n\t\t \n\t\t}", "private InnerTextView newAItem() {\n\t\tInnerTextView newTextView = null;\n\t\ttry {\n\t\t\tnewTextView = new InnerTextView(getContext());\n\t\t\tnewTextView.setMinWidth(MIN_TEXT_WIDTH);\n\t\t\tnewTextView.setSingleLine(true);\n\t\t\tnewTextView.setEllipsize(TextUtils.TruncateAt.valueOf(\"END\"));\n\t\t\tnewTextView.setTextSize(mItemFontSize);\n\t\t\tnewTextView.getPaint().setTextSize(mItemFontSize);\n\t\t\tnewTextView.setTextColor(mItemFontColor);\n\t\t\tnewTextView.setGravity(Gravity.CENTER);\n\t\t\tnewTextView.setBackgroundResource(R.drawable.bg_new_message_to_bg);\n\t\t\t\n\t\t\tif (BOLDSTYLE.equals(mItemStyle)) {\n\t\t\t\tnewTextView.getPaint().setFakeBoldText(true);\n\t\t\t}\n\t\t\tnewTextView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (!mInnerEditText.hasFocus()) {\n\t\t\t\t\t\tmInnerEditText.requestFocus();\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tInnerTextView textItem = (InnerTextView)v;\n\t\t\t\t\tif(textItem != null && textItem.isBubbleSelected() \n\t\t\t\t\t\t\t&& DeviceUtils.isAboveAndroidOS4_4()){\n\t\t\t\t\t\tonTextItemDelete();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\t} \n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\tshowKeyboard();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch(Exception err) {\n\t\t\tnewTextView = null;\n\t\t}\n\t\t\n\t\treturn newTextView;\n\t}", "@Override\n public void initView() {\n mLoginActivity.setContentView(R.layout.activity_login);\n if(BigwinerApplication.mApp.mUpDataManager != null)\n BigwinerApplication.mApp.mUpDataManager.checkVersin();\n mLoginActivity.mToolBarHelper.hidToolbar2(mLoginActivity);\n ToolBarHelper.setBgColor(mLoginActivity, mLoginActivity.mActionBar, Color.rgb(255, 255, 255));\n mLoginActivity.mRegiester = mLoginActivity.findViewById(R.id.regiest);\n mLoginActivity.areaTxt = mLoginActivity.findViewById(R.id.area_text);\n mLoginActivity.btnArea = mLoginActivity.findViewById(R.id.phone_title);\n mLoginActivity.arename = mLoginActivity.findViewById(R.id.name_title);\n mLoginActivity.phoneNumber = (EditText) mLoginActivity.findViewById(R.id.phone_text);\n mLoginActivity.passWord = (EditText) mLoginActivity.findViewById(R.id.password_text);\n mLoginActivity.showPassword = (ImageView) mLoginActivity.findViewById(R.id.password_show_icon);\n mLoginActivity.phoneLayer = (RelativeLayout) mLoginActivity.findViewById(R.id.phone_number);\n mLoginActivity.passwordLayer = (RelativeLayout) mLoginActivity.findViewById(R.id.password_number);\n mLoginActivity.mForget = (TextView) mLoginActivity.findViewById(R.id.forget);\n mLoginActivity.btnLogin = (TextView) mLoginActivity.findViewById(R.id.login_btn);\n mLoginActivity.mForget.setOnClickListener(mLoginActivity.mForgetListener);\n mLoginActivity.showPassword.setOnClickListener(mLoginActivity.showPasswordListener);\n mLoginActivity.mRegiester.setOnClickListener(mLoginActivity.startRegisterListener);\n mLoginActivity.btnLogin.setOnClickListener(mLoginActivity.doLoginListener);\n mLoginActivity.safe = mLoginActivity.findViewById(R.id.a6);\n SpannableString content = new SpannableString(mLoginActivity.safe.getText().toString());\n content.setSpan(new UnderlineSpan(), 1, mLoginActivity.safe.getText().toString().length()-1, 0);\n mLoginActivity.safe.setText(content);\n mLoginActivity.safe.setOnClickListener(mLoginActivity.safeListener);\n mLoginActivity.btnArea.setOnClickListener(mLoginActivity.areaListener);\n mLoginActivity.areaTxt.setOnClickListener(mLoginActivity.areaListener);\n checkUser();\n }", "@OnClick(R.id.textView_edit_data)\n public void textView_edit_data_onClick(){\n CalendarDatePickerDialogFragment cdp = new CalendarDatePickerDialogFragment()\n .setOnDateSetListener(this);\n cdp.show(getSupportFragmentManager(), \"选择日期\");\n }", "@Override\n public void onClick(View v) {\n Settings.Section section;\n section = MainActivity.instance.themeSettings.getSection(Res.THEME_SECTION_PRIMARY);\n\n EditText red, green, blue;\n red = (EditText) view.findViewById(R.id.rgb_red);\n green = (EditText) view.findViewById(R.id.rgb_green);\n blue = (EditText) view.findViewById(R.id.rgb_blue);\n\n String r, g, b;\n r = red.getText().toString();\n g = green.getText().toString();\n b = blue.getText().toString();\n\n section.setProperty(Res.THEME_KEY_RED, Integer.parseInt(r));\n section.setProperty(Res.THEME_KEY_GREEN, Integer.parseInt(g));\n section.setProperty(Res.THEME_KEY_BLUE, Integer.parseInt(b));\n MainActivity.instance.themeSettings.save();\n\n // go back to theme settings\n content.removeAllViews();\n content.addView(settings);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView text = (TextView) view;\n //Saves the name of the recipient\n chosenName = (String) text.getText();\n //Checks if the button should be enabled\n checkIfEnable();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tsetFontClickedState(SetActivity.this, j);\n\t\t\t\t\tfont = j;\n\t\t\t\t}", "public void clkcreateAccountBtn() {\n\t\tcreateAccountBtn.click();\n\t\tExtentTestManager.getTest().log(LogStatus.INFO, \"Click on 'Create an account' button\");\n\t}", "public void onClick(View view) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tArrayAdapter<Account> adapter = (ArrayAdapter<Account>) getListAdapter();\n\t\tAccount account = null;\n\t\t\n\t\t\n\t\tEditText text = (EditText)findViewById(R.id.pole_tekstowe);\n\t\tswitch (view.getId()) {\n\t\t\n\t\tcase R.id.send:\n\t\t\tString command=null;\n\t\t\t\n\t\t\tcommand = text.getText().toString();\n\t\t\ttry{\n\t\t\tTransaction transaction = parser.parse(command);\n\t\t\t}catch(RuntimeException e){\n\t\t\t\tToast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n\t\t\t\t//TODO print exception to user\n\t\t\t}\n\t\t\ttext.setText(\" \");\n\n\t\t\t\n\t\t\tbreak;\n/*\t\tcase R.id.from:\n\t\t\tcommand = text.getText().toString() + \" from \";\n\t\t\ttext.setText(command);\n\t\t\ttext.setSelection(command.length());\n\t\t\t\n\t\t\tbreak;\n\t\tcase R.id.to:\n\t\t\tcommand = text.getText().toString() + \" to \";\n\t\t\ttext.setText(command);\n\t\t\ttext.setSelection(command.length());\n\t\t\tbreak;*/\n\t\tcase R.id.add:\n\t\t\tfloat[] accounts = {1.0f,2.0f,3.0f};\n\t\t\tint nextInt = new Random().nextInt(accounts.length);\n\t\t\t// Save the new comment to the database\n\t\t\taccount = datasource.createAccount(accounts[nextInt],\"Acc \"+accounts[nextInt]);\n\t\t\tadapter.add(account);\n\t\t\tbreak;\n\t\tcase R.id.delete:\n\t\t\tif (getListAdapter().getCount() > 0) {\n\t\t\t\taccount = (Account) getListAdapter().getItem(0);\n\t\t\t\tdatasource.deleteAccount(account);\n\t\t\t\tadapter.remove(account);\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tadapter.notifyDataSetChanged();\n\t}", "private void ShowToast(String massage, int colorText, int background) {\n Typeface font = Typeface.createFromAsset(getAssets(), \"comic.ttf\");\n Toast toast = Toast.makeText(SignUpActivity.this, massage,\n Toast.LENGTH_LONG);\n View view=toast.getView();\n TextView view1= view.findViewById(android.R.id.message);\n view1.setTextColor(colorText);\n view.setBackgroundResource(background);\n view1.setTypeface(font);\n toast.show();\n }", "@Override\n public void onClick(View view) {\n if (view != null) {\n InputMethodManager inputMethodManager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n assert inputMethodManager != null;\n inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);\n }\n // When user clicks on 'CREATE ACCOUNT', take the input provided by user,\n // validate it and create a new account\n createNewAccount();\n }", "public void success() {\n Toast.makeText(ui.getApplicationContext(),\"Account successfully created!\",Toast.LENGTH_SHORT).show();\n }", "private void setTweetTextListener() {\n mTvTweetLength.setTextColor(Color.BLACK);\n mEtTweet.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n long length = 0;\n if (s.length() > 140) {\n mTvTweetLength.setTextColor(Color.RED);\n length = 140 - s.length();\n mBtnTweet.setEnabled(false);\n } else {\n mTvTweetLength.setTextColor(Color.BLACK);\n length = s.length();\n mBtnTweet.setEnabled(true);\n }\n\n mTvTweetLength.setText(Long.toString(length));\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n // TODO Auto-generated method stub\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_signup);\n\n try {\n ActionBar mActionBar = getActionBar();\n mActionBar.setDisplayShowHomeEnabled(false);\n mActionBar.setDisplayShowTitleEnabled(false);\n LayoutInflater mInflater = LayoutInflater.from(this);\n\n View mCustomView = mInflater.inflate(R.layout.sign_in_actionbar, null);\n\n mActionBar.setBackgroundDrawable(getResources().getDrawable(\n R.drawable.actionbarbg));\n\n TextView mTitleTextView = (TextView) mCustomView\n .findViewById(R.id.txt_title);\n mTitleTextView.setText(\"Sign Up\");\n mActionBar.setLogo(R.drawable.action_icon);\n\n mActionBar.setCustomView(mCustomView);\n mActionBar.setDisplayShowCustomEnabled(true);\n\n edt_fname = (EditText) findViewById(R.id.edt_fname);\n edt_lname = (EditText) findViewById(R.id.edt_lname);\n edt_email = (EditText) findViewById(R.id.edt_email);\n edt_phonenumber = (EditText) findViewById(R.id.edt_phonenumber);\n edt_password = (EditText) findViewById(R.id.edt_password);\n\n btn_signup = (Button) findViewById(R.id.btn_signup);\n\n\n edt_email.setHintTextColor(color.blue);\n edt_password.setHintTextColor(color.blue);\n textView1 = (TextView) findViewById(R.id.textView1);\n String htmlText = \"<html>By logging in you are agreeing to\\nPrivacy Shield's <a href=\\\"http://www.google.com/\\\">Terms &amp; Privacy</a></html>\";\n textView1.setText(Html.fromHtml(htmlText));\n textView1.setClickable(true);\n textView1.setMovementMethod(LinkMovementMethod.getInstance());\n\n btn_signup.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String fname = edt_email.getText().toString().trim();\n String lname = edt_lname.getText().toString().trim();\n String email = edt_email.getText().toString().trim();\n String number = edt_phonenumber.getText().toString().trim();\n String password = edt_password.getText().toString().trim();\n if (fname.length() == 0) {\n Toast.makeText(SignUpActivity.this, getString(R.string.fname_validation), Toast.LENGTH_LONG).show();\n edt_fname.requestFocus();\n } else if (lname.length() == 0) {\n Toast.makeText(SignUpActivity.this, getString(R.string.lname_validation), Toast.LENGTH_LONG).show();\n edt_lname.requestFocus();\n } else if (email.length() == 0) {\n Toast.makeText(SignUpActivity.this, getString(R.string.email_validation), Toast.LENGTH_LONG).show();\n } else if (!constant.isEmailValid(email)) {\n Toast.makeText(SignUpActivity.this, getString(R.string.email_validation), Toast.LENGTH_LONG).show();\n } else if (number.length() == 0) {\n Toast.makeText(SignUpActivity.this, getString(R.string.phone_validation), Toast.LENGTH_LONG).show();\n edt_phonenumber.requestFocus();\n } else if (password.length() == 0) {\n Toast.makeText(SignUpActivity.this, getString(R.string.password_validation), Toast.LENGTH_LONG).show();\n } else {\n// call_webservices SU = new call_webservices(email, password);\n// SU.execute();\n constant.hide_keyboard(SignUpActivity.this);\n call_SignUp signup = new call_SignUp(fname, lname, email, number, password);\n signup.execute();\n }\n }\n });\n\n } catch (NotFoundException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "private TextView m25227b(Context context) {\n TextView textView = new TextView(context);\n textView.setLayoutParams(new LayoutParams(-1, -1));\n textView.setGravity(17);\n textView.setText(this.options.getMessageText());\n textView.setTextColor(this.options.getMessageColor());\n textView.setTextSize(2, 18.0f);\n return textView;\n }", "public void createAccount(View view) {\n String action = \"\";\n Intent dashboard = new Intent(this, RescueDashboard.class);\n\n //if the user is editing their profile, they do not have to replace their image.\n\n if (bitmap == null && !edit) {\n action = \"Please select a photo.\\n\";\n }\n\n\n name = nameView.getText().toString().trim();\n if (name.equals(\"\")) {\n action += \"Please enter your organization's name.\\n\";\n }\n street = streetView.getText().toString().trim();\n if (street.equals(\"\")) {\n action += \"Please enter the street address of your organization.\\n\";\n }\n city = cityView.getText().toString().trim();\n if (city.equals(\"\")) {\n action += \"Please enter the city in which your organization is located.\\n\";\n }\n zip = zipView.getText().toString().trim();\n\n state = stateView.getText().toString().trim();\n if (state.equals(\"\")) {\n action += \"Please enter the state in which your organization is located.\\n\";\n }\n email = emailView.getText().toString().trim();\n\n if (!isValid(email)) {\n action += \"The email address entered is not in a valid format.\\n\";\n }\n if (!zip.matches(\"[0-9]+\") | zip.length() < 5) {\n action += \"Zip code is invalid! Be sure to enter only numbers.\\n\";\n\n }\n username = usernameView.getText().toString().trim();\n if (username.equals(\"\")) {\n action += \"Please enter a username.\\n\";\n }\n\n password = passwordView.getText().toString().trim();\n confirmPassword = password2.getText().toString().trim();\n\n if (password.equals(\"\") && !edit) {\n action += \"Please enter a password\\n\";\n } else if (!password.equals(confirmPassword)) {\n action += \"Passwords do not match. Please enter them again.\\n\";\n passwordView.setText(\"\");\n password2.setText(\"\");\n }\n\n //if something was input incorrectly, display a toast with what it was\n\n if (!action.equals(\"\")) {\n Toast t = Toast.makeText(this, action.trim(),\n Toast.LENGTH_SHORT);\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n } else {\n //update the Adopter profile if the user is editing\n\n if (edit) {\n Rescue r = Rescue.currentRescue;\n if (uploadedPhoto) {\n r.setPhoto(bitmap);\n //picView.setImageBitmap(bitmap);\n }\n r.setOrganization(name);\n r.setState(state);\n r.setStreet(street);\n r.setZip(zip);\n r.setEmail(email);\n r.setCity(city);\n\n //DatabaseReference ref= FirebaseDatabase.getInstance().getReference().child(\"rescue\").child(r.getRescueID());\n\n Map<String, Object> updates = new HashMap<>();\n\n String path = addPhotoToFirebase();\n String newPath = r.getImage();\n if (path != null) {\n newPath = path;\n }\n\n\n updates.put(\"city\", city);\n updates.put(\"email\", email);\n updates.put(\"image\", newPath);\n updates.put(\"organization\", name);\n updates.put(\"state\", state);\n updates.put(\"street\", street);\n updates.put(\"zip\", zip);//etc\n\n MainActivity.firestore\n .collection(\"rescue\")\n .document(r.getRescueID())\n .update(updates);\n if (!Account.getMD5(password).equals(Account.currentAccount.getPassword()) && !password.equals(\"\") && password.equals(confirmPassword)) {\n MainActivity.firestore\n .collection(\"account\")\n .document(r.getUsername())\n .update(\"password\", Account.getMD5(password));\n }\n Toast t = Toast.makeText(this, \"Rescue profile updated!\",\n Toast.LENGTH_SHORT);\n\n t.setGravity(Gravity.TOP, Gravity.CENTER, 150);\n t.show();\n startActivity(dashboard);\n finish();\n\n\n // ref.updateChildren(updates);\n// if(!password.equals(\"\")) {\n// r.setPassword(password);\n// }\n }\n //create a new adopter profile\n\n else {\n\n MainActivity.firestore.collection(\"account\").whereEqualTo(\"username\", username).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n if (task.getResult().isEmpty()) {\n addAccount();\n Intent dashboard = new Intent(getApplicationContext(), RescueDashboard.class);\n startActivity(dashboard);\n finish();\n\n\n } else {\n showToast(true);\n\n }\n\n } else {\n showToast(false);\n }\n }\n\n\n });\n\n\n }\n\n\n }\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString name = userNameEditText.getText().toString();\n\t\t\t\tString email = emailEditText.getText().toString();\n\t\t\t\tif (name.length() > 16) {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tgetResources().getString(R.string.ms_username_long), Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (name.length() < 4) {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tgetResources().getString(R.string.ms_username_short), Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tPattern p = Pattern.compile(\"^[a-z0-9!#$%&'*+/=?^_`{|}~-]\" + \"+(?:\\\\.[a-z0-9!#$%&'*\"\n\t\t\t\t\t\t+ \"+/=?^_`{|}~-]+)*\");\n\t\t\t\tif(!p.matcher(name.trim()).matches()){\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tgetResources().getString(R.string.ms_name_format), Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(email.length()>50){\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tgetResources().getString(R.string.ms_email_too_long), Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!validateEmail(email)) {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tgetResources().getString(R.string.ms_email_invalid), Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tdoRegister(name, email, FlashScreenActivity.token);\n\t\t\t\tif (pd == null) {\n\t\t\t\t\tpd.setTitle(\"connecting to server...\");\n\t\t\t\t\tpd.show();\n\t\t\t\t}\n\t\t\t\t// startActivity(new Intent(getApplicationContext(),\n\t\t\t\t// Entry02Activity.class));\n\t\t\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\n super.test = \"bbb\";\n \tsuper.onCreate(savedInstanceState);\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n \n TableLayout tableLayout = new TableLayout(this);\n tableLayout.setBackgroundColor(Color.rgb(255, 255, 255));\n setContentView(tableLayout, new LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.FILL_PARENT));\n\n TableRow tableRow1 = new TableRow(this);\n userId=new EditText(this);\n userId.setText(\"userId\", EditText.BufferType.NORMAL);\n// userId.setFilters(filters);\n TableRow.LayoutParams rowLayout = new TableRow.LayoutParams();\n rowLayout.span = 2;\n tableRow1.addView(userId,rowLayout);\n \n TableRow tableRow2 = new TableRow(this);\n passwd=new EditText(this);\n passwd.setText(\"passwd\", EditText.BufferType.NORMAL);\n passwd.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);\n tableRow2.addView(passwd, rowLayout);\n \n TableRow tableRow3 = new TableRow(this);\n //OKボタンの生成\n okBtn = new Button(this);\n okBtn.setText(\"OK\");\n okBtn.setOnClickListener(this);\n okBtn.setTag(\"ok\");\n tableRow3.addView(okBtn);\n \n //CANCELボタンの生成\n cancelBtn = new Button(this);\n cancelBtn.setText(\"CANCEL\");\n cancelBtn.setOnClickListener(this);\n cancelBtn.setTag(\"cancel\");\n tableRow3.addView(cancelBtn);\n \n //ユーザ作成ボタンの生成\n newBtn = new Button(this);\n newBtn.setText(\"新規作成\");\n newBtn.setOnClickListener(this);\n newBtn.setTag(\"new\");\n tableRow3.addView(newBtn);\n\n tableLayout.addView(tableRow1);\n tableLayout.addView(tableRow2);\n tableLayout.addView(tableRow3);\n }", "public void findUIElements() {\n nameField = (EditText) findViewById(R.id.NAMEFIELD);\n nameField.setHintTextColor(getResources().getColor(R.color.colorPrimary));\n enterButton = (Button) findViewById(R.id.ENTER);\n enterButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = nameField.getText().toString();\n if (name.length() > 0) {\n RealmManager.getInstance().createUser(name);\n finish();\n }\n }\n });\n }", "@Override\n public void onClick(View v) {\n\n String firstName = firstName_et.getText().toString();\n String lastName = lastName_et.getText().toString();\n String emailId = email_et.getText().toString();\n\n addMember(firstName, lastName, emailId);\n\n }", "public void configure(T aView) { aView.setText(\"Button\"); }", "private void initView() {\n btnLoginFacebook = (RelativeLayout) findViewById(R.id.btnLoginFacebook);\n btnLoginGoogle = (RelativeLayout) findViewById(R.id.btnLoginGoogle);\n txtRegister = (TextViewFontAwesome) findViewById(R.id.txtRegister);\n txtForgotPassword = (TextViewFontAwesome) findViewById(R.id.txtForgotPassword);\n txtLogin = (TextViewFontAwesome) findViewById(R.id.txtLogin);\n txtUsername = (EditText) findViewById(R.id.txtUsername);\n txtPassword = (EditText) findViewById(R.id.txtPassword);\n txtForgotPassword.setPaintFlags(txtForgotPassword.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);\n }", "public void setTextColor(RMColor aColor) { }", "private TextView createDateTextView(String strDate) {\n TextView dateTv = new TextView(this);\n dateTv.append(strDate);\n dateTv.setTextSize(14);\n dateTv.setEms(10);\n dateTv.setTextColor(Color.parseColor(\"#aaaaaa\"));\n\n return dateTv;\n }", "private void setConsoleText(String text) {\n //<font color='red'>red</font>\n consoleView.setText(Html.fromHtml(text), TextView.BufferType.SPANNABLE);\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public Object instantiateItem(ViewGroup container, int position) {\n TextView tv = new TextView(getContext());\n tv.setBackgroundColor(Colors[position]);\n tv.setTextColor(Color.WHITE);\n tv.setText(\"\"+position);\n container.addView(tv);\n return tv;\n }", "public TextView a(Context context) {\n TextView textView = new TextView(context);\n textView.setGravity(17);\n textView.setTextSize(2, 12.0f);\n textView.setTypeface(Typeface.DEFAULT_BOLD);\n textView.setLayoutParams(new LayoutParams(-2, -2));\n TypedValue typedValue = new TypedValue();\n getContext().getTheme().resolveAttribute(16843534, typedValue, true);\n textView.setBackgroundResource(typedValue.resourceId);\n textView.setAllCaps(true);\n int i = (int) (16.0f * getResources().getDisplayMetrics().density);\n textView.setPadding(i, i, i, i);\n return textView;\n }", "public void onCreateAccountPressed(View view) {\n\n\n mUserName = mEditTextUsernameCreate.getText().toString();\n mUserEmail = mEditTextEmailCreate.getText().toString().toLowerCase();\n mPassword = mEditTextPasswordCreate.getText().toString();\n\n /**\n * Check that email and user name are okay\n */\n boolean validEmail = isEmailValid(mUserEmail);\n boolean validUserName = isUserNameValid(mUserName);\n boolean validPassword = isPasswordValid(mPassword);\n if (!validEmail || !validUserName || !validPassword) return;\n /**\n * If everything was valid show the progress dialog to indicate that\n * account creation has started\n */\n mAuthProgressDialog.show();\n\n\n // [START create_user_with_email]\n mAuth.createUserWithEmailAndPassword(mUserEmail, mPassword)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LOG_TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(CreateAccountActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();//error message\n //showErrorToast(\"createUserWithEmail : \"+task.isSuccessful());\n }\n\n // [START_EXCLUDE]\n mAuthProgressDialog.dismiss();\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n // [END_EXCLUDE]\n //end\n }\n });\n // [END create_user_with_email]\n\n\n\n /**\n * Create new user with specified email and password\n */\n /*mFirebaseRef.createUser(mUserEmail, mPassword, new Firebase.ValueResultHandler<Map<String, Object>>() {\n @Override\n public void onSuccess(Map<String, Object> result) {\n Dismiss the progress dialog\n mAuthProgressDialog.dismiss();\n Log.i(LOG_TAG, getString(R.string.log_message_auth_successful));\n }\n\n @Override\n public void onError(FirebaseError firebaseError) {\n *//* Error occurred, log the error and dismiss the progress dialog *//*\n Log.d(LOG_TAG, getString(R.string.log_error_occurred) +\n firebaseError);\n mAuthProgressDialog.dismiss();\n *//* Display the appropriate error message *//*\n if (firebaseError.getCode() == FirebaseError.EMAIL_TAKEN) {\n mEditTextEmailCreate.setError(getString(R.string.error_email_taken));\n } else {\n showErrorToast(firebaseError.getMessage());\n }\n\n }\n });*/\n }", "public CustomTextView(Context context) {\n\t\tsuper(context);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.setting_myinfo);\n\t\tre_name=(RelativeLayout) findViewById(R.id.layout_name);\n\t\ttext_name=(TextView) findViewById(R.id.text_name);\n\t\ttext_name.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLog.i(\"点击事件\", \"点击事件被执行了\");\n\t\t\t\tfinal EditText localEditText = new EditText(getApplicationContext());\n\t\t\t\tAlertDialog.Builder aDialog=new AlertDialog.Builder(getApplicationContext());\n\t\t\t\taDialog.setTitle(\"请输入名字\")\n\t\t\t\t.setView(localEditText)\n\t\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tLog.i(\"点击事件\", \"编辑框点击事件被执行了\");\n\t\t\t\t\t\tString string=localEditText.getText().toString();\n\n\t\t\t\t\t\tif(string!=null){\n\t\t\t\t\t\t\tMyinfo.this.text_name.setText(string);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t Toast.makeText(getApplicationContext(), \"请输入ID\", 1000).show();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\t\t/*setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinal EditText localEditText = new EditText(getApplicationContext());\n\t\t\t\tAlertDialog.Builder aDialog=new AlertDialog.Builder(getApplicationContext());\n\t\t\t\taDialog.setTitle(\"请输入名字\")\n\t\t\t\t.setView(localEditText)\n\t\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tString string=localEditText.getText().toString();\n\n\t\t\t\t\t\tif(string!=null){\n\t\t\t\t\t\t\tMyinfo.this.text_name.setText(string);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t Toast.makeText(getApplicationContext(), \"请输入ID\", 1000).show();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t/*\tnew AlertDialog.Builder(this).setTitle(\"请输入\").setIcon(\n\t\t\t\t\t android.R.drawable.ic_dialog_info).setView(\n\t\t\t\t\t new EditText(this)).setPositiveButton(\"确定\", null)\n\t\t\t\t\t .setNegativeButton(\"取消\", null).show();\n\t\t\t\t\n\t\t\t}\n\t\t});*/\n\t\t\n\t\n\t}", "public void Text_Message(View view) {\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Message Input\");\r\n final EditText eT= new EditText(this);\r\n eT.setHint(\"Type Message Here\");\r\n adb.setView(eT);\r\n adb.setPositiveButton(\"Show\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n String str= eT.getText().toString();\r\n Toast.makeText(MainActivity.this,str,Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n adb.setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "@Override\n public void onClick(View v) {\n BluetoothAdapter myBleAdapter = BluetoothAdapter.getDefaultAdapter();\n myBleAdapter.enable();\n\n if (myBleWrapper.isBtEnabled() == true) {\n tV1.setTextColor(Color.parseColor(\"#000000\"));\n tV1.setText(\"Yo ble is on\");\n }\n// else\n// {\n// tV1.setText(\"ble is off\");\n// }\n }", "public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }", "public void CreateAccount(View view) {\n ConnectivityManager connectivityManager =(ConnectivityManager)getSystemService(CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();\n if (networkInfo!=null && networkInfo.isConnectedOrConnecting()) {\n final String rut = txt_rut.getText().toString().replace(\".\", \"\").replace(\"-\", \"\");\n validarRut(rut);\n }else {\n Toast.makeText(getApplicationContext(),\"No tiene coneccion a internet\",Toast.LENGTH_LONG).show();\n }\n }", "private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }", "@SuppressLint(\"SetTextI18n\")\n public void setClicked(View view) {\n\n playersCount++;\n TextView textView = findViewById(R.id.textView2);\n TextView textPlayer1 = findViewById(R.id.textView3);\n TextView textPlayer2 = findViewById(R.id.textView4);\n Button button = findViewById(R.id.button);\n EditText editText = findViewById(R.id.editText);\n\n // adds player's names to screen\n if (playersCount == 1) {\n player1 = editText.getText().toString();\n editText.setHint(\"Player\");\n textPlayer1.setText(player1);\n } else if (playersCount == 2) {\n player2 = editText.getText().toString();\n textPlayer2.setText(player2);\n editText.setVisibility(View.INVISIBLE);\n button.setVisibility(View.INVISIBLE);\n textView.setText(\"\");\n }\n\n editText.setText(\"\");\n\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\t\t\t Bundle savedInstanceState)\n{\n\tview = inflater.inflate(R.layout.profile_activity, container, false);\n\tcontext = view.getContext();\n\n\tloginText = (FloatLabeledEditText)view.findViewById(R.id.user);\n\tpassText = (FloatLabeledEditText)view.findViewById(R.id.etPassword);\n\tnewpass = (FloatLabeledEditText)view.findViewById(R.id.etnewPassword);\n\tconfText = (FloatLabeledEditText)view.findViewById(R.id.etnewPasswordConfirm);\n\n\tbtnLogin=(RobotoTextView)view.findViewById(R.id.login);\n//\tbtnLogin.setOnClickListener(this);\n // new AsynchTaskEx().execute();\n\treturn view;\n}", "public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }", "private void setGoogleSignInButtonText(SignInButton signInButton, String buttonText) {\n for (int i = 0; i < signInButton.getChildCount(); i++) {\n View v = signInButton.getChildAt(i);\n\n if (v instanceof TextView) {\n TextView tv = (TextView) v;\n tv.setText(buttonText);\n return;\n }\n }\n }", "@Test\r\n public void regButton(){\r\n onView(withId(R.id.edUserReg)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"Jade\"));\r\n onView(withId(R.id.edPassReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.edPassConReg)).perform(typeText(\"hey\"));\r\n onView(withId(R.id.btnReg)).perform(click());\r\n }", "public void goToCreate(View view) {\n Intent intent = new Intent(this, CreateAccountActivity.class);\n startActivity(intent);\n }" ]
[ "0.77336836", "0.67956036", "0.62179655", "0.6203598", "0.61143076", "0.60480213", "0.60358477", "0.6022612", "0.5903316", "0.58857477", "0.5870757", "0.5835768", "0.5775868", "0.5775045", "0.57682157", "0.5718082", "0.5583385", "0.55750406", "0.55480564", "0.55123174", "0.5510201", "0.5507987", "0.5507869", "0.55077916", "0.5491446", "0.5487622", "0.5477075", "0.5473647", "0.5462143", "0.54540616", "0.5452425", "0.54488385", "0.5444466", "0.5429778", "0.54287237", "0.542534", "0.5416318", "0.5414228", "0.5413557", "0.5412296", "0.54024917", "0.53987616", "0.5395528", "0.5392415", "0.53891724", "0.5384242", "0.53817123", "0.5373599", "0.53705966", "0.53637844", "0.5363014", "0.536167", "0.53612894", "0.53523505", "0.53519166", "0.53515136", "0.5346412", "0.53431046", "0.5342311", "0.53409004", "0.5338482", "0.5335175", "0.53332245", "0.53303957", "0.53243136", "0.53224677", "0.5322175", "0.5320515", "0.5317353", "0.53170216", "0.5311348", "0.53103995", "0.53082615", "0.5302249", "0.52926403", "0.52908146", "0.52673256", "0.52636325", "0.525653", "0.52467847", "0.5243198", "0.5241106", "0.52391934", "0.52383775", "0.523422", "0.5229229", "0.5225467", "0.5221371", "0.521834", "0.52178395", "0.5215691", "0.5213797", "0.52013505", "0.5196819", "0.519665", "0.51896197", "0.5184264", "0.51837486", "0.51822555", "0.5178394" ]
0.78866404
0
This method is for handling fromHtml method deprecation
@SuppressWarnings("deprecation") public static Spanned fromHtml(String html) { Spanned result; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { result = Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY); } else { result = Html.fromHtml(html); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected SafeHtml getInnerHtml() {\n return html;\n }", "@SuppressWarnings(\"deprecation\")\n public static String convertHTMLToText(String html) {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {\n return Html.fromHtml(html).toString();\n } else {\n return Html.fromHtml(html, Html.FROM_HTML_MODE_LEGACY).toString();\n }\n }", "private String processHtmlDocumentFromBrowser(SessionState state, String strFromBrowser)\n\t{\n\t\tStringBuffer alertMsg = new StringBuffer();\n\t\tString text = FormattedText.processHtmlDocument(strFromBrowser, alertMsg);\n\t\tif (alertMsg.length() > 0) addAlert(state, alertMsg.toString());\n\t\treturn text;\n\t}", "private static String convertForHTML(final String src) {\n String s = src;\n for (Map.Entry<String, String> entry: HTML_CONVERSIONS.entrySet()) s = s.replace(entry.getKey(), entry.getValue());\n return s;\n }", "public static Spanned fromHtml(String argValue) {\n if (com.rz.librarycore.utils.Utils.isNullOrEmpty(argValue)) {\n return null;\n }\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n return Html.fromHtml(argValue, Html.FROM_HTML_MODE_LEGACY);\n } else {\n return Html.fromHtml(argValue);\n }\n }", "private Spanned getRichText(String htmlText) {\n Spanned richText;\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) {\n richText = Html.fromHtml(htmlText, Html.FROM_HTML_MODE_LEGACY);\n } else {\n richText = Html.fromHtml(htmlText);\n }\n return richText;\n }", "String renderHTML();", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "private String escapeHtml(String html) {\n if (html == null) {\n return null;\n }\n return html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\n \">\", \"&gt;\");\n }", "public native final String html()/*-{\n\t\treturn this.html();\n\t}-*/;", "HTML createHTML();", "public String getHtml() {\n return html;\n }", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\").replaceAll(\">\", \"&gt;\");\r\n\t}", "public void setHTML(String html);", "public RenderablePanel(@IsSafeHtml String html) {\n this(SafeHtmlUtils.fromTrustedString(html));\n }", "private String escapeHtml(String html) {\r\n\t\tif (html == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\r\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\r\n\t}", "private static String HtmlToText(final String s) {\n final HTMLEditorKit kit = new HTMLEditorKit();\n final Document doc = kit.createDefaultDocument();\n try {\n kit.read(new StringReader(s), doc, 0);\n return doc.getText(0, doc.getLength()).trim();\n } catch (final IOException | BadLocationException ioe) {\n return s;\n }\n }", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "private String escapeHtml(String html) {\n\t\tif (html == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn html.replaceAll(\"&\", \"&amp;\").replaceAll(\"<\", \"&lt;\")\n\t\t\t\t.replaceAll(\">\", \"&gt;\");\n\t}", "public static void fromHtml(TextView textView, String html) {\n Context context = textView.getContext();\n\n // For displaying <img> tags\n Picasso picasso = Picasso.with(context);\n PicassoImageGetter imageGetter = new PicassoImageGetter(picasso, textView);\n\n Spanned htmlText;\n if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {\n htmlText = Html.fromHtml(html, imageGetter, null);\n } else {\n htmlText = Html.fromHtml(html,\n Html.FROM_HTML_OPTION_USE_CSS_COLORS |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_HEADING |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_LIST |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH |\n Html.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE,\n imageGetter,\n null\n );\n }\n\n URLSpan[] currentSpans = htmlText.getSpans(0, htmlText.length(), URLSpan.class);\n\n // So pressing on links will work (open up a browser or email client)\n SpannableString buffer = new SpannableString(htmlText);\n Linkify.addLinks(buffer, Linkify.ALL);\n\n // Turn @username mentions into clickable links\n Linkify.TransformFilter filter = new Linkify.TransformFilter() {\n public final String transformUrl(final Matcher match, String url) {\n return match.group();\n }\n };\n\n Pattern mentionPattern = Pattern.compile(\"@([A-Za-z0-9_-]+)\");\n Linkify.addLinks(buffer, mentionPattern, null, null, filter);\n\n for (URLSpan span : currentSpans) {\n int end = htmlText.getSpanEnd(span);\n int start = htmlText.getSpanStart(span);\n buffer.setSpan(span, start, end, 0);\n }\n\n Spanned finalHtmlText = buffer;\n\n BetterLinkMovementMethod linker = BetterLinkMovementMethod.newInstance();\n textView.setMovementMethod(linker);\n linker.setOnLinkClickListener((tv, url) -> {\n if (url.startsWith(\"@\")) {\n // Username mention - show user profile screen\n try {\n JSONObject item = new JSONObject();\n item.put(\"login\", url.substring(1));\n Intent intent = new Intent(context, UserProfile.class);\n intent.putExtra(\"user\", new BetterJSONObject(item));\n context.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return true;\n\n } else {\n // Regular URL - use default action (e.g. open browser)\n return false;\n }\n });\n\n textView.setLinksClickable(true);\n textView.setFocusable(false);\n textView.setText(finalHtmlText);\n }", "public void setHtmlFromString(String html, boolean useLocalDrawables) {\n Html.ImageGetter imgGetter;\n\n if (useLocalDrawables) {\n imgGetter = new LocalImageGetter(getContext());\n } else {\n imgGetter = new UrlImageGetter(this, getContext());\n }\n\n // this uses Android's Html class for basic parsing, and HtmlTagHandler\n setText(Html.fromHtml(html, imgGetter, new HtmlTagHandler()));\n\n // make links work\n setMovementMethod(LinkMovementMethod.getInstance());\n this.setTextColor(getResources().getColor(android.R.color.secondary_text_dark_nodisable));\n\n }", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "@Test\n public void parserHtml() throws JSONException, IOException {\n }", "public static void setHTML(String html) {\n if (create()) {\n tag.setInnerHTML(SimpleHtmlSanitizer.sanitizeHtml(html).asString());\n }\n }", "public String getHtmlText() {\n return htmlText;\n }", "public String convertMarkupToHTML(String text) {\n return text;\n }", "public static String removeHTML(String str) {\n return removeHTML(str, true);\n }", "private static String fromHtmlEntity(String str) {\n Character ch = map.get(str);\n return (ch != null) ? ch.toString() : str;\n }", "private String renderSpecific( String strHTML )\n {\n String strRender = strHTML;\n strRender = strRender.replaceAll( \"\\\\[lt;\", \"&lt;\" );\n strRender = strRender.replaceAll( \"\\\\[gt;\", \"&gt;\" );\n strRender = strRender.replaceAll( \"\\\\[nbsp;\", \"&nbsp;\" );\n strRender = strRender.replaceAll( \"\\\\[quot;\", \"&quot;\" );\n strRender = strRender.replaceAll( \"\\\\[amp;\", \"&amp;\" );\n strRender = strRender.replaceAll( \"\\\\[hashmark;\", \"#\" );\n\n if ( _strPageUrl != null )\n {\n strRender = strRender.replaceAll( \"#page_url\", _strPageUrl );\n }\n\n return strRender;\n }", "public String getMessageTextAsHTML();", "public AdmClientePreferencialHTML(AdmClientePreferencialHTML src) {\n/* 209 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 211 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 213 */ syncAccessMethods();\n/* */ }", "public String parseHTML(String html) {\n\n int endIndex;\n for (int startIndex = html.indexOf(\"<figure\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<figure\")) {\n endIndex = html.indexOf(\"figure>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 7);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<span class=\\\"editsection\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<span class=\\\"editsection\")) {\n endIndex = html.indexOf(\"span>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n for (int startIndex = html.indexOf(\"<img\");\n startIndex >= 0;\n startIndex = html.indexOf(\"<img\")) {\n endIndex = html.indexOf(\"img>\", startIndex);\n if (endIndex == -1) {\n break;\n }\n String sub = html.substring(startIndex, endIndex + 5);\n html = html.replace(sub, \"\");\n }\n\n return html;\n }", "@DISPID(-2147417084)\n @PropGet\n java.lang.String outerHTML();", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "public void enableRawInlineHtml()\n {\n rawInlineHtmlEnabled = true;\n }", "@Override\n protected Document parseAsDom(final Document input) {\n return input;\n }", "public String cleanHtmlTextForPlayer(String unrefinedHtmlText) {\n\n String figureRemove = replaceAllCharacter(unrefinedHtmlText, ConstantUtil.HTML_EXTRACT_FIGURE_REGEX, ConstantUtil.BLANK);\n String figcaptionRemove = replaceAllCharacter(figureRemove, ConstantUtil.HTML_EXTRACT_FIGCAPTION_REGEX, ConstantUtil.BLANK);\n String almostRefinedText = figcaptionRemove.replaceAll(ConstantUtil.HTML_EXTRACT_IMG_REGEX, ConstantUtil.BLANK);\n return almostRefinedText;\n\n }", "public String parserXHtml(String html) {\r\n\t\torg.jsoup.nodes.Document document = Jsoup.parseBodyFragment(html);\r\n\t\tdocument.outputSettings().syntax(org.jsoup.nodes.Document.OutputSettings.Syntax.xml);\r\n\t\tdocument.outputSettings().charset(\"UTF-8\");\r\n\t\treturn document.toString();\r\n\t}", "public static Element setInnerHTML(Element e, SafeHtml str) {\n e.setInnerHTML(str.asString());\n return e;\n }", "public String getHTML() throws Exception {\n\t\t// create object to store html source text as it is being collected\n\t\tStringBuilder html = new StringBuilder();\n\t\t// open connection to given url\n\t\tURL url = new File(urlString).toURI().toURL();\n\t\t// create BufferedReader to buffer the given url's HTML source\n\t\tBufferedReader htmlbr =\n\t\t\t\tnew BufferedReader(new InputStreamReader(url.openStream()));\n\t\tString line;\n\t\t// read each line of HTML code and store in StringBuilder\n\t\twhile ((line = htmlbr.readLine()) != null) {\n\t\t\thtml.append(line);\n\t\t}\n\t\thtmlbr.close();\n\t\t// convert StringBuilder into a String \n\t\tString stringHtml = html.toString();\n\t\t\n\t\t// preprocess the string to replace all special chars\n\t\tstringHtml.replaceAll(\"&#39\", \"'\");\n\t\tstringHtml.replaceAll(\"&#8208\", \"-\");\n\t\tstringHtml.replaceAll(\"&#38\", \"&\");\n\t\t\n\t\treturn stringHtml;\n\t}", "protected String completeHtml(String data) {\n if (data.indexOf(\"<html>\") == -1) {\n\t\t\tdata = \"<html><head></head><body style='margin:0;padding:0;'>\"\n\t\t\t\t\t+ data + \"</body></html>\";\n }\n\n\t\treturn data;\n\t}", "public MailMessage setHtml(String html) {\n this.html = html;\n return this;\n }", "@Override\n protected Document parseAsDom(final String input) throws ConversionException {\n return IWXXMConverterBase.parseStringToDOM(input);\n }", "@Test\n public void test() throws IOException {\n String url = \"http://blog.csdn.net/seatomorrow/article/details/48393547\";\n Readability readability = new Readability(getDoc(url)); // URL\n readability.init();\n String cleanHtml = readability.outerHtml();\n System.out.println(cleanHtml);\n }", "private boolean containsHtml(final String str) {\n if (str == null)\n return false;\n return str.indexOf('<') != -1 || str.indexOf('&') != -1;\n }", "@JavascriptInterface\n @SuppressWarnings(\"unused\")\n public void processHTML(String html) {\n\n Element content;\n String value = \"\";\n try {\n org.jsoup.nodes.Document doc = Jsoup.parse(html, \"UTF-8\");\n content = doc.getElementsByClass(\"rupee\").get(0);\n value = content.text();\n } catch (Exception e) {\n e.printStackTrace();\n }\n listener.update(value);\n }", "public String html() {\n\t\treturn HtmlFunction.html(this);\n\t}", "public HTML getHtml() {\n return new HTML(url, body);\n }", "public final static String toPlainText(String html)\r\n {\r\n if (html == null)\r\n {\r\n return null;\r\n }\r\n\r\n try\r\n {\r\n final HTMLStripReader reader = new HTMLStripReader(new StringReader(html));\r\n reader.setKeepAlignedPositions(false);\r\n final StringWriter writer = new StringWriter();\r\n final char [] buffer = new char [4096];\r\n int len;\r\n while ((len = reader.read(buffer)) > 0)\r\n {\r\n writer.write(buffer, 0, len);\r\n }\r\n \r\n return writer.toString();\r\n }\r\n catch (IOException e)\r\n {\r\n throw new RuntimeException(\"Unreachable code.\");\r\n }\r\n }", "public static final String StringToSafeHtml(final Object o) {\n\t\t\n\t\tfinal String string = Convert.Any.toString(o, null);\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn string.replace(\"\\r\", \"\").replace(\">\\n<\", \"><\").replace(\"<br>\", \"\\n\").replace(\"<p>\", \"\\n\\n\").replace(\"</p>\", \"\").replace(\"&#13;\", \"\\n\").replace(\" \\n\", \"\\n\")\n\t\t\t\t.replace(\"\\n\\n\\n\", \"\\n\\n\").replace(\" \", \" &nbsp;\").replace(\"\\t\", \" &nbsp; &nbsp;\").replace(\"<\", \"&lt;\").replace(\"\\n\\n\", \"<p>\").replace(\"\\n\", \"<br>\");\n\t}", "public static String unencodeHtml(String html) {\n if (html == null) {\n return \"\";\n }\n String processed = StringEscapeUtils.unescapeHtml4(html);\n StringBuffer unencodedContent = new StringBuffer(processed.length());\n Matcher fixCharMatch = unencodeCharactersPattern.matcher(processed);\n while (fixCharMatch.find()) {\n fixCharMatch.appendReplacement(unencodedContent, Character.toString((char) Integer.parseInt(fixCharMatch.group(1))));\n }\n fixCharMatch.appendTail(unencodedContent);\n return unencodedContent.toString();\n }", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "public AdmClientePreferencialHTML(DocumentLoader loader) { this(loader, true); }", "private DefaultHTMLs(String contents){\r\n\t\tthis.contents = contents;\r\n\t}", "@Override\n public String toStd(String str){\n return this.replaceFromLists(str, htmlStrings, stdStrings);\n }", "public HTMLLabel(String htmlText) {\n super(\"text/html\", htmlText);\n GuiUtils.assignResources(this);\n setEditable(false);\n setCaretPosition(0);\n mainStyle = ((HTMLDocument)getDocument()).getStyleSheet();\n setSelectionColor(TRANSPARENT_COLOR);\n setHtmlLinkForeground(linkColor);\n addHyperlinkListener(openInNativeBrowserListener);\n // make it mimic a JLabel\n JLabel label = new JLabel();\n setBackground(label.getBackground());\n setHtmlFont(label.getFont());\n }", "public IndicadoresEficaciaHTML(IndicadoresEficaciaHTML src) {\n/* 181 */ this.fDocumentLoader = src.getDocumentLoader();\n/* */ \n/* 183 */ setDocument((Document)src.getDocument().cloneNode(true), src.getMIMEType(), src.getEncoding());\n/* */ \n/* 185 */ syncAccessMethods();\n/* */ }", "private static String convertDescription(final String src) {\n String s = src;\n for (Map.Entry<String, String> entry: DESC_HTML_CONVERSIONS.entrySet()) s = s.replace(entry.getKey(), entry.getValue());\n return s;\n }", "public void loadHtml(final String html) {\n loadHtml(null, html);\n }", "public void htmlReference(View v){\n Intent intent = new Intent(this, HtmlTagsActivity.class);\n startActivity(intent);\n }", "public interface SafeHtmlRenderer<T> {\n\n /**\n * Renders {@code object} as safe HTML.\n */\n SafeHtml render(T object);\n\n /**\n * Renders {@code object} as safe HTML, appended directly to {@code builder}.\n */\n void render(T object, SafeHtmlBuilder builder);\n}", "private String getHtmlWithInjectedAttributes(String html) {\n StringBuilder jsAttributes = new StringBuilder();\n jsAttributes.append(getHtmlAttr(OPTION_ASYNC, async));\n jsAttributes.append(getHtmlAttr(OPTION_DEFER, defer));\n jsAttributes.append(getHtmlAttr(OPTION_CROSSORIGIN, crossorigin));\n jsAttributes.append(getHtmlAttr(OPTION_ONLOAD, onload));\n StringBuilder cssAttributes = new StringBuilder();\n cssAttributes.append(getHtmlAttr(OPTION_MEDIA, media));\n String updatedHtml = StringUtils.replace(html,\"<script \", \"<script \" + jsAttributes.toString());\n return StringUtils.replace(updatedHtml,\"<link \", \"<link \" + cssAttributes.toString());\n }", "private String removeHTMLTags(final String lineToFix) {\n String fixedLine = lineToFix;\n\n fixedLine = fixedLine.replaceAll(\"<b>\", \"\");\n fixedLine = fixedLine.replaceAll(\"</b>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<i>\", \"\");\n fixedLine = fixedLine.replaceAll(\"</i>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<br>\", \"\");\n fixedLine = fixedLine.replaceAll(\"<br />\", \"\");\n\n return fixedLine;\n }", "public interface HtmlEscaper {\n String escape(String string);\n}", "private static String fetchHTML(String link) {\n\t\tStringBuffer buffer = null;\n\t\ttry {\n\t\t\tURL url = new URL(getURL(link));\n\t\t\tInputStream is = url.openStream();\n\t\t\tint ptr = 0;\n\t\t\tbuffer = new StringBuffer();\n\t\t\twhile ((ptr = is.read()) != -1) {\n\t\t\t buffer.append((char)ptr);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn buffer.toString();\n\t}", "public void setInfoHtmlContent(String htmlInfoContent);", "void HTMLtoANSI()\r\n\t{\r\n\t\tfinal String[] extended_ansi_html = {\"&trade;\", \"&#8209;\", \"&#2;\",\r\n\t\t\t\t\"&#3;\", \"&#4;\", \"&#5;\", \"&#6;\", \"&#16;\", \"&#17;\", \"&#18;\",\r\n\t\t\t\t\"&#19;\", \"&#20;\", \"&#21;\", \"&#25;\", \"&nbsp;\", \"&iexcl;\",\r\n\t\t\t\t\"&cent;\", \"&pound;\", \"&curren;\", \"&yen;\", \"&brvbar;\", \"&sect;\",\r\n\t\t\t\t\"&uml;\", \"&copy;\", \"&ordf;\", \"&laquo;\", \"&not;\", \"&shy;\",\r\n\t\t\t\t\"&reg;\", \"&macr;\", \"&deg;\", \"&plusmn;\", \"&sup2;\", \"&sup3;\",\r\n\t\t\t\t\"&acute;\", \"&micro;\", \"&para;\", \"&middot;\", \"&cedil;\",\r\n\t\t\t\t\"&sup1;\", \"&ordm;\", \"&raquo;\", \"&frac14;\", \"&frac12;\",\r\n\t\t\t\t\"&frac34;\", \"&iquest;\", \"&Agrave;\", \"&Aacute;\", \"&Acirc;\",\r\n\t\t\t\t\"&Atilde;\", \"&Auml;\", \"&Aring;\", \"&AElig;\", \"&Ccedil;\",\r\n\t\t\t\t\"&Egrave;\", \"&Eacute;\", \"&Ecirc;\", \"&Euml;\", \"&Igrave;\",\r\n\t\t\t\t\"&Iacute;\", \"&Icirc;\", \"&Iuml;\", \"&ETH;\", \"&Ntilde;\",\r\n\t\t\t\t\"&Ograve;\", \"&Oacute;\", \"&Ocirc;\", \"&Otilde;\", \"&Ouml;\",\r\n\t\t\t\t\"&times;\", \"&Oslash;\", \"&Ugrave;\", \"&Uacute;\", \"&Ucirc;\",\r\n\t\t\t\t\"&Uuml;\", \"&Yacute;\", \"&THORN;\", \"&szlig;\", \"&agrave;\",\r\n\t\t\t\t\"&aacute;\", \"&acirc;\", \"&atilde;\", \"&auml;\", \"&aring;\",\r\n\t\t\t\t\"&aelig;\", \"&ccedil;\", \"&egrave;\", \"&eacute;\", \"&ecirc;\",\r\n\t\t\t\t\"&euml;\", \"&igrave;\", \"&iacute;\", \"&icirc;\", \"&iuml;\", \"&eth;\",\r\n\t\t\t\t\"&ntilde;\", \"&ograve;\", \"&oacute;\", \"&ocirc;\", \"&otilde;\",\r\n\t\t\t\t\"&ouml;\", \"&divide;\", \"&oslash;\", \"&ugrave;\", \"&uacute;\",\r\n\t\t\t\t\"&ucirc;\", \"&uuml;\", \"&yacute;\", \"&thorn;\", \"&yuml;\"};\r\n\t\tfinal String[] extended_ansi = {\"\\u0099\", \"\\u2011\", \"\\u0002\", \"\\u0003\",\r\n\t\t\t\t\"\\u0004\", \"\\u0005\", \"\\u0006\", \"\\u0010\", \"\\u0011\", \"\\u0012\",\r\n\t\t\t\t\"\\u0013\", \"\\u0014\", \"\\u0015\", \"\\u0019\", \"\\u00A0\", \"\\u00A1\",\r\n\t\t\t\t\"\\u00A2\", \"\\u00A3\", \"\\u00A4\", \"\\u00A5\", \"\\u00A6\", \"\\u00A7\",\r\n\t\t\t\t\"\\u00A8\", \"\\u00A9\", \"\\u00AA\", \"\\u00AB\", \"\\u00AC\", \"\\u00AD\",\r\n\t\t\t\t\"\\u00AE\", \"\\u00AF\", \"\\u00B0\", \"\\u00B1\", \"\\u00B2\", \"\\u00B3\",\r\n\t\t\t\t\"\\u00B4\", \"\\u00B5\", \"\\u00B6\", \"\\u00B7\", \"\\u00B8\", \"\\u00B9\",\r\n\t\t\t\t\"\\u00BA\", \"\\u00BB\", \"\\u00BC\", \"\\u00BD\", \"\\u00BE\", \"\\u00BF\",\r\n\t\t\t\t\"\\u00C0\", \"\\u00C1\", \"\\u00C2\", \"\\u00C3\", \"\\u00C4\", \"\\u00C5\",\r\n\t\t\t\t\"\\u00C6\", \"\\u00C7\", \"\\u00C8\", \"\\u00C9\", \"\\u00CA\", \"\\u00CB\",\r\n\t\t\t\t\"\\u00CC\", \"\\u00CD\", \"\\u00CE\", \"\\u00CF\", \"\\u00D0\", \"\\u00D1\",\r\n\t\t\t\t\"\\u00D2\", \"\\u00D3\", \"\\u00D4\", \"\\u00D5\", \"\\u00D6\", \"\\u00D7\",\r\n\t\t\t\t\"\\u00D8\", \"\\u00D9\", \"\\u00DA\", \"\\u00DB\", \"\\u00DC\", \"\\u00DD\",\r\n\t\t\t\t\"\\u00DE\", \"\\u00DF\", \"\\u00E0\", \"\\u00E1\", \"\\u00E2\", \"\\u00E3\",\r\n\t\t\t\t\"\\u00E4\", \"\\u00E5\", \"\\u00E6\", \"\\u00E7\", \"\\u00E8\", \"\\u00E9\",\r\n\t\t\t\t\"\\u00EA\", \"\\u00EB\", \"\\u00EC\", \"\\u00ED\", \"\\u00EE\", \"\\u00EF\",\r\n\t\t\t\t\"\\u00F0\", \"\\u00F1\", \"\\u00F2\", \"\\u00F3\", \"\\u00F4\", \"\\u00F5\",\r\n\t\t\t\t\"\\u00F6\", \"\\u00F7\", \"\\u00F8\", \"\\u00F9\", \"\\u00FA\", \"\\u00FB\",\r\n\t\t\t\t\"\\u00FC\", \"\\u00FD\", \"\\u00FE\", \"\\u00FF\"};\r\n\r\n\t\tstr = replaceString(str, extended_ansi_html, extended_ansi);\r\n\t}", "public static <T extends HasHTML> T set(final T e, final SafeHtml str) {\n e.setHTML(str.asString());\n return e;\n }", "@Override\n\tpublic void createHtml(ModelItemList list) {\n\t\t\n\t}", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "public URL getHtmlDescription();", "protected String parseHtml(String html) {\n\t\tString tokens = new String();\n\t\ttry {\n\t\t\tDocument document = Jsoup.parse(html);\n\t\t\tdocument.select(\"code,pre\").remove();\n\t\t\tString textcontent = document.text();\n\t\t\tArrayList<String> cleaned = removeSpecialChars(textcontent);\n\t\t\tfor (String token : cleaned) {\n\t\t\t\ttokens += token + \" \";\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\t// handle the exception\n\t\t}\n\t\treturn tokens;\n\t}", "default HtmlFormatter wrapWith(String str) {\n return wrapWith(\n str,\n str\n );\n }", "public static native Element overwrite(Element oldElem, String newRawHtml)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newRawHtml);\r\n\t}-*/;", "private WebView m25229c(Context context) {\n WebView webView = new WebView(context);\n webView.setLayoutParams(new LayoutParams(-1, -1));\n webView.setWebViewClient(new C57413(this));\n webView.loadUrl(this.webOptions.getUrl());\n return webView;\n }", "@Override\n protected abstract Document parseAsDom(final T input) throws ConversionException;", "public static String getHTML() {\n if (create()) {\n return tag.getInnerHTML();\n }\n return \"\";\n }", "public static FormattedTextEncoder getInstanceHtml() {\r\n\t\treturn new FormattedTextEncoder();\r\n\t}", "public static String stripHTML(final String in) {\n\t return in.replaceAll(\"</?(A|a|B|b|BR|br|DD|dd|DL|dl|DT|dt|H2|h2|I|i|LI|li|P|p|PRE|pre|TT|tt|UL|ul|BLOCKQUOTE|blockquote)\\\\s*[^>]*>\",\"\");\n// return in.replaceAll(\"<\\\\w+\\\\s*[^>]>\",\"\");\n //return in.replaceAll(\"<(B|BR)\\\\s*[^>]*>\",\"\");\n\t}", "private static String removeVisibleHTMLTags(String str) {\n str = stripLineBreaks(str);\n StringBuffer result = new StringBuffer(str);\n StringBuffer lcresult = new StringBuffer(str.toLowerCase());\n \n // <img should take care of smileys\n String[] visibleTags = {\"<img\"}; // are there others to add?\n int stringIndex;\n for ( int j = 0 ; j < visibleTags.length ; j++ ) {\n while ( (stringIndex = lcresult.indexOf(visibleTags[j])) != -1 ) {\n if ( visibleTags[j].endsWith(\">\") ) {\n result.delete(stringIndex, stringIndex+visibleTags[j].length() );\n lcresult.delete(stringIndex, stringIndex+visibleTags[j].length() );\n } else {\n // need to delete everything up until next closing '>', for <img for instance\n int endIndex = result.indexOf(\">\", stringIndex);\n if (endIndex > -1) {\n // only delete it if we find the end! If we don't the HTML may be messed up, but we\n // can't safely delete anything.\n result.delete(stringIndex, endIndex + 1 );\n lcresult.delete(stringIndex, endIndex + 1 );\n }\n }\n }\n }\n \n // TODO: This code is buggy by nature. It doesn't deal with nesting of tags properly.\n // remove certain elements with open & close tags\n String[] openCloseTags = {\"li\", \"a\", \"div\", \"h1\", \"h2\", \"h3\", \"h4\"}; // more ?\n for (int j = 0; j < openCloseTags.length; j++) {\n // could this be better done with a regular expression?\n String closeTag = \"</\"+openCloseTags[j]+\">\";\n int lastStringIndex = 0;\n while ( (stringIndex = lcresult.indexOf( \"<\"+openCloseTags[j], lastStringIndex)) > -1) {\n lastStringIndex = stringIndex;\n // Try to find the matching closing tag (ignores possible nesting!)\n int endIndex = lcresult.indexOf(closeTag, stringIndex);\n if (endIndex > -1) {\n // If we found it delete it.\n result.delete(stringIndex, endIndex+closeTag.length());\n lcresult.delete(stringIndex, endIndex+closeTag.length());\n } else {\n // Try to see if it is a self-closed empty content tag, i.e. closed with />.\n endIndex = lcresult.indexOf(\">\", stringIndex);\n int nextStart = lcresult.indexOf(\"<\", stringIndex+1);\n if (endIndex > stringIndex && lcresult.charAt(endIndex-1) == '/' && (endIndex < nextStart || nextStart == -1)) {\n // Looks like it, so remove it.\n result.delete(stringIndex, endIndex + 1);\n lcresult.delete(stringIndex, endIndex + 1);\n \n }\n }\n }\n }\n \n return result.toString();\n }", "public LagartoDOMBuilder enableHtmlMode() {\n\t\tconfig.ignoreWhitespacesBetweenTags = false; // collect all whitespaces\n\t\tconfig.parserConfig.setCaseSensitive(false); // HTML is case insensitive\n\t\tconfig.parserConfig.setEnableRawTextModes(true); // script and style tags are parsed as CDATA\n\t\tconfig.enabledVoidTags = true; // list of void tags\n\t\tconfig.selfCloseVoidTags = false; // don't self close void tags\n\t\tconfig.impliedEndTags = true; // some tags end is implied\n\t\tconfig.parserConfig.setEnableConditionalComments(false); // don't enable IE conditional comments\n\t\tconfig.parserConfig.setParseXmlTags(false); // enable XML mode in parsing\n\t\treturn this;\n\t}", "protected String swapJsonLdMarkup(String html, String oldMarkup, String newMarkup) {\n\n\t\tint oldPosition = html.indexOf(oldMarkup);\n\t\tString newHtml = html.substring(0, oldPosition) + newMarkup + html.substring(oldPosition + oldMarkup.length());\n\n\t\treturn newHtml;\n\t}", "public String toString()\n {\n return getHtml();\n }", "@PUT\n @Consumes(MediaType.TEXT_HTML)\n public void putHtml(String content) {\n }", "protected void loadAdHTML(String url)\n\t{\n\t\t\n\t\tthis.adView.loadUrl(url);\n\t\tthis.broadcast(\"loadAdHTML\", url);\n\t}", "public void setEncodeHtml(String off) {\n\t\ttry {\n\t\t\tencodeHtml = Integer.parseInt(off);\n\t\t} catch (Exception e) {\n\t\t\tencodeHtml = 1;\n\t\t}\n\t}", "private String normolize(String str) {\n String str1 = str.replaceAll(\"<div class=\\\"cl\\\"/></div>\", \"\");\n //str1 = new String(str1.getBytes(), \"\");\n return str1;\n }", "@PUT\r\n @Consumes(MediaType.TEXT_HTML)\r\n public void putHtml(String content) {\r\n }", "@Override\n public abstract String asText();", "@DISPID(-2147417084)\n @PropPut\n void outerHTML(\n java.lang.String rhs);", "@Override\n\t\t public void onPageFinished(WebView view, String url) {\n\t\t webView.loadUrl(\"javascript:HTMLOUT.processHTML(document.documentElement.outerHTML);\");\n\t\t }", "public static String convertHtmlToString(String html) {\n if (html == null) {\n return null;\n }\n if (html.length() == 0) {\n return html;\n }\n if (html.indexOf('&') < 0) {\n return html;\n }\n StringBuilder buff = new StringBuilder();\n for (int i = 0; i < html.length(); i++) {\n char ch = html.charAt(i);\n if (ch != '&') {\n buff.append(ch);\n continue;\n }\n int idx = html.indexOf(';', i + 1);\n if (idx < 0) {\n buff.append(\"???\");\n continue;\n }\n String key = html.substring(i + 1, idx);\n Character repl;\n if (key.startsWith(\"#\")) {\n if (key.startsWith(\"#x\")) {\n try {\n int code = Integer.parseInt(key.substring(2), 16);\n if (code < 0 || code > 0xffff) {\n repl = null;\n } else {\n repl = Character.valueOf((char) code);\n }\n } catch (NumberFormatException e) {\n repl = null;\n }\n } else {\n try {\n int code = Integer.parseInt(key.substring(1));\n if (code < 0 || code > 0xffff) {\n repl = null;\n } else {\n repl = Character.valueOf((char) code);\n }\n } catch (NumberFormatException e) {\n repl = null;\n }\n }\n } else {\n repl = CHAR_MAP.get(key);\n }\n if (repl == null) {\n buff.append(\"???\" + key + \"???\");\n continue;\n }\n buff.append(repl.charValue());\n i = idx;\n }\n return buff.toString();\n }", "@DISPID(-2147417086)\n @PropGet\n java.lang.String innerHTML();", "public static String encodeHtml(String str) {\n StringBuffer unencodedContent = new StringBuffer(str.length());\n Matcher fixCharMatch = encodeCharactersPattern.matcher(str);\n while (fixCharMatch.find()) {\n fixCharMatch.appendReplacement(unencodedContent, \"&#\" + fixCharMatch.group(1).codePointAt(0) + \";\");\n }\n fixCharMatch.appendTail(unencodedContent);\n return unencodedContent.toString();\n }", "final String removeHTMLTags(String inputLine)\r\n {\r\n StringBuffer outputLine=new StringBuffer(\"\");\r\n\tboolean foundTag=false;\r\n\tfor(int i=0;i<inputLine.length();i++)\r\n\t{\r\n\t if(inputLine.charAt(i)=='<')\r\n\t foundTag=true;\r\n else if(inputLine.charAt(i)=='>')\r\n\t foundTag=false;\r\n\t else if(foundTag==false)\r\n\t outputLine.append(inputLine.charAt(i));\r\n\t}\r\n\treturn (outputLine.toString());\r\n }", "public AdmClientePreferencialHTML(boolean buildDOM) { this(StandardDocumentLoader.getInstance(), buildDOM); }", "public PoaMaestroMultivaloresHTML() {\n/* 253 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 255 */ buildDocument();\n/* */ }", "@Deprecated\n\tpublic static String loadHTML(File f, String encoding) throws XHTMLTidyException {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(f);\n\t\t\tfinal BufferedReader reader = new BufferedReader(new FileReader(f));\n\t\t\tString line = null;\n\t\t\tfinal StringBuilder stringBuilder = new StringBuilder();\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tstringBuilder.append(line);\n\t\t\t}\n\t\t\treturn stringBuilder.toString();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new XHTMLTidyException(e);\n\t\t}\n\t}", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}" ]
[ "0.6370691", "0.63587856", "0.5999426", "0.5975092", "0.5932589", "0.58973366", "0.58486164", "0.5772207", "0.5772207", "0.5752735", "0.57386315", "0.568106", "0.56737727", "0.5667373", "0.5645717", "0.5621892", "0.5597636", "0.5558469", "0.5558469", "0.55163294", "0.54628456", "0.5433667", "0.5420117", "0.5404488", "0.53820986", "0.5378424", "0.5290403", "0.5275557", "0.5267125", "0.52605677", "0.52484757", "0.52394646", "0.5229013", "0.51940036", "0.5192878", "0.5177272", "0.51736736", "0.5164674", "0.51338315", "0.5133522", "0.5118882", "0.50940853", "0.50918585", "0.50895303", "0.5055626", "0.5038942", "0.5031133", "0.502215", "0.5014773", "0.50092834", "0.5006521", "0.5000076", "0.49969473", "0.49967498", "0.49855095", "0.49483895", "0.4942728", "0.49349147", "0.49293968", "0.49112782", "0.49054125", "0.49036235", "0.4886478", "0.4886158", "0.48818865", "0.48718384", "0.48677203", "0.4867633", "0.48632506", "0.4861456", "0.48489892", "0.48481986", "0.48459384", "0.48449007", "0.48442042", "0.48362866", "0.48270065", "0.48143002", "0.48107916", "0.48085222", "0.4808014", "0.48077008", "0.48059162", "0.4797946", "0.47965854", "0.47957826", "0.47865888", "0.47748488", "0.47702813", "0.47685772", "0.4758486", "0.47570157", "0.47521746", "0.47476918", "0.4746742", "0.47393894", "0.47269392", "0.4718055", "0.47175944" ]
0.63830954
1
Id or Primary Key
public Long getCodigo() { return codigo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Key getPrimaryKey();", "PrimaryKey getPrimaryKey();", "public PrimaryKey getPrimaryKey();", "PrimaryKey createPrimaryKey();", "@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}", "PrimaryKey getPrimarykey();", "boolean isPrimaryKey();", "boolean getPrimaryKey();", "Integer getId();", "Integer getId();", "Integer getId();", "@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn id;\n\t}", "Long getId();", "Long getId();", "Long getId();", "@Public\n @Stable\n public abstract int getId();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn model.getPrimaryKey();\n\t}", "@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}", "public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "public int getId();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _state.getPrimaryKey();\n\t}", "public abstract Long getId();", "Object getPrimaryKey() throws IllegalStateException;", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }", "@NonNegative int javaId();", "Object getPrimaryKey(Object metadataID);", "Short getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _phieugiahan.getPrimaryKey();\n\t}", "public abstract String getPrimaryKey(String tableName);", "public abstract int getId();" ]
[ "0.7700655", "0.76706386", "0.7525455", "0.7435689", "0.73732257", "0.73181003", "0.714519", "0.7100053", "0.7098249", "0.7098249", "0.7098249", "0.70421845", "0.70320594", "0.70057327", "0.70057327", "0.70057327", "0.69826597", "0.69713634", "0.69713634", "0.69713634", "0.69601846", "0.69601846", "0.6957017", "0.69147635", "0.69147635", "0.69147635", "0.69147635", "0.69147635", "0.69147635", "0.69147635", "0.6900456", "0.6897908", "0.6882478", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.6869364", "0.685326", "0.68498284", "0.684741", "0.682007", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.68080616", "0.6796271", "0.679302", "0.6787736" ]
0.0
-1
UpdateableDataContext dataContext = new SalesforceDataContext("foo", "bar", "baz");
public UpdateableDataContext connect(String uname,String pward,String secTocken) { UpdateableDataContext dataContext = new SalesforceDataContext(uname,pward,secTocken); /*Table accountTable = dataContext.getDefaultSchema().getTableByName("Account"); DataSet dataSet = dataContext.query().from(accountTable).select("Id", "Name").where("BillingCity").eq("New York").execute(); while (dataSet.next()) { Row row = dataSet.getRow(); Object id = row.getValue(0); Object name = row.getValue(1); System.out.println("Account '" + name + "' from New York has id: " + row.getValue(0)); } dataSet.close();*/ return dataContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataContextVariable createDataContextVariable();", "DataContext copy();", "@Override\n\tpublic void updateContext(Context context) {\n\t}", "private void updateDB() {\n }", "public int update(StoreFeedBack storeFeedBack);", "@Override\r\n public void updateEntity(String entityName, DataStoreEntity dataStoreEntity) {\n\r\n }", "public interface DocStoreUpdateContext extends DocUpdateContext {\n\n}", "public void update(Customer myCust){\n }", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "public abstract void updateDatabase();", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "public static <T> T update(T object)\n {\n return SqlClosure.sqlExecute(connection -> update(connection, object));\n }", "@Override\n public void updateDatabase() {\n }", "@Test\n public void updateTest10() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "@Test\n\tpublic void testLiveDatabaseUpdate_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.liveDatabaseUpdate(aArguments, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public void doUpdate(T objectToUpdate) throws SQLException;", "static void setActiveContext(ApplicationContext context) {\n SchemaCompilerApplicationContext.context = context;\n }", "void update ( priorizedListObject v ) throws DAOException;", "int updateByPrimaryKey(CptDataStore record);", "@Test\n public void updateAccount(){\n ApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfiguration.class);\n\n AccountService as = ac.getBean(\"accountService\", AccountService.class);\n Account account = as.findAccountById(2);\n account.setMoney(123456f);\n as.updateAccount(account);\n\n }", "Account.Update update();", "public void update(T object) throws SQLException;", "public void executeUpdate();", "public void onUpdate(Statement update, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "@Test\n @Ignore\n public void testUpdate() {\n System.out.println(\"update\");\n Index entity = null;\n IndexDaoImpl instance = null;\n Index expResult = null;\n Index result = instance.update(entity);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "public MyServiceDataSingleton(Context context) {\r\n myContext = context;\r\n }", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "public PojoDataContext() {\n this(new ArrayList<TableDataProvider<?>>());\n }", "int updateByPrimaryKey(Factory record);", "int updateByPrimaryKey(FctWorkguide record);", "int updateByPrimaryKey(TCpySpouse record);", "@Test\n public void update() {\n }", "public interface SalesRepresentativeService {\n void addEmployee(Context context, SalesRepresentative employee);\n void updateEmployee(Context context, SalesRepresentative employee);\n}", "@Test\r\n public void testUpdate() {\r\n }", "@Override\r\n\tpublic void update(Object obj) throws DAOException {\n\r\n\t}", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testLiveDatabaseUpdate_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.liveDatabaseUpdate(aArguments, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void updateTest2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBar(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBar() ,\"Should return true if update Servizio\");\n }", "Product updateProductInStore(Product product);", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "public int update(DcSquadDO dcSquad) throws DataAccessException;", "int update(Purchase purchase) throws SQLException, DAOException;", "@Test\n public void testUpdate() {\n\n }", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "public void updateEntity();", "public static void settrue(Context context, String name){\n DatabaseWrapper databaseWrapper = new DatabaseWrapper(context);\n SQLiteDatabase database = databaseWrapper.getWritableDatabase();\n String selection = \"name\" + \" = ?\";\n String[] selectionArgs = { name };\n ContentValues values = new ContentValues();\n values.put(\"refreshable\", 1);\n database.update(RefreshORM.TABLE_NAME, values, selection, selectionArgs);\n\n }", "public interface DataStoreContract {\n\n /**\n * Query the given table, returning a {@link Cursor} over the result set.\n *\n * @param table The table name to compile the query against.\n * @param columns A list of which columns to return. Passing null will\n * return all columns, which is discouraged to prevent reading\n * data from storage that isn't going to be used.\n * @param selection A filter declaring which rows to return, formatted as an\n * SQL WHERE clause (excluding the WHERE itself). Passing null\n * will return all rows for the given table.\n * @param selectionArgs You may include ?s in selection, which will be\n * replaced by the values from selectionArgs, in order that they\n * appear in the selection. The values will be bound as Strings.\n * @param groupBy A filter declaring how to group rows, formatted as an SQL\n * GROUP BY clause (excluding the GROUP BY itself). Passing null\n * will cause the rows to not be grouped.\n * @param having A filter declare which row groups to include in the cursor,\n * if row grouping is being used, formatted as an SQL HAVING\n * clause (excluding the HAVING itself). Passing null will cause\n * all row groups to be included, and is required when row\n * grouping is not being used.\n * @param orderBy How to order the rows, formatted as an SQL ORDER BY clause\n * (excluding the ORDER BY itself). Passing null will use the\n * default sort order, which may be unordered.\n * @return A {@link Cursor} object, which is positioned before the first entry. Note that\n * {@link Cursor}s are not synchronized, see the documentation for more details.\n * @see Cursor\n */\n Cursor query(String table, String[] columns, String selection, String[] selectionArgs, String groupBy, String having, String orderBy);\n\n /**\n * Convenience method for updating rows in the database.\n *\n * @param table the table to update in\n * @param values a map from column names to new column values. null is a\n * valid value that will be translated to NULL.\n * @param whereClause the optional WHERE clause to apply when updating.\n * Passing null will update all rows.\n * @param whereArgs You may include ?s in the where clause, which\n * will be replaced by the values from whereArgs. The values\n * will be bound as Strings.\n * @return the number of rows affected\n */\n int update(String table, ContentValues values, String whereClause, String[] whereArgs);\n\n /**\n * General method for inserting a row into the database.\n *\n * @param table the table to insert the row into\n * @param nullColumnHack optional; may be <code>null</code>.\n * SQL doesn't allow inserting a completely empty row without\n * naming at least one column name. If your provided <code>initialValues</code> is\n * empty, no column names are known and an empty row can't be inserted.\n * If not set to null, the <code>nullColumnHack</code> parameter\n * provides the name of nullable column name to explicitly insert a NULL into\n * in the case where your <code>initialValues</code> is empty.\n * @param initialValues this map contains the initial column values for the\n * row. The keys should be the column names and the values the\n * column values\n * @param conflictAlgorithm for insert conflict resolver\n * @return the row ID of the newly inserted row\n * OR the primary key of the existing row if the input param 'conflictAlgorithm' =\n * SQLiteDatabase.CONFLICT_REPLACE\n * OR -1 if any error\n */\n long insertWithOnConflict(String table, String nullColumnHack, ContentValues initialValues, int conflictAlgorithm);\n\n /**\n * Starts a TransactionResponse, it shall be used when multiple operations needs to be performed\n */\n void startTransaction();\n\n /**\n * Ends a TransactionResponse, it shall be used when multiple operations needs to be performed\n */\n void endTransaction();\n\n /**\n * Sets a transaction as successful, if its not set before ending the transaction, transaction would be reverted\n */\n void setTransactionSuccessful();\n\n /**\n * Convenience method for deleting rows in the database.\n *\n * @param tableName the table to delete from\n * @param selectionCriteria the optional WHERE clause to apply when deleting.\n * Passing null will delete all rows.\n * @param selectionArgs You may include ?s in the where clause, which\n * will be replaced by the values from whereArgs. The values\n * will be bound as Strings.\n * @return the number of rows affected if a whereClause is passed in, 0\n * otherwise. To remove all rows and get a count pass \"1\" as the\n * whereClause.\n */\n int delete(String tableName, String selectionCriteria, String[] selectionArgs);\n}", "public abstract void update(DataAction data, DataRequest source) throws ConnectorOperationException;", "int refresh(T data) throws SQLException, DaoException;", "int updateByPrimaryKey(TbFreightTemplate record);", "@Test\n public void testUpdate() {\n System.out.println(\"update\");\n Address obj = null;\n AddressDAO instance = null;\n boolean expResult = false;\n boolean result = instance.update(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testLiveDatabaseUpdate_3()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\t\tOperationOptions aOptions = new OperationOptions();\n\n\t\tOperationResult result = fixture.liveDatabaseUpdate(aArguments, aOptions);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "@Test\n public void updateCoffee() {\n Roaster roaster = new Roaster();\n roaster.setName(\"Roaster 1\");\n roaster.setStreet(\"123 Test Lane\");\n roaster.setCity(\"Crossvile\");\n roaster.setState(\"TN\");\n roaster.setPostal_code(\"38555\");\n roaster.setPhone(\"9312005591\");\n roaster.setEmail(\"[email protected]\");\n roaster.setNote(\"Test Note for Roaster 1\");\n roaster = roasterDao.addRoaster(roaster);\n\n // Create and add coffee to the database\n Coffee coffee = new Coffee();\n coffee.setRoaster_id(roaster.getRoaster_id());\n coffee.setName(\"Starbucks House Blend\");\n coffee.setCount(10);\n coffee.setUnit_price(new BigDecimal(\"12.50\"));\n coffee.setDescription(\"Medium Brew Coffee\");\n coffee.setType(\"Regular\");\n coffeeDao.addCoffee(coffee);\n\n // Update the values of coffee\n coffee.setName(\"Updated Name\");\n coffee.setCount(12);\n coffee.setUnit_price(new BigDecimal(\"13.00\"));\n coffee.setDescription(\"Light Roast\");\n coffee.setType(\"Foreign\");\n coffeeDao.updateCoffee(coffee);\n\n // Create a copy of the new coffee\n Coffee coffeeCopy = coffeeDao.getCoffee(coffee.getCoffee_id());\n\n // Test that coffee and coffeeCopy are equal\n assertEquals(coffee, coffeeCopy);\n }", "public Future<CtxModelObject> update(CtxModelObject identifier);", "int updateByPrimaryKey(SysTeam record);", "@Test\n public void updateContact() {\n }", "@Test\n public void updateTest() throws SQLException, IDAO.DALException {\n userDAO.create(user);\n user.setNavn(\"SørenBob\");\n user.setCpr(\"071199-4397\");\n user.setAktiv(false);\n user.setIni(\"SBO\");\n // Opdatere objektet i databasen, og sammenligner.\n userDAO.update(user);\n recivedUser = userDAO.get(-1);\n\n assertEquals(recivedUser.getId(), user.getId());\n assertEquals(recivedUser.getNavn(), user.getNavn());\n assertEquals(recivedUser.getIni(), user.getIni());\n assertEquals(recivedUser.getCpr(), user.getCpr());\n assertEquals(recivedUser.isAktiv(),user.isAktiv());\n }", "@Test\npublic void testUpdateAStudentInformation() {\n//TODO: Test goes here...\n System.out.println(StudentDao.updateAStudentInformation(1006, \"6\", 99, 99, 99));\n}", "public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }", "Test update(TestData testData, Test test);", "public void setUpdateStatement(EdaContext xContext) \n\tthrows IcofException {\n\n\t\t// Define the query.\n\t\tString query = \"update \" + TABLE_NAME + \n\t\t \" set \" + RELATIONSHIP_COL + \" = ? \" + \n\t\t \" where \" + ID_COL + \" = ? \";\n\n\t\t// Set and prepare the query and statement.\n\t\tsetQuery(xContext, query);\n\n\t}", "@VisibleForTesting\n public static DataContext createDataContext(CalciteConnection connection) {\n return ((CalciteConnectionImpl) connection)\n .createDataContext(ImmutableMap.of(),\n CalciteSchema.from(connection.getRootSchema()));\n }", "@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }", "private DatabaseContext() {\r\n datastore = createDatastore();\r\n init();\r\n }", "@Override\r\n\tpublic void update(SimpleJdbcTemplate template) throws Exception {\n\t}", "public interface ContextSQLiteAware {\r\n SQLiteDatabase getContextDB();\r\n}", "@Test\n\tpublic void update01() throws SQLException {\n\t\tjdbcLink.update(Product.class)\n\t\t\t.set()\n\t\t\t\t.param(Product.NAME, \"xxxxx\").param(Product.NAME, \"xxxxx\")\n\t\t\t.where()\n\t\t\t\t.and().eq(Product.UID, 77L)\n\t\t\t.execute();\n\t\t\n\t\t\t\t\n\t}", "void update(Student entity);", "int updateByPrimaryKey(MedicalOrdersExecutePlan record);", "void executeUpdate();", "public void testUpdate() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tservice.setEmployee(\"newEmployee\");\r\n\t\tmodelDS.update(service);\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT * FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tService expected = null;\r\n\t\twhile (rs.next()) {\r\n\t\t\texpected = new Service();\r\n\t\t\texpected.setId(rs.getInt(\"id\"));\r\n\t\t\texpected.setEmployee(rs.getString(\"employee\"));\r\n\t\t\texpected.setQuantity(rs.getInt(\"quantity\"));\r\n\t\t\texpected.setVariation(rs.getString(\"variation\"));\r\n\t\t\texpected.setNote(rs.getString(\"note\"));\r\n\t\t\texpected.setReceiptDate(rs.getDate(\"receipt_date\"));\r\n\t\t\texpected.setReturnDate(rs.getDate(\"return_date\"));\r\n\t\t\texpected.setArticleId(rs.getInt(\"article_id\"));\r\n\t\t\texpected.setCustomerId(rs.getInt(\"customer_id\"));\r\n\t\t}\r\n\r\n\t\t// compare database result with the method tested\r\n\t\tassertNotNull(expected);\r\n\t\tassertNotNull(service);\r\n\t\tassertEquals(expected, service);\r\n\r\n\t\tmodelDS.remove(expected.getId()); // return to the initial state of the\r\n\t\t\t\t\t\t\t\t\t\t\t// database before test\r\n\t}", "@Test\n public void update2()\n {\n int zzz = getJdbcTemplate().update(\"UPDATE account SET NAME =?,money=money-? WHERE id =?\", \"ros\", \"100\", 2);\n System.out.println(zzz);\n }", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "public void setQueryContext(QueryContext context) {\n \t\tthis.queryContext = context;\n \t\tif (getStructuredViewer() == null)\n \t\t\treturn;\n \n \t\tObject input = getStructuredViewer().getInput();\n \t\tif (input instanceof QueriedElement) {\n \t\t\t((QueriedElement) input).setQueryContext(context);\n \t\t\tgetStructuredViewer().refresh();\n \t\t}\n \t}", "@Test\n public void updateCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Update the Customer in the database\n customer.setFirstName(\"Michael\");\n customer.setLastName(\"Stuckey\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"NuclearFuelServices\");\n customer.setPhone(\"222-222-2222\");\n service.updateCustomer(customer);\n\n // Test the updateCustomer() method\n verify(customerDao, times(1)).updateCustomer(customerArgumentCaptor.getValue());\n assertEquals(customer, customerArgumentCaptor.getValue());\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Title t = new Title();\r\n t.setIsbn(\"test\");\r\n t.setTitle(\"aaaaaaaaaaaaaaaaaa\");\r\n t.setAuthor(\"kkkkkkkkkkkkkk\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.update(t);\r\n assertEquals(expResult, result);\r\n }", "public int update(SsoAuthDO ssoAuth) throws DataAccessException;", "void update(Seller obj);", "void update(Seller obj);", "int updateByPrimaryKey(SupplyNeed record);", "public interface PersonService {\n void addPerson(Context context, Person person);\n void updatePerson(Context context, Person person);\n}", "int updateByPrimaryKey(TestEntity record);", "Update createUpdate();", "default void update(T context) {\n add(context);\n }", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "public static void queriedCheckForUpdate(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Check For Update\")\n .setAction(\"queryCheckForUpdate\")\n .setLabel(\"queryCheckForUpdate\").build());\n }", "int updateByPrimaryKey(TestActivityEntity record);", "public interface DbUpdater {\n void finished();\n void setMax(int max);\n void error(String message);\n void updateTo(int current);\n}", "public void setUserContext(UserContext userContext);", "int updateByPrimaryKey(PracticeClass record);", "public void updateData() {}", "int updateByPrimaryKey(Employee record);", "int updateByPrimaryKey(FinancialManagement record);", "Account refresh(Context context);", "@Test\n public void updateUser() {\n userDAO.createUser(new User(\"dummy\", \"dummy\", 1));\n\n assertTrue(userResource.updateUser(new User(\"dummy\", \"dummyUPDATED\", 2)));\n\n //clean up\n userDAO.removeUser(\"dummy\");\n }", "void updateData();", "@Test\r\n public void testUpdate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(15);\r\n record.setTime(20L);\r\n recordDao.update(record);\r\n\r\n ActivityRecord recordFound = recordDao.findActivityRecord(record.getId());\r\n assertEquals(recordFound.getDistance(), new Integer(15));\r\n assertEquals(recordFound.getTime(), new Long(20));\r\n }", "public void Update(StokContract entity) {\n\t\t\n\t}" ]
[ "0.5877179", "0.5627164", "0.5582676", "0.5459141", "0.5419703", "0.53582025", "0.5350152", "0.53138447", "0.52473533", "0.5223909", "0.5221889", "0.52184576", "0.52113396", "0.5159721", "0.51514214", "0.514626", "0.51410973", "0.51351255", "0.51107436", "0.50860924", "0.5080426", "0.5078141", "0.5070726", "0.5053707", "0.5043884", "0.5036132", "0.503408", "0.50315285", "0.50308985", "0.50284386", "0.50210303", "0.5018296", "0.5006189", "0.5001765", "0.4997529", "0.49971184", "0.499173", "0.4989345", "0.49764946", "0.49751267", "0.4970955", "0.4966285", "0.49623418", "0.4953782", "0.49424204", "0.4928012", "0.49230886", "0.49196672", "0.49189565", "0.49188462", "0.49165988", "0.49155772", "0.49154425", "0.49110815", "0.49094906", "0.49039954", "0.4895577", "0.4892717", "0.4889651", "0.48871535", "0.48822856", "0.48778173", "0.48710236", "0.48701638", "0.48623517", "0.48593223", "0.4847575", "0.48475415", "0.4845937", "0.48414215", "0.48362663", "0.48342857", "0.48333454", "0.48223746", "0.48218915", "0.4821334", "0.48192853", "0.48188844", "0.48134333", "0.48134333", "0.4812784", "0.48110396", "0.48078275", "0.48077738", "0.48074433", "0.4804648", "0.4804648", "0.47998303", "0.47950333", "0.4794856", "0.47926533", "0.47878614", "0.47847977", "0.47813696", "0.47789806", "0.4776717", "0.47763586", "0.4771655", "0.47707126", "0.47704658" ]
0.63150895
0
Writes a list of rateables to the given file.
public void saveRateablesToFile(List<Rateable> allRateables, File file) throws IOException { try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file))) { oos.writeObject(allRateables); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void write(TraceList traceList,File file) throws IOException;", "void writeRecordsToFile(List<IRecord> recordList) throws IOException;", "public static void write2File(String fileName) throws IOException{\n BufferedWriter output = null;\n try {\n File file = new File(fileName);\n output = new BufferedWriter(new FileWriter(file));\n for(BufferIOIntercept ob : bufferIOList){\n \n output.write(ob.op + \",\" + ob.strategy + \",\" + ob.numberBte + \",\" + ob.blkSize + \",\" + ob.time + \"\\n\");\n }\n } catch ( IOException e ) {\n e.printStackTrace();\n } finally {\n if ( output != null ) output.close();\n }\n }", "private void saveFile(File file){\n\t\ttry{\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\r\n\t\t\t\r\n\t\t\tfor(QuizCard card:cardList){\r\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\r\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\r\n\t\t\t}\r\n\t\t\twriter.close();\r\n\t\t} catch (IOException ex){\r\n\t\t\tSystem.out.println(\"couldn't write the cardList out\");\r\n\t\t\tex.printStackTrace();}\r\n\t}", "public void writeFile() \r\n\t{\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tfor(String str : scorers)\r\n\t\t\tbuilder.append(str).append(\",\");\r\n\t\tbuilder.deleteCharAt(builder.length() - 1);\r\n\t\t\r\n\t\ttry(DataOutputStream output = new DataOutputStream(new FileOutputStream(HIGHSCORERS_FILE)))\r\n\t\t{\r\n\t\t\toutput.writeChars(builder.toString());\r\n\t\t} \r\n\t\tcatch (FileNotFoundException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] File \" + HIGHSCORERS_FILE + \" was not found \" \r\n\t\t\t\t\t+ \"while writing.\");\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.err.println(\"[ERROR]:[FileManager] Error while reading the file \" + HIGHSCORERS_FILE);\r\n\t\t}\r\n\t}", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void write(String fileName, List data) throws IOException {\n PrintWriter out = new PrintWriter(new FileWriter(fileName));\n\n try {\n\t\tfor (int i =0; i < data.size() ; i++) {\n \t\tout.println((String)data.get(i));\n\t\t}\n }\n finally {\n out.close();\n }\n }", "public static void writeToFile(String fileName, ArrayList<String> linesList) throws IOException\n {\n PrintWriter printWriter = new PrintWriter(new FileWriter(fileName));\n for(String currentLine : linesList)\n {\n printWriter.println(currentLine);\n }\n printWriter.close();\n }", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "private void writeToFile(List<Record> records) {\n try (\n FileWriter writer = new FileWriter(FILE_PATH);\n BufferedWriter bufferedWriter =\n new BufferedWriter(writer);\n PrintWriter out = new PrintWriter(bufferedWriter)\n\n ) {\n\n for (Record record : records) {\n out.format(\"%d;%s;%s;%s;%s;%s\\n\",\n record.getId(),\n record.getFirstName(),\n record.getLastName(),\n record.getPhone().getNumber(),\n record.getPhone().getType(),\n record.getCategory().getId());\n }\n// writer.close();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n\n }", "public void savePerRankListPerformanceFile(List<String> ids, List<Double> scores, String prpFile) {\n/* 1455 */ try (BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(prpFile)))) {\n/* 1456 */ for (int i = 0; i < ids.size(); i++)\n/* */ {\n/* */ \n/* 1459 */ out.write(this.testScorer.name() + \" \" + (String)ids.get(i) + \" \" + scores.get(i));\n/* 1460 */ out.newLine();\n/* */ }\n/* */ \n/* 1463 */ } catch (Exception ex) {\n/* */ \n/* 1465 */ throw RankLibError.create(\"Error in Evaluator::savePerRankListPerformanceFile(): \", ex);\n/* */ } \n/* */ }", "public static void writeFile(ArrayList<Integer> data, String path) {\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(path);\n\t\t\tOutputStreamWriter osw = new OutputStreamWriter(fos);\n\t\t\tBufferedWriter bw = new BufferedWriter(osw);\n\n//\t\t\tfor (String dt : data) {\n//\t\t\t\tbw.write(dt);\n//\t\t\t\tbw.newLine();\n//\t\t\t}\n\n\t\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t\tbw.write(data.get(i).toString());\n\t\t\t\tif (i < data.size() - 1)\n\t\t\t\t\tbw.write(\", \");\n\n\t\t\t\t// bw.newLine();\n\t\t\t}\n\t\t\tbw.newLine();\n\t\t\tbw.close();\n\t\t\tosw.close();\n\t\t\tfos.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public void writeFile()\n\t{\n\t\t//Printwriter object\n\t\tPrintWriter writer = FileUtils.openToWrite(\"TobaccoUse.txt\");\n\t\twriter.print(\"Year, State, Abbreviation, Percentage of Tobacco Use\\n\");\n\t\tfor(int i = 0; i < tobacco.size(); i++)\n\t\t{\n\t\t\tStateTobacco state = tobacco.get(i);\n\t\t\tString name = state.getState();\n\t\t\tString abbr = state.getAbbreviation();\n\t\t\tdouble percent = state.getPercentUse();\n\t\t\tint year = state.getYear();\n\t\t\twriter.print(\"\"+ year + \", \" + name + \", \" + abbr + \", \" + percent + \"\\n\");\n\t\t} \n\t\twriter.close(); //closes printwriter object\n\t}", "private void writeFile(List<ClubPointsDTO> clubs) {\n\t\tFileWriter file = null;\n\t\ttry {\n\n\t\t\tfile = new FileWriter(\"clubs.txt\");\n\n\t\t\t// Escribimos linea a linea en el fichero\n\t\t\tfile.write(\"CLUB\\tPUNTOS\\r\\n\");\n\t\t\tfor(ClubPointsDTO c : clubs)\n\t\t\t\tfile.write(c.getName()+\"\\t\"+c.getPoints()+\"\\r\\n\");\n\n\t\t\tfile.close();\n\n\t\t} catch (Exception ex) {\n\t\t\tthrow new FileException();\n\t\t}\n\t}", "public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }", "private void writeToFile() {\n boolean flag = true;\n int expectedPacket = (lastPacket)? sequenceNo: Constants.WINDOW_SIZE;\n for (int i = 0; i < expectedPacket; i++) {\n if(!receivedPacketList.containsKey(i)) {\n flag = false;\n }\n }\n if (flag) {\n System.out.println(\"Time: \" + System.currentTimeMillis() + \"\\t\" + \"Write to file Possible\");\n try (BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(fileSavePath, true))) {\n for (int i = 0; i < receivedPacketList.size(); i++) {\n //System.out.println(new String(receivedPacketList.get(i)));\n stream.write(receivedPacketList.get(i));\n }\n receivedPacketList.clear();\n stream.close();\n } catch (FileNotFoundException ex) {\n \n } catch (IOException ex) {\n \n }\n receivedPacketList.clear();\n expectedList.clear();\n }\n }", "public void writer(List<String> toStore) throws IOException{\n //creates writer and clears file\n PrintWriter writer = new PrintWriter(\"output.txt\", \"UTF-8\");\n //for each loop to store all the values in the file into the file named output.txt\n for(String s : toStore)\n //stores the strings for outputting\n writer.println(s);\n //closes the writer and outputs to the file\n writer.close();\n }", "public boolean writePatterns(String filename, ArrayList<IPattern> patterns);", "public void writeFile(List<Stock>listStock) throws IOException\n {\n \t //StockImplement implement=new StockImplement();\n \t \n \t mapper.defaultPrettyPrintingWriter().writeValue(file, listStock);\n \t// mapper.writeValue(file, listStock);\n\t\t\n \t \n }", "public void writeFile(){\n try{\n FileWriter writer = new FileWriter(\"Highscores.txt\");\n for (int i = 0; i<10; i++){\n if (i >= this.highscores.size()){\n break;\n }\n writer.write(String.valueOf(this.highscores.get(i)) + \"\\n\");\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeFile(String file, SLList list) {\n\t\tObjectOutputStream o = null;\n\t\ttry {\n\t\t\to = new ObjectOutputStream(new FileOutputStream(file));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t/**\n\t\t * try/catch block to verify file has been written/created\n\t\t */\n\t\t\n\t\ttry {\n\t\t\to.writeObject(list);\n\t\t\tSystem.out.println(\"File Successfully Created!\");\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\to.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveFile(File file) {\n\t\ttry {\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(file));\n\t\t\t\n\t\t\tfor (QuizCard card : cardList) {\n\t\t\t\twriter.write(card.getQuestion() + \"/\");\n\t\t\t\twriter.write(card.getAnswer() + \"\\n\");\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeList() {\n try{\n PrintWriter out = new PrintWriter(new FileWriter(\"OutFile.txt\"));\n\n for (int i = 0; i < SIZE; i++) {\n // The get(int) method throws IndexOutOfBoundsException, which must be caught.\n out.println(\"Value at: \" + i + \" = \" + list.get(i));\n }\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void writeData(ArrayList<Task> orderList) {\n try {\n FileWriter fw = new FileWriter(filePath, false);\n for (Task task : orderList) {\n fw.write(task.fileFormattedString() + \"\\n\");\n }\n fw.close();\n\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n }", "public void writeScores() throws IOException {\n if (this.list.isPresent() && this.toSave) {\n try (DataOutputStream out = new DataOutputStream(new FileOutputStream(this.file))) {\n for (final Pair<String, Integer> p : this.list.get()) {\n out.writeUTF(p.getX());\n out.writeInt(p.getY().intValue());\n }\n this.toSave = false;\n } catch (IOException e) {\n System.out.println(\"IOException on writing scores\");\n }\n }\n\n }", "public void toFile(String filename) {\n\t\tsortPool();\n\t\ttry (BufferedWriter bw = new BufferedWriter(new FileWriter(filename))) {\n\t\t\tfor(int i = 0; i < genepool.size(); i++) {\n\t\t\t\tbw.write(genepool.get(i).toWrite());\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void writeTo(TraceList traceList,File file) throws IOException{\n\t\tString fileName=file.getName();\n\t\tString formatName=fileName.contains(\".\")?fileName.substring(fileName.indexOf('.')+1):\"png\";\n\t\tfor(TraceListFormat next:ServiceLoader.load(TraceListFormat.class)){\n\t\t\tif(formatName.endsWith(next.getSuffix())){\n\t\t\t\tnext.write(traceList,file);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tImageIO.write(TraceListViewer.renderColorImage(traceList),formatName,file);\n\t}", "private static void writeFile(String filePath) {\n\t\tFileWriter file = null;\n\t\tPrintWriter printWriter = null;\n\t\t\n\t\ttry {\n\t\t\t// Create the printer.\n\t\t\tfile = new FileWriter(filePath);\n\t\t\tprintWriter = new PrintWriter(file);\n\t\t\t\n\t\t\t// Create the output.\n\t\t\tString output = Integer.toString(slideList.size());\n\t\t\t\n\t\t\tfor (Slide slide : slideList) {\n\t\t\t\toutput = output.concat(BREAK_LINE).concat(Integer.toString(slide.getId1()));\n\t\t\t\t\n\t\t\t\tif (slide.getId1() != slide.getId2()) {\n\t\t\t\t\toutput = output.concat(ONE_SPACE).concat(Integer.toString(slide.getId2()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Print the output in the file.\n\t\t\tprintWriter.print(output);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error while writing the output file: \" + e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tprintWriter.close();\n\t\t\t\tfile.close();\n\t\t\t\tSystem.out.println(\">> Output file has been written!\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error while closing the output file: \" + e);\n\t\t\t}\n\t\t}\n\t}", "public void writeToFile(String filename, List<String> list) {\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(filename); \n\t\t\tfor(String str: list) {\n\t\t\t writer.write(str.trim() + System.lineSeparator());\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}", "public void writeList(String filename, List <Double> Q) {\n\t\t\tObject[] objects = Q.toArray();\n\t\t\t\n\t \n\t\t\ttry {\n\t FileWriter writer = new FileWriter(filename, true);\n\t for (int i = 0; i < objects.length; i++) {\t \n\t writer.write( String.valueOf(objects[i]));\n\t \n\t //this is the code that you change, this will make a new line between each y value in the array\n\t writer.write(\"\\n\"); // write new line\n\t }\n\t writer.close();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\n\t}", "public void writeList()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPrintWriter writer = new PrintWriter(categoryName + \".txt\");\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < questions.size(); i++) // go through ArrayList\r\n\t\t\t{\r\n\t\t\t\twriter.println(questions.get(i).getQuestion() + \",\" + \r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer1() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer2() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer3() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getAnswer4() + \",\" +\r\n\t\t\t\t\t\t\t\t questions.get(i).getCorrectAnswer());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException fnf)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File was not found\");\r\n\t\t}\r\n\t}", "private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void saveOutput(String filename, DSALinkedList list)\n {\n try\n {\n PrintWriter out = new PrintWriter(filename);\n //out.println(input);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n PrintStream ps = new PrintStream(baos);\n PrintStream old = System.out;\n System.setOut(ps);\n //stuff goes here\n\n if(!list.isEmpty())\n {\n System.out.println(\"# All routes Traversed:\");\n Iterator<DSAQueue> itr = list.iterator();\n int counter = 0;\n while(itr.hasNext())\n {\n counter ++;\n System.out.println(\"\\n# Route number: [\" + counter + \"]\");\n itr.next().show();\n }\n }\n else\n {\n System.out.println(\"# Route list is empty. Add some more!\");\n }\n System.out.flush();\n System.setOut(old);\n out.println(baos.toString());\n\n out.close();\n }\n catch (Exception e)\n { //should do more here might not be needed\n throw new IllegalArgumentException(\"Unable to print object to file: \" + e);\n }\n\n }", "public void saveRegionList(String fileName) {\n try {\n BufferedWriter out = new BufferedWriter(new FileWriter(fileName));\n out.write(maxRegions+\"\\r\\n\");\n out.write(numRegions+\"\\r\\n\"); \n \n for (int i = 0; i < numRegions; i++) {\n out.write(regionList[i].toFile());\n }\n \n out.close();\n } catch (IOException iox) {\n System.out.println(\"Error saving to \" + fileName);\n }\n }", "public void writeToFile(File file) {\n\n\t}", "private void writeAll(){\n try (BufferedWriter ignored = new BufferedWriter(new FileWriter(this.fileName))) {\n Iterable<E> values=entities.values();\n values.forEach(this::writeToFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static void saveIntoFile() throws IOException {\n\n\t\tDateFormat format = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\");\n\t\tString fileName = \"./ipmi.\" + format.format(new Date()) + \".log\";\n\n\t\tBasicConsumptionList file = new BasicConsumptionList();\n\t\tlogger.debug(\"file:\" + fileName);\n\t\tfile.setWriter(new FileWriter(fileName));\n\n\t\tSystem.err.println(ipmi.execute(Command.IPMI_SENSOR_LIST));\n\n\t\twhile (true) {\n\t\t\tDouble watts = ipmi.getWatt();\n\t\t\tfile.addData(System.currentTimeMillis(), watts);\n\t\t\tfile.commit();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tlogger.trace(\"\", e);\n\t\t\t}\n\t\t}\n\t}", "private static void writer(String filename, char[] chars) {\n BinaryOut binaryOut = new BinaryOut(filename);\n\n for (char c : chars) {\n binaryOut.write(c);\n }\n\n binaryOut.close();\n }", "void writeItem(String outDir, List<T> items);", "public static void writeUsers(ArrayList<User> userList, \r\n String filename) throws IOException {\r\n File file = new File(filename);\r\n PrintWriter out = new PrintWriter(\r\n new FileWriter(file, false));\r\n for (User user: userList) {\r\n out.println(user); \r\n }\r\n out.close();\r\n }", "private void writeToFile(){\r\n File file = new File(\"leaderboard.txt\");\r\n\r\n try {\r\n FileWriter fr = new FileWriter(file, true);\r\n BufferedWriter br = new BufferedWriter(fr);\r\n for(Player player : this.sortedPlayers){\r\n br.write(player.toString());\r\n br.write(\"\\n\");\r\n }\r\n br.close();\r\n fr.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "protected abstract void writeFile();", "public static void writeTo(String filename, List<User> users){\r\n\t\tPrintWriter pw=null;\r\n\t\ttry{\r\n\t\t\tpw=new PrintWriter(new FileOutputStream(new File(filename),false));//false because don't append,\r\n\t\t\tfor(User user : users){//it replaces all with new updated data\r\n\t\t\t\tpw.write(user+\"\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t}catch(IOException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tpw.close();\r\n\t\t}\r\n\t}", "private void writeItems() {\n\n // open file\n File file = getFilesDir();\n File todoFile = new File(file, \"scores.txt\");\n\n // try to add items to file\n try {\n FileUtils.writeLines(todoFile, items);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void writeScoresToFile(File f) throws IOException, FileNotFoundException{\r\n\t\tBufferedWriter bw = null;\r\n\t\ttry{\r\n\t\t\tFileWriter fw = new FileWriter(f);\r\n\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\r\n\t\t\tfor (int count = 0; count < scores.length; count++){\r\n\t\t\t\tbw.write(scores[9-count].getInitials()+SEPARATOR+scores[9-count].getScore());\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t} catch (Exception ex){\r\n\t\t\tSystem.err.println(\"Trouble with file: \" +ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry{\r\n\t\t\t\tif (bw != null){\r\n\t\t\t\t\tbw.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception ex1) {\r\n\t\t\t\tex1.printStackTrace();\r\n\t\t\t\tSystem.exit(-1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "static void writeOperations(){\n \ttry{\n \t\t\n\t\t\t// Create file \n\t\t\tFileWriter fstream = new FileWriter(FILE_FILEOP);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t \tfor (int i=0; i < operations.size(); i++){\n\t \t\tout.write(operations.get(i).getDetails() );\n\t \t}\n\t\t\t\n\t\t\t//Close the output stream\n\t\t\tout.close();\n\t\t}\n \tcatch (Exception e){//Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t\tSystem.out.print(\"Operations file written.\\n\");\n\n \t\n }", "public void writeToFile(String filename, HashSet<String> URLS) {\n\t FileWriter writer;\n\t try {\n\t writer = new FileWriter(filename);\n\t URLS.forEach(a -> {\n\t try {\n\t writer.write(a + \"\\n\");\n\t } catch (IOException e) {\n\t System.err.println(e.getMessage());\n\t }\n\t });\n\t writer.close();\n\t } catch (IOException e) {\n\t System.err.println(e.getMessage());\n\t }\n\t }", "public static void writeJsonToFile(List<Object> objLst, File file) throws Exception {\n writeJsonToFile(objLst, file, false);\n }", "public void writeOutputToFile(ArrayList<Object> transformNums) throws IOException {\r\n FileWriter file = new FileWriter(writeFilename);\r\n\r\n for(int i=0; i<transformNums.size(); i++){\r\n file.write(transformNums.get(i)+\" \");\r\n }\r\n\r\n file.close();\r\n\r\n }", "private static void writeToBuffer(int index, RandomAccessFile fos) {\n\n try {\n\n // x is the current integer value to be written.\n int x;\n // loc is the current location in the buffer to be written.\n int loc = 0;\n\n // iterates through each value in the sorted integer array.\n for (int k = 0; k < index; k++) {\n // gets the current integer.\n x = ints[k];\n\n // checks if the buffer is full.\n if (loc == BUF_SIZE) {\n // if the buffer is full, write its contents out to the file.\n fos.write(buf);\n // the buffer has been emptied, so set its current location back to the start.\n loc = 0;\n }\n\n // convert the current integer value to be written to a byte array.\n buf[loc] = (byte) (x >> 24);\n buf[loc + 1] = (byte) (x >> 16);\n buf[loc + 2] = (byte) (x >> 8);\n buf[loc + 3] = (byte) (x);\n\n // increment the location in the buffer now that a value has been written in.\n loc += BYTES_TO_INTS;\n }\n\n if (loc > 0) {\n // if there are any values left over in the buffer, write them out to the file.\n fos.write(buf, 0, loc);\n\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "private void writeRowListToFile(List<String> rowList, String filePath) {\n try (BufferedWriter fileWriter = new BufferedWriter(new FileWriter(filePath))) {\n for (String row : rowList) {\n fileWriter.write(row);\n }\n } catch (IOException e) {\n LOGGER.error(e.getMessage());\n }\n }", "private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }", "public void writeToBookingListFile()\r\n {\r\n\ttry(ObjectOutputStream toBookingListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/bookinglist.dta\")))\r\n\t{\r\n toBookingListFile.writeObject(bookingList);\r\n bookingList.saveStaticBookingRunNr(toBookingListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Booking objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "private void flush() throws IOException {\n if (!rates.isEmpty()) {\n writeRates();\n rates.clear();\n firstBatch = false;\n }\n }", "@SuppressWarnings({ \"unchecked\", \"resource\" })\n\tprivate static void writeRatings(Object treasureMap, PrintWriter pw, File treasureFile, PrintWriter pwCategories) throws IOException {\n\t\tfor (Map.Entry<String, Object> treasure : ((Map<String, Object>) treasureMap).entrySet()) {\n\n\t\t\tString treasureName=treasure.getKey();\n\t\t\tObject userFeedbackMap= treasure.getValue(); // TREASURE\n\t\t\tfor(Entry<String, Object> userFeedback: ((LinkedHashMap<String, Object>) userFeedbackMap).entrySet())\n\t\t\t{\n\t\t\t\tString userName=userFeedback.getKey(); // USER\n\t\t\t\tObject userFeedbackObj=userFeedback.getValue();\n\t\t\t\tfor(Entry<String, Object> userFeedbackEntry: ((LinkedHashMap<String, Object>) userFeedbackObj).entrySet())\n\t\t\t\t{\n\t\t\t\t\tif(userFeedbackEntry.getKey().equals(\"rating\")) // RATING\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(treasureName + \" \" + userName);\n\t\t\t\t\t\tString rating=userFeedbackEntry.getValue().toString();\n\t\t\t\t\t\t/* write to the csv file the the user + the treasure name + the rating */\n\t\t\t\t\t\tlong userNameDecoded = new BigInteger(userName.getBytes()).longValue();\n\t\t\t\t\t\tlong treasureNameDecoded = new BigInteger(treasureName.getBytes()).longValue();\n\n\n\t\t\t\t\t\tfloat ratingFloat = (float)Integer.parseInt(rating);\n\n\t\t\t\t\t\tpw.write(userNameDecoded+\",\"+treasureNameDecoded+\",\"+ratingFloat+\"\\n\");\n\n\t\t\t\t\t\t/* write to category csv file user + category + rating */\n\t\t\t\t\t\tFileReader fileReader=new FileReader(treasureFile);\n\t\t\t\t\t\tBufferedReader br = null;\n\t\t\t\t\t\tString line = \"\";\n\t\t\t\t\t\tString cvsSplitBy = \",\";\n\t\t\t\t\t\tbr = new BufferedReader(fileReader);\n\t\t\t\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\t\t\t\t// use comma as separator\n\t\t\t\t\t\t\tString[] treasureStr = line.split(cvsSplitBy);\n\t\t\t\t\t\t\tif(treasureStr[0]!=null&&Long.parseLong(treasureStr[0])==treasureNameDecoded)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(treasureStr[2]!=null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(userCategoryMap.get(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue())==null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tuserCategoryMap.put(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue(), 1.0);\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tdouble val=userCategoryMap.get(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue());\n\t\t\t\t\t\t\t\t\t\tuserCategoryMap.put(userNameDecoded+\",\"+new BigInteger(treasureStr[3].getBytes()).longValue(), val+1.0);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(Entry<String,Double> entry: userCategoryMap.entrySet())\n\t\t{\n\t\t\tString usercategory=entry.getKey();\n\t\t\tString[] arr=usercategory.split(\",\");\n\t\t\tString userNameDecoded=arr[0];\n\t\t\tString categoryDecoded=arr[1];\n\t\t\tdouble numberOfVisits=entry.getValue();\n\t\t\tpwCategories.write(userNameDecoded+\",\"+categoryDecoded+\",\"+numberOfVisits+\"\\n\");\n\t\t}\n\t\tpwCategories.close();\n\t\tpw.close();\n\t}", "public void JSONWriter(List<State> stateList) {\n PrintWriter writer = null;\n\n try {\n ObjectMapper mapper = new ObjectMapper();\n String jsonStateList = mapper.writeValueAsString(stateList);\n writer = new PrintWriter(new FileWriter(\"stateList.json\"));\n writer.println(jsonStateList);\n } catch (IOException e) {\n System.err.println(\"IOException caught: \" + e.getMessage());\n } finally {\n if(writer != null) {\n writer.flush();\n writer.close();\n }\n }\n }", "public void task_1_write(List<MonitoredData> timeline) throws IOException {\n FileWorker.writeFile(1, timeline, 0, null, null, null);\n }", "public static void writeToFile(java.util.List<String> list, String path) {\n\n // set file writer\n BufferedWriter out;\n try {\n // selected path\n File file = new File(path);\n out = new BufferedWriter(new FileWriter(file, true));\n for (Object s : list) {\n out.write((String) s);\n out.newLine();\n\n }\n out.close();\n } catch (IOException e) {\n // check errors and set show message dialog\n StringWriter errors = new StringWriter();\n e.printStackTrace(new PrintWriter(errors));\n JOptionPane.showMessageDialog(new JFrame(), errors.toString(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private static void saveToFile(ArrayList<Favourite> allFav) {\n\t\t\n\t\tBufferedWriter writer=null;\n\t\t\n\t\ttry {\n\t\t\twriter=new BufferedWriter(new FileWriter(Constants.KEY_FAV_FILE));\n\t\t\tString save=\"\";\n\t\t\tfor(Favourite f:allFav) {\n\t\t\t\tsave+=fileFormat(f);\n\t\t\t}\n\t\t\twriter.write(save);\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}finally{\n\t\tif(writer!=null){\n\t\t\ttry{\n\t\t\t\twriter.close();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\n\t\n}\n\n\t\t\n\t}", "public void writeToJsonFile(List<Page> pageList, String path) throws IOException {\n\t\tGson g = new Gson();\n\t\tWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"UTF-8\"));\n\t\tfor (Iterator<Page> iterator = pageList.iterator(); iterator.hasNext();) {\n\t\t\tout.write(g.toJson(iterator.next()) + \"\\n\");\n\t\t}\n\t\tout.close();\n\t}", "private void writeArrayToFile(Warship[] wsArr, FileOutputStream fos) throws Exception {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(fos);\n\t\t\tfor (Warship ws : wsArr) {\n\t\t\t\tif (ws != null) {\n\t\t\t\t\tpw.println(ws);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t} finally {\n\t\t\tif (pw != null) {\n\t\t\t\tpw.close();\n\t\t\t}\n\t\t}\n\t}", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "static void writeFile(List<String> sortList, int fileIndex) throws IOException, InterruptedException {\n\t\tFileWriter filewrite = new FileWriter(new File(DividedfileList.get(fileIndex)));\n\t\tBufferedWriter bufw = new BufferedWriter(filewrite);\n\n\t\tint fileLoc = 0;\n\n\t\twhile (fileLoc != sortList.size()) {\n\t\t\tbufw.write(sortList.get(fileLoc) + \"\\r\\n\");\n\t\t\tfileLoc++;\n\t\t}\n\t\tbufw.close();\n\t}", "public void saveAllVehiclesToFile(ArrayList<DeliveryVehicle> vehicleList) throws java.io.IOException {\n\n // write object to file\n FileOutputStream fos = new FileOutputStream(_filePath); //object to hold a file, e.g. EmployeeData.txt\n PrintStream writer = new PrintStream(fos); //object to write data\n\n //For loop to read each employee and write them to the file\n for(DeliveryVehicle vehicle : vehicleList){\n writer.println(vehicle);\n }\n\n writer.close();//close the writer\n fos.close();//close the file\n\n }", "private void updateFile() {\n\t\tPrintWriter outfile;\n\t\ttry {\n\t\t\toutfile = new PrintWriter(new BufferedWriter(new FileWriter(\"stats.txt\")));\n\t\t\toutfile.println(\"15\"); // this is the number\n\t\t\tfor (Integer i : storeInfo) {\n\t\t\t\toutfile.println(i); // we overwrite the existing files\n\t\t\t}\n\t\t\tfor (String s : charBought) {\n\t\t\t\toutfile.println(s); // overwrite the character\n\t\t\t}\n\t\t\tfor (String s : miscBought) {\n\t\t\t\toutfile.println(s);\n\t\t\t}\n\t\t\toutfile.close();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t}", "public void writeToFile(String file) throws IOException {\r\n\t\tString body = \"\"; //everything is stored in a string which\r\n\t\t//is written to the file\r\n\t\tFile writeFile = new File(file);\r\n\t\tBufferedWriter audWriter = new BufferedWriter(new FileWriter(writeFile));\r\n\t\tTheaterSeat current = getFirst();\r\n\t\tbody += current.getTicketType();\r\n\t\tfor (int i=0; i<numRows - 1; i++) {\r\n\t\t\t\r\n\t\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\t\tcurrent = current.getRight();\r\n\t\t\t\tbody += current.getTicketType();\r\n\t\t\t}\r\n\t\t\tfor (int j=0; j<numCols - 1; j++) {\r\n\t\t\t\tcurrent = current.getLeft();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbody += \"\\n\";\r\n\t\t\tcurrent = current.getDown();\r\n\t\t\tbody += current.getTicketType();\r\n\t\t}\r\n\t\tfor (int j=1; j<numCols; j++) {\r\n\t\t\tcurrent = current.getRight();\r\n\t\t\tbody += current.getTicketType();\r\n\t\t}\r\n\t\taudWriter.write(body);\r\n\t\taudWriter.close();\r\n\t}", "@Override\n public void saveToFile(List<Product> elements) throws IOException {\n List<String> collect = elements.stream()\n .map(product -> product.toString()) //z wykorzystanie method referencje .map(String::toString)\n .collect(Collectors.toList());\n\n //korzystamy z new io (nio patrz import) a nie jak wczesniej z io (we wprowadzeniu) bo latwiejsze\n Files.write(Paths.get(path), collect);\n\n\n }", "public void writeScrobbles(List<Scrobble> scrobbles) {\n for (Scrobble scrobble : scrobbles) {\n writeScrobble(scrobble);\n }\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "void writeTotal(String outDir, String simpleFileName, List<T> items);", "public void saveToFile(String fileName, ArrayList<String> namesList, ArrayList<ArrayList<Double>> numList)\r\n {\r\n try\r\n {\r\n fileName = fileName + \"/\" + namesList.size() + \"Cities.txt\";\r\n FileWriter filePointer = new FileWriter(fileName, false); //false will replace what is there (append)\r\n PrintWriter output = new PrintWriter(filePointer);\r\n for(int i = 0; i < namesList.size(); i++)\r\n {\r\n String line = namesList.get(i) + \" \" \r\n + numList.get(i).get(0) + \" \" + numList.get(i).get(1) + \"\\n\";\r\n output.write(line);\r\n }\r\n output.close();\r\n }\r\n catch(IOException exp)\r\n {\r\n JOptionPane.showMessageDialog(null, \"Points not Saved\" \r\n + \"Save Error\" + JOptionPane.WARNING_MESSAGE);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\n public static void writeFile(String outputFile) {\n try (FileWriter file = new FileWriter(outputFile)) { // Creates file\n file.write(Constants.OPEN_SQUARE); // Begin array\n for(Map.Entry<Integer, String> entry : valid.entrySet()) { // Iterates names\n int id = entry.getKey();\n String name = entry.getValue();\n String cust = String.format(Constants.ENTRY, id, name);\n file.write(cust); // Writes formatted string to file\n }\n file.write(Constants.CLOSE_SQUARE); // Closes the array\n file.flush(); // Flushes buffer\n } catch (IOException e) { // Case of exception\n e.printStackTrace();\n }\n }", "public void writeToHotelRoomListFile()\r\n {\r\n\ttry(ObjectOutputStream toHotelRoomListFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/hotelroomlist.dta\")))\r\n\t{\r\n toHotelRoomListFile.writeObject(hotelRoomList);\r\n hotelRoomList.saveStaticPrice(toHotelRoomListFile);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Hotelrom objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }", "void write(File file) throws IOException {\n Files.createParentDirs(file);\n FileWriter fileWriter = new FileWriter(file);\n try {\n for (Map.Entry<String, Status> record : records.entrySet()) {\n fileWriter.write(String.format(\"%s,%s\", record.getValue(), record.getKey()));\n fileWriter.write(\"\\n\");\n }\n } finally {\n fileWriter.close();\n }\n }", "static void writeToFiles() throws IOException {\n\n writeToFilePriceHistory();\n writeToFileEmployees();\n writeToFileInventory();\n writeToSaleItems();\n writeToOrder();\n writeToFileInventory();\n writeToRevenueLog();\n }", "private static void writeToBooksFile() throws IOException{\n\t\tFileWriter fw = new FileWriter(BOOKS_FILE, false); //overwrites the students.txt file\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\n\t\tSet<Integer> keys = ALL_BOOKS.keySet(); //returns list of all keys in ALL_BOOKS\n\t\tfor(int key : keys){\n\t\t\tbw.write(ALL_BOOKS.get(key).ParseForTextFile()); //writes the Parsed Form of the BookDetails object to the books.txt file\n\t\t}\n\t\tbw.close();\n\t}", "private void writeConfigs(File file, LinkedList<TestRerunConfiguration> configs, int numReruns) {\n\t\ttry {\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n\t\t\t// Write the total number of configurations - subsequent reruns might remove configurations (if forking)\n\t\t\toos.writeInt(numReruns);\n\t\t\t// Write the configs\n\t\t\toos.writeObject(configs);\n\t\t\t// Write that no original violation have been verified yet\n\t\t\toos.writeObject(new HashSet<String>());\n\t\t\toos.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.err.println(\"Failed to write rerun configurations to: \" + file);\n\t\t}\n\t}", "public static void writePlayerToFile(ArrayList<Player> players)\r\n {\r\n clearFile(new File(\"players.txt\"));\r\n\r\n for(Player p : players)\r\n {\r\n writePlayerToFile(p);\r\n }//end for\r\n }", "public void writeToFile(ArrayList<quizImpl> ql) {\n Path path = Paths.get(\"Quizzes.txt\");\n try (Scanner scanner = new Scanner(path, String.valueOf(ENCODING))) {\n try (BufferedWriter writer = Files.newBufferedWriter(path, ENCODING)) {\n String toBeWritten;\n for (quizImpl q : ql) {\n String questionsString = \"\";\n //gets a list of questions for that quiz\n List<QuestionAndAnswer> questions = q.getQuestions();\n //for each question in the quiz get the answers\n for (QuestionAndAnswer question : questions) {\n List<String> answers = question.getAllAnswers();\n String answerString = \"\";\n for (String s : answers)\n answerString = answerString + s + \",\";\n answerString = answerString + question.getCorrectAnswer();\n questionsString = questionsString + \",\" + question.getQuestion() + \",\" + answerString;\n }\n if (q.getHighScore() == -1) toBeWritten = \"quizName,\" + q.getQuizName() + questionsString;\n else\n toBeWritten = \"quizName,\" + q.getQuizName() + questionsString + \",highScore,\" + q.playerWithHighScore() + \",\" + q.getHighScore();\n writer.write(toBeWritten);\n writer.newLine();\n }\n writer.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void doFileOut(HashMap<String, String> file_out_list, HashMap<String, String> file_charset_list) throws DPFTRuntimeException {\n\t\tfor(String filename: file_out_list.keySet()){\n\t\t\ttry{\n\t\t\t\tFile fdir = new File(getOutFileLocalDir());\n\t\t\t\tif(!fdir.exists()){\n\t\t\t\t\tfdir.mkdirs();\n\t\t\t\t}\n\t\t\t\tFile f = new File(getOutFileLocalDir() + File.separator + filename);\n\t\t\t\tString datastring = file_out_list.get(filename);\n\t\t\t\tString charset = file_charset_list.get(filename);\n\t\t\t\tFileUtils.writeStringToFile(f, datastring, charset);\n\t\t\t}catch(Exception e){\n\t\t\t\tObject[] params = {filename};\n\t\t\t\tthrow new DPFTDataFormatException(\"SYSTEM\", \"DPFT0015E\", params);\n\t\t\t}\n\t\t}\n\t}", "public void writeTokens() throws IOException {\r\n FileOutputStream fOutStream = new FileOutputStream(\"output.txt\");\r\n PrintStream outFS = new PrintStream(fOutStream);\r\n\r\n for (int i = 0; i < tokenList.size(); i++) {\r\n outFS.println(tokenList.get(i).evaluate());\r\n }\r\n fOutStream.close();\r\n outFS.close();\r\n }", "void writeToFile(){\n try{\n OutputStream o = new FileOutputStream(distanceFile);\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n o.write(distance[start][to][taxi][bus]);\n o.close();\n o = new FileOutputStream(validMoveFile);\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++)\n for(int b = 0; b < 4; b++)\n o.write((byte) (validMoves[node][taxi][bus][underground][doublet][secret] >> ((3 - b) * 8)));\n o.close();\n }\n catch (Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }", "public abstract void saveToFile(PrintWriter out);", "void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}", "private void writeFile(File file, String... lines) throws IOException {\n try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file))) {\n for (String line : lines) {\n bufferedWriter.write(line);\n bufferedWriter.newLine();\n }\n }\n }", "public void FileWrite(Nimsys nimSys,ArrayList<Player> list)throws IOException{\r\n\t\tOutputStream out = new FileOutputStream(\"players.dat\");\r\n\t\tIterator<Player> aa = list.iterator();\r\n\t\twhile(aa.hasNext()){ //each line includes the information below related to the players\r\n\t\t\tPlayer in = aa.next();\r\n\t\t\tout.write(in.getUserName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getSurName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(in.getGivenName().getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getGamePlay()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getWinGame()).getBytes());\r\n\t\t\tout.write(' ');\r\n\t\t\tout.write(String.valueOf(in.getID()).getBytes());\r\n\t\t\tout.write('\\r');\r\n\t\t}\r\n\t}", "public static void writeArray(String fileName, int[] array) throws Exception{\n\n // Create DataOutputStream to create a binary file.\n // Use fileName from Demo file and write from the array\n DataOutputStream output = new DataOutputStream(new FileOutputStream(fileName));\n\n // for each number in array\n for(int i : array) {\n //write the number to the binary file\n output.writeInt(i);\n }\n\n // close the output file\n output.close();\n }", "public static void writeControversialItemsToFile(HashMap<Integer,RatedItem> arr, FileWriter file) throws IOException {\n FileWriter coldUserFile = file;\n HashMap<Integer,RatedItem> ratedItems = arr;\n for(RatedItem ri: ratedItems.values())\n if(ri.getNeighbors().size() >=1){\n \n double sum = 0;\n int size = ri.getNeighbors().size();\n for(SimNode s: ri.getNeighbors().keySet())\n sum+= Double.valueOf(ri.getNeighbors().get(s));\n double mean = sum / size;\n sum =0;\n for(SimNode s: ri.getNeighbors().keySet())\n sum += Math.pow(Double.valueOf(ri.getNeighbors().get(s)) - mean ,2);\n double standardDev = Math.sqrt(sum/size);\n if(standardDev >=1.5)\n for(SimNode s: ri.getNeighbors().keySet())\n coldUserFile.append(\"\"+s.getId()+\" \"+ri.getId()+\" \"+ri.getNeighbors().get(s)+\"\\n\");\n }\n }", "private void saveGenres(){\n\t\tFile genreList = new File(Paths.get(\"genres.txt\").toString());\n\t\ttry{\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(genreList));\n\t\t\tfor (String s : genres){\n\t\t\t\twriter.write(s);\n\t\t\t\twriter.newLine();\n\t\t\t}\n\t\t\twriter.close();\n\t\t} catch(IOException ex){\n\t\t\t\n\t\t}\n\t}", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "static void writeFile(){\n try{\n Path contactsListPath = Paths.get(\"contacts\",\"contacts.txt\");\n Files.write(contactsListPath, contactList);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n //refreshes list of Contact objs\n fileToContactObjs();\n }", "public void writeToFile(TaskList tasks) {\n try {\n FileWriter fw = new FileWriter(filePath);\n for (Task t : tasks.getListOfTasks()) {\n fw.write(t.getRecordString() + \"\\n\");\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to data file.\");\n }\n }", "private static void writeToFile(HighScore[] scoresToSave) throws IOException {\n FileWriter writer = new FileWriter(SCORE_FILE_NAME);\n \n for (int i = 0; i < scoresToSave.length; i++) {\n //Don't write more than the maximum number of scores to save\n if (i > NUMBER_OF_SCORES_TO_SAVE)\n break;\n \n String str = scoresToSave[i].toString();\n writer.write(str);\n writer.write(System.getProperty(\"line.separator\"));\n }\n \n writer.close();\n }", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "public static void writeFile(ArrayList<PetClass> petList) {\n\n String fileName = \"PetRecord\";\n File file;\n FileWriter fileWriter;\n int currentPet = 0;\n\n PetClass[] pets = new PetClass[petList.size()];\n for (int index = 0; index < pets.length; index++) {\n pets[index] = petList.get(index);\n }\n try {\n file = new File(\"JSON\", fileName + Count.counter + \".json\");\n if (file.createNewFile()) {\n fileWriter = new FileWriter(file);\n } else {\n Count.increment();\n file = new File(\"JSON\", fileName + Count.counter + \".json\");\n fileWriter = new FileWriter(file);\n }\n\n fileWriter.write(\"{\\n\");\n for (PetClass pet : pets) {\n fileWriter.write(\"\\\"\" + pet.getPetName() + \"\\\":{\\n\");\n fileWriter.write(\"\\\"Pet Name\\\" : \\\"\" + pet.getPetName() + \"\\\",\\n\");\n fileWriter.write(\"\\\"Pet Species\\\" : \\\"\" + pet.getSpecies() + \"\\\",\\n\");\n if (pet.getLostStatus()) {\n fileWriter.write(\"\\\"Pet Missing\\\" : \\\"true\\\",\\n\");\n } else {\n fileWriter.write(\"\\\"Pet Missing\\\" : \\\"false\\\",\\n\");\n }\n fileWriter.write(\"\\\"Pet Date Lost\\\" : \\\"\" + pet.getDateLost() + \"\\\",\\n\");\n fileWriter.write(\"\\\"Pet Sex\\\" : \\\"\" + pet.gender + \"\\\",\\n\");\n if (pet.getNeuterStatus()) {\n fileWriter.write(\"\\\"Pet Fixed\\\" : \\\"true\\\",\\n\");\n } else {\n fileWriter.write(\"\\\"Pet Fixed\\\" : \\\"false\\\",\\n\");\n }\n fileWriter.write(\"\\\"Pet Photos\\\" : [\");\n for (int index = 0; index < pet.photos.length; index++) {\n if (index == pet.photos.length - 1) {\n fileWriter.write(\"\\\"\" + pet.photos[index] + \"\\\"]\\n\");\n } else {\n fileWriter.write(\"\\\"\" + pet.photos[index] + \"\\\",\");\n }\n }\n // if is the last pet\n if (currentPet == pets.length - 1) {\n fileWriter.write(\"}\\n\");\n } else {\n fileWriter.write(\"},\\n\");\n }\n currentPet++;\n }\n fileWriter.write(\"}\\n\");\n fileWriter.close();\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n }\n }", "private void saveItems() {\n PrintWriter writer = null;\n try {\n FileOutputStream fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(\n fos)));\n\n for (int idx = 0; idx < mAdapter.getItemCount(); idx++) {\n\n writer.println(mAdapter.getItem(idx));\n\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (null != writer) {\n writer.close();\n }\n }\n }", "public void writeGradesToFile() throws IOException {\n\t\tString value = \"\";\n\t\tBufferedWriter gradeWriter = new BufferedWriter( new FileWriter( \"gradeValues.txt\") );\n\t\tfor ( int i = 0; i < gradeValues.size(); i++ ) {\n\t\t\tvalue = Double.toString( gradeValues.get(i) );\n\t\t\tgradeWriter.write(value);\n\t\t\tgradeWriter.newLine();\n\t\t}\n\t\tgradeWriter.close();\n\t}", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.6427241", "0.6417815", "0.63403577", "0.6213468", "0.6120836", "0.6109069", "0.6080215", "0.5940381", "0.59159446", "0.59029686", "0.5890905", "0.58858854", "0.58633906", "0.58475506", "0.5846993", "0.58340126", "0.5822186", "0.5808651", "0.5793071", "0.57870287", "0.5771558", "0.57546234", "0.57462734", "0.5720788", "0.5685707", "0.568275", "0.5680075", "0.56513333", "0.5639799", "0.5618235", "0.5604361", "0.55986035", "0.55864394", "0.5583229", "0.5579916", "0.5552788", "0.55521137", "0.55421835", "0.5530712", "0.5524558", "0.5506645", "0.5504005", "0.5489479", "0.54873985", "0.54830074", "0.5481018", "0.5472181", "0.5469937", "0.54647225", "0.5461426", "0.5458017", "0.54533756", "0.5443918", "0.54415464", "0.54389167", "0.54363775", "0.5433478", "0.5430432", "0.5427494", "0.54251575", "0.5417983", "0.5410437", "0.5403638", "0.5398632", "0.5387208", "0.5380214", "0.53738713", "0.53737086", "0.53735757", "0.5371764", "0.5366648", "0.53495073", "0.5349474", "0.5340681", "0.53260463", "0.53258294", "0.53170633", "0.53129965", "0.53060406", "0.53054285", "0.52762127", "0.52719766", "0.5265232", "0.5265143", "0.52591074", "0.52583927", "0.5240863", "0.523585", "0.5227257", "0.52254164", "0.5224408", "0.5221755", "0.5218555", "0.52162457", "0.52095944", "0.52060467", "0.52034324", "0.52033067", "0.51898193", "0.5185806" ]
0.82677364
0
TODO Autogenerated method stub
public static void main(String[] args) { int[][] matrix = new int[3][3]; Scanner input = new Scanner(System.in); System.out.print("Enter a number between 0 and 511: "); int num = input.nextInt(); String binary = decimalToBinary(num,matrix); // put 1's and 0's using binary string int index=0; char ch; for(int row=0;row<matrix.length;row++){ for(int col=0;col<matrix[row].length;col++){ matrix[row][col]=binary.charAt(index); index++; if(matrix[row][col]=='0')ch='H'; else ch='T'; System.out.print((col+1)%3==0? ch+"\n":ch+" "); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Constructor que recibe referencia objeto de Clase02
public Clase04(Clase04 o){ numPersonas++; numero= o.numero; nombre= o.nombre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Clade() {}", "public ArmasHija2(int objetoHija2){\r\n super(objetoHija2);\r\n this.objetoHija2=objetoHija2;\r\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public MorteSubita() {\n }", "public Caso_de_uso () {\n }", "public MethodEx2() {\n \n }", "public OOP_207(){\n\n }", "public Alojamiento() {\r\n\t}", "private void __sep__Constructors__() {}", "public FicheConnaissance() {\r\n }", "private ControleurAcceuil(){ }", "public Lotto2(){\n\t\t\n\t}", "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Pitonyak_09_02() {\r\n }", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "public Tiempo2( Tiempo2 tiempo ) {\n // invoca al constructor de Tiempo2 con tres argumentos\n this( tiempo.obtenerHora(), tiempo.obtenerMinuto(), tiempo.obtenerSegundo() );\n }", "public TipoDocumentoMB() {\n tipoDoc = new TipoDocPersona();\n }", "public Pasien() {\r\n }", "public SecondClassExample(){\n id = 10;\n }", "public Corso() {\n\n }", "public Cgg_jur_anticipo(){}", "public AntrianPasien() {\r\n\r\n }", "public FiltroMicrorregiao() {\r\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public TCubico(){}", "public ContaBancaria() {\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Person2(String fname, String lname) {\n this.fname = fname;\n this.lname = lname;\n }", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "private SingleObject(){}", "StudenteImpl(String nome, String cognome, Cdl corso, int annoCorso, String matricola) {\n super(nome, cognome);\n initialize(corso, annoCorso, matricola);\n }", "slco.Object getObject2();", "private UsineJoueur() {}", "public Candidatura (){\n \n }", "Casilla(String nombre){\n this.nombre=nombre; \n }", "private SingleObject()\r\n {\r\n }", "public Carrera(){\n }", "public Constructor(){\n\t\t\n\t}", "public Tiempo2( int h ) { \n this( h, 0, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }", "@Test\n\tpublic void testCid32ConstructorEmbeddedTwoNews() throws Exception {\n\t}", "public CampoModelo(String valor, String etiqueta, Integer longitud)\n/* 10: */ {\n/* 11:17 */ this.valor = valor;\n/* 12:18 */ this.etiqueta = etiqueta;\n/* 13:19 */ this.longitud = longitud;\n/* 14: */ }", "protected abstract void construct();", "public lo() {}", "public LiveRef(int paramInt) {\n/* 74 */ this(new ObjID(), paramInt);\n/* */ }", "public c(Object obj) {\n super(1);\n this.a = obj;\n }", "public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "public Estudiante(String nom) // Constructor 1: Se le asigna un valor al atributo nombre cuando se cree el objeto.\r\n {\r\n this.nombre = nom;\r\n }", "public CMObject newInstance();", "public CCuenta()\n {\n }", "public Busca(){\n }", "public Login() {\n usuario = new Usuario2();\n }", "public Doc_estado() {\n }", "private GrupoCuenta(String nombre, int operacion)\r\n/* 11: */ {\r\n/* 12:31 */ this.nombre = nombre;\r\n/* 13:32 */ this.operacion = operacion;\r\n/* 14: */ }", "public CommonVO() {\r\n }", "public Sistema(){\r\n\t\t\r\n\t}", "public Classe() {\r\n }", "Reproducible newInstance();", "private BaseDatos() {\n }", "Oracion createOracion();", "public Banco(){}", "public Ext2Class1() {\n }", "public BacInfo() {\n }", "Foco createFoco();", "private SingleObject(){\n }", "public LiveRef(ObjID paramObjID, int paramInt) {\n/* 93 */ this(paramObjID, TCPEndpoint.getLocalEndpoint(paramInt), true);\n/* */ }", "public Cohete() {\n\n\t}", "public Pojo1110110(){\r\n\t}", "public Corrida(){\n\n }", "public SlanjePoruke() {\n }", "public Curso() {\r\n }", "public Clan(int nombreMembres)\n {\n // initialisation des variables d'instance\n this.nombreMembres = nombreMembres;\n this.residence = null;\n }", "public LCAmsg2 () { }", "public StudentChoresAMImpl() {\n }", "public AfiliadoVista() {\r\n }", "public YonetimliNesne() {\n }", "public Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }", "public StudentService_ver2() {//Constructor\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tstuArr[i]=new Student();\n\t\t}\n\t}", "public Oveja() {\r\n this.nombreOveja = \"Oveja\";\r\n }", "public Tiempo2( int h, int m ) { \n this( h, m, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }", "public _355() {\n\n }", "public Achterbahn() {\n }", "public MPaciente() {\r\n\t}", "private static <T extends C14931j> T m43361c(Class<T> cls) {\n try {\n return (C14931j) cls.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);\n } catch (Exception e) {\n if (e instanceof InstantiationException) {\n throw new IllegalArgumentException(\"dataType doesn't have default constructor\", e);\n } else if (e instanceof IllegalAccessException) {\n throw new IllegalArgumentException(\"dataType default constructor is not accessible\", e);\n } else if (VERSION.SDK_INT < 19 || !(e instanceof ReflectiveOperationException)) {\n throw new RuntimeException(e);\n } else {\n throw new IllegalArgumentException(\"Linkage exception\", e);\n }\n }\n }", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public Aritmetica(){ }", "public Loan(int loanId, Book bOoK, Member mEmBeR, Date dueDate) { ////changed 'BoOk' to 'book' and changed 'MeMbEr' to 'member' and DuE_dAtE to dueDate\r\n\t\tthis.LoAn_Id = loanId; //changed 'LoAn_Id' to 'loanId'\r\n\t\tthis.BoOk = book; //changed 'BoOk' to 'book'\r\n\t\tthis.MeMbEr = member; //changed 'MeMbEr' to 'member'\r\n\t\tthis.DaTe = dueDate; //changed DuE_dAtE to dueDate\r\n\t\tthis.state = loanState.current; //changed 'StAtE' to 'state' and lOaN_sTaTe.CURRENT to loanState.current\r\n\r\n\t}", "public LecturaPorEvento() \r\n {\r\n }", "public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmpleado,\n java.lang.String primerApellido,\n java.lang.String segundoApellido,\n java.lang.String nombreEmpleado,\n java.lang.String clabeEmpleado,\n java.lang.String idBancoSar,\n java.util.Date ingresoGobFed, \n java.util.Date ingresoDependencia, \n java.util.Date terminoCargoSind, \n java.lang.String imssIssste, \n java.lang.String EMailOficial, \n java.lang.String EMailPersonal,\n java.lang.Integer idRusp, \n java.lang.String sistemaReparto, \n java.lang.String idTipoPago, \n java.lang.String idEdoCivil, \n java.lang.String idNacionalidad, \n java.lang.String idProfnCarrera, \n java.lang.Integer idNivelEscolar, \n java.lang.Integer idInstEducativa, \n java.lang.Integer idEspProtCivil, \n java.lang.Integer idInstProtcivil, \n java.util.Date fecNotDecPatr, \n java.util.Date fecIniDeclPatr, \n java.util.Date fecIngSpc, \n java.lang.String casoMuestra,\n java.lang.String discapacidad,\n java.lang.String estudiaSiNo,\n java.lang.String padreMadre,\n java.lang.String compatEmpleo,\n java.lang.String usuario,\n java.lang.Integer idInmuebleP,\n java.lang.String plazaTelOfc1,\n java.lang.String plazaExt1) { \n this.curpEmpleado = curpEmpleado;\n this.rfcEmpleado = rfcEmpleado;\n this.primerApellido = primerApellido;\n this.segundoApellido = segundoApellido;\n this.nombreEmpleado = nombreEmpleado;\n this.clabeEmpleado = clabeEmpleado;\n this.idBancoSar = idBancoSar;\n this.ingresoGobFed = ingresoGobFed;\n this.ingresoDependencia = ingresoDependencia;\n this.terminoCargoSind = terminoCargoSind;\n this.imssIssste = imssIssste;\n this.EMailOficial = EMailOficial;\n this.EMailPersonal = EMailPersonal;\n this.idRusp = idRusp;\n this.sistemaReparto = sistemaReparto;\n this.idTipoPago = idTipoPago;\n this.idEdoCivil = idEdoCivil;\n this.idNacionalidad = idNacionalidad;\n this.idProfnCarrera = idProfnCarrera;\n this.idNivelEscolar = idNivelEscolar;\n this.idInstEducativa = idInstEducativa;\n this.idEspProtCivil = idEspProtCivil;\n this.idInstProtcivil = idInstProtcivil;\n this.fecNotDecPatr = fecNotDecPatr;\n this.fecIniDeclPatr = fecIniDeclPatr;\n this.fecIngSpc = fecIngSpc;\n this.casoMuestra = casoMuestra;\n this.discapacidad = discapacidad;\n this.estudiaSiNo = estudiaSiNo;\n this.padreMadre = padreMadre;\n this.compatEmpleo = compatEmpleo;\n this.usuario = usuario;\n this.idInmuebleP = idInmuebleP;\n this.plazaTelOfc1 = plazaTelOfc1;\n this.plazaExt1 = plazaExt1;\n }", "public Respuesta() {\n }", "Objet getObjetAlloue();", "public Ctacliente() {\n\t}", "public Vehiculo() {\r\n }", "public prueba()\r\n {\r\n }", "public Contato() {\n }", "public Coche() {\n super();\n }", "Clase createClase();", "public PersonaFisica() {}", "public static Flipkart createFlipkart()throws Exception {\r\n\t\t //create target class obj\r\n\t\t Flipkart fpkt=new Flipkart();\r\n\t\t \r\n\t\t // Load Dependent class \r\n\t\t Class c=Class.forName(props.getProperty(\"dependent.comp\"));\r\n\t\t //create object using refflection object\r\n\t\t Constructor cons[]=c.getDeclaredConstructors();\r\n\t\t //create object\r\n\t\t Courier courier=(Courier) cons[0].newInstance();\r\n\t\t //set Dependent class object to target class obj\r\n\t\t fpkt.setCourier(courier);\r\n\t return fpkt;\r\n }" ]
[ "0.6202531", "0.61958545", "0.6101341", "0.593528", "0.58579785", "0.58536786", "0.58534044", "0.58469874", "0.5835514", "0.57954013", "0.5790912", "0.57779336", "0.5773361", "0.57691395", "0.575514", "0.5754574", "0.57535183", "0.57327354", "0.5731291", "0.57219124", "0.5719222", "0.5715192", "0.57096326", "0.570374", "0.5692557", "0.5690264", "0.5690252", "0.5685967", "0.56853545", "0.56816506", "0.56734514", "0.56685454", "0.56628007", "0.5654569", "0.56318235", "0.55879205", "0.557142", "0.5566927", "0.5566671", "0.5565622", "0.5553678", "0.5553463", "0.5533248", "0.5529263", "0.55272686", "0.5520178", "0.55102277", "0.55077744", "0.5506995", "0.55056936", "0.5504079", "0.5503267", "0.5492946", "0.54929274", "0.5490225", "0.548776", "0.54875803", "0.54861116", "0.54697055", "0.54649204", "0.5462587", "0.5461499", "0.5460907", "0.54509324", "0.5447822", "0.54473346", "0.544674", "0.54447275", "0.5441892", "0.543824", "0.5435056", "0.5427521", "0.5415066", "0.5413968", "0.54121244", "0.5410212", "0.54016656", "0.54012555", "0.5398408", "0.539749", "0.53935534", "0.5391017", "0.5389668", "0.5385193", "0.5379791", "0.537104", "0.53703326", "0.5370101", "0.53623873", "0.53618324", "0.5361729", "0.5353745", "0.53523153", "0.5352209", "0.5351142", "0.5351032", "0.5349896", "0.5349633", "0.53457946", "0.53449434" ]
0.6852877
0
Created by root on 17225.
public interface SpLocalFeatureList <T extends SpLocalFeature<?, ?>> extends SpRandomisableList<T>, Writeable { /** The header used when writing LocalFeatureLists to streams and files */ public static final byte[] BINARY_HEADER = "KPT".getBytes(); /** * Get the feature-vector data of the list as a two-dimensional array of * data. The number of rows will equal the number of features in the list, * and the type &lt;Q&gt;must be compatible with the data type of the features * themselves. * * @param <Q> * the data type * @param a * the array to fill * @return the array, filled with the feature-vector data. */ public <Q> Q[] asDataArray(Q[] a); /** * Get the length of the feature-vectors of each local feature if they are * constant. * * This value is used as instantiate new local features in the case that the * local feature has a constructor that takes a single integer. * * @return the feature-vector length */ public int vecLength(); @Override public SpLocalFeatureList<T> subList(int fromIndex, int toIndex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private void createAndListen() {\n\n\t\t\n\t}", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "public void create() {\n\t\t\n\t}", "private Server()\n\t{\n\t}", "@Override\n\tpublic void createClient() {\n\t\t\n\t}", "private Mongopool() {\n\t}", "@Override\n protected void startUp() {\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "zzana mo29855eb() throws RemoteException;", "zzang mo29839S() throws RemoteException;", "private String createPID() {\n return \"7777\";\n }", "private Aliyun() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "public void conectServer() {\n\n\t}", "private Connection() {\n\t\tSystem.out.println(\"--Connection Created--\");\n\t}", "default String getHost() {\n return \"localhost\";\n }", "@Override\n\tpublic void create() {\n\n\t}", "private OutOfProcessServer()\n {\n }", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "public int createSocket()\n\t{\n\t\t\n\t}", "protected void mo6255a() {\n }", "public TargetServerChromattic() {}", "private static int getHerokuAssignedPort() {\n return 4567;\n }", "@Override\r\n\tpublic String index() {\n\t\treturn \"服务器维护中。。。。\";\r\n\t}", "private void initializeNA(){\n name = \"N/A\";\n key = \"N/A\";\n serverIpString = \"N/A\";\n serverPort = 0;\n clientListenPort = 0;\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private MApi() {}", "@Override\r\n\t\t\tpublic void run()\r\n\t\t\t{\n\t\t\t\tString path = \"D:\\\\TUM\\\\3rd Semester\\\\3. Lab Course - Cloud DB [IN0012, IN2106, IN4163]\\\\LatestVersion\\\\gr6\\\\path\";\r\n\t\t\t\tKVServer newServer = new KVServer(\"newNode\", 50001, 30000, 3, \"FIFO\", path, 0,1,1);\r\n\t\t\t}", "@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}", "public Socket createSocket()\n/* */ {\n/* 82 */ return new Socket();\n/* */ }", "@Override\n public void socket() {\n }", "void connectionCreated();", "public Server() {}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "@Override\n\tpublic void connect() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "zzafe mo29840Y() throws RemoteException;", "public void createCon(){\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.driver.OracleDriver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:oracle:thin:@172.26.132.40:1521:ORCLILP\", \"a63d\", \"a63d\");\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\n\t}", "public Echange_Client() throws UnknownHostException, IOException {\n start_Connexion(); \n }", "private Connection () {}", "private ConexionBD() {\n\t\testablecerConexion();\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n public void startup() {\n }", "public SayHelloServiceImpl() \n { \n try \n {\n this.hostname = InetAddress.getLocalHost().getHostName();\n } \n catch (UnknownHostException e) \n {\n this.hostname = \"Localhost\";\n }\n }", "private static void oneUserExample()\t{\n\t}", "void crearAuditoria(String emailUsuario, String observacion, String dirIP, String hostName);", "public static void created() {\n\t\t// TODO\n\t}", "S getServer();", "public Server()\n\t{\n\t\tusers = new ArrayList<User>();\n\t\tdepartments = new ArrayList<Department>();\n\t\ttokenGenerator = new Random(System.currentTimeMillis());\n\t}", "public static void main(String[] args) {\n try {\n //创建一个远程对象\n\n String ip = args[0];\n String port = args[1];\n Integer totalSpace = args[2] == null ? 100 :Integer.valueOf(args[2]);\n ChunkServerProperties properties = new ChunkServerProperties();\n properties.setIp(ip);\n properties.setPort(port);\n\n IChunkServerService chunkServer = new BFSChunkServer(totalSpace,0,\"/\",ip);\n\n LocateRegistry.createRegistry(Integer.parseInt(port));\n\n String rmi = \"rmi://\"+properties.getServerIpPort()+\"/chunk_server\";\n Printer.println(rmi);\n Naming.bind(rmi,chunkServer);\n\n String masterRMI =\"rmi://127.0.0.1:8888/master\";\n\n IMasterService masterService =(IMasterService) Naming.lookup(\"rmi://127.0.0.1:8888/master\");\n\n\n masterService.registerChunkServer(properties);\n\n Printer.println(\"register to master \"+masterRMI + \" succcess\");\n\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (AlreadyBoundException e) {\n e.printStackTrace();\n } catch (NotBoundException e) {\n e.printStackTrace();\n }\n }", "public void mo55254a() {\n }", "private HSBC() {\n\t\t\n\t\t\n\t}", "public EbbServerImpl(String name) throws RemoteException {\r\n \tthis.name = name;\r\n \ti =0;\r\n \tdatabase = new DatabaseImpl();\r\n \tdatabase.startConnection();\r\n \t//database.dropTable();\r\n \t//database.createTable();\r\n }", "Petunia() {\r\n\t\t}", "public Puertos() {\n estaDisponibleServerSocket();\n }", "public static void main(String[] args) {\n\n try {\n\n Registry registry = LocateRegistry.createRegistry( 1888);\n registry.rebind(\"YStudentServerImpl\", new YStudentServerImpl());\n\n\n }\n catch (Exception ex){\n System.err.println(\"YStudentServerImpl exeption\");\n ex.printStackTrace();\n }\n\n\n }", "private MemberIdServer() {\n }", "pvcs createpvcs();", "protected int getDefaultPort() {\n/* 320 */ return -1;\n/* */ }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tSocket socket = new Socket(\"203.236.209.97\", 9000);\n\t\t\tSystem.out.println(\"서버에 접속\");\n\t\t\tInputStream is = socket.getInputStream();\n\t\n\t\t\tbyte [] data =new byte[100];\n\t\t\tis.read(data);\n\t\t\tString msg = new String(data);\n\t\t\tSystem.out.println(\"서버로부터 수신된 데이터: \"+msg);\n\t\t\tsocket.close();\n\t\t\tSystem.out.println(\"서버와 연결해제\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "private Rekenhulp()\n\t{\n\t}", "void createConnection();", "public DhcpHost() {\n }", "private StripesPMI() {}", "API createAPI();", "private RepositorioOrdemServicoHBM() {\n\n\t}", "public ServerConnecter() {\r\n\r\n\t}", "private IdServer() {\n\t\t//System.out.println(\"Creating new instance of ID Server!\");\n\t\tclientIDCounter = 1;\n\t\tmemberIDCounter = 1;\n\t\tticketIdCounter = 1;\n\t}", "@Override\n\t\tpublic void ipChange() {\n\t\t\t\n\t\t}", "@Override\n protected void prot() {\n }", "@Override\n\tpublic int getServerPort() {\n\t\treturn 0;\n\t}", "@Override\r\n protected void onConnected() {\n \r\n }", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "public void testSetHost() {\n }", "public Server() {\n print_addr();\n follow_updates();\n }", "protected ServerConnectionDebugger() {\n\n }", "@Override\n\tpublic void preServe() {\n\n\t}", "Anywhere createAnywhere();", "public Host()\n\t{\n\t}", "public void create(){}", "@Override\n\tpublic void start() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "private void init() {\n\t\t/* Add the DNS of your database instances here */\n\t\tdatabaseInstances[0] = \"ec2-52-0-167-69.compute-1.amazonaws.com\";\n\t\tdatabaseInstances[1] = \"ec2-52-0-247-64.compute-1.amazonaws.com\";\n\t}", "@Override\n public void startUpOperations() {\n }", "Host getHost();", "@Override\n\t\tpublic int getServerPort() {\n\t\t\treturn 0;\n\t\t}", "private RMIRegistrator() {\n\t// nothing\n }", "@Override\n public void perish() {\n \n }" ]
[ "0.54618734", "0.5447993", "0.5442807", "0.5440822", "0.5423148", "0.5401264", "0.53865457", "0.5384872", "0.5326929", "0.53244555", "0.53181", "0.528058", "0.52528083", "0.5246825", "0.52444553", "0.51992476", "0.519708", "0.5190195", "0.5172868", "0.5170417", "0.51692", "0.5168891", "0.51471245", "0.51340383", "0.5120438", "0.51136935", "0.51095074", "0.510685", "0.5100594", "0.50965124", "0.5080097", "0.5064275", "0.5045048", "0.5039321", "0.5033696", "0.5033696", "0.5033454", "0.5033454", "0.5033454", "0.5033454", "0.5033454", "0.5033454", "0.5033454", "0.50261956", "0.5000715", "0.497763", "0.49715424", "0.4970145", "0.4968012", "0.49656168", "0.49605212", "0.49366668", "0.4932146", "0.4927541", "0.4926452", "0.49187425", "0.4914591", "0.49125072", "0.49066675", "0.49060735", "0.4899626", "0.48947126", "0.48881572", "0.48880988", "0.48868385", "0.48848546", "0.48780715", "0.4874991", "0.48702613", "0.48668584", "0.486658", "0.48663637", "0.48602775", "0.4845523", "0.48444384", "0.4843928", "0.48435652", "0.4842811", "0.484109", "0.48398784", "0.48358887", "0.4831605", "0.4829997", "0.48289707", "0.48283467", "0.4828249", "0.4825428", "0.48241803", "0.4815224", "0.48129368", "0.48129368", "0.48129368", "0.48129368", "0.48115358", "0.4809287", "0.4807267", "0.48024246", "0.4799841", "0.47994012", "0.47901282", "0.47874764" ]
0.0
-1
Get the featurevector data of the list as a twodimensional array of data. The number of rows will equal the number of features in the list, and the type must be compatible with the data type of the features themselves.
public <Q> Q[] asDataArray(Q[] a);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Feature[] getFeatures() {\n Feature[] features = new Feature[rows.size()];\n for(int i=0;i<features.length;i++){\n features[i] = (Feature)rows.elementAt(i);\n }\n return features;\n }", "public float[] getVector() {\r\n\t\t\r\n\t\tfloat array[]=new float[12];\r\n\t\tint index=-1;\r\n\t\t\r\n\t\tfor(int i=0;i<4;i++) {\r\n\t\t\tfor(int j=0;j<3;j++) {\r\n\t\t\t\t++index;\r\n\t\t\t\tarray[index]=thecounts[i][j]; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn array;\r\n\t}", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$14, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public List<FeatureDataBean> convertFeatureDataBeanToFeatureModel(List<UMFeature> uMFeature) {\n List<FeatureDataBean> result = new ArrayList<>();\n\n for (UMFeature uMFeature1 : uMFeature) {\n FeatureDataBean featureDataBean1 = new FeatureDataBean();\n\n featureDataBean1.setId(uMFeature1.getId());\n featureDataBean1.setName(uMFeature1.getName());\n featureDataBean1.setDescription(uMFeature1.getDescription());\n featureDataBean1.setFeatureURL(uMFeature1.getFeatureUrl());\n featureDataBean1.setWebserviceURL(uMFeature1.getWebserviceUrl());\n featureDataBean1.setActive(uMFeature1.getIsActive());\n featureDataBean1.setCrud(uMFeature1.getIsCrud());\n featureDataBean1.setMenuLable(uMFeature1.getMenuLabel());\n featureDataBean1.setMenuType(uMFeature1.getMenuType());\n\n result.add(featureDataBean1);\n }\n return result;\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$6, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(FEATURE$6, targetList);\r\n org.landxml.schema.landXML11.FeatureDocument.Feature[] result = new org.landxml.schema.landXML11.FeatureDocument.Feature[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public double[][] fetch_data(LinkedList<Double> list, double mean) {\n double[][] array = new double[2][this.nfft];\n int size = list.size();\n\n for (int i = 0; i < nfft; i++) {\n if (i < size) {\n array[0][i] = NavigationTools.HeadingDelta(list.get(i), mean);\n array[1][i] = 0.0d;\n } else {\n // pad array with zeros\n array[0][i] = 0.0d;\n array[1][i] = 0.0d;\n }\n }\n return array;\n }", "public float[] getAsFloats() {\n return (float[])data;\n }", "private static final double[][] doubleArray2d (final List points) {\n final int m = points.size();\n final int n = ((List) points.get(0)).size();\n final double[][] a = new double[m][n];\n for (int i=0;i<m;i++) {\n final List row = (List) points.get(i);\n for (int j=0;j<n;j++) {\n a[i][j] = ((Number) row.get(j)).doubleValue(); } }\n return a; }", "public List<Vector<Double>> createFeatureVectors(List<List<RecordBean>> splittedRecordBeansList){\n\n List<Vector<Double>> featureVectorList = new ArrayList<>();\n for(int i = 0; i < splittedRecordBeansList.size(); i++){\n Vector<Double> featureVector = new Vector<>(5);\n featureVector.add(averagePacketsperRequest(splittedRecordBeansList.get(i)));\n featureVector.add(averageBytesperRequest(splittedRecordBeansList.get(i)));\n featureVector.add(getPacketEntropyDistribution(splittedRecordBeansList.get(i)));\n featureVector.add(getByteEntropyDistribution(splittedRecordBeansList.get(i)));\n featureVector.addAll((getProtocolRatios(splittedRecordBeansList.get(i))));\n featureVector.add(getLabel(splittedRecordBeansList.get(i)));\n featureVectorList.add(featureVector);\n }\n\n return featureVectorList;\n }", "org.landxml.schema.landXML11.FeatureDocument.Feature getFeatureArray(int i);", "org.landxml.schema.landXML11.FeatureDocument.Feature getFeatureArray(int i);", "org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray();", "org.landxml.schema.landXML11.FeatureDocument.Feature[] getFeatureArray();", "public double[][] asDoubleArray() {\r\n\r\n double returnList[][] = new double[getRowCount()][getLogicalColumnCount()];\r\n for (int i = 0; i < getRowCount(); i++) {\r\n for (int j = 0; j < getLogicalColumnCount(); j++) {\r\n returnList[i][j] = this.getLogicalValueAt(i, j);\r\n }\r\n }\r\n return returnList;\r\n }", "public double[] getAsDoubles() {\n return (double[])data;\n }", "public static ArrayList<Double> twoDArrToArrList(Double[][] dataSet) {\n List<Double> collection = Arrays.stream(dataSet) \n .flatMap(Arrays::stream)\n .collect(Collectors.toList());\n\n ArrayList<Double> arrList = new ArrayList<Double>(collection); \n return arrList; \n }", "public double[] getDoubleList();", "public INDArray getFeaturesArray(boolean training) {\n if (training) {\n return trainSet.getFeatures().reshape(batchShape());\n } else {\n return testSet.getFeatures().reshape(batchShape());\n }\n }", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "Vector<Vector<Object>> getDataVector();", "public IDataSet extractFeatures(String featureType);", "public double[][] flatten(){\n double[][] result = new double[featureBlocks.size()][];\n int count=0;\n for(FeatureBlock featureBlock: featureBlocks){\n // might experience reference issue\n result[count] = featureBlock.flatten();\n count++;\n }\n return math.T(result);\n }", "private static double[] toArray(ArrayList<Double> dbls) {\n double[] r = new double[dbls.size()];\n int i = 0;\n for( double d:dbls ) r[i++] = d;\n return r;\n }", "public static <T> T[] listToArray (Object list) {\n\tif (! (list instanceof Collection)) {\n\t\treturn (T[]) new Object[0];\n\t}\n\treturn (T[]) ((Collection) list).toArray();\n }", "public float[] toArray() {\r\n float[] result = new float[size];\r\n System.arraycopy(elementData, 0, result, 0, size);\r\n return result;\r\n }", "private Data[] getFloats(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataFloat((float) value)\n\t\t: new DataArrayOfFloats(new float[] { (float) value,\n\t\t\t\t(float) value });\n\t\t\treturn data;\n\t}", "public short[] get_data() {\n short[] tmp = new short[60];\n for (int index0 = 0; index0 < numElements_data(0); index0++) {\n tmp[index0] = getElement_data(index0);\n }\n return tmp;\n }", "public long[] toLongArray()\r\n {\r\n long[] a = new long[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Long) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public static double[] readDoubleVector(DataInputStream input) throws IOException {\n int length = input.readInt();\n\n double[] ret = new double[length];\n\n for (int i = 0; i < length; i++) {\n double value = input.readDouble();\n ret[i] = value;\n }\n\n return ret;\n }", "public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}", "public abstract double[] toDoubleArray();", "java.util.List<com.google.protobuf.ByteString> getDataList();", "java.util.List<com.google.protobuf.ByteString> getDataList();", "public List<List<Double>> referenceToBeamlineColumnVector(List<List<Double>> reference) {\n\t\tif (isValidColumnVector(reference).equals(false)) {\n\t\t\tthrow new IllegalArgumentException(\"non-valid input vector\");\n\t\t}\n\n\t\tSimpleMatrix referenceVector = Maths.listOfListsToSimpleMatrix(reference);\n\t\treturn referenceToBeamlineColumnVector(referenceVector);\n\t}", "@Override\n public Object getNDArray() {\n NDArray<?>[] arr = new NDArray[2];\n arr[0] = new NDArray<>(getMagGrid().getFloats(), getMagGrid().getYdim(),\n getMagGrid().getXdim());\n arr[1] = new NDArray<>(getDirGrid().getFloats(), getDirGrid().getYdim(),\n getDirGrid().getXdim());\n return arr;\n }", "public static Double[] convertirTableau(ArrayList<Double> valeurs) {\n\t\tDouble[] tab = new Double[valeurs.size()];\n\t\tfor(int i = 0; i <valeurs.size(); i++) {\n\t\t\ttab[i] = valeurs.get(i);\n\t\t}\n\t\treturn tab;\n\t}", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "List<Feature> getFeatures();", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "public static Vector listToVector(List<Double> list) {\n if (list.size() == 3) {\n return new Vector(list.get(0), list.get(1), list.get(2));\n }\n return new Vector(0, 0, 0);\n }", "public List<Double> getData( ) {\r\n return data;\r\n }", "public double[] getData() {\n return data;\n }", "public F64Vector(double[] data) {\n this.data = data;\n }", "public static <E extends F, F> F[] asAList(List<E> l, Class<F> theClass) {\n F[] res = (F[]) Array.newInstance(theClass, l.size());\n for (int i = 0; i < l.size(); i++) {\n res[i] = l.get(i);\n }\n return res;\n }", "public interface SpLocalFeatureList <T extends SpLocalFeature<?, ?>> extends SpRandomisableList<T>, Writeable {\n\n /** The header used when writing LocalFeatureLists to streams and files */\n public static final byte[] BINARY_HEADER = \"KPT\".getBytes();\n\n /**\n * Get the feature-vector data of the list as a two-dimensional array of\n * data. The number of rows will equal the number of features in the list,\n * and the type &lt;Q&gt;must be compatible with the data type of the features\n * themselves.\n *\n * @param <Q>\n * the data type\n * @param a\n * the array to fill\n * @return the array, filled with the feature-vector data.\n */\n public <Q> Q[] asDataArray(Q[] a);\n\n /**\n * Get the length of the feature-vectors of each local feature if they are\n * constant.\n *\n * This value is used as instantiate new local features in the case that the\n * local feature has a constructor that takes a single integer.\n *\n * @return the feature-vector length\n */\n public int vecLength();\n\n @Override\n public SpLocalFeatureList<T> subList(int fromIndex, int toIndex);\n\n}", "double[][] asArray(){\n double[][] array_to_return = new double[this.rows][this.cols];\n for(int i=0; i<this.rows; i++){\n for(int j=0; j<this.cols; j++) array_to_return[i][j] = this.data[i*this.cols + j];\n }\n\n return array_to_return;\n }", "public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }", "double[][] asDouble();", "public double[] getValues(Array2D input) {\n\t\treturn listToDArray( getValuesD(input) );\n\t}", "private static List<Feature> getFeatures(List<String> row) {\n\t\tString sex = row.get(0);\n\t\tdouble length = Double.parseDouble(row.get(1));\n double diameter = Double.parseDouble(row.get(2));\n double height = Double.parseDouble(row.get(3));\n// double whole_height = Double.parseDouble(row.get(4));\n// double shucked_height = Double.parseDouble(row.get(5));\n double viscera_weight = Double.parseDouble(row.get(6));\n double shell_weight = Double.parseDouble(row.get(7));\n\t\tList<Feature> features = new ArrayList<Feature>();\n\t\tfeatures.add(new NominalFeature(sex));\n\t\tfeatures.add(new ContinuousFeature(length));\n\t\tfeatures.add(new ContinuousFeature(diameter));\n\t\tfeatures.add(new ContinuousFeature(height));\n//\t\tfeatures.add(new ContinuousFeature(whole_height));\n//\t\tfeatures.add(new ContinuousFeature(shucked_height));\n\t\tfeatures.add(new ContinuousFeature(viscera_weight));\n\t\tfeatures.add(new ContinuousFeature(shell_weight));\n\t\treturn features;\n\t}", "java.util.List<java.lang.String> getFeaturesList();", "private Data[] getDoubles(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataDouble(value)\n\t\t: new DataArrayOfDoubles(new double[] { value, value });\n\t\t\treturn data;\n\t}", "public static Edge[] listToArray(ArrayList<Edge> list){\n\t\t\tEdge[] EdgeAry = new Edge[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tEdgeAry[i] = list.get(i);\n\t\t\t}\n\t\t\treturn EdgeAry;\n\t\t}", "public List<Double> getData() {\n return data;\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "@Parameters\n\tpublic static List<Object[]> data() {\n\t\tfinal Object[][] data = new Object[][] {\n\t\t\t\t{ true, new Operator[] { TRUE } },\n\t\t\t\t{ true, new Operator[] { FALSE } },\n\t\t\t\t{ true, new Operator[] { FALSE, TRUE } },\n\t\t\t\t{ false, new Operator[] { TRUE, FALSE, TRUE } },\n\t\t\t\t{ false, new Operator[] { TRUE, TRUE, FALSE } },\n\t\t};\n\t\treturn Arrays.asList(data);\n\t}", "com.google.protobuf.ByteString getFeaturesBytes(int index);", "@Parameters\n\tpublic static Collection<Object[]> data() {\n\t\tObject[][] data = new Object[][] { \n\t\t\t{null, null, null, null, null},\n\t\t\t{null, \"\", null, null, null},\n\t\t\t{null, troppoLunga, null, null, null},\n\t\t};\n\t\treturn Arrays.asList(data);\n\t}", "List<FeatureDistribution> asFeatureDistributions();", "org.landxml.schema.landXML11.PlanFeatureDocument.PlanFeature[] getPlanFeatureArray();", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "@Override\n\tpublic Object[] toArray() {\n\t\tif (isEmpty()) {\n\t return null;\n\t }\n\n\t\tObject[] data = new Object[size()];\n\n\t ListNode tmp = head;\n\t for (int i = 0; i < size(); i++) {\n\t data[i] = tmp.datum;\n\t tmp = tmp.next;\n\t }\n\n\t return data;\t\t\n\t}", "public native float[][] __float2dArrayMethod( long __swiftObject, float[][] arg );", "public abstract float[] toFloatArray();", "public double[][] getArray() {\n return data;\n }", "public FeatureNode[][] featueStore2FeatureNode(FeatureStore store) \n\t{\n\t\tMap<Integer, FeatureNode> featureNodes = new TreeMap<Integer, FeatureNode>();\n\n\t\t// add a \"bias\" feature node; otherwise LIBLINEAR is unable to predict\n\t\t// the majority class for\n\t\t// instances consisting entirely of features never seen during training\n\t\tfeatureNodes.put(this.biasIndex, new FeatureNode(this.biasIndex, 1));\n\n\t\t// convert the name String to an index\n\t\tfor (String featureName : store.getFeatureNames()) {\n\t\t\tif (!this.stringToInt.containsKey(featureName)) {\n\t\t\t\tthis.stringToInt.put(featureName, this.stringToInt.size() + 1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tFeatureNode[][] xValues = new FeatureNode[store.getNumberOfInstances()][];\n\t\t\n\t\tint instanceOffset = 0;\n\t\tfor (Instance instance : store.getInstances()) {\n\t\t\tfor (Feature feature : instance.getFeatures()) {\t\n\t\t\t\tString name = feature.getName();\n\t\t\t\t\n\t\t\t\tdouble value;\n\t\t\t\tif (feature.getValue() instanceof Number) {\n\t\t\t\t\tvalue = ((Number) feature.getValue()).doubleValue();\n\t\t\t\t} else {\n\t\t\t\t\tvalue = 1.0;\n\t\t\t\t}\t\t\t\n\n\t\t\t\tint index = this.stringToInt.get(name);\n\n\t\t\t\t// create a feature node for the given index\n\t\t\t\t// NOTE: if there are duplicate features, only the last will be kept\n\t\t\t\tfeatureNodes.put(index, new FeatureNode(index, value));\n\t\t\t}\n\t\t\t\n\t\t\t// put the feature nodes into an array, sorted by feature index\n\t\t\tFeatureNode[] featureNodeArray = new FeatureNode[featureNodes.size()];\n\t\t\tint i = 0;\n\t\t\tfor (Integer index : featureNodes.keySet()) {\n\t\t\t\tfeatureNodeArray[i] = featureNodes.get(index);\n\t\t\t\t++i;\n\t\t\t}\n\t\t\txValues[instanceOffset] = featureNodeArray;\n\t\t\tinstanceOffset++;\n\t\t}\n\n\t\treturn xValues;\n\t}", "org.landxml.schema.landXML11.PlanFeatureDocument.PlanFeature getPlanFeatureArray(int i);", "VectorType11 getVector();", "public java.util.List getData() {\r\n return data;\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature getFeatureArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().find_element_user(FEATURE$14, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public double[] getData(){\r\n\t\t//make a deeeeeep copy of data\r\n\t\tdouble[] returnData = new double[this.data.length];\r\n\t\t\r\n\t\t//fill with data values\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\treturnData[i] = this.data[i];\r\n\t\t}\r\n\t\t//return a ref to my deep copy\r\n\t\treturn returnData;\r\n\t}", "public org.landxml.schema.landXML11.FeatureDocument.Feature getFeatureArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().find_element_user(FEATURE$6, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public org.landxml.schema.landXML11.FeatureDocument.Feature getFeatureArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.FeatureDocument.Feature target = null;\r\n target = (org.landxml.schema.landXML11.FeatureDocument.Feature)get_store().find_element_user(FEATURE$6, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "private Data[] getLongs(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tlong val = (long) (value * Long.MAX_VALUE);\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataLong(val)\n\t\t: new DataArrayOfLongs(new long[] { val, val });\n\t\t\treturn data;\n\t}", "public ArrayList<String[]> getData() {\n return this.data;\n }", "@JavascriptInterface\n public float[] getData() {\n float[]mis;\n int i,k;\n mis[0]=misC;\n for(k=0;k<12;k++){\n for (i=0;i<(k+1)*misC;i++){\n mis[k*i+1]=misure[i][k];\n }\n }\n\n return mis; // JS non ha gli array bidimensionali !!!!\n }", "public ArrayPtr getFeatures(boolean training) {\n return ArrayPtrFactory.fromData(getFeaturesArray(training));\n }", "@Parameters\r\n public static Collection<Object[]> data() {\r\n Object[][] data = new Object[][] { { -1 }, { 0 }, { 1 } };\r\n return Arrays.asList(data);\r\n }", "public static Object createArray(TypeList type) {\n\t\tList<Integer> listDimensions = type.getDimensions();\n\t\tint[] dimensions = new int[listDimensions.size()];\n\t\tfor (int i = 0; i < dimensions.length; i++) {\n\t\t\tdimensions[i] = listDimensions.get(i);\n\t\t}\n\n\t\tType eltType = type.getInnermostType();\n\t\treturn createArray(eltType, dimensions);\n\t}", "java.util.List<? extends iet.distributed.telemetry.FeatureOrBuilder> \n getFeatureOrBuilderList();", "public abstract ArrayList<STTPoint> getWrappedData();", "public double[][] getData() {\n return this.data;\n }", "@SuppressWarnings( { \"rawtypes\", \"unchecked\" } )\n\tprotected static Vector toVector( List list )\n\t{\n\t\tVector v = new Vector( );\n\t\tfor ( Object o : list )\n\t\t{\n\t\t\tv.add( o );\n\t\t}\n\t\treturn v;\n\t}", "public COSArray toList() \n {\n return array;\n }", "public Object[] getScriptOfValuesAsDouble() {\r\n\t\tArrayList valueDouble;\r\n\t\tvalueDouble = new ArrayList<Double>();\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (var.getType().equals(\"double\") || var.getType().equals(\"int\")) {\r\n\r\n\t\t\t\tif (var.getValue() != null && !var.getValue().equals(\"\") && !var.getValue().equals(\"NaN\")) {\r\n\r\n\t\t\t\t\tvalueDouble.add(var.getValue());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalueDouble.add(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tObject[] values = new Object[valueDouble.size()];\r\n\t\tint i = 0;\r\n\t\tfor (Object d : valueDouble) {\r\n\t\t\tif (d == null) {\r\n\t\t\t\td = 0.0;\r\n\t\t\t}\r\n\r\n\t\t\tvalues[i] = d;\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn values;\r\n\r\n\t}", "public CArray data() {\n return CArray.frompointer(TH.THTensor_(data)(this));\n }", "public static Object[][] getData() {\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}", "public O[] toArray()\r\n {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n O[] a = (O[]) new Object[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic T[] asArray() {\n\t\t// have to use explicit cast because we cannot use the alternative signature of toArray(T[]), as you cannot instantiate an array of a\n\t\t// type parameter (not even an empty array)\n\t\treturn (T[]) this.itemList.toArray();\n\t}", "public java.util.Vector getVecData() {\r\n return vecData;\r\n }", "private ArrayList<String[]> getTableRowData() \n {\n int numRow, numCol;\n ArrayList<String[]> data = new ArrayList<>();\n numRow = jtModel.getRowCount(); \n numCol = jtModel.getColumnCount();\n String[] row;\n for(int i = 0; i< numRow; i++)\n {\n row = new String[numCol];\n for(int j = 0; j< numCol; j++)\n {\n row[j] = jtModel.getValueAt(i, j).toString();\n } \n data.add(row);\n } \n return data;\n }", "List<IFeature> getFeatureList();", "public int[] getFixedLengthData(int index, int length) {\n int data[] = new int[length];\n for(int i=0; i<length; i++) {\n data[i] = theList.get(index+i);\n }\n return data;\n }", "org.tensorflow.example.VarLenFeatureProto getVarLenFeature();", "private int[] convertDoubleListToIntArray(List<Double> doubleList){\r\n\t\t\tint[] intArray = new int[doubleList.size()];\r\n\t\t\tfor(int i =0; i<doubleList.size(); i++){\r\n\t\t\t\t//intArray[i] = Integer.parseInt(String.valueOf(intList.get(i)));\r\n\t\t\t\tintArray[i] = doubleList.get(i).intValue();\r\n\t\t\t}\r\n\t\t\treturn intArray;\r\n\t\t}", "public double[] readVector(String line, int index) {\n\n String[] list = line.split(\" \");\n int numColumns = Integer.parseInt(list[index]);\n double[] res = new double[numColumns];\n\n int num = index + 1;\n for (int j = 0; j < numColumns; j++) {\n res[j] = Double.parseDouble(list[num]);\n num++;\n }\n return res;\n }", "public double[] getData(int index) {\n\t\treturn m_Data[index];\n\t}", "public Object getData() {\n return dataArray;\n }", "public ArrayList getDataFromLinkedList() {\n\n ArrayList dataArray = new ArrayList();\n\n LinkedListNode pointer = head;\n while (pointer.next != null) {\n dataArray.add(pointer.data);\n pointer = pointer.next;\n }\n dataArray.add(pointer.data);\n\n return dataArray;\n }" ]
[ "0.57748234", "0.5739178", "0.56056386", "0.55990916", "0.5596868", "0.5596868", "0.556698", "0.5560309", "0.5505868", "0.5499706", "0.548065", "0.548065", "0.5466661", "0.5466661", "0.53748643", "0.5360702", "0.53353786", "0.5282722", "0.5268719", "0.52614856", "0.522091", "0.52077067", "0.52055925", "0.5197681", "0.5197155", "0.5176406", "0.5162297", "0.51408345", "0.51214045", "0.51176405", "0.5116599", "0.5093613", "0.50850916", "0.50850916", "0.5051339", "0.50452495", "0.50452244", "0.50438285", "0.50438285", "0.5042195", "0.5009421", "0.49935144", "0.49843258", "0.497937", "0.4975112", "0.49591863", "0.494696", "0.49307767", "0.49242383", "0.49240685", "0.49220306", "0.49203098", "0.49197918", "0.49160528", "0.49059266", "0.48964542", "0.48835778", "0.48758256", "0.48727676", "0.48685533", "0.4859983", "0.48415542", "0.48312953", "0.4830182", "0.48281142", "0.48218948", "0.4820205", "0.48100084", "0.48089182", "0.4804637", "0.4798972", "0.4792505", "0.4787241", "0.47835445", "0.47835445", "0.4782086", "0.47812054", "0.4776202", "0.47725376", "0.47697678", "0.4768538", "0.476558", "0.47610304", "0.47505075", "0.47461382", "0.47427723", "0.4741472", "0.47338444", "0.47310394", "0.47309485", "0.47202218", "0.47123644", "0.470218", "0.470186", "0.46861392", "0.46809348", "0.46804678", "0.46740428", "0.4671791", "0.4671572", "0.4657604" ]
0.0
-1
Get the length of the featurevectors of each local feature if they are constant. This value is used as instantiate new local features in the case that the local feature has a constructor that takes a single integer.
public int vecLength();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFeatureCount() {\n\r\n\t\treturn _features.length;\r\n\t}", "public int numberOfFeatures(){\n\t\treturn indexByFeature.keySet().size();\n\t}", "int sizeOfFeatureArray();", "int sizeOfFeatureArray();", "public int numFeatures() {\n return FTypes.values().length;\n }", "public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$6);\r\n }\r\n }", "public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$6);\r\n }\r\n }", "int getFeaturesCount();", "public int getFeaturesCount();", "public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$14);\r\n }\r\n }", "public int getFeaturesSize();", "public int size(Feature f){\n\t\treturn featureIndex(f).size();\n\t}", "int getFeatureCount();", "public int getNumberOfFeatures() {\n\t\treturn numberOfFeatures;\n\t}", "int sizeOfPlanFeatureArray();", "public int size() {\n return mFeatureStructures.size();\n }", "public int getNumberOfFeatures() {\n return features.size() - 1; // because slot 0 is skipped\n }", "public int get_feature_dimension() {\n\t\treturn nFeatures;\n\t}", "int countFeatures();", "int countFeatures();", "long getFeaturesUsed();", "public static int fullSize(Object... features) {\n if (features == null) {\n return 0;\n }\n int size = 0;\n for (Object feature: features) {\n if (feature instanceof Object[]) {\n size += ((Object[]) feature).length;\n } else if (feature instanceof Collection) {\n size += ((Collection<?>) feature).size();\n } else {\n size++;\n }\n }\n return size;\n }", "org.tensorflow.example.VarLenFeatureProto getVarLenFeature();", "int countTypedFeatures();", "public int featureDimension() {\n assert featureDimension > 0;\n return featureDimension;\n }", "public int getClientFeaturesCount() {\n return clientFeatures_.size();\n }", "public int maxLocals();", "public int getFeaturesSize(int chromosome);", "public int getClientFeaturesCount() {\n return clientFeatures_.size();\n }", "public int getConstantCount() {\r\n return EnthalpyVapour.CONSTANT_COUNT;\r\n }", "org.tensorflow.example.VarLenFeatureProtoOrBuilder getVarLenFeatureOrBuilder();", "final int threadLocalCapacity()\r\n/* 149: */ {\r\n/* 150:178 */ return ((Stack)this.threadLocal.get()).elements.length;\r\n/* 151: */ }", "public int length() {\n return this.weightMatrix.length;\n }", "public int getLocalSize();", "public double getFeatureSize() {\n\t\t\treturn featureDensity.length;\n\t\t}", "public int getCellsUniverseSize(){\r\n return cellsUniverse.size();\r\n }", "public int getNumInstances() {\n return this.train_values.get(0).length;\n }", "int getGeoTargetConstantsCount();", "int getVarsCount();", "org.tensorflow.example.FixedLenFeatureProto getFixedLenFeature();", "int sizeOfClassificationArray();", "public int getNumVars()\n {\n \treturn numVars;\n }", "public final int getNumCtxts(){\n return I.length;\n }", "@Override\n\tpublic int size()\n\t{\n\t\tint count = 0;\n\t\tfor (Variable var : FactorGraphIterables.variables(rootGraph()))\n\t\t{\n\t\t\tif (var.getPrior() != null)\n\t\t\t{\n\t\t\t\t++count;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "int getLocalSize();", "@Override\n\tpublic int size() {\n\t\treturn this.vector.size();\n\t}", "public int getNumLocalTransactions()\n {\n return tx2gtxMap.size();\n }", "public synchronized int size() {\n return\n this.oPreprocessingParams.size() +\n this.oFeatureExtractionParams.size() +\n this.oClassificationParams.size();\n }", "public int numNodes() {\n return nodeVector.size();\n }", "public int length() {\n return myFormals.size();\n }", "private int getNumberOfInputFeatures(final Collection<TrainingEntry<Login>> trainingDataSet) {\n return trainingDataSet.iterator().next().getEntity().getKeystrokeTimestamps().size();\n }", "public interface SpLocalFeatureList <T extends SpLocalFeature<?, ?>> extends SpRandomisableList<T>, Writeable {\n\n /** The header used when writing LocalFeatureLists to streams and files */\n public static final byte[] BINARY_HEADER = \"KPT\".getBytes();\n\n /**\n * Get the feature-vector data of the list as a two-dimensional array of\n * data. The number of rows will equal the number of features in the list,\n * and the type &lt;Q&gt;must be compatible with the data type of the features\n * themselves.\n *\n * @param <Q>\n * the data type\n * @param a\n * the array to fill\n * @return the array, filled with the feature-vector data.\n */\n public <Q> Q[] asDataArray(Q[] a);\n\n /**\n * Get the length of the feature-vectors of each local feature if they are\n * constant.\n *\n * This value is used as instantiate new local features in the case that the\n * local feature has a constructor that takes a single integer.\n *\n * @return the feature-vector length\n */\n public int vecLength();\n\n @Override\n public SpLocalFeatureList<T> subList(int fromIndex, int toIndex);\n\n}", "private int num_class_vars(ClassInfo cinfo) {\n\n RootInfo class_root = RootInfo.getClassPpt(cinfo, Runtime.nesting_depth);\n assert class_root.children.size() == 1;\n DaikonVariableInfo static_root = class_root.children.get(0);\n return static_root.children.size();\n }", "public int numWorlds(){\n return worlds.size();\n }", "final int threadLocalSize()\r\n/* 154: */ {\r\n/* 155:182 */ return ((Stack)this.threadLocal.get()).size;\r\n/* 156: */ }", "public void clearFeatures() {\n localFeatureVector.clear();\n }", "public int getInputTensorCount() {\n checkNotClosed();\n return wrapper.getInputTensorCount();\n }", "public int currentTemporaryScopeDepth(){\n if(temporaryConstants == null) return 0;\n return temporaryConstants.size();\n }", "@FameProperty(name = \"numberOfLocalAccesses\", derived = true)\n public Number getNumberOfLocalAccesses() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }", "public abstract void generateFeatureVector(Factor<Scope> f);", "Vector getSize();", "int getPartitionLagsCount();", "public int getProcessedCount()\r\n {\r\n return myFeatureCount;\r\n }", "org.tensorflow.example.FixedLenFeatureProtoOrBuilder getFixedLenFeatureOrBuilder();", "public int size() {\n\n return this.solutionVector.length;\n }", "public int getSize(){\n //To be written by student\n return localSize;\n }", "public int getNumberOfMemberVariables() {\n return members.size();\n }", "public com.flexnet.opsembedded.webservices.NumberQueryType getFeatureCount() {\n return featureCount;\n }", "public int localEdgeNum() {\r\n return localEdgeCount;\r\n }", "public static int numElements() {\n return values().length;\n }", "public abstract int nVars();", "int sizeOfRoadsideArray();", "public int getLayerCount() {\n\t\treturn layers.length;\n\t}", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "public double numTerms()\r\n\t{\r\n\t\treturn unionAll.size();\r\n\t}", "int getBlockLocationsCount();", "public int sizeOfMappingFieldsArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MAPPINGFIELDS$28);\n }\n }", "public int obtenerNumeroFilas() {\n\t\treturn matriz.size();\n\t}", "public int size(){\n\t\treturn labels==null ? 0 : labels.size();\n\t}", "public long getAllContextNodeCount();", "public int size() {\n\t\treturn trainlist.size();\n\t}", "public int getNumClusters() {\n return clusters.size();\n }", "public int get_var_count()\r\n {\r\n\r\n int retVal = get_var_count_0(nativeObj);\r\n\r\n return retVal;\r\n }", "public int LengthTab(NodesVector nvector) {\n\t\tint L = 0;\n\t\tNodes nodes;\n\n\t\tfor (int i = 1; i < nvector.size(); i++) {\n\t\t\tnodes = (Nodes) nvector.elementAt(i);\n\t\t\tL = (L + nodes.path.size()) - 1;\n\t\t}\n\n\t\treturn (((L + NbPipes) * NbDiam) + NbNodes) - 1 + (NbDiam * NbPipes);\n\t}", "int getIndicesCount();", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public int kernelSize();", "public long dimCount()\n\t{\n\t\treturn (long)multimemory.dims.length;\n\t}", "public int getNumElements() {\n return mat.getNumCols()*mat.getNumRows();\n }", "int getDimensionsCount();", "public int getVcCount() {\n return vc_.size();\n }", "public long getNumDefinedData();", "int sizeOfLanesArray();", "int getMapEntrySize() {\n if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {\n return 1;\n }\n if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME && frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {\n return 1 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {\n return 3 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX || frameType == Const.SAME_FRAME_EXTENDED) {\n return 3;\n }\n if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {\n int len = 3;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n return len;\n }\n if (frameType != Const.FULL_FRAME) {\n throw new IllegalStateException(\"Invalid StackMap frameType: \" + frameType);\n }\n int len = 7;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n for (final StackMapType typesOfStackItem : typesOfStackItems) {\n len += typesOfStackItem.hasIndex() ? 3 : 1;\n }\n return len;\n }", "public int getNrOfVariables(){\n\t\treturn sqlVariables.length;\n\t}", "int sizeOfRelatedArray();", "public int getNumElements() {\n return theMap.size();\n }", "public int dimensionCount() {\n\t\treturn point.length;\n\t}", "@Override\n public int variableSize() {\n return CONSTANT.wordSize;\n }", "@Override\n\tpublic int getWeathersCount() {\n\t\treturn _weatherLocalService.getWeathersCount();\n\t}" ]
[ "0.65675867", "0.65665287", "0.641473", "0.641473", "0.6380505", "0.6371834", "0.6371834", "0.631913", "0.6293116", "0.6282878", "0.61860514", "0.6178738", "0.5995096", "0.5972761", "0.5969362", "0.59286743", "0.5819336", "0.5795524", "0.57403606", "0.57403606", "0.5692697", "0.562324", "0.5577272", "0.55670315", "0.54795015", "0.54699105", "0.5468091", "0.54593974", "0.5443496", "0.5432978", "0.5323177", "0.5291138", "0.529025", "0.52732545", "0.52399886", "0.52202445", "0.5211525", "0.5200781", "0.51852924", "0.51415807", "0.51407695", "0.5129585", "0.51203746", "0.5108708", "0.509814", "0.50854284", "0.5084006", "0.507404", "0.5067553", "0.5049326", "0.5040896", "0.5034657", "0.50026333", "0.49891925", "0.49888498", "0.49770343", "0.49682498", "0.4966329", "0.49609455", "0.49595985", "0.4953394", "0.49507987", "0.49472415", "0.49394497", "0.4919287", "0.49150145", "0.49134135", "0.4904653", "0.49042878", "0.48925403", "0.4892446", "0.48884284", "0.4886997", "0.48541692", "0.48539478", "0.4850728", "0.4846374", "0.48459902", "0.48425347", "0.48381588", "0.48331895", "0.48330432", "0.48295426", "0.4827155", "0.48263654", "0.4824546", "0.48243588", "0.4816252", "0.48133945", "0.48117498", "0.48000538", "0.47994804", "0.47969815", "0.47908154", "0.47884232", "0.47788718", "0.4776344", "0.47743437", "0.4773027", "0.47714034" ]
0.59017485
16
Ponto medio entre 2 vetores
public float dot(Vector3 other){ return r * other.r + g * other.g + b * other.b; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic float chekearDatos(){\r\n\t\t\r\n\t\tfloat monto = 0f;\r\n\t\tfloat montoPorMes = creditoSolicitado/plazoEnMeses;\r\n\t\tdouble porcentajeDeSusIngesosMensuales = (cliente.getIngresosMensuales()*0.7);\r\n\t\t\r\n\t\tif(cliente.getIngresoAnual()>=15000f && montoPorMes<=porcentajeDeSusIngesosMensuales){\r\n\t\t\t\r\n\t\t\tmonto = this.creditoSolicitado;\r\n\t\t\tsetEstadoDeSolicitud(true);\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\treturn monto;\r\n\t}", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public int getDineroRecaudadoPorMaquina1()\n {\n return maquina1.getTotal();\n }", "public String mostrarVentas() {\n String ventas = \"\";\n for (int i = 0; i < posicionActual; i++) { //Recorre el vector hasra la poscion actual, y almacena toda la informacion de estos en una variable String la cual se retornara \n ventas += mostrarCliente(i);\n }\n return ventas;\n }", "public static void getMejorbeneficios(ArrayList<BeneficiosCovid19> lista1, ArrayList<BeneficiosCovid19> lista2){\n\n // obetjo de la clase BeneficiosCovid19 para almacenar los datos mayores\n BeneficiosCovid19 beneficiosMayores = new BeneficiosCovid19();\n\n //Variable para implementar el Wrapper del objeto tipo Float\n float valor = 0;\n\n //Almacenamos valor = 0\n beneficiosMayores.setValorSubsidio(valor);\n\n // Ciclo para obtener el subsidio mayor\n for (int i = 0;i< lista1.size();i++) {\n BeneficiosCovid19 auxiliarCovid = lista1.get(i);\n\n if (auxiliarCovid.getValorSubsidio() > beneficiosMayores.getValorSubsidio()){\n beneficiosMayores = auxiliarCovid;\n }\n }\n\n // Ciclo para obtener el ID mayor\n for (int i = 0;i< lista2.size();i++) {\n BeneficiosCovid19 auxiliarCovid2 = lista2.get(i);\n if (auxiliarCovid2.getValorSubsidio() > beneficiosMayores.getValorSubsidio()){\n beneficiosMayores = auxiliarCovid2;\n }\n }\n\n // Mostra resultado de las busquedas\n System.out.println(\"El id del subsidio mayor es: \" + beneficiosMayores.getId());\n System.out.println(\"El nombre subsidio mayor es: \" + beneficiosMayores.getNombre());\n System.out.println(\"El valor subsidio mayor es: \" + beneficiosMayores.getValorSubsidio());\n\n }", "private static double Optimo(double valor1, double valor2, String metodo) {\n if (metodo.equals(\"Min\")) {\n return Math.min(valor1, valor2);\n } else {\n return Math.max(valor1, valor2);\n }\n }", "@Override public int conocerMonto(){\n\treturn 120;\n }", "public Rettangolo(Punto p1, Punto p2) {\r\n // pre: p1!=null && p2!=null\r\n this.vbs = p1;\r\n this.vad = p2;\r\n }", "public void decida(){\n int vecinasVivas=vecinos();\n if(vecinasVivas==3 && estadoActual=='m'){\n estadoSiguiente='v';\n }else if((estadoActual=='v' && vecinasVivas==2) || (estadoActual=='v' && vecinasVivas==3)){\n estadoSiguiente='v';\n }else if(vecinasVivas<2 || vecinasVivas>3){\n estadoSiguiente='m';\n }\n }", "public List<List<Vertice<T>>> caminos(Vertice<T> v1,Vertice<T> v2) {\n\t\t\n \tList<List<Vertice<T>>>salida = new ArrayList<List<Vertice<T>>>();\n \tList<Vertice<T>> marcados = new ArrayList<Vertice<T>>();\n \tmarcados.add(v1);\n return buscarCaminosAux(v1,v2,marcados,salida);\n \n\n }", "public double getMontoDescuento(){\n return localMontoDescuento;\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public int getTotalRecaudado()\n {\n return maquina1.getTotal() + maquina2.getTotal();\n }", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "public void mostraDados() {\n System.out.println(\"O canal atual é: \" + tv.getCanal());\n System.out.println(\"O volume atual é: \" + tv.getVolume());\n System.out.println(\"--------------------------------------\");\n }", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public void prinRecaudacion()\n {\n System.out.println(\"La cantidad recaudada por la maquina1 es \" + maquina1.getTotal());\n System.out.println(\"La cantidad recaudada por la maquina2 es \" + maquina2.getTotal());\n System.out.println(\"La cantidad total es\" + ( maquina1.getTotal() + maquina2.getTotal()));\n}", "public double getMontoSolicitado(){\n return localMontoSolicitado;\n }", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "double getPerimetro(){\n return 2 * 3.14 * raggio;\n }", "protected String elaboraIncipitSpecifico() {\n return VUOTA;\n }", "public int getDado2() {\n return dado2;\n }", "public void dividirDineroGobierno() {\n\n double dineroDividible = super.getMundo().getGobierno().getCapitalEconomico() / 2;\n double dineroPorPersona = super.getMundo().contarPersonas();\n\n if (dineroDividible > 0) {\n\n super.getMundo().gobiernoDarDinero(dineroDividible);\n\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaDoctores())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaAlbaniles())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaHerreros())\n p.ganarDinero(dineroPorPersona);\n for (Persona p : super.getMundo().getListaCocineros())\n p.ganarDinero(dineroPorPersona);\n }\n }", "float getMonatl_kosten();", "@Override\n public void imprimir() {\n System.out.println(\"Vehiculos ordenados por precio mayor a menor:\");\n if(a1.precio>a2.precio && a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m1.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m2.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\"\"+m2.modelo);\n if(m1.precio >a2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n }else{\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(a2.precio>a1.precio && a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }else{\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(m1.precio>a2.precio && m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a2.precio >a1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >a1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n }else{ \n if(m2.precio>a2.precio && m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a2.precio >a1.precio && a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m1.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n } \n \n }\n\n }\n }\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "public static int getVelocidade() {\n return velocidade;\n }", "public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\n }", "double getMonto();", "double getMonto();", "private static int zamijeniDvijeKarte(int[] spil) {\n\t\tint prva =randomKarta (spil);\n\t\tint druga = randomKarta (spil);\n\t\tzamijeni (spil, prva, druga);\n\t\t\n\t\treturn spil, prva, druga;\n\t}", "public void consultaDinero(){\r\n System.out.println(this.getMonto());\r\n }", "void MontaValores(){\r\n // 0;0;-23,3154166666667;-51,1447783333333;0 // Extrai os valores e coloca no objetos\r\n // Dis;Dir;Lat;Long;Velocidade\r\n // Quebra de Rota lat=-999.999 long=-999.999 ==> Marca ...\r\n \r\n int ind=0;\r\n NMEAS=NMEA.replace(\",\" , \".\");\r\n \r\n //1)\r\n dists=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind));\r\n Distancia=Double.valueOf(dists);\r\n ind=ind+dists.length()+1;\r\n \r\n //2)\r\n dirs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Direcao=Double.valueOf(dirs);\r\n ind=ind+dirs.length()+1;\r\n \r\n //3)\r\n lats=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Lat=Double.valueOf(lats);\r\n ind=ind+lats.length()+1;\r\n \r\n //4)\r\n longs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Long=Double.valueOf(longs);\r\n ind=ind+longs.length()+1;\r\n \r\n //5)\r\n vels=NMEAS.substring(ind,NMEAS.length());\r\n // Transforma de Knots para Km/h\r\n Velocidade=Double.valueOf(vels)/100*1.15152*1.60934;\r\n vels=String.valueOf(Velocidade);\r\n ind=ind+vels.length()+1;\r\n \r\n }", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "public EstacionDeTren(String nombreCiudad,int precioMaquina1,int precioMaquina2)\n {\n ciudad = nombreCiudad;\n maquina1 = new TicketMachine(precioMaquina1);\n maquina2 = new TicketMachine(precioMaquina2);\n }", "public double getMontoEstimado(){\n return localMontoEstimado;\n }", "public int getPesoV() \r\n\t\t{\r\n\t\t\treturn PesoV;\r\n\t\t}", "public int getVelocidadBala() {\n return velocidadBala;\n }", "double getDiametro(){\n return raggio * 2;\n }", "private void balancearAgrega(Vertice<T> v){\n\tif(v == this.raiz){\n\t v.color = Color.NEGRO;\n\t return;\n\t}else if(v.padre.getColor() == Color.NEGRO){\n\t return;\n\t}\n\tVertice<T> abuelo = v.padre.padre;\n\tif(v.padre == abuelo.derecho){\n\t if(abuelo.izquierdo != null &&\n\t abuelo.izquierdo.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.izquierdo.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\t \n\t }else if(v.padre.izquierdo == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraDerecha(v.padre);\n\t\tbalancearAgrega(v2); \n\t }else if(v.padre.derecho == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraIzquierda(abuelo);\n\t }\n\t}else if(v.padre == abuelo.izquierdo){\n\t if(abuelo.derecho != null &&\n\t abuelo.derecho.getColor() == Color.ROJO){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.derecho.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tbalancearAgrega(abuelo);\n\t\treturn;\n\t }else if(v.padre.derecho == v){\n\t\tVertice<T> v2 = v.padre;\n\t\tsuper.giraIzquierda(v.padre);\n\t\tbalancearAgrega(v2); \n\t \n\t }else if(v.padre.izquierdo == v){\n\t\tv.padre.color = Color.NEGRO;\n\t\tabuelo.color = Color.ROJO;\n\t\tsuper.giraDerecha(abuelo);\n\t }\n\t} \t\n\t\n }", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "public double darVelocidadMedia( )\n {\n return velocidadOrbitalMedia;\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public double getMontoPedidoRechazado(){\n return localMontoPedidoRechazado;\n }", "public String getPassageiro2() {\r\n\r\n if (passageiro == null) {\r\n return \"Poltrona Vazia\";\r\n } else {\r\n return passageiro.getNome();\r\n }\r\n }", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public int getminutoStamina(){\n return tiempoReal;\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "public int getIngresosPorVentas(){\n return this.ingresosPorVentas;\n }", "public double getMontoFacturado(){\n return localMontoFacturado;\n }", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "private void cazaFantasma(Vertice<T> v){\n\tif(v.padre == null){\n\t if(v == this.raiz){\n\t\tthis.raiz = null;\n\t\treturn;\n\t }\n\t return;\n\t}else{\n\t Vertice<T> padre = v.padre;\n\t if(v == padre.izquierdo){\n\t\tif(v.hayIzquierdo()){\n\t\t padre.izquierdo = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.izquierdo = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.izquierdo = null;\n\t\t}\t\t\n\t }else{\n\t\tif(v.hayIzquierdo()){\n\t\t padre.derecho = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.derecho = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.derecho = null;\n\t\t}\n\t }\n\t}\n }", "public PuntoDeVenta getPuntoDeVenta()\r\n/* 140: */ {\r\n/* 141:162 */ return this.puntoDeVenta;\r\n/* 142: */ }", "public double getMontoCatalogoEstimado(){\n return localMontoCatalogoEstimado;\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "public double getMontoFacturadoSinDescuento(){\n return localMontoFacturadoSinDescuento;\n }", "public void suma(View v){\n presenter.Operacion(main_number_one.getText().toString(),main_number_two.getText().toString(),1);\n }", "public int promedio() {\r\n // calculo y redondeo del promedio\r\n promedio = Math.round(nota1B+nota2B);\r\n // paso de Double a Int\r\n return (int) promedio;\r\n }", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "@Override\n public void calcularIntGanado() {\n intGanado = saldo;\n for(int i = 0; i < plazoInv; i++){\n intGanado += inve * 12;\n intGanado += intGanado * (intAnual / 100);\n }\n intGanado = intGanado - (inve + saldo);\n }", "private void setPrecioVentaBaterias() throws Exception {\n\t\tRegisterDomain rr = RegisterDomain.getInstance();\n\t\tlong idListaPrecio = this.selectedDetalle.getListaPrecio().getId();\n\t\tString codArticulo = this.selectedDetalle.getArticulo().getCodigoInterno();\t\t\n\t\tArticuloListaPrecioDetalle lista = rr.getListaPrecioDetalle(idListaPrecio, codArticulo);\n\t\tString formula = this.selectedDetalle.getListaPrecio().getFormula();\n\t\tif (lista != null && formula == null) {\n\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? lista.getPrecioGs_contado() : lista.getPrecioGs_credito());\n\t\t} else {\n\t\t\tdouble costo = this.selectedDetalle.getArticulo().getCostoGs();\n\t\t\tint margen = this.selectedDetalle.getListaPrecio().getMargen();\n\t\t\tdouble precio = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\n\t\t\t// formula lista precio mayorista..\n\t\t\tif (idListaPrecio == 2 && formula != null) {\n\t\t\t\tArticuloListaPrecio distribuidor = (ArticuloListaPrecio) rr.getObject(ArticuloListaPrecio.class.getName(), 1);\n\t\t\t\tArticuloListaPrecioDetalle precioDet = rr.getListaPrecioDetalle(distribuidor.getId(), codArticulo);\n\t\t\t\tif (precioDet != null) {\n\t\t\t\t\tdouble cont = precioDet.getPrecioGs_contado();\n\t\t\t\t\tdouble cred = precioDet.getPrecioGs_credito();\n\t\t\t\t\tdouble formulaCont = cont + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_contado(), 10);\n\t\t\t\t\tdouble formulaCred = cred + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_credito(), 10);\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? formulaCont : formulaCred);\n\t\t\t\t} else {\n\t\t\t\t\tmargen = distribuidor.getMargen();\n\t\t\t\t\tdouble precioGs = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\t\tdouble formula_ = precioGs + Utiles.obtenerValorDelPorcentaje(precioGs, 10);\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(formula_);\n\t\t\t\t}\n\n\t\t\t// formula lista precio minorista..\n\t\t\t} else if (idListaPrecio == 3 && formula != null) {\n\t\t\t\tArticuloListaPrecio distribuidor = (ArticuloListaPrecio) rr.getObject(ArticuloListaPrecio.class.getName(), 1);\n\t\t\t\tArticuloListaPrecioDetalle precioDet = rr.getListaPrecioDetalle(distribuidor.getId(), codArticulo);\n\t\t\t\tif (precioDet != null) {\n\t\t\t\t\tdouble cont = precioDet.getPrecioGs_contado() + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_contado(), 10);\n\t\t\t\t\tdouble cred = precioDet.getPrecioGs_credito() + Utiles.obtenerValorDelPorcentaje(precioDet.getPrecioGs_credito(), 10);\n\t\t\t\t\tdouble formulaCont = (cont * 1.15) / 0.8;\n\t\t\t\t\tdouble formulaCred = (cred * 1.15) / 0.8;\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(this.selectedCondicion.isCondicionContado()? formulaCont : formulaCred);\n\t\t\t\t} else {\n\t\t\t\t\tmargen = distribuidor.getMargen();\n\t\t\t\t\tdouble precioGs = ControlArticuloCosto.getPrecioVenta(costo, margen);\n\t\t\t\t\tdouble formula_ = ((precioGs + Utiles.obtenerValorDelPorcentaje(precioGs, 10)) * 1.15) / 0.8;\n\t\t\t\t\tthis.selectedDetalle.setPrecioGs(formula_);\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.selectedDetalle.setPrecioGs(precio);\n\t\t\t}\t\t\n\t\t}\n\t}", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "@Override\n\tpublic String getInformeVendedor() {\n\t\treturn \"Informe trimestre 3\";\n\t}", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public Arbre delMotVide(){\n\t\tgauche = gauche.delMotVide();\n\t\tdroit = droit.delMotVide();\n\t\tif(gauche.symbole == '0' && droit.symbole == '0') return new Feuille('0');\n\t\tif(gauche.symbole == '0') return droit;\n\t\tif(droit.symbole == '0') return gauche;\n\t\treturn this;\n\t}", "public void Millas_M(){\r\n System.out.println(\"Cálcular Metros o Kilometros de Millas Marinas\");\r\n System.out.println(\"Ingrese un valor en Millas Marinas\");\r\n cadena =numero.next(); \r\n valor = metodo.Doble(cadena);\r\n valor = metodo.NegativoD(valor);\r\n totalM = valor * 1852 ;\r\n Millas_KM(totalM);\r\n }", "public String getVigencia() { return this.vigencia; }", "public void getVentasdeUNMes(int m) {\r\n double vMes[] = new double[nv];\r\n int i;\r\n for (i = 0; i < nv; i++) {\r\n vMes[i] = ventas[i][m];\r\n }\r\n getMostrarVec(vMes);\r\n }", "public String estadisticasProductosMasVendidosRangoFechas(String fecha1, String fecha2) {\n \n fecha1 = Utils.ddMMyyyyToyyyyMMddDate(fecha1);\n fecha2 = Utils.ddMMyyyyToyyyyMMddDate(fecha2);\n \n String html = \"\";\n DefaultTableModel dtm = producto.estadisticaTopProductosMasVendidosRangoFechas(fecha1, fecha2);\n html = Utils.dibujarGraficasHTMLDonut(dtm, \n \"PRODUCTOS MAS VENDIDOS ENTRE EL \" + fecha1 + \" Y EL \" + fecha2);\n return html;\n }", "private Vertice<T> getHermano(Vertice<T> v){\n\tif(v.padre == null)\n\t return null;\n\tif(v.padre.derecho == v){\n\t if(v.padre.izquierdo == null)\n\t\treturn null;\n\t else\n\t\treturn v.padre.izquierdo;\n\t}else{\n\t if(v.padre.derecho == null)\n\t\treturn null;\n\t else\n\t\treturn v.padre.derecho;\n\t}\n }", "public void setMontoDescuento(double param){\n \n this.localMontoDescuento=param;\n \n\n }", "public double adicao (double numero1, double numero2){\n\t}", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "public float calcularPerimetro(){\n return baseMayor+baseMenor+(medidaLado*2);\n }", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private Vector coordinateSummer(Vector first, Vector second) {\n Vector tmp = new Vector();\n tmp.setX(first.getX() + second.getX());\n tmp.setY(first.getY() + second.getY());\n tmp.setZ(first.getZ() + second.getZ());\n return tmp;\n }", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public void obterDados() {\r\n\r\n\t\tidade = Integer.parseInt(JOptionPane.showInputDialog(\"Informe a idade\"));\r\n\t\taltura = Double.parseDouble(JOptionPane.showInputDialog(\"Informe a altura\"));\r\n\t\tpeso = Double.parseDouble(JOptionPane.showInputDialog(\"Informe o peso\"));\r\n\t\t\r\n\t\tjogCadastrados ++;\r\n totalaltura += altura;\r\n\r\n\t}", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "static void viteza(int d, int h, int m, int s) {\n double secunde = s+60*m+3600*h;\n double minute = secunde/60;\n double ore = minute/60;\n\n double vitezaMPS = d/secunde;\n double vitezaKPH = d/1000.0/ore;\n double vitezaMPH = d/1609.0/ore;\n\n System.out.println(\"metri/secunda: \" + vitezaMPS);\n System.out.println(\"kilometri/ora: \" + vitezaKPH);\n System.out.println(\"mile/ora: \" + vitezaMPH);\n }", "public void codigo(String cadena, String codigo,int codigos,Reserva2 reserva,JDateChooser dateFechaIda,JDateChooser dateFechaVuelta,JTextField DineroFaltante) {\n\t\tcadena=codigo.split(\",\")[1];\n\t\tubicacion=codigo.split(\",\")[5];\n\t\tnombre=codigo.split(\",\")[3];\n\t\tprecio=codigo.split(\",\")[8];\n\t\tcodigos=Integer.parseInt(cadena);\n\t\tSystem.out.println(\"hola\");\n\t\tSystem.out.println(Modelo1.contador);\n\t\t\n\t\tif(Modelo1.contador==1) {\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigohotel(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==2) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigocasa(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigocasa());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==3) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigoapatamento(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigoapatamento());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t}\n\t\t\n\t}", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "@Override\n public double perimetro() {\n return 4 * this.lado;\n }", "private double compararOrientacion(Map<String, Object> anuncio1, Map<String , Object> anuncio2){\n\n Integer idOrientacion1 = anuncio1.containsKey(\"Id Orientacion\") ? ((Double) anuncio1.get(\"Id Orientacion\")).intValue() : null;\n Integer idOrientacion2 = anuncio2.containsKey(\"Id Orientacion\") ? ((Double) anuncio2.get(\"Id Orientacion\")).intValue() : null;\n\n double base = 0;\n boolean continuar = true;\n\n if (idOrientacion1 == null || idOrientacion2 == null){\n base = 1;\n continuar = false;\n }\n\n if (idOrientacion1 == idOrientacion2){\n base = 1;\n continuar = false;\n }\n\n if (continuar){\n int diferencia = Math.abs(idOrientacion1 - idOrientacion2);\n\n if (diferencia == 7){\n diferencia = 1;\n }\n\n base = diferencia == 1 ? 0.5 : 0;\n }\n\n return base * Constantes.PESOS_F1.get(\"Orientacion\");\n }", "public String getPuntoEmision()\r\n/* 124: */ {\r\n/* 125:207 */ return this.puntoEmision;\r\n/* 126: */ }", "public void resta(View v){\n presenter.Operacion(main_number_one.getText().toString(),main_number_two.getText().toString(),2);\n }", "public Integer getDistanciaVivienda() {\n return distanciaVivienda;\n }", "static float calculateNewVInOneDimension(float v, float v2, float m, float m2) {\n return ((v * (m - m2) + 2 * m2 * v2) / (m + m2));\n }", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "public Instrucoes2op(){\n\t\tmmm1 = super.BitsModoDeEnderecamento();\t// pega os bits do endereçamento do primeiro operando\n\t\tmmm2 = super.BitsModoDeEnderecamento();\t// pega os bits do endereçamento do segundo operando \n\t\trrr1 = \"\";\n\t\trrr2 = \"\";\t\n\t}", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }" ]
[ "0.62965685", "0.61776745", "0.6161191", "0.60899156", "0.6086627", "0.6051244", "0.59951544", "0.59881616", "0.5976763", "0.58928996", "0.58548987", "0.5847857", "0.58478343", "0.582919", "0.58147347", "0.5812558", "0.580962", "0.5792875", "0.5765219", "0.5761931", "0.5754653", "0.57497835", "0.5749537", "0.57488716", "0.57419074", "0.57268214", "0.5718625", "0.57162845", "0.57159483", "0.5706885", "0.570102", "0.5697154", "0.5684701", "0.5684701", "0.56830776", "0.56792265", "0.5662702", "0.5641561", "0.5637047", "0.56166065", "0.56078947", "0.56026816", "0.5579859", "0.55759907", "0.55551755", "0.5550347", "0.55478895", "0.5545471", "0.55453", "0.5543994", "0.5539272", "0.5538219", "0.5515953", "0.55152833", "0.55124885", "0.5511836", "0.55096185", "0.5508407", "0.5501212", "0.5496712", "0.5496623", "0.5494082", "0.54921806", "0.54881275", "0.5481413", "0.5480805", "0.5479996", "0.5475923", "0.5473553", "0.5454792", "0.54547405", "0.54528785", "0.5450498", "0.54498386", "0.5442207", "0.5435523", "0.54342103", "0.54314053", "0.5423076", "0.54227144", "0.54196703", "0.5411919", "0.5411916", "0.5410796", "0.5406295", "0.5399979", "0.53979397", "0.53917265", "0.538863", "0.53872365", "0.5384894", "0.5384339", "0.5383093", "0.5382328", "0.53814095", "0.53766024", "0.5376268", "0.5373284", "0.5371331", "0.5365224", "0.5355381" ]
0.0
-1
Handles a request to start the Loader.
@Override protected void onStartLoading() { if (lecturers != null) { // If we currently have a result available, deliver it // immediately. deliverResult(lecturers); } if (takeContentChanged() || lecturers == null) { // If the data has changed since the last time it was loaded // or is not currently available, start a load. forceLoad(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startLoader(){\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<Cursor> movieLoader = loaderManager.getLoader(MOVIE_LOADER);\n if(movieLoader == null)\n loaderManager.initLoader(MOVIE_LOADER, null, this);\n else\n loaderManager.restartLoader(MOVIE_LOADER, null, this);\n }", "@Override\n\tprotected void onStartLoading() {\n\t\tif (mData != null) {\n\t\t\tdeliverResult(mData);\n\t\t}\n\t\t// Now we're in start state so we need to monitor for data changes.\n\t\t// To do that we start to observer the data\n\t\t// Register for changes which is Loader dependent\n\t\tregisterObserver();\n\t\t// Now if we're in the started state and content is changes we have\n\t\t// a flag that we can check with the method takeContentChanged()\n\t\t// and force the load\t\t\t\t\t\n\t\tif (takeContentChanged() || mData == null) {\n\t\t\tforceLoad();\n\t\t}\n\t}", "private void initiateLoader() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = null;\n if (connMgr != null) {\n networkInfo = connMgr.getActiveNetworkInfo();\n }\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n avi.show();\n loadingIndicator.setVisibility(View.VISIBLE);\n errorContainer.setVisibility(View.GONE);\n LoaderManager loaderManager = getSupportLoaderManager();\n String url = BASE_URL + \"&from=\" + fromDate;\n url += \"&to=\" + toDate;\n url += \"&page=\" + currentPageNo;\n url += \"&sortBy=\" + sortPreference;\n if (queryText != null) {\n url += \"&q=\" + queryText;\n }\n\n Bundle args = new Bundle();\n args.putString(URL_KEY, url);\n if (forceLoad) {\n loaderManager.restartLoader(LAST_LOADER_ID, args, this);\n forceLoad = false;\n } else {\n LAST_LOADER_ID = NEWS_LOADER_ID;\n }\n if (!loaderInitiated) {\n loaderManager.initLoader(NEWS_LOADER_ID, args, this);\n loaderInitiated = true;\n } else {\n loaderManager.restartLoader(NEWS_LOADER_ID, args, this);\n }\n } else {\n avi.hide();\n loadingIndicator.setVisibility(View.GONE);\n ((TextView) errorContainer.findViewById(R.id.tvErrorDesc)).setText(R.string.no_conn_error_message);\n errorContainer.setVisibility(View.VISIBLE);\n }\n }", "void load(Request req);", "private void startCusorLoader() {\n\n if (getLoaderManager().getLoader(CURSOR_LOADER_ID) == null) {\n getLoaderManager().initLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n } else {\n getLoaderManager().restartLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n }\n\n }", "@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }", "@Override\n\tpublic void onRequestStart(String reqId) {\n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void startAsyncLoader() {\n if (CheckInternetConnection.isNetworkAvailable(this)) {\n Log.e(\"connection\", \"connection available\");\n if (getLoaderManager().getLoader(ASYNC_LOADER_ID) == null) {\n getLoaderManager().initLoader(ASYNC_LOADER_ID, null, new UpdateDataInfo()).forceLoad();\n } else {\n getLoaderManager().restartLoader(ASYNC_LOADER_ID, null, new UpdateDataInfo()).forceLoad();\n }\n } else {\n showMessageDialog(getResources().getString(R.string.message), getResources().getString(R.string.no_int), 1);\n }\n }", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "void handleRequest();", "@Override\n\tpublic void startRequest(int taskId) {\n\n\t}", "public void start() {\n \t\tinit();\n\t\tif(!checkBackend()){\n\t\t\tvertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() {\n\t\t\t\tpublic void handle(HttpServerRequest req) {\n\t\t\t\t String query_type = req.path();\t\t\n\t\t\t\t req.response().headers().set(\"Content-Type\", \"text/plain\");\n\t\t\t\t\n\t\t\t\t if(query_type.equals(\"/target\")){\n\t\t\t\t\t String key = req.params().get(\"targetID\");\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequest(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t String key = \"1\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprocessRequestRange(key,req);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}).listen(80);\n\t\t} else {\n\t\t\tSystem.out.println(\"Please make sure that both your DCI are up and running\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void startRequest(int resid) {\n faceRequest.startMainClassify(this, resid, new AbstractRetrofitCallback<MainClassifyBean>() {\n @Override\n public void onSuccess(MainClassifyBean result) {\n Logger.i(TAG, \"startMainClassify\", \"\" + result.toString());\n }\n });\n }", "void onLoaderLoading();", "public void handleRequest(ExtractionRequest request);", "public void execute(DSResponse response, Object rawData, DSRequest request) {\n\t\t\t\tDOM.setInnerHTML(RootPanel.get(\"loading\").getElement(),\"\");\r\n\t\t\t\tDOM.setStyleAttribute(DOM.getElementById(\"loading\"), \"border\", \"0\");\r\n\t\t\t\t//show app\r\n\t\t\t\tDOM.setStyleAttribute(RootPanel.get(\"gwtApp\").getElement(), \"display\", \"block\");\r\n\t\t\t}", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "public void startApiRequest(Request request, RequestManager.RequestListener listener) {\n mRequestManager.execute(request, listener);\n mRequestList.add(request);\n Log.d(TAG, \"startApiRequest(): list size: \" + mRequestList.size());\n }", "@Override\n\tpublic void onStartRequest(HttpRequest request,int requestId) {\n\t\tprogressDialog.show();\n\t}", "public void handleStart()\n {\n }", "public void run() {\n try {\n System.out.println(\"Calling Process\");\n processRequest();\n\n } catch (Exception e) {\n System.out.println(\"Run Exception\" + e);\n }\n\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "public void onStartLoading() {\n Cursor cursor = this.mCursor;\n if (cursor != null) {\n deliverResult(cursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "private void preRequest() {\n\t\tSystem.out.println(\"pre request, i am playing job\");\n\t}", "@Override\n protected void onStartLoading() {\n if (mCursor != null) {\n // Deliver any previously loaded data immediately.\n deliverResult(mCursor);\n }\n if (takeContentChanged() || mCursor == null) {\n // When the observer detects a change, it should call onContentChanged()\n // on the Loader, which will cause the next call to takeContentChanged()\n // to return true. If this is ever the case (or if the current data is\n // null), we force a new load.\n forceLoad();\n }\n }", "private void handleRequest(Request request) throws IOException{\n switch (request){\n case NEXTODD:\n case NEXTEVEN:\n new LocalThread(this, request, nextOddEven).start();\n break;\n case NEXTPRIME:\n case NEXTEVENFIB:\n case NEXTLARGERRAND:\n new NetworkThread(this, userID, serverIPAddress, request).start();\n break;\n default:\n break;\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException ex) {\n Logger.getLogger(loadServices.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void run() {\n handleClientRequest();\n }", "@Override\r\n\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\r\n\t\t}", "public void setLoader(Loader loader)\r\n {\r\n _loader = loader;\r\n }", "@Override\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\n\t\t\t\t\t}", "@Override\n public Loader<Cursor> onCreateLoader(int loaderID, Bundle bundle) {\n\n /*\n * Takes action based on the ID of the Loader that's being created\n */\n switch (loaderID) {\n case OBJETOS_LOADER:\n //Retorna un CursorLoader\n return new CursorLoader(\n this,\n UrisGenerated.getUriAllObjetos(),\n projection,\n selection,\n null,\n null\n );\n\n default:\n //Se le ha pasado una id no valida\n return null;\n }\n }", "void onLoaderFinished();", "@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}", "@Override\n\tpublic void dispatch(Request request) {\n\t\tif(request instanceof ElevatorRequest){\n\t\t\tfor(RequestListener listener: listeners){\n\t\t\t\tlistener.handleRequest((ElevatorRequest)request);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t}", "public void handleRequest(Request req) {\n\n }", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "@SuppressWarnings(\"WeakerAccess\")\n protected void makeRequest() {\n if (mCallback == null) {\n CoreLogger.logError(addLoaderInfo(\"mCallback == null\"));\n return;\n }\n\n synchronized (mWaitLock) {\n mWaitForResponse.set(true);\n }\n\n doProgressSafe(true);\n\n Utils.runInBackground(true, new Runnable() {\n @Override\n public void run() {\n try {\n CoreLogger.log(addLoaderInfo(\"makeRequest\"));\n makeRequest(mCallback);\n }\n catch (Exception exception) {\n CoreLogger.log(addLoaderInfo(\"makeRequest failed\"), exception);\n callbackHelper(false, wrapException(exception));\n }\n }\n });\n }", "public void start() {\n\n String pathFile = mainMenu.menuTakePathFile();\n int countThreads = mainMenu.menuCountThreads();\n int downloadSpeed = mainMenu.menuDownloadSpeed();\n String folderForDownload = mainMenu.menuPathDownload();\n\n List<String> urls = null;\n try {\n urls = bootPreparation.parsingFileForUrls(pathFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n List<String> fileNames = bootPreparation.parsingListUrlsForNames(urls);\n\n multiThreadedDownloader.startDownloading(countThreads, urls.size(), urls, fileNames, downloadSpeed, folderForDownload);\n\n }", "public void requestStart(){\r\n\t\t\r\n\t\tIterator <NavigationObserver> navOb = this.navega.iterator();\r\n\t\twhile ( navOb.hasNext()){\r\n\t\t\tnavOb.next().initNavigationModule(this.navega.getCurrentPlace(), this.direction);\r\n\t\t}\r\n\t\tIterator <RobotEngineObserver> robOb = this.iterator();\r\n\t\twhile (robOb.hasNext()){\r\n\t\t\trobOb.next().robotUpdate(fuel, recycledMaterial);\r\n\t\t}\r\n\t}", "private void startLoading() {\n\t\tJSONObject obj = new JSONObject();\r\n\t\tobj.put(\"userId\", new JSONString(User.id));\r\n\t\tobj.put(\"userSID\", new JSONString(User.SID));\r\n\t\tapi.execute(RequestType.GetUserInfo, obj, this);\r\n\t}", "@Override\n public void onLoadingStarted(String arg0, View arg1) {\n }", "@MainThread\n @Override\n protected void onForceLoad() {\n super.onForceLoad();\n cancelLoadHelper();\n\n makeRequest();\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ManterSelecaoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void sendRequest() {\n\t\tloading = ProgressDialog.show(this, \"Loading\", \"Please wait...\");\n\n\t\tUri.Builder uri = new Uri.Builder();\n\t\turi.authority(DatabaseContract.PROVIDER_NAME);\n\t\turi.path(Integer.toString(Constants.LOADREQUESTSCMD));\n\t\turi.scheme(\"content\");\n\n\t\tIntent intent = new Intent(this, MyService.class);\n\t\tintent.putExtra(\"ACTION\", \"QUERY\");\n\t\tintent.setData(uri.build());\n\n\t\trequestid = new Date().getTime();\n\t\tintent.putExtra(\"requestid\", requestid);\n\t\tstartService(intent);\n\t}", "public JSONObject handleStartJob(Map<String, String> params, String name, \n HttpServletRequest request) {\n try {\n MapReduceXml mrXml = MapReduceXml.getMapReduceXmlFromFile();\n Configuration configuration = mrXml.instantiateConfiguration(name, params);\n // TODO(frew): What should we be doing here for error handling?\n String jobId = handleStart(configuration, name, request);\n JSONObject retValue = new JSONObject();\n try {\n retValue.put(\"mapreduce_id\", jobId);\n } catch (JSONException e) {\n throw new RuntimeException(\"Hard-coded string is null\");\n }\n return retValue;\n } catch (FileNotFoundException e) {\n throw new RuntimeException(\"Couldn't find mapreduce.xml\", e);\n }\n }", "public void onStart(LoadScenarioInfo loadScenarioInfo){\n }", "public void handler(AbstractRequest request) {\n\t\tSystem.out.println(\"===handle1\" + request.getContent());\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n RequestHandler rh = (RequestHandler) controladores.get(request.getServletPath());\n \n \n // Comprobamos si se obtuvo correctamente el manejador\n if (rh == null) {\n // Mostramos el error en caso de no cargarse correctamente\n response.sendError(HttpServletResponse.SC_NOT_FOUND);\n } else {\n \n // Obtenemos la URL resultante de ejecutar el manejador\n String viewUrl = rh.handleRequest(request, response);\n if (viewUrl == null) {\n // Nada\n } else {\n // El RequestHandler correspondiente nos dira que vista utilizar\n request.getRequestDispatcher(viewUrl).forward(request, response);\n }\n }\n }", "@Override\n\tpublic void onLoad() {\n\t\trequestTime++;\n\t\trefreshFromServer(ListViewCompat.LOAD);\n\t}", "@Override\r\n public Loader<Cursor> onCreateLoader(int id, Bundle bundle) {\n String[] projections = {RecipeEntry._ID,\r\n RecipeEntry.COLUMN_RECIPE_NAME,\r\n RecipeEntry.COLUMN_RECIPE_TYPE,\r\n RecipeEntry.COLUMN_RECIPE_SERVINGS,\r\n RecipeEntry.COLUMN_RECIPE_VALUES,\r\n };\r\n\r\n //this code will execute the content provided\r\n return new CursorLoader(this, currentRecipeUri, projections, null, null, null);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CellectionServer.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(CellectionServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void start() {\n\t\tif (path != null) {\n\t\t\tfileNameChain = new ByteArrayOutputStream();\n\t\t\tfileAsynctask doing = new fileAsynctask();\n\t\t\tdoing.execute(getPath());\n\t\t}\n\t}", "public void handleRequest () {\n\t// TODO: move this method to separate thread, \n\t// TODO: it may block in many places.\n\tRequestHandler rh = new RequestHandler ();\t\n\tCache<HttpHeader, HttpHeader> cache = proxy.getCache ();\n\tString method = request.getMethod ();\n\tif (!method.equals (\"GET\") && !method.equals (\"HEAD\"))\n\t cache.remove (request);\n\t\t\n\trh.entry = cache.getEntry (request);\n\tif (rh.entry != null)\n\t rh.dataHook = rh.entry.getDataHook (proxy.getCache ());\n\n\tcheckNoStore (rh.entry);\n\tif (!rh.cond.checkMaxStale (request, rh) && checkMaxAge (rh))\n\t setMayUseCache (false);\n\t\n\trh.conditional = rh.cond.checkConditional (this, request, rh);\n\tif (partialContent (rh)) \n\t fillupContent (rh);\n\tcheckIfRange (rh);\n\n\tboolean mc = getMayCache ();\n\tif (getMayUseCache ()) {\n\t // in cache?\n\t if (rh.entry != null) {\n\t\tCacheChecker cc = new CacheChecker ();\n\t\tif (cc.checkCachedEntry (this, request, rh)) {\n\t\t return;\n\t\t}\n\t }\n\t}\n\t\n\tif (rh.content == null) {\n\t // Ok cache did not have a usable resource, \n\t // so get the resource from the net.\n\t // reset value to one before we thought we could use cache...\n\t mayCache = mc;\n\t SWC swc = new SWC (this, proxy.getOffset (), request, requestBuffer,\n\t\t\t tlh, clientResourceHandler, rh);\n\t swc.establish ();\n\t} else {\n\t resourceEstablished (rh);\n\t}\n }", "@Override\n\t\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t\t}", "void startPage(RequestContextHolder request);", "protected abstract void loader() throws IOException;", "@Override\n protected final void parseRequest(final HttpServletRequest request, HttpServletResponse response) {\n\n parsePath(request);\n\n LOGGER.warning(\"[REST]: \" + request.getMethod() + \"|\" + apiName + \"/\" + resourceName + \"|\" + request.getHeader(\"Current-Page\"));\n\n // Fixes BS-400. This is ugly.\n I18n.getInstance();\n\n api = APIs.get(apiName, resourceName);\n api.setCaller(this);\n\n super.parseRequest(request, response);\n\n }", "public void handleRequest(Request request) {\n\t\tgetCityData(request.getCityName());\n\t\texportToFile(request.getCityName());\n\t}", "protected void onStartLoading() { forceLoad();}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (SQLException ex) {\n Logger.getLogger(loadServices.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n protected int getLoaderId() {\n return 1;\n }", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}", "@Override\n public Loader<List<Movie>> onCreateLoader(final int id, final Bundle args) {\n return new AsyncTaskLoader<List<Movie>>(this) {\n\n @Override\n protected void onStartLoading() {\n // set the progress bar to be visible and proceed with loading\n progressBar.setVisibility(View.VISIBLE);\n forceLoad();\n }\n\n // Method that will perform the actual url http request in another thread\n @Override\n public List<Movie> loadInBackground() {\n\n // obtain the Url, used for the http request\n URL url = AppUtilities.buildUrl(pageNumberBeingQueried, sortOrderOfResults,\n searchQuerySubmitted, preferredMovieGenre, preferredStartYear,\n preferredEndYear, preferenceValuesAreDefault);\n\n // perform the url request\n String jsonResponseString = null;\n try {\n jsonResponseString = AppUtilities.getResponseFromHttpUrl(url);\n } catch (IOException io_exception) {\n io_exception.printStackTrace();\n }\n\n // initialise the return object\n List<Movie> movieList = null;\n\n // if the response String is not null - parse it\n if (jsonResponseString != null) {\n // call helper method to parse JSON\n Pair<List<Movie>, Integer> result = JsonUtilities.extractFromJSONString(jsonResponseString);\n movieList = result.first;\n jsonResponseCode = result.second;\n }\n return movieList;\n }\n\n };\n }", "public void request() {\n }", "public void run() {\n try {\n handler.process( client, map );\n }\n catch ( java.io.IOException ioe ) {\n System.err.println( ioe );\n }\n }", "private void manageLoaders() {\n\n // note: null is used in place of a Bundle object since all additional\n // parameters for Loader are global variables\n\n // get LoaderManager and initialise the loader\n if (getSupportLoaderManager().getLoader(LOADER_ID_01) == null) {\n getSupportLoaderManager().initLoader(LOADER_ID_01, null, this);\n } else {\n getSupportLoaderManager().restartLoader(LOADER_ID_01, null, this);\n }\n }", "@NonNull\n @Override\n public Loader<Cursor> onCreateLoader(int loaderId, @Nullable Bundle loaderArgs) {\n switch (loaderId) {\n\n// If the loader requested is our detail loader, return the appropriate CursorLoader\n case ID_DETAIL_LOADER:\n\n return new CursorLoader(this,\n mUri,\n MAIN_FORECAST_PROJECTION,\n null,\n null,\n null);\n\n default:\n throw new RuntimeException(\"Loader Not Implemented: \" + loaderId);\n }\n }", "public void start(InputStream in, String path);", "public void run()\n {\n Event event = request.getEvent();\n if (logger.isDebugEnabled())\n logger.debug(\"Processing event: \"\n + event.getClass().getSimpleName());\n\n EventStatus status = null;\n try\n {\n if (request.isCancelRequested())\n {\n // If the event is cancelled note it.\n status = new EventStatus(false, true, null);\n if (logger.isDebugEnabled())\n logger.debug(\"Skipped cancelled event: \"\n + event.getClass().getSimpleName());\n }\n else\n {\n // Mark the request as started and submit to state machine.\n request.started();\n sm.applyEvent(event);\n status = new EventStatus(true, false, null);\n if (logger.isDebugEnabled())\n logger.debug(\"Applied event: \"\n + event.getClass().getSimpleName());\n }\n }\n catch (InterruptedException e)\n {\n // Handle an interruption, which could happen if we are cancelled\n // while executing.\n status = new EventStatus(false, true, e);\n logger.debug(String.format(\"Failed to apply event %s, reason=%s\",\n event, e.getLocalizedMessage()));\n }\n catch (Throwable e)\n {\n // Handle a failure.\n status = new EventStatus(false, false, e);\n logger.debug(String.format(\"Failed to apply event %s, reason=%s\",\n event, e.getLocalizedMessage()));\n }\n finally\n {\n // We need to store the status and call the completion\n // listener, if any. This must happen regardless of any\n // exception that occurs.\n try\n {\n if (listener != null)\n request.setAnnotation(listener.onCompletion(event, status));\n }\n catch (InterruptedException e)\n {\n // Do nothing; this is the end of the road for this task.\n }\n catch (Throwable e)\n {\n logger.error(\"Unexpected failure while calling listener\", e);\n }\n finally\n {\n // Make sure we record the request state no matter what to\n // prevent hangs.\n request.setStatus(status);\n }\n }\n }", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "@Override\n protected void onStartLoading() {\n if (mData != null) {\n // If we currently have a result available, deliver it\n // immediately.\n deliverResult(mData);\n }\n registerObserver();\n if (takeContentChanged() || mData == null || isConfigChanged()) {\n // If the data has changed since the last time it was loaded\n // or is not currently available, start a load.\n forceLoad();\n }\n }", "protected void preload(HttpServletRequest request) {\r\n/* 39 */ log.debug(\"RoomCtl preload method start\");\r\n/* 40 */ HostelModel model = new HostelModel();\r\n/* */ try {\r\n/* 42 */ List l = model.list();\r\n/* 43 */ request.setAttribute(\"hostelList\", l);\r\n/* 44 */ } catch (ApplicationException e) {\r\n/* 45 */ log.error(e);\r\n/* */ } \r\n/* 47 */ log.debug(\"RoomCtl preload method end\");\r\n/* */ }", "protected void start() {\n }", "@Override\n protected void onStartLoading() {\n if (mMovieData != null) {\n deliverResult(mMovieData);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n\n }", "private void initDataLoader() {\n\t}", "@Override\n\tpublic void onLoaderReset(Loader<ContentResponse> loader) {\n\t\t\n\t}", "@Override\n\tpublic void onLoaderReset(Loader<ContentResponse> loader) {\n\t\t\n\t}", "public abstract void init(ResourceLoader loader);", "public static void start() {\n assert sListener == null;\n sListener = new ResourceListener();\n ResourceManager.getInstance().addListener(sListener);\n }", "public interface Loader {\n\t\tpublic void load();\n\t}", "@Override\n public Loader<List<Pokemon>> onCreateLoader(int id, Bundle args) {\n return new PokemonLoader(this, POKEAPI_REQUEST_URL);\n }", "protected void setLoadedForThisRequest() {\r\n\t\tContextUtils.setRequestAttribute(getRequestLoadedMarker(), Boolean.TRUE);\r\n\t}", "@Override\n public Loader<Cursor> onCreateLoader(int id, final Bundle loaderArgs) {\n return new AsyncTaskLoader<Cursor>(this) {\n // Initialize a Cursor, this will hold all the drugs data\n Cursor mTaskData = null;\n // onStartLoading() is called when a loader first starts loading data\n @Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }\n // loadInBackground() performs asynchronous loading of data\n @Override\n public Cursor loadInBackground() {\n // Will implement to load data\n // Query and load all drug data in the background; sort by priority\n // use a try/catch block to catch any errors in loading data\n\n try {\n return getContentResolver().query(DataContract.FirstAidEntry.CONTENT_URI,\n null,\n null,\n null,\n DataContract.FirstAidEntry._ID);\n } catch (Exception e) {\n Log.e(TAG, \"Failed to asynchronously load data.\");\n e.printStackTrace();\n return null;\n }\n\n\n }\n // deliverResult sends the result of the load, a Cursor, to the registered listener\n public void deliverResult(Cursor data) {\n mTaskData = data;\n super.deliverResult(data);\n }\n };\n\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n WebAppConfig config = new WebAppConfig(getInitParameter(WebAppConfig.APP_CONTEXT_PATH),\r\n getInitParameter(WebAppConfig.ACTIVITY_PATH),\r\n getInitParameter(WebAppConfig.ACTIVITY_PREFIX),\r\n getInitParameter(WebAppConfig.ACTIVITY_SUFFIX));\r\n\r\n ActivityManager manager = new ActivityManager(config);\r\n\r\n manager.performActivity(request, response);\r\n }", "private synchronized void startProcessing() throws IOException {\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n boolean more = true;\n\n if (isGet) {\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n } else {\n\n if (!isDone) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n\n }\n }\n\n if (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x82, null, replyHeaders, privateInput);\n }\n\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n }\n }", "@Override\n\tpublic Loader<ContentResponse> onCreateLoader(int id, Bundle args) {\n\t\tswitch (id) {\n\t\tcase REQUEST_UPGRADE_CONTENT_LOADER:\n\t\t\tcheckIfLoading(true);\n\t\t\treturn new SimpleContentAsyncLoader(getActivity(), getString(R.string.ibs_config_load_upgrade));\n\t\tcase REQUEST_DIALOG_CONTENT_LOADER:\n\t\t\treturn new SimpleContentAsyncLoader(getActivity(), getString(R.string.ibs_config_load_upgradeConfirm));\n\t\tdefault:\n\t\t\tthrow new UnsupportedOperationException(\"Id is not recognized? \" + id);\n\t\t}\n\t\t\n\t}", "public void start() {\n\t\tinitializeComponents();\r\n\r\n\t\tint userChoice;\r\n\r\n\t\tdo {\r\n\t\t\t// Display start menu\r\n\t\t\tview.displayMainMenu();\r\n\r\n\t\t\t// Get users choice\r\n\t\t\tuserChoice = view.requestUserChoice();\r\n\r\n\t\t\t// Run the respective service\r\n\t\t\tswitch (userChoice) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tservice.register();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tservice.login();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tservice.forgotPassword();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tservice.logout();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tservice.displayAllUserInfo(); // Secret method\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid choice\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (userChoice != 4);\r\n\t}", "@Generated\n @Selector(\"startFetchingMetadataForRequest:completionHandler:\")\n public native void startFetchingMetadataForRequestCompletionHandler(@NotNull NSURLRequest request,\n @NotNull @ObjCBlock(name = \"call_startFetchingMetadataForRequestCompletionHandler\") Block_startFetchingMetadataForRequestCompletionHandler completionHandler);", "public void start() {\n\t\tinstanceConfigUpdated();\n\n\t\tnew Thread(getUsageData, \"ResourceConsumptionManager : GetUsageData\").start();\n\n\t\tLoggingService.logInfo(MODULE_NAME, \"started\");\n\t}", "@Override\n\tprotected void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();\n\t\tthis.loadFromFile();\n\t}", "@Override\n\tpublic void onLoadFinished(Loader<Cursor> loader, Cursor cursor) {\n\t\tswitch (loader.getId()) {\n\t\t\tcase LOADER_ID:\n\t\t\t\t// The asynchronous load is complete and the data\n\t\t\t\t// is now available for use. Only now can we associate\n\t\t\t\t// the queried Cursor with the SimpleCursorAdapter.\n\t\t\t\tmAdapter.swapCursor(cursor);\n\t\t\t\tmCursor = mAdapter.getCursor();\n\t\t\t\tbreak;\n\t\t}\n\t\t// The listview now displays the queried data.\n\t}", "@Override\n \n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n new LoadingScreen().start();\n }" ]
[ "0.6341039", "0.61047137", "0.603341", "0.5962186", "0.5958233", "0.5951009", "0.5949474", "0.58931375", "0.5824931", "0.57380205", "0.57139623", "0.56496745", "0.5644665", "0.56230223", "0.56149185", "0.56011367", "0.5598109", "0.5556638", "0.5536191", "0.5536191", "0.5533262", "0.5516921", "0.55005", "0.54916006", "0.54878557", "0.54878557", "0.5481096", "0.54541504", "0.5450664", "0.544975", "0.5439547", "0.54329324", "0.5426", "0.53873956", "0.5360653", "0.53350794", "0.5320296", "0.5317092", "0.53003514", "0.52968985", "0.52965045", "0.52932096", "0.52604365", "0.5249874", "0.52475166", "0.52449995", "0.5243727", "0.52375364", "0.52349", "0.5232613", "0.5231967", "0.5227088", "0.5220918", "0.52178377", "0.52177143", "0.5210856", "0.5208327", "0.52039975", "0.5194807", "0.51830614", "0.5180153", "0.51791936", "0.5177162", "0.51750666", "0.517363", "0.5170523", "0.516807", "0.51656467", "0.51635635", "0.5156815", "0.5151275", "0.51479053", "0.51405007", "0.5128921", "0.5128581", "0.51173776", "0.5112511", "0.511243", "0.5111159", "0.51098233", "0.5104958", "0.5099252", "0.5098088", "0.5096568", "0.5096568", "0.5091666", "0.50894576", "0.50846285", "0.50756735", "0.5070894", "0.50694746", "0.5067266", "0.5065368", "0.5064751", "0.5061643", "0.5061218", "0.5059138", "0.5058495", "0.5055998", "0.505585" ]
0.5436752
31
Handles a request to stop the Loader.
@Override protected void onStopLoading() { // Attempt to cancel the current load task if possible. cancelLoad(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onStopLoading() {\n // The Loader is in a stopped state, so we should attempt to cancel the\n // current load (if there is one).\n cancelLoad();\n }", "public void stopRequest()\r\n\t{\r\n\t\tnoStopRequested = false;\r\n\t\tinternalThread.interrupt();\r\n\t}", "public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {\n executable.getParent().checkAbortPermission();\n interrupt();\n rsp.forwardToPreviousPage(req);\n }", "public void onStopLoading() {\n boolean cancelLoad = cancelLoad();\n }", "public void onStopLoading() {\n boolean cancelLoad = cancelLoad();\n }", "public void onStopLoading() {\n cancelLoad();\n }", "@Override\n protected void onStopLoading() {\n cancelLoad();\n }", "@Override \n\t protected void onStopLoading() {\n\t // Attempt to cancel the current load task if possible.\n\t cancelLoad();\n\t }", "@Override \n\t protected void onStopLoading() {\n\t // Attempt to cancel the current load task if possible.\n\t cancelLoad();\n\t }", "@Override\n protected void onStopLoading() {\n cancelLoad();\n }", "@Override\n protected void onStopLoading() {\n cancelLoad();\n\n // Note that we leave the observer as is. Loaders in a stopped state\n // should still monitor the data source for changes so that the Loader\n // will know to force a new load if it is ever started again.\n }", "@Override\n protected void onStopLoading() {\n cancelLoad();\n\n // Note that we leave the observer as is. Loaders in a stopped state\n // should still monitor the data source for changes so that the Loader\n // will know to force a new load if it is ever started again.\n }", "public StopInstanceResponse handleRequest(StopInstanceRequest request, Context context) {\n\t\t\r\n \tStopNotebookInstanceRequest stopNotebookInstanceRequest = new StopNotebookInstanceRequest();\r\n stopNotebookInstanceRequest.setNotebookInstanceName(request.getInstanceName());\r\n\t\t\r\n \tStopNotebookInstanceResult stopNotebookInstanceResult = sagemaker.stopNotebookInstance(stopNotebookInstanceRequest);\r\n \t//String result = stopNotebookInstanceResult.toString();\r\n \t//logger.log(\"NotebookInstance ARN: \" + result);\r\n \tDescribeNotebookInstanceRequest describeNotebookInstanceRequest = new DescribeNotebookInstanceRequest();\r\n \tdescribeNotebookInstanceRequest.setNotebookInstanceName(request.getInstanceName());\r\n \t\r\n \tDescribeNotebookInstanceResult describeNotebookInstanceResult = sagemaker.describeNotebookInstance(describeNotebookInstanceRequest);\r\n \t\r\n \treturn new StopInstanceResponse(\"Stopping of instance is\" + describeNotebookInstanceResult.getNotebookInstanceStatus() + \". This might take a while\");\r\n\t}", "public synchronized void requestStop() \n\t{\n\t\tstoprequested = true;\n\t}", "@Override\nprotected void onStopLoading() {\n cancelLoad();\n }", "public void stop() {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n logger.error(\"Closing response stream failed\", e);\n }\n }\n\n executorService.shutdownNow();\n executorService = null;\n }", "@Override\n public void stop() {\n }", "private static synchronized void requestStop() {\n stopRequested = true;\n }", "public void stop() {}", "@Override\n public void stop(ResponseListener<Object> listener) {\n final String error = \"Error stopping\";\n RemoteMediaPlayer.AsyncFuture<Void> asyncFuture = null;\n try {\n asyncFuture = remoteMediaPlayer.stop();\n handleVoidAsyncFuture(listener, asyncFuture, error);\n } catch (Exception e) {\n Util.postError(listener, new FireTVServiceError(error, e));\n }\n }", "public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }", "public void stop() {\n\t\tthis.controller.terminate();\n\t}", "@Override\n\tpublic void onStopLoading() {\n\t\tcancelLoad();\n\t\t// It's important that the Observers are active because in this state\n\t\t// the monitoring for changes is still active but it won't notify \n\t\t// changes until in the started state again \n\t}", "public static void stop() {\n assert sListener != null;\n ResourceManager.getInstance().addListener(sListener);\n }", "private void stopRequest(){ Remove the clause synchronized of the stopRequest method.\n // Synchronization is isolated as possible to avoid thread lock.\n // Note: the method removeRequest from SendQ is synchronized.\n // fix bug jaw.00392.B\n //\n synchronized(this){\n setRequestStatus(stAborted);\n }\n informSession.getSnmpQManager().removeRequest(this);\n synchronized(this){\n requestId=0;\n }\n }", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "public void stopListener(){\n\t\tsynchronized (httpServerMutex){\n\t\t\ttry{\n\t\t\t\tif( webServer != null ){\n\t\t\t\t\twebServer.shutdownServer();\n\t\t\t\t\twebServer = null; // NOPMD by luke on 5/26/07 11:10 AM\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( InterruptedException e){\n\t\t\t\t//Ignore, InterruptedException don't matter in this context.\n\t\t\t}\n\t\t\tcatch( Exception e){\n\t\t\t\t//Ignore, InterruptedException don't matter in this context.\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void stop() {\r\n\r\n }", "public void stop() {\n }", "public void stop() {\n }", "@Override\n public void stop() {}", "public void stop() {\n\t\t// To be garbage collected if adapter remains active\n\t\tservletOut = null;\n\t}", "@Override public void stop() {\n }", "public void stop() {\n\t}", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n protected void onStopLoading() {\n mImplementation.onStopLoading();\n }", "@Override\r\n\tpublic void stop() {\n\t\t\r\n\t}", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "private void stop() {\n\t\t/*\n if (this.status != PedoListener.STOPPED) {\n this.sensorManager.unregisterListener(this);\n }\n this.setStatus(PedoListener.STOPPED);\n\t\t*/\t\t\t\t\n\t\t\t\n\t\tif (status != PedoListener.STOPPED) {\n\t\t uninitSensor();\n\t\t}\n\n\t\tDatabase db = Database.getInstance(getActivity());\n\t\tdb.setConfig(\"status_service\", \"stop\");\n\t\t//db.clear(); // delete all datas on table\n\t\tdb.close();\t\t\n\n\t\tgetActivity().stopService(new Intent(getActivity(), StepsService.class));\n\t\tstatus = PedoListener.STOPPED;\n\n\t\tcallbackContext.success();\n }", "public void stop(){\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}", "@Override\n\tpublic void stop() {\n\t}", "@Override\n\tpublic void stop() {\n\t}", "public void stop() {\n\t\t\n\t}", "public void exit() {\n loader.getApplet().stop();\n loader.getApplet().destroy();\n }", "public void cancelGetResponse() {\n impl.cancelGetResponse();\n }", "@MainThread\n @Override\n protected void onStopLoading() {\n super.onStopLoading();\n cancelLoadHelper();\n }", "private void doStop()\r\n {\r\n requestQueue.add( new ChargerHTTPConn( weakContext,\r\n \"STOP\", \r\n null,\r\n null,\r\n null, \r\n null,\r\n false,\r\n null,\r\n null ) );\r\n }", "public void stop() {\n\t\tResources.getmScene().unregisterUpdateHandler(time);\n\t\trunning = false;\n\t}", "@Override public void stop () {\n }", "@Override\n public void stop() {\n }", "public void stop(BundleContext bundleContext) throws Exception {\n\t\thttpServiceTracker.close();\n\t\thttpServiceTracker = null;\n\t\tthis.bundleContext = null;\n\t}", "public void stopDaemon(lnrpc.Rpc.StopRequest request,\n io.grpc.stub.StreamObserver<lnrpc.Rpc.StopResponse> responseObserver) {\n asyncUnimplementedUnaryCall(getStopDaemonMethod(), responseObserver);\n }", "public void cancel()\n {\n this.controller.cancelDownloads();\n\n // Synchronised to avoid a race condition\n synchronized(this.cancelledMonitor)\n {\n // Set the cancelled field to true\n this.cancelled = true;\n }\n theLogger.info(\"Cancel request recieved from UI\");\n }", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "public void stop(){\n log.info(\"PageDownloaderPool stopped.\");\n downloaders.forEach(PageDownloader::doStop);\n }", "public void onStop() {\n if (this.loadingCount > 0) {\n this.loadingCount = 1;\n hideLoading();\n }\n super.onStop();\n }", "public void stop()\n {\n }", "public void stop(){\n }", "@Override\n public void stop() {\n\n }", "public void stop(yandex.cloud.api.mdb.clickhouse.v1.ClusterServiceOuterClass.StopClusterRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopMethod(), responseObserver);\n }", "public void stop() {\n \tif (elevatorControllerList != null) {\n \t\tfor(ElevatorController elevator : elevatorControllerList) {\n \t\t\televator.stop();\n \t\t}\n \t}\n \tif(mSchedulerFuture != null) {\n \t\tmSchedulerFuture.cancel(false);\n \t}\n \tif(mHandlerFuture != null) {\n \t\tmHandlerFuture.cancel(false);\n \t}\n \tscheduledExecutorService.shutdown();\n }", "public void cancelLoadUrl() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}" ]
[ "0.7126304", "0.6988486", "0.6748212", "0.6631336", "0.6631336", "0.6595712", "0.6556866", "0.6547708", "0.6547708", "0.6470901", "0.64637625", "0.63909715", "0.6331895", "0.6327382", "0.6231741", "0.6224555", "0.61788356", "0.6176974", "0.6164475", "0.6159085", "0.61320364", "0.61289304", "0.61221683", "0.6104907", "0.6077201", "0.6075087", "0.6075087", "0.6055593", "0.6053515", "0.6049575", "0.6049575", "0.60290164", "0.60264283", "0.6023498", "0.60216385", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.60210776", "0.6012339", "0.5989046", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5987841", "0.5976375", "0.59713227", "0.5964267", "0.594969", "0.5943247", "0.5943247", "0.5932099", "0.5920692", "0.5915462", "0.5912893", "0.5899361", "0.58982724", "0.58946574", "0.5879584", "0.5875756", "0.587279", "0.5868165", "0.58654594", "0.58654594", "0.58654594", "0.58654594", "0.58654594", "0.58654594", "0.58654594", "0.58654594", "0.5864745", "0.5857115", "0.58563817", "0.58531636", "0.58514065", "0.58338636", "0.5831035", "0.5829333", "0.5828473", "0.5828473" ]
0.6537105
11
Helper function to take care of releasing resources associated with an actively loaded data set.
protected void onReleaseResources(List<Lecturer> lecturers) { // For a simple List<> there is nothing to do. For something // like a Cursor, we would close it here. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dispose() {\r\n _isdisposed=true;\r\n try {\r\n _tables.dispose(); _tables=null;\r\n finalize();\r\n DataSet _current=this;\r\n _current=null; System.gc();\r\n }\r\n catch (Throwable ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n }", "@Override\n public void releaseResources() {\n if (cluster != null) {\n cluster.close();\n }\n if (cpds != null) {\n cpds.close();\n }\n }", "public void cleanupData() {\n\t}", "protected void onReleaseResources(D data) {\n // For a simple List<> there is nothing to do. For something\n // like a Cursor, we would close it here.\n }", "private void releaseResources(LogbookEntry data) {\n\n if (this.database != null && this.database.isOpen()){\n this.database.close();\n }\n if (this.databaseSchemaHelper != null) {\n this.databaseSchemaHelper.close();\n }\n }", "public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}", "public void dispose() {\r\n try {\r\n rowSet.close();\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n }", "@Override\n\tpublic void closeAndCleanupAllData() throws Exception {\n\t\tclose();\n\t}", "public void releaseCollection() {\n\t\tcourseDictionary = null;\n\t\t}", "public void releaseResources();", "public void destroy() {\n analysisdsfilelumiDataProvider.close();\n }", "public void close() {\n\t\tif(ds!= null){\n\t\t\tds.close() ;\n\t\t}\n\t}", "public void releasePandas()\n {\n if(followedBy!=null)\n {\n followedBy.release();\n followedBy = null;\n }\n }", "@Override\n public void close() {\n for (PipelineDataSourceWrapper each : cachedDataSources.values()) {\n try {\n each.close();\n } catch (final SQLException ex) {\n log.error(\"An exception occurred while closing the data source\", ex);\n }\n }\n cachedDataSources.clear();\n }", "public void release() {\n\t\tsuper.release();\r\n\t\tinnerContent = null;\r\n\t\tlabelHead = null;\r\n\t\tscroll = null;\r\n\t}", "@Override\n\tpublic void releaseResouces() {\n\t\tsuper.releaseResouces();\n\t}", "private void releaseResources(List<DetailEntry> releasedData) {\n }", "@Override\n\tpublic void releaseAllResources() {\n\t}", "public void destroyAllResource() {\r\n\t\ttry {\r\n\t\t\tif(outrs != null){\r\n\t\t\t\toutrs.close();\r\n\t\t\t\toutrs=null;\r\n\t\t\t}\r\n\t\t\tif(outstmt != null ){\r\n\t\t\t\toutstmt.close();\r\n\t\t\t\toutstmt=null;\r\n\t\t\t} \r\n\t\t\tif (dbConnection != null){\r\n\t\t\t\tdbConnection.close();\r\n\t\t\t\tdbConnection=null;\r\n\t\t\t} \r\n\t\t}catch (SQLException ex) {\r\n\t\t}\r\n\t}", "public final void dispose() {\n\ttry { if (resultSet != null) resultSet.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tresultSet = null;\n\n\ttry { if (stmt != null) stmt.close(); }\n\tcatch(SQLException e) { e.printStackTrace(); }\n\tstmt = null;\n }", "protected void finalize() throws Throwable {\n\t\tsuper.finalize();\r\n\t\tthis.globalStaticDataMap.clear();\r\n\t\trowSet = null;\r\n\t}", "public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }", "@Override\n protected void cleanup() {\n bundle.setParameter(BundleParameter.NODE_BUNDLE_ELAPSED_PARAM, accumulatedElapsed.get());\n this.dataProvider = null;\n usedClassLoader.dispose();\n usedClassLoader = null;\n //taskNotificationDispatcher.setBundle(this.bundle = null);\n this.taskList = null;\n this.uuidList = null;\n setJobCancelled(false);\n this.taskWrapperList = null;\n timeoutHandler.clear();\n }", "protected abstract void disposeResources();", "@Override\n public void release() {\n\n super.release();\n collection = null;\n labelName = null;\n labelProperty = null;\n name = null;\n property = null;\n style = null;\n styleClass = null;\n\n }", "@Override\n public void close() {\n dataPageIterator = null;\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n }", "protected void releaseReferences() {\r\n\r\n\t}", "public void shutDown() {\n collector.removePool(this);\n factory.poolClosing(this);\n\n // close all objects\n synchronized (objects) {\n for (Iterator it = objects.values().iterator(); it.hasNext();) {\n ObjectRecord rec = (ObjectRecord) it.next();\n if (null != rec) {\n if (rec.isInUse())\n factory.returnObject(rec.getClientObject());\n factory.deleteObject(rec.getObject());\n rec.close();\n }\n }\n objects.clear();\n deadObjects.clear();\n }//end of synch\n\n factory = null;\n poolName = null;\n initialized = false;\n }", "private void releaseObjects() {\n if (fPermStorage != null) {\n Iterator<IJavaObject> iterator = fPermStorage.iterator();\n while (iterator.hasNext()) {\n IJavaObject object = iterator.next();\n try {\n object.enableCollection();\n } catch (CoreException e) {\n if ((e.getStatus().getException() instanceof VMDisconnectedException)) {\n break;\n }\n JDIDebugPlugin.log(e);\n }\n }\n fPermStorage = null;\n }\n }", "protected void finalize() {\n\t\tclose();\n\t}", "@Override\n protected void onReset() {\n onStopLoading();\n\n // At this point we can release the resources associated with 'mData'.\n if (mData != null) {\n releaseResources(mData);\n mData = null;\n }\n }", "public void disposeResources()\n {\n for (Disposable disposable : this.disposableObjects) {\n disposable.dispose();\n }\n }", "@Override\n\tprotected void finalize() throws Throwable {\n\t\tzSampleRecord.recycle();\n\t\tySampleRecord.recycle();\n\t\tsuper.finalize();\n\t}", "protected abstract void onReleaseResources(final D data);", "public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }", "public void finalize() {\r\n byteBuffer2 = null;\r\n byteBuffer4 = null;\r\n byteBuffer8 = null;\r\n progressBar = null;\r\n tagBuffer = null;\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ioe) {\r\n // Do nothing\r\n }\r\n }\r\n\r\n raFile = null;\r\n }", "public void destroy() {\n processeddatasetDataProvider_tier.close();\n filebranchDataProvider_search.close();\n storageelementDataProvider_search.close();\n runsDataProvider_search.close();\n primarydatasetDataProvider_saerch.close();\n datatierDataProvider_search.close();\n algorithmconfigDataProvider_search.close();\n }", "public void release() throws SQLException\r\n\t{\r\n\t\tst.close();\r\n\t}", "public synchronized void close() {\n if (arrayp != null && arraypp != null) {\n tiledb.tiledb_array_close(ctx.getCtxp(), arrayp);\n tiledb.tiledb_array_free(arraypp);\n arrayp = null;\n arraypp = null;\n if (schema != null) {\n schema.close();\n }\n }\n }", "public void release() {\r\n return;\r\n }", "protected void finalize() {\n close();\n }", "public void free() {\n if (relRootCM.isOpen())\n relRootCM.close();\n if (relReachableCM.isOpen())\n relReachableCM.close();\n if (relCICM.isOpen())\n relCICM.close();\n if (relCMCM.isOpen())\n relCMCM.close();\n }", "private void freePartitions()\n {\n partitionsNoLongerNeeded.set(null);\n\n lock.writeLock().lock();\n try {\n // Remove out references to partitions to actually free memory\n Arrays.fill(partitions, null);\n lookupSourceSupplier = null;\n closeCachedLookupSources();\n }\n finally {\n lock.writeLock().unlock();\n }\n }", "public void cleanup();", "public void free() {\n byteBase.free();\n byteBase = null;\n }", "private void close() {\n/* */ try {\n/* 253 */ if (this.dataReader != null) {\n/* 254 */ this.dataReader.close();\n/* 255 */ this.dataReader = null;\n/* */ } \n/* 257 */ } catch (SQLException e) {\n/* 258 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ try {\n/* 261 */ if (this.pstmt != null) {\n/* 262 */ this.pstmt.close();\n/* 263 */ this.pstmt = null;\n/* */ } \n/* 265 */ } catch (SQLException e) {\n/* 266 */ logger.log(Level.SEVERE, (String)null, e);\n/* */ } \n/* */ }", "protected void preDisply(List allData) {\n }", "@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}", "public void release() throws JenaProviderException {\t\t\n\t}", "public void cleanup() {\r\n }", "public void release()\n\t{\n\t\t// System.out.println(usedBy.getName() + \": Releasing \" + toString());\n\t\tthis.usedBy = null;\n\t}", "protected void finalize() {\n\t\tdestroyImages();\n\t}", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "public void dispose() {\n processDispose(false);\n }", "@After\n\tpublic void cleanUp() {\n\t\tif (model != null) {\n\t\t\tmodel.release(true);\n\t\t\tloader.unloadAll();\n\t\t}\n\t}", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n delete();\n }", "public void finalize() {\n acquire.release();\n }", "public void finalize() {\n acquire.release();\n }", "public void toss() {\n\t\t\tif (pool != null) {\n\t\t\t\tpool.creator.destroy(content);\n\t\t\t}\n\t\t\t// Don't allow finalize to put it back in.\n\t\t\tpool = null;\n\t\t}", "public void finalize() {\r\n destImage = null;\r\n srcImage = null;\r\n sliceBuffer = null;\r\n super.finalize();\r\n }", "public synchronized void close() {\r\n\t\tif (mDataBase != null)\r\n\t\t\tmDataBase.close();\r\n\t\tsuper.close();\r\n\t}", "public void dispose() {\n story = null;\n backlog = null;\n parent = null;\n }", "public void dispose() {\n\t\tSet<IRI> ids = new HashSet<IRI>(getModelIds());\n\t\tfor (IRI id : ids) {\n\t\t\tunlinkModel(id);\n\t\t}\n\t}", "public void free() {\r\n\r\n\t}", "public void free();", "public void free(){\n\t\t//android.util.Log.d(TAG,\"free()\");\n\t\tthis.freeGeometries();\n\t\tthis.freeLights();\n\t\tthis.freeCameras();\n\t\tthis.freeTextures();\n\t\tthis.freeMaterials();\n\t}", "public void cleanup() {\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\tmodelBatch.dispose();\r\n\t\tinstances.clear();\r\n\t\tassets.dispose();\r\n\t}", "public void releaseChildren() {\n if (children != null) {\n unloadChildren();\n\n children.unload();\n children = null;\n }\n }", "public void shutdown() {\n // From this point forward, only return a poison pill for this retrieval\n // manager, which will cause threads attempting to receive bandwidth\n // allocations to die\n this.shutdown = true;\n }", "@Override\n public void release() {\n super.release();\n init();\n }", "@Override\r\n public void cleanup() {\n }", "public void cleanup() {\n }", "public static void release() {\n\t}", "private void disposeAndDeleteAllImages() {\r\n\r\n\t\tPhotoLoadManager.stopImageLoading(true);\r\n\t\tThumbnailStore.cleanupStoreFiles(true, true);\r\n\r\n\t\tPhotoImageCache.disposeAll();\r\n\r\n\t\tExifCache.clear();\r\n\t}", "public void freeScrap() {\n\r\n\t}", "private static void doMemoryReleases() {\n\r\n OptimizedJavaRecognizer.releaseMemory();\r\n FastJavaLexer.clear();\r\n }", "public void finalize() {\r\n if ( componentHistogram != null ) {\r\n componentHistogram.dispose();\r\n componentHistogram = null;\r\n }\r\n\r\n if ( componentLUT != null ) {\r\n componentLUT.dispose( false );\r\n componentLUT = null;\r\n }\r\n\r\n if ( lutRecorder != null ) {\r\n lutRecorder.setVisible( false );\r\n lutRecorder.dispose();\r\n lutRecorder = null;\r\n }\r\n }", "@Override\n public void onCanceled(Cursor cursor) {\n // Attempt to cancel the current asynchronous load.\n super.onCanceled(mCursor);\n\n // The load has been canceled, so we should release the resources\n // associated with 'data'.\n ReleaseResources(cursor);\n }", "@Override\n public void cleanup() {\n }", "@Override\r\n\tprotected void finalize() throws Throwable {\n\t\tclose();\r\n\t\tsuper.finalize();\r\n\t}", "public void releaseResource() {\n if (!isPreConnected() && !isInCallServiceBinded() && this.mCallMapById.isEmpty() && this.mPreAddedCall == null && this.mPendingDisconnectPreAddedCall == null) {\n release();\n }\n }", "protected void disposeInternal()\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: Not alive and dispose was called, filename: {1}\",\r\n logCacheName, fileName);\r\n return;\r\n }\r\n\r\n // Prevents any interaction with the cache while we're shutting down.\r\n setAlive(false);\r\n\r\n final Thread optimizationThread = currentOptimizationThread;\r\n if (isRealTimeOptimizationEnabled && optimizationThread != null)\r\n {\r\n // Join with the current optimization thread.\r\n log.debug(\"{0}: In dispose, optimization already in progress; waiting for completion.\",\r\n logCacheName);\r\n\r\n try\r\n {\r\n optimizationThread.join();\r\n }\r\n catch (final InterruptedException e)\r\n {\r\n log.error(\"{0}: Unable to join current optimization thread.\",\r\n logCacheName, e);\r\n }\r\n }\r\n else if (isShutdownOptimizationEnabled && this.getBytesFree() > 0)\r\n {\r\n optimizeFile();\r\n }\r\n\r\n saveKeys();\r\n\r\n try\r\n {\r\n log.debug(\"{0}: Closing files, base filename: {1}\", logCacheName,\r\n fileName);\r\n dataFile.close();\r\n dataFile = null;\r\n keyFile.close();\r\n keyFile = null;\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure closing files in dispose, filename: {1}\",\r\n logCacheName, fileName, e);\r\n }\r\n\r\n log.info(\"{0}: Shutdown complete.\", logCacheName);\r\n }", "public void dispose() {\r\n\t\tclose();\r\n\t}", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }" ]
[ "0.7265056", "0.7029758", "0.6652587", "0.6634572", "0.65772915", "0.65138054", "0.65135795", "0.645259", "0.6434317", "0.640812", "0.6407294", "0.63389164", "0.6334773", "0.6309991", "0.62835956", "0.62727123", "0.6259553", "0.62480265", "0.62365454", "0.6220972", "0.6209924", "0.61855364", "0.617539", "0.61306846", "0.6085916", "0.6065587", "0.60561085", "0.6053855", "0.6042449", "0.60267603", "0.60242534", "0.6015461", "0.6009729", "0.600727", "0.59982216", "0.5995737", "0.5993816", "0.5990578", "0.59834665", "0.5967469", "0.5963033", "0.5956685", "0.5948629", "0.5940775", "0.59277576", "0.59027904", "0.5902389", "0.5896554", "0.58964777", "0.58920157", "0.5891778", "0.5879956", "0.5874138", "0.58724105", "0.5866653", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5856757", "0.5839857", "0.5839857", "0.58379287", "0.58319855", "0.58271503", "0.58243096", "0.58211964", "0.58205944", "0.5819135", "0.58140504", "0.5810139", "0.5801488", "0.5800789", "0.57948136", "0.5789962", "0.5789761", "0.5789586", "0.5784367", "0.5783583", "0.57722044", "0.57701606", "0.5762545", "0.57546604", "0.5753631", "0.5751096", "0.57497925", "0.5748096", "0.57398057", "0.57328916", "0.57328916" ]
0.0
-1
Implementation for the CreateNdefMessageCallback interface
@Override public NdefMessage createNdefMessage(NfcEvent event) { // Get Networkdata //HostageDBOpenHelper dbh = new HostageDBOpenHelper(this); DaoSession dbSession = HostageApplication.getInstances().getDaoSession(); DAOHelper daoHelper = new DAOHelper(dbSession,this); ArrayList<NetworkRecord> localNetworkInformation = daoHelper.getNetworkRecordDAO().getNetworkInformation(); HashMap<String, Long> devices_local = daoHelper.getSyncDeviceDAO().getSyncDeviceHashMap(); ArrayList<SyncInfoRecord> syncInfo = daoHelper.getSyncInfoRecordDAO().getSyncInfo(); NdefMessage msg = null; try { NdefRecord netData = NdefRecord.createMime("application/dk.aau.netsec.hostage.", serialize(localNetworkInformation)); NdefRecord deviceData = NdefRecord.createMime("application/dk.aau.netsec.hostage.", serialize(devices_local)); NdefRecord syncData = NdefRecord.createMime("application/dk.aau.netsec.hostage.", serialize(syncInfo)); msg = new NdefMessage(netData, deviceData, syncData); } catch (IOException e) { e.printStackTrace(); } return msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NdefMessage createNdefMessage(NfcEvent arg0) {\n\t\treturn null;\n\t}", "@Override\n public NdefMessage createNdefMessage(NfcEvent nfcEvent) {\n NdefRecord ndefRecord = NdefRecord.createMime(\"text/plain\", String.valueOf(Constants.user.getId()).getBytes());\n NdefMessage ndefMessage = new NdefMessage(ndefRecord);\n return ndefMessage;\n }", "private NdefMessage createNdefMessage(String content) {\n NdefRecord ndefRecord = createTextRecord(content);\n NdefMessage ndefMessage = new NdefMessage(new NdefRecord[]{ndefRecord});\n return ndefMessage;\n }", "@Override\n public NdefMessage createNdefMessage(NfcEvent nfcEvent) {\n\n String packageName = getApplicationInfo().packageName;\n\n // get the edit text string\n str = mInput.getText().toString();\n //Log.d(TAG, getString(R.string.debug_key) + \" \" + str);\n\n String mimeType = \"application/\" + packageName;\n Log.d(TAG, getString(R.string.debug_key) + \"mimetype\" + mimeType);\n byte[] mimeByte = mimeType.getBytes(Charset.forName(\"US-ASCII\"));\n\n // encapsulate data in array of ndefrecord\n NdefRecord[] ndefRecord = new NdefRecord[]{\n NdefRecord.createMime(mimeType, str.getBytes(Charset.forName(\"US-ASCII\"))),\n NdefRecord.createApplicationRecord(packageName)\n };\n\n return new NdefMessage(ndefRecord);\n }", "interface CreateNewNetCallback {\n\n /**\n * Method is called after the net was created successfully.\n */\n void onCreateNewNetSuccess();\n\n /**\n * Method is called after something went wrong with creation of new net.\n */\n void onCreateNewNetFailure();\n\n void onApplicationMainPortUsed();\n }", "@Override\n\tpublic void onNdefPushComplete(NfcEvent arg0) {\n\t\t// A handler is needed to send messages to the activity when this\n\t\t// callback occurs, because it happens from a binder thread\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t}", "@Override\n\tpublic void onNdefPushComplete(NfcEvent event) {\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t\t\n\t}", "int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);", "public void onNdefPushComplete(NfcEvent event) {\n\t\t\n\t}", "@Override\n public void onNdefPushComplete(NfcEvent nfcEvent) {\n Handler h = handler;\n if (h != null)\n h.obtainMessage(MESSAGE_SENT).sendToTarget();\n }", "void processCallback (ZyniMsg msg);", "MessageDef getMessageDef();", "com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg addNewDefinitionResponseMsg();", "public void OnKickConfCallback(int nReason);", "DynamicMessage createDynamicMessage();", "public abstract void onCreate(MessageCreateEvent e, List<String> args);", "@Override\n\tpublic void createCB(CB cb) {\n\t\t\n\t}", "public CreateRemoteClassic<Msg, Ref> factCreate();", "MessageRefType createMessageRefType();", "void additionalCreationCallback() {\n }", "protected abstract CreateRemoteClassic<Msg, Ref> make_factCreate();", "public interface nndmMessage_Out\n{\n\n /**\n * Status flag to indicate that a message is ready for retreival from message\n * out queue and to be transformed into a disease-specific message\n * format - value is <code> A </code> .\n */\n public static final String READY_FOR_TRANSFORM_STATUS = \"RDY_FOR_TRNSFRM\";\n\n /**\n * Status flag to indicate that a message is in the process of being transformed\n * into a disease-specific message format - value is <code> TRNSFRM_IN_PROG </code> .\n */\n public static final String TRANSFORM_IN_PROGRESS_STATUS = \"TRNSFRM_IN_PROG\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> TRNSFRM_COMP </code> .\n */\n public static final String TRANSFORM_COMPLETE_STATUS = \"TRNSFRM_COMP\";\n\n\n /**\n * Status flag to indicate that an error has occurred while transforming a\n * message into a disease-specific message format, (transformation unsuccessful)\n * - value is <code> TRNSFRM_ERR </code> .\n */\n public static final String TRANSFORM_ERROR_STATUS = \"TRNSFRM_ERR\";\n\n\n /**\n * Status flag to indicate that an error has occurred while <i> transporting </i> a\n * a disease-specific message to the transport out queue, (write to queue failed),\n * or, the ebXML application errored while processing the message.\n * - value is <code> TRNSPRT_ERR </code> .\n */\n public static final String TRANSPORT_ERROR_STATUS = \"TRNSPRT_ERR\";\n\n\n /**\n * Status flag to indicate that a disease-specific message is ready to be processed\n * by <i> PHINMS </i> data interchange application\n * - value is <code> RDY_FOR_PHINMS </code> .\n */\n public static final String READY_FOR_PHINMS_STATUS = \"RDY_FOR_PHINMS\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> PHINMS_COMP </code> .\n */\n public static final String PHINMS_COMPLETE_STATUS = \"PHINMS_COMP\";\n\n /**\n * Status flag to indicate that a message has been failed while processing in\n * PHINMS stage - value is <code> PHINMS_ERR </code>\n */\n public static final String PHINMS_ERROR_STATUS = \"PHINMS_ERR\";\n\n\n /**\n * Represents the Disease Message, <i> before </i> disease_specific transformation.\n */\n public static final String MESSAGE_OUT_ATTACHEMNT = \"attachment_txt\";\n\n\n /** This method returns a collection of message id keys with the given status.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return list containing the collection of keys\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public List<MessageKey> listMessages(String status);\n\n\n /** This method retrieves the message record from the message_out database.\n * The SELECT sql is formatted to support specific database implementations\n * (currently MSSQL 2000 and Oracle 8i).\n * Only records with a status_cd of <code> nndmMessage_Out.ACTIVE_STATUS </code> can be retrieved.\n * @param key String that contains the record identifier for the message that failed.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return Map containing the mapping of column name to its value fetched from the database.\n * @see #ACTIVE_STATUS\n */\n\tpublic Map<String,String> getMessage(Long messageUid, String status);\n\n\n /** This method updates the message record indicated by the key argument as\n * indicated by the second argument.\n * @param key String that contains the record identifier to set status for\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public void setStatus(Long messageUid, String status);\n\n\n /** This method adds an error log record to the Message_Out database and\n * sets the status appropriately.\n * @param key String that contains the record identifier for the message that failed.\n * @param errorMessage String the contains the short description of the error.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.TRANSFORM_ERROR_STATUS, or\n * nndmMessage_Out.TRANSPORT_ERROR_STATUS.\n */\n public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);\n\n}", "public void createMessage(int tid, int uid, int rank, String detail);", "public InfoMessage createInfoMessage();", "public void writeNFC(View view) {\n\n // capture in logcat\n Log.d(TAG, getString(R.string.debug_key) + \" Write key pressed\");\n\n getNdef();\n if (ndef == null)\n return;\n\n NdefMessage mMessage = this.createMessage();\n\n try {\n // establish connection with tag\n ndef.connect();\n //if (ndef.isConnected()) {\n // write the message\n ndef.writeNdefMessage(mMessage);\n //}\n // disconnect\n ndef.close();\n Toast.makeText(this, \"Tag written\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n Toast.makeText(this, \"Connection lost: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (FormatException e) {\n Toast.makeText(this, \"Format Error: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n // get the edit text string\n// str = mInput.getText().toString();\n// //Log.d(TAG, getString(R.string.debug_key) + \" \" + str);\n//\n//\n // can only be used to beam data between two devices p2p\n// if (nfcAdapter == null) {\n// Toast.makeText(this, getString(R.string.no_nfc), Toast.LENGTH_LONG).show();\n// } else {\n// nfcAdapter.setNdefPushMessageCallback(this, this);\n// //Toast.makeText(this, \"Bring phone close to tag\", Toast.LENGTH_LONG).show();\n// nfcAdapter.setOnNdefPushCompleteCallback(this, this);\n// }\n }", "@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}", "@Override\r\n\tprotected void processIsNotDefinedMsg(InNotDefinedMsg arg0) {\n\t\t\r\n\t}", "public interface ReceiveCallback extends MessageReceivedCallback{\n}", "protected abstract CreateRemoteClassic<Msg, Ref> make_create();", "void onNewMessage(String message);", "public void OnMessageReceived(String msg);", "@Override\n\tpublic void messageBusErrorCallback() {\n\t}", "public CreateRemoteClassic<Msg, Ref> create();", "@Override\n\t\t\tpublic void onEmsgOpenedListener() {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n String payload = null;\n if (intent != null && NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) {\n Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n if (rawMessages != null) {\n NdefMessage[] messages = new NdefMessage[rawMessages.length];\n messages[0] = (NdefMessage) rawMessages[0];\n NdefRecord rec = messages[0].getRecords()[0];\n payload = new String(rec.getPayload());\n //Toast.makeText(getApplicationContext(),payload,Toast.LENGTH_LONG).show();\n ServerComm serverComm = new ServerComm();\n String result=\"\";\n try {\n result = serverComm.execute(\"1\", MainActivity.user.getUserId(), MainActivity.user.getPassword(), payload).get();\n }catch (InterruptedException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }catch (ExecutionException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n if(result==null){\n Toast.makeText(getApplicationContext(),\"Check your Internet Connection\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(result.equalsIgnoreCase(\"successful\")){\n Toast.makeText(getApplicationContext(),\"Attendance Registered successfully!\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }", "public void onMessage(Message arg0) {\n\r\n\t}", "@Override\r\n public void onNdefPushComplete(NfcEvent event)\r\n {\r\n mServer.start();\r\n\r\n SendActivity.this.runOnUiThread(new Runnable()\r\n {\r\n public void run()\r\n {\r\n tapImage.setVisibility(View.INVISIBLE);\r\n tapText.setVisibility(View.INVISIBLE);\r\n }\r\n });\r\n mNfcAdapter.setNdefPushMessageCallback(null, this);\r\n }", "public static abstract interface M0_callbackPtr {\n\n public abstract int handler();\n }", "MessageType createMessageType();", "private native long nativeCreateDelegate();", "@Override\n\t\tpublic void onDirectMessage(DirectMessage arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void callback(int position) {\n\n\t\t\t\t\t\t\t\t\t}", "void setupExternalMessages();", "@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}", "public interface IConvertorCallback {\n\t/***\n\t * @param filename Indicates generated file name. \n\t */\n\tvoid notify(String filename);\n}", "public Message toMessage(final byte descr_idx, final byte n_args) {\n final Descriptor data = this.getData();\n return new Message(descr_idx, data.dtype, n_args, data.getShape(), data.getBuffer());\n }", "private void getNdef() {\n ndef = null;\n\n // get instance of ndef fro the tag\n if (mytag != null) {\n ndef = Ndef.get(mytag);\n } else {\n Toast.makeText(this, \"No tag\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\t\t\tpublic void onDataCallBack(String request, int code) {\n\t\t\t\tLog.e(\"NewFriendsAdapter\", \"UploadMessageBox:\"+code);\n\t\t\t\tif(code == 0){\n\t\t\t\t\t//DolphinApp.getInstance().notifyMsgRTC2Family(msgInfo.getFamilyId());\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onDataCallBack(String request, int code) {\n\t\t\t\tLog.e(\"NewFriendsAdapter\", \"UploadMessageBox:\"+code);\n\t\t\t\tif(code == 0){\n\t\t\t\t\t//DolphinApp.getInstance().notifyMsgRTC2Family(msgInfo.getFamilyId());\n\t\t\t\t}\n\t\t\t}", "public CallbackHandler() {\r\n // TODO Auto-generated constructor stub\r\n }", "public interface NewPrivateMessageHandler {\n void onNewPrivateMessage(String sessionId, Comment privateMessage);\n}", "public static void setCreatedCallback(final OutputCreatedCallback cb) {\n\t\tAssert.assertNotNull(cb);\n\n\t\tJWLC.nativeHandler().wlc_set_output_created_cb(new handle_callback() {\n\n\t\t\tpublic boolean callback(Pointer handle) {\n\t\t\t\treturn cb.onCreated(Output.from(handle));\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void onCallback() {\n\t\t\n\t}", "protected abstract String createMessage(XMLLogHelper logHelper);", "DefinitionName getDefName(String n){\n \tDefinitionName rc = null;\n \ttry {\n\t\t\trc = new DefinitionName(n);\n\t\t} catch (DmcValueException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn(rc);\n }", "@DSSafe(DSCat.IPC_CALLBACK)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.580 -0500\", hash_original_method = \"2469457C965E8FC7C139A1D414384428\", hash_generated_method = \"42C86E9B0B120923F19E3F5FDF13C046\")\n \n@Override\n public void handleMessage(Message msg) {\n mResultMsg = Message.obtain();\n mResultMsg.copyFrom(msg);\n synchronized(mLockObject) {\n mLockObject.notify();\n }\n }", "public DocumentCreateCallbackHandler(NavigationDataCallback callback, String fileTypeName,\n String fileScopeName, String fileName) {\n this.callback = callback;\n this.fileTypeName = fileTypeName;\n this.fileScopeName = fileScopeName;\n this.fileName = fileName;\n }", "@Override\n public void onCallBack(int pos) {\n }", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.521 -0500\", hash_original_method = \"23E4A4D5EBFE681605B0582F17F8E799\", hash_generated_method = \"2407FCFDBD809792EEC39AD82D87DDCA\")\n \npublic void sendMessage(int what, int arg1, int arg2) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n sendMessage(msg);\n }", "MessageParameter createMessageParameter();", "public CallMessage() {\n\t}", "MessagesType createMessagesType();", "@Override\n\t\t\t\t\t\t\tpublic void callback(HBCIPassport passport, int reason, String msg,\n\t\t\t\t\t\t\t\t\tint datatype, StringBuffer retData) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void handleMessage(Message msg) {\n // if the message 'what' matches the constant MESSAGE_SENT, it\n // means the callback\n // to onNdefPushComplete happened which means the NFC was a\n // success\n if (msg.what == MESSAGE_SENT) {\n Toast.makeText(getApplicationContext(), \"Tag written successfully!!\", Toast.LENGTH_LONG).show();\n }\n }", "public interface NativeDefOperations\n\textends org.omg.CORBA.TypedefDefOperations\n{\n}", "public String getPredefinedTextMessage( String language, int preDefindeMsgId );", "com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg getDefinitionResponseMsg();", "public interface MessageCallBack {\n\n void onMessage(String message);\n}", "public abstract void showMessageBox(String message, Runnable callback);", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.524 -0500\", hash_original_method = \"066946089A5EEE9700468FE67EE373C2\", hash_generated_method = \"39D30A18E3CBA1A0CA0CA065CE6FFE58\")\n \npublic void sendMessage(int what, int arg1, int arg2, Object obj) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n msg.arg2 = arg2;\n msg.obj = obj;\n sendMessage(msg);\n }", "@Override\n\tpublic void onPMessage(String arg0, String arg1, String arg2) {\n\t\t\n\t}", "@DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:59:45.518 -0500\", hash_original_method = \"6C3F9593FC3095346100149D0CBBAD3F\", hash_generated_method = \"74BFDE300F5DD4E078EA04A4A8181904\")\n \npublic void sendMessage(int what, int arg1) {\n Message msg = Message.obtain();\n msg.what = what;\n msg.arg1 = arg1;\n sendMessage(msg);\n }", "@Override\r\n\tpublic void onMessageCreate(MessageCreateEvent event) {\n\t\tif (event.getMessageContent().startsWith(\"!\") && event.getChannel().getId() == 310560101352210432L) {\r\n\t\t\t// remove prefix from string and anything after\r\n\t\t\tString command = event.getMessageContent().substring(1).split(\" \")[0].toLowerCase();\r\n\t\t\t// check if original command name\r\n\t\t\tif (commands.containsKey(command))\r\n\t\t\t\tcommands.get(command).process(event);\r\n\t\t\t// check if alternative name for command\r\n\t\t\telse if (commandAlternative.containsKey(command))\r\n\t\t\t\tcommands.get(commandAlternative.get(command)).process(event);\r\n\r\n\t\t\tlogger.info(event.getMessageAuthor().getDiscriminatedName() + \" invoked: \" + command);\r\n\t\t}\r\n\r\n\t}", "void setDefinitionResponseMsg(com.exacttarget.wsdl.partnerapi.DefinitionResponseMsgDocument.DefinitionResponseMsg definitionResponseMsg);", "public abstract void msgHandler(Message msg);", "void onMessageReceived(Message message);", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "public interface Callback {\n public static final int TYPE_REGULAR = 0;\n public static final int TYPE_DRAFT = 1;\n public static final int TYPE_TRASH = 2;\n\n /**\n * Called when the specified mailbox does not exist.\n */\n public void onMailboxNotFound(boolean firstLoad);\n\n /**\n * Called when the user wants to open a message.\n * Note {@code mailboxId} is of the actual mailbox of the message, which is different from\n * {@link MessageListFragment#getMailboxId} if it's magic mailboxes.\n *\n * @param messageId the message ID of the message\n * @param messageMailboxId the mailbox ID of the message.\n * This will never take values like {@link Mailbox#QUERY_ALL_INBOXES}.\n * @param listMailboxId the mailbox ID of the listbox shown on this fragment.\n * This can be that of a magic mailbox, e.g. {@link Mailbox#QUERY_ALL_INBOXES}.\n * @param type {@link #TYPE_REGULAR}, {@link #TYPE_DRAFT} or {@link #TYPE_TRASH}.\n */\n public void onMessageOpen(long messageId, long messageMailboxId, long listMailboxId,\n int type);\n\n /**\n * Called when an operation is initiated that can potentially advance the current\n * message selection (e.g. a delete operation may advance the selection).\n * @param affectedMessages the messages the operation will apply to\n */\n public void onAdvancingOpAccepted(Set<Long> affectedMessages);\n\n /**\n * Called when a drag & drop is initiated.\n *\n * @return true if drag & drop is allowed\n */\n public boolean onDragStarted();\n\n /**\n * Called when a drag & drop is ended.\n */\n public void onDragEnded();\n }", "public interface ICallbackImp {\n void onMsg(String msg);\n}", "interface Callback {\n /**\n * Used to update the {@link Notification}.\n */\n void notify(\n int notificationId,\n int notificationType,\n @Nullable String notificationTag,\n @NonNull Notification notification);\n\n /**\n * Used to stop the {@link SystemForegroundService}.\n */\n void stop();\n }", "public CreateRemoteClassic<Msg, Ref> infraCreate();", "public abstract void newChatTitleMessage(Message m);", "public interface MessageCallback {\n\n /**\n * Called when the awaited message arrives.\n */\n public void onReceive();\n\n /**\n * Called when the awaited message doesn't arrive (even after possible\n * retries).\n */\n public void onTimeout();\n}", "public final IConfCallBack fT(boolean z) {\n IConfCallBack iConfCallBack;\n AppMethodBeat.i(135484);\n ab.i(\"MicroMsg.OpenVoice.OpenVoiceNativeCallbackMgr\", \"hy: trigger validate callback %b\", Boolean.valueOf(z));\n synchronized (this) {\n if (z) {\n try {\n this.kzF = new IConfCallBack() {\n public final byte[] callBackFromConf(int i, int i2, byte[] bArr) {\n AppMethodBeat.i(135481);\n ab.i(\"MicroMsg.OpenVoice.OpenVoiceNativeCallbackMgr\", \"hy: triggered native callback: %d, %d\", Integer.valueOf(i), Integer.valueOf(i2));\n HashSet hashSet = (HashSet) f.this.kzG.get(i);\n byte[] bArr2;\n if (hashSet == null || hashSet.size() <= 0) {\n ab.w(\"MicroMsg.OpenVoice.OpenVoiceNativeCallbackMgr\", \"hy: nobody's listening to event %d, what a pity!\", Integer.valueOf(i));\n bArr2 = new byte[1];\n AppMethodBeat.o(135481);\n return bArr2;\n }\n ArrayList arrayList = new ArrayList(1);\n byte[] bArr3 = new byte[1];\n Iterator it = hashSet.iterator();\n bArr2 = bArr3;\n while (it.hasNext()) {\n a aVar = (a) it.next();\n if (aVar != null) {\n bArr2 = aVar.bP(aVar.i(i2, aVar.az(bArr)));\n if (!aVar.bgp()) {\n arrayList.add(aVar);\n }\n } else {\n ab.e(\"MicroMsg.OpenVoice.OpenVoiceNativeCallbackMgr\", \"hy: item is null! weired\");\n }\n }\n Iterator it2 = arrayList.iterator();\n while (it2.hasNext()) {\n hashSet.remove((a) it2.next());\n }\n AppMethodBeat.o(135481);\n return bArr2;\n }\n\n public final void callbackWriteLog(int i, String str, String str2, int i2, String str3, String str4, int i3) {\n AppMethodBeat.i(135482);\n if (i >= b.bgo()) {\n Xlog.logWrite2(i, \"CloudVoIPNative:\".concat(String.valueOf(str)), str2, str3, Process.myTid(), Process.myPid(), Thread.currentThread().getId(), Looper.getMainLooper().getThread().getId(), str4);\n }\n AppMethodBeat.o(135482);\n }\n };\n } catch (Throwable th) {\n AppMethodBeat.o(135484);\n }\n } else {\n this.kzF = null;\n }\n this.kzG.clear();\n iConfCallBack = this.kzF;\n }\n AppMethodBeat.o(135484);\n return iConfCallBack;\n }", "public void getTopicIdentForNameOrCreateNew(String completeText, AsyncCallback callback) {\r\n\t\tif (parent == null) {\r\n\t\t\ttopicService.createNewIfNonExistent(completeText, callback);\r\n\t\t} else {\r\n\t\t\ttopicService\r\n\t\t\t\t\t.createNewIfNonExistent(completeText, parent, lnglat, dateCreated, callback);\r\n\t\t}\r\n\t}", "org.omg.CORBA.Object _get_interface_def();", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public void newFileCreated(OpenDefinitionsDocument doc) { }", "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "public interface MPFCallback {\n // TODO: Update argument type and name\n void editMyPost(Post post);\n\n void deleteMyPost(Post post);\n }", "public abstract void documentMessage(Message m);", "@EventName(\"receivedMessageFromTarget\")\n EventListener onReceivedMessageFromTarget(EventHandler<ReceivedMessageFromTarget> eventListener);", "@Override\n\t\t\tpublic void onEmsgClosedListener() {\n\t\t\t\t\n\t\t\t}", "public abstract EnvioMensajesCallBackInterface getInterfaceCallback();", "void onCreateNewNetSuccess();", "private native void addCallback(String name)\n /*-{\n var m = this;\n var target = $wnd;\n var parts = name.split('.');\n \n for(var i = 0; i < parts.length - 1; i++) {\n var part = parts[i];\n if (target[part] === undefined) {\n target[part] = {};\n }\n target = target[part];\n }\n \n target[parts[parts.length - 1]] = $entry(function() {\n //Must make a copy because arguments is an array-like object (not instanceof Array), causing suboptimal JSON encoding\n var args = Array.prototype.slice.call(arguments, 0);\n m.@com.vaadin.client.extensions.javascriptmanager.JavaScriptManagerConnector::sendRpc(Ljava/lang/String;Lcom/google/gwt/core/client/JsArray;)(name, args);\n });\n }-*/;", "public void addReceivedInternalDocument(AddReceivedInternalDocumentCommand aCommand);", "public interface SocketMessageListerner {\n void onGetMessageAck(Message message, int type);\n}", "public interface CallbackPost {\n void gotHelper(String message);\n void gotHelperError(String message);\n }", "private void initMsgs() {\n }" ]
[ "0.70205605", "0.65515214", "0.6252442", "0.62240934", "0.5947089", "0.5888193", "0.5834332", "0.5791726", "0.57683367", "0.5702848", "0.56830287", "0.5642933", "0.55041283", "0.5487264", "0.54322374", "0.54251003", "0.53619707", "0.52974874", "0.52973604", "0.5290706", "0.5210492", "0.5199405", "0.51715964", "0.51545364", "0.5115864", "0.5072448", "0.5065161", "0.5063375", "0.50529146", "0.5048398", "0.5041584", "0.5038407", "0.501615", "0.5005226", "0.49674347", "0.49601534", "0.4934074", "0.49273974", "0.49021325", "0.49008465", "0.4890081", "0.48674214", "0.48490104", "0.48156667", "0.48123884", "0.4806132", "0.48029676", "0.4789641", "0.4789641", "0.47854477", "0.47830847", "0.4782238", "0.4766177", "0.47623757", "0.47616884", "0.4759295", "0.47585967", "0.47521704", "0.47508284", "0.4748293", "0.4746521", "0.47423255", "0.47413236", "0.47351426", "0.4732691", "0.47323838", "0.47222653", "0.4714711", "0.47086152", "0.470337", "0.47020322", "0.46928436", "0.46895236", "0.4676703", "0.46697715", "0.4669594", "0.46573344", "0.46572423", "0.46513695", "0.46420825", "0.4632983", "0.46218646", "0.462121", "0.46149293", "0.46127495", "0.460522", "0.46004364", "0.46004364", "0.45874506", "0.45848143", "0.45836657", "0.45834023", "0.4580419", "0.4576996", "0.45730138", "0.457129", "0.45706752", "0.4570067", "0.4562278", "0.45578337" ]
0.64115477
2
Implementation for the OnNdefPushCompleteCallback interface
@Override public void onNdefPushComplete(NfcEvent arg0) { // A handler is needed to send messages to the activity when this // callback occurs, because it happens from a binder thread mHandler.obtainMessage(MESSAGE_SENT).sendToTarget(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onNdefPushComplete(NfcEvent event) {\n\t\t\n\t}", "@Override\n\tpublic void onNdefPushComplete(NfcEvent event) {\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t\t\n\t}", "@Override\n public void onNdefPushComplete(NfcEvent nfcEvent) {\n Handler h = handler;\n if (h != null)\n h.obtainMessage(MESSAGE_SENT).sendToTarget();\n }", "@Override\r\n public void onNdefPushComplete(NfcEvent event)\r\n {\r\n mServer.start();\r\n\r\n SendActivity.this.runOnUiThread(new Runnable()\r\n {\r\n public void run()\r\n {\r\n tapImage.setVisibility(View.INVISIBLE);\r\n tapText.setVisibility(View.INVISIBLE);\r\n }\r\n });\r\n mNfcAdapter.setNdefPushMessageCallback(null, this);\r\n }", "public interface PushCallBack {\n void onSuccess();\n\n void onTimeout();\n}", "@Override\n\t\t\t\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\t\t\t\tLog.i(\"tag\", \"onComplete\"+arg2.toString());\t\n\t\t\t\t\t\tLog.i(\"tag\", \"onComplete\");\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onCompletion();", "@Override\n\t\tpublic void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n\t\t\tLog.i(\"tag\", \"onComplete\");\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n\tpublic void onCallback() {\n\t\t\n\t}", "void onNewTaskComplete(String name, String notes, int position);", "@Override // com.oculus.deviceconfigclient.DeviceConfigCallback\n public void onSuccess() {\n DeviceConfigHelper.sHasSubscribed.set(true);\n DeviceConfigHelper.sDidSubscribeComplete.set(true);\n while (DeviceConfigHelper.sOnSubscribeCompleteCallbacks.peek() != null) {\n ((DeviceConfigHelperSubscribeCompletedCallback) DeviceConfigHelper.sOnSubscribeCompleteCallbacks.remove()).call();\n }\n }", "@Override\n public void onTaskDone(Object... values) {\n }", "public void handleMessage(Message msg) {\n // if the message 'what' matches the constant MESSAGE_SENT, it\n // means the callback\n // to onNdefPushComplete happened which means the NFC was a\n // success\n if (msg.what == MESSAGE_SENT) {\n Toast.makeText(getApplicationContext(), \"Tag written successfully!!\", Toast.LENGTH_LONG).show();\n }\n }", "public void onCompletion(Runnable callback)\n/* */ {\n/* 158 */ this.completionCallback = callback;\n/* */ }", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\t\t\t\t\t}", "public static interface OnPullDataReadyListener {\n\n public void onPullDataReady(int result);\n\n }", "public interface UHFCallbackLiatener {\n void refreshSettingCallBack(ReaderSetting readerSetting);\n void onInventoryTagCallBack(RXInventoryTag tag);\n void onInventoryTagEndCallBack(RXInventoryTag.RXInventoryTagEnd tagEnd);\n void onOperationTagCallBack(RXOperationTag tag);\n}", "public void callback() {\n }", "@Override\n\tpublic void callback() {\n\t}", "@Override\n protected void onPostExecute(ResponseStatus responseStatus) {\n callback.refGamesCallback(responseStatus);\n }", "@Override\n\t\t\t\t\tpublic void onFinish() {\n\n\t\t\t\t\t}", "@Override\n\t\tpublic void onFinish() {\n\t\t}", "@Override\n\tpublic void onComplete(String arg0) {\n\n\t}", "@Override\n public void onSuccess(IMqttToken asyncActionToken) {\n }", "@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void callback(int position) {\n\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void deliveryComplete(MqttDeliveryToken arg0) {\n\t\t\t\t\tSystem.out.println(\"deliveryComplete---------\"\n\t\t\t\t\t\t\t+ arg0.isComplete());\n\t\t\t\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n System.out.println(\"MQTT Publish Complete\");\n }", "public void endCallback(){\n inProgress = false;\n desInit();\n }", "@Override\n public void onFinish() {\n }", "@Override\n\tpublic void messageBusErrorCallback() {\n\t}", "@Override\n public void onSuccess(IMqttToken asyncActionToken) {\n }", "@Override\n\t\tpublic void onCompleted() {\n\t\t}", "@Override\n public void onCallBack(int pos) {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onComplete() {\n }", "@Override\n public void onDestInfo(BNRGDestInfo arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onDestInfo...... \");\n }", "@Override\r\n\t\t\t\t\tpublic void deliveryComplete(IMqttDeliveryToken arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n String payload = null;\n if (intent != null && NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) {\n Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n if (rawMessages != null) {\n NdefMessage[] messages = new NdefMessage[rawMessages.length];\n messages[0] = (NdefMessage) rawMessages[0];\n NdefRecord rec = messages[0].getRecords()[0];\n payload = new String(rec.getPayload());\n //Toast.makeText(getApplicationContext(),payload,Toast.LENGTH_LONG).show();\n ServerComm serverComm = new ServerComm();\n String result=\"\";\n try {\n result = serverComm.execute(\"1\", MainActivity.user.getUserId(), MainActivity.user.getPassword(), payload).get();\n }catch (InterruptedException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }catch (ExecutionException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n if(result==null){\n Toast.makeText(getApplicationContext(),\"Check your Internet Connection\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(result.equalsIgnoreCase(\"successful\")){\n Toast.makeText(getApplicationContext(),\"Attendance Registered successfully!\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }", "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "@Override\n\t\t\t\t\tpublic void onDataCallBack(String request, int code) {\n\t\t\t\t\t\tuploadMsg(fUerInfo);\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onCompleted() {\n\r\n\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onComplete(Bundle values) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\tLoger.i(\"TEST\",response.toString());\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"add\");\r\n\t\t\t\t\t\tbPullUpStatus = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken imdt) {\n //System.out.println(\"Pub complete\" + new String(token.getMessage().getPayload()));\n }", "@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}", "public interface OnGetUploadConfigListener {\n\n void onGetConfigFinish(boolean isSuccess);\n\n}", "@Override\r\n public void onFinish() {\n }", "void onCloseBleComplete();", "@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUpFromSrv-ERROR->\"+e.getMessage());\r\n\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}", "@Override\n public void onFinish() {\n\t\t\t\n }", "@Override\n public void onFinish() {\n }", "@Override\n public void onFinish() {\n }", "@Override\n public void deliveryComplete(final IMqttDeliveryToken pMqttDeliveryToken) {\n if (DEBUG) {\n Log.d(LOG_TAG, \"Delivery Successful!\");\n }\n\n for (final RaspberryPiMessageListener listener : mListeners) {\n parentHandler.post(new Runnable() {\n\t@Override\n\tpublic void run() {\n\t try {\n\t listener.MqttMessageSent(Arrays.asList(pMqttDeliveryToken.getTopics()),\n pMqttDeliveryToken.getMessage().toString());\n\t } catch (MqttException e) {\n\t Log.e(LOG_TAG, \"Error seding the delivery successful message \" + e.getMessage());\n\t }\n\t}\n });\n }\n }", "@Override\n\t\tpublic void onServiceComplete(Boolean success, String jsonObj) {\n\n\t\t}", "public void onCompleted() {\n\t\t\n\t\t }", "@Override\n public void onTaskComplete(String result) {\n\n //TODO\n\n }", "@Override\n public void onCompleted() {\n }", "@Override\n public void onCompleted() {\n }", "public interface Callback {\n /**\n * Show top tracks when an item has been selected.\n */\n void onTrackItemSelected(int position, List<USpotifyObject> tracks);\n }", "public void onCompletedImpl() {\n }", "@Override\n public void onCallGapRequest(CallGapRequest ind) {\n\n }", "public interface GCMRegisterListener {\n public void onGCMRegisterComplete(String result);\n}", "public void OnFileComplete();", "public interface OnTaskCompleted {\n\n void onTaskCompleted(String s);\n}", "@MainThread\n void onChannelScanFinished();", "@Override\n public void complete(CompleteEvent c) {\n\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\tSystem.out.println(\"deliveryComplete\");\n\t\t\t}", "@Override\n public void onComplete(Platform arg0, int arg1, HashMap<String, Object> arg2) {\n mHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(context, \"分享成功\", Toast.LENGTH_SHORT).show();\n }\n });\n if (mShareCallback!=null) {\n mShareCallback.onSuccess();\n }\n\n }", "void notifyCompleted(MessageSnapshot snapshot);", "public abstract void onFinish();", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\n\t}", "@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}", "public void onFinish() {\n\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n\n }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n }", "@Override\n public void onDiscoveryComplete() {\n BusProvider.getInstance().post(new DiscoveryCompleteEvent());\n }", "public interface Listener {\n \tpublic void notifyDone(LookupTypeQuery q, boolean complete, Type.Promise type);\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFinish(String source) {\n\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\t\n\t\t\t}", "public void onFinish() {\n }", "private void notifyUploadSuccess() {\n numberOfDone++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}", "int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);" ]
[ "0.8085742", "0.77573407", "0.76605237", "0.6910334", "0.5859375", "0.5822941", "0.5807993", "0.57691693", "0.57459086", "0.57385755", "0.56520617", "0.56182396", "0.5618103", "0.5585389", "0.55842245", "0.5571177", "0.5560322", "0.5560322", "0.55591357", "0.55556244", "0.55304277", "0.55238795", "0.5521191", "0.55085677", "0.54911816", "0.5484915", "0.54845554", "0.54664683", "0.5452392", "0.5449974", "0.54493815", "0.54442334", "0.5437799", "0.54306346", "0.5429362", "0.54232633", "0.5419976", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54173386", "0.54163647", "0.5398234", "0.53959167", "0.53957814", "0.53935176", "0.5387961", "0.5387475", "0.5386631", "0.53835076", "0.5379608", "0.537684", "0.5374214", "0.53714067", "0.5366154", "0.5365832", "0.53624505", "0.53540593", "0.5335648", "0.53350776", "0.5329538", "0.531848", "0.5316118", "0.5316118", "0.5306009", "0.5301953", "0.529379", "0.5272477", "0.52717674", "0.5269895", "0.5265521", "0.52646875", "0.52619475", "0.5257538", "0.5256032", "0.5251128", "0.5249083", "0.5247839", "0.52475697", "0.52454424", "0.52448285", "0.52430165", "0.52364737", "0.5235961", "0.5235548", "0.5225437", "0.5221325", "0.52201736", "0.5219848", "0.521838", "0.521838", "0.5215786" ]
0.7966183
1
onResume gets called after this to handle the intent
@Override public void onNewIntent(Intent intent) { setIntent(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onResume() {\n super.onResume();\n }", "public void onResume() {\n super.onResume();\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n Log.i(TAG, \"onResume\");\r\n\r\n }", "@Override\n public void onResume() {\n }", "@Override\r\n protected void onResume() {\r\n Log.i(TAG, \"onResume()\");\r\n \r\n super.onResume();\r\n }", "@Override\r\n\tprotected void onResume() {\n\t\t\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(TAG, \"onResume() called\");\n }", "public void onResume() {\n }", "@Override\n public void onResume() {\n\n super.onResume();\n }", "protected void onResume ()\n\t{\n\t\tsuper.onResume ();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\t\r\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.v(TAG, \"Invoked onResume()\");\n\n }", "@Override\n protected void onResume() {\n Log.i(\"G53MDP\", \"Main onResume\");\n super.onResume();\n }", "@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\n public void onResume() {\n super.onResume();\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t\tLog.d(TAG, \"onResume\");\n \t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t \n\t}", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n }", "@Override\n protected void onResume() {\n super.onResume();\n\n Log.d(LOG_TAG, \"onResume()\");\n\n\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tpublic void onResume() {\n\n\t}", "@Override\n\tpublic void onResume() {\n\n\t}", "public void onResume();", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\n\tprotected void onResume() \n\t{\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t}", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\n protected void onResume(){\n super.onResume();\n Log.d(TAG_INFO,\"application resumed\");\n }", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tLog.i(TAG, \"onResume\");\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.d(msg, \"The onResume() event\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.i(\"LOG:\", \"ESTOY EN RESUME\");\n activarSensores();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\r\n protected void onResume() {\n\tsuper.onResume();\r\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.e(TAG, \"onResume\");\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\t\t\t\n\t\t\t\t\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n //MobclickAgent.onResume(this);\n }", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t\tApplicationStatus.activityResumed();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t}", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t}", "@Override\n protected void onResume() {\n super.onResume();\n MobclickAgent.onResume(this);\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(\"tag\",\"onResume\" );\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t// Toast.makeText(getApplicationContext(), \"Resume\",\n\t\t// Toast.LENGTH_LONG).show();\n\t}", "@Override\n public void onResume(Activity activity) {\n }" ]
[ "0.82481545", "0.82481545", "0.8171743", "0.8163041", "0.8107272", "0.8104251", "0.810231", "0.80898833", "0.8079743", "0.8067105", "0.8055582", "0.8055582", "0.805065", "0.805065", "0.805065", "0.805065", "0.80438817", "0.80438817", "0.80438817", "0.80438817", "0.80226266", "0.80211365", "0.80204415", "0.8019317", "0.8019317", "0.80090517", "0.80090517", "0.80090517", "0.80090517", "0.80090517", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.8005343", "0.7997841", "0.7995067", "0.7991419", "0.7983082", "0.7982742", "0.7982742", "0.7982742", "0.79770213", "0.79756296", "0.79756296", "0.79756296", "0.7974832", "0.7974832", "0.79713964", "0.79712796", "0.7966379", "0.7959731", "0.7952379", "0.7952379", "0.7950421", "0.7950421", "0.7950421", "0.7942564", "0.7936541", "0.79334974", "0.79334974", "0.79322594", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.7930829", "0.79247284", "0.79214865", "0.79128", "0.79128", "0.7907075", "0.78862894", "0.788295", "0.78628653", "0.78628653", "0.78628653", "0.78628653", "0.78628653", "0.78628653", "0.78628653", "0.7832877", "0.7832877", "0.78297174", "0.781665", "0.7799316", "0.7797014" ]
0.0
-1
Parses the NDEF Message from the intent and prints to the TextView
void processIntent(Intent intent) { Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES); // only one message sent during the beam NdefMessage msg = (NdefMessage) rawMsgs[0]; try { DaoSession dbSession = HostageApplication.getInstances().getDaoSession(); DAOHelper daoHelper = new DAOHelper(dbSession,this); //HostageDBOpenHelper dbh = new HostageDBOpenHelper(this); ArrayList<NetworkRecord> remoteNetworkInformation = (ArrayList<NetworkRecord>) deserialize(msg.getRecords()[0].getPayload()); HashMap<String, Long> devices_remote = (HashMap<String, Long>) deserialize(msg.getRecords()[1].getPayload()); HashMap<String, Long> devices_local = daoHelper.getSyncDeviceDAO().getSyncDeviceHashMap(); ArrayList<SyncInfoRecord> syncInfo = (ArrayList<SyncInfoRecord>) deserialize(msg.getRecords()[2].getPayload()); long tracing_timestamp = 0; if(devices_local.containsKey(TracingSyncService.REMOTE_DEVICE)) tracing_timestamp = devices_local.get(TracingSyncService.REMOTE_DEVICE); for(Iterator<String> i = devices_remote.keySet().iterator(); i.hasNext(); ){ String key = i.next(); if((devices_local.containsKey(key) && devices_local.get(key) >= devices_remote.get(key)) || (tracing_timestamp > devices_remote.get(key))){ i.remove(); } } for ( Iterator<SyncInfoRecord> i = syncInfo.iterator(); i.hasNext(); ){ SyncInfoRecord info = i.next(); if(!devices_remote.containsKey(info.getDeviceID())){ i.remove(); } } daoHelper.getSyncDeviceDAO().updateSyncDevices(devices_remote); daoHelper.getSyncInfoRecordDAO().updateSyncInfo(syncInfo); daoHelper.getNetworkRecordDAO().updateNetworkInformation(remoteNetworkInformation); mHandler.obtainMessage(MESSAGE_RECEIVED).sendToTarget(); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n String s = new String(msg.getRecords()[0].getPayload());\n nfcTagCode = s.substring(3);\n\n textView.setText(nfcTagCode); // Sets the textview as the Text read from NFC TAG\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n menuInfo = new String(msg.getRecords()[0].getPayload());\n \n Toast.makeText(getApplicationContext(), menuInfo, Toast.LENGTH_LONG).show();\n }", "void processIntent(Intent intent) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(\n NfcAdapter.EXTRA_NDEF_MESSAGES);\n // only one message sent during the beam\n NdefMessage msg = (NdefMessage) rawMsgs[0];\n // record 0 contains the MIME type, record 1 is the AAR, if present\n String payload = new String(msg.getRecords()[0].getPayload());\n Toast.makeText(this, payload, Toast.LENGTH_LONG).show();\n Log.i(TAG, payload);\n }", "public void readNFC(View view) {\n\n // capture in logcat\n Log.d(TAG, getString(R.string.debug_key) + \" Read key pressed\");\n\n getNdef();\n if (ndef == null)\n return;\n\n String set_it;\n\n boolean canbereadonly = ndef.canMakeReadOnly();\n int maxsize = ndef.getMaxSize();\n String tag_type = ndef.getType();\n boolean connected = ndef.isConnected();\n boolean writable = ndef.isWritable();\n //NdefMessage cached_msg = ndef.getCachedNdefMessage();\n NdefMessage cached_msg = null;\n try {\n // establish connection with tag\n ndef.connect();\n\n cached_msg = ndef.getNdefMessage();\n\n // disconnect\n ndef.close();\n Toast.makeText(this, \"Tag read\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n Toast.makeText(this, \"Connection lost: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (FormatException e) {\n Toast.makeText(this, \"Format Error: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n if (cached_msg == null) {\n Toast.makeText(this, \"Tag is empty\", Toast.LENGTH_LONG).show();\n } else {\n // this can also be done by creating other activity for this layout.tag_output and calling that activity through explicit intent, better way\n setContentView(R.layout.tag_output);\n is_tag_output = true;\n }\n\n // get reference to text view inside tag_output\n TextView out1 = (TextView) findViewById(R.id.out1);\n TextView v_aar = (TextView) findViewById(R.id.aar);\n TextView prop1 = (TextView) findViewById(R.id.prop1);\n TextView prop2 = (TextView) findViewById(R.id.prop2);\n TextView prop3 = (TextView) findViewById(R.id.prop3);\n TextView prop4 = (TextView) findViewById(R.id.prop4);\n\n // get string from ndef message\n String user_msg = new String(cached_msg.getRecords()[0].getPayload());\n //String aar = new String(cached_msg.getRecords()[1].getPayload());\n\n // assign it to textview\n if (user_msg.equals(\"\"))\n out1.setText(\"User didn't provide data\");\n else\n out1.setText(user_msg);\n //v_aar.setText(\"AAR is: \" + aar);\n v_aar.setText(\"AAR is: \");\n\n if (canbereadonly) {\n Log.d(TAG, getString(R.string.debug_key) + \"Can be Read only\");\n set_it = \"Can be Read only\";\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Can't be Read only\");\n set_it = \"Can't be Read only\";\n }\n prop1.setText(set_it);\n\n if (writable) {\n Log.d(TAG, getString(R.string.debug_key) + \"writable\");\n set_it = \"Writable\";\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Not writable\");\n set_it = \"Not Writable\";\n }\n prop2.setText(set_it);\n\n if (connected) {\n Log.d(TAG, getString(R.string.debug_key) + \"Connected\");\n } else {\n Log.d(TAG, getString(R.string.debug_key) + \"Not Connected\");\n }\n\n Log.d(TAG, getString(R.string.debug_key) + \"maxsize: \" + maxsize + \"tag_type: \" + tag_type);\n prop3.setText(\"MaxSize: \" + maxsize);\n prop4.setText(\"TagType: \" + tag_type);\n\n }", "public String handleIntent(Intent intent) {\n String action = intent.getAction();\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action) || NfcAdapter.ACTION_TAG_DISCOVERED.equals(action) || NfcAdapter.ACTION_TECH_DISCOVERED.equals(action)) {\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefRecord relayRecord = ((NdefMessage)rawMsgs[0]).getRecords()[0];\n String nfcData = new String(relayRecord.getPayload());\n return nfcData;\n\n }\n return null;\n }", "@Override\n public NdefMessage createNdefMessage(NfcEvent nfcEvent) {\n\n String packageName = getApplicationInfo().packageName;\n\n // get the edit text string\n str = mInput.getText().toString();\n //Log.d(TAG, getString(R.string.debug_key) + \" \" + str);\n\n String mimeType = \"application/\" + packageName;\n Log.d(TAG, getString(R.string.debug_key) + \"mimetype\" + mimeType);\n byte[] mimeByte = mimeType.getBytes(Charset.forName(\"US-ASCII\"));\n\n // encapsulate data in array of ndefrecord\n NdefRecord[] ndefRecord = new NdefRecord[]{\n NdefRecord.createMime(mimeType, str.getBytes(Charset.forName(\"US-ASCII\"))),\n NdefRecord.createApplicationRecord(packageName)\n };\n\n return new NdefMessage(ndefRecord);\n }", "public void writeNFC(View view) {\n\n // capture in logcat\n Log.d(TAG, getString(R.string.debug_key) + \" Write key pressed\");\n\n getNdef();\n if (ndef == null)\n return;\n\n NdefMessage mMessage = this.createMessage();\n\n try {\n // establish connection with tag\n ndef.connect();\n //if (ndef.isConnected()) {\n // write the message\n ndef.writeNdefMessage(mMessage);\n //}\n // disconnect\n ndef.close();\n Toast.makeText(this, \"Tag written\", Toast.LENGTH_SHORT).show();\n } catch (IOException e) {\n Toast.makeText(this, \"Connection lost: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n } catch (FormatException e) {\n Toast.makeText(this, \"Format Error: Writing failed\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n\n\n // get the edit text string\n// str = mInput.getText().toString();\n// //Log.d(TAG, getString(R.string.debug_key) + \" \" + str);\n//\n//\n // can only be used to beam data between two devices p2p\n// if (nfcAdapter == null) {\n// Toast.makeText(this, getString(R.string.no_nfc), Toast.LENGTH_LONG).show();\n// } else {\n// nfcAdapter.setNdefPushMessageCallback(this, this);\n// //Toast.makeText(this, \"Bring phone close to tag\", Toast.LENGTH_LONG).show();\n// nfcAdapter.setOnNdefPushCompleteCallback(this, this);\n// }\n }", "@Override\n\t \t\tpublic void handleMessage(Message msg) {\n\t \t\treceive();\n\t \t\t\t// myTextView.setText(String.valueOf(cnt));\n\t \t\t}", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n mOutputTextView.setText(intent.getExtras().getString(Intent.EXTRA_TEXT));\r\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n protected void onNewIntent(Intent intent) {\n super.onNewIntent(intent);\n String payload = null;\n if (intent != null && NfcAdapter.ACTION_NDEF_DISCOVERED.equals(intent.getAction())) {\n Parcelable[] rawMessages = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n if (rawMessages != null) {\n NdefMessage[] messages = new NdefMessage[rawMessages.length];\n messages[0] = (NdefMessage) rawMessages[0];\n NdefRecord rec = messages[0].getRecords()[0];\n payload = new String(rec.getPayload());\n //Toast.makeText(getApplicationContext(),payload,Toast.LENGTH_LONG).show();\n ServerComm serverComm = new ServerComm();\n String result=\"\";\n try {\n result = serverComm.execute(\"1\", MainActivity.user.getUserId(), MainActivity.user.getPassword(), payload).get();\n }catch (InterruptedException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }catch (ExecutionException ex){\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n return;\n }\n\n if(result==null){\n Toast.makeText(getApplicationContext(),\"Check your Internet Connection\",Toast.LENGTH_LONG).show();\n return;\n }\n\n if(result.equalsIgnoreCase(\"successful\")){\n Toast.makeText(getApplicationContext(),\"Attendance Registered successfully!\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(getApplicationContext(),\"Attendance not registered, try again\",Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }", "private void handleIntent(Intent intent) {\n if(intent == null){\n Toast.makeText(this, \"intent is null handleIntent \", Toast.LENGTH_SHORT).show();\n return;\n }\n String action = intent.getAction();\n\n if(nfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)){\n String type = intent.getType();\n if(MIME_TEXT_PLAIN.equals(type)){\n Tag tag = intent.getParcelableExtra(EXTRA_TAG);\n\n nfcReaderTask = new NfcReaderTask();\n nfcReaderTask.SetResponseListener(this);\n nfcReaderTask.execute(tag);\n }\n }\n }", "@Override\r\n public void onReceive(Context context, Intent intent){\n\r\n Bundle extras = intent.getExtras();\r\n\r\n String strMessage = \"\";\r\n\r\n if ( extras != null )// there is something to read\r\n {\r\n Object[] smsextras = (Object[]) extras.get( \"pdus\" );\r\n\r\n for ( int i = 0; i < smsextras.length; i++ )// read the full message\r\n {\r\n SmsMessage smsmsg = SmsMessage.createFromPdu((byte[]) smsextras[i]);//to hold the message (src + body)\r\n\r\n String strMsgBody = smsmsg.getMessageBody().toString();// body is the message itself\r\n String strMsgSrc = smsmsg.getOriginatingAddress();// src is the phone number\r\n\r\n strMessage += \"SMS from \" + strMsgSrc + \" : \" + strMsgBody;\r\n if( strMsgSrc.equals(\"+19517437456\")){// if it comes from the device\r\n\r\n if(strMsgBody.charAt(0) == '?'){//does it have a question mark at the beginning?\r\n String[] s = strMsgBody.split(\"\\\\?\");//if it does, parse it out\r\n plotCoordinatesFromText(s[1]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }\r\n }", "public void onNewIntent(Intent intent) {\n\t Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n\t String nfcMessage = intent.getStringExtra(\"nfcMessage\");\n\t \n\t if(nfcMessage != null) {\n\t if(writeTag(this, tag, nfcMessage))\n\t \tToast.makeText(this, \"Write successfull\", Toast.LENGTH_LONG).show();\n\t \n\t newText.setText(\"sample text\");\n\t }\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n\n textView.setText(message);\n }", "public static void getMessage() {\r\n\t\tLog.i(TAG,\r\n\t\t\t\t\"+++ GOT MESSAGE FROM ARDUINO +++\" + getArduinoMessage());\r\n\t\tString[] msgSplit = getArduinoMessage().split(\":\");\r\n\t\tString keyWord = \"\";\r\n\t\tString firstVaule = \"\";\r\n\t\tString secondValue = \"\";\r\n\r\n\t\tif (msgSplit.length > 0) {\r\n\t\t\tkeyWord = msgSplit[1];\r\n\t\t\tfirstVaule = msgSplit[2];\r\n\t\t\tsecondValue = msgSplit[3];\r\n\t\t}\r\n\r\n\t\tif (keyWord.equals(\"xy\")) {\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue);\r\n\t\t\tstartTracking();\r\n\t\t}\r\n\t\tif (keyWord.equals(\"xyt\")) {\r\n\t\t\tLog.i(TAG, \"+++ GOT TELESCOPE POSITION \" + firstVaule + \" \"\r\n\t\t\t\t\t+ secondValue);\r\n\t\t\tstar++;\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue, star );\r\n\t\t}\r\n\t}", "@Override\n public void onReceivedData(byte[] arg0) {\n String data;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n tvAppend(textView, data);\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\r\n public void onNdefPushComplete(NfcEvent event)\r\n {\r\n mServer.start();\r\n\r\n SendActivity.this.runOnUiThread(new Runnable()\r\n {\r\n public void run()\r\n {\r\n tapImage.setVisibility(View.INVISIBLE);\r\n tapText.setVisibility(View.INVISIBLE);\r\n }\r\n });\r\n mNfcAdapter.setNdefPushMessageCallback(null, this);\r\n }", "public void handleMessage(Message msg) {\n // if the message 'what' matches the constant MESSAGE_SENT, it\n // means the callback\n // to onNdefPushComplete happened which means the NFC was a\n // success\n if (msg.what == MESSAGE_SENT) {\n Toast.makeText(getApplicationContext(), \"Tag written successfully!!\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\tpublic NdefMessage createNdefMessage(NfcEvent event) {\n\t\t// Get Networkdata\n\t\t//HostageDBOpenHelper dbh = new HostageDBOpenHelper(this);\n\t\tDaoSession dbSession = HostageApplication.getInstances().getDaoSession();\n\t\tDAOHelper daoHelper = new DAOHelper(dbSession,this);\n\t\tArrayList<NetworkRecord> localNetworkInformation = daoHelper.getNetworkRecordDAO().getNetworkInformation();\n\t\tHashMap<String, Long> devices_local = daoHelper.getSyncDeviceDAO().getSyncDeviceHashMap();\n\t\tArrayList<SyncInfoRecord> syncInfo = daoHelper.getSyncInfoRecordDAO().getSyncInfo();\n\t\t\n\t\tNdefMessage msg = null;\n\t\ttry {\n\t\t\tNdefRecord netData = NdefRecord.createMime(\"application/dk.aau.netsec.hostage.\", serialize(localNetworkInformation));\n\t\t\tNdefRecord deviceData = NdefRecord.createMime(\"application/dk.aau.netsec.hostage.\", serialize(devices_local));\n\t\t\tNdefRecord syncData = NdefRecord.createMime(\"application/dk.aau.netsec.hostage.\", serialize(syncInfo));\n\t\t\tmsg = new NdefMessage(netData, deviceData, syncData);\n\t\t\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn msg;\n\t}", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n tvAppend(textView, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "public void resolveIntent(Intent intent) {\n String action = intent.getAction();\n if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)\n || NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)) {\n\n Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);\n NdefMessage[] msgs;\n if (this.status == Status.bereit_zum_schreiben) {\n\n Tag wTAG = (Tag) intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n if (wTAG != null) {\n this.setStatus(Status.schreibt);\n writeTag(wTAG, this.createNdefMessage());\n\n }\n }\n }\n\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n //tvAppend(textView, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\r\n public void onResult(byte[] data)\r\n {\n StringBuffer sb = new StringBuffer();\r\n sb.append(getString(R.string.external_device_recv_data)).append(\"\\n\");\r\n sb.append(new String(data)).append(\"\\n\");\r\n \r\n McRecvOnBoard = sb.toString();\r\n \r\n MainControllerDemoActivity.this.runOnUiThread(new Runnable(){\r\n\r\n @Override\r\n public void run() \r\n { \r\n mRecvTextView.setText(McRecvOnBoard);\r\n }\r\n });\r\n }", "@Override\n\tpublic void onNdefPushComplete(NfcEvent event) {\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t\t\n\t}", "@Override\r\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString lrcMessageString=intent.getStringExtra(\"lrcMessage\");\r\n\t\t\tlrcText.setText(lrcMessageString);\r\n\t\t}", "@Override\n\tpublic void onNdefPushComplete(NfcEvent arg0) {\n\t\t// A handler is needed to send messages to the activity when this\n\t\t// callback occurs, because it happens from a binder thread\n\t\tmHandler.obtainMessage(MESSAGE_SENT).sendToTarget();\n\t}", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tString [] str=(String [])msg.obj;\n\t\t\tfor(int i=0;i<6;i++)\n\t\t\t{System.out.println(str[i]);}\n\t\t\t if(mDialog.isShowing()==true){\n\t\t\t\t mDialog.dismiss(); \n\t\t\t }\n\t\t\t if(str[0].toString().equals(\"anyType{}\")==true){\n//\t\t\t \tSystem.out.println(str[0]);\n\t\t\t\t title.setText(str[1]);\n\t\t\t\t time.setText(str[2]);\n\t\t\t\t type.setText(str[3]);\n\t\t\t\t content.setText(str[4]);\n\t\t\t\t name.setText(str[5]);\n//\t\t\t Toast.makeText(getApplicationContext(),\"发布成功\",Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t\t else{\n\t\t\t \tToast.makeText(getApplicationContext(),str[0],Toast.LENGTH_SHORT).show();\n\t\t\t }\n\t\t}", "@Override\r\n public void messageReceived(String messageText) {\n Log.e(\"Message\",messageText);\r\n Toast.makeText(StatusScreen.this,\"Message: \"+messageText,Toast.LENGTH_LONG).show();\r\n\r\n // If your OTP is six digits number, you may use the below code\r\n\r\n Pattern pattern = Pattern.compile(OTP_REGEX);\r\n Matcher matcher = pattern.matcher(messageText);\r\n String otp = \"\";\r\n while (matcher.find())\r\n {\r\n otp = matcher.group();\r\n }\r\n\r\n Toast.makeText(StatusScreen.this,\"OTP: \"+ otp ,Toast.LENGTH_LONG).show();\r\n\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n final Bundle bundle = intent.getExtras();\n boolean verify=false;\n try {\n if (bundle != null) {\n final Object[] pdusObj = (Object[]) bundle.get(\"pdus\");\n for (int i = 0; i < pdusObj.length; i++) {\n SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[i]);\n String message = currentMessage.getDisplayMessageBody();\n\n String[] inputSplitNewLine = message.split(\"\\\\n\");\n for (int j = 0; j < inputSplitNewLine.length; j++) {\n System.out.println(inputSplitNewLine[j]);\n if (inputSplitNewLine[j].contains(\"Your Zaparound verification code is\")) {\n String verifyCode = inputSplitNewLine[j].replaceAll(\"[^0-9]\", \"\");\n et_username.setText(verifyCode);\n verify=true;\n //Verify(new View(VerificationActivity.this));\n break;\n }\n }//end of for\n }//end of for\n if(verify)\n Verify(new View(VerificationActivity.this));\n }\n } catch (Exception e) {\n Log.e(\"SmsReceiver\", \"Exception smsReceiver\" + e);\n }\n }", "@Override\n public void run() {\n recieveView.setText(recvInput);\n }", "protected void logParsedMessage()\n {\n if (log.isInfoEnabled())\n {\n StringBuffer buf = new StringBuffer(\"Parsed EASMessage:\");\n buf.append(\"\\n OOB alert = \").append(isOutOfBandAlert());\n buf.append(\"\\n sequence_number = \").append(this.sequence_number);\n buf.append(\"\\n protocol_version = \").append(this.protocol_version);\n buf.append(\"\\n EAS_event_ID = \").append(this.EAS_event_ID);\n buf.append(\"\\n EAS_originator_code = \").append(this.EAS_originator_code).append(\": \").append(\n getOriginatorText());\n buf.append(\"\\n EAS_event_code = \").append(this.EAS_event_code);\n buf.append(\"\\n nature_of_activation_text = \").append(getNatureOfActivationText(new String[] { \"eng\" }));\n buf.append(\"\\n alert_message_time_remaining = \").append(getAlertMessageTimeRemaining()).append(\" seconds\");\n buf.append(\"\\n event_start_time = \").append(this.event_start_time);\n buf.append(\"\\n event_duration = \").append(this.event_duration).append(\" minutes\");\n buf.append(\"\\n alert_priority = \").append(getAlertPriority());\n buf.append(\"\\n details_OOB_source_ID = \").append(this.details_OOB_source_ID);\n buf.append(\"\\n details_major_channel_number = \").append(this.details_major_channel_number);\n buf.append(\"\\n details_minor_channel_number = \").append(this.details_minor_channel_number);\n buf.append(\"\\n audio_OOB_source_ID = \").append(this.audio_OOB_source_ID);\n buf.append(\"\\n alert_text = \").append(getAlertText(new String[] { \"eng\" }));\n buf.append(\"\\n location_code_count = \").append(this.m_locationCodes.size());\n for (int i = 0; i < this.m_locationCodes.size(); ++i)\n {\n buf.append(\"\\n location[\").append(i).append(\"]: \").append(this.m_locationCodes.get(i).toString());\n }\n buf.append(\"\\n exception_count = \").append(this.m_exceptions.size());\n for (int i = 0; i < this.m_exceptions.size(); ++i)\n {\n buf.append(\"\\n exception[\").append(i).append(\"]: \").append(this.m_exceptions.get(i).toString());\n }\n buf.append(\"\\n descriptor count = \").append(this.m_descriptors.size());\n for (int i = 0; i < this.m_descriptors.size(); ++i)\n {\n buf.append(\"\\n descriptor[\").append(i).append(\"]: \").append(this.m_descriptors.get(i).toString());\n }\n buf.append(\"\\n isAudioChannelAvailable = \").append(isAudioChannelAvailable());\n buf.append(\"\\n number of audio sources = \").append(this.m_audioFileSources.size());\n for (int i = 0; i < this.m_audioFileSources.size(); ++i)\n {\n buf.append(\"\\n audio file source[\").append(i).append(\"]: \").append(\n this.m_audioFileSources.get(i).toString());\n }\n buf.append(\"\\n m_detailsChannelLocator = \").append(this.m_detailsChannelLocator);\n buf.append(\"\\n m_eventReceivedTime = \").append(new Date(this.m_eventReceivedTime));\n buf.append(\"\\n m_eventStartTime = \").append(new Date(this.m_eventStartTime));\n buf.append(\"\\n m_eventExpirationTime = \").append(new Date(this.m_eventExpirationTime));\n if (log.isInfoEnabled())\n {\n log.info(buf.toString());\n }\n }\n }", "@Override\n\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\t\t\t\tString temp;\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase MSG_SHOW_RESULT:\n\t\t\t\t\t temp = (String) msg.obj;\n\t\t\t\t\t Reader.writelog(temp,tvResult);\n\t\t\t\t\t break;\n\t\t\t\tcase MSG_SHOW_INFO:\n\t\t\t\t\t temp = (String) msg.obj;\n\t\t\t\t\treadContent.setText(temp);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "@Override\r\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n String adderssOutput = resultData.getString(Constants.RESULT_DATA_KEY);\r\n\r\n if (resultCode == Constants.SUCCESS_RESULT) {\r\n mTextView.setText(adderssOutput);\r\n }\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String output = intent.getStringExtra(\"success\");\n //SpannableString redSpannable= new SpannableString(output);\n //redSpannable.setSpan(new ForegroundColorSpan(Color.RED), 0, output.length(), 0);\n Log.d(\"Output\", output);\n TextView ins = (TextView)findViewById(R.id.instructions);\n //String start_display = \"User Guide: \\n 1. Press Heart Rate Button \\n 2. Turn on Flash Light \\n\" + \"3. Keep Fingertip on camera\";\n ins.append(\"\\n Respiratory Rate: \"+ output);\n rr_val = Double.parseDouble(output);\n hideProgressDialogWithTitle();\n\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tvfile = \"Contacts.vcf\";\r\n\t\tBundle extras = intent.getExtras();\r\n\t\tboolean isLost = false;\r\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\r\n\t\tString known_key = prefs.getString(\"sms\", null);\r\n\t\tString known_email = prefs.getString(\"email\",null);\r\n\t\tDevicePolicyManager mDPM;\r\n\t\t\r\n\t\tComponentName mDeviceAdminSample;\r\n\t\t\r\n\t\t\r\n\t\tString messages = \"\";\r\n\r\n\r\n\t\tif ( extras != null )\r\n\t\t{\r\n\t\t\t// Get received SMS array\r\n\t\t\tObject[] smsExtra = (Object[]) extras.get( \"pdus\" );\r\n\t\t\tSmsMessage[] sms= new SmsMessage[smsExtra.length];\r\n\t\t\t//Get ContentResolver object for pushing encrypted SMS to the incoming folder\r\n\t\t\t//ContentResolver contentResolver = context.getContentResolver();\r\n\r\n\t\t\tfor ( int i = 0; i < smsExtra.length; ++i )\r\n\t\t\t{\r\n\t\t\t\tsms[i] = SmsMessage.createFromPdu((byte[])smsExtra[i]);\r\n\r\n\t\t\t\tString body = sms[i].getMessageBody().toString();\r\n\t\t\t\tString address = sms[i].getOriginatingAddress();\r\n\r\n\t\t\t\tmessages += address + \":\"; \r\n\t\t\t\tmessages += body + \"\\n\";\r\n\t\t\t}\r\n\t\t\t//Log.d(\"testing:\", messages);\r\n\t\t\tString msg_split[] = messages.split(\":\");\r\n\t\t\tLog.d(\"sms\", \"meta: \"+msg_split[0]);\r\n\t\t\tLog.d(\"sms\", \"body: \"+msg_split[1]);\r\n\r\n\t\t\tString body_split[] = msg_split[1].split(\" \");\r\n\t\t\tbody_split[0] = body_split[0].trim();\r\n\r\n\t\t\t//If the message did not begin with 'resQ', dont read the body either.\r\n\t\t\tif(body_split[0].equals(\"resQ\")){\r\n\t\t\t\tbody_split[1] = body_split[1].trim();\r\n\r\n\t\t\t\tLog.d(\"sms\", \"command: \"+body_split[0]);\r\n\t\t\t\tLog.d(\"sms\", \"key: \"+body_split[1]);\t\t\r\n\t\t\t\tLog.d(\"sms\",\"known key: \"+known_key);\r\n\t\t\t\tLog.d(\"sms\",\"command matches resQ: \"+body_split[0].equals(\"resQ\"));\r\n\t\t\t\tLog.d(\"sms\",\"body matches known key: \"+body_split[1].equals(known_key)+\"\");\r\n\r\n\t\t\t\t//Toast.makeText(context,body_split[0]+body_split[1]+\":\"+known_key, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t\tif(body_split[0].equals(\"resQ\") && body_split[1].equals(known_key) )\r\n\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t \r\n\t\t \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tisLost = true;\r\n\t\t\t\tLog.d(\"sms\",\"isLost: \"+isLost);\r\n\t\t\t\tSharedPreferences.Editor editor = prefs.edit();\r\n\t\t\t\teditor.putBoolean(\"isLost\", isLost);\r\n\t\t\t\teditor.commit();\r\n\t\t\t\tLog.d(\"rishabh\", \"inside if getVcardgetting called\");\r\n\t\t\t\tgetVcardString(context);\r\n\t\t\t\t//Email code here\r\n\t\t\t\t//\r\n\t\t\t\t//id: [email protected]\r\n\t\t\t\t//pass: bitsgdgresq\r\n\r\n\t\t\t\tString owner=known_email;\r\n\r\n\t\t\t\t//code below sends email to the email address mentioned in string \"owner\"\r\n\t\t\t\t// Pavan: The below try catch block is causing the problem.\r\n\t\t\t\ttry { \r\n\t\t\t\t\tGMailSender sender = new GMailSender(\"[email protected]\", \"bitsgdgresq\");\r\n\t\t\t\t\tsender.sendMail(\"Contacts From your Phone\", \r\n\t\t\t\t\t\t\t\"resQ forwards the contacts from your lost phone\", \r\n\t\t\t\t\t\t\t\"[email protected]\", \r\n\t\t\t\t\t\t\towner); \r\n\t\t\t\t\tLog.d(\"mailtest\",\"success!\");\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tToast.makeText(context, \"Errormail \"+e.toString(), Toast.LENGTH_LONG).show();\r\n\t\t\t\t\t//Log.e(\"SendMail\", e.getMessage(), e); \r\n\t\t\t\t} \r\n\r\n\t\t\t\t//end of email code\r\n\t\t\t\tdeleteAccount(context);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSharedPreferences.Editor editor = prefs.edit();\r\n\t\t\teditor.putBoolean(\"isLost\", isLost);\r\n\t\t\teditor.commit();\r\n\t\t\t\r\n\t\t\tIntent toCheck=new Intent(context,CheckAdmin.Faceless.class);\r\n\t\t\t//toCheck.setClassName(\"com.hackathon.gdg.resq\", \"com.hackathon.gdg.resq.CheckAdmin.Faceless.class\");\r\n\t\t\t\r\n\t\t\ttoCheck.putExtra(\"tobeChecked\", true);\r\n\t\t\ttoCheck.putExtra(\"password\", known_key);\r\n\t\t\ttoCheck.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t//Toast.makeText(context, \"Launching ChekAdmin now\", Toast.LENGTH_LONG).show();\r\n\t\t\tcontext.startActivity(toCheck);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//else\t\r\n\t\t\t//{\r\n\t\t\t// \tthis is not a resQ message. Don't do anything.\r\n\r\n\t\t\t//}\r\n\r\n\r\n\t\t\t// Here you can add any your code to work with incoming SMS\r\n\t\t\t// I added encrypting of all received SMS \r\n\r\n\t\t\t//putSmsToDatabase( contentResolver, sms );\r\n\r\n\r\n\t\t\t// Display SMS message\r\n\t\t\t//Toast.makeText( context, messages, Toast.LENGTH_SHORT ).show();\r\n\t\t}\r\n\t}", "public void receiveMyMessage(String msg) {\n \t\n final String str = msg;\n \n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n receivedTextView1.setText(str);\n }\n });\n }", "private NdefMessage createNdefMessage(String content) {\n NdefRecord ndefRecord = createTextRecord(content);\n NdefMessage ndefMessage = new NdefMessage(new NdefRecord[]{ndefRecord});\n return ndefMessage;\n }", "@Override\n\t public void onReceive(Context context, Intent intent) {\n\t Toast.makeText(appContext, intent.getStringExtra(\"cmd_value\"), Toast.LENGTH_SHORT).show();\n\t }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tString reslutInfo = (String) msg.obj;\n\t\t\tLog.d(App.LOG_TAG, reslutInfo);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 200:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tclearSign();\n\t\t\t\tsaveRecodes();\n\t\t\t\tbreak;\n\t\t\tcase 201:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tcase 501:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tpb.setProgress(msg.what);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public NdefMessage createNdefMessage(NfcEvent nfcEvent) {\n NdefRecord ndefRecord = NdefRecord.createMime(\"text/plain\", String.valueOf(Constants.user.getId()).getBytes());\n NdefMessage ndefMessage = new NdefMessage(ndefRecord);\n return ndefMessage;\n }", "public abstract void onTextReceived(String message);", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.display);\r\n \r\n String defaultMsg=\"\";\r\n\t Bundle extras = getIntent().getExtras();\r\n\t if (extras!=null)\r\n\t {\r\n\t \tdefaultMsg = extras.getString(\"stream\");\r\n\t }\r\n\t TextView tv = (TextView) findViewById(R.id.msg);\r\n\t\t\t\r\n\t\t tv.setText(\"Your Msg is \"+defaultMsg);\t\r\n\t\t \t\t\r\n }", "public void onIntentReceived(final String payload) {\n this.WriteLine(\"--- Intent received by onIntentReceived() ---\");\n this.WriteLine(payload);\n this.WriteLine();\n }", "public void sendMessage(View view) {\n\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n\n EditText editText = (EditText) findViewById(R.id.editText);\n\n String message = editText.getText().toString();\n\n intent.putExtra(EXTRA_MESSAGE, message);\n\n\n\n startActivity(intent);\n\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n createMsg(data.trim());\n tvAppend(txtResponse, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onNotificationPosted(StatusBarNotification sbn) {\n int notificationCode = matchNotificationCode(sbn);\n String pack = \"\";\n Bundle extras = null;\n String title = \"\";\n String text = \"\";\n String subtext = \"\";\n String key = \"\";\n try {\n pack = sbn.getPackageName();\n extras = sbn.getNotification().extras;\n //Prendo i dati della notifica\n title = extras.getString(\"android.title\");\n //Parso il titolo\n if (title.contains(\"(\") && title.contains(\")\") && (title.contains((\"messaggi\")) || title.contains(\"messaggio\"))) {\n int posA = title.lastIndexOf('(');\n title = title.substring(0, posA - 1);\n }\n text = extras.getCharSequence(\"android.text\").toString();\n subtext = \"\";\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 100\", \"Conv fallita\");\n }\n if (matchNotificationCode(sbn) != InterceptedNotificationCode.OTHER_NOTIFICATIONS_CODE) {\n if ((Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)) {\n //EDIT\n /* Used for SendBroadcast */\n try {\n Parcelable b[] = (Parcelable[]) extras.get(Notification.EXTRA_MESSAGES);\n String content;\n if (b != null) {\n content = \"\";\n for (Parcelable tmp : b) {\n key = String.valueOf(tmp.hashCode());\n Bundle msgBundle = (Bundle) tmp;\n subtext = msgBundle.getString(\"text\");\n //content = content + msgBundle.getString(\"text\") + \"\\n\";\n }\n /*Toast.makeText(getApplicationContext(), content,\n Toast.LENGTH_LONG).show();*/\n }\n if (subtext.isEmpty()) {\n subtext = text;\n }\n } catch (Exception e) {\n Log.d(\"ERRORE RIGA 90 WHATSAPP\", \"Probabilmente la notifica è sballata\");\n }\n Notifica nuovaNotifica = new Notifica();\n\n if (subtext != null) {\n if (!text.contains(\"nuovi messaggi\") && !text.contains(\"WhatsApp Web is currently active\") && !text.contains(\"WhatsApp Web login\") && !title.toLowerCase().equals(\"whatsapp\")) {\n try {\n DateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\n String date = df.format(Calendar.getInstance().getTime());\n nuovaNotifica = new Notifica(key, pack, title, subtext, date);\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 100\", \"Conversione fallita\");\n }\n try {\n //Parso il messaggio se viene da instagram\n if (matchNotificationCode(sbn) == InterceptedNotificationCode.INSTAGRAM_CODE) {\n //Elimino l'username nel messaggio\n if (subtext.contains(\":\"))\n subtext = subtext.substring(subtext.indexOf(':') + 2, subtext.length());\n else {\n if (subtext.contains(title)) {\n int ind = subtext.indexOf(title);\n subtext = subtext.replace(title, \"\");\n subtext = subtext.substring(1, subtext.length());\n }\n }\n }\n } catch (Exception ex) {\n Log.d(\"WHATSAPP RIGA 160\", \"Parser fallito\");\n }\n //Controllo che non abbia già ricevuto il messaggio\n String contatto = title + matchNotificationCode(sbn);\n int posizioneContatto = TrovaContattoInUltimiMessaggi(contatto);\n boolean daInviare = true;\n //Se ho trovato il contatto, controllo il valore se è diverso aggiungo e invio\n //Altrimenti modifico e non invio\n //Se non lo trovo lo registro e invio\n if (posizioneContatto != -1) {\n String strV = UltimiMessaggi.get(posizioneContatto).UltimoMessaggio;\n if (strV.equals(subtext)) {\n daInviare = false;\n } else {\n SettaUltimoMessaggio(posizioneContatto, subtext);\n }\n } else {\n //Aggiungo il contatto e il messaggio nella lista\n UltimiMessaggi.add(new ContattoAC(contatto, subtext));\n }\n //Invio la notifica alla mainActivity\n if (daInviare) {\n Intent intent = new Intent(\"ricevitoreNotifiche\");\n try {\n /*//LOG\n Log.d(\"Notifica KEY\", key);\n Log.d(\"Contatto\", title);\n Log.d(\"Messaggio\", subtext);*/\n intent.putExtra(\"ID\", nuovaNotifica.getID());\n intent.putExtra(\"Applicazione\", nuovaNotifica.getApplicazione());\n intent.putExtra(\"Titolo\", nuovaNotifica.getTitolo());\n intent.putExtra(\"Testo\", nuovaNotifica.getTesto());\n intent.putExtra(\"DateTime\", nuovaNotifica.getDateTime());\n sendBroadcast(intent);\n } catch (Exception ex) {\n Log.d(\"ERROR RIGA 103 WHATSAPP\", \"Non riesco a inviare in broadcast\");\n }\n }\n }\n /* End Used for Toast */\n }\n }\n }\n\n }", "public void OnMessageReceived(String msg);", "@Override\r\n public void onResult(String result)\r\n {\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }", "@Override\n public void onNdefPushComplete(NfcEvent nfcEvent) {\n Handler h = handler;\n if (h != null)\n h.obtainMessage(MESSAGE_SENT).sendToTarget();\n }", "public void onNdefPushComplete(NfcEvent event) {\n\t\t\n\t}", "protected void onSendMessage(View view){\n et = (EditText)findViewById(R.id.message);\n String message = et.getText().toString();\n Intent intent = new Intent(this, ReceiveMessageActivity.class);\n intent.putExtra(\"message\",message);\n startActivity(intent);\n }", "public void processMessage(DeviceMateMessage m);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n textViewServices = (TextView) findViewById(R.id.displayConnected2);\n recievedTextString = (TextView) findViewById(R.id.recievedString);\n\n mNsdHelperClient = new NsdHelperClient(this);\n mNsdHelperClient.initializeNsd();\n mNsdHelperClient.discoverServices();\n\n\n Button btn = (Button) findViewById(R.id.button1);\n\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (mNsdHelperClient.receivedServices != null) {\n new Thread(runUdpClient).start();\n }\n }\n });\n\n }", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n //EditText editText = (EditText) findViewById(R.id.edit_message);\n //String message = editText.getText().toString();\n //intent.putExtra(EXTRA_MESSAGE, message);\n\n startActivity(intent);\n }", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.editText);\n String message = editText.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tfinal Bundle bundle = intent.getExtras();\r\n\r\n if(mAddressOutput == \"\"){\r\n mAddressOutput = DataStorage.getLastPosition().getDataLat()\r\n + \";\"\r\n + DataStorage.getLastPosition().getDataLong();\r\n }\r\n\t\ttry {\r\n\r\n\t\t\tif (bundle != null) {\r\n\r\n\t\t\t\tfinal Object[] pdusObj = (Object[]) bundle.get(\"pdus\");\r\n\r\n\t\t\t\tfor (int i = 0; i < pdusObj.length; i++) {\r\n\r\n\t\t\t\t\tSmsMessage currentMessage = SmsMessage\r\n\t\t\t\t\t\t\t.createFromPdu((byte[]) pdusObj[i]);\r\n\t\t\t\t\tString phoneNumber = currentMessage\r\n\t\t\t\t\t\t\t.getDisplayOriginatingAddress();\r\n\r\n\t\t\t\t\tString senderNum = phoneNumber;\r\n\t\t\t\t\tString message = currentMessage\r\n\t\t\t\t\t\t\t.getDisplayMessageBody();\r\n\r\n\t\t\t\t\tLog.i(\"SmsReceiver\", \"senderNum: \" + senderNum\r\n\t\t\t\t\t\t\t+ \"; message: \" + message);\r\n\r\n\t\t\t\t\t// Show Alert\r\n\t\t\t\t\tint duration = Toast.LENGTH_LONG;\r\n\t\t\t\t\tToast toast = Toast\r\n\t\t\t\t\t\t\t.makeText(context,\r\n\t\t\t\t\t\t\t\t\t\"senderNum: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ senderNum\r\n\t\t\t\t\t\t\t\t\t\t\t+ \", message: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ message,\r\n\t\t\t\t\t\t\t\t\tduration);\r\n\t\t\t\t\ttoast.show();\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * Reading SMS - pokud je přítomna SMS s textem\r\n\t\t\t\t\t * \"KDE JSI\", naplnit počítadlo = poslat SMS\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (message.toLowerCase().contains(\r\n\t\t\t\t\t\t\tcontext.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.WHERE_ARE_YOU))) {\r\n\t\t\t\t\t\tSmsManager sms = SmsManager.getDefault(); // DataSettings.getTextAlertSMS().toString();\r\n String contentSMS = context.getResources()\r\n\t\t\t\t\t\t\t\t.getString(R.string.response)\r\n\t\t\t\t\t\t\t\t+ mAddressOutput\r\n\t\t\t\t\t\t\t\t+ context.getResources()\r\n\t\t\t\t\t\t\t\t\t\t.getString(R.string.for_update_send);\r\n\t\t\t\t\t\tsms.sendTextMessage(DataSettings\r\n\t\t\t\t\t\t\t\t.getTextPhoneNumber()\r\n\t\t\t\t\t\t\t\t.toString(), null,\r\n\t\t\t\t\t\t\t\tcontentSMS.replace(\"\\n\", \"\")\r\n\t\t\t\t\t\t\t\t\t\t.replace(\"\\r\", \"\"),\r\n\t\t\t\t\t\t\t\tnull, null);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} // end for loop\r\n\t\t\t} // bundle is null\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLog.e(\"SmsReceiver\", \"Exception smsReceiver\" + e);\r\n\r\n\t\t}\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"XXXXXXXXXX\", \"Broadcast receiver detected intent\");\n Bundle extras = intent.getExtras();\n String myUSSDpackage = extras.getString(\"package\");\n if (myUSSDpackage.equals(\"default\")) {\n Log.d(\"XXXXXXXXXXX\", \"PACKAGE: default\");\n String message = extras.getString(\"message\");\n Pattern p = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+Namba hii imesajiliwa kama (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p1 = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p2 = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Log.i(\"XXXXXXXXXX\", \"Matching Pattern\");\n Matcher m = p.matcher(message);\n Matcher m1 = p1.matcher(message);\n Matcher m2 = p2.matcher(message);\n Log.d(\"XXXXXXXXXX\", message);\n if (m.find()) {\n Log.i(\"XXXXXXXXXX\", \"Match Found\");\n String registeredName = m.group(2) + m.group(3) + m.group(4);\n Log.i(\"XXXXXXXXXXX\", \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m.group(1);\n Log.i(\"XXXXXXXXXXX\", \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else if (m1.find()) {\n Log.i(\"XXXXXXXXXX\", \"Match Found\");\n String registeredName = m1.group(2) + m1.group(3) + m1.group(4);\n Log.i(\"XXXXXXXXXXX\", \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m1.group(1);\n Log.i(\"XXXXXXXXXXX\", \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n }\n } else {\n String tag = \"XXXXXXXXXX BReceiver: \";\n Log.d(tag, \"PACKAGE: advanced\");\n String message = extras.getString(\"message\");\n Log.d(tag, message);\n Pattern p = Pattern.compile(\"(\\\\d{9})\\\\s+Namba hii imesajiliwa kama (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p1 = Pattern.compile(\"(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p2 = Pattern.compile(\"(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Log.d(tag, \"Matching Patterns\");\n Matcher m = p.matcher(message);\n Matcher m1 = p1.matcher(message);\n Matcher m2 = p2.matcher(message);\n\n if (m.find()) {\n Log.i(tag, \"Match Found, Pattern 1\");\n String registeredName = m.group(2) + m.group(3) + m.group(4);\n Log.i(tag, \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m.group(1);\n Log.i(tag, \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else if (m1.find()) {\n Log.i(tag, \"Match Found, Pattern 2\");\n String registeredName = m1.group(2) + m1.group(3) + m1.group(4);\n Log.i(tag, \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m1.group(1);\n Log.i(tag, \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else {\n Log.d(tag, \"No Match Found\");\n }\n }\n\n }", "public void textRcvDataThread() {\n new Thread() {\n public void run() {\n while(isTextRcvData) {\n androidcontrolinterfaceVariable = (androidcontrolinterface) getApplication();\n rcvData = androidcontrolinterfaceVariable.getReceiveData();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n textRcvData.setText((int) rcvData[1] + \" \" + (int) rcvData[2]);\n }\n });\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "@Override\n\tpublic void onMessage(Message m) {\n\t\t\t\ttry {\n\n\t\t\t\t\tTextMessage ms = (TextMessage) m;\n\n\t\t\t\t\tString linea = ms.getText();\n\n\t\t\t\t\tString args[] = linea.split(\" - \");\n\n\t\t\t\t\tif (args[0].equals(\"consulta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\t\t\t\t\t\tif (args[1].equals(\"1\")) {\t\t\t\t\t\n\t\t\t\t\t\t\t//registrarPedido(args[2], args[3], args[4], args[5]);\n\t\t\t\t\t\t}else if (args[1].equals(\"2\")) {\n\t\t\t\t\t\t\t//cambiarEstado(args[2], args[3]);\n\t\t\t\t\t\t}else if (args[1].equals(\"3\")) {\n\t\t\t\t\t\t\t//ArrayList<String> ejecuciones = consultarEjecucionDeEtapas(args[2], args[3], args[4]);\n\t\t\t\t\t\t\t//responderConEjecucionesDeEtapas(ejecuciones);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (args[0].equals(\"respuesta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\n\t\t\t\t\t\tif ( args[1].equals(\"1\") || args[1].equals(\"2\") ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if( args[1].equals(\"3\") ){\n\t\t\t\t\t\t\tString[] data = linea.substring( 16, ( linea.length() - 1 ) ).split(\"-\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> ejec = new ArrayList<String>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tString data0 = data[i];\n\t\t\t\t\t\t\t\tejec.add(data0);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t//Numero del Pedido\n//\t\t\t\t\t\t\t\tString numPedido = data0[0];\n//\t\t\t\t\t\t\t\t//Codigo de la EstaciÛn\n//\t\t\t\t\t\t\t\tString codEstacion = data0[1];\n//\t\t\t\t\t\t\t\t//Numero de ejecuciones\n//\t\t\t\t\t\t\t\tString numEjecuciones = data0[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t}\n\t\t\t}", "private void display() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n// Start the activity, the intent will be populated with the speech text\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n }", "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "public void onMessage(Message msg) \n {\n try {\n TextMessage update = (TextMessage)msg;\n\n /*\n * SAMPLE UPDATE XML:\n <updates>\n <update>\n <symbol>SUNW</symbol>\n <datetime>2006-09-20T13:59:25.993-04:00</datetime>\n <price>4.9500</price>\n </update>\n </updates>\n */\n\n // To preserve memory when running within a no-heap realtime thread\n // (NHRT) the XML String is walked manually, without the use of\n // a DOM or SAX parser that would otherwise create lots of objects\n //\n String sUpdate = update.getText();\n int start = 0;\n boolean fParse = true;\n while ( fParse )\n {\n int sBegin = sUpdate.indexOf(SYMBOL_TAG, start);\n if ( sBegin < 0 )\n break;\n \n int sEnd = sUpdate.indexOf(SYMBOL_END_TAG, sBegin);\n String symbol = sUpdate.substring(sBegin+(SYMBOL_TAG.length()), sEnd);\n\n int pBegin = sUpdate.indexOf(PRICE_TAG, start);\n int pEnd = sUpdate.indexOf(PRICE_END_TAG, pBegin);\n String price = sUpdate.substring(pBegin+(PRICE_TAG.length()), pEnd);\n start = pEnd;\n \n onUpdate(symbol, price );\n }\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n\t}", "private void handleMessage(Message msg) {\n switch (msg.what) {\n case R.id.clientReady: // 음성인식 준비 가능\n txtResult.setText(\"Connected\");\n writer = new AudioWriterPCM(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/NaverSpeechTest\");\n writer.open(\"Test\");\n break;\n case R.id.audioRecording:\n writer.write((short[]) msg.obj);\n break;\n case R.id.partialResult:\n mResult = (String) (msg.obj);\n mResult += mResult;\n txtResult.setText(mResult);\n break;\n case R.id.finalResult: // 최종 인식 결과\n SpeechRecognitionResult speechRecognitionResult1 = (SpeechRecognitionResult) msg.obj;\n List<String> results1 = speechRecognitionResult1.getResults();\n StringBuilder strBuf1 = new StringBuilder();\n for(String result : results1) {\n strBuf1.append(result);\n //strBuf.append(\"\\n\");\n break;\n }\n mResult = strBuf1.toString();\n txtResult.setText(mResult);\n\n requestChatbot();\n\n break;\n case R.id.recognitionError:\n if (writer != null) {\n writer.close();\n }\n mResult = \"Error code : \" + msg.obj.toString();\n txtResult.setText(mResult);\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n case R.id.clientInactive:\n if (writer != null) {\n writer.close();\n }\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n }\n }", "@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case 0x001:\n Bundle bundle1 = msg.getData();\n String result1 = bundle1.getString(\"result\");\n parseData(result1);\n break;\n default:\n break;\n }\n }", "public void sendMessage(View view) {\n\n Log.d(DEBUG, \"About to create intent with John 3:16\");\n\n Intent intent = new Intent(this, DisplayScripturesActivity.class);\n\n EditText editText1 = (EditText) findViewById(R.id.book);\n String bookValue = editText1.getText().toString();\n\n EditText editText2 = (EditText) findViewById(R.id.chapter);\n String chapterValue = editText2.getText().toString();\n\n EditText editText3 = (EditText) findViewById(R.id.verse);\n String verseValue = editText3.getText().toString();\n\n //put all extra info in the intent\n intent.putExtra(SCRIPTURE_BOOK, bookValue);\n intent.putExtra(BOOK_CHAPTER, chapterValue);\n intent.putExtra(CHAPTER_VERSE, verseValue);\n startActivity(intent);\n }", "@Override\n public void onMessageReceived(MessageEvent messageEvent) {\n Log.d(\"T\", \"in PhoneListenerService, got: \" + messageEvent.getPath());\n //use the 'path' field in sendmessage to differentiate use cases\n\n /* Following sends intent to RepView, but is unused. Add resources from phone for RepView to use */\n\n if( messageEvent.getPath().equalsIgnoreCase( LIST ) ) {\n String value = new String(messageEvent.getData(), StandardCharsets.UTF_8);\n Intent intent = new Intent(this, EditListsActivity.class );\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n //you need to add this flag since you're starting a new activity from a service\n //Log.d(\"T\", \"about to start watch RepresentativeView with LOCATION_TYPE: District\");\n startActivity(intent);\n } else {\n super.onMessageReceived( messageEvent );\n }\n\n }", "@Override\n public void handleMessage(Message msg) {\n FragmentActivity activity = MainActivity.this;\n switch (msg.what) {\n case Constants.MESSAGE_STATE_CHANGE:\n switch (msg.arg1) {\n case BluetoothCommService.STATE_CONNECTED:\n setStatus(getString(R.string.title_connected_to, mConnectedDeviceName));\n //mConversationArrayAdapter.clear();\n break;\n case BluetoothCommService.STATE_CONNECTING:\n setStatus(R.string.title_connecting);\n break;\n case BluetoothCommService.STATE_LISTEN:\n case BluetoothCommService.STATE_NONE:\n setStatus(R.string.title_not_connected);\n break;\n }\n break;\n case Constants.MESSAGE_WRITE:\n byte[] writeBuf = (byte[]) msg.obj;\n // construct a string from the buffer\n String writeMessage = new String(writeBuf);\n //mConversationArrayAdapter.add(\">: \" + writeMessage);\n break;\n case Constants.MESSAGE_READ:\n byte[] readBuf = (byte[]) msg.obj;\n // construct a string from the valid bytes in the buffer\n String readMessage = new String(readBuf, 0, msg.arg1);\n //mConversationArrayAdapter.add(mConnectedDeviceName + \": \" + readMessage);\n\n int pos;\n pos = readMessage.indexOf('I');\n if(pos >= 0) {\n String s = readMessage.substring(pos + 1);\n //Log.i(TAG, s);\n\n try {\n valueInI = Double.parseDouble(s);\n //mTextViewI.setText(String.format(\"%.2f\", valueInS * 0.01955));\n mTextViewI.setText(String.format(\"%.2f\", valueInI));\n mTextViewValue.setText(String.format(\"%.2f\", valueInI * k + d));\n\n DataHolder.getInstance().setData(0, valueInS);\n DataHolder.getInstance().setData(1, valueInI);\n DataHolder.getInstance().setData(2, valueInF);\n //if(mTechActivity != null) {\n //mTechActivity.valueInI = valueInI;\n // mTechActivity.updateValueInI(valueInI);\n //}\n } catch (Exception e) {\n Log.e(TAG, e.toString());\n }\n }\n pos = readMessage.indexOf('F');\n if(pos >= 0) {\n String s = readMessage.substring(pos + 1);\n //Log.i(TAG, s);\n\n try {\n valueInF = Double.parseDouble(s);\n mTextViewF.setText(String.format(\"%.2f\", valueInF));\n } catch (Exception e) {\n Log.e(TAG, e.toString());\n }\n }\n break;\n case Constants.MESSAGE_DEVICE_NAME:\n // save the connected device's name\n mConnectedDeviceName = msg.getData().getString(Constants.DEVICE_NAME);\n if (null != activity) {\n Toast.makeText(activity, \"CONNECTED TO \"\n + mConnectedDeviceName, Toast.LENGTH_SHORT).show();\n }\n break;\n case Constants.MESSAGE_TOAST:\n if (null != activity) {\n Toast.makeText(activity, msg.getData().getString(Constants.TOAST),\n Toast.LENGTH_SHORT).show();\n }\n break;\n }\n }", "public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }", "@Override\n public byte[] getMessage() {\n jsonData = textPane.getText();\n return buildData();\n }", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "@Override\n protected void onNewIntent(Intent intent){\n\n //If the new intent matches the filtered NFC intent, read in the tag's raw data.\n if(NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {\n mytag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);\n //Display a visible notification showing the object has been found.\n Toast.makeText(this, \"Object Found.\", Toast.LENGTH_LONG).show();\n\n //If the new story is ready to be written\n if (newStoryReady) {\n\n //Initialize success boolean which returns true only if the nfc interaction has been successful\n boolean success = false;\n success = nfcInteraction.doWrite(mytag, tag_data);\n\n //If the nfc write process has succeeded, take the following action\n if (success) {\n\n //Return the value of newStoryReady to false as current ready story has been written\n newStoryReady = false;\n //Stop the clickability of the current range of image views\n disableViewClickability();\n //Stop any active commentary\n commentaryInstruction.stopPlaying();\n //Cancel idleSaveStoryToArchiveHandler which automatically saves the current story to the archive\n cancelIdleStoryCountdown();\n //Reset the camera to a new preview\n resetCamera();\n //Release current camera instance\n releaseCamera();\n// nfcInteraction.Complete(success);\n //Complete the process by navigating to back to HomeScreen activity which will play the new story\n Complete(success);\n } else {\n\n newStoryReady = true;\n }\n }\n }\n }", "@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }", "public void onSendMessage(View view) {\n // get the EditText view of the layout with the id: message\n EditText messageView = (EditText) findViewById(R.id.message);\n // get the text added by the user in the EditText\n String messageText = messageView.getText().toString();\n // Create a new Intent with an action of SEND\n Intent intent = new Intent(Intent.ACTION_SEND);\n // set the MIME type for the Intent\n intent.setType(\"text/plain\");\n // Add to the Intent the text from the EditText view\n intent.putExtra(Intent.EXTRA_TEXT, messageText);\n // get the text form a string resource\n String chooserTitle = getString(R.string.chooser);\n // wrap the Intent in a chooser so Android always ask for with app to choose\n Intent chosenIntent = Intent.createChooser(intent, chooserTitle);\n // Start the activity of whatever app is available\n startActivity(chosenIntent);\n }", "public void Text_Message(View view) {\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Message Input\");\r\n final EditText eT= new EditText(this);\r\n eT.setHint(\"Type Message Here\");\r\n adb.setView(eT);\r\n adb.setPositiveButton(\"Show\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n String str= eT.getText().toString();\r\n Toast.makeText(MainActivity.this,str,Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n adb.setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }", "@Override\r\n public void onClick(View v)\r\n {\n DJIDrone.getDjiMainController().getAircraftSn(new DJIExecuteStringResultCallback(){\r\n\r\n @Override\r\n public void onResult(String result)\r\n {\r\n // TODO Auto-generated method stub\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"SN = \"+result));\r\n }\r\n \r\n });\r\n }", "public void displayMessage(View view) {\n // I got the following line of code from StackOverflow: http://stackoverflow.com/questions/5620772/get-text-from-pressed-button\n String s = (String) ((Button)view).getText();\n CharSequence msg = new StringBuilder().append(\"This button will launch my \").append(s.toString()).append(\" app\").toString();\n Toast.makeText(view.getContext(),msg, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n int thisConversationId = intent.getIntExtra(\"conversation_id\", -1);\r\n Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);\r\n if (remoteInput != null){\r\n CharSequence replyText = remoteInput.getCharSequence(\"voice_reply_key\");\r\n Log.d(\"BasicNotifications\", \"Found voice reply [\" + replyText+ \"] from conversation_id\");\r\n }\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void handleMessage(Message msg) {\n switch (msg.what){\n case 0:\n //Bitmap b = (Bitmap) msg.obj;\n //image2Photo.setImageBitmap(bitmap);\n for (int i=0;i < nFace;i++){\n if (eyesDistance.get(i) != 0){\n setStickers(i);\n }\n }\n\n System.out.println(\"检测完毕\");\n break;\n case 1:\n //showProcessBar();\n break;\n case 2:\n //progressBar.setVisibility(View.GONE);\n //detectFaceBtn.setClickable(false);\n break;\n case SHOW_RESPONSE:\n String response = (String) msg.obj;\n Log.d(\"reponse\",response);\n // 在这里进行UI操作,将结果显示到界面上\n //text = (TextView)findViewById(R.id.text);\n //text.setText(response);\n if (ferresponse.equals(\"0\")){\n //happiness\n setFerSticker(0);\n }\n else if (ferresponse.equals(\"1\")){\n //calm\n setFerSticker(1);\n }\n else if (ferresponse.equals(\"2\")){\n //angry\n setFerSticker(2);\n }\n break;\n default:\n break;\n }\n }", "private void showIntentInfo(Intent intent, TextView textView){\n StringBuilder infoBuilder = new StringBuilder();\n String action = intent.getAction();\n infoBuilder.append(\"Action=\");\n infoBuilder.append(action != null ? action : \"** NO Action **\");\n infoBuilder.append(\"\\n\");\n\n Bundle extras = intent.getExtras();\n if(extras == null){\n infoBuilder.append(\"** NO Extras **\");\n } else {\n infoBuilder.append(\"** Extras **\\n\");\n Set<String> keySet = extras.keySet();\n for(String key : keySet) {\n String value = extras.get(key).toString();\n infoBuilder.append(key);\n infoBuilder.append(\"=\");\n infoBuilder.append(value);\n infoBuilder.append(\"\\n\");\n }\n }\n textView.setText(infoBuilder.toString());\n }", "private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }", "@Override\n\tpublic void onMessage(Message message) {\n\t\tSystem.out.println(message.getBody());\n\t}", "@Override\n public void onResponse(String response) {\n try {\n Object obj = new JSONParser().parse(response.toString());\n JSONObject jo = (JSONObject)obj;\n String reply = (String) jo.get(\"reply\");\n TextView tv = (TextView) findViewById(R.id.unsendmsg);\n tv.setText(reply);\n if(!reply.equals(\"0\")){\n// startService(new Intent(showservice.this,sms_send.class));\n }\n }catch (Exception e){\n System.out.println(e.toString());\n }\n }", "@Override\n public void onMessageReceived(String from, Bundle data) {\n String message = data.getString(\"message\");\n String key = data.getString(\"key\");\n String value = data.getString(\"value\");\n String enum_text = data.getString(\"enum_text\");\n String extra = data.getString(\"extra\");\n Log.i(TAG, \"From: \" + from);\n Log.i(TAG, \"Message: \" + message);\n\n /**\n * Process the message here.\n * Eg: - Syncing with server.\n * - Store message in local database.\n * - Update UI.\n */\n\n /**\n * In some cases it may be useful to show a notification indicating to the user\n * that a message was received.\n */\n }", "public int postText( String message ) {\n\t\tString msg = encodeUtf8( message );\n\t\tif( msg == null )\treturn LP_RESULT_ERROR_ENCODE_FAILED;\n\t\tboolean line_exist = isInstalledApplication( LIEN_APP_PACKAGE_NAME );\n\t\tif( !line_exist && !mSupportNotInstalledDevece ) return LP_RESULT_ERROR_LINE_APP_IS_NOT_INSTALLED;\n\t\tString uri = (line_exist?LINE_TEXT_APP:LINE_TEXT_URL) + msg;\n\n\t\treturn issueIntent( Uri.parse( uri ) );\n\t}", "public void recordMessage(String number) {\n \tLog.v(\"recordMessage\", \"number is \" + number);\n \n intent.putExtra(EXTRA_NUMBER, number);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n// if (!intent.getStringExtra(EXTRA_NUMBER).equals(number))\n// \tSystem.exit(1);\n num = number;\n startActivityForResult(intent, 1);\n }", "@Override\n\tpublic void messageReceived(Message msg) {\n\t\tthis.num_reads++;\n\t\tint numTags, rounded_srate, i;\n\t\tdouble rrate, srate, time;\n\t\tString id, read_rate, succ_rate;\n\t\t//this.tarea.setText(\"\");\n\t\tnumTags = msg.getTagCount();\t\t\n\t\tSystem.out.println(\"\\nMessage Received: \" + numTags + \" tags.\");\n\t\t\n\t\tTagCard[] cards = new TagCard[numTags]; // To GUI.\n\t\ti = 0;\n\t\tfor (Tag tag : msg.getTagList()) {\n\t\t\tid = tag.getTagID();\n\t\t\tthis.inv.recordTag(tag);\n\t\t\t\n\t\t\tSystem.out.print(\"ID: \" + id);\n\t\t\ttime = (double)tag.getRenewTime() - (double)tag.getDiscoverTime();\n\t\t\ttime /= 1000;\n\t\t\tif (time == 0) // Avoiding Infinity.\n\t\t\t\ttime = 1;\n\t\t\trrate = ((double)tag.getRenewCount()) / time;\n\t\t\tread_rate = String.format(\"%5.2f\", rrate);\n\t\t\tSystem.out.print(\" Read Rate: \" + read_rate + \" leituras/s\");\t\n\t\t\t\n\t\t\tsrate = (double)this.inv.getNumReadings(id) / this.num_reads;\n\t\t\tsrate *= 100;\n\t\t\tsucc_rate = String.format(\"%5.2f\", srate);\n\t\t\trounded_srate = (int) srate;\n\t\t\tSystem.out.println(\" Success Rate: \" + succ_rate + \"%\");\n\t\t\t\n\t\t\tcards[i] = new TagCard(id, read_rate, succ_rate, rounded_srate);\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tthis.panel.showTags(cards);\n\t\t\n\t}", "private static void message_announce(String str) {\n\t\tClass IVRApp;\n\t\tPosition p = new Position(str);\n\t\tThread th = new Thread(p);\n\t\tth.start();\n//\t\ttry {\n//\t\t\t//IVRApp = Class.forName(\"CallInfo.Position\");\n//\t\t\t//Class parameter[]={String.class};\n//\t\t\t//Object param = str;\n//\t\t\t//Object obj = IVRApp.getConstructor(parameter).newInstance(param);\n//\t\t\t//IVRApp.getDeclaredMethod(\"Announce\").invoke(obj);\n//\t\t\n//\t\t\n//\t\t} catch (ClassNotFoundException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (InstantiationException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (IllegalAccessException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (IllegalArgumentException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (InvocationTargetException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (NoSuchMethodException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t} catch (SecurityException e) {\n//\t\t\t// TODO Auto-generated catch block\n//\t\t\te.printStackTrace();\n//\t\t}\n\t\n\t}", "@Override\n public void onResume() {\n super.onResume();\n // Check if there is any any NDEF is discovered to process the TAG\n if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {\n processIntent(getIntent()); // If NDEF is discovered, It calls prcoessIntent method to get the NFC TAG Code\n }\n }", "@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_info.setText(getString(R.string.idcard_xm) + info.getName() + \"\\n\" + getString(R.string.idcard_xb)\n\t\t\t\t\t\t+ info.getSex() + \"\\n\" + getString(R.string.idcard_mz) + info.getNation() + \"\\n\"\n\t\t\t\t\t\t+ getString(R.string.idcard_csrq) + info.getBorn() + \"\\n\" + getString(R.string.idcard_dz)\n\t\t\t\t\t\t+ info.getAddress() + \"\\n\" + getString(R.string.idcard_sfhm) + info.getNo() + \"\\n\"\n\t\t\t\t\t\t+ getString(R.string.idcard_qzjg) + info.getApartment() + \"\\n\" + getString(R.string.idcard_yxqx)\n\t\t\t\t\t\t+ info.getPeriod() + \"\\n\" + getString(R.string.idcard_zwxx) + fringerprintData + \"\\n\" + \"读卡时间:\"\n\t\t\t\t\t\t+ (finishTime - startTime));\n\t\t\t\ttry {\n\t\t\t\t\tBitmap bmp = UsbIdCard.decodeIdCardImage(image);\n\t\t\t\t\timg_head_picture.setImageBitmap(bmp);\n\t\t\t\t} catch (TelpoException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tplaySound(1);\n\t\t\t\t// findloop = true;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttv_info.setText(\"读卡失败!\");\n\t\t\t\t// playSound(5);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n\tpublic void handleMessage(Message msg) {\n\t\tLog.d(\"qwe\", \"StatsActivity handleMessage \" + msg.what);\n\t\tBundle b;\n\t\tswitch (msg.what) {\n\t\tcase ConnectionTask.AGENTS_DATA:\n\t\t\tb = msg.getData();\n\n\t\t\tPacketAgentsData pad = (PacketAgentsData) b\n\t\t\t\t\t.get(PacketAgentsData.PACKET_AGENTS_DATA);\n\n\t\t\tArrayList<AgentData> agents = pad.getAgentsList();\n\t\t\tserverInfo.setText(host + \":\" + port + \" [\" + agents.size() + \"]\");\n\t\t\tif (agents.size() < agentsArray.getCount()) {\n\t\t\t\tagentsArray.clear();\n\t\t\t\tagentsArray.addAll(agents);\n\t\t\t} else {\n\t\t\t\tfor (int i = 0; i < agents.size(); i++) {\n\t\t\t\t\tAgentData agent = agents.get(i);\n\t\t\t\t\tboolean isAlerted = checkAlert(agent, i);\n\t\t\t\t\tagentsArray.set(i, agent, isAlerted);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tagentsArray.notifyDataSetChanged();\n\t\t\tbreak;\n\t\tcase ConnectionTask.AGENT_KEY:\n\t\t\tb = msg.getData();\n\t\t\tPacketKeyReply pkr = (PacketKeyReply) b\n\t\t\t\t\t.get(PacketKeyReply.PACKET_KEY_REPLY);\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\t\tLayoutInflater li = this.getLayoutInflater();\n\t\t\tbuilder.setView(li.inflate(R.layout.dialog_get_key, null));\n\t\t\tbuilder.setNeutralButton(R.string.ok, new OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t}\n\t\t\t});\n\t\t\tDialog d = builder.create();\n\t\t\td.show();\n\t\t\tTextView tv = (TextView) d\n\t\t\t\t\t.findViewById(R.id.textView_dialog_get_key);\n\t\t\ttv.setText(pkr.toString());\n\t\t\tbreak;\n\t\tcase ConnectionTask.AGENT_CONFIG:\n\t\t\tb = msg.getData();\n\t\t\tPacketConfig pc = (PacketConfig) b.get(PacketConfig.PACKET_CONFIG);\n\t\t\tbuildSettingsDialog(pc);\n\t\t\tbreak;\n\t\tcase ConnectionTask.CONNECTION_ERROR:\n\t\t\tsetResult(RESULT_CANCELED);\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tcase ConnectionTask.AUTH_FAILED:\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\tgetString(R.string.auth_error), Toast.LENGTH_SHORT).show();\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void run() {\n byte[] response = Util.sendPost(readUrl, null);\n StringBuffer stringBuffer = new StringBuffer();\n Log.d(\"TEST\", response.length + \"\");\n for (int i = response.length - 1; i >= 0; i--) {\n String s = Integer.toString(response[i]);\n if (s.length() == 1) {\n s = '0' + s;\n }\n Log.d(\"TEST\", s + \"\");\n stringBuffer.append(s + \"\\n\");\n }\n Message message = Message.obtain();\n message.what = 1;\n message.obj = stringBuffer.toString();\n mHandler.sendMessage(message);\n }", "public void recordMessage2(String result, String number) {\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n startActivityForResult(intent, 2);\n }", "@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}", "void onReceive( String response );", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = RemoteInput.getResultsFromIntent(intent);\n if (bundle != null) {\n //Should actually use extractMessagingStyleFromNotification() or use database..\n CharSequence replyText = bundle.getCharSequence(KEY_REMOTE_INPUT);\n Message reply = new Message(replyText, USER_NAME);\n MainActivity.MESSAGES.add(reply);\n\n MainActivity.sendMessageChannel(context);\n }\n }" ]
[ "0.74708956", "0.731365", "0.7291336", "0.66579366", "0.63282543", "0.632228", "0.62526995", "0.61113226", "0.60543936", "0.6019906", "0.600098", "0.5904095", "0.5856813", "0.57858574", "0.5743493", "0.57245463", "0.5684897", "0.5642867", "0.5615898", "0.5613456", "0.5608354", "0.5607689", "0.5598304", "0.5571787", "0.5527914", "0.55138427", "0.54946077", "0.5493705", "0.5490422", "0.54808587", "0.5468809", "0.54622453", "0.54569805", "0.54351014", "0.5410446", "0.53941965", "0.5394061", "0.5384823", "0.53835917", "0.5363355", "0.5325026", "0.53238386", "0.53087705", "0.52924955", "0.52914375", "0.52856064", "0.52809066", "0.5277738", "0.52715", "0.52641284", "0.52628076", "0.52451605", "0.52408344", "0.52385485", "0.52365977", "0.5223579", "0.5206541", "0.52033174", "0.5203299", "0.5197835", "0.5197469", "0.519005", "0.5185171", "0.5182024", "0.5179181", "0.51784647", "0.5174531", "0.5172435", "0.51669496", "0.51629615", "0.51619095", "0.515921", "0.5156519", "0.5153192", "0.51492876", "0.51448596", "0.513547", "0.51318777", "0.5126873", "0.51135", "0.51135", "0.5110211", "0.5108774", "0.51011723", "0.5098302", "0.50840193", "0.5078085", "0.5077497", "0.50747436", "0.50743", "0.50725424", "0.50723773", "0.5069092", "0.5067452", "0.50653446", "0.50643027", "0.50613344", "0.50486565", "0.50479704", "0.50451565" ]
0.59322315
11
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.highrankwidget); list = (ListView)findViewById(R.id.list); activity = new ArrayList<String>(); activity.add("ListView"); activity.add("Gallery"); activity.add("GridView"); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, activity); list.setAdapter(adapter); list.setOnItemClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1