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
Removes a keycode used to invoke this Action.
public final void removeKeyCode(int keyCode) { mKeyCodes.remove(keyCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unsetKeyBox();", "public X unregisterAction(KeyStroke aKeyStroke) {\n component.unregisterKeyboardAction(aKeyStroke);\n return (X) this;\n }", "public Action remove(Object key) {\n\t\treturn removeAction(key);\n\t}", "public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }", "void unsetKeyWheel();", "public void unlistenByKey(String key) {\n APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + \".unlistenByKey(%s);\", wrapQuotes(key)));\n }", "public void keyUp(int keycode){\n this.heldKeys[keycode+1] = -1;\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent arg0) {\n\t\tactionPerformed(null);\r\n\t}", "@Override\n public native void keyRelease(int keycode);", "@Override\n\tpublic void removeAction(int actionId) {\n\t\t\n\t}", "void remove(KeyType key);", "public void remove(int key) {\n\n }", "public void setKeyReleased(int keyCode){\n this.keys[keyCode] = false;\n\n }", "@Override\r\n\tpublic String press() {\n\t\treturn null;\r\n\t}", "public void resetAction()\r\n {\r\n this.action = null;\r\n }", "public Builder clearMinigameAction() {\n if (minigameActionBuilder_ == null) {\n minigameAction_ = null;\n onChanged();\n } else {\n minigameAction_ = null;\n minigameActionBuilder_ = null;\n }\n\n return this;\n }", "void removeKey(int i);", "public Action removeAction(Object key) {\n\t\tAction action = (Action) remove(key);\n\t\tif (action != null) {\n\t\t\tactionList.remove(action);\n\t\t\tif (action instanceof ForwardingAction)\n\t\t\t\t((ForwardingAction) action)\n\t\t\t\t\t\t.removeActionListener(actionForwarder);\n\t\t}\n\t\treturn action;\n\t}", "@Override\n public void nativeKeyAction(int keyCode) {\n getProgramController().nativeKeyAction(keyCode);\n }", "public void removeOnPress(Runnable action) {\n onPress.remove(action);\n }", "public boolean removeActionKey(String name, InputKey key) {\n synchronized(actions) {\n InputAction action = actions.get(name);\n if(action != null)\n return action.removeKey(key);\n return false;\n }\n }", "private static void removeFromKey(SelectionKey key, int op)\n {\n int status = key.interestOps() ^ op;\n if (status == 0) {\n terminateKey(key);\n } else {\n key.interestOps(status);\n }\n }", "void unsetIdentifier();", "@Override\n\t\t\tpublic boolean onKeyDown (int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "public abstract void removeAction(Context context, NAAction action);", "private void uninstall()\r\n {\r\n // do not listen to any other key strokes\r\n editor.getViewer().removeVerifyKeyListener(this);\r\n\r\n editor.getViewer().getTextWidget().removeFocusListener(this);\r\n\r\n editor.setStatusMessage(\"\");\r\n }", "void clear(String key);", "void onCancel(int key);", "void invalidate(String key);", "@Override\n public boolean keyUp(int keycode) {\n return false;\n }", "public void remove(int key) {\n data[key % KEY] = -1;\n\n }", "private void unuseDefaultKeyMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unuseDefaultKeyMenuItemActionPerformed\n keyInfoUserTextField.setText(EMPTY);\n keySearchPhotoTextField.setText(EMPTY);\n keySearchUserTextField.setText(EMPTY);\n keygetGroupsTextFIeld.setText(EMPTY);\n unuseDefaultKeyMenuItem.setEnabled(false);\n useDefaultMenuItem.setEnabled(true);\n }", "public void clearDebitKeyCode() {\n genClient.clear(CacheKey.debitKeyCode);\n }", "public void unsetCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CODE$6, 0);\n }\n }", "void unsetEvent();", "void removeHas_action(Action oldHas_action);", "public void unset(){\n\t\tcurrentInst = -1;\n\t}", "public void unsetSwiftCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWIFTCODE$8, 0);\n }\n }", "public void keyReleased() {\t\t\r\n \t\t\r\n \t\tkeys[keyCode] = false;\r\n \t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif (e.isActionKey()) {\n\t\t\tSquare a = (Square) KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();\n\t\t\tmoveFromTo(e, a).grabFocus();\n\t\t}\n\t\telse if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {\n\t\t\tSquare a = (Square) e.getSource();\n\t\t\tcontroller.input(a.getRow(), a.getCol(), '0');\n\t\t\ta.setText(\"\");\n\t\t}\n\t}", "public void useKey() {\n Key key = this.getInventory().getFirstKey();\n if (key != null){\n this.getInventory().removeItems(key);\n }\n }", "public Builder clearActionCommand() {\n bitField0_ = (bitField0_ & ~0x00000010);\n actionCommand_ = 0;\n onChanged();\n return this;\n }", "public void removeChar(int index) {\r\n\t\tcommandsQueue.add(new String[] { \"remove\", \"\" + index });\r\n\t}", "private void removeEvaluator(Object key)\n {\n this.evaluators.remove(key);\n }", "void remove(String aKey);", "@Override\r\n public void keyReleased(KeyEvent e) {\r\n switchKey(e.getKeyCode(), false);\r\n }", "public void removeOwnKeyBindings() {\n getPolymerElement().removeOwnKeyBindings();\n }", "public void keyReleased(KeyEvent e) \r\n {\r\n \tkeyUser = 0;\r\n }", "int getKeyCode();", "void clearActions();", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclear();\r\n\t\t\t}", "public void remove(int key) {\n newkey = hashfunc(key);\n arr[newkey]= -1;\n \n }", "public void revoke();", "@Override\n public void keyReleased(KeyEvent e) {\n\n keyPressed[e.getKeyCode()] = false;\n\n updateFlags();\n\n }", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\r\n\tpublic Boolean clearCode() {\r\n\t\tcode = null;\r\n\t\treturn true;\r\n\t}", "public JsStatement removeAttr(String key)\n\t{\n\t\tchain(AttributesHelper.removeAttr(key));\n\t\treturn this;\n\t}", "@Override\n\t\t\tpublic boolean keyUp(int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "public ActionChanger<?> removeAction(final int index) {\n final ActionChanger<?> action = actions.remove(index);\n action.setButton(null);\n return action;\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent arg0) {\n\t\tcdx = 0;\r\n\t}", "private void clearJButtonActionPerformed(ActionEvent event) {\n securityCodeJPasswordField.setText(\"\");\n\n }", "public void remove() {\n/* 91 */ throw new UnsupportedOperationException(\"Can't remove keys from KeyStore\");\n/* */ }", "@Override\r\n\tpublic int deletBoard(int keyNumber) {\n\t\treturn session.delete(namespace+\"deletBoard\", keyNumber);//mapper에 등록 한 아이디값과 경로(statement),받을값(파라메터지정-인터페이스 키값)\r\n\t}", "@Override\n\t\t\tpublic boolean keyDown(int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "public void actionPerformed(ActionEvent e)\n\t{\n\t\tview.removeButton();\n\t}", "@Override\n public void revoke() {\n\t\t\tcore(HexEditorConstants.CELL_STATUS_UNDO);\n\t\t\tif (singleCommand) {\n\t\t\t\ttable.select(row);\n\t\t\t\tcursor.setSelection(row, col + 1);\n\t\t\t}\n\t\t}", "protected abstract void _del(String key);", "public final void stop() {\n isKeyPressed = false;\n keyReleased();\n }", "public void remove(String key) throws IOException;", "void unsetMethod();", "public boolean removeAction(AccessibilityAction action) {\n/* 364 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void undoAction(){}", "public Object remove(Object key)\n\t{\n\t\tremoveOperator(key);\n\t\tremoveLogicalOperator(key);\n\t\treturn super.remove(key);\n\t}", "void remove(String key);", "void remove(String key);", "void remove(String key);", "public void removeActionListener (ActionListener l)\r\n {\r\n editor.removeActionListener (l);\r\n }", "public void keyDown(int keycode){\n this.heldKeys[keycode+1] = 0;\n this.showCursor = true;\n this.frameCount = 0;\n //Keys that should only be pressed once\n if(keycode == Input.Keys.ENTER){\n if(this.enterText != null) {\n this.enterText.action(this.sOut.toString());\n }\n this.sOut = new StringBuilder();\n this.curPos = 0;\n }\n }", "public void dec(String key);", "@Override\n\tpublic void keyBack() {\n\t\t\n\t}", "public void keyReleased (KeyEvent e)\r\n {\r\n \tkeyPressed = false;\r\n \tkeyReleased = true;\r\n \tkey = 0;\r\n }", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "final void remove(String key) {\n remove(key, false);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\tclear_mousePressed();\n\t\t}", "public static Object remove(String key){\n return getThreadContext().remove(key);\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent arg0) {\n\t\tctrl = false;\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent ae){\n\t\treset();\n\t}" ]
[ "0.6804547", "0.64474505", "0.6409575", "0.6355756", "0.61752665", "0.5928983", "0.587623", "0.5795397", "0.5793737", "0.5697893", "0.5695954", "0.56937426", "0.56887996", "0.5669564", "0.5657216", "0.5657149", "0.5644669", "0.56312084", "0.5606015", "0.56039864", "0.56005794", "0.5578892", "0.5558821", "0.5553729", "0.55436885", "0.55282104", "0.5516775", "0.5498993", "0.5497459", "0.5485942", "0.5455119", "0.54539275", "0.5452382", "0.54208267", "0.5408421", "0.53998625", "0.53959733", "0.53946006", "0.5385893", "0.5383457", "0.53762347", "0.53761196", "0.5363706", "0.53454363", "0.53331006", "0.5331111", "0.5322209", "0.53195554", "0.5317629", "0.53168935", "0.5316206", "0.5316206", "0.5316206", "0.5316206", "0.5316206", "0.5316206", "0.53151536", "0.5313335", "0.5300083", "0.529396", "0.52846587", "0.52846587", "0.52846587", "0.52846587", "0.52846587", "0.52846587", "0.52846587", "0.52846587", "0.5281707", "0.52804154", "0.52792937", "0.5278589", "0.5277602", "0.5271236", "0.5269912", "0.5269898", "0.526241", "0.52500427", "0.5246624", "0.52425635", "0.5232686", "0.5231412", "0.52196187", "0.521883", "0.52143055", "0.5211175", "0.5207298", "0.5207298", "0.5207298", "0.5186127", "0.5176281", "0.51745737", "0.5174093", "0.51739264", "0.51703966", "0.51693", "0.51682234", "0.51659834", "0.5158688", "0.5145389" ]
0.6042321
5
Returns true if the Action should respond to the given keycode.
public final boolean respondsToKeyCode(int keyCode) { return mKeyCodes.contains(keyCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean keyInput(int code, int action);", "public boolean isKeyPressed (int keycode) {\n\t\treturn glfwGetKey(window, keycode) == GLFW_PRESS;\n\t}", "public boolean isKeyTriggered ( @NotNull final KeyEvent event )\n {\n return keyCode != null && event.getKeyCode () == keyCode;\n }", "public boolean keyPressed(KeyEvent e);", "private boolean isPressed(KeyCode key) {\n \t\n return keys.getOrDefault(key, false);\n }", "boolean mo1311a(KeyEvent keyEvent);", "private boolean isPressed(KeyCode key) {\n\t\treturn keys.getOrDefault(key, false);\n\t}", "@OnlyIn(Dist.CLIENT)\n\tprivate boolean isPressing(int key){\n\t\tlong window = Minecraft.getInstance().getMainWindow().getHandle();\n\t\treturn GLFW.glfwGetKey(window, key) == GLFW.GLFW_PRESS;\n\t}", "boolean onKeyPressed(KeyEvent event);", "public boolean isKeyDown(int keyCode){\n return keys[keyCode];\n }", "public boolean isKeyDown(String key) {\n\t\treturn input.isKeyDown(keyFromString(key));\n\t}", "boolean hasActionCommand();", "public final boolean mo4362a(KeyEvent keyEvent) {\n return super.dispatchKeyEvent(keyEvent);\n }", "private boolean checkActionAccelerators(KeyEvent e) {\n for (NavigatorAction action : gui.getActions()) {\n KeyStroke stroke = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);\n\n if (stroke == null) {\n continue;\n }\n\n boolean shiftOk = (InputEvent.SHIFT_MASK & stroke.getModifiers()) == 0\n || e.isShiftDown();\n boolean ctrlOk = (InputEvent.CTRL_MASK & stroke.getModifiers()) == 0\n || e.isControlDown();\n\n if (stroke.getKeyCode() == e.getKeyCode() && shiftOk && ctrlOk) {\n action.actionPerformed(null);\n return true;\n }\n }\n\n return false;\n }", "public boolean isTriggered ( @NotNull final KeyEvent event )\n {\n return areControlsTriggered ( event ) && isKeyTriggered ( event );\n }", "boolean hasAction();", "boolean hasAction();", "@Override\n\t\t\tpublic boolean keyUp(int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "boolean mo719a(KeyEvent keyEvent) throws RemoteException;", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\treturn false;\n\t}", "public boolean activate(SelectionKey key) {\n // delegate to the run() method to handle the newly arrived accept \n // event.\n this.run();\n return true;\n }", "public boolean keyTyped(gb gui, char keyChar, int keyCode) {\n/* 222 */ if (keyCode == NEIConfig.getKeyBinding(\"recipe\"))\n/* 223 */ return transferRect(gui, false); \n/* 224 */ if (keyCode == NEIConfig.getKeyBinding(\"usage\")) {\n/* 225 */ return transferRect(gui, true);\n/* */ }\n/* 227 */ return false;\n/* */ }", "public boolean keyDown(int keycode)\n {\n if ( keycode == Keys.SPACE )\n spaceship.shoot();\n\n if ( keycode == Keys.X )\n spaceship.warp();\n \n return false; \n }", "public boolean isKeyDown(int keyCode) {\n\t\treturn input.isKeyDown(keyCode);\n\t}", "public boolean hasAction() {\n return Check.hasLength(action);\n }", "boolean hasMinigameAction();", "@Override\n\t\t\tpublic boolean keyDown(int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean isKeyAvailable(String key) {\n return guiButtons.containsKey(key);\n }", "@java.lang.Override\n public boolean hasMinigameAction() {\n return minigameAction_ != null;\n }", "public boolean performShortcut(int keyCode, KeyEvent event, int flags);", "boolean tryDispatchKeyEvent(java.awt.event.KeyEvent e) throws X;", "public static boolean keyIsPressed(char key, int timeoutMillis) {\n return cvWaitKey(timeoutMillis) == key;\n }", "public static boolean isKeyDown(int k) {\n switch (k) {\n case KeyEvent.VK_UP:\n case KeyEvent.VK_W:\n return keyUp;\n case KeyEvent.VK_DOWN:\n case KeyEvent.VK_S:\n return keyDown;\n case KeyEvent.VK_LEFT:\n case KeyEvent.VK_A:\n return keyLeft;\n case KeyEvent.VK_RIGHT:\n case KeyEvent.VK_D:\n return keyRight;\n case KeyEvent.VK_SPACE:\n return keyShoot;\n default:\n return false;\n }\n }", "public boolean send() {\n\t\tif (!isValid())\n\t\t\treturn false;\n\t\tif (ActionBar.sendKey(getSlot()))\n\t\t\treturn true;\n\t\tWidgetChild main = SlotData.getMainChild(getSlot());\n\t\treturn WidgetUtil.visible(main) && EntityUtil.interact(false, main);\n\t}", "@Override\n public boolean keyUp(int keycode) {\n return false;\n }", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean keyDown(int keycode) {\n\t\treturn false;\n\t}", "public boolean doAction(final String action) {\n return doAction(action, null);\n }", "public boolean hasActionCommand() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean hasActionCommand() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean processKey(int code, int action) {\n\t\tif (m_motionMode == NvCameraMotionType.FIRST_PERSON) {\n\t // FPS mode uses WASD for motion, so that UI can own arrows for focus control.\n\t switch(code) {\n\t case NvKey.K_W:\n\t if (action == NvKeyActionType.UP) {\n\t if (m_zVel_kb == +1) // only turn our own value 'off'\n\t m_zVel_kb = 0;\n\t } else {\n\t m_zVel_kb = +1;\n\t }\n\t return true;\n\t case NvKey.K_S:\n\t if (action == NvKeyActionType.UP) {\n\t if (m_zVel_kb == -1) // only turn our own value 'off'\n\t m_zVel_kb = 0;\n\t } else {\n\t m_zVel_kb = -1;\n\t }\n\t return true;\n\n\t case NvKey.K_A:\n\t if (action == NvKeyActionType.UP) {\n\t if (m_xVel_kb == -1) // only turn our own value 'off'\n\t m_xVel_kb = 0;\n\t } else {\n\t m_xVel_kb = -1;\n\t }\n\t return true;\n\t case NvKey.K_D:\n\t if (action == NvKeyActionType.UP) {\n\t if (m_xVel_kb == +1) // only turn our own value 'off'\n\t m_xVel_kb = 0;\n\t } else {\n\t m_xVel_kb = +1;\n\t }\n\t return true;\n\t }\n\t }\n\n\t return false;\n\t}", "@Override\r\n \t\t\tpublic boolean isAllowed(long sessionId, String actionKey) {\n \t\t\t\treturn false;\r\n \t\t\t}", "public boolean canProceedWithTapAction() {\n return ClickDelayHelper.canProceedWithTapAction();\n }", "@Override\n public boolean isPressed(Action query) {\n for (InputEventTranslator t : translators) {\n if (t.isPressed(query))\n return true;\n }\n\n return false;\n }", "public boolean existAcceleratorKey(final KeyStroke keyStroke){\n for(final ProModAction action : notationActionsMap.values()){\n final KeyStroke key = (KeyStroke) action.getValue(AbstractAction.ACCELERATOR_KEY);\n\n if(key != null && key.equals(keyStroke)){\n return true;\n }\n }\n\n for(final ModuleSpecificActions moduleSpecificActions : moduleActionsMap.values()){\n if(moduleSpecificActions.existAcceleratorKey(keyStroke)){\n return true;\n }\n }\n\n return false;\n }", "@Override\r\n\tpublic boolean dispatchKeyEvent(KeyEvent event) {\n\t\tLog.d(TAG, \"dispatchKeyEvent===\"+event.getKeyCode()+\"\");\r\n\t\treturn super.dispatchKeyEvent(event);\r\n\t}", "public static boolean isDown(char key) {\n\t\treturn keyNames.contains(key);\n\t}", "public abstract boolean checkAction(String str);", "@Override\n\t\t\tpublic boolean onKeyDown (int keycode) {\n\t\t\t\treturn false;\n\t\t\t}", "public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}", "private boolean canPerformAction(String actionName, Action action, Value value) {\n\t\tif (actions.get(actionName) != null && actions.get(actionName).compareTo(String.valueOf(action) + \"_\" + String.valueOf(value)) == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean hasPlainAction();", "boolean isCtrlKeyDown();", "public final boolean isAction(String action) {\n return action != null\n && this.action.hashCode() == action.hashCode()\n && this.action.equals(action);\n }", "public boolean getKeyJustPressed(InputKey key) {\n return justPressedKeys.contains(key);\n }", "public void hasKey() {\n\t\tif (checkKey(Integer.parseInt(getCurrentPositionX()),Integer.parseInt(getCurrentPositionY()))) {\n\t\t\tDisplay.setKey(\"Yes\");\n\t\t\tDisplay.setMessage(\"You have found a key! Try to go through a house!\");\n\t\t}\n\t}", "public static boolean event()\n\t{\n\t\tif (realmScreenActive)\n\t\t{\n\t\t\tif (RealmListFrame.event())\n\t\t\t\treturn (true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (creatingCharacter)\n\t\t\t{\n\t\t\t\tcharacter.event();\n\t\t\t\tif (Keyboard.getEventKey() == Keyboard.KEY_RETURN || Keyboard.getEventKey() == 156)\n\t\t\t\t\tcreateCharacter();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (deletingCharacter)\n\t\t\t\t{\n\t\t\t\t\tif (Keyboard.getEventKey() == Keyboard.KEY_RETURN || Keyboard.getEventKey() == 156)\n\t\t\t\t\t\tdeleteCharacter();\n\t\t\t\t\telse\n\t\t\t\t\t\tdeleteCharacter.event();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (Keyboard.getEventKey() == Keyboard.KEY_DOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (selectedCharacterIndex < totalCharacter-1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tselectedCharacter[selectedCharacterIndex] = false;\n\t\t\t\t\t\t\tselectedCharacterIndex++;\n\t\t\t\t\t\t\tselectedCharacter[selectedCharacterIndex] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (Keyboard.getEventKey() == Keyboard.KEY_UP)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (selectedCharacterIndex > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tselectedCharacter[selectedCharacterIndex] = false;\n\t\t\t\t\t\t\tselectedCharacterIndex--;\n\t\t\t\t\t\t\tselectedCharacter[selectedCharacterIndex] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (Keyboard.getEventKey() == Keyboard.KEY_RETURN || Keyboard.getEventKey() == 156)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (currentAlert.isActive())\n\t\t\t\t\t\t\tcurrentAlert.setInactive();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tloadCharacterInfo();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (false);\n\t}", "public boolean hasMinigameAction() {\n return minigameActionBuilder_ != null || minigameAction_ != null;\n }", "public static boolean matchesForwardBinding(int givenStateMask, int givenKeyCode) {\n int requiredStateMask = 0;\n int requiredKeyCode = 0x1000004;\n\n if (Platform.isWindows() || Platform.isLinux()) {\n requiredStateMask = SWT.ALT;\n }\n\n if (Platform.isMac()) {\n requiredStateMask = SWT.COMMAND;\n }\n\n return ((requiredStateMask + requiredKeyCode) == (givenStateMask + givenKeyCode));\n }", "public boolean mo34441a(int i, KeyEvent keyEvent) {\n return false;\n }", "public boolean keyDown (Event e, int key) \n\t{ \n\t\tif (numClicks == 1)\n\t\t{\n\t\t\t// user presses left cursor key. It only does something if the\n\t\t\t//hSpeed of the PaperAirplane is greater than -5, preventing the\n\t\t\t//PaperAirplane from turning excessively (and going upwards).\n\t\t\tif (key == Event.LEFT && p.getHSpeed () > -5)\n\t\t\t{ \n\t\t\t\tp.turnLeft ();\t//Uses the method turnLeft () in the\n\t\t\t\t\t\t\t\t//PaperAirplane class, which decreases the value\n\t\t\t\t\t\t\t\t//of hSpeed by 1.\n\t\t\t}\n\t\t\t// user presses right cursor key. It only does something if the\n\t\t\t//hSpeed of the PaperAirplane is greater than 5, preventing the\n\t\t\t//PaperAirplane from turning excessively (and going upwards). \n\t\t\telse if (key == Event.RIGHT && p.getHSpeed () < 5)\n\t\t\t{ \n\t\t\t\tp.turnRight ();\t//Uses the method turnRight () in the\n\t\t\t\t\t\t\t\t//PaperAirplane class, which increases the value\n\t\t\t\t\t\t\t\t//of hSpeed by 1.\n\t\t\t}\n\t\t\t//user presses any other key.\n\t\t\telse\n\t\t\t{ \n\t\t\t\t//Pressing any other key causes the method to print out the\n\t\t\t\t//key value of your key (so that it may possibly be used in\n\t\t\t\t//future coding). \n\t\t\t\tSystem.out.println (\"Charakter: \" + (char)key + \" Integer Value: \" + key);\n\t\t\n\t\t\t}\n\t\t}\n\t\treturn true;\t//Is just here to make the method work.\n\t}", "public boolean interact(String... action) {\n\t\treturn canUse() && EntityUtil.interactChild(SlotData.getMainChild(slot), action);\n\t}", "@Override\r\n\tpublic boolean keyEvent(KeyEvent event) {\n\t\treturn false;\r\n\t}", "boolean hasCurrentAction();", "public boolean getActionJustPressed(String name) {\n synchronized(actions) {\n InputAction action = actions.get(name);\n return action != null && action.getJustPressed(this);\n }\n }", "public boolean move(KeyCode code){\n\t\tswitch (code) {\n\t\tcase Q:\n\t\tcase NUMPAD7:\n\t\t\tmoveUpLeft();\n\t\t\tbreak;\n\t\tcase W:\n\t\tcase NUMPAD8:\n\t\t\tmoveUp();\n\t\t\tbreak;\n\t\tcase E:\n\t\tcase NUMPAD9:\n\t\t\tmoveUpRight();\n\t\t\tbreak;\n\t\tcase A:\n\t\tcase NUMPAD4:\n\t\t\tmoveLeft();\n\t\t\tbreak;\n\t\tcase S:\n\t\tcase NUMPAD5:\n\t\t\tbreak;\n\t\tcase D:\n\t\tcase NUMPAD6:\n\t\t\tmoveRight();\n\t\t\tbreak;\n\t\tcase Z:\n\t\tcase NUMPAD1:\n\t\t\tmoveDownLeft();\n\t\t\tbreak;\n\t\tcase X:\n\t\tcase NUMPAD2:\n\t\t\tmoveDown();\n\t\t\tbreak;\n\t\tcase C:\n\t\tcase NUMPAD3:\n\t\t\tmoveDownRight();\n\t\t\tbreak;\n\t\tcase J:\n\t\tcase NUMPAD0:\n\t\t\tmoveJump();\n\t\t\treturn false;\t\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean onTouchEvent(MotionEvent event)\n\t{\n\t\tswitch( event.getAction() ) {\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\tint meta = event.getMetaState();\n\t\t\tbutton = ( meta & KeyEvent.META_ALT_ON ) > 0 ? SGTPuzzles.MIDDLE_BUTTON :\n\t\t\t\t( meta & KeyEvent.META_SHIFT_ON ) > 0 ? SGTPuzzles.RIGHT_BUTTON :\n\t\t\t\tSGTPuzzles.LEFT_BUTTON;\n\t\t\tstartX = event.getX();\n\t\t\tstartY = event.getY();\n\t\t\twaiting = true;\n\t\t\tparent.handler.postDelayed( sendRightClick, longTimeout );\n\t\t\treturn true;\n\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\tfloat x = event.getX(), y = event.getY();\n\t\t\tif( waiting ) {\n\t\t\t\tif( Math.abs(x-startX) <= maxDist && Math.abs(y-startY) <= maxDist ) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tparent.sendKey((int)startX, (int)startY, button);\n\t\t\t\t\twaiting = false;\n\t\t\t\t\tparent.handler.removeCallbacks( sendRightClick );\n\t\t\t\t}\n\t\t\t}\n\t\t\tparent.sendKey((int)x, (int)y, button + DRAG);\n\t\t\treturn true;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\tif( waiting ) {\n\t\t\t\tparent.handler.removeCallbacks( sendRightClick );\n\t\t\t\tparent.sendKey((int)startX, (int)startY, button);\n\t\t\t}\n\t\t\tparent.sendKey((int)event.getX(), (int)event.getY(), button + RELEASE);\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean handleExecute(Action action) {\n ActorState a = action.getActor();\n if (a.getActor() == actor) {\n // Always succeed on self\n return true;\n }\n \n //maybeCounter(Augmentation.Type.EXECUTE, a, combatants);\n double chance = a.getWillpower() * (1.0 - getResistance());\n boolean success = Math.random() < chance;\n return success;\n }", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkInputMethod() {\n\t\tboolean flag = oTest.checkInputMethod();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "private boolean handleMovementByKey() {\n\t\tboolean moved = false;\n\t\tif (keyCode != 0) {\n\t\t\tmoved = true;\n\t\t\tdouble moveRate = 10.0 / 1000;\t// degrees per second\n\t\t\t\n\t\t\tif ((keyStateMask & SWT.SHIFT) != 0) {\n\t\t\t\tmoveRate = moveRate * 10.0;\n\t\t\t}\n\t\t\telse if ((keyStateMask & SWT.ALT) != 0) {\n\t\t\t\tmoveRate = moveRate / 5.0;\n\t\t\t}\n\t\t\t\n\t\t\tlong moveTime = 0;\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tmoveTime = keyStopTime - keyStartTime;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlong currentTime = System.currentTimeMillis();\n\t\t\t\tmoveTime = currentTime - keyStartTime;\n\t\t\t\tkeyStartTime = currentTime;\n\t\t\t}\n\t\t\t\n\t\t\tfloat move = (float)(moveRate * moveTime);\n\t\t\t\n\t\t\tswitch (keyCode) {\n\t\t\tcase 16777219:\n\t\t\t\t// left\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth - move);\n\t\t\t\tbreak;\n\t\t\tcase 16777220:\n\t\t\t\t// right\n\t\t\t\tviewAzimuth = fixAzimuth(viewAzimuth + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777217:\n\t\t\t\t// up\n\t\t\t\tviewElevation = fixElevation(viewElevation + move);\n\t\t\t\tbreak;\n\t\t\tcase 16777218:\n\t\t\t\t// down\n\t\t\t\tviewElevation = fixElevation(viewElevation - move);\n\t\t\t\tbreak;\n\t\t\tcase 97:\n\t\t\t\t// a\n\t\t\t\tviewVFOV = fixFOV(viewVFOV - (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\tcase 122:\n\t\t\t\t// z\n\t\t\t\tviewVFOV = fixFOV(viewVFOV + (move * fovAdjFactor));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tif (keyStopTime != 0) {\n\t\t\t\tkeyCode = 0;\n\t\t\t\tkeyStartTime = 0;\n\t\t\t}\n\t\t}\n\t\treturn moved;\n\t}", "private boolean keyboardShortcuts(int keyCode, KeyEvent event) {\n if (event.getAction() != KeyEvent.ACTION_DOWN) {\n return false;\n }\n\n if (!mUseKeyboardShortcuts) {\n return false;\n }\n\n boolean isCtrlPressed = (event.getMetaState() & KeycodeConstants.META_CTRL_ON) != 0;\n boolean isShiftPressed = (event.getMetaState() & KeycodeConstants.META_SHIFT_ON) != 0;\n\n if (keyCode == KeycodeConstants.KEYCODE_TAB && isCtrlPressed) {\n if (isShiftPressed) {\n mViewFlipper.showPrevious();\n } else {\n mViewFlipper.showNext();\n }\n\n return true;\n } else if (keyCode == KeycodeConstants.KEYCODE_N && isCtrlPressed && isShiftPressed) {\n doCreateNewWindow();\n\n return true;\n } else if (keyCode == KeycodeConstants.KEYCODE_V && isCtrlPressed && isShiftPressed) {\n doPaste();\n\n return true;\n } else {\n return false;\n }\n }", "protected boolean dealWithKeyPressed(KeyEvent ke)\n {\n setUpMouseState(KEY_PRESSED);\n return true;\n }", "public boolean hasPlainAction() {\n return actionCase_ == 1;\n }", "public static boolean isKeyPressed(int key) {\r\n\t\treturn keysDown.containsKey(key);\r\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean pickAndExecuteAnAction() {\n\t\treturn false;\n\t}", "private boolean checkForAction(){\n IndividualAction thisAction = checkTriggers();\n if(thisAction.getTriggers() == null){\n return false;\n }\n if(!checkSubjects(thisAction.getSubjects())){\n return false;\n }\n doConsumed(thisAction.getConsumed());\n doProduce(thisAction.getProduced());\n results.add(thisAction.getNarration());\n\n return true;\n }", "@Override\n\tpublic boolean keyUp(int keycode) {\n\t\tif(keycode == Input.Keys.RIGHT){\n\t\t\tgoRight = false;\n\t\t}\n\t\tif(keycode == Input.Keys.LEFT){\n\t\t\tgoLeft = false;\n\t\t}\n\t\tif(keycode == Input.Keys.UP){\n\t\t\tturnUp = false;\n\t\t}\n\t\tif(keycode == Input.Keys.DOWN){\n\t\t\tturnDown = false;\n\t\t}\n\t\tif(keycode == Input.Keys.SPACE){\n\t\t\tballShoot = false;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent key) {\n\t\tStateEnum currentState = stateControllerManager.getCurrentState();\n\t\tUserActionEnum action = keyboardActionMapping.get(key.getKeyCode());\n\t\tif(action != null) {\n\t\t\tstateControllers.get(currentState).handleAction(action);\n\t\t}\n\n\t}", "public boolean mo858g() {\n OnMenuItemClickListener onMenuItemClickListener = this.f622q;\n if (onMenuItemClickListener != null && onMenuItemClickListener.onMenuItemClick(this)) {\n return true;\n }\n C0132g gVar = this.f619n;\n if (gVar.mo783a(gVar, (MenuItem) this)) {\n return true;\n }\n Runnable runnable = this.f621p;\n if (runnable != null) {\n runnable.run();\n return true;\n }\n if (this.f612g != null) {\n try {\n this.f619n.mo810e().startActivity(this.f612g);\n return true;\n } catch (ActivityNotFoundException e) {\n Log.e(\"MenuItemImpl\", \"Can't find activity to handle intent; ignoring\", e);\n }\n }\n C4124b bVar = this.f602B;\n if (bVar == null || !bVar.mo959e()) {\n return false;\n }\n return true;\n }", "public boolean isValidAction(Action action) {\n return getActions().contains(action) || Action.cancel.equals(action);\n }", "public void hitKey() {\n }", "public boolean hasAction() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean testConnection(int keyToTest){\n if (connectedKeys.contains(keyToTest)){\n return true;\n }\n else{\n return false;\n }\n }", "public boolean mo719a(KeyEvent keyEvent) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"android.support.v4.media.session.IMediaSession\");\n boolean z = true;\n if (keyEvent != null) {\n obtain.writeInt(1);\n keyEvent.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.f822a.transact(2, obtain, obtain2, 0);\n obtain2.readException();\n if (obtain2.readInt() == 0) {\n z = false;\n }\n return z;\n } finally {\n obtain2.recycle();\n obtain.recycle();\n }\n }", "public boolean hasAction() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@Override\n public boolean canHandle(HandlerInput handlerInput) {\n\n return handlerInput.matches(intentName(\"NextQuestionIntent\"));\n\n }", "public boolean wolfAction() {\n if (game.wolfDetectedRRH())\n return true;\n else return false;\n }", "public boolean dispatchKeyEvent(KeyEvent e)\n {\n // If this window is not the focus window or if the event is not\n // of type PRESSED we have nothing more to do here.\n if (!isFocused() || (e.getID() != KeyEvent.KEY_TYPED))\n return false;\n\n if (e.getKeyChar() == KeyEvent.CHAR_UNDEFINED\n || e.getKeyCode() == KeyEvent.VK_ENTER)\n {\n return false;\n }\n\n if(getCurrentChat() == null)\n return false;\n\n ChatWritePanel chatWritePanel\n = getCurrentChat().getChatWritePanel();\n JEditorPane chatWriteEditor = chatWritePanel.getEditorPane();\n\n // Don't re-dispatch any events if the menu is active. Fixes the\n // navigation in the menu.\n if (menuBar.getSelectedMenu() != null\n && menuBar.getSelectedMenu().isPopupMenuVisible())\n {\n return false;\n }\n\n if (keyManager.getFocusOwner() != null\n && !chatWritePanel.isFocusOwner())\n {\n // Request the focus in the chat write panel if a letter is\n // typed.\n chatWriteEditor.requestFocusInWindow();\n\n // We re-dispatch the event to the chat write panel.\n keyManager.redispatchEvent(chatWriteEditor, e);\n\n // We don't want to dispatch further this event.\n return true;\n }\n\n return false;\n }" ]
[ "0.68710464", "0.6635562", "0.647663", "0.6475704", "0.6411789", "0.63864017", "0.63477445", "0.63395214", "0.63354814", "0.62207955", "0.61796105", "0.61365914", "0.61156434", "0.60998535", "0.6070462", "0.6051995", "0.6051995", "0.59891915", "0.59670156", "0.5922639", "0.5922639", "0.5922639", "0.5922639", "0.5922639", "0.5922639", "0.5922639", "0.5922639", "0.5921765", "0.5921241", "0.5865114", "0.5850579", "0.58359754", "0.5801227", "0.57937044", "0.5775291", "0.57685864", "0.5764085", "0.57637167", "0.5712748", "0.5711242", "0.5709877", "0.5658633", "0.5654248", "0.5654248", "0.5654248", "0.5654248", "0.5654248", "0.5654248", "0.5651854", "0.5641399", "0.56234974", "0.5621095", "0.5610801", "0.56066287", "0.55936694", "0.5588888", "0.5586133", "0.55838436", "0.55819684", "0.557642", "0.5571209", "0.5565783", "0.55623406", "0.5555274", "0.55550605", "0.5540265", "0.55343616", "0.54836595", "0.5478379", "0.5467283", "0.54641044", "0.5463618", "0.54503596", "0.5436061", "0.54259247", "0.54213136", "0.54061633", "0.53998256", "0.5398013", "0.5394007", "0.5388408", "0.53784084", "0.5373599", "0.5362756", "0.5360965", "0.53567123", "0.53567123", "0.5349038", "0.5322986", "0.5319958", "0.53087157", "0.53037554", "0.53022915", "0.52945316", "0.52911305", "0.5286905", "0.52798355", "0.5279621", "0.52694464", "0.5267109" ]
0.6784984
1
Tests the external sort using an inmemory sort. Relies on default memory settings to be large enough to do the inmemory sort (there is, unfortunately, no way to doublecheck that no spilling was done.) This must be checked manually by setting a breakpoint in the inmemory sort routine.
@Test public void mergeSortWithSv2() throws Exception { ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher); try (ClusterFixture cluster = builder.build(); ClientFixture client = cluster.clientFixture()) { List<QueryDataBatch> results = client.queryBuilder().physicalResource("xsort/one_key_sort_descending_sv2.json").results(); assertEquals(500_000, client.countResults(results)); validateResults(client.allocator(), results); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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}", "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 }", "@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 }", "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}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyInsertionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.insertionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "private static void sortingMemo() {\n\t\t\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 }", "@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 }", "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}", "@Test\n public void doubleSortWithExchangeUnbalancedNodes() {\n ExternalSort es1 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), ARBTRIARY_LEAF, Collections.emptyList(), false);\n SingleSender ss = new SingleSender(OpProps.prototype(1, Long.MAX_VALUE).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), Mockito.mock(BatchSchema.class), es1, 0,\n MinorFragmentIndexEndpoint.newBuilder().setMinorFragmentId(0).build());\n Fragment f1 = new Fragment();\n f1.addOperator(ss);\n Wrapper w1 = new Wrapper(f1, 0);\n w1.overrideEndpoints(Arrays.asList(N1, N2));\n\n UnorderedReceiver or = new UnorderedReceiver(OpProps.prototype(1, Long.MAX_VALUE), Mockito.mock(BatchSchema.class), 0, Collections.emptyList(), false);\n ExternalSort es2 = new ExternalSort(OpProps.prototype(0, Long.MAX_VALUE).cloneWithMemoryExpensive(true).cloneWithMemoryFactor(options.getOption(SORT_FACTOR)).cloneWithBound(options.getOption(SORT_BOUNDED)), or, Collections.emptyList(), false);\n Fragment f2 = new Fragment();\n f2.addOperator(es2);\n Wrapper w2 = new Wrapper(f2, 0);\n w2.overrideEndpoints(Collections.singletonList(N1));\n\n\n MemoryAllocationUtilities.setMemory(options, ImmutableMap.of(f1, w1, f2, w2), 10 + adjustReserve);\n assertEquals(3L, es1.getProps().getMemLimit());\n assertEquals(3L, es2.getProps().getMemLimit());\n }", "@Test\n public void testSort(){\n InsertionSort sort = new InsertionSort();\n int arr[] = sort.shellInsertionSort(initArr());\n scan(arr);\n }", "@Test\n\tpublic void testSortSortedNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tint[] arrayAfterSort = { 104, 103, 102, 101, 100, 99, 98 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyRadixSort() {\n //size-0 arr\n int[] intToSort = new int[0];\n int[] intsSorted = cloneArr(intToSort);\n Sorting.lsdRadixSort(intsSorted);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.lsdRadixSort(intsSorted);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyMergeSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.mergeSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyCocktailShakerSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\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 }", "@Test\n public void testSort() {\n System.out.println(\"sort\");\n ParallelMergeSort instance = null;\n instance.sort();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void heapSort(){\n int[] array = {3, 9, 6, 5, 2, 8, 7};\n SortTestHelper.testSort(new QuickSort(), array);\n SortTestHelper.print(array);\n }", "@Test\n\tpublic void testSortRepeatableNumbers() {\n\t\tint[] arrayBeforeSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tint[] arrayAfterSort = { 104, 104, 0, 9, 56, 0, 9, 77, 88 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinySelectionSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.selectionSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "@Test\r\n public void trivialTest() {\r\n int[] unsorted = new int[0];\r\n int[] expResult = new int[0];\r\n int[] result = arraySorter.sort(unsorted);\r\n assertArrayEquals(expResult, result);\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}", "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 }", "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 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}", "@Test\n public void case3SortTwoElements(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2};\n data2.initializeArray(\"2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[1].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[0].key == testArray[1]);\n\n data2.runAlgo(algoUnderTest);\n \n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n \n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n }\n\n\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 }", "@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveCocktailShakerSort() {\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.cocktailSort(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[0] = new IntPlus(7);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [7, 2, 4, 6, 8, 10]\n Forward pass: [ 2, 4, 6, *7, *8, *10]. 5 comparisons. Last swap at\n index 2, so starred items in order\n Backward pass: [ 2, 4, 6, *7, *8, *10]. 2 comparisons. Search ends\n */\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\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 }", "private static void parallelSortInIsolatedPool(\n FullPageId[] pagesArr,\n Comparator<FullPageId> cmp\n ) throws IgniteCheckedException {\n ForkJoinPool.ForkJoinWorkerThreadFactory factory = new ForkJoinPool.ForkJoinWorkerThreadFactory() {\n @Override public ForkJoinWorkerThread newThread(ForkJoinPool pool) {\n ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);\n\n worker.setName(\"checkpoint-pages-sorter-\" + worker.getPoolIndex());\n\n return worker;\n }\n };\n\n ForkJoinPool forkJoinPool = new ForkJoinPool(PARALLEL_SORT_THREADS + 1, factory, null, false);\n\n ForkJoinTask sortTask = forkJoinPool.submit(() -> Arrays.parallelSort(pagesArr, cmp));\n\n try {\n sortTask.get();\n }\n catch (InterruptedException e) {\n throw new IgniteInterruptedCheckedException(e);\n }\n catch (ExecutionException e) {\n throw new IgniteCheckedException(\"Failed to perform pages array parallel sort\", e.getCause());\n }\n\n forkJoinPool.shutdown();\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}", "@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\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 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}", "@Test\n\tpublic void testSortOneElementInArray() {\n\t\tint[] arrayBeforeSort = { 565 };\n\t\tint[] arrayAfterSort = { 565 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "@Test\n\tpublic void testAscendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tCollections.reverse(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\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 }", "@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "public void externalSort(String inputFile, String outputFile, int n, int k) throws IOException {\n HybridSort hSort = new HybridSort();\n Path input = Paths.get(inputFile);\n\n int amtFiles = (int) Math.ceil((double) n / k); // calculates the amount of arrays in the function\n int fileNUM = 1; // counts the amount of tempFiles\n int tempSize = k;\n\n double[] mainArray = new double[k];\n double[] tempBigArray = new double[n];\n double[] temp = new double[k];\n\n boolean isOdd = amtFiles % 2 == 1;\n\n try (Scanner read = new Scanner(input).useDelimiter(\"(\\\\[ )|(, )|(\\\\])\");) {\n int index = 0;\n while (read.hasNext()) {\n double value = Double.parseDouble(read.next().strip());\n tempBigArray[index++] = value;\n } // end of while\n } // close the Scanner\n\n // Write to temp files\n for (int i = 0; i < n; i++) {\n // Check temp size\n if (i % k == 0) {\n if (n - i < k) {\n tempSize = n % k;\n } else {\n tempSize = k;\n }\n }\n\n temp[i % k] = tempBigArray[i];\n System.out.println(Arrays.toString(temp));\n\n if (i != 0 && ((i + 1) % k == 0) || (i == (n - 1))) {\n // Sort the array\n hSort.hybridsort(temp, 0, tempSize - 1);\n\n // get names for outputfileTemp\n Path outputTemp = Paths.get(outputFile + fileNUM++ + \".txt\");\n\n // Write to the temp file\n try (BufferedWriter writer = Files.newBufferedWriter(outputTemp, StandardCharsets.UTF_8);) {\n for (int j = 0; j < tempSize; j++) {\n writer.write(temp[j] + \" \");\n } // end of for\n } // close the BufferedWriter\n } // end of if\n } // end of for\n\n // Add all values in the first file to the main array\n try (Scanner scan = new Scanner(Paths.get(outputFile + 1 + \".txt\"));) {\n int index = 0;\n\n while (scan.hasNextDouble()) {\n double value = scan.nextDouble();\n mainArray[index++] = value;\n } // end of while\n } // close first file\n\n // Merge all the files\n mainMergeSort(amtFiles, outputFile, isOdd);\n }", "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}", "@Test\n\tpublic void testSortTwoElements() {\n\t\tint[] arrayBeforeSort = { 565, 45 };\n\t\tint[] arrayAfterSort = { 565, 45 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "void sort(int a[]) throws Exception {\n\n // Make the input into a heap\n for (int i = a.length-1; i >= 0; i--)\n reheap (a, a.length, i);\n\n // Sort the heap\n for (int i = a.length-1; i > 0; i--) {\n int T = a[i];\n a[i] = a[0];\n a[0] = T;\n pause();\n reheap (a, i, 0);\n }\n }", "@Test\n public void case4SortSameSequence(){\n //Already sorted array\n SortDemoData data2 = new SortDemoData() ;\n\n int[] testArray = {1,2,3};\n data2.initializeArray(\"1 2 3\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n data2.runAlgo(algoUnderTest);\n\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data2.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data2.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data2.myArray[2].key == testArray[2]);\n\n }", "@Test\n public void testSort_intArr_IntComparator_Asc_Middle() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_MIDDLE_SORT_ARRAY;\n sorter.sort(data, 4, 10, comparator);\n// System.out.println(\"Expected: \" + Arrays.toString(expResult));\n// System.out.println(\"Result: \" + Arrays.toString(data));\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }", "@Test\n public void testSort_intArr_IntegerComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\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 }", "@Test\n public void case5SortReversedSequence(){\n //Completely reverse sorted array\n int[] testArray = {1,2,3};\n SortDemoData data3 = new SortDemoData() ;\n data3.initializeArray(\"3 2 1\");\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...First Element\",data3.myArray[2].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" Before Sort ...Third Element\",data3.myArray[0].key == testArray[2]);\n\n data3.runAlgo(algoUnderTest);\n\n if(algoUnderTest != 0)\n {\n assertTrue(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertTrue(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n else {\n \t assertFalse(map.get(algoUnderTest)+\" After Sort ...First Element\",data3.myArray[0].key == testArray[0]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Second Element\",data3.myArray[1].key == testArray[1]);\n assertFalse(map.get(algoUnderTest)+\" After Sort ...Third Element\",data3.myArray[2].key == testArray[2]);\n }\n \n }", "private void testInsertionSort() {\n System.out.println(\"------ TESTING : insertionSort() ------\");\n try{\n iTestFileList.insertionSort(); // calling insertion sort function\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n }", "@Test\n public void test_read_input_and_sort() {\n\n }", "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 }", "private void sort() {\n\t\trunPassZero();\n\t\tList<TupleReaderBinary> buffers = new ArrayList<>();\n\t\tList<Tuple> sortStage = new ArrayList<>();\n\t\tassert (readerBucketID == 0);\n\t\tassert (writerBucketID == 0);\n\t\tassert (passNumber == 1);\n\t\tassert (currentGroup == 1);\n\t\toutputBuffer.clear();\n\n\t\t// assign buffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tbuffers.add(null);\n\t\t\tassignBuffer(buffers, i);\n\t\t\tsortStage.add(null);\n\t\t}\n\n\t\tassert (buffers.size() == numInputBuffers);\n\t\tassert (sortStage.size() == numInputBuffers);\n\n\t\t// read from buffers into list of size numInputBuffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t}\n\n\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode\n\t\t\t\t+ \"_\" + passNumber + \"_\" + writerBucketID);\n\n\t\twhile (true) {\n\t\t\tif (!findAndReplaceSmallest(buffers, sortStage)) {\n\t\t\t\tprevPrevTotalBuckets = prevTotalBuckets;\n\t\t\t\tprevTotalBuckets = writerBucketID + 1;\n\t\t\t\tflushOutputBuffer();\n\t\t\t\toutputWriter.close();\n\n\t\t\t\t// We are done! Return\n\t\t\t\tif (prevTotalBuckets == 1) {\n\t\t\t\t\tdeleteTempFiles();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twriterBucketID = 0;\n\t\t\t\treaderBucketID = 0;\n\t\t\t\twriterFlushes = 0;\n\t\t\t\tdeleteTempFiles();\n\t\t\t\tpassNumber++;\n\t\t\t\tcurrentGroup = 1;\n\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\n\t}", "@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\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 }", "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 }", "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.6451569", "0.6451186", "0.6434697", "0.63954526", "0.63271433", "0.61290073", "0.6054533", "0.6030589", "0.60018283", "0.5977125", "0.59744966", "0.5943338", "0.59383225", "0.5937887", "0.59336823", "0.5918749", "0.58413607", "0.58304596", "0.58211106", "0.58206534", "0.58172995", "0.57989913", "0.57660717", "0.5760767", "0.5754667", "0.5704322", "0.5701775", "0.56921273", "0.5684491", "0.5661188", "0.5642818", "0.56191444", "0.56171936", "0.5613818", "0.56060886", "0.5604896", "0.55924517", "0.558434", "0.55769855", "0.55766875", "0.55764925", "0.55520874", "0.5527619", "0.55238426", "0.55175996", "0.5515982", "0.55130255", "0.5505539", "0.55031836", "0.5501538", "0.54927784", "0.54856634", "0.548346", "0.5476298", "0.5473703", "0.5433717", "0.54329723", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5431467", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444", "0.5430444" ]
0.0
-1
Get cities of specific state
public List<City> getCityList(State state);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getCity(String state) {\n\t\tSet set=new HashSet();\n\t\tList ls=new LinkedList();\n\t\tStatement statement=null;\n\t\tResultSet rs=null;\n\t\tString engineName=\"\";\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\trs = statement.executeQuery(\"select VALUE from config_master where NAME='EXE_CITY' and LINK1='\"+state+\"'\");\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\tls.add(rs.getString(\"VALUE\"));\n\t\t\t}\n\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn ls;\n\t}", "@Override\n @Transactional\n public List<City> getCitiesByState(long stateId) {\n return cityRepository.findByStateId(stateId).orElseThrow(()->new NotFoundException(\"State not found\"));\n }", "List<City> findCities();", "@Override\r\n\tpublic List<City> getAllCitiesInState(String stateName, String countryName) {\n\t\tSystem.out.println(\"getAllCitiesInCountry,stateName,countryName\");\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\tList<City> clist=new ArrayList<City>();\r\n\t\t\r\n\t\tList<State> list=new ArrayList<State>();\r\n\t\t\r\n\t\t//List<City> clist = this.sessionFactory.getCurrentSession().createCriteria(Country.class)\r\n\t // .add(Restrictions.eq(\"name\",countryName)).list().get(0);\r\n\t\t//null pointer exception\r\n\t\tQuery query = session.createQuery(\"from City c where c.country.name=:countryName and c.district= :stateName\");\r\n\t\t\r\n\t\t//select * from city c, state p, country q where p.StateName='Andhra Pradesh' and q.name='india';\r\n\t\t\r\n\t\t//Query query = session.createQuery(\"from State p, Country q where q.name=:countryName and c.district= :p.stateName and p!=null and c.district!=null\");\r\n\t\t\r\n\t\tquery.setParameter(\"stateName\", stateName);\r\n\t\tquery.setParameter(\"countryName\", countryName);\r\n\t\tclist=query.list();\r\n\t\t\r\n\t\tsession.getTransaction().commit();\r\n\t\t//session.flush();\r\n\t\t//session.close();\r\n\t\treturn clist;\r\n\t}", "List<City> getCityList(Integer countryId)throws EOTException;", "public List<City> getAll() throws Exception;", "public List<City> getCities(){\n waitFor(visibilityOfAllElements(cities));\n return cities.stream().map(City::new).collect(toList());\n }", "@Override\r\n\tpublic List<City> getCityById(int pid) {\n\t\treturn cd.getCityById(pid);\r\n\t}", "public String getCityState() {\r\n\t\treturn cityState;\r\n\t}", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public List<String> getCities() {\n\n List<Rout> routs = routDAO.getAll();\n HashSet<String> citiesSet = new HashSet<>();\n for (Rout r : routs) {\n citiesSet.add(r.getCity1());\n }\n List<String> cities = new ArrayList<>(citiesSet);\n\n return cities;\n }", "public List<WeatherCitySummary> findAllCity(){\n return weatherCityRepository.findAllCity();\n }", "@RequestMapping(value = \"/Asyn/getCities.abhi\", headers = \"X-Requested-With=XMLHttpRequest\", produces = MediaType.APPLICATION_JSON_VALUE)\n\t@ResponseBody\n\tpublic List<CityTO> getCities(Model model, HttpServletRequest request, HttpServletResponse response,\n\t\t\t@RequestParam(name = \"stateId\") String stateId) throws IOException {\n\n\t\tInteger id = Integer.parseInt(stateId);\n\n\t\treturn addressService.getAllActiveCities(id);\n\n\t}", "boolean hasHasCity();", "String getCity();", "@Override\n public Stream<City> getAll() {\n return idToCity.values().stream();\n }", "public void getPersonByCityNameStateName(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contacts you want to see by city name\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tlog.info(\"Choice \\n 1. get person by city name 2. get person by state name\");\n\t\tint choice = obj.nextInt();\n\t\tMap<String, List<PersonInfo>> personList = new HashMap<String, List<PersonInfo>>();\n\t\tif (choice == 1) {\n\t\t\tpersonList = (ContactList.stream()\n\t\t\t\t\t.collect(Collectors.groupingBy(PersonInfo::getCity, Collectors.toList())));\n\t\t\tpersonList.entrySet().forEach(entry -> log.info(entry.getKey() + \" \" + entry.getValue()));\n\t\t}\n\t\tif (choice == 2) {\n\t\t\tpersonList = (ContactList.stream()\n\t\t\t\t\t.collect(Collectors.groupingBy(PersonInfo::getState, Collectors.toList())));\n\t\t\tpersonList.entrySet().forEach(entry -> log.info(entry.getKey() + \" \" + entry.getValue()));\n\t\t}\n\t\tif (personList.isEmpty()) {\n\t\t\tlog.info(\"Add contacts to get person by cities\");\n\t\t}\n\t}", "public Vector<Site> getCities(){\n return cities;\n }", "@Override\r\n\tpublic List <City> getAllCities() {\r\n\t\tSystem.out.println(\"Looking for all cities...\");\r\n\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\ttry {\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM city\");\r\n\t\t\tList<City> cityList = new ArrayList<City>();\r\n\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\tCity ci = new City();\r\n\t\t\t\tci.setCityId(rs.getInt(\"cityid\"));\r\n\t\t\t\tci.setName(rs.getString(\"name\"));\r\n\t\t\t\tci.setCapital(rs.getBoolean(\"iscapital\"));\r\n\t\t\t\tcityList.add(ci);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t\treturn cityList;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "java.lang.String getCityName();", "public Vector<City> getCities(){\r\n\t\tif (map.getVerteices()==null){\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\t\treturn map.getVerteices();\r\n\t}", "public static String [] getCities(){\n\t\tString [] s = new String [cities.length]; \n\t\tfor (int i = 0; i < cities.length; i++)\n\t\t{\n\t\t\ts[i] = cities[i].getCity();\n\t\t}\n\t\treturn s;\n\t}", "@ApiMethod(name = \"getCities\", path = \"city\", httpMethod = ApiMethod.HttpMethod.GET)\n public List<City> getCities(@Nullable @Named(\"search\") String search) {\n\n if (search == null || search.isEmpty()) {\n return mCityService.list();\n } else {\n return mCityService.list(search);\n }\n }", "@Override\r\n\tpublic List<String> getCities() {\n \tList<Note> notes = this.noteRepository.findAll();\r\n \tfor (Note note : notes) {\r\n\t\t\tSystem.out.println(note.getTitle());\r\n\t\t}\r\n\t\treturn hotelBookingDao.getCities();\r\n\t}", "List<Address> findByState(String state);", "@Override\n\tpublic List<City> getCities(Long id, String query) {\n\t\tCityRootObject cityRootObject = restTemplate.getForObject(urlForDatabaseCities(id, query), CityRootObject.class);\n\n\t\treturn cityRootObject.getResponse().getItems();\n\t}", "public Collection<City> getAutocompleteCities(String search) {\n return repo.getAutocompleteCities(search);\n }", "List<MasterZipcode> getByCity(int cityId);", "public City getCityAt(Position p);", "@Override\n\tpublic ArrayList<String> getCityList() {\n\t\treturn constantPO.getCityList();\n\t}", "public void setCity(String s) {\r\n\t\tstate = s;\t\t\r\n\t}", "public List<String> getCities() {\n\t\treturn cities;\n\t}", "public abstract String getCity();", "@Override\n\tpublic List<State> getState(String id) {\n\t\t\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// create a query ... sort by last name\n\t\tQuery<State> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from State order where countryid=:c\",\n\t\t\t\t\t\t\t\t\t\t\tState.class);\n\t\ttheQuery.setParameter(\"c\", id);\n\t\t// execute query and get result list\n\t\tList<State> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t\t\n\t\t\n\t}", "public void setCityState(String cityState) {\r\n\t\tthis.cityState = cityState;\r\n\t}", "public City getCity(int index)\n {\n return cityContainer.get(index);\n }", "@Override\n\tpublic ArrayList getAllCities() {\n\t\tConnection conn = MySQLDAOFactory.getConnection(); \n\t\t//ResultSet rs = MySQLDAOFactory.executeStatement(conn, \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\");\n\t Statement stmt = null; \n\t ResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = (Statement)conn.createStatement();\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\t String sql;\n\t sql = \"SELECT * FROM world.city where world.city.CountryCode = 'AFG'\";\n\t\ttry {\n\t\t\trs = stmt.executeQuery(sql);\n\t\t} catch (SQLException e2) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te2.printStackTrace();\n\t\t}\n\n\t\tArrayList<Cities> p = new ArrayList<Cities>();\n\t try {\n\t\t\twhile(rs.next()){\n\t\t\t //Retrieve by column name\n\t\t\t int id = rs.getInt(\"id\");\t \n\t\t\t String name = rs.getString(\"name\");\n\t\t\t String district = rs.getString(\"district\");\n\t\t\t long population = rs.getLong(\"population\");\n\t\t\t Cities tmp = new Cities(); \n\t\t\t tmp.setId(id);\n\t\t\t tmp.setName(name);\n\t\t\t tmp.setDistrict(district);\n\t\t\t tmp.setPopulation(population);\n\t\t\t p.add(tmp); \n\t\t\t }\n\t\t\t//rs.close(); \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\t//MySQLDAOFactory.closeConnection();\n\t return p; \n\t}", "City city(int i) {\r\n\t\treturn tsp.cities[this.index[i]];\r\n\t}", "@RequestMapping(value = \"/cityDetails\", method = RequestMethod.GET)\n public ResponseEntity<City> getCityDetails()\n {\n logger.info(\"Calling getCityDetails() method\");\n if(city.getCity() != null)\n {\n for (String item: city.getCity()\n ) {\n logger.debug(\"This are the cities \" + item);\n }\n }\n\n return new ResponseEntity<City>(city, HttpStatus.OK);\n }", "@Override\n\tpublic ArrayList<CityPO> getAll() throws RemoteException {\n\t\t\n\t\t\n\t\treturn cities;\n\t}", "public void searchByState() {\n System.out.println(\"enter a name of state to fetch person data fro state :--\");\n String state = scanner.next();\n\n Iterator it = list.iterator();\n while (it.hasNext()) {\n Contact person = (Contact) it.next();\n if (state.equals(person.getState())) {\n List stream = list.stream().filter(n -> n.getCity().contains(state)).collect(Collectors.toList());\n System.out.println(stream);\n }\n }\n }", "@Override\n public List<Map<String, Object>> getCityList(Map<String, Object> params)\n {\n return advertisementMapper.getCityList(params);\n }", "LinkedHashMap<Long, City> getAllCitiesMap();", "public void read_india_states() throws IOException {\r\n\t\tString line = \"\";\r\n\t\tString splitBy = \",\";\r\n\t\tString path = \".\\\\src\\\\main\\\\java\\\\com\\\\covidProject\\\\covid19\\\\Datasets\\\\Indian Cities Database.csv\";\r\n\t\tHashMap<String, List<String>> state_city = new HashMap<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// parsing a CSV file into BufferedReader class constructor\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\r\n\t\t\twhile ((line = br.readLine()) != null) // returns a Boolean value\r\n\t\t\t{\r\n\t\t\t\tString[] info = line.split(splitBy); // use comma as separator\r\n\t\t\t\tString City = info[0].toLowerCase();\r\n\t\t\t\tString State = info[5].toLowerCase();\r\n\r\n\t\t\t\tif (state_city.get(State) == null) {\r\n\t\t\t\t\tList<String> temp_list = new ArrayList<>();\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tList<String> temp_list = state_city.get(State);\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tList<Document> list = new ArrayList<Document>();\r\n\t\t\t\r\n\t\t\t//Initialize country\r\n\t\t\tCovidCountry countryDoc = new CovidCountry();\r\n\t\t\tcountryDoc.setName(\"India\");\r\n\t\t\t\r\n\t\t\t//Initialize state list\r\n\t\t\tList<CovidState> states_list = new ArrayList<>();\r\n\t\t\t\r\n\t\t\tfor (Map.Entry<String, List<String>> entry : state_city.entrySet()) {\r\n\t\t\t\t\r\n\t\t\t\t//get state and cities from the map we created \r\n\t\t\t\tString state = entry.getKey();\r\n\t\t\t\tList<String> cities = entry.getValue();\r\n\r\n\t\t\t\tList<CovidSubCity> city_list = new ArrayList<>();\r\n\r\n\t\t\t\t//Cities are created before states.\r\n\t\t\t\tfor (String city : cities) {\r\n\t\t\t\t\tCovidCity covidCity = new CovidCity(city,state,countryDoc.getName());\r\n\t\t\t\t\tthis.covidCityRepository.save(covidCity);\r\n\t\t\t\t\tCovidSubCity subCity = new CovidSubCity(city,covidCity.getId());\r\n\t\t\t\t\tcity_list.add(subCity);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//create state\r\n\t\t\t\tCovidState covidState = new CovidState(state,city_list);\r\n\t\t\t\t//this.covidStateRepository.save(covidState);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstates_list.add(covidState);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcountryDoc.setStates(states_list);\r\n\t\t\tthis.covidCountryRepository.save(countryDoc);\r\n\t\t\t\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onSelectState(State state) {\n // pickCity.setVisibility(View.VISIBLE);\n stateNameTextView.setVisibility(View.VISIBLE);\n cityName.setText(\"City\");\n cityPicker.equalCityObject.clear();\n\n stateNameTextView.setText(state.getStateName());\n stateID = state.getStateId();\n\n\n for (int i = 0; i < cityObject.size(); i++) {\n cityPicker = new CityPicker.Builder().with(this).listener(this).build();\n City cityData = new City();\n if (cityObject.get(i).getStateId() == stateID) {\n cityData.setCityId(cityObject.get(i).getCityId());\n cityData.setCityName(cityObject.get(i).getCityName());\n cityData.setStateId(cityObject.get(i).getStateId());\n\n cityPicker.equalCityObject.add(cityData);\n }\n }\n }", "public Set<String> getCitiesForCode( String code )\n {\n return codeToCityMap.get( code );\n }", "public ArrayList<Flight> getCity(String city) {\n return connects.get(city);\n }", "@Test(priority = 4)\n\tpublic void verify_Weather_Data_Appears_OnSearching_By_CityAndStateCode() {\n\t\tWeatherAPI.getWeatherInfo(ReadWrite.getProperty(\"London_City_State\"), ConfigFileReader.getProperty(\"appid\"),\n\t\t\t\t200);\n\n\t}", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public void printAllCities()\n { // to be implemented in part (d) }\n }", "public void getCountByCityByState(AddressBookDict addressBook) {\n\t\tlog.info(\"Enter the address book name whose contacts you want to see in sorted order by zip code\");\n\t\tString addressBookName = obj.next();\n\t\tList<PersonInfo> ContactList = addressBook.getContactList(addressBookName);\n\t\tlog.info(\"Enter the city name\");\n\t\tString cityName = obj.next();\n\t\tLong personByCity = ContactList.stream().filter(PersonInfo -> PersonInfo.getCity().equals(cityName)).count();\n\t\tlog.info(\"No of person in same city : \" + personByCity);\n\t\tlog.info(\"Enter the state name\");\n\t\tString stateName = obj.next();\n\t\tLong personByState = ContactList.stream().filter(PersonInfo -> PersonInfo.getState().equals(stateName)).count();\n\t\tlog.info(\"No of person in same state : \" + personByState);\n\t}", "public ArrayList<String> showCity();", "Collection<? extends String> getHasCity();", "public CustomerAddressQuery city() {\n startField(\"city\");\n\n return this;\n }", "public List<String> getLocationAndCity(){\n\t\treturn jtemp.queryForList(\"SELECT location_id||city FROM locations\", String.class);\n\t}", "public void searchAreaState(Connection connection, String state) throws SQLException {\n\n ResultSet rs = null;\n String sql = \"SELECT hotel_name, branch_id FROM Hotel_Address WHERE state = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n setState(state);\n pStmt.setString(1, getState());\n\n try {\n\n System.out.printf(\" Hotels in %s:\\n\", getState());\n System.out.println(\"+------------------------------------------------------------------------------+\");\n\n rs = pStmt.executeQuery();\n\n while (rs.next()) {\n System.out.println(rs.getString(1) + \" \" + rs.getInt(2));\n }\n }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }", "TrackerCity getTrackerCity(final Integer id);", "@Override\n public void onSelectState(State state) {\n \n \n cityPicker.equalCityObject.clear();\n \n binding.editTextState.setText(state.getStateName());\n stateID = state.getStateId();\n \n \n for (int i = 0; i < cityObject.size(); i++) {\n cityPicker = new CityPicker.Builder().with(this).listener(this).build();\n City cityData = new City();\n if (cityObject.get(i).getStateId() == stateID) {\n cityData.setCityId(cityObject.get(i).getCityId());\n cityData.setCityName(cityObject.get(i).getCityName());\n cityData.setStateId(cityObject.get(i).getStateId());\n \n cityPicker.equalCityObject.add(cityData);\n \n setCityListener();\n }\n }\n }", "Observable<List<CityEntity>> fetchAllCountryState(String country, RetrofitQueryDate from, RetrofitQueryDate to);", "public List<String> findIndiaStates(){\n\t\treturn null;\n\t}", "public void getCity(){\n }", "@Override\n\tpublic List<CityList> getCities() {\n\t\tList<CityList> citiesListDTO =null;\n\t\tList<com.svecw.obtr.domain.CityList> citiesListDomain = iCityListDAO.getCities();\n\t\t\n\t\tif(null!=citiesListDomain){\n\t\t\tcitiesListDTO = new ArrayList<CityList>();\n\t\t\tfor(com.svecw.obtr.domain.CityList cityListDomain : citiesListDomain){\n\t\t\t\tCityList cityListDTO = new CityList();\n\t\t\t\tcityListDTO.setCityId(cityListDomain.getCityId());\n\t\t\t\tcityListDTO.setCityName(cityListDomain.getCityName());\n\t\t\t\tcitiesListDTO.add(cityListDTO);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn citiesListDTO;\n\t}", "private Contacts searchContactByCityOrState(String name) {\n Contacts foundContact = contactList.stream()\n .filter(contact -> contact.getState().equals(name) ||\n contact.getCity().equals(name))\n .findFirst().orElse(null);\n return foundContact;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "@Override\n\tpublic List<CityMaster> listCityOfStates(Integer intStateId) {\n\t\tSession session = null;// ssionFactory.openSession();\n\t\tlogger.debug(\"======START AdminDAOImpl listCityOfStates======\");\n\t\tList<CityMaster> cityList = null;\n\t\ttry {\n\t\t\tsession = sessionFactory.openSession();\n\t\t\tcityList = new ArrayList<CityMaster>();\n\t\t\tQuery query = session\n\t\t\t\t\t.createSQLQuery(\"CALL GET_CITY_LIST(:state)\")\n\t\t\t\t\t.addEntity(CityMaster.class)\n\t\t\t\t\t.setParameter(\"state\", intStateId);\n\t\t\tList<CityMaster> list = query.list();\n\t\t\tIterator<CityMaster> itr = list.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tCityMaster cityMaster = new CityMaster();\n\t\t\t\tcityMaster = itr.next();\n\t\t\t\tcityList.add(cityMaster);\n\t\t\t}\n\t\t} catch (HibernateException he) {\n\t\t\tlogger.error(\"Exception occured while loading the cities :\"+ he.getMessage());\n\t\t\tthrow new ERPException(\"Exception occured while loading the cities :\"+ he.getMessage());\n\t\t} catch (ERPException erp) {\n\t\t\tlogger.error(\"Exception occured while loading the cities :\"+ erp.getMessage());\n\t\t\tthrow new ERPException(\"Exception occured while loading the cities\");\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception occured while loading the cities :\"+ e.getMessage());\n\t\t\tthrow new ERPException(\"Exception occured while loading the cities\");\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t\tlogger.debug(\"=====END AdminDAOImpl listCityOfStates======\");\n\t\treturn cityList;}", "public List<ATM> listATMsByCity(String city) throws JsonParseException,\n JsonMappingException, IOException {\n RestTemplate restTemplate = new RestTemplate();\n\n String response = restTemplate.getForObject(URL, String.class);\n String toBeParsed = response.substring(6, response.length());\n\n ObjectMapper objectMapper = new ObjectMapper();\n ATM[] atms = objectMapper.readValue(toBeParsed, ATM[].class);\n\n List<ATM> atmsList = Arrays.asList(atms);\n List<ATM> atmsByCityList = new LinkedList<ATM>();\n\n for (ATM atm : atmsList) {\n String theType = atm.getType(), theCity = atm.getAddress()\n .getCity();\n if (theType.equals(\"ING\") && theCity.equalsIgnoreCase(city)) {\n atmsByCityList.add(atm);\n }\n }\n\n return atmsByCityList;\n }", "void selectCityFrom(Set<City> cities, String title, Consumer<City> callback);", "List<County> selectByExample(CountyExample example);", "List<AirportDTO> getAirportsByCity(String city);", "@Override\n public String getCity() {\n return this.city;\n }", "List<TbCities> selectByExample(TbCitiesExample example);", "public String getCity() {\n\t\treturn this.city;\n\t}", "@GET(\"/cities\")\n Call<List<City>> getCities();", "@Override\n\tpublic List<City> findCityByDistrict(String district) {\n\t\treturn null;\n\t}", "public String getCity() {\n return city;\n }", "@Override\n\tpublic java.lang.String getCity() {\n\t\treturn _candidate.getCity();\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\n return city;\n }", "public UsState[] findWhereStateEquals(String state) throws UsStateDaoException;", "public String getCity()\n {\n \treturn city;\n }", "@GetMapping(\"/all\")\n public List<CityInfo> getAll(){\n return service.getAll();\n }", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public CityEntry getCity(){\n\t\treturn (CityEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_LINK);\n\t}", "@Override\r\n\tpublic void buildCity() {\n\t\t\r\n\t}", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Customer> getCustomerByCity(String city) {\n\t\treturn sessionFactory.getCurrentSession().createCriteria(Customer.class).add(Restrictions.eq(\"city\",city)).list();\r\n\t}", "public ArrayList<AdminInfo> getAdminByCity(String country, String state, String city) {\n\t\treturn getAdmin(country, state, city);\n\t}", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }" ]
[ "0.7381838", "0.73241353", "0.7094272", "0.68513095", "0.67794454", "0.67395073", "0.67227626", "0.6702872", "0.66402966", "0.6636139", "0.66257703", "0.66183215", "0.6586347", "0.6493056", "0.64627844", "0.6437127", "0.6433407", "0.6352454", "0.6349191", "0.6343307", "0.63337505", "0.6306087", "0.629175", "0.62898654", "0.62851393", "0.6259295", "0.6256791", "0.6232409", "0.6216891", "0.62090665", "0.61760825", "0.61493033", "0.6123378", "0.6112867", "0.6106682", "0.6103722", "0.6096189", "0.6082931", "0.6082381", "0.6075458", "0.60617626", "0.6052153", "0.6032876", "0.60212827", "0.6018145", "0.6017027", "0.6011797", "0.6011607", "0.5998878", "0.5998878", "0.5998878", "0.5992336", "0.5991726", "0.599045", "0.59881234", "0.59717613", "0.59505165", "0.59439754", "0.5916716", "0.5914417", "0.58630085", "0.58621794", "0.5855159", "0.5845481", "0.58410925", "0.58353466", "0.58353466", "0.58353466", "0.58285254", "0.5825922", "0.5821972", "0.58104813", "0.58074117", "0.5805973", "0.5805165", "0.5803793", "0.580333", "0.5796214", "0.5793579", "0.57925296", "0.5787419", "0.5787419", "0.5784011", "0.57839143", "0.578052", "0.57779086", "0.5768701", "0.5768268", "0.57649773", "0.57631296", "0.57498324", "0.57466584", "0.5743341", "0.5742215", "0.5742215", "0.5742215", "0.5742215", "0.5742215", "0.5742215", "0.5742215" ]
0.8225904
0
Activity running with "no history" set, so it is safe to set flag to false here. It needs to be set ASAP to handle corner case where activity is dismissed just before the server responds.
@Override protected void onPause() { isRunning = false; super.onPause(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void noActiveActivity() {\n\t\tLog.i(STARTUP, \"no active activity\");\n\t\tcancelNotification();\n\t\tcreateNotification();\n\t\tstartMainService();\t\t\n\t}", "public boolean interceptStartActivityIfNeed(Intent intet, ActivityOptions activityOptions) {\n return false;\n }", "public void setCancelActivity(Boolean value) {\n }", "private void dontShowThisAgain() {\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"isFirstAppLaunch\", false);\n editor.apply();\n }", "public void setHistoryCleared() {\n\n // If jelly bean or above.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {\n\n // Finish all activities on\n // the current stack.\n activity.finishAffinity();\n } else {\n activity.finish();\n }\n }", "private Boolean getWantIntent() {\n return false;\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tisFlag = false;\n\t}", "public boolean onForwardingStopped() {\n ActivityChooserView.this.dismissPopup();\n return true;\n }", "@Override\n protected void onPause() {\n handler.removeCallbacks(runnable); //stop handler when activity not visible\n super.onPause();\n }", "public void setNoFollow() {\n noFollow= true;\n }", "public boolean useHistoryAnomaly() {\n return false;\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(GuideActivity.this,MainActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\tMyApplication.getApp().getSysSpUtil().setIsFirstTime(false);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n\tpublic void onBackPressed() {\n\t\tif (mTaskType == Globals.TASK_TYPE_NEW) {\n\t\t\t\n\t\t\tIntent intent = new Intent(this, TrackingService.class);\n\t\t\tif(mBound){\n\t\t\t\tunbindService(mConnection);\n\t\t\t\tmBound = false;\n\t\t\t}\n\t\t\tstopService(intent);\n\t\t\t// notification has flag auto_cancel set\n\t\t\tfinish();\t\t\n\t\t}\n\t\t\n\t\tsuper.onBackPressed();\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n//\t\tGeneralActivity.isHide = false;\r\n\t}", "@Override\n public void run() {\n doubleBackToExitPressedOnce=false;\n }", "public void makegoaway(){\n if (!started_app){ // added to prevent running two copies when user clicks to skip\n // and when time runs out for splash\n Intent mainIntent = new Intent(SplashActivity.this,MainActivity.class);\n SplashActivity.this.startActivity(mainIntent);\n SplashActivity.this.finish();\n started_app=true;\n }\n }", "@Override\n public void needReloain(Activity activity) {\n }", "@Override\n public void onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n super.onBackPressed();\n return;\n }\n\n // Sets boolean to true when user presses back button\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(this, \"Press again to exit\", Toast.LENGTH_SHORT).show();\n\n // System waits for 2 seconds before setting boolean value to false again\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 2000);\n }", "private void screenOffBroadcast() {\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n mDoScreenOff = true;\n }\n // prize add v8.0 by zhaojian 20171102 end\n\n Intent intent = new Intent(\"prize.set.keyguard.state\");\n intent.putExtra(\"hide\",false);\n intent.putExtra(\"sleep\",true);\n getContext().sendBroadcast(intent);\n flags = false;\n // prize add v8.0 by zhaojian 20171102 start\n beforeIsLock = false;\n // prize add v8.0 by zhaojian 20171102 end\n\n handler.removeMessages(1);\n\n // prize add v8.0 by zhaojian 2017912 start\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n mIsAutoEnterReceiveUi = false;\n }\n // prize add v8.0 by zhaojian 2017912 end\n Log.d(TAG,\"screen off\");\n }", "void enterSipAppHa(boolean startCacheActivity);", "@Override\n public boolean onPreferenceClick(Preference preference) {\n if (clickTimes >= SHOW_HIDDEN_CLICK_COUNT) {\n Intent intent = new Intent(getActivity(), HiddenActivity.class);\n startActivity(intent);\n clickTimes = 1;\n return false;\n }\n clickTimes++;\n return false;\n }", "@Override\n\tprotected void onDestroy() {\n\t\tflag=false;\n\t\tsuper.onDestroy();\n\t}", "@Override\n\tprotected void onPause() {\n\n\t\tactivityVisible = false;\n\n\t\tif (TestHarnessUtils.isTestHarness()) {\n\t\t\tLocalBroadcastManager.getInstance(getApplicationContext()).unregisterReceiver(testHarnessUIController);\n\t\t}\n\t\tsuper.onPause();\n\t}", "@Override\n\t\t\tpublic void onShow(DialogInterface dialog) {\n\t\t\t\tsetActivityInvisible();\n\t\t\t}", "@Override\n public boolean onUnbind(Intent intent) {\n Log.i(TAG, \"Last client unbound from service\");\n // Called when the last client (MainActivity in case of this sample) unbinds from this\n // service. If this method is called due to a configuration change in MainActivity, we\n // do nothing. Otherwise, we make this service a foreground service.\n\n if (!mChangingConfiguration && mPrefs.getBoolean(\"switchTrack\", false)) {\n Log.i(TAG, \"Starting foreground service\");\n startForeground(NOTIFICATION_ID, getNotification());\n }\n return true; // Ensures onRebind() is called when a client re-binds.\n }", "private static boolean m33661d(Activity activity) {\n return !activity.isFinishing();\n }", "private final boolean m24749a(Intent intent) {\n Preconditions.m21858a(intent, (Object) \"Intent can not be null\");\n if (!this.f23881a.getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {\n return true;\n }\n return false;\n }", "public boolean isShowWhenLocked() {\n return getIntent().getBooleanExtra(\"StartActivityWhenLocked\", false);\n }", "public void setStuckCall(){\n this.stuckCall = true;\n }", "@Override\n protected void onResume() {\n super.onResume();\n if (!isAppInBackground) {\n // app 从后台唤醒,进入前台\n isAppInBackground = false;\n }\n }", "public boolean getNoFollow() {\n return noFollow;\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\t\n\t\tSystem.out.println(\"flag状态==============\" + flag);\n\t\tif (flag == true) {\n//\t\t\tflag = false;\n\t\t\tuserloginqm();\n//\t\t\tfinish();\n\t\t\t\n\t\t\torderxq = getIntent().getStringExtra(\"5\");\n\t\t\tSystem.out.println(\"---------------xq-\"+orderxq);\n//\t\t\tif (orderxq != null) {\n//\t\t\tif (orderxq.equals(\"5\")) {\n//\t\t\t\tMyOrderXqActivity.handler.sendEmptyMessage(1);\n//\t\t\t}\n//\t\t\t}\n\t\t}\n\t\t\n//\t\tif (zhuangtai == true) {\n//\t\t\tuserloginqm();\n//\t\t}\n\t\t\n\t}", "@Override\n public boolean onUnbind(Intent intent){\n return false;\n }", "protected void emptyHistory() {\n //点击单聊右上角的小人图标进入好友详情,在ChatFragment(子类)中重写\n }", "@Override\n\t\tpublic boolean handleBackPressed() {\n\t\t\treturn false;\n\t\t}", "public void isTripAbandon(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripAbandon\", value);\n\t\teditor.commit();\n\t}", "public void pauseApp() {\n theIsRunning = false;\n }", "public Boolean shouldAbandon() {\n return false;\n }", "@Override()\n protected void onCreate(final Bundle state)\n {\n logEnter(LOG_TAG, \"onCreate\", state);\n\n super.onCreate(state);\n\n final Intent i = getIntent();\n final Bundle extras = i.getExtras();\n restoreState(extras);\n }", "public default boolean isAlwaysDismissable(){ return false; }", "public void onBackPressed() {\n // do nothing. We want to force user to stay in this activity and not drop out.\n }", "private void onBack() {\n\t\tIntent startMain = new Intent(Intent.ACTION_MAIN);\r\n\t\tstartMain.addCategory(Intent.CATEGORY_HOME);\r\n\t\tstartMain.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // //FLAG_ACTIVITY_NEW_TASK\r\n\t\tstartActivity(startMain);\r\n\t}", "@Override\n public boolean onCreate() {\n return false;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(TAG,\"receiverMsg...onReceive\");\n if(!mDoScreenOff){\n mDoScreenOff = false;\n handler.removeMessages(1); //remove timer\n beforeIsLock = false;\n flags = false;\n Log.d(TAG,\"set the flag as false when screen off\");\n }\n // prize add if-judgement by zhaojian 20171102 end\n }", "@Override\n protected boolean canGoBack() {\n return false;\n }", "public void setActivityEnd(boolean z) {\n if (this.mIsActivityEnd != z) {\n this.mIsActivityEnd = z;\n this.mNativeDataAdapter.notifyDataSetChanged();\n }\n if (this.mNeedChangePage) {\n this.mNeedChangePage = false;\n if (this.mIsActivityEnd) {\n this.mNetRadio.setChecked(true);\n return;\n }\n this.mNativeRadio.setChecked(true);\n }\n }", "public void onNewIntent(Intent intent) {\n AppMethodBeat.m2504i(16653);\n super.onNewIntent(intent);\n setIntent(intent);\n if (this.ggF != null) {\n this.ggF.dismiss();\n this.ggF = null;\n }\n if (!anB()) {\n finish();\n }\n AppMethodBeat.m2505o(16653);\n }", "boolean hasIntent();", "public void onPostExecute(Boolean bool) {\n LogRecorder.this.mTask = null;\n LogRecorder.this.mIsRuning = false;\n }", "@Override\n public void onBackPressed() {\n \tsuper.onBackPressed();\n \tManualTestActivity.FlagMc = true;\n \tmHandler.removeCallbacks(pRunnable);\n }", "@Override\n public void onPositiveClick() {\n quitThisActivity();\n }", "@Override\n protected void onResume() {\n super.onResume();\n justAfterPause = false;\n }", "public void setFlag(Intent intent) {\n String flag2;\n if (intent != null && (flag2 = intent.getStringExtra(\"flag\")) != null) {\n flag = flag2;\n Log.e(\"MOBISEC\", \"flag set correctly\");\n }\n }", "@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n int intentactionflag = 0;\n\n //gets call type\n if (!(intent == null)) {\n intentactionflag = intent.getIntExtra(PACKAGE_NAME + \".myaction\", 0);\n }\n\n //tracking starting or restarting\n if (intentactionflag == intentstartid || intentactionflag == intentresetid) {\n // if (intentactionflag == intentstartid) {\n // }\n begintracking();\n }\n if (intentactionflag == intentpauseid && countdown == 0) {\n pausetracking = !pausetracking;\n if (!pausetracking) {\n begintracking();\n } else {\n endtracking();\n }\n }\n if (intentactionflag == intentexitid) {\n cleanup();\n }\n goforeground();\n return super.onStartCommand(intent, flags, startId);\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "@Override\n protected void onPause() {\n super.onPause();\n active = false;\n }", "public boolean isDestroyingActivity() {\n return isFinishing() || Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && isDestroyed();\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tCanPopWind.sIsAirActivityShow = true;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}", "public boolean isTripAbandon() {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getBoolean(\"isTripAbandon\", false);\n\t}", "@Override\r\n\tpublic boolean isLive() {\n\t\treturn false;\r\n\t}", "private void showIfPendingPushNotification() {\n if (mIsActivityResumedFromSleep) {\n PushNotificationMessageHandler.getInstance(this).showPendingPushNotification();\n PushNotificationMessageHandler.getInstance(this).clearPushNotificationFromBar();\n }\n }", "public static void preventScreenDisabling(Activity activity) {\r\n activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);\r\n }", "@Override\n public void onActivityPaused(Activity ignored) {\n if (isAuthSticky) {\n activityPaused = true;\n }\n }", "@Override\n public void onClick(View v) {\n SaveSharedPreference.setLoggedIn(getApplicationContext(), false);\n\n Intent intent = new Intent(getApplicationContext(), MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\r\n public void onBackPressed() {\n moveTaskToBack(true);\r\n }", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onCreate() {\n\t\treturn false;\n\t}", "@Override\n\t public void onBackPressed() {\n\t\t Intent intent = new Intent(this,MainActivity.class);\n\t //intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\t\t intent.putExtra(\"overlayVisible\", \"noOverlay\");// als vanuit donatiescherm weer terug wil niet opnieuw de uitleg overlay\n\t\t startActivity(intent);\n\n\t }", "@Override\n protected void onCreate(Bundle pSavedInstanceState) {\n\n if (activitiesLaunched.incrementAndGet() > 1) { finish(); }\n\n super.onCreate(pSavedInstanceState);\n\n serviceIntent = new Intent(this, TallyDeviceService.class);\n\n }", "private void skippingWorks() {\n Storage storage = new Storage(SplashActivity.this);\n if (storage.getLogInState()) {\n Intent intent = new Intent(SplashActivity.this, MainActivity.class);\n startActivity(intent);\n SplashActivity.this.overridePendingTransition(R.anim.slide_left, R.anim.slide_right);\n finish();\n } else {\n /*if user is previously not logged in take him to the AuthActivity*/\n Intent intent = new Intent(SplashActivity.this, AuthActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n SplashActivity.this.overridePendingTransition(R.anim.slide_left, R.anim.slide_right);\n finish();\n }\n }", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "@Override\n\tpublic boolean onNaviBackClick() {\n\t\treturn false;\n\t}", "public boolean isNeedStartRecordingOnSwitching() {\n return this.mIsVideoCaptureIntent;\n }", "void onUserAttentionGone() {\n if (isPlaying()) { //If video is playing pause it.\n mPauseTime = getCurrentPosition(); //mPauseTime is an int\n super.pause();\n }\n }", "@Override\n public boolean onBackPressed() {\n if (doubleBackToExitPressedOnce) {\n requireActivity().finishAffinity();\n System.exit(0);\n }\n\n this.doubleBackToExitPressedOnce = true;\n Toast.makeText(requireActivity(), \"Please click BACK again to exit\", Toast.LENGTH_SHORT).show();\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n doubleBackToExitPressedOnce = false;\n }\n }, 2000);\n return true;\n }", "@Override\nprotected void onSaveInstanceState(Bundle outState) {\n\tsuper.onSaveInstanceState(outState);\n\tLog.d(\"CheatActivity\", \"onSaveInstanceState\");\n\toutState.putBoolean(ANSWER_IS_SHOWN, mIsShown);\n}", "@Override\n public boolean cancelIfCannotGoBack() {\n return true;\n }", "protected boolean onExecute(String command)\n {\n return false;\n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\trunActivity = 0;\r\n\t}", "@Override\n protected void onPause() {\n if (LockscreenReceiver.wasScreenOn){\n finish();\n }\n\n super.onPause();\n }", "@Override\n public boolean activityResuming(String pkg) throws RemoteException {\n Log.i(TAG, String.format(\"Resuming activity in package %s\", pkg));\n return true;\n }", "private void configureFullScreenIntent(Notification.Builder builder, PendingIntent intent,\n Call call) {\n // Ok, we actually want to launch the incoming call\n // UI at this point (in addition to simply posting a notification\n // to the status bar). Setting fullScreenIntent will cause\n // the InCallScreen to be launched immediately *unless* the\n // current foreground activity is marked as \"immersive\".\n /// M: [ALPS01886490]ugly hack full-screen alert when call waiting or something else. @{\n /*\n * Google code:\n Log.d(this, \"- Setting fullScreenIntent: \" + intent);\n builder.setFullScreenIntent(intent, true);\n */\n if (canShowFullScreen(call)) {\n Log.d(this, \"- Setting fullScreenIntent: \" + intent);\n builder.setFullScreenIntent(intent, true);\n }\n /// @}\n\n // Ugly hack alert:\n //\n // The NotificationManager has the (undocumented) behavior\n // that it will *ignore* the fullScreenIntent field if you\n // post a new Notification that matches the ID of one that's\n // already active. Unfortunately this is exactly what happens\n // when you get an incoming call-waiting call: the\n // \"ongoing call\" notification is already visible, so the\n // InCallScreen won't get launched in this case!\n // (The result: if you bail out of the in-call UI while on a\n // call and then get a call-waiting call, the incoming call UI\n // won't come up automatically.)\n //\n // The workaround is to just notice this exact case (this is a\n // call-waiting call *and* the InCallScreen is not in the\n // foreground) and manually cancel the in-call notification\n // before (re)posting it.\n //\n // TODO: there should be a cleaner way of avoiding this\n // problem (see discussion in bug 3184149.)\n\n // If a call is onhold during an incoming call, the call actually comes in as\n // INCOMING. For that case *and* traditional call-waiting, we want to\n // cancel the notification.\n /// M: Fix ALPS01782477. @{\n // When call waiting, we has started ui at startui function, {@link InCallPresenter}.\n /*\n boolean isCallWaiting = (call.getState() == Call.State.CALL_WAITING ||\n (call.getState() == Call.State.INCOMING &&\n CallList.getInstance().getBackgroundCall() != null));\n\n if (isCallWaiting) {\n Log.i(this, \"updateInCallNotification: call-waiting! force relaunch...\");\n // Cancel the IN_CALL_NOTIFICATION immediately before\n // (re)posting it; this seems to force the\n // NotificationManager to launch the fullScreenIntent.\n mNotificationManager.cancel(NOTIFICATION_IN_CALL);\n }\n */\n /// @}\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\t\n\t\tfromAlarm = false;\n\t}", "private void onDeleteConfirmed() {\n stopService();\n\n Intent intent = new Intent(this, StartRecordingActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n finish();\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tCanPopWind.sIsAirActivityShow = false;\n\t}", "@Override\n public boolean onUnbind(Intent intent) {\n stopPlayer();\n return false;\n }", "public boolean interceptBackEvent() {\n try {\n if (this.mWebViewH5Page == null) {\n return false;\n }\n if (!canInterceptBackEvent()) {\n H5Log.d(TAG, \"interceptBackEvent...can not intercept back event\");\n return false;\n }\n APWebView apWebView = this.mWebViewH5Page.getWebView();\n if (apWebView == null || !apWebView.canGoBack()) {\n H5Log.d(TAG, \"interceptBackEvent...can not go back\");\n return false;\n } else if (apWebView.copyBackForwardList().getCurrentIndex() <= 0) {\n H5Log.d(TAG, \"interceptBackEvent...webview with no history\");\n return false;\n } else {\n H5Log.e(TAG, (String) \"interceptBackEvent...go back\");\n apWebView.goBack();\n return true;\n }\n } catch (Throwable e) {\n H5Log.e(TAG, \"interceptBackEvent...e=\" + e);\n return false;\n }\n }", "@Override\n public boolean onUnbind(Intent intent) {\n Log.d(TAG, TAG + \" onUnbind\");\n return false;\n }", "private void eventStopTrackingRoute(){\n if(trackingRoute){\n trackingRoute = false;\n //Unmount tracking listeners\n locationManager.removeUpdates(this);\n //TODO Send DB stuff to Add_Route\n Intent addRoute = new Intent(this, Add_Route.class);\n addRoute.putExtra(\"places\", places);\n addRoute.putExtra(\"routePoints\", routePoints);\n //Once child finishes this activity will also finish\n finishFromChild(this);\n startActivity(addRoute);\n }\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }", "@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }" ]
[ "0.60271496", "0.6001253", "0.5959677", "0.59260136", "0.5683548", "0.56815034", "0.56713414", "0.56203026", "0.5534951", "0.55342203", "0.55212396", "0.55200535", "0.55133605", "0.5502057", "0.5497774", "0.54750514", "0.54646945", "0.5461784", "0.5449708", "0.5442472", "0.5440049", "0.5429321", "0.542463", "0.54056334", "0.5399521", "0.5395501", "0.53702676", "0.53539217", "0.535112", "0.53426194", "0.5342585", "0.53372586", "0.5328", "0.5325774", "0.5318945", "0.5317467", "0.5316701", "0.53144425", "0.53127235", "0.53054005", "0.5299596", "0.52970064", "0.52952886", "0.52932304", "0.5289983", "0.528847", "0.5277334", "0.5275966", "0.52687114", "0.5264469", "0.52519727", "0.52310425", "0.5230871", "0.52303386", "0.52233857", "0.52233857", "0.52229863", "0.52184635", "0.52093214", "0.52093214", "0.5200619", "0.5194587", "0.519447", "0.51920617", "0.51891524", "0.518707", "0.51868016", "0.51838785", "0.5177506", "0.5177506", "0.5177506", "0.5175062", "0.517141", "0.5169192", "0.5167694", "0.516549", "0.5159793", "0.515592", "0.51526684", "0.5147367", "0.5146788", "0.5144938", "0.5143406", "0.5142357", "0.5139388", "0.5138855", "0.5137234", "0.5135215", "0.5133946", "0.5128501", "0.5127551", "0.5127223", "0.51212525", "0.5119936", "0.5119936", "0.5119936", "0.5119936", "0.5119936", "0.5119936", "0.5119936" ]
0.57881236
4
TODO Autogenerated method stub
@Override public List<User> getList(Integer page, Integer Limit) { return null; }
{ "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
firebase thing starts here
private void setupFirebaseAuth(){ Log.d(TAG, "setupFirebaseAuth"); mAuth = FirebaseAuth.getInstance(); fbaseDB = FirebaseDatabase.getInstance(); dbRef = fbaseDB.getReference(); mAuthListener = new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser user = firebaseAuth.getCurrentUser(); if(user != null){ //somebody signed in Log.d(TAG, "onAuthStateChanged:signed_in" + user.getUid()); dbRef.addListenerForSingleValueEvent( new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if(checkUsernamExists(username.getText().toString(), dataSnapshot)){ Toast.makeText(SignUp.this,"Signup SUCCESSFUL",Toast.LENGTH_SHORT).show(); } else{ mAuth.signOut(); } } @Override public void onCancelled(DatabaseError databaseError) { } } ); } else{ //nobodys here Log.d(TAG, "onAuthStateChanged:signed_out"); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }", "private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }", "private FirebaseUtil(){}", "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }", "private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }", "private void sendGuideRegDataToFireBase(){\n }", "private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }", "private void setupFirebase() {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(Constants.ROOM_DATABASE_REFERENCE);\r\n mQuery = mFirebaseDatabaseReference.orderByChild(Constants.ROOM_INT_REFERENCE).startAt(Utils.convertHallStart(mHallStart)).endAt(Utils.convertHallEnd(mHallEnd));\r\n }", "public static boolean FireBaseAddWord(String source,String target,String userId){\n\r\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\r\n DatabaseReference root = firebaseDatabase.getReference(\"words\").child(userId); // Firebase database table path.\r\n\r\n Map wordMap = new HashMap(); // Set word information in map\r\n\r\n wordMap.put(\"source\",source);\r\n wordMap.put(\"target\",target);\r\n wordMap.put(\"time\",ServerValue.TIMESTAMP);\r\n\r\n root.push().updateChildren(wordMap).addOnCompleteListener(new OnCompleteListener() {\r\n @Override\r\n public void onComplete(@NonNull Task task) { // Update Database\r\n if(task.isSuccessful()){\r\n setAddWordIsSuccessful(true);\r\n }else {\r\n setAddWordIsSuccessful(false);\r\n }\r\n }\r\n });\r\n\r\n\r\n return addWordIsSuccessful;\r\n\r\n\r\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n }", "private void setupFirebase(){\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n if (user!=null){\n databaseReference = firebaseDatabase.getReference(\"Users\").child(user.getUid()).child(\"teacher\");\n }\n }", "private void RetrieveChildAddedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t //[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "public static void setupFirebase(Context context) {\n // initialised Firebase\n com.firebase.client.Firebase.setAndroidContext(context);\n }", "@Override\n public void onCancelled(DatabaseError firebaseError) {\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onError(FirebaseError firebaseError) {\n }", "private void setupFirebaseAuth(){\r\n Log.d(TAG, \"setupFirebaseAuth: setting up setupFirebaseAuth\");\r\n\r\n mAuth = FirebaseAuth.getInstance();\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n myRef = mFirebaseDatabase.getReference();\r\n\r\n mAuthListener = new FirebaseAuth.AuthStateListener() {\r\n @Override\r\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\r\n FirebaseUser user = firebaseAuth.getCurrentUser();\r\n\r\n if (user != null) {\r\n // User is signed in\r\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\r\n } else {\r\n // User is signed out\r\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\r\n }\r\n // ...\r\n }\r\n };\r\n\r\n myRef.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n\r\n // retrieve user info from database\r\n// setProfileWidgets(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n\r\n // retrieve job Post info from database\r\n// setJobPost(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n// mFirebaseMethods.addNewJobPost(job_date,job_description, job_title,user_name );\r\n\r\n //retrieve bids from database\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n }", "private FirebaseDAO() {}", "private void RetrieveChildChangedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t//[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "public AndroidInterfaceClass(){\n database = FirebaseDatabase.getInstance(\"https://brainstorming-1fa06-default-rtdb.europe-west1.firebasedatabase.app/\");\n }", "private void testFirebase() {\n Intent launchIntent = new Intent(this, HomeActivity.class);\n launchIntent.putExtra(Constants.FIREBASE_ACTION, true);\n launchIntent.putExtra(Constants.FIREBASE_TITLE, \"Sample Title\");\n launchIntent.putExtra(Constants.FIREBASE_BODY, \"Sample Body\");\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, launchIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Bitmap rawBitmap = BitmapFactory.decodeResource(getResources(),\n R.mipmap.ic_launcher_round);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notif_icon_firebase_om)\n .setLargeIcon(rawBitmap)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setContentText(\"Sample body\")\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification notification = notificationBuilder.build();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n notificationManager.notify(0 /* ID of notification */, notification);\n }", "public interface FirebaseService {\n public void init();\n}", "private void registrationProcessFireStore() {\n\n Log.i(\"checkk UserReg: \", \"registrationprocess\");\n presenter.checkUserDoc(userName,userPhone,adminName,adminPhone);\n Log.i(\"checkk UserReg: \", \"registrationprocess AFTER\");\n\n\n\n }", "public static void initialize() {\n //Get Firebase auth instance\n GlobalData.auth = FirebaseAuth.getInstance();\n\n GlobalData.u = new User();\n GlobalData.u.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");//\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n /**\n * Start Firebase!\n */\n FirebaseCore.start();\n// User u = new User();\n// u.setId(\"6ZxSGeHS4DOoFHEE2McBcGH7XHP2\");\n//\n// try {\n// u = DUser.crud(u, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n// Log.e(\"Test\", u.getEmail());\n//\n// Message m = new Message();\n// m.setMessage(\"Hello \" + System.currentTimeMillis());\n// m.setBlobname(null);\n// m.setBlob(null);\n// m.setTimestamp(System.currentTimeMillis());\n//\n// try {\n// m.setOrder(DAutoIncrement.order(DAutoIncrement.MESSAGE));\n//\n// m = DMessage.crud(m, false, false);\n// Message m2 = new Message();\n// m2.setId(m.getId());\n// m2 = DMessage.crud(m2, true, false);\n//// Log.w(\"Message\",m2.getId());\n// Message m3 = new Message();\n// m3.setId(m.getId());\n//// DMessage.crud(m3,false, true);\n//// Log.w(\"Message2\",m3.getId());\n// DMessageList.crd(u, u, m, false, false);\n//\n// final ArrayList<Message> messages = DMessageList.crd(u, u, null, true, false);\n// for (Message mes : messages\n// ) {\n// DMessage.crud(mes, true, false); // Fill the message with data\n//\n// }\n// // Sorting require all messages element to be filled, otherwise, it won't work\n// Collections.sort(messages);\n// for (Message mes : messages\n// ) {\n// Log.e(mes.getId(), mes.getMessage());\n//\n// }\n//\n// RunnableDataSnapshot rds = new RunnableDataSnapshot() {\n// @Override\n// public void run(DataSnapshot dataSnapshot, Object object) {\n// ArrayList<Message> messages2 = (ArrayList<Message>) object;\n// Collections.sort(messages2);\n// for (int i = messages.size(); i < messages2.size(); i++) {\n// Log.e(\"New Input\", messages2.get(i).getId());\n// messages.add(messages2.get(i));\n// }\n// Log.e(\"Data change\", \"Data is changing\");\n// }\n// };\n// DMessageList.nonblockRead(u, u, rds);\n// User u2 = new User();\n// u2.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");\n// ArrayList<User> users = new ArrayList<User>();\n// users.add(u2);\n// HashMap<String, ArrayList<User>> hm = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 1\", users);\n// DBroadcast.uBroadcastPushorDelete(u, hm, true);\n// ArrayList<User> users2 = new ArrayList<User>();\n// users2.add(u);\n// users2.add(u2); // it add itself which must be avoided!\n// HashMap<String, ArrayList<User>> hm2 = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 2\", users2);\n// DBroadcast.uBroadcastPushorDelete(u2, hm2, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n }\n });\n t.start();\n\n }", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n myRef = mFirebaseDatabase.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if (user != null) {\n // User is signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n } else {\n // User is signed out\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n // ...\n }\n };\n\n\n }", "@Override\n public void onVerificationFailed(FirebaseException e) {\n // displaying error message with firebase exception.\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void addMember(String firstName, String lastName, String emailId) {\n Log.e(\"AddMember\", \"Fn \" + firstName + \", Ln \" + lastName + \"eid \" + emailId);\n\n\n// myRef.setValue(\"Hello, World!\");\n String key = myRef.push().getKey();\n Log.e(\"AddMember\", \"key \" + key);\n\n CoreMember member = new CoreMember(firstName, lastName, emailId);\n myRef.child(key).setValue(member, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError != null) {\n System.out.println(\"Data could not be saved \" + databaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\" + databaseReference.toString());\n memberKey = databaseReference.getKey();\n hideInputForm(true);\n\n }\n }\n });\n }", "@PostConstruct\r\n\tprivate void firebaseLogIn() {\n\t\ttry {\r\n\r\n\t\t\tInputStream serviceAccount = getClass()\r\n\t\t\t\t\t.getResourceAsStream(\"/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n//\t\t\t\t\tnew FileInputStream(\r\n//\t\t\t\t\t\"src/main/resources/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n\t\t\tFirebaseOptions options = FirebaseOptions.builder()\r\n\t\t\t\t\t.setCredentials(GoogleCredentials.fromStream(serviceAccount))\r\n\t\t\t\t\t.setDatabaseUrl(\"https://avisosnick.firebaseio.com\").build();\r\n\r\n\t\t\tFirebaseApp.initializeApp(options);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void logHappeningClick(String happeningId, String userId){\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n mDatabase.child(\"analytics\").child(\"happenings\").child(happeningId).child(\"clicks\").child(userId).push().setValue(System.currentTimeMillis(), new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.i(\"AnalyticsService:\",\"logHappeningClick: success\");\n }\n }\n });\n\n }", "@Override\n public void onCreate() {\n super.onCreate();\n if(!FirebaseApp.getApps(this).isEmpty()) {\n FirebaseDatabase.getInstance().setPersistenceEnabled(true);\n }\n appInstance = this;\n\n\n\n }", "public void triggerRoomsOnce() throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"ChatRoomNode\");\n Firebase newNodeRef = null;\n if(acceptKey == null){\n newNodeRef = roomsNodeRef.push();\n acceptKey = newNodeRef.getKey();\n }else{\n newNodeRef = roomsNodeRef.child(acceptKey);\n }\n // Firebase newNodeRef = roomsNodeRef.push();\n try {\n newNodeRef.setValue(\"accept\",new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.d(\"triggerRoomsOnce\",\"onComplete Data could not be saved. \" + firebaseError.getMessage());\n } else {\n Log.d(\"triggerRoomsOnce\",\" onComplete Data saved successfully.\");\n }\n }\n });\n\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n\n\n /* triggerRoomsOnceRef.setValue(\"accepted\");*//*, new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n triggerRoomsOnceRef.removeEventListener();\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });*//*\n*/\n\n }", "public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrI = taskSnapshot.getDownloadUrl();\n FirebasePost firebasePost = new FirebasePost();\n firebasePost.imageUrl = downloadUrI.toString();\n myImage.child(\"home\").setValue(firebasePost);\n\n\n }", "@Override\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(firebaseMethods.checkIfUsernameExists(username, dataSnapshot)){\n append = myRef.push().getKey().substring(0,7);\n }\n username = username + append;\n\n //add new user to the database\n firebaseMethods.addNewUser(\"notdone\",username,\"emp\",userID);\n Toast.makeText(mContext, \"Signup successful. Admin Verification \" +\n \"Left.\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(Register.this, Login.class);\n startActivity(i);\n finish();\n }", "void onUserCreated(FirebaseUser firebaseUser);", "void firebaseExistingDocAdapter(String image, int position){\n String editTextAmount = mAmountEditText.getText().toString();\n int editableAmount = Integer.parseInt(editTextAmount);\n\n //Adapter brick amount\n BrickModel currentBrick = mBrickList.get(position);\n int currentBrickAmount = Integer.parseInt(currentBrick.getAmount());\n\n //Compare brick amounts(to avoid nul point exceptions)\n boolean inputSmaller = editableAmount <= currentBrickAmount;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: currentAmount: \" + currentBrickAmount);\n\n //Make bool to show necesary update\n if (image.equals(\"mDestroy\") & inputSmaller){\n// requestFireUpdate = true;\n //TODO should make graveyard? // make who put it there and why..?(*inManufacturing*atClient*wrongData*fallInStacking*...**)\n Log.d(TAG, \"firebaseExistingDocAdapter: mDestroy: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n } else if(image.equals(\"mSeal\") && inputSmaller){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mSeal: \" + editTextAmount);\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n //TODO make \"create new purchase\"\n\n\n } else if (image.equals(\"mProduce\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mProduce: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount + editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n\n } else if (image.equals(\"m2Class\") && inputSmaller){\n if(currentBrick.getBrickName().endsWith(\"1\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n writeNew2ClassBrick(editTextAmount, currentBrick);\n } else {\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class already exist\");\n }\n\n\n } else {\n Log.wtf(TAG, \"firebaseExistingDocAdapter: Something went wrong!\\n\" +\n \"(Most likely you inserted too big number)\\n\");\n\n// requestFireUpdate = false;\n\n }\n \n if(requestFireUpdate){\n //TODO create Show updateButton\n Log.d(TAG, \"firebaseExistingDocAdapter: update button accessible\");\n\n\n }\n\n Collections.sort(mBrickList, BrickModel.StuNameComparator);\n notifyDataSetChanged();\n// notifyItemChanged(position);\n\n// itemView.clearFocus();\n// InputMethodManager imm = (InputMethodManager) itemView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);\n\n// imm.hideSoftInputFromWindow(itemView.getWindowToken(), 0);\n\n\n }", "@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t\n\t\t\t}", "private void RetrieveChildRemovedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName);\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t//[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "public void inicializarFirebaseAuth() {\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n }", "public void onClick(View v) {\n EditText email = (EditText) findViewById(R.id.email);\n final String emailString = email.getText().toString();\n\n EditText pass = (EditText) findViewById(R.id.pass);\n final String passString = pass.getText().toString();\n Firebase ref = new Firebase(\"https://gymguy.firebaseio.com\");\n\n // Create a handler to handle the result of the authentication\n Firebase.AuthResultHandler authResultHandler = new Firebase.AuthResultHandler() {\n @Override\n public void onAuthenticated(AuthData authData) {\n // Authenticated successfully with payload authData\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\n }\n\n @Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n // Authenticated failed with error firebaseError\n Context context = getApplicationContext();\n// CharSequence text = firebaseError.getMessage() + \" : for \" + emailString + passString + firebaseError.getDetails();\n CharSequence text = firebaseError.getMessage() + \" : \" + firebaseError.getDetails();\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n };\n\n // Authenticate users with a custom Firebase token\n// ref.authWithCustomToken(\"<token>\", authResultHandler);\n // Or with an email/password combination\n ref.authWithPassword(emailString, passString, authResultHandler);\n }", "public static void main(String[] args) {\n logger.info(\"application start!\");\n\n FileInputStream serviceAccount =\n null;\n try {\n serviceAccount = new FileInputStream(\"/home/lamdn/Downloads/MessageCloudExample-7d0bdd0d8227.json\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n FirebaseOptions options = null;\n try {\n options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://messagecloudexample.firebaseio.com\")\n .build();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n FirebaseApp.initializeApp(options);\n\n //test\n Process process = new Process();\n process.fillQueue();\n process.start();\n\n //test\n// FirebaseMessagingSnippets fbm = new FirebaseMessagingSnippets();\n// try {\n// for(int i = 1; i <= 10; ++i) {\n// logger.info(\"send msg index: \" + i);\n//// fbm.sendAll();\n// fbm.sendAllAsync();\n//\n//// fbm.sendToTopic();\n//// fbm.sendTopicAsync();\n// }\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(\"room\");\r\n super.onCreate(savedInstanceState);\r\n }", "@Override\n public void onCancelled(DatabaseError error) {\n Log.w(\"Firebase read \", \"Failed to read value.\", error.toException());\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n // NOT ALLOWED: using multiple `orderBy` statements in the same line.\n Log.d(TAG, currUserID);\n Query query = databaseReferenceGroup.orderByChild(\"/groupMembers/\" + currUserID).equalTo(currUserID);\n\n FirebaseRecyclerOptions<Group> firebaseRecyclerOptions = new FirebaseRecyclerOptions\n .Builder<Group>()\n .setQuery(query, Group.class)\n .build();\n\n FirebaseRecyclerAdapter<Group, GroupDisplay> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Group, GroupDisplay>(firebaseRecyclerOptions) {\n @NonNull\n @Override\n public GroupDisplay onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n // Inflate the group card view\n View view = LayoutInflater\n .from(parent.getContext())\n .inflate(R.layout.activity_display_group_database, parent, false);\n return new GroupDisplay(view);\n }\n\n @Override\n protected void onBindViewHolder(@NonNull GroupDisplay holder, int position, @NonNull Group model) {\n // It is what is going to display on the group card view\n holder.setGroupName(model.getGroupName());\n Map<String, String> groupMembersMap = model.getGroupMembers();\n Map<String, String> groupAdmins = model.getGroupAdmins();\n\n if (groupMembersMap.size() > 1){\n for (String userID : groupMembersMap.keySet()){\n Query queryToGetMemberName = databaseReference.child(\"User\").child(userID).child(\"userName\");\n queryToGetMemberName.addListenerForSingleValueEvent(new ValueEventListener(){\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot){\n String memberName = dataSnapshot.getValue(String.class);\n holder.addMemberToGroupMembersStr(memberName);\n Log.d(TAG, \"Member Name: \" + memberName);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.d(TAG, \"Unable to get groupMemberName: \" + error);\n }\n });\n }\n } else {\n holder.setGroupMembersStr(\"Only You\");\n }\n\n // If you click the group, it will open the create task activity\n holder.view.setOnClickListener((view) -> {\n Intent intent;\n\n //Here we check if the currUser is an Admin.\n if (groupAdmins.containsKey(currUserID)) {\n intent = new Intent(CreateGroup.this, CreateTaskAdmin.class);\n } else {\n intent = new Intent(CreateGroup.this, CreateTaskUser.class);\n }\n\n // How do I pass data between Activities in Android application\n // https://stackoverflow.com/questions/2091465/how-do-i-pass-data-between-activities-in-android-application\n // How to use putExtra() and getExtra() for string data\n // https://stackoverflow.com/questions/5265913/how-to-use-putextra-and-getextra-for-string-data\n // It is the name of group that you click\n\n String groupNameStr = model.getGroupName();\n intent.putExtra(\"EXTRA_GROUP_NAME\", groupNameStr);\n\n // Count user and admin\n int groupMembersCount = groupMembersMap.size();\n intent.putExtra(\"EXTRA_MEMBER_COUNT\", Integer.toString(groupMembersCount));\n\n int groupAdminsCount = groupAdmins.size();\n intent.putExtra(\"EXTRA_ADMIN_COUNT\", Integer.toString(groupAdminsCount));\n\n // pass the groupID to the intent.\n intent.putExtra(\"EXTRA_GROUP_ID\", model.getGroupId());\n\n startActivity(intent);\n });\n }\n };\n\n // Attach the adapter\n recyclerViewGroup.setAdapter(firebaseRecyclerAdapter);\n firebaseRecyclerAdapter.startListening();\n }", "private void queryStartingAtValueChildKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tString strChildKey;\n \tObject objStartValue;\n\n if ( data.length() >= 3 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjStartValue = data.get(1);\n\t\t\t\tstrChildKey = data.getString(2);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValueChildKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryStartingAtValueChildKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValueChildKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n // Read data and react to changes\n if( objStartValue.getClass() == Double.class )\n \turlRef.startAt(((Double)objStartValue).doubleValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if(objStartValue.getClass() == Boolean.class )\n \turlRef.startAt(((Boolean)objStartValue).booleanValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if( objStartValue.getClass() == String.class )\n \turlRef.startAt((String)objStartValue, strChildKey).addListenerForSingleValueEvent(listener);\n else\n \turlRef.startAt(objStartValue.toString(), strChildKey).addListenerForSingleValueEvent(listener);\n }", "private void queryEqualToValueChildKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tString strChildKey;\n \tObject objValue;\n\n if ( data.length() >= 3 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjValue = data.get(1);\n\t\t\t\tstrChildKey = data.getString(2);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValueChildKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryEqualToValueChildKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValueChildKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n // Read data and react to changes\n if( objValue.getClass() == Double.class )\n \turlRef.equalTo(((Double)objValue).doubleValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if(objValue.getClass() == Boolean.class )\n \turlRef.equalTo(((Boolean)objValue).booleanValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if( objValue.getClass() == String.class )\n \turlRef.equalTo((String)objValue, strChildKey).addListenerForSingleValueEvent(listener);\n else\n \turlRef.equalTo(objValue.toString(), strChildKey).addListenerForSingleValueEvent(listener);\n }", "@Override\n\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\n\t}", "private void id(){\n but = findViewById(R.id.googlBtn);\n image = findViewById(R.id.Logo_image);\n logoText = findViewById(R.id.logo_name);\n sloganText = findViewById(R.id.slogan_name);\n password = findViewById(R.id.password);\n login_btn = findViewById(R.id.login_btn);\n emailsignup = findViewById(R.id.emailsignup);\n phonesignup = findViewById(R.id.phonesignup);\n forgot=findViewById(R.id.forgot);\n //googlesignup = findViewById(R.id.googlesignup);\n email=findViewById(R.id.loginemail);\n scrollView=findViewById(R.id.scroll);\n firebaseAuth=FirebaseAuth.getInstance();\n firebaseDatabase=FirebaseDatabase.getInstance();\n }", "public DatabaseConnector() {\n\n try {\n firebaseAuth = FirebaseAuth.getInstance();\n //Firebase Instance..\n authStateListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if(user !=null) {\n Log.d(TAG, \"onAuthStateChanged: ***********\" + user.getUid());\n } else Log.d(TAG, \"onAuthStateChanged: ______________\");\n }\n };\n firebaseAuth.addAuthStateListener(authStateListener);\n } catch (Exception e) {\n Log.d(\"DatabaseConnector\", \"DatabaseConnector: Constructor | Error: \" + e.getMessage());\n }\n\n }", "@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(TAG, \"New user creation Firebase error\");\n }", "@Override\n public View onCreateView ( LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState )\n {\n reff= FirebaseDatabase.getInstance(\"https://childhelpline-5e6f0-default-rtdb.firebaseio.com/\").getReference().child(\"clientinfo\");\n\n\n /* loginn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick ( View v ) {\n insertinfo();\n\n Intent intent = new Intent(getActivity().getBaseContext(), chat.class);\n startActivity(intent);\n\n }\n });\n*/\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment_repoter, container, false);\n }", "private DataManager() {\n ref = FirebaseStorage.getInstance().getReference();\n }", "private void saveing_data_firebase(String recodfile) {\r\n\r\n Uri uri = Uri.fromFile(new File(recodfile));\r\n Mprogress.setTitle(\"Please wait ...\");\r\n Mprogress.setMessage(\"wait for a moment your voice is uploading\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n StorageReference filepath = audiofile.child(uri.getLastPathSegment());\r\n filepath.putFile(uri)\r\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n\r\n String audiouri = task.getResult().getDownloadUrl().toString();\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n DatabaseReference NewNode = FirebaseDatabase.getInstance().getReference().child(\"GlobalChat\").push();\r\n\r\n String push_id = NewNode.getKey();\r\n\r\n\r\n Map<String, Object> globalmap = new HashMap<String, Object>();\r\n globalmap.put(\"message\", audiouri);\r\n globalmap.put(\"name\", Currentuser_name);\r\n globalmap.put(\"time\", CurrentTime);\r\n globalmap.put(\"date\", CurrentDate);\r\n globalmap.put(\"type\", \"Audio\");\r\n globalmap.put(\"MessageKey\", push_id);\r\n globalmap.put(\"MyID\", FirebaseAuth.getInstance().getCurrentUser().getUid());\r\n globalmap.put(\"Uri\", current_image_uri);\r\n globalmap.put(DataManager.UserNameSerach, Currentuser_name.toLowerCase());\r\n\r\n NewNode.updateChildren(globalmap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n fine_user_send_audio_notifaction();\r\n Mprogress.dismiss();\r\n } else {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), e.getMessage().toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n } else {\r\n\r\n Mprogress.dismiss();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n\r\n Mprogress.dismiss();\r\n }\r\n });\r\n }", "private void uploadreferance(String myurl,String filename) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"Upload\");\n\n\n hashMap.put(\"url\",myurl);\n hashMap.put(\"filename\",filename);\n\n\n\n myRef.push().setValue(hashMap);\n\n\n }", "public void dataAddAppInstance() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(token).child(userNameString).setValue(newUser);\r\n\r\n // get this device's all time high score for comparison\r\n int highScore = getInt();\r\n\r\n // if high score is achieved, send notification\r\n if ( pointsScore > highScore) {\r\n setInt(\"high score\", pointsScore);\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n //Firebase.setAndroidContext(this);\n MainActivity.firebaseRef = FirebaseDatabase.getInstance().getReferenceFromUrl(MainActivity.FIREBASEREF);\n //setContentView(R.layout.activity_login);\n callLoginDialog();\n }", "private void setupFirebaseAuth() {\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabse = FirebaseDatabase.getInstance();\n mRef = mFirebaseDatabse.getReference();\n\n mAuthStateListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n final FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n Log.d(TAG, \"onAuthStateChanged: signed in:\" + user.getUid());\n\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n\n checkIfUsernameExists(username);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n //moving back to login screen after successful sign up.\n finish();\n\n } else\n Log.d(TAG, \"onAuthStateChanged: signed out\");\n }\n };\n\n\n }", "public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }", "public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }", "@Override\n public void onCreate(Bundle icicle) {\n //FirebaseApp.initializeApp(getApplicationContext());\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash);\n prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n //FirebaseApp customApp = FirebaseApp.initializeApp(this);\n // FirebaseStorage storage = FirebaseStorage.getInstance(customApp);\n // reference1= FirebaseStorage.getInstance(\"gs://doctorlog-ac4d6.appspot.com\").getReference();\n // FirebaseStorage firebaseStorage1=FirebaseStorage.getInstance(app);\n //reference1=firebaseStorage1.getReference();\n firebaseOptions2=new FirebaseOptions.Builder()\n .setApplicationId(\"1:720142389475:android:920875d8334fb1c3\")\n .setApiKey(\"AIzaSyCTT78tupL7oOhSkIeHgNN6hyLWgxWMcs8 \")\n .setDatabaseUrl(\"https://doctorlog-ac4d6.firebaseio.com/\")\n .build();\n FirebaseApp.initializeApp(this,firebaseOptions2,\"third\");\n FirebaseApp app1=FirebaseApp.getInstance(\"third\");\n FirebaseDatabase firebaseDatabase=FirebaseDatabase.getInstance(app1);\n reference=firebaseDatabase.getReference(\"doctor\");\n mStorageRef = FirebaseStorage.getInstance().getReference();\n Uri uri = null;\n getWindow().getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n boolean previouslyStarted = prefs.getBoolean(\"isFirstRun\", false);\n read1(new Firebasecallback1() {\n @Override\n public void onCallback1(List<DummyItem> list) {\n\n Toast.makeText(splash.this,\"completed\" ,Toast.LENGTH_LONG ).show();\n }\n\n });\n\n if(!previouslyStarted) {\n SharedPreferences.Editor edit = prefs.edit();\n edit.putBoolean(\"isFirstRun\", Boolean.TRUE);\n edit.commit();\n Intent mainIntent = new Intent(splash.this,LoginActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n\n else\n { db= FirebaseDatabase.getInstance().getReference(\"patient\");\n SharedPreferences prefs1 = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n previously=prefs1.getString(\"key\",\"null\" );\n Toast.makeText(getBaseContext(),\"my \"+previously ,Toast.LENGTH_LONG ).show();\n read(new LoginActivity.Firebasecallback() {\n @Override\n public void onCallback(List<user> list) {\n // Toast.makeText(getActivity(), \"msg12\",Toast.LENGTH_LONG).show();\n for (user e:list)\n { // Toast.makeText(LoginActivity.this, \"list\",Toast.LENGTH_LONG).show();\n if(previously.equals(e.id))\n { Toast.makeText(splash.this, e.url,Toast.LENGTH_LONG).show();\n LoginActivity.userg=new user(e.id,e.username,e.mail,e.url,e.phn,e.lat,e.lng);\n LoginActivity.usname=e.username;\n LoginActivity.name=e.mail;\n if(e.url==null)\n LoginActivity.url=null;\n else\n LoginActivity.url=Uri.parse(e.url);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n SharedPreferences.Editor edit = preferences.edit();\n edit.putString(\"key\",e.id);\n edit.commit();\n break;\n\n }\n }\n\n check=true;\n Intent mainIntent = new Intent(splash.this, MainActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n // Toast.makeText(splash.this, \"mmmm\", Toast.LENGTH_SHORT).show();\n //LoginActivity.usname=null;\n\n\n }\n\n });\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "private void collectToken()\n {\n String token = FirebaseInstanceId.getInstance().getId();\n Log.d(\"MYTAG\", \"Firebase_token \" + token);\n }", "void pushToFirebase(Task task) {\n un_FirebaseRef_tasks.push().setValue(task);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n email = (EditText) findViewById(R.id.etmail);\n password = (EditText) findViewById(R.id.etPassword);\n registr = (Button) findViewById(R.id.regsbtn);\n comment = (TextView) findViewById(R.id.textView);\n logbtn = (Button) findViewById(R.id.logbtn);\n\n Authinticate = FirebaseAuth.getInstance();\n registr.setOnClickListener(this);\n logbtn.setOnClickListener(this);\n // database = FirebaseDatabase.getInstance();\n //databaseReference = database.getReference();\n\n\n }", "private void dbListeners() {\n // Set if image+text is being worked on currently\n //================================================\n mBeingWorkedOnListener = new ValueEventListener() {\n @Override\n public void onDataChange(final DataSnapshot dataSnapshot) {\n new AsyncTask<Void, Void, String>() {\n @Override\n protected String doInBackground(Void... voids) {\n return dataSnapshot.getValue(String.class);\n }\n\n @Override\n protected void onPostExecute(String s) {\n beingWorkedOn = s;\n }\n }.execute();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n\n dGlobalRef.child(\"beingWorkedOn\").addValueEventListener(mBeingWorkedOnListener);\n }", "public interface FirebaseActionListenerCallback {\n public void onSuccess();\n public void onError(Exception exception);\n public void onDatabaseError(DatabaseError error);\n}", "private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "private void startCall() {\n // If firebase isn't auth don't call\n if (mUser == null) return;\n setupLocalVideo();\n joinChannel();\n }", "@Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }", "private void addNewGroupToFireBase(Bundle guideData) {\n }", "private void setFirebase() {\n auth = FirebaseAuth.getInstance();\n\n //get current user\n final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n authListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user == null) {\n // user auth state is changed - user is null\n // launch login activity\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\n finish();\n }\n }\n };\n }", "private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }", "@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(\"LOGIN\", \"Registration error\");\n }", "@Override\n public void onTokenRefresh() {\n String token = FirebaseInstanceId.getInstance().getToken();\n\n addRegistrationToFireDb(token);\n }", "private void getEventMembers()\n {\n String membersDatabaseAddress = \"Loc/\"+mEntityID;\n double lat=gl_lat;\n double lon=gl_long;\n\n DatabaseReference reference = database.getReference(membersDatabaseAddress);\n\n GeoFire geoFire= new GeoFire(reference);\n\n\n\n eventmembersQuery = geoFire.queryAtLocation(new GeoLocation(lat,lon),radius);\n\n eventmembersQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n int count=0;\n\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n\n if(!key.equals(mUserID)) {\n\n if (!mMarkersMap.containsKey(key)) {\n //Member is present\n\n\n //New key\n String name = key;\n if (allContactNames.containsKey(name))\n name = allContactNames.get(name);\n\n LatLng memberLatLng = new LatLng(location.latitude, location.longitude);\n mMarkersMap.put(key,\n mMap.addMarker(new MarkerOptions().position(memberLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))\n ));\n\n } else {\n //Present before,Present now\n mMarkersMap.get(key).setPosition(new LatLng(\n location.latitude,location.longitude\n ));\n }\n\n memberPresentFlags.put(key, true);\n if (membersProfilePic != null && membersProfilePic.containsKey(key)) {\n\n mMarkersMap.get(key).setIcon(BitmapDescriptorFactory.fromBitmap(\n membersProfilePic.get(key)\n ));\n mMarkersMap.get(key).setAnchor(0.5f,0.5f);\n }\n\n count++;\n }\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n if(count<10)\n {\n if(radius<2)\n radius+=0.1;\n }\n else if(count>15)\n {\n if(radius>0.1)\n radius-=0.1;\n }\n eventmembersQuery.removeAllListeners();\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n }", "void save_Online(String firebase_id){\n\n DatabaseReference records_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.records_ref));\n DatabaseReference all_users_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.all_users));\n\n User_Class klinuser = common.userBundle(registration_bundle);\n\n if (klinuser != null){\n String cell_number = \"0\"+String.valueOf(klinuser.getNumber());\n records_ref.child(cell_number).child(\"uid\").setValue(klinuser.getFirebaseID());\n\n //save user details to All_Users/Biography/Uid\n all_users_ref.child(firebase_id).setValue(klinuser);\n loadBioData_online(firebase_id);\n }\n\n\n }", "public void initConnection() {\n try {\n FileInputStream serviceAccount = new FileInputStream(\"serviceAccountKey.json\");\n\n FirebaseOptions options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://yieldcomparisontool.firebaseio.com\")\n .build();\n try {\n if (FirebaseApp.getInstance(FirebaseApp.DEFAULT_APP_NAME) == null) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IllegalStateException e) {\n FirebaseApp.initializeApp(options);\n }\n } catch (IOException e) {\n System.out.println(\"ERROR Invalid Firebase Service account credentials.\");\n System.out.println(e);\n System.exit(1);\n }\n }", "public static DatabaseReference getFirebaseDataBase(){\n if(firebase==null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }", "public static DatabaseReference getFirebaseDatabase(){\n\n if (firebase == null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(UserHomeActivity.this, \"Unable to fetch data from firebase\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n }", "private void sendMessageFirebase(String name, String content, String image, String uid, String url){\n FirebaseDatabase firebaseDatabase; //Firebase Database 관리 객체참조변수\n DatabaseReference roodIdReference;\n Calendar calendar = Calendar.getInstance(); //현재 시간을 가지고 있는 객체\n String time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE);\n\n ChatMessageItem messageItem = new ChatMessageItem(name, content, time, image, uid, url);\n\n firebaseDatabase = FirebaseDatabase.getInstance();\n roodIdReference = firebaseDatabase.getReference(roomID);\n roodIdReference.push().setValue(messageItem);\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // safe check if was sussesfull\n if(task.isSuccessful()) {\n //Maping a user on database\n currentUser = firebaseAuth.getCurrentUser() ;\n assert currentUser != null;\n final String userId = currentUser.getUid();\n // creating a hashmap to map\n\n Map<String,String> userObj = new HashMap<>() ;\n\n userObj.put(\"userId\", userId) ;\n userObj.put(\"userName\" , userName) ;\n\n collectionReference.add(userObj)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n //Toast.makeText(CreateAccActivity.this,\"onSucess\",Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",\"sussess\") ;\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n\n //if(!Objects.requireNonNull(task.getResult()).exists()){\n\n //Log.d(\"hello\",\"sussess\") ;\n progressBar.setVisibility(View.INVISIBLE);\n\n //Toast.makeText(CreateAccActivity.this,userName,Toast.LENGTH_LONG).show();\n\n\n String name = Objects.requireNonNull(task.getResult()).getString(\"userName\") ;\n\n journalApi journalApi = new journalApi() ;\n util.journalApi.getInstance().setUserID(userId);\n util.journalApi.getInstance().setUserName(userName);\n\n //Toast.makeText(CreateAccActivity.this,name,Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",userName) ;\n Intent intent = new Intent(CreateAccActivity.this\n ,PostJournalActivity.class) ;\n\n intent.putExtra(\"username\",name);\n intent.putExtra(\"userid\",userId) ;\n\n startActivity(intent);\n\n\n }\n /*else{\n progressBar.setVisibility(View.INVISIBLE);\n }*/\n\n\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(CreateAccActivity.this\n ,\"error\" , Toast.LENGTH_LONG).show();\n }\n });\n\n }\n }", "@Override\n public void run() {\n boolean previouslyStarted = prefs.getBoolean(\"isFirstRun\", false);\n read1(new Firebasecallback1() {\n @Override\n public void onCallback1(List<DummyItem> list) {\n\n Toast.makeText(splash.this,\"completed\" ,Toast.LENGTH_LONG ).show();\n }\n\n });\n\n if(!previouslyStarted) {\n SharedPreferences.Editor edit = prefs.edit();\n edit.putBoolean(\"isFirstRun\", Boolean.TRUE);\n edit.commit();\n Intent mainIntent = new Intent(splash.this,LoginActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n\n else\n { db= FirebaseDatabase.getInstance().getReference(\"patient\");\n SharedPreferences prefs1 = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n previously=prefs1.getString(\"key\",\"null\" );\n Toast.makeText(getBaseContext(),\"my \"+previously ,Toast.LENGTH_LONG ).show();\n read(new LoginActivity.Firebasecallback() {\n @Override\n public void onCallback(List<user> list) {\n // Toast.makeText(getActivity(), \"msg12\",Toast.LENGTH_LONG).show();\n for (user e:list)\n { // Toast.makeText(LoginActivity.this, \"list\",Toast.LENGTH_LONG).show();\n if(previously.equals(e.id))\n { Toast.makeText(splash.this, e.url,Toast.LENGTH_LONG).show();\n LoginActivity.userg=new user(e.id,e.username,e.mail,e.url,e.phn,e.lat,e.lng);\n LoginActivity.usname=e.username;\n LoginActivity.name=e.mail;\n if(e.url==null)\n LoginActivity.url=null;\n else\n LoginActivity.url=Uri.parse(e.url);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n SharedPreferences.Editor edit = preferences.edit();\n edit.putString(\"key\",e.id);\n edit.commit();\n break;\n\n }\n }\n\n check=true;\n Intent mainIntent = new Intent(splash.this, MainActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n // Toast.makeText(splash.this, \"mmmm\", Toast.LENGTH_SHORT).show();\n //LoginActivity.usname=null;\n\n\n }\n\n });\n }\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.i(\"lt\",\"auth failed\");\n }", "private void addStartUp() {\n DatabaseReference firebaseDatabase = FirebaseDatabase.getInstance().getReference(STARTUP_FIREBASE_DATABASE_REFERENCE);\n String id = firebaseDatabase.push().getKey();\n StartUpField startUpField = new StartUpField(id, startupName.getText().toString().trim(),\n startupDescription.getText().toString().trim(), startupFounder.getText().toString().trim(),\n startupCoFounder.getText().toString().trim(), startupWebsite.getText().toString().trim(),\n facebookUrl.getText().toString().trim(), twitterUrl.getText().toString().trim(), imageUrl,\n telephone.getText().toString().trim(), email.getText().toString().trim());\n firebaseDatabase.child(id).setValue(startUpField).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n if (getView() != null) {\n Navigation.findNavController(requireView()).navigate(R.id.action_addStartUpFragment_to_navigation_startup);\n }\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n Toast.makeText(getParentFragment().getContext(), \"Startup added\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getParentFragment().getContext(), \"Unable to add Startup\", Toast.LENGTH_SHORT).show();\n Timber.d(\"database Write Error: %s\", task.getException().getLocalizedMessage());\n showButton(saveStartupButton);\n stopProgressBar(progressBar);\n }\n });\n }", "private void addToRealDB(String GoogleId){\n this.newUser.setGOOGLE_ID(GoogleId);\n dbRootRef.child(USERS).child(this.newUser.getGOOGLE_ID()).setValue(this.newUser);\n dbRootRef.child(USERS_NOTES).child(this.newUser.getGOOGLE_ID()).child(\"numOfNotesInAllTime\").setValue(\"0\");\n }", "@Override\n public void onDbStarted() {\n }", "private void upToFireBase(Bill _bill)\n {\n Log.d(\"RECORD\", \"Up to firebase\"+_fbfs);\n String _number_room = _bill.getRoom().getPhase()+String.valueOf(_bill.getRoom().getFloor())+_bill.getRoom().getNumber_room();\n _fbfs.collection(\"Resident\")\n .document(\"USER\")\n .collection(_number_room)\n .document(_bill.getMonth()+_bill.getYear())\n .set(_bill)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"RECORD\", \"SUCCESS\");\n PHASE_CHOOSE = _room.getPhase();\n FLOOR_CHOOSE = String.valueOf(_room.getFloor());\n goToNextPage();\n Toast.makeText(getActivity(), \"Success\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"RECORD\", \"FAILED\");\n Toast.makeText(getActivity(), \"Not found\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }", "@SuppressLint(\"RestrictedApi\")\n public void getEmergencyAssistance(){\n final String uID = objAccount.getCurrentUser().getUid();\n ArrayList<String> allMemberID = new ArrayList<>();\n\n ArrayList<objFamily> allFamily = tb_Family.getInstance(context).getAllFamilyByUid(uID);\n for(objFamily family : allFamily){\n for(String memberID : family.getMembersList()){\n if(!memberID.matches(uID)\n && !allMemberID.contains(memberID))\n allMemberID.add(memberID);\n }\n }\n\n //Add listening events for each member\n for(String id : allMemberID){\n Query mRef = mDatabase.getReference()\n .child(keyUtils.emergencyAssistanceList)\n .child(id)\n .limitToLast(1);\n\n mRef.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n if(dataSnapshot.getValue() != null){\n\n boolean isNewEmergency = false;\n\n fb_emergencyAssistance fireBase_EmergencyAssistance = dataSnapshot.getValue(fb_emergencyAssistance.class);\n\n if(fireBase_EmergencyAssistance != null){\n\n if(!fireBase_EmergencyAssistance.getListSeen().contains(uID))\n isNewEmergency = true;\n\n final String pathEmergency = dataSnapshot.getRef().getPath().toString();\n objEmergencyAssistance emergencyAssistance = new objEmergencyAssistance(pathEmergency, fireBase_EmergencyAssistance);\n\n boolean flag = false;\n //If not received, notice and write in SQLite\n if(!emergencyAssistance.getListReceived().contains(uID)){\n //Set received\n List<String> listReceived = emergencyAssistance.getListReceived();\n listReceived.add(uID);\n setReceivedEmergencyAssistance(pathEmergency,listReceived);\n tb_EmergencyAssistance.getInstance(context).addEmergencyAssistance(emergencyAssistance);\n\n flag = true;\n }\n\n //Notifications have news\n if(flag)\n mView.emergencyAssistance(tb_Account.getInstance(context).getAccountByID(id), emergencyAssistance, isNewEmergency);\n else\n mView.emergencyAssistance(null, null, isNewEmergency);\n\n }\n }\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n }\n }", "private void loadSingleItem(FirebaseDatabase database) {\n int number = 919191;\n String name = \"William Wallace\";\n String key = \"0\";\n Friend friend = new Friend();\n friend.setTelephoneNumber(number);\n friend.setFriendName(name);\n HashMap<String, Friend> hashMap = new HashMap<>();\n hashMap.put(key, friend);\n database.getReference(\"friends\").setValue(hashMap);\n }", "@Override\n public void onDataChange(DataSnapshot snapshot) {\n if (snapshot.hasChild(id)) {\n\n //load User data\n FirebaseManager firebaseManager = new FirebaseManager(\"user\",getApplicationContext());\n firebaseManager.getUser(\"facebook\", id);\n\n Intent intent = new Intent(getApplicationContext(), UserPrimaryActivity.class);\n startActivity(intent);\n\n\n //gotta check if Authority\n\n } else {\n\n JSONParser jsonParser = new JSONParser();\n\n //if not registered then we need some more details\n Intent intent = new Intent(getApplicationContext(), UserFormActivity.class);\n intent.putExtras(jsonParser.makePreliminaryUserData(jsonObject,\"facebook\"));\n startActivity(intent);\n\n }\n }", "@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n }", "private void sentRequestGG(FirebaseAuth firebaseAuth) {\n if (firebaseAuth.getCurrentUser() != null) {\n SharedPref.instance.putName(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putPassword(firebaseAuth.getCurrentUser().getUid());\n SharedPref.instance.putUrlAvatar(String.valueOf(firebaseAuth.getCurrentUser().getPhotoUrl()));\n SharedPref.instance.putUser(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putEmail(firebaseAuth.getCurrentUser().getEmail());\n username = firebaseAuth.getCurrentUser().getEmail();\n password = firebaseAuth.getCurrentUser().getUid();\n\n UserService userService = NetContext.instance.create(UserService.class);\n MediaType jsonType = MediaType.parse(\"application/json\");\n String loginJson = (new Gson().toJson(new UserRegisterResponseJson(username, password)));\n final RequestBody loginBody = RequestBody.create(jsonType, loginJson);\n // create call\n Call<Token> loginCall = userService.postNewAccount(loginBody);\n loginCall.enqueue(new Callback<Token>() {\n @Override\n public void onResponse(Call<Token> call, Response<Token> response) {\n DBContext.instance.cleanCart();\n SharedPref.instance.putCount(0);\n //EventBus.getDefault().postSticky(new SentUserIdEvent(u.getId().get$oid()));\n //Dang nhap 1 tai khoan moi hay tai khoan cu deu tra ve 307\n if (response.code() == 307){\n login(username, password);\n } else {\n Toast.makeText(LoginActivity.this, \"Could not parse body\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Token> call, Throwable t) {\n Toast.makeText(LoginActivity.this, \"Lỗi xác minh tài khoản google!\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n });\n }\n }", "private void initializeFirebase() {\n mGameFirebase = new Firebase(Constants.FIREBASE_BASE_URL + Constants.FIREBASE_TEST_PATH + Constants.FIREBASE_GAME_ACTIVE_PATH + mGameWaitModel.getId());\n mGameFirebase.setValue(mGameModel);\n mGameFirebase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n mGameModel = dataSnapshot.getValue(GameModel.class);\n if (mGameModel == null) {\n return;\n }\n try {\n if (mGameModel.isGenerateNewQuestion()) {\n mGameModel.getGameMaster().setDidPlayerAnswer(false);\n mGameModel.getGameMaster().setPlayerAnswerCorrect(false);\n mGameModel.getGameSlave().setDidPlayerAnswer(false);\n mGameModel.getGameSlave().setPlayerAnswerCorrect(false);\n }\n if (isGameMaster() && mGameModel.isGenerateNewQuestion()) {\n generateNewQuestion();\n mGameModel.setGenerateNewQuestion(false);\n mGameFirebase.setValue(mGameModel);\n return;\n }\n mQuestionTextView.setText(mGameModel.getQuestion().getQuestion());\n mOption1Button.setText(mGameModel.getQuestion().getOptions().get(0).getOptionString());\n mOption2Button.setText(mGameModel.getQuestion().getOptions().get(1).getOptionString());\n mOption3Button.setText(mGameModel.getQuestion().getOptions().get(2).getOptionString());\n mOption4Button.setText(mGameModel.getQuestion().getOptions().get(3).getOptionString());\n mGameNameTextView.setText(mGameWaitModel.getGameName());\n if (isGameMaster()) {\n mMyScoreTextView.setText(String.valueOf(mGameModel.getGameMaster().getScore()));\n mOpponentScoreTextView.setText(String.valueOf(mGameModel.getGameSlave().getScore()));\n if (mGameModel.getGameMaster().isDidPlayerAnswer() && mGameModel.getGameSlave().isDidPlayerAnswer()) {\n mGameModel.setGenerateNewQuestion(true);\n mGameFirebase.child(\"generateNewQuestion\").setValue(mGameModel.isGenerateNewQuestion());\n }\n } else {\n mMyScoreTextView.setText(String.valueOf(mGameModel.getGameSlave().getScore()));\n mOpponentScoreTextView.setText(String.valueOf(mGameModel.getGameMaster().getScore()));\n }\n } catch (NullPointerException e) {\n\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n mGameFirebase.child(\"question\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n\n }\n });\n }", "@Override\n public void Handle() {\n DatabaseReference database = FirebaseDatabase.getInstance(app).getReference(\"config\");\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String url = (String) dataSnapshot.child(\"serverUrl\").getValue();\n result.success(url);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n result.success(null);\n }\n };\n\n database.addListenerForSingleValueEvent(listener);\n }" ]
[ "0.69485694", "0.6731765", "0.66987646", "0.667082", "0.6618754", "0.65781856", "0.65067977", "0.6272404", "0.6201946", "0.6196614", "0.61959815", "0.61948174", "0.6180015", "0.61012065", "0.6090386", "0.6090386", "0.6090386", "0.6090386", "0.6090234", "0.6085564", "0.60753596", "0.6047828", "0.5995842", "0.5990437", "0.5883324", "0.5879398", "0.5849181", "0.5848999", "0.58484286", "0.57864696", "0.57619137", "0.57616353", "0.5754908", "0.5748615", "0.5733668", "0.57305336", "0.5686592", "0.5660889", "0.5656799", "0.5652902", "0.5640068", "0.5634015", "0.56284374", "0.5611918", "0.5610581", "0.5594602", "0.55925363", "0.55811644", "0.55504054", "0.5546658", "0.5535229", "0.55318636", "0.5528447", "0.5522522", "0.55123824", "0.5511327", "0.5505456", "0.5504073", "0.5498922", "0.5497477", "0.5496625", "0.5496625", "0.54959476", "0.54933953", "0.5491559", "0.5474076", "0.54739", "0.54651594", "0.5464016", "0.54632676", "0.5463088", "0.54608804", "0.54446214", "0.5442832", "0.542759", "0.54262227", "0.54202545", "0.541876", "0.5396948", "0.53947735", "0.53875184", "0.53860945", "0.53857327", "0.5379291", "0.5378798", "0.53739387", "0.53686965", "0.53683823", "0.53625894", "0.5355075", "0.5354105", "0.5354006", "0.5353488", "0.53488594", "0.5348423", "0.53430057", "0.5336952", "0.5336455", "0.5335543", "0.53260803" ]
0.5693399
36
firebase thing end here
private void userRegister(){ String Email = email.getText().toString().trim(); String Username = username.getText().toString().trim(); String Password = password.getText().toString().trim(); if(TextUtils.isEmpty(Email)){ Toast.makeText(this,"Please Enter Email ID",Toast.LENGTH_SHORT).show(); return; } if(TextUtils.isEmpty(Username)){ Toast.makeText(this,"Please Enter Username",Toast.LENGTH_SHORT).show(); return; } if(TextUtils.isEmpty(Password)){ Toast.makeText(this,"Please Enter Password",Toast.LENGTH_SHORT).show(); return; } progressDialog.setMessage("Registering User...."); progressDialog.show(); mAuth.createUserWithEmailAndPassword(Email,Password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { Toast.makeText(SignUp.this,"Registered Successfully",Toast.LENGTH_SHORT).show(); // startActivity(new Intent(getApplicationContext(),LogIn.class)); // finish(); } else{ return; } } }); User user = new User(mAuth.getCurrentUser().getUid(), 1, Email, Username); dbRef.child("users") .child(mAuth.getCurrentUser().getUid()) .setValue(user); UserAccountSetting settings = new UserAccountSetting( "", "", 0, 0, 0, "", Username); dbRef.child("user_account_setting").child(mAuth.getCurrentUser().getUid()).setValue(settings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }", "private void sendGuideRegDataToFireBase(){\n }", "private FirebaseUtil(){}", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n }", "private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }", "private void RetrieveChildAddedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t //[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }", "private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "@Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The read failed: \" + firebaseError.getMessage());\n }", "public static boolean FireBaseAddWord(String source,String target,String userId){\n\r\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\r\n DatabaseReference root = firebaseDatabase.getReference(\"words\").child(userId); // Firebase database table path.\r\n\r\n Map wordMap = new HashMap(); // Set word information in map\r\n\r\n wordMap.put(\"source\",source);\r\n wordMap.put(\"target\",target);\r\n wordMap.put(\"time\",ServerValue.TIMESTAMP);\r\n\r\n root.push().updateChildren(wordMap).addOnCompleteListener(new OnCompleteListener() {\r\n @Override\r\n public void onComplete(@NonNull Task task) { // Update Database\r\n if(task.isSuccessful()){\r\n setAddWordIsSuccessful(true);\r\n }else {\r\n setAddWordIsSuccessful(false);\r\n }\r\n }\r\n });\r\n\r\n\r\n return addWordIsSuccessful;\r\n\r\n\r\n }", "private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }", "private void RetrieveChildChangedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t//[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "@Override\n public void onCancelled(DatabaseError firebaseError) {\n }", "@Override\n public void onError(FirebaseError firebaseError) {\n }", "private void setupFirebase() {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(Constants.ROOM_DATABASE_REFERENCE);\r\n mQuery = mFirebaseDatabaseReference.orderByChild(Constants.ROOM_INT_REFERENCE).startAt(Utils.convertHallStart(mHallStart)).endAt(Utils.convertHallEnd(mHallEnd));\r\n }", "public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrI = taskSnapshot.getDownloadUrl();\n FirebasePost firebasePost = new FirebasePost();\n firebasePost.imageUrl = downloadUrI.toString();\n myImage.child(\"home\").setValue(firebasePost);\n\n\n }", "private void RetrieveChildRemovedEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName);\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"RetrieveChildAddedEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n // Retrieve new posts as they are added to the database\n myChildRef.addChildEventListener(new ChildEventListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\t\t\t\t//[result setKeepCallback:[NSNumber numberWithBool:YES]];\n System.out.println(arg0.getValue());\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getValue().toString());\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildAdded(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildChanged(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onChildMoved(DataSnapshot arg0, String arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t}\n\t\t});\n }", "private void setupFirebase(){\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n if (user!=null){\n databaseReference = firebaseDatabase.getReference(\"Users\").child(user.getUid()).child(\"teacher\");\n }\n }", "@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onVerificationFailed(FirebaseException e) {\n // displaying error message with firebase exception.\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void registrationProcessFireStore() {\n\n Log.i(\"checkk UserReg: \", \"registrationprocess\");\n presenter.checkUserDoc(userName,userPhone,adminName,adminPhone);\n Log.i(\"checkk UserReg: \", \"registrationprocess AFTER\");\n\n\n\n }", "private void setupFirebaseAuth(){\r\n Log.d(TAG, \"setupFirebaseAuth: setting up setupFirebaseAuth\");\r\n\r\n mAuth = FirebaseAuth.getInstance();\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n myRef = mFirebaseDatabase.getReference();\r\n\r\n mAuthListener = new FirebaseAuth.AuthStateListener() {\r\n @Override\r\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\r\n FirebaseUser user = firebaseAuth.getCurrentUser();\r\n\r\n if (user != null) {\r\n // User is signed in\r\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\r\n } else {\r\n // User is signed out\r\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\r\n }\r\n // ...\r\n }\r\n };\r\n\r\n myRef.addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n\r\n // retrieve user info from database\r\n// setProfileWidgets(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n\r\n // retrieve job Post info from database\r\n// setJobPost(mFirebaseMethods.getUserSettings(dataSnapshot));\r\n// mFirebaseMethods.addNewJobPost(job_date,job_description, job_title,user_name );\r\n\r\n //retrieve bids from database\r\n\r\n\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n }", "private FirebaseDAO() {}", "@Override\n public void onCancelled(DatabaseError error) {\n Log.w(\"Firebase read \", \"Failed to read value.\", error.toException());\n }", "public static void setupFirebase(Context context) {\n // initialised Firebase\n com.firebase.client.Firebase.setAndroidContext(context);\n }", "public AndroidInterfaceClass(){\n database = FirebaseDatabase.getInstance(\"https://brainstorming-1fa06-default-rtdb.europe-west1.firebasedatabase.app/\");\n }", "public void triggerRoomsOnce() throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"ChatRoomNode\");\n Firebase newNodeRef = null;\n if(acceptKey == null){\n newNodeRef = roomsNodeRef.push();\n acceptKey = newNodeRef.getKey();\n }else{\n newNodeRef = roomsNodeRef.child(acceptKey);\n }\n // Firebase newNodeRef = roomsNodeRef.push();\n try {\n newNodeRef.setValue(\"accept\",new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.d(\"triggerRoomsOnce\",\"onComplete Data could not be saved. \" + firebaseError.getMessage());\n } else {\n Log.d(\"triggerRoomsOnce\",\" onComplete Data saved successfully.\");\n }\n }\n });\n\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n\n\n /* triggerRoomsOnceRef.setValue(\"accepted\");*//*, new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n triggerRoomsOnceRef.removeEventListener();\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });*//*\n*/\n\n }", "@Override\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }", "private void testFirebase() {\n Intent launchIntent = new Intent(this, HomeActivity.class);\n launchIntent.putExtra(Constants.FIREBASE_ACTION, true);\n launchIntent.putExtra(Constants.FIREBASE_TITLE, \"Sample Title\");\n launchIntent.putExtra(Constants.FIREBASE_BODY, \"Sample Body\");\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* Request code */, launchIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n Bitmap rawBitmap = BitmapFactory.decodeResource(getResources(),\n R.mipmap.ic_launcher_round);\n NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this)\n .setSmallIcon(R.drawable.ic_stat_notif_icon_firebase_om)\n .setLargeIcon(rawBitmap)\n .setContentTitle(getResources().getString(R.string.app_name))\n .setContentText(\"Sample body\")\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager notificationManager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n Notification notification = notificationBuilder.build();\n notification.flags |= Notification.FLAG_NO_CLEAR;\n\n notificationManager.notify(0 /* ID of notification */, notification);\n }", "@Override\n\tpublic void onCancelled(FirebaseError arg0) {\n\t\t\n\t}", "void firebaseExistingDocAdapter(String image, int position){\n String editTextAmount = mAmountEditText.getText().toString();\n int editableAmount = Integer.parseInt(editTextAmount);\n\n //Adapter brick amount\n BrickModel currentBrick = mBrickList.get(position);\n int currentBrickAmount = Integer.parseInt(currentBrick.getAmount());\n\n //Compare brick amounts(to avoid nul point exceptions)\n boolean inputSmaller = editableAmount <= currentBrickAmount;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: currentAmount: \" + currentBrickAmount);\n\n //Make bool to show necesary update\n if (image.equals(\"mDestroy\") & inputSmaller){\n// requestFireUpdate = true;\n //TODO should make graveyard? // make who put it there and why..?(*inManufacturing*atClient*wrongData*fallInStacking*...**)\n Log.d(TAG, \"firebaseExistingDocAdapter: mDestroy: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n } else if(image.equals(\"mSeal\") && inputSmaller){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mSeal: \" + editTextAmount);\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n //TODO make \"create new purchase\"\n\n\n } else if (image.equals(\"mProduce\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: mProduce: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount + editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n\n\n } else if (image.equals(\"m2Class\") && inputSmaller){\n if(currentBrick.getBrickName().endsWith(\"1\")){\n// requestFireUpdate = true;\n\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class: \" + editTextAmount);\n\n int newBrickAmount = currentBrickAmount - editableAmount;\n writeNewBrickAmount(newBrickAmount, currentBrick);\n writeNew2ClassBrick(editTextAmount, currentBrick);\n } else {\n Log.d(TAG, \"firebaseExistingDocAdapter: m2Class already exist\");\n }\n\n\n } else {\n Log.wtf(TAG, \"firebaseExistingDocAdapter: Something went wrong!\\n\" +\n \"(Most likely you inserted too big number)\\n\");\n\n// requestFireUpdate = false;\n\n }\n \n if(requestFireUpdate){\n //TODO create Show updateButton\n Log.d(TAG, \"firebaseExistingDocAdapter: update button accessible\");\n\n\n }\n\n Collections.sort(mBrickList, BrickModel.StuNameComparator);\n notifyDataSetChanged();\n// notifyItemChanged(position);\n\n// itemView.clearFocus();\n// InputMethodManager imm = (InputMethodManager) itemView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY);\n\n// imm.hideSoftInputFromWindow(itemView.getWindowToken(), 0);\n\n\n }", "private void saveing_data_firebase(String recodfile) {\r\n\r\n Uri uri = Uri.fromFile(new File(recodfile));\r\n Mprogress.setTitle(\"Please wait ...\");\r\n Mprogress.setMessage(\"wait for a moment your voice is uploading\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n StorageReference filepath = audiofile.child(uri.getLastPathSegment());\r\n filepath.putFile(uri)\r\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n\r\n String audiouri = task.getResult().getDownloadUrl().toString();\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n DatabaseReference NewNode = FirebaseDatabase.getInstance().getReference().child(\"GlobalChat\").push();\r\n\r\n String push_id = NewNode.getKey();\r\n\r\n\r\n Map<String, Object> globalmap = new HashMap<String, Object>();\r\n globalmap.put(\"message\", audiouri);\r\n globalmap.put(\"name\", Currentuser_name);\r\n globalmap.put(\"time\", CurrentTime);\r\n globalmap.put(\"date\", CurrentDate);\r\n globalmap.put(\"type\", \"Audio\");\r\n globalmap.put(\"MessageKey\", push_id);\r\n globalmap.put(\"MyID\", FirebaseAuth.getInstance().getCurrentUser().getUid());\r\n globalmap.put(\"Uri\", current_image_uri);\r\n globalmap.put(DataManager.UserNameSerach, Currentuser_name.toLowerCase());\r\n\r\n NewNode.updateChildren(globalmap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n fine_user_send_audio_notifaction();\r\n Mprogress.dismiss();\r\n } else {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), e.getMessage().toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n } else {\r\n\r\n Mprogress.dismiss();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n\r\n Mprogress.dismiss();\r\n }\r\n });\r\n }", "public void logHappeningClick(String happeningId, String userId){\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\n mDatabase.child(\"analytics\").child(\"happenings\").child(happeningId).child(\"clicks\").child(userId).push().setValue(System.currentTimeMillis(), new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n Log.i(\"AnalyticsService:\",\"logHappeningClick: success\");\n }\n }\n });\n\n }", "private void addMember(String firstName, String lastName, String emailId) {\n Log.e(\"AddMember\", \"Fn \" + firstName + \", Ln \" + lastName + \"eid \" + emailId);\n\n\n// myRef.setValue(\"Hello, World!\");\n String key = myRef.push().getKey();\n Log.e(\"AddMember\", \"key \" + key);\n\n CoreMember member = new CoreMember(firstName, lastName, emailId);\n myRef.child(key).setValue(member, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError != null) {\n System.out.println(\"Data could not be saved \" + databaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\" + databaseReference.toString());\n memberKey = databaseReference.getKey();\n hideInputForm(true);\n\n }\n }\n });\n }", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(firebaseMethods.checkIfUsernameExists(username, dataSnapshot)){\n append = myRef.push().getKey().substring(0,7);\n }\n username = username + append;\n\n //add new user to the database\n firebaseMethods.addNewUser(\"notdone\",username,\"emp\",userID);\n Toast.makeText(mContext, \"Signup successful. Admin Verification \" +\n \"Left.\", Toast.LENGTH_SHORT).show();\n Intent i = new Intent(Register.this, Login.class);\n startActivity(i);\n finish();\n }", "private void queryEqualToValueChildKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tString strChildKey;\n \tObject objValue;\n\n if ( data.length() >= 3 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjValue = data.get(1);\n\t\t\t\tstrChildKey = data.getString(2);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValueChildKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryEqualToValueChildKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEqualToValueChildKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n // Read data and react to changes\n if( objValue.getClass() == Double.class )\n \turlRef.equalTo(((Double)objValue).doubleValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if(objValue.getClass() == Boolean.class )\n \turlRef.equalTo(((Boolean)objValue).booleanValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if( objValue.getClass() == String.class )\n \turlRef.equalTo((String)objValue, strChildKey).addListenerForSingleValueEvent(listener);\n else\n \turlRef.equalTo(objValue.toString(), strChildKey).addListenerForSingleValueEvent(listener);\n }", "public void onClick(View v) {\n EditText email = (EditText) findViewById(R.id.email);\n final String emailString = email.getText().toString();\n\n EditText pass = (EditText) findViewById(R.id.pass);\n final String passString = pass.getText().toString();\n Firebase ref = new Firebase(\"https://gymguy.firebaseio.com\");\n\n // Create a handler to handle the result of the authentication\n Firebase.AuthResultHandler authResultHandler = new Firebase.AuthResultHandler() {\n @Override\n public void onAuthenticated(AuthData authData) {\n // Authenticated successfully with payload authData\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\n }\n\n @Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n // Authenticated failed with error firebaseError\n Context context = getApplicationContext();\n// CharSequence text = firebaseError.getMessage() + \" : for \" + emailString + passString + firebaseError.getDetails();\n CharSequence text = firebaseError.getMessage() + \" : \" + firebaseError.getDetails();\n int duration = Toast.LENGTH_LONG;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }\n };\n\n // Authenticate users with a custom Firebase token\n// ref.authWithCustomToken(\"<token>\", authResultHandler);\n // Or with an email/password combination\n ref.authWithPassword(emailString, passString, authResultHandler);\n }", "@Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }", "private void uploadreferance(String myurl,String filename) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"Upload\");\n\n\n hashMap.put(\"url\",myurl);\n hashMap.put(\"filename\",filename);\n\n\n\n myRef.push().setValue(hashMap);\n\n\n }", "public static void initialize() {\n //Get Firebase auth instance\n GlobalData.auth = FirebaseAuth.getInstance();\n\n GlobalData.u = new User();\n GlobalData.u.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");//\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n /**\n * Start Firebase!\n */\n FirebaseCore.start();\n// User u = new User();\n// u.setId(\"6ZxSGeHS4DOoFHEE2McBcGH7XHP2\");\n//\n// try {\n// u = DUser.crud(u, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n// Log.e(\"Test\", u.getEmail());\n//\n// Message m = new Message();\n// m.setMessage(\"Hello \" + System.currentTimeMillis());\n// m.setBlobname(null);\n// m.setBlob(null);\n// m.setTimestamp(System.currentTimeMillis());\n//\n// try {\n// m.setOrder(DAutoIncrement.order(DAutoIncrement.MESSAGE));\n//\n// m = DMessage.crud(m, false, false);\n// Message m2 = new Message();\n// m2.setId(m.getId());\n// m2 = DMessage.crud(m2, true, false);\n//// Log.w(\"Message\",m2.getId());\n// Message m3 = new Message();\n// m3.setId(m.getId());\n//// DMessage.crud(m3,false, true);\n//// Log.w(\"Message2\",m3.getId());\n// DMessageList.crd(u, u, m, false, false);\n//\n// final ArrayList<Message> messages = DMessageList.crd(u, u, null, true, false);\n// for (Message mes : messages\n// ) {\n// DMessage.crud(mes, true, false); // Fill the message with data\n//\n// }\n// // Sorting require all messages element to be filled, otherwise, it won't work\n// Collections.sort(messages);\n// for (Message mes : messages\n// ) {\n// Log.e(mes.getId(), mes.getMessage());\n//\n// }\n//\n// RunnableDataSnapshot rds = new RunnableDataSnapshot() {\n// @Override\n// public void run(DataSnapshot dataSnapshot, Object object) {\n// ArrayList<Message> messages2 = (ArrayList<Message>) object;\n// Collections.sort(messages2);\n// for (int i = messages.size(); i < messages2.size(); i++) {\n// Log.e(\"New Input\", messages2.get(i).getId());\n// messages.add(messages2.get(i));\n// }\n// Log.e(\"Data change\", \"Data is changing\");\n// }\n// };\n// DMessageList.nonblockRead(u, u, rds);\n// User u2 = new User();\n// u2.setId(\"Hh7qGadAgPeRUJYAEGjvRu845DC3\");\n// ArrayList<User> users = new ArrayList<User>();\n// users.add(u2);\n// HashMap<String, ArrayList<User>> hm = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 1\", users);\n// DBroadcast.uBroadcastPushorDelete(u, hm, true);\n// ArrayList<User> users2 = new ArrayList<User>();\n// users2.add(u);\n// users2.add(u2); // it add itself which must be avoided!\n// HashMap<String, ArrayList<User>> hm2 = new HashMap<String, ArrayList<User>>();\n// hm.put(\"Group 2\", users2);\n// DBroadcast.uBroadcastPushorDelete(u2, hm2, true);\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n }\n });\n t.start();\n\n }", "private void queryEndingAtValueChildKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tString strChildKey;\n \tObject objEndValue;\n\n if ( data.length() >= 3 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjEndValue = data.get(1);\n\t\t\t\tstrChildKey = data.getString(2);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEndingAtValueChildKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryEndingAtValueChildKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryEndingAtValueChildKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n // Read data and react to changes\n if( objEndValue.getClass() == Double.class )\n \turlRef.endAt(((Double)objEndValue).doubleValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if(objEndValue.getClass() == Boolean.class )\n \turlRef.endAt(((Boolean)objEndValue).booleanValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if( objEndValue.getClass() == String.class )\n \turlRef.endAt((String)objEndValue, strChildKey).addListenerForSingleValueEvent(listener);\n else\n \turlRef.endAt(objEndValue.toString(), strChildKey).addListenerForSingleValueEvent(listener);\n }", "private void queryStartingAtValueChildKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n \tString strChildKey;\n \tObject objStartValue;\n\n if ( data.length() >= 3 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t\tobjStartValue = data.get(1);\n\t\t\t\tstrChildKey = data.getString(2);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValueChildKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryStartingAtValueChildKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryStartingAtValueChildKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n };\n\n // Read data and react to changes\n if( objStartValue.getClass() == Double.class )\n \turlRef.startAt(((Double)objStartValue).doubleValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if(objStartValue.getClass() == Boolean.class )\n \turlRef.startAt(((Boolean)objStartValue).booleanValue(), strChildKey).addListenerForSingleValueEvent(listener);\n else if( objStartValue.getClass() == String.class )\n \turlRef.startAt((String)objStartValue, strChildKey).addListenerForSingleValueEvent(listener);\n else\n \turlRef.startAt(objStartValue.toString(), strChildKey).addListenerForSingleValueEvent(listener);\n }", "public static void main(String[] args) {\n logger.info(\"application start!\");\n\n FileInputStream serviceAccount =\n null;\n try {\n serviceAccount = new FileInputStream(\"/home/lamdn/Downloads/MessageCloudExample-7d0bdd0d8227.json\");\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n FirebaseOptions options = null;\n try {\n options = new FirebaseOptions.Builder()\n .setCredentials(GoogleCredentials.fromStream(serviceAccount))\n .setDatabaseUrl(\"https://messagecloudexample.firebaseio.com\")\n .build();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n FirebaseApp.initializeApp(options);\n\n //test\n Process process = new Process();\n process.fillQueue();\n process.start();\n\n //test\n// FirebaseMessagingSnippets fbm = new FirebaseMessagingSnippets();\n// try {\n// for(int i = 1; i <= 10; ++i) {\n// logger.info(\"send msg index: \" + i);\n//// fbm.sendAll();\n// fbm.sendAllAsync();\n//\n//// fbm.sendToTopic();\n//// fbm.sendTopicAsync();\n// }\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n Toast.makeText(UserHomeActivity.this, \"Unable to fetch data from firebase\", Toast.LENGTH_SHORT).show();\n }", "@PostConstruct\r\n\tprivate void firebaseLogIn() {\n\t\ttry {\r\n\r\n\t\t\tInputStream serviceAccount = getClass()\r\n\t\t\t\t\t.getResourceAsStream(\"/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n//\t\t\t\t\tnew FileInputStream(\r\n//\t\t\t\t\t\"src/main/resources/avisosnick-firebase-adminsdk-ln9j6-55140aa5db.json\");\r\n\r\n\t\t\tFirebaseOptions options = FirebaseOptions.builder()\r\n\t\t\t\t\t.setCredentials(GoogleCredentials.fromStream(serviceAccount))\r\n\t\t\t\t\t.setDatabaseUrl(\"https://avisosnick.firebaseio.com\").build();\r\n\r\n\t\t\tFirebaseApp.initializeApp(options);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(TAG, \"New user creation Firebase error\");\n }", "@Override\n public void onError(FirebaseError firebaseError) {\n Log.d(\"LOGIN\", \"Registration error\");\n }", "void save_Online(String firebase_id){\n\n DatabaseReference records_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.records_ref));\n DatabaseReference all_users_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.all_users));\n\n User_Class klinuser = common.userBundle(registration_bundle);\n\n if (klinuser != null){\n String cell_number = \"0\"+String.valueOf(klinuser.getNumber());\n records_ref.child(cell_number).child(\"uid\").setValue(klinuser.getFirebaseID());\n\n //save user details to All_Users/Biography/Uid\n all_users_ref.child(firebase_id).setValue(klinuser);\n loadBioData_online(firebase_id);\n }\n\n\n }", "@Override\n public void onCreate(Bundle icicle) {\n //FirebaseApp.initializeApp(getApplicationContext());\n super.onCreate(icicle);\n setContentView(R.layout.activity_splash);\n prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n //FirebaseApp customApp = FirebaseApp.initializeApp(this);\n // FirebaseStorage storage = FirebaseStorage.getInstance(customApp);\n // reference1= FirebaseStorage.getInstance(\"gs://doctorlog-ac4d6.appspot.com\").getReference();\n // FirebaseStorage firebaseStorage1=FirebaseStorage.getInstance(app);\n //reference1=firebaseStorage1.getReference();\n firebaseOptions2=new FirebaseOptions.Builder()\n .setApplicationId(\"1:720142389475:android:920875d8334fb1c3\")\n .setApiKey(\"AIzaSyCTT78tupL7oOhSkIeHgNN6hyLWgxWMcs8 \")\n .setDatabaseUrl(\"https://doctorlog-ac4d6.firebaseio.com/\")\n .build();\n FirebaseApp.initializeApp(this,firebaseOptions2,\"third\");\n FirebaseApp app1=FirebaseApp.getInstance(\"third\");\n FirebaseDatabase firebaseDatabase=FirebaseDatabase.getInstance(app1);\n reference=firebaseDatabase.getReference(\"doctor\");\n mStorageRef = FirebaseStorage.getInstance().getReference();\n Uri uri = null;\n getWindow().getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_FULLSCREEN\n | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);\n /* New Handler to start the Menu-Activity\n * and close this Splash-Screen after some seconds.*/\n new Handler().postDelayed(new Runnable(){\n @Override\n public void run() {\n /* Create an Intent that will start the Menu-Activity. */\n boolean previouslyStarted = prefs.getBoolean(\"isFirstRun\", false);\n read1(new Firebasecallback1() {\n @Override\n public void onCallback1(List<DummyItem> list) {\n\n Toast.makeText(splash.this,\"completed\" ,Toast.LENGTH_LONG ).show();\n }\n\n });\n\n if(!previouslyStarted) {\n SharedPreferences.Editor edit = prefs.edit();\n edit.putBoolean(\"isFirstRun\", Boolean.TRUE);\n edit.commit();\n Intent mainIntent = new Intent(splash.this,LoginActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n }\n\n else\n { db= FirebaseDatabase.getInstance().getReference(\"patient\");\n SharedPreferences prefs1 = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n previously=prefs1.getString(\"key\",\"null\" );\n Toast.makeText(getBaseContext(),\"my \"+previously ,Toast.LENGTH_LONG ).show();\n read(new LoginActivity.Firebasecallback() {\n @Override\n public void onCallback(List<user> list) {\n // Toast.makeText(getActivity(), \"msg12\",Toast.LENGTH_LONG).show();\n for (user e:list)\n { // Toast.makeText(LoginActivity.this, \"list\",Toast.LENGTH_LONG).show();\n if(previously.equals(e.id))\n { Toast.makeText(splash.this, e.url,Toast.LENGTH_LONG).show();\n LoginActivity.userg=new user(e.id,e.username,e.mail,e.url,e.phn,e.lat,e.lng);\n LoginActivity.usname=e.username;\n LoginActivity.name=e.mail;\n if(e.url==null)\n LoginActivity.url=null;\n else\n LoginActivity.url=Uri.parse(e.url);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());\n SharedPreferences.Editor edit = preferences.edit();\n edit.putString(\"key\",e.id);\n edit.commit();\n break;\n\n }\n }\n\n check=true;\n Intent mainIntent = new Intent(splash.this, MainActivity.class);\n splash.this.startActivity(mainIntent);\n splash.this.finish();\n // Toast.makeText(splash.this, \"mmmm\", Toast.LENGTH_SHORT).show();\n //LoginActivity.usname=null;\n\n\n }\n\n });\n }\n }\n }, SPLASH_DISPLAY_LENGTH);\n }", "private void id(){\n but = findViewById(R.id.googlBtn);\n image = findViewById(R.id.Logo_image);\n logoText = findViewById(R.id.logo_name);\n sloganText = findViewById(R.id.slogan_name);\n password = findViewById(R.id.password);\n login_btn = findViewById(R.id.login_btn);\n emailsignup = findViewById(R.id.emailsignup);\n phonesignup = findViewById(R.id.phonesignup);\n forgot=findViewById(R.id.forgot);\n //googlesignup = findViewById(R.id.googlesignup);\n email=findViewById(R.id.loginemail);\n scrollView=findViewById(R.id.scroll);\n firebaseAuth=FirebaseAuth.getInstance();\n firebaseDatabase=FirebaseDatabase.getInstance();\n }", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth: setting up firebase auth.\");\n\n mAuth = FirebaseAuth.getInstance();\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n myRef = mFirebaseDatabase.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if (user != null) {\n // User is signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n } else {\n // User is signed out\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n // ...\n }\n };\n\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // safe check if was sussesfull\n if(task.isSuccessful()) {\n //Maping a user on database\n currentUser = firebaseAuth.getCurrentUser() ;\n assert currentUser != null;\n final String userId = currentUser.getUid();\n // creating a hashmap to map\n\n Map<String,String> userObj = new HashMap<>() ;\n\n userObj.put(\"userId\", userId) ;\n userObj.put(\"userName\" , userName) ;\n\n collectionReference.add(userObj)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n //Toast.makeText(CreateAccActivity.this,\"onSucess\",Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",\"sussess\") ;\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n\n //if(!Objects.requireNonNull(task.getResult()).exists()){\n\n //Log.d(\"hello\",\"sussess\") ;\n progressBar.setVisibility(View.INVISIBLE);\n\n //Toast.makeText(CreateAccActivity.this,userName,Toast.LENGTH_LONG).show();\n\n\n String name = Objects.requireNonNull(task.getResult()).getString(\"userName\") ;\n\n journalApi journalApi = new journalApi() ;\n util.journalApi.getInstance().setUserID(userId);\n util.journalApi.getInstance().setUserName(userName);\n\n //Toast.makeText(CreateAccActivity.this,name,Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",userName) ;\n Intent intent = new Intent(CreateAccActivity.this\n ,PostJournalActivity.class) ;\n\n intent.putExtra(\"username\",name);\n intent.putExtra(\"userid\",userId) ;\n\n startActivity(intent);\n\n\n }\n /*else{\n progressBar.setVisibility(View.INVISIBLE);\n }*/\n\n\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(CreateAccActivity.this\n ,\"error\" , Toast.LENGTH_LONG).show();\n }\n });\n\n }\n }", "public interface FirebaseService {\n public void init();\n}", "private void setupFirebaseAuth(){\n Log.d(TAG, \"setupFirebaseAuth\");\n mAuth = FirebaseAuth.getInstance();\n fbaseDB = FirebaseDatabase.getInstance();\n dbRef = fbaseDB.getReference();\n\n mAuthListener = new FirebaseAuth.AuthStateListener() {\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n if(user != null){\n //somebody signed in\n Log.d(TAG, \"onAuthStateChanged:signed_in\" + user.getUid());\n dbRef.addListenerForSingleValueEvent(\n new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(checkUsernamExists(username.getText().toString(), dataSnapshot)){\n Toast.makeText(SignUp.this,\"Signup SUCCESSFUL\",Toast.LENGTH_SHORT).show();\n } else{\n\n mAuth.signOut();\n }\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n }\n );\n } else{\n //nobodys here\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n }\n }\n };\n }", "void pushToFirebase(Task task) {\n un_FirebaseRef_tasks.push().setValue(task);\n }", "@Override\n public void onDataChange(DataSnapshot snapshot) {\n }", "public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.i(\"lt\",\"auth failed\");\n }", "@Override\n public View onCreateView ( LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState )\n {\n reff= FirebaseDatabase.getInstance(\"https://childhelpline-5e6f0-default-rtdb.firebaseio.com/\").getReference().child(\"clientinfo\");\n\n\n /* loginn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick ( View v ) {\n insertinfo();\n\n Intent intent = new Intent(getActivity().getBaseContext(), chat.class);\n startActivity(intent);\n\n }\n });\n*/\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment_repoter, container, false);\n }", "private DataManager() {\n ref = FirebaseStorage.getInstance().getReference();\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n }", "private void collectToken()\n {\n String token = FirebaseInstanceId.getInstance().getId();\n Log.d(\"MYTAG\", \"Firebase_token \" + token);\n }", "@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onCancelled(FirebaseError arg0) {\n\n\t\t\t}", "public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }", "public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }", "@Override\n public void onCreate() {\n super.onCreate();\n if(!FirebaseApp.getApps(this).isEmpty()) {\n FirebaseDatabase.getInstance().setPersistenceEnabled(true);\n }\n appInstance = this;\n\n\n\n }", "private void upToFireBase(Bill _bill)\n {\n Log.d(\"RECORD\", \"Up to firebase\"+_fbfs);\n String _number_room = _bill.getRoom().getPhase()+String.valueOf(_bill.getRoom().getFloor())+_bill.getRoom().getNumber_room();\n _fbfs.collection(\"Resident\")\n .document(\"USER\")\n .collection(_number_room)\n .document(_bill.getMonth()+_bill.getYear())\n .set(_bill)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"RECORD\", \"SUCCESS\");\n PHASE_CHOOSE = _room.getPhase();\n FLOOR_CHOOSE = String.valueOf(_room.getFloor());\n goToNextPage();\n Toast.makeText(getActivity(), \"Success\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"RECORD\", \"FAILED\");\n Toast.makeText(getActivity(), \"Not found\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n email = (EditText) findViewById(R.id.etmail);\n password = (EditText) findViewById(R.id.etPassword);\n registr = (Button) findViewById(R.id.regsbtn);\n comment = (TextView) findViewById(R.id.textView);\n logbtn = (Button) findViewById(R.id.logbtn);\n\n Authinticate = FirebaseAuth.getInstance();\n registr.setOnClickListener(this);\n logbtn.setOnClickListener(this);\n // database = FirebaseDatabase.getInstance();\n //databaseReference = database.getReference();\n\n\n }", "public static DatabaseReference getFirebaseDataBase(){\n if(firebase==null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }", "public interface FirebaseActionListenerCallback {\n public void onSuccess();\n public void onError(Exception exception);\n public void onDatabaseError(DatabaseError error);\n}", "private void readValueTypeEventWithURL(JSONArray data) {\n //\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"readValueTypeEventWithURL : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n Firebase myChildRef = new Firebase(strURL);\n if(isUsed != true)\n isUsed = true;\n myChildRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n try {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n //pluginResult.setKeepCallback(true);\n mCallbackContext.sendPluginResult(pluginResult);\n } catch (Exception e) {\n PluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n e.printStackTrace();\n }\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The readValueTypeEventWithURL(addValueEventListener) failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"The readValueTypeEventWithURL failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }", "private void sendMessageFirebase(String name, String content, String image, String uid, String url){\n FirebaseDatabase firebaseDatabase; //Firebase Database 관리 객체참조변수\n DatabaseReference roodIdReference;\n Calendar calendar = Calendar.getInstance(); //현재 시간을 가지고 있는 객체\n String time = calendar.get(Calendar.HOUR_OF_DAY) + \":\" + calendar.get(Calendar.MINUTE);\n\n ChatMessageItem messageItem = new ChatMessageItem(name, content, time, image, uid, url);\n\n firebaseDatabase = FirebaseDatabase.getInstance();\n roodIdReference = firebaseDatabase.getReference(roomID);\n roodIdReference.push().setValue(messageItem);\n }", "public interface FirebaseInsertResult {\n\n /**\n * insert result callback\n * @param success true if success\n * @param msg prompt message\n */\n void insertResult(boolean success, String msg);\n}", "private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }", "private void getEventMembers()\n {\n String membersDatabaseAddress = \"Loc/\"+mEntityID;\n double lat=gl_lat;\n double lon=gl_long;\n\n DatabaseReference reference = database.getReference(membersDatabaseAddress);\n\n GeoFire geoFire= new GeoFire(reference);\n\n\n\n eventmembersQuery = geoFire.queryAtLocation(new GeoLocation(lat,lon),radius);\n\n eventmembersQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n\n int count=0;\n\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n\n if(!key.equals(mUserID)) {\n\n if (!mMarkersMap.containsKey(key)) {\n //Member is present\n\n\n //New key\n String name = key;\n if (allContactNames.containsKey(name))\n name = allContactNames.get(name);\n\n LatLng memberLatLng = new LatLng(location.latitude, location.longitude);\n mMarkersMap.put(key,\n mMap.addMarker(new MarkerOptions().position(memberLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))\n ));\n\n } else {\n //Present before,Present now\n mMarkersMap.get(key).setPosition(new LatLng(\n location.latitude,location.longitude\n ));\n }\n\n memberPresentFlags.put(key, true);\n if (membersProfilePic != null && membersProfilePic.containsKey(key)) {\n\n mMarkersMap.get(key).setIcon(BitmapDescriptorFactory.fromBitmap(\n membersProfilePic.get(key)\n ));\n mMarkersMap.get(key).setAnchor(0.5f,0.5f);\n }\n\n count++;\n }\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n\n if(count<10)\n {\n if(radius<2)\n radius+=0.1;\n }\n else if(count>15)\n {\n if(radius>0.1)\n radius-=0.1;\n }\n eventmembersQuery.removeAllListeners();\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n }", "private void addNewGroupToFireBase(Bundle guideData) {\n }", "@Override\n public void Handle() {\n DatabaseReference database = FirebaseDatabase.getInstance(app).getReference(\"config\");\n ValueEventListener listener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n String url = (String) dataSnapshot.child(\"serverUrl\").getValue();\n result.success(url);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n result.success(null);\n }\n };\n\n database.addListenerForSingleValueEvent(listener);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"upload\", \"uploadFromUri:onSuccess\");\n mDownloadUrl = taskSnapshot.getMetadata().getDownloadUrl();\n recommendation.setPhotoUrl(mDownloadUrl.toString());\n String recKey = mDatabase.child(\"users\").child(getUid()).child(\"recommendations\").push().getKey();\n mDatabase.child(\"recommendations\").child(recKey).setValue(recommendation);\n Log.d(\"locationID is\", locationId);\n Log.d(\"restaurantID is\", restaurantId);\n mDatabase.child(\"location\").child(\"Singapore\").child(locationId)\n .child(\"restaurantMap\").child(restaurantId)\n .child(\"recommendationsMap\").child(recKey).setValue(recommendation);\n mDatabase.child(\"restaurants\").child(\"Singapore\").child(restaurantId)\n .child(\"recommendationsMap\").child(recKey).setValue(recommendation);\n //recommendation.key = key;/*\n }", "private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }", "void onUserCreated(FirebaseUser firebaseUser);", "void UploadToFirebase() {\n // This gives the path name for the storage\n StorageReference photoRef = mStorageRef.child(\"images\").child(selectedImageUri.getLastPathSegment());\n\n // This uploads it into firebase storage\n // Toast makes the little comment appear at the bottom of the screen\n photoRef.putFile(selectedImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Uploaded\", Toast.LENGTH_SHORT);\n toast.show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @SuppressLint(\"ShowToast\")\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast toast = Toast.makeText(getApplicationContext(), \"Upload failed\", Toast.LENGTH_SHORT);\n toast.show();\n }\n });\n }", "@Override\n public void onComplete(String key, DatabaseError error) {\n }", "@Override\n public void onComplete(String key, DatabaseError error) {\n }", "@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n mFirebaseDatabase = FirebaseDatabase.getInstance();\r\n mFirebaseDatabaseReference = mFirebaseDatabase.getReference().child(\"room\");\r\n super.onCreate(savedInstanceState);\r\n }", "public void inicializarFirebaseAuth() {\n refAutenticacaofb = ConfiguracaoFirebase.metodoAutenticacaoFirebase();\n }", "@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n }", "@Override\n\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(otpsignin.this,\"Something went wrong\",Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onSuccess(Uri uri) {\n Image_Upload upload = new Image_Upload( uri.toString());\n mDatabaseRef.child(String.valueOf(a)).setValue(upload);\n Intent i=new Intent(All_Images.this, More_About_Users.class);\n startActivity(i);\n }", "public static DatabaseReference getFirebaseDatabase(){\n\n if (firebase == null){\n firebase = FirebaseDatabase.getInstance().getReference();\n }\n return firebase;\n }", "public void dataAddAppInstance() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(token).child(userNameString).setValue(newUser);\r\n\r\n // get this device's all time high score for comparison\r\n int highScore = getInt();\r\n\r\n // if high score is achieved, send notification\r\n if ( pointsScore > highScore) {\r\n setInt(\"high score\", pointsScore);\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }", "private void sentRequestGG(FirebaseAuth firebaseAuth) {\n if (firebaseAuth.getCurrentUser() != null) {\n SharedPref.instance.putName(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putPassword(firebaseAuth.getCurrentUser().getUid());\n SharedPref.instance.putUrlAvatar(String.valueOf(firebaseAuth.getCurrentUser().getPhotoUrl()));\n SharedPref.instance.putUser(firebaseAuth.getCurrentUser().getDisplayName());\n SharedPref.instance.putEmail(firebaseAuth.getCurrentUser().getEmail());\n username = firebaseAuth.getCurrentUser().getEmail();\n password = firebaseAuth.getCurrentUser().getUid();\n\n UserService userService = NetContext.instance.create(UserService.class);\n MediaType jsonType = MediaType.parse(\"application/json\");\n String loginJson = (new Gson().toJson(new UserRegisterResponseJson(username, password)));\n final RequestBody loginBody = RequestBody.create(jsonType, loginJson);\n // create call\n Call<Token> loginCall = userService.postNewAccount(loginBody);\n loginCall.enqueue(new Callback<Token>() {\n @Override\n public void onResponse(Call<Token> call, Response<Token> response) {\n DBContext.instance.cleanCart();\n SharedPref.instance.putCount(0);\n //EventBus.getDefault().postSticky(new SentUserIdEvent(u.getId().get$oid()));\n //Dang nhap 1 tai khoan moi hay tai khoan cu deu tra ve 307\n if (response.code() == 307){\n login(username, password);\n } else {\n Toast.makeText(LoginActivity.this, \"Could not parse body\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<Token> call, Throwable t) {\n Toast.makeText(LoginActivity.this, \"Lỗi xác minh tài khoản google!\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n });\n }\n }", "private void queryOrderedByKey(JSONArray data) {\n \tString strURL = String.format(\"https://%s.firebaseio.com\", appName); // = \"https://%@.firebaseio.com\" + appName;\n\n if ( data.length() >= 1 )\n {\n \ttry {\n\t\t\t\tstrURL = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"queryOrderedByKey : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n\n Firebase urlRef = new Firebase(strURL);\n\n if(isUsed != true)\n isUsed = true;\n // Read data and react to changes\n urlRef.orderByKey().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"queryOrderedByKey().addListenerForSingleValueEvent failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"queryOrderedByKey failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n //Log.d(\"asd\", downloadUrl.toString());\n Post p = new Post(String.valueOf(downloadUrl),\n titleText.getText().toString(),\n descText.getText().toString(),\n Double.parseDouble(priceText.getText().toString()),\n conditionSpinner.getSelectedItem().toString(),\n nameText.getText().toString());\n\n\n Map<String, Object> postValues = p.toMap();\n Map<String,Object> childUpdates = new HashMap<>();\n childUpdates.put(key, postValues);\n mPostsRef.updateChildren(childUpdates);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n //Firebase.setAndroidContext(this);\n MainActivity.firebaseRef = FirebaseDatabase.getInstance().getReferenceFromUrl(MainActivity.FIREBASEREF);\n //setContentView(R.layout.activity_login);\n callLoginDialog();\n }", "public void onSave(View w){\n\n //Timestamp in with customized format\n String timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm\").format(new Date());\n\n //Gets the dataBaseConnection\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n\n //Reference to the collection Entrys\n DocumentReference newNodeRef = db.collection(\"Entrys\").document();\n\n // Reads the data and put them in the ArrayList\n // Speed is rounded to prevent long numbers in the ResultActivity\n ResultEntry resultEntry = new ResultEntry(Math.round(averageSpeed * 1000) / 1000.0,\n averageAlt,\n distanceValue,\n timeStamp,\n newNodeRef.getId());\n\n Log.d(\"Result\",resultEntry.toString());\n\n // Writes the data in the Database\n newNodeRef.set(resultEntry).addOnCompleteListener(new OnCompleteListener<Void>() {\n /**\n * Writes data in the database Listener checks of success\n * Sends Toast to the User\n * If thre is a problem the user can try it again\n * Otherwise he is rooted to the Result Activity\n * with the new Entry at the Bottom of the ListView\n * @param task\n */\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Added Entry\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getApplicationContext(),ResultActivity.class);\n startActivity(intent);\n }else{\n Toast.makeText(getApplicationContext(),\"Insert failed\",Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }" ]
[ "0.6746302", "0.6657219", "0.654424", "0.64801586", "0.647904", "0.64287347", "0.6427091", "0.6418603", "0.63724357", "0.63724357", "0.63724357", "0.63724357", "0.6354189", "0.63388413", "0.6300723", "0.63004", "0.6299575", "0.6076149", "0.59976995", "0.5990416", "0.59749603", "0.5958523", "0.5945379", "0.59228903", "0.5896916", "0.58935565", "0.585278", "0.58520305", "0.58414924", "0.5838319", "0.58379763", "0.5821044", "0.57956845", "0.57944256", "0.57819486", "0.5764953", "0.5728448", "0.572535", "0.5716905", "0.5713163", "0.5692091", "0.56911916", "0.56817883", "0.5619893", "0.56138533", "0.5610871", "0.56059426", "0.5601615", "0.55828744", "0.5582285", "0.5576717", "0.5568156", "0.555136", "0.5547802", "0.5547514", "0.5541115", "0.5531527", "0.5531481", "0.5511874", "0.5502847", "0.5487746", "0.54763544", "0.54761994", "0.5475383", "0.5468625", "0.5464905", "0.54633814", "0.54633814", "0.54633814", "0.5459546", "0.5459546", "0.54545325", "0.54494846", "0.5447809", "0.54363674", "0.54358286", "0.5434866", "0.54225296", "0.54082483", "0.54074645", "0.540632", "0.5406267", "0.54046303", "0.5398494", "0.5394468", "0.53915334", "0.5389725", "0.5386057", "0.5386057", "0.5381607", "0.538134", "0.5380124", "0.5378028", "0.5376135", "0.5375326", "0.53699625", "0.5363786", "0.5362526", "0.5357375", "0.53517115", "0.5336612" ]
0.0
-1
System.setProperty("java.awt.headless","true"); ConfigFile.init(); String pw = "Escherichia_coli_K12/superpathway_of_threonine_metabolism"; / final String pw = "Escherichia_coli_K12/b"; final String graphFile = pw + ".grp"; viz = GraphVisHandler.getImageByType(System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, CommonDef.ISMAPPING); / final String pw = "Escherichia_coli_K12/b1"; final String graphFile = pw + ".grp"; viz = GraphVisHandler.getImageByType(System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, CommonDef.ISPATTERN);
public static JSplitPane buildContentPane() { final String pw = "Escherichia_coli_K12/superpathway_of_leucine-_valine-_and_isoleucine_biosynthesis";//b3"; final String graphFile = pw + ".grp"; viz = GraphVisHandler.getImageByType(System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, CommonDef.ISTEXT); //JFrame frame = new JFrame("Graph Visualization"); //main display controls viz.setSize(400,400); viz.pan(5, 5); viz.addControlListener(new DragControl()); viz.addControlListener(new PanControl()); viz.addControlListener(new ZoomControl()); viz.addControlListener(new WheelZoomControl()); viz.addControlListener(new ZoomToFitControl()); //frame.getContentPane().add(viz); // create a new JSplitPane to present the interface JPanel fpanel = new JPanel(); JButton saveButton = new JButton(CommonDef.SAVE, CommonDef.createImageIcon("b1.gif", CommonDef.SAVE)); saveButton.setPressedIcon(CommonDef.createImageIcon("b1d.gif", CommonDef.SAVE)); saveButton.setRolloverIcon(CommonDef.createImageIcon("b1d.gif", CommonDef.SAVE)); saveButton.setDisabledIcon(CommonDef.createImageIcon("b1.gif", CommonDef.SAVE)); saveButton.setMargin(new Insets(0,0,0,0)); saveButton.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent arg0) { // TODO Auto-generated method stub GraphVisHandler.saveImageByType(viz, System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, CommonDef.ISMAPPING); System.out.println("---------"); //Upload } }); fpanel.add(saveButton); JPanel fpane2 = new JPanel(); fpane2.add(new JButton("Try")); JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT, viz, fpanel); split.setOneTouchExpandable(true); split.setContinuousLayout(false); split.setDividerLocation(400); // now we run our action list viz.getVisualization().run("draw"); //frame.getContentPane().add(split); //frame.setSize(viz.getWidth()+10,viz.getHeight()+160); //frame.pack(); //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //<-CQ ADD //frame.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS)); // --> //frame.setVisible(true); return split; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void graphTree(CommonTree tree){\n\t\tDOTTreeGenerator gen = new DOTTreeGenerator(); \n\t\tStringTemplate st = gen.toDOT(tree); \n\n\t\tString type = \"jpg\";\n\t\tGraphViz gv = new GraphViz();\n\t\tgv.addln(st.toString());\n\n\t\tSystem.out.println(\"Before\");\n\n\t\tImageIcon img = new ImageIcon(gv.getGraph(gv.getDotSource(), type));\n\n\t\tSystem.out.println(\"After\");\n\n\t\tint newHeight = 775, newWidth = 1255; \n\t\t/* This is for writing the image to disk*/\n\t\tFile out = new File(\"graph.\" + type); // Linux\n\t\tgv.writeGraphToFile( gv.getGraph( gv.getDotSource(), type ), out );\n\t\t//\t\tif (iw > newWidth){\n\t\t//\t\t\tnewHeight = newWidth * ih/iw ;\n\t\t//\t\t\tBufferedImage resizedImg = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);\n\t\t//\t\t\tGraphics2D g2 = resizedImg.createGraphics();\n\t\t//\t\t\t\n\t\t//\t\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\t//\t\t\tg2.drawImage(img.getImage(), 0, 0, newWidth, newHeight, null);\n\t\t//\t\t\tg2.dispose();\n\t\t//\t\t\timg = new ImageIcon(resizedImg);\n\t\t//\t\t}\n\n\t\tJFrame jf = new JFrame(\"Abstract Syntax Tree\");\n\t\tjf.setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n\t\tJLabel photographLabel = new JLabel();\n\t\tphotographLabel.setHorizontalAlignment(JLabel.CENTER);\n\t\t//private Image getScaledImage(Image srcImg, int w, int h){\n\n\n\t\tphotographLabel.setIcon(img);\n\t\tJScrollPane scrollPane = new JScrollPane(photographLabel);\n\t\tjf.add(scrollPane, BorderLayout.CENTER);\n\t\tjf.pack();\n\t\tjf.setSize(newWidth+50, newHeight+50);\n\t\tjf.setResizable(true);\n\t\tjf.setVisible(true);\n\t\t/*end graphical display*/\n\t}", "public void initGraph(GraphData graphData) {\r\n \t\r\n \tGraph g = graphData.getGraph();\r\n \r\n // add visual data groups\r\n \tsetGraph(g, \"social graph\");\r\n \t\r\n \t/*\r\n \tint numEdges = g.getEdges().getTupleCount();\r\n\t\tint numEdgesToRemove = 0;\r\n\t\tif (numEdges < 6)\r\n\t\t\tnumEdgesToRemove = 0;\r\n\t\telse \r\n\t\t\tnumEdgesToRemove = 6;\r\n\t\t*/\r\n \tint numEdgesToRemove = 0;\r\n \t\r\n \t\tthis.clusterSize = clusterGraph(numEdgesToRemove, false);\r\n \t\r\n // set up the renderers \r\n // draw the nodes as basic shapes\r\n //Renderer nodeR = new ShapeRenderer(20); \r\n LabelRenderer nodeR = new LabelRenderer(\"label\", \"image\"); \r\n nodeR.setRoundedCorner(10, 10); \r\n nodeR.setImagePosition(Constants.TOP); \r\n \r\n // draw aggregates as polygons with curved edges\r\n Renderer polyR = new PolygonRenderer(Constants.POLY_TYPE_CURVE);\r\n ((PolygonRenderer)polyR).setCurveSlack(0.15f);\r\n \r\n DefaultRendererFactory drf = new DefaultRendererFactory();\r\n drf.setDefaultRenderer(nodeR);\r\n drf.add(\"ingroup('aggregates')\", polyR);\r\n m_vis.setRendererFactory(drf); \r\n \r\n // fix selected focus nodes\r\n TupleSet focusGroup = m_vis.getGroup(Visualization.FOCUS_ITEMS); \r\n focusGroup.addTupleSetListener(new TupleSetListener() {\r\n public void tupleSetChanged(TupleSet ts, Tuple[] add, Tuple[] rem) {\r\n for ( int i=0; i<rem.length; ++i )\r\n ((VisualItem)rem[i]).setFixed(false);\r\n for ( int i=0; i<add.length; ++i ) {\r\n ((VisualItem)add[i]).setFixed(false);\r\n ((VisualItem)add[i]).setFixed(true);\r\n }\r\n if ( ts.getTupleCount() == 0 ) {\r\n ts.addTuple(rem[0]);\r\n ((VisualItem)rem[0]).setFixed(false);\r\n }\r\n m_vis.run(\"draw\");\r\n }\r\n });\r\n \r\n // set up the visual operators\r\n // first set up all the color actions \r\n ColorAction nNodeStroke = new ColorAction(NODES, VisualItem.STROKECOLOR, 0); \r\n \r\n ColorAction nNodeFill = new ColorAction(NODES, VisualItem.FILLCOLOR, ColorLib.rgb(200,200,255));\r\n nNodeFill.add(VisualItem.FIXED, ColorLib.rgb(255,100,100));\r\n nNodeFill.add(VisualItem.HIGHLIGHT, ColorLib.rgb(255,200,125));\r\n \r\n ColorAction nNodeText = new ColorAction(NODES, VisualItem.TEXTCOLOR, ColorLib.rgb(0,0,0));\r\n \r\n ColorAction nEdgeFill = new ColorAction(EDGES, VisualItem.FILLCOLOR, ColorLib.gray(200)); \r\n \r\n ColorAction nEdgeStroke = new ColorAction(EDGES, VisualItem.STROKECOLOR, ColorLib.gray(200));\r\n \r\n ColorAction aStroke = new ColorAction(AGGR, VisualItem.STROKECOLOR);\r\n aStroke.setDefaultColor(ColorLib.gray(200));\r\n aStroke.add(\"_hover\", ColorLib.rgb(255,100,100));\r\n \r\n int[] palette = new int[] {\r\n ColorLib.rgba(255,200,200,150),\r\n ColorLib.rgba(200,255,200,150),\r\n ColorLib.rgba(200,200,255,150),\r\n ColorLib.rgba(216,134,134,150),\r\n ColorLib.rgba(135,137,211,150),\r\n ColorLib.rgba(134,206,189,150),\r\n ColorLib.rgba(206,176,134,150),\r\n ColorLib.rgba(194,204,134,150),\r\n ColorLib.rgba(145,214,134,150),\r\n ColorLib.rgba(133,178,209,150),\r\n ColorLib.rgba(103,148,255,150),\r\n ColorLib.rgba(60,220,220,150),\r\n ColorLib.rgba(30,250,100,150)\r\n };\r\n \r\n ColorAction aFill = new DataColorAction(AGGR, \"id\",\r\n Constants.NOMINAL, VisualItem.FILLCOLOR, palette);\r\n \r\n // bundle the color actions\r\n ActionList draw = new ActionList();\r\n draw.add(nNodeStroke);\r\n draw.add(nNodeFill);\r\n draw.add(nNodeText);\r\n draw.add(nEdgeFill);\r\n draw.add(nEdgeStroke);\r\n draw.add(aStroke);\r\n draw.add(aFill); \r\n \r\n ForceSimulator forceSimulator = new ForceSimulator();\r\n\t\tforceSimulator.addForce(new NBodyForce(-1.0f, -1.0f, 0.899f));\r\n\t\tforceSimulator.addForce(new DragForce(0.009f));\r\n\t\tforceSimulator.addForce(new SpringForce(9.99E-6f, 200.0f));\r\n \r\n // now create the main layout routine\r\n ActionList animate = new ActionList(Activity.INFINITY);\r\n ForceDirectedLayout layout = new ForceDirectedLayout(GRAPH, forceSimulator, true); \r\n animate.add(layout);\r\n animate.add(draw); \r\n animate.add(new AggregateLayout(AGGR));\r\n animate.add(new RepaintAction());\r\n \r\n // finally, we register our ActionList with the Visualization.\r\n // we can later execute our Actions by invoking a method on our\r\n // Visualization, using the name we've chosen below.\r\n m_vis.putAction(\"draw\", draw); \r\n m_vis.putAction(\"layout\", animate);\r\n m_vis.runAfter(\"draw\", \"layout\"); \r\n \r\n // set up the display\r\n setSize(700, 700);\r\n pan(350, 350);\r\n setHighQuality(true);\r\n setForeground(Color.GRAY);\r\n setBackground(Color.WHITE);\r\n addControlListener(new AggregateDragControl());\r\n addControlListener(new ZoomControl());\r\n addControlListener(new PanControl()); \r\n addControlListener(new FocusControl(1));\r\n addControlListener(new DragControl());\r\n addControlListener(new WheelZoomControl());\r\n addControlListener(new ZoomToFitControl());\r\n addControlListener(new NeighborHighlightControl());\r\n \r\n\t\taddControlListener(new ControlAdapter() {\r\n\r\n\t\t\tpublic void itemEntered(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemEntered....................\");\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpublic void itemExited(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemExited....................\");\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\tif (item.isInGroup(Visualization.FOCUS_ITEMS)) {\r\n\t\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void itemPressed(VisualItem item, MouseEvent e) {\r\n\t\t\t\t//System.out.println(\"itemPressed....................\");\r\n\t\t\t\t\r\n\t\t\t\tif (e.getClickCount() == 2) {\r\n\t\t\t\t\tSystem.out.println(\"itemDoubleClicked....................\");\r\n\t\t\t\t\tString id = item.getString(\"id\");\r\n\t\t\t\t\tif (id != null) {\r\n\t\t\t\t\t\tSystem.out.println(\"ID[\" + id + \"] is selected.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (item.isInGroup(NODES)) {\r\n\t\t\t\t\t//System.out.println(\"Node Selected....\");\r\n\t\t\t\t\titem.setFillColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.setStrokeColor(ColorLib.rgb(255,200,125));\r\n\t\t\t\t\titem.getVisualization().repaint();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (e.isPopupTrigger()) {\r\n\t\t\t\t\tSystem.out.println(\"---------isPopupTrigger....................\");\r\n\t\t\t\t\tString id = item.getString(\"id\");\r\n\t\t\t\t\tif (id != null) {\r\n\t\t\t\t\t\tSystem.out.println(\"ID[\" + id + \"] popup menu selected.\");\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});\r\n \r\n // set things running\r\n m_vis.run(\"layout\"); \t\r\n }", "public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }", "public static void main(String[] args){\n\t\tString dataset = null; boolean headless = false; boolean colour = false;boolean emd = false; int k = 0;\r\n\t\tint width = 0, height = 0;\r\n\t\t// load the properties, a bit messy because it's the 7th and I should not be writing code this late into the project\r\n\t\ttry {\r\n\t\t\t// file reader variables\r\n\t\t\tFile file = new File(\"data/KMEANS.properties\");\r\n\t\t\tFileReader fileReader = new FileReader(file);\r\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\t\t\t\r\n\t\t\tString line;\t\r\n\t\t\tint lineCounter = 0;\r\n\t\t\t\r\n\t\t\t// the loop for reading in the lines\r\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\r\n\t\t\t\tif(lineCounter == 0){\r\n\t\t\t\t\tdataset = line;\r\n\t\t\t\t}else if(lineCounter == 1){\r\n\t\t\t\t\theadless = Boolean.valueOf(line);\r\n\t\t\t\t}else if(lineCounter == 2){\r\n\t\t\t\t\tcolour = Boolean.valueOf(line);\r\n\t\t\t\t}else if(lineCounter == 3){\r\n\t\t\t\t\temd = Boolean.valueOf(line);\r\n\t\t\t\t}else if(lineCounter == 4){\r\n\t\t\t\t\tk = Integer.valueOf(line);\r\n\t\t\t\t}else if(lineCounter == 5){\r\n\t\t\t\t\t// width\r\n\t\t\t\t\twidth = Integer.valueOf(line);\r\n\t\t\t\t}else if(lineCounter == 6){\r\n\t\t\t\t\t// height\r\n\t\t\t\t\theight = Integer.valueOf(line);\r\n\t\t\t\t}\r\n\t\t\t\tlineCounter++;\r\n\t\t\t}\r\n\t\t\tfileReader.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tif(!headless){\r\n\t\t\ttry {\r\n\t\t\t\t// load k-means before starting\r\n\t\t\t\tkmeans = new KMeans(dataset,false,colour,emd,k,width,height);\r\n\t\t\t\tif(!kmeans.MNIST){\r\n\t\t\t\t\tKMeans.INPUT_WIDTH = width;\r\n\t\t\t\t\tKMeans.INPUT_HEIGHT = height;\r\n\t\t\t\t\tKMeans.TOTAL_WEIGHTS = (KMeans.INPUT_WIDTH*KMeans.INPUT_HEIGHT)*KMeans.TOTAL_COLOURS;\r\n\t\t\t\t}\r\n\t\t\t\tAppGameContainer app;\r\n\t\t\t\tapp = new AppGameContainer(new Visualiser(\"Crowd-sourced drawing clustering with neural computing.\"));\r\n\t\t\t\tapp.setDisplayMode(1024, 720, false);\r\n\t\t\t\tapp.setShowFPS(false);\r\n\t\t\t\tapp.setAlwaysRender(true);\r\n\t\t\t\tapp.start();\r\n\t\t\t}catch (SlickException ex){\r\n\t\t\t\tLogger.getLogger(Visualiser.class.getName()).log(Level.SEVERE, null, ex);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t// start k-means in headless mode\r\n\t\t\tkmeans = new KMeans(dataset,true,colour,emd,k,width,height);\r\n\t\t\tif(!kmeans.MNIST){\r\n\t\t\t\tKMeans.INPUT_WIDTH = width;\r\n\t\t\t\tKMeans.INPUT_HEIGHT = height;\r\n\t\t\t\tKMeans.TOTAL_WEIGHTS = (KMeans.INPUT_WIDTH*KMeans.INPUT_HEIGHT)*KMeans.TOTAL_COLOURS;\r\n\t\t\t}\r\n\t\t\twhile(true){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tkmeans.update();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void plotScatterDiagram(){\n double xmax = a + 5. * gamma;\r\n double xmin = a - 5. * gamma;\r\n DatanGraphics.openWorkstation(getClass().getName(), \"\");\r\n DatanGraphics.setFormat(0., 0.);\r\n DatanGraphics.setWindowInComputingCoordinates(xmin, xmax, 0., .5);\r\n DatanGraphics.setViewportInWorldCoordinates(-.15, .9, .16, .86);\r\n DatanGraphics.setWindowInWorldCoordinates(-.414, 1., 0., 1.);\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawFrame();\r\n DatanGraphics.drawScaleX(\"y\");\r\n DatanGraphics.drawScaleY(\"f(y)\");\r\n DatanGraphics.drawBoundary();\r\n double xpl[] = new double[2];\r\n double ypl[] = new double[2];\r\n// plot scatter diagram\r\n DatanGraphics.chooseColor(1);\r\n for(int i = 0; i < y.length; i++){\r\n xpl[0] = y[i];\r\n xpl[1] = y[i];\r\n ypl[0] = 0.;\r\n ypl[0] = .1;\r\n DatanGraphics.drawPolyline(xpl, ypl); \r\n }\r\n// draw Breit-Wigner corresponding to solution\r\n int npl = 100;\r\n xpl = new double[npl];\r\n ypl = new double[npl];\r\n double dpl = (xmax - xmin) / (double)(npl - 1);\r\n for(int i = 0; i < npl; i++){\r\n xpl[i] = xmin + (double)i * dpl;\r\n ypl[i] = breitWigner(xpl[i], x.getElement(0), x.getElement(1));\r\n }\r\n DatanGraphics.chooseColor(5);\r\n DatanGraphics.drawPolyline(xpl, ypl);\r\n// draw caption\r\n String sn = \"N = \" + nny;\r\n\t numForm.setMaximumFractionDigits(3);\r\n \t numForm.setMinimumFractionDigits(3);\r\n String sx1 = \", x_1# = \" + numForm.format(x.getElement(0));\r\n String sx2 = \", x_2# = \" + numForm.format(x.getElement(1));\r\n String sdx1 = \", &D@x_1# = \" + numForm.format(Math.sqrt(cx.getElement(0,0)));\r\n String sdx2 = \", &D@x_2# = \" + numForm.format(Math.sqrt(cx.getElement(1,1)));\r\n caption = sn + sx1 + sx2 + sdx1 + sdx2;\r\n DatanGraphics.setBigClippingWindow();\r\n DatanGraphics.chooseColor(2);\r\n DatanGraphics.drawCaption(1., caption);\r\n DatanGraphics.closeWorkstation();\r\n\r\n }", "public Main() {\n grafo = new MultiGraph(\"Mapa\", false, true);\n initComponents();\n\n }", "public static void main1(String args[]) {\n\t\tString commandString = \"\";\n\t\tfor (String arg : args) {\n\t\t\tcommandString += arg;\n\t\t\t/*\n\t\t\t * FileReader fr = null; try {fr = new FileReader(commandString); }\n\t\t\t * catch (FileNotFoundException fnfex) {System.err.println(\"File \"\n\t\t\t * + commandString + \" not found\"); return; }\n\t\t\t */\n\t\t}\n\n\t\tboolean showToolbar = true;\n\t\tboolean showMenu = true;\n\t\tString svgurl = null;\n\t\t// create the applet with the svg-url as argument\n\n\t\tViewer viewer = new Viewer();\n\t\tviewer.invokedStandalone = true;\n\t\tif (svgurl != null) {\n\t\t\tviewer.svgfile = svgurl;\n\t\t}\n\t\tviewer.setShowToolbar(showToolbar);\n\t\tviewer.setShowMenu(showMenu);\n\n\t\t// Context cx = Context.enter();\n\t\t// viewer.setContext(Context.enter());\n\t\t// Scriptable scope = cx.initStandardObjects(null);\n\t\t// viewer.setScope(viewer.getContext().initStandardObjects(new\n\t\t// ImporterTopLevel()));\n\n\t\tJFrame f = new JFrame(viewer.title);\n\t\tf.setBounds(20, 20, 750, 750);\n\t\tf.getContentPane().add(viewer, \"Center\");\n\t\tviewer.frame = f;\n\t\tviewer.init();\n\n\t\tf.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tf.show();\n\n\t\t// zoom to all entities and draw canvas\n\n\t\t// viewer.canvas.fitToWindow();\n\t\t// viewer.canvas.draw();\n\n\t\t/*\n\t\t * Scriptable jsArgs = Context.toObject(viewer,viewer.getScope());\n\t\t * viewer.getScope().put(\"viewer\", viewer.getScope(), jsArgs); //String\n\t\t * commandString =\n\t\t * \"var i = 3; function foo() {i += 1; java.lang.System.out.println(i); i+= 2; java.lang.System.out.println(i);} foo(); viewer.setShowMenu(false); viewer.setShowToolbar(false); viewer.canvas.fitToWindow(); viewer.canvas.draw();viewer.svgfile=\\\"arc.svg\\\";\"\n\t\t * ; Object result = null; try { // result =\n\t\t * cx.evaluateString(scope,commandString,\"<cmd>\",1,null); result =\n\t\t * viewer.getContext().evaluateReader(viewer.getScope(),fr,commandString\n\t\t * ,1,null);// String(getScope(),commandString,\"<cmd>\",1,null);\n\t\t * System.out.println(viewer.getContext().toString(result)); }\n\t\t * catch(JavaScriptException jseex) {\n\t\t * System.err.println(\"Exception caught: \" + jseex.getMessage());\n\t\t * return; } catch (IOException ioex) {\n\t\t * System.err.println(\"IOException reading from file \" + commandString);\n\t\t * return; } Context.exit();\n\t\t */\n\t\tviewer.scriptFrame.loadDocument(commandString);\n\t}", "protected void graphicProgramation(Graphics2D g2) throws InterruptedException, IOException {\n double yPosition = this.getSize().getHeight();\n // se cambian las propiedades de los graficos\n this.setOpaque(true);\n // si no ha cambiado de programacion y no hay canales, se crea la nueva programacion\n if (!alreadyChange && channelGraphics.size() == 0) {\n // carga la programacion del dia\n programation = new Programacion(getFileOftheDay());\n // recargando imagenes\n for (int channel = 0; channel < programation.getCantCanalesProg(); channel++) {\n // se crea una imagen del canal grafico\n BufferedImage bufferedImage = new BufferedImage(this.getSize().width,\n (int) SIBAConst.CHANNEL_GRAPHIC_HEIGHT, BufferedImage.TYPE_INT_RGB);\n Graphics2D big = bufferedImage.createGraphics();\n // se crea una instancia de un canal grafico\n ChannelGraphic channelGraphic = new ChannelGraphic(big, programation.getCanalInd(channel));\n // referencia la posicion donde quedara el grafico cuando sea graficado\n channelGraphic.setyPosition(yPosition);\n // se setea la altura del canal\n channelGraphic.setHeight(SIBAConst.CHANNEL_GRAPHIC_HEIGHT);\n // el ancho del canal grafico es el ancho del componente\n channelGraphic.setWidthComponent(this.getSize().getWidth());\n // se referencia la imagen\n channelGraphic.setBufferedImage(bufferedImage);\n // grafica el canal\n \n if ( this.qtyBackgounds < 0){\n \t\n \tSystem.out.println(\"Vá a operar con categorias fondos\");\n \tchannelGraphic.paintChannel(-1,ViewerHoursControl.getStartHour(), ViewerHoursControl.getStartHour() + SIBAConst.SUM_HOUR);\n \t\n }\n else if (this.qtyBackgounds == 0)\t\n {\n \tSystem.out.println(\"No vá a operar con múltiples fondos\");\n \tchannelGraphic.paintChannel(ViewerHoursControl.getStartHour(), ViewerHoursControl.getStartHour() + SIBAConst.SUM_HOUR);\n }\t\n else\n {\n \tSystem.out.println(\"Si vá a operar con múltiples fondos\");\n \tchannelGraphic.paintChannel(this.bkgActivo,ViewerHoursControl.getStartHour(), ViewerHoursControl.getStartHour() + SIBAConst.SUM_HOUR);\n \tthis.moveToNextInd();\n }\n \n \n \n // se adjunta el canal grafico a la coleccion\n channelGraphics.add(channelGraphic);\n bufferedImage.flush();\n yPosition += SIBAConst.CHANNEL_GRAPHIC_HEIGHT;\n System.out.println(channelGraphic.getyPosition());\n }\n alreadyChange = true;\n }\n if (activatedScheduleChange) {\n // recargando imagenes\n for (ChannelGraphic channelGraphic : channelGraphics) {\n // grafica el canal\n channelGraphic.paintChannel(ViewerHoursControl.getStartHour(), ViewerHoursControl.getStartHour() + SIBAConst.SUM_HOUR);\n }\n activatedScheduleChange = false;\n }\n \n //System.out.println(\"Already Change: \"+alreadyChange+\" / Remove Last Programation: \"+removeLastProgramation);\n for (Iterator<ChannelGraphic> iteratorChannel = channelGraphics.iterator(); iteratorChannel.hasNext();) {\n ChannelGraphic channelGraphicScroll = iteratorChannel.next();\n \n // si el componente ya fue visualizado, pasa a la cordenada del canal grafico que contiene la\n // cordenada \"Y\" mas alta\n if (channelGraphicScroll.getyPosition() + SIBAConst.CHANNEL_GRAPHIC_HEIGHT < 0) {\n channelGraphicScroll.setyPosition(getChannelYPositionLast() + SIBAConst.CHANNEL_GRAPHIC_HEIGHT);\n }\n channelGraphicScroll.setyPosition(channelGraphicScroll.getyPosition() - 1.0);\n // borrar anterior imagen\n g2.clearRect(0, (int) channelGraphicScroll.getyPosition(), (int) channelGraphicScroll.getWidthComponent(),\n (int) channelGraphicScroll.getHeight() + 1);\n // animar la imagen\n g2.drawImage(channelGraphicScroll.getBufferedImage(), 0, (int) channelGraphicScroll.getyPosition(), this);\n // Cada canal que sobrepase los limites de la pantalla en el sentido Norte, sera eliminara\n // de la programacion del dia, (debido a que se hara cambio a una nueva programacion de otro dia)\n // si el componente ya fue visualizado, pasa a la cordenada del canal grafico que contiene la\n // cordenada \"Y\" mas alta\n if (channelGraphicScroll.getyPosition() + SIBAConst.CHANNEL_GRAPHIC_HEIGHT < 0) {\n // verifica si se van a eliminar los programas a medida que se hayan visto\n if (!alreadyChange && removeLastProgramation) {\n \tSystem.out.println(\"Se ha definido iteratorChannel.remove()\");\n iteratorChannel.remove();\n }\n }\n }\n \n }", "private static void createAndShowGUI() {\n Font f = new Font(\"微软雅黑\", 0, 12);\n String names[] = {\"Label\", \"CheckBox\", \"PopupMenu\", \"MenuItem\", \"CheckBoxMenuItem\",\n \"JRadioButtonMenuItem\", \"ComboBox\", \"Button\", \"Tree\", \"ScrollPane\",\n \"TabbedPane\", \"EditorPane\", \"TitledBorder\", \"Menu\", \"TextArea\",\n \"OptionPane\", \"MenuBar\", \"ToolBar\", \"ToggleButton\", \"ToolTip\",\n \"ProgressBar\", \"TableHeader\", \"Panel\", \"List\", \"ColorChooser\",\n \"PasswordField\", \"TextField\", \"Table\", \"Label\", \"Viewport\",\n \"RadioButtonMenuItem\", \"RadioButton\", \"DesktopPane\", \"InternalFrame\"\n };\n for (String item : names) {\n UIManager.put(item + \".font\", f);\n }\n //Create and set up the window.\n JFrame frame = new JFrame(\"AutoCapturePackagesTool\");\n\n String src = \"/optimizationprogram/GUICode/u5.png\";\n Image image = null;\n try {\n image = ImageIO.read(new CaptureGUI().getClass().getResource(src));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n frame.setIconImage(image);\n //frame.setIconImage(Toolkit.getDefaultToolkit().getImage(src));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setResizable(false);\n frame.setLocation(Toolkit.getDefaultToolkit().getScreenSize().width / 2 - 520 / 2,\n Toolkit.getDefaultToolkit().getScreenSize().height / 2 - 420 / 2);\n frame.getContentPane().add(new CaptureGUI());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "public static void createAndShowGUI(){\n\n //the main graph frame\n JFrame mainFrame = new JFrame(\"Graphit\");\n mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n mainFrame.setSize(CANVAS_WIDTH, CANVAS_HEIGHT);\n\n gc = new NGraphitController();\n\n p = new Point(0,0);\n\n // Viewport is to man through the graph.\n vp = new JViewport();\n vp.setSize(100, 100);\n vp.setView(gc);\n mainFrame.add(vp);\n\n mainFrame.pack();\n mainFrame.setLocationRelativeTo(null);\n mainFrame.setVisible(true);\n\n }", "public static void main(String[] args) {\n // if required - start the graphical output using -v parameter\n if (args.length > 0) {\n if (args[0].equals(\"-v\")) {\n visualize = true;\n }\n } else {\n // change this to true if you want to visualize always, disregarding parameters.\n visualize = false;\n }\n // stores references to animation windows\n LinkedList<Visualizator> windows = new LinkedList();\n // if true then create windows with graps.\n if (visualize) {\n createGUI(windows);\n }\n\n // list of results\n LinkedList results = new LinkedList();\n\n // data set name(s) are stored in this list. Typically, the data are expected to be in a \"$PATH/data-set/\" directory, where $PATH is the path to where the Alea directory is.\n // Therefore, this directory should contain both ./Alea and ./data-set directories. Files describing machines should be placed in a file named e.g., \"metacentrum.mwf.machines\".\n // Similarly machine failures (if simulated) should be placed in a file called e.g., \"metacentrum.mwf.failures\".\n // Please read carefully the copyright note when using public workload traces!\n //String data_sets[] = {\"SDSC-SP2.swf\", \"hpc2n.swf\", \"star.swf\", \"thunder.swf\", \"metacentrum.mwf\", \"meta2008.mwf\", \"atlas.swf\",};\n String data_sets[] = {\"metacentrum.mwf\"};\n\n // number of gridlets in data set\n //int total_gridlet[] = {59700, 202876, 96000, 121038, 103656, 187370, 42724,};\n int total_gridlet[] = {6, 6};\n // the weight of the fairness criteria in objective function\n int fairw[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n // set true to use failures\n failures = false;\n // set true to use specific job requirements\n reqs = true;\n // set true to use runtime estimates\n estimates = false;\n\n // set true to refine estimates using job avg. length\n useAvgLength = false;\n // set true to use last job length as a new runtime estimate\n useLastLength = false;\n // set true to use \"on demand\" schedule optimization when early job completions appear\n useEventOpt = false;\n\n // set true to use very imprecise estimates\n useUserPrecision = false;\n // set true to use Feitelson's deterministic f-model to generate runtime estimates\n useDurationPrecision = false;\n // if useDurationPrecision = true, then following number denotes the level of imprecison\n // 100 = 2 x real lenght, 400 = 5 x real length, 900 = 10x, 1900 = 20x, 4900 = 50x\n userPercentage = 4900;\n // the minimal length (in seconds) of gap in schedule since when the \"on demand\" optimization is executed\n gap_length = 10 * 60;\n // the weigh of fairness criterion\n fair_weight = 1;\n\n // use binary heap dat structure to represent schedule (generally faster solution)\n useHeap = true;\n\n\n //defines the name format of output files\n String problem = \"Result\";\n if (!failures && !reqs) {\n problem += \"Basic\";\n }\n if (reqs) {\n problem += \"R-\";\n }\n if (failures) {\n problem += \"F\";\n }\n if (estimates) {\n problem += \"-Estim\";\n } else {\n problem += \"-Exact\";\n }\n if (useAvgLength) {\n problem += \"-AvgL\";\n }\n if (useLastLength) {\n problem += \"-LastL\";\n }\n if (useEventOpt) {\n problem += \"-EventOpt\";\n }\n if (useUserPrecision) {\n problem += \"-UserPrec\" + userPercentage;\n }\n if (useDurationPrecision) {\n problem += \"-DurPrec\" + userPercentage;\n }\n\n // data sets are outside the project folder (i.e. in ../data-set/)\n data = true;\n // multiply the number of iterations of optimization techniques\n multiplicator = 1;\n // used to influence the frequency of job arrivals (mwf files only)\n double multiplier = 1.0;\n\n // used only when executed on a real cluster (do not change)\n path = \"estim100/\";\n meta = false;\n if (meta) {\n String date = \"-\" + new Date().toString();\n date = date.replace(\" \", \"_\");\n date = date.replace(\"CET_\", \"\");\n date = date.replace(\":\", \"-\");\n System.out.println(date);\n problem += date;\n }\n\n String user_dir = \"\";\n if (ExperimentSetup.meta) {\n user_dir = \"/scratch/xklusac/\" + path;\n } else {\n user_dir = System.getProperty(\"user.dir\");\n }\n try {\n Output out = new Output();\n out.deleteResults(user_dir + \"/jobs(\" + problem + \"\" + ExperimentSetup.algID + \").csv\");\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n // creates Result Collector\n ResultCollector result_collector = new ResultCollector(results, problem);\n\n\n // this cycle selects data set from data_sets[] list\n for (int set = 0; set <= 0; set++) {\n String prob = problem;\n fair_weight = fairw[set];\n if (useUserPrecision) {\n prob += \"-UserPrec\" + userPercentage;\n }\n max_estim = 0;\n result_collector.generateHeader(data_sets[set] + \"_\" + prob);\n prevAlgID = -1;\n\n // selects algorithm\n // write down the IDs of algorithm that you want to use (FCFS = 0, EDF = 1, EASY = 2, CONS = 4, PBS PRO = 5, BestGap = 10, BestGap+RandomSearch = 11, ...)\n int algorithms[] = {2};\n\n // select which algorithms from the algorithms[] list will be used.\n for (int sel_alg = 0; sel_alg <= 0; sel_alg++) {\n\n // reset values from previous iterations\n use_compresion = false;\n opt_alg = null;\n fix_alg = null;\n\n // get proper algorithm\n int alg = algorithms[sel_alg];\n int experiment_count = 1;\n name = data_sets[set];\n algID = alg;\n if (sel_alg > 0) {\n prevAlgID = algorithms[sel_alg - 1];\n }\n\n // used for output description\n String suff = \"\";\n // initialize the simulation - create the scheduler\n Scheduler scheduler = null;\n String scheduler_name = \"Alea_3.0_scheduler\";\n try {\n Calendar calendar = Calendar.getInstance();\n boolean trace_flag = false; // true means tracing GridSim events\n String[] exclude_from_file = {\"\"};\n String[] exclude_from_processing = {\"\"};\n String report_name = null;\n GridSim.init(entities, calendar, trace_flag, exclude_from_file, exclude_from_processing, report_name);\n scheduler = new Scheduler(scheduler_name, baudRate, entities, results, alg, data_sets[set], total_gridlet[set], suff, windows, result_collector, sel_alg);\n } catch (Exception ex) {\n Logger.getLogger(ExperimentSetup.class.getName()).log(Level.SEVERE, null, ex);\n }\n // this will set up the proper algorithm according to the algorithms[] list\n if (alg == 0) {\n policy = new FCFS(scheduler);\n suff = \"FCFS\";\n }\n if (alg == 1) {\n policy = new EDF(scheduler);\n suff = \"EDF\";\n }\n if (alg == 2) {\n policy = new EASY_Backfilling(scheduler);\n // fixed version of EASY Backfilling\n suff = \"EASY\";\n }\n if (alg == 4) {\n policy = new CONS(scheduler);\n use_compresion = true;\n suff = \"CONS+compression\";\n }\n // do not use PBS-PRO on other than \"metacentrum.mwf\" data - not enough information is available.\n if (alg == 5) {\n policy = new PBS_PRO(scheduler);\n suff = \"PBS-PRO\";\n }\n\n if (alg == 10) {\n policy = new BestGap(scheduler);\n suff = \"BestGap\";\n }\n if (alg == 11) {\n suff = \"BestGap+RandSearch(\" + multiplicator + \")\";\n policy = new BestGap(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n\n if (alg == 19) {\n suff = \"CONS+LS(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new GapSearch();\n\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 20) {\n suff = \"CONS+RandSearch(\" + multiplicator + \")\";\n policy = new CONS(scheduler);\n opt_alg = new RandomSearch();\n if (useEventOpt) {\n fix_alg = new GapSearch();\n suff += \"-EventOptLS\";\n }\n }\n if (alg == 21) {\n suff = \"CONS-no-compress\";\n policy = new CONS(scheduler);\n if (useEventOpt) {\n fix_alg = new GapSearch();\n // instead of compression, use LS-based optimization on early job completion\n suff += \"-EventOptLS\";\n }\n }\n\n System.out.println(\"Now scheduling \" + total_gridlet[set] + \" jobs by: \" + suff + \", using \" + data_sets[set] + \" data set.\");\n\n suff += \"@\" + data_sets[set];\n\n // this cycle may be used when some modifications of one data set are required in multiple runs of Alea 3.0 over same data-set.\n for (int pass_count = 1; pass_count <= experiment_count; pass_count++) {\n\n try {\n // creates entities\n String job_loader_name = data_sets[set] + \"_JobLoader\";\n String failure_loader_name = data_sets[set] + \"_FailureLoader\";\n\n // creates all grid resources\n MachineLoader m_loader = new MachineLoader(10000, 3.0, data_sets[set]);\n rnd_seed = sel_alg;\n\n // creates 1 scheduler\n\n JobLoader job_loader = new JobLoader(job_loader_name, baudRate, total_gridlet[set], data_sets[set], maxPE, minPErating, maxPErating,\n multiplier, pass_count, m_loader.total_CPUs, estimates);\n if (failures) {\n FailureLoaderNew failure = new FailureLoaderNew(failure_loader_name, baudRate, data_sets[set], clusterNames, machineNames, 0);\n }\n // start the simulation\n System.out.println(\"Starting the Alea 3.0\");\n GridSim.startGridSimulation();\n } catch (Exception e) {\n System.out.println(\"Unwanted errors happened!\");\n System.out.println(e.getMessage());\n e.printStackTrace();\n System.out.println(\"Usage: java Test [time | space] [1-8]\");\n }\n\n System.out.println(\"=============== END OF TEST \" + pass_count + \" ====================\");\n // reset inner variables of the simulator\n Scheduler.load = 0.0;\n Scheduler.classic_load = 0.0;\n Scheduler.max_load = 0.0;\n Scheduler.classic_activePEs = 0.0;\n Scheduler.classic_availPEs = 0.0;\n Scheduler.activePEs = 0.0;\n Scheduler.availPEs = 0.0;\n Scheduler.requestedPEs = 0.0;\n Scheduler.last_event = 0.0;\n Scheduler.start_event = -10.0;\n Scheduler.runtime = 0.0;\n\n // reset internal SimJava variables to start new experiment with different job/gridlet setup\n Sim_system.setInComplete(true);\n // store results\n result_collector.generateResults(suff, experiment_count);\n result_collector.reset();\n results.clear();\n System.out.println(\"Max. estim has been used = \" + max_estim);\n System.gc();\n }\n }\n }\n // end of the whole simulation\n }", "TabbelPane() {\r\n\t\t\tpanelDB = new JPanelCluster(\"mine\", new EventFromDb());\r\n\t\t\tpanelFile = new JPanelCluster(\"store from file\", new EventFromFile());\r\n\t\t\tImageIcon icon = new ImageIcon(\"database.png\");\r\n\t\t\tImage image = icon.getImage();\r\n\t\t\tImage newimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"DB\", icon, panelDB);\r\n\t\t\ticon = new ImageIcon(\"file.png\");\r\n\t\t\timage = icon.getImage();\r\n\t\t\tnewimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"file\", icon, panelFile);\r\n\t\t\tsetVisible(true);\r\n\t\t}", "public static void main(final String... args) throws Exception {\n\n // create the ImageJ application context with all available services\n final ImageJ ij = new ImageJ();\n Prefs.blackBackground = true;\n ij.command().run(MapOrganelle.class, true);\n\n boolean runTest1 = false;\n boolean runTest2 = false;\n\n if ( runTest1 || runTest2 ) {\n\n //String testInDir = \"/data1/FMP_Docs/Projects/orgaPosJ_ME/Plugin_InputTest/\";\n String testInDir = \"/home/schmiedc/Desktop/Test/test_tif/input/\";\n //String testInDir = \"/data1/FMP_Docs/Projects/orgaPosJ_ME/TestDataSet_2ndChannel/\";\n String testOutDir = \"/home/schmiedc/Desktop/Test/test_tif/output/\";\n //int channelNumber = 4;\n String fileEnding = \".tif\";\n //String fileEnding = \".nd2\";\n String settings = \"/home/schmiedc/Desktop/Test/test_tif/input/2020-10-09T121957-settings.xml\";\n\n if ( runTest1 ) {\n\n FileList getFileList = new FileList(fileEnding);\n ArrayList<String> fileList = getFileList.getFileMultiSeriesList(testInDir);\n\n for (String file : fileList) {\n System.out.println(file);\n }\n\n ArrayList<String> fileListTest = new ArrayList<>(fileList.subList(0, 1));\n\n IJ.log(\"Run test 1\");\n //PreviewGui guiTest = new PreviewGui(testInDir, testOutDir, fileListTest, fileEnding, 3, 0.157);\n //guiTest.setUpGui();\n\n IJ.log(\"Test 1 done\");\n\n } else {\n IJ.log(\"Run test 2\");\n InputGuiFiji guiTest = new InputGuiFiji(testInDir, testOutDir, fileEnding, settings);\n guiTest.createWindow();\n\n //BatchProcessor processBatch = new BatchProcessor(testInDir, testOutDir, fileListTest, fileEnding, channelNumber);\n //processBatch.processImage();\n\n }\n\n }\n }", "@Override\r\n\tpublic void getExternal(){\r\n\t\tnng = new TNZNetworkNodeGraph_IuR();\r\n\t\tnng.setImgName(IMG_FNAME);\r\n\t\tnng.populate();\r\n\t\tnng.display();\r\n\t}", "public static void main(String[] args) {\n // Read the image.\n PlanarImage image = JAI.create(\"fileload\", \"Image/miko.jpg\");\n\n // Create one histogram with 256 bins.\n ParameterBlock pb1 = new ParameterBlock();\n pb1.addSource(image);\n pb1.add(null); // The ROI\n pb1.add(1);\n pb1.add(1); // Sampling\n pb1.add(new int[] {256}); // Bins\n pb1.add(new double[] {0});\n pb1.add(new double[] {256}); // Range for inclusion\n PlanarImage dummyImage1 = JAI.create(\"histogram\", pb1);\n // Gets the histogram.\n javax.media.jai.Histogram histo1 = (javax.media.jai.Histogram) dummyImage1.\n getProperty(\"histogram\");\n\n // Show those histograms in a GUI application. Set some parameters on the\n // DisplayHistogram components to adjust the\n JFrame f = new JFrame(\"Histograms\");\n DisplayHistogram dh1 = new DisplayHistogram(histo1, \"256 bins\");\n dh1.setBinWidth(2);\n dh1.setHeight(160);\n dh1.setIndexMultiplier(1);\n\n f.getContentPane().setLayout(new GridLayout(1, 1));\n f.getContentPane().add(dh1);\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n f.pack();\n f.setVisible(true);\n }", "public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(Color.BLACK);\n\t\tframe.setBackground(Color.WHITE);\n\t\tframe.setBounds(0,0,1600,850);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\t\n\n\t\t/*class graphers extends JFrame {\n\n\t\t\tpublic void paint(Graphics g){\n\t\t\t\tg.setColor(Color.RED);\n\t\t\t\tg.drawLine(0, 0, 500, 500);\n\t\t\t}\n\t\t}\n\t\tgraphers gr = new graphers();\n frame.add(gr);*/\n\t\t\n\n\t\tString[] filename = {\"Laser.png\",\"Modulator.png\",\"Fibre_link.png\",\"Link.png\",\"Mirror.png\",\"aom.png\",\"mix.png\",\"pd.png\",\"fs.png\"};\n Icon[] pics = {new ImageIcon(getClass().getResource(filename[0])),\n new ImageIcon(getClass().getResource(filename[1])),\n new ImageIcon(getClass().getResource(filename[2])),\n new ImageIcon(getClass().getResource(filename[3])),\n new ImageIcon(getClass().getResource(filename[4])),\n \t\t\t\t new ImageIcon(getClass().getResource(filename[5])),\n \t\t\t\t new ImageIcon(getClass().getResource(filename[6])),\n \t\t\t\t new ImageIcon(getClass().getResource(filename[7])),\n \t\t\t\t new ImageIcon(getClass().getResource(filename[8]))};\n\t\t\n\t\t\n\t\t\n\t\tJComboBox comboBox = new JComboBox();\n\t\tcomboBox.setBounds(31, 28, 297, 39);\n\t\tframe.getContentPane().add(comboBox);\n\t\tcomboBox.addItem(\"Laser\");\n\t\tcomboBox.addItem(\"Modulator\");\n\t\tcomboBox.addItem(\"Fibre_link\");\n\t\tcomboBox.addItem(\"Link\");\n\t\tcomboBox.addItem(\"Mirror\");\n\t\tcomboBox.addItem(\"aom\");\n\t\tcomboBox.addItem(\"mix\");\n\t\tcomboBox.addItem(\"photo_detector\");\n\t\tcomboBox.addItem(\"frequency_selector\");\n\t\t\n\t \n\t\t\n\t\tlblNewLabel = new JLabel(\"\");\n\t\tlblNewLabel.setForeground(Color.BLACK);\n\t\tlblNewLabel.setBackground(Color.WHITE);\n\t\tlblNewLabel.setBounds(coX, coY, 225, 75);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\t\n\t\tScrollbar scrollbar = new Scrollbar();\n\t\tscrollbar.setBounds(1569, 10, 17, 853);\n\t\tframe.getContentPane().add(scrollbar);\n\t\t\n\t\tJLabel lblFrequency = new JLabel(\"Frequency:\");\n\t\tlblFrequency.setForeground(Color.WHITE);\n\t\tlblFrequency.setBounds(31, 195, 65, 14);\n\t\tframe.getContentPane().add(lblFrequency);\n\t\t\n\t\tJLabel lblPower = new JLabel(\"Power:\");\n\t\tlblPower.setForeground(Color.WHITE);\n\t\tlblPower.setBounds(31, 231, 46, 14);\n\t\tframe.getContentPane().add(lblPower);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setBounds(113, 189, 86, 20);\n\t\tframe.getContentPane().add(textField);\n\t\ttextField.setColumns(10);\n\t\t\n\t\ttextField_1 = new JTextField();\n\t\ttextField_1.setBounds(113, 225, 86, 20);\n\t\tframe.getContentPane().add(textField_1);\n\t\ttextField_1.setColumns(10);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n \n newLabel = new JLabel(\"\");\n\t\tnewLabel.setForeground(Color.BLACK);\n\t\tnewLabel.setBackground(Color.WHITE);\n\t\tnewLabel.setBounds(coX, coY, 225, 75);\n\t\tframe.getContentPane().add(newLabel);\n\t\t\n\t\tlblNewLabel.addMouseListener(new MouseAdapter()\n {\n @Override\n public void mousePressed(MouseEvent e) {\n //catching the current values for x,y coordinates on screen\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }\n });\n\t\t\n\t\tJLabel linkcomp = new JLabel(\"\");\n\t\tlinkcomp.setForeground(Color.WHITE);\n\t\tlinkcomp.setBackground(Color.BLACK);\n\t\tlinkcomp.setBounds(113, 299, 75, 75);\n\t\tframe.getContentPane().add(linkcomp);\n\t\tlinkcomp.setIcon(pics[3]);\n\t\t\n\t\tJLabel newlink = new JLabel(\"New Link\");\n\t\tnewlink.setForeground(Color.WHITE);\n\t\tnewlink.setBounds(31, 305, 65, 20);\n\t\tframe.getContentPane().add(newlink);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif(Mouse.getEventButton() != -1 && (113 < x_pressed && 188 < x_pressed) && (299 < y_pressed && 374 < y_pressed))\n\t\t\tif(Mouse.isButtonDown(0))\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\n\t\t\n \n \n comboBox.addItemListener(\n new ItemListener(){\n public void itemStateChanged(ItemEvent event){\n if(event.getStateChange()==ItemEvent.SELECTED){\n lblNewLabel.setIcon(pics[comboBox.getSelectedIndex()]);\n }\n \n \n }\n }\n );\n \n comboBox.addItemListener(\n new ItemListener(){\n public void itemStateChanged(ItemEvent event){\n if(event.getStateChange()==ItemEvent.SELECTED)\n newLabel.setIcon(pics[comboBox.getSelectedIndex()]);\n \n \n }\n }\n );\n \n\t\t\n \n \n \n lblNewLabel.addMouseListener(new MouseAdapter()\n {\n @Override\n public void mousePressed(MouseEvent e) {\n //catching the current values for x,y coordinates on screen\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }\n });\n \n newLabel.addMouseListener(new MouseAdapter()\n {\n @Override\n public void mousePressed(MouseEvent e) {\n //catching the current values for x,y coordinates on screen\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }\n });\n\n lblNewLabel.addMouseMotionListener(new MouseMotionAdapter(){\n @Override\n public void mouseDragged(MouseEvent e){\n //and when lblNewLabel is dragged\n lblNewLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }\n }\n );\n \n newLabel.addMouseMotionListener(new MouseMotionAdapter(){\n @Override\n public void mouseDragged(MouseEvent e){\n //and when lblNewLabel is dragged\n newLabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }\n }\n );\n \n lblNewLabel.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseReleased(MouseEvent r){\n \tx_released = r.getX();\n \ty_released = r.getY();\n //and when lblNewLabel is released\n \tlblNewLabel.setLocation(r.getXOnScreen() - x_pressed, r.getYOnScreen() - y_pressed);\n \n }\n }\n );\n String[] names = new String[501];\n for(int i = 1; i<=500; i++){\n \tnames[i] = \"label\"+i+\"s\";\n \tJLabel newerlabel = new JLabel(names[i]);\n \t\tnewerlabel.setForeground(Color.BLACK);\n \t\tnewerlabel.setBackground(Color.WHITE);\n \t\tnewerlabel.setBounds(coX, coY, 225, 75);\n \t\tframe.getContentPane().add(newerlabel);\n \t\t\n \t\tcomboBox.addItemListener(\n new ItemListener(){\n public void itemStateChanged(ItemEvent event){\n if(event.getStateChange()==ItemEvent.SELECTED)\n newerlabel.setIcon(pics[comboBox.getSelectedIndex()]);\n \n \n }\n }\n );\n \t\t\n \t\tnewerlabel.addMouseListener(new MouseAdapter()\n {\n @Override\n public void mousePressed(MouseEvent e) {\n //catching the current values for x,y coordinates on screen\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }\n });\n \t\t\n \t\tnewerlabel.addMouseMotionListener(new MouseMotionAdapter(){\n @Override\n public void mouseDragged(MouseEvent e){\n //and when lblNewLabel is dragged\n newerlabel.setLocation(e.getXOnScreen() - x_pressed, e.getYOnScreen() - y_pressed);\n \n }\n }\n );\n \t\t\n \t\tnewerlabel.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseReleased(MouseEvent r){\n \tx_released = r.getX();\n \ty_released = r.getY();\n //and when lblNewLabel is released\n \tnewerlabel.setLocation(r.getXOnScreen() - x_pressed, r.getYOnScreen() - y_pressed);\n \n }\n }\n );\n\n \t\t\n }\n \n \n \n newLabel.addMouseListener(new MouseAdapter(){\n @Override\n public void mouseReleased(MouseEvent r){\n \tx_released = r.getX();\n \ty_released = r.getY();\n //and when lblNewLabel is released\n \tnewLabel.setLocation(r.getXOnScreen() - x_pressed, r.getYOnScreen() - y_pressed);\n \n }\n }\n );\n \n for(int i = 1; i <=16 ; i++)\n\t for(int j = 1; j<=11; j++)\n\t {\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setBackground(Color.BLACK);\n\t\tpanel.setBorder(new LineBorder(Color.GREEN, 2));\n\t\tpanel.setBounds(338, 28, 75*i, 75*j);\n\t\tframe.getContentPane().add(panel);\n\t }\n \n \n \n \n\t\t\t\n \n\n\t\t\t}", "private void drawGraph() {\n // you can show warning messages now\n imrGuiBean.showWarningMessages(true);\n addGraphPanel();\n setButtonsEnable(true);\n }", "public static void main(String[] args) {\n String dataDir = Utils.getDataDir(ParticularDWGToImage.class) + \"DWGDrawings/\";\n String sourceFilePath = dataDir + \"visualization_-_conference_room.dwg\";\n\n CadImage cadImage = ((CadImage)(Image.load(sourceFilePath)));\n\n CadBaseEntity[] entities = cadImage.getEntities();\n \n List<CadBaseEntity> filteredEntities = new ArrayList<CadBaseEntity>();\n for (CadBaseEntity baseEntity : entities) {\n // selection or filtration of entities\n if ((baseEntity.getTypeName() == CadEntityTypeName.TEXT)) {\n filteredEntities.add(baseEntity);\n }\n\n }\n \n CadBaseEntity[] arr = new CadBaseEntity[filteredEntities.size()];\n cadImage.setEntities(filteredEntities.toArray(arr));\n // Create an instance of CadRasterizationOptions and set its various properties\n CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();\n rasterizationOptions.setPageWidth(1600);\n rasterizationOptions.setPageHeight(1600);\n // Set Auto Layout Scaling\n rasterizationOptions.setAutomaticLayoutsScaling(true);\n // Create an instance of PdfOptions\n PdfOptions pdfOptions = new PdfOptions();\n // Set the VectorRasterizationOptions property\n pdfOptions.setVectorRasterizationOptions(rasterizationOptions);\n String outFile = dataDir + \"result_out_generated.pdf\";\n // Export the CAD to PDF\n cadImage.save(outFile, pdfOptions);\n //ExEnd:ParticularDWGToImage\n }", "public static void main(String[] args) throws Exception {\n Mapper mapper = new Mapper() {\n @Override\n public double f(double x, double y) {\n return 10 * Math.sin(x / 10) * Math.cos(y / 20) * x;\n }\n };\n\n // Define range and precision for the function to plot\n Range range = new Range(-150, 150);\n int steps = 50;\n\n // Create the object to represent the function over the given range.\n final Shape surface =\n new SurfaceBuilder().orthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(),\n surface.getBounds().getZmax(), new Color(1, 1, 1, .5f)));\n surface.setFaceDisplayed(true);\n surface.setWireframeDisplayed(true);\n surface.setWireframeColor(Color.BLACK);\n\n // Create a chart and add surface\n \n AWTChartFactory f = new DepthPeelingChartFactory(new DepthPeelingPainterFactory());\n Chart chart = f.newChart(Quality.Advanced().setAlphaActivated(false));\n\n chart.getScene().getGraph().add(surface);\n \n chart.getScene().getGraph().setStrategy(null);\n \n // depth peeling shaders do not mix correctly with 2.0.1 TextRenderer\n chart.getView().getAxis().setTextRenderer(new TextBitmapRenderer());\n\n\n // Setup a colorbar\n AWTColorbarLegend cbar = new AWTColorbarLegend(surface, chart.getView().getAxis().getLayout());\n cbar.setMinimumDimension(new Dimension(100, 600));\n //surface.setLegend(cbar);\n \n chart.open();\n chart.getMouse();\n\n ChartLauncher.openChart(chart);\n }", "public Demo2(String searchname)\r\n {\r\n //树图正向\r\n //获取owl文件 解析成树图形式 这里是正向 \t\r\n \tOWLReGtreeConverter retreeConverter = new OWLReGtreeConverter(OWL_FILE,true, searchname,\"tree\");\r\n \t//得到树类型对象rmgree\r\n \trm_gtree =retreeConverter.getGraph();\r\n \t//得到display对象rgtreeDisp\r\n \tGraphDisplay2 rgtreeDisp = new GraphDisplay2(rm_gtree, GRAPH_DISTANCE_FILTER,rm_gtree.getFocusindex(),1,\"\");\r\n \t//得到panel\r\n \tm_rgtreePanel = new GraphPanel2(rgtreeDisp, LEGEND, HOPS_CONTROL_WIDGET);\r\n// \t//树反向图\r\n// \tOWLGraphConverter treeConverter = new OWLGraphConverter(OWL_FILE, true,searchname,\"tree\");\r\n// \tm_gtree =treeConverter.getGraph();\r\n// GraphDisplay2 gtreeDisp = new GraphDisplay2(m_gtree, GRAPH_DISTANCE_FILTER,m_gtree.getFocusindex(),1,\"backward\");\r\n// m_gtreePanel = new GraphPanel2(gtreeDisp, LEGEND, HOPS_CONTROL_WIDGET);\r\n////网络图反向\r\n// OWLGraphConverter graphConverter = new OWLGraphConverter(OWL_FILE, true,searchname,\"graph\");\r\n// m_graph = graphConverter.getGraph();\r\n// GraphDisplay graphDisp = new GraphDisplay(m_graph, GRAPH_DISTANCE_FILTER,m_graph.getFocusindex(),0,\"backward\");\r\n// m_graphPanel = new GraphPanel(graphDisp, LEGEND, HOPS_CONTROL_WIDGET);\r\n// //网络图正向\r\n// \tOWLReGtreeConverter regraphConverter = new OWLReGtreeConverter(OWL_FILE,true, searchname,\"graph\");\r\n// rm_graph = regraphConverter.getGraph();\r\n// GraphDisplay rgraphDisp = new GraphDisplay(rm_graph, GRAPH_DISTANCE_FILTER,rm_graph.getFocusindex(),0,\"\");\r\n// rm_graphPanel = new GraphPanel(rgraphDisp, LEGEND, HOPS_CONTROL_WIDGET);\r\n // Create the tabbed pane which contains the the home tab, the tree tabs\r\n // and the graph tabs.\r\n //添加applet菜单\r\n\r\n m_tabbedPane = new JTabbedPane();\r\n \r\n //定义按钮graph以及tree的说明 快捷键Alt+G\r\n m_tabbedPane.addTab(\"正向树图\", m_rgtreePanel);\r\n m_tabbedPane.setToolTipTextAt(0, \"正向树图..\");\r\n m_tabbedPane.setMnemonicAt(0, KeyEvent.VK_R);\r\n \r\n// //定义按钮tree以及tree的说明 快捷键Alt+T\r\n// m_tabbedPane.addTab(\"反向树图\", m_gtreePanel);\r\n// m_tabbedPane.setToolTipTextAt(1, \"反向树图..\");\r\n// m_tabbedPane.setMnemonicAt(1, KeyEvent.VK_T);\r\n////// //定义按钮home以及home的说明 快捷键Alt+H\r\n// m_tabbedPane.addTab(\"反向网图\", m_graphPanel);\r\n// m_tabbedPane.setToolTipTextAt(2, \"反向网图..\");\r\n// m_tabbedPane.setMnemonicAt(2, KeyEvent.VK_H);\r\n// \r\n// m_tabbedPane.addTab(\"正向网图\", rm_graphPanel);\r\n// m_tabbedPane.setToolTipTextAt(3, \"正向网图..\");\r\n// m_tabbedPane.setMnemonicAt(3, KeyEvent.VK_H);\r\n \r\n // Create the frame which shows the application.\r\n //为图像展示创建框架\r\n m_frame = new JFrame(\"OWL2Prefuse v1.2 | Demo application\");\r\n m_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n // m_frame.setJMenuBar(getMenuBar());\r\n m_frame.add(m_tabbedPane);\r\n m_frame.pack();\r\n m_frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n m_frame.setVisible(true);\r\n \r\n // Create the file chooser.\r\n m_fc = new JFileChooser();\r\n }", "public void run(String[] args) {\n if (args.length == 0){\n System.out.println(\"Not enough parameters!\");\n System.out.println(\"Program Arguments: [image_path]\");\n System.exit(-1);\n }\n\n // Load the image\n Mat src = Imgcodecs.imread(args[0]);\n\n // Check if image is loaded fine\n if( src.empty() ) {\n System.out.println(\"Error opening image: \" + args[0]);\n System.exit(-1);\n }\n\n // Show source image\n HighGui.imshow(\"src\", src);\n //! [load_image]\n\n //! [gray]\n // Transform source image to gray if it is not already\n Mat gray = new Mat();\n\n if (src.channels() == 3)\n {\n Imgproc.cvtColor(src, gray, Imgproc.COLOR_BGR2GRAY);\n }\n else\n {\n gray = src;\n }\n\n // Show gray image\n showWaitDestroy(\"gray\" , gray);\n //! [gray]\n\n //! [bin]\n // Apply adaptiveThreshold at the bitwise_not of gray\n Mat bw = new Mat();\n Core.bitwise_not(gray, gray);\n Imgproc.adaptiveThreshold(gray, bw, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 15, -2);\n\n // Show binary image\n showWaitDestroy(\"binary\" , bw);\n //! [bin]\n\n //! [init]\n // Create the images that will use to extract the horizontal and vertical lines\n Mat horizontal = bw.clone();\n Mat vertical = bw.clone();\n //! [init]\n\n //! [horiz]\n // Specify size on horizontal axis\n int horizontal_size = horizontal.cols() / 30;\n\n // Create structure element for extracting horizontal lines through morphology operations\n Mat horizontalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size(horizontal_size,1));\n\n // Apply morphology operations\n Imgproc.erode(horizontal, horizontal, horizontalStructure);\n Imgproc.dilate(horizontal, horizontal, horizontalStructure);\n\n // Show extracted horizontal lines\n showWaitDestroy(\"horizontal\" , horizontal);\n //! [horiz]\n\n //! [vert]\n // Specify size on vertical axis\n int vertical_size = vertical.rows() / 30;\n\n // Create structure element for extracting vertical lines through morphology operations\n Mat verticalStructure = Imgproc.getStructuringElement(Imgproc.MORPH_RECT, new Size( 1,vertical_size));\n\n // Apply morphology operations\n Imgproc.erode(vertical, vertical, verticalStructure);\n Imgproc.dilate(vertical, vertical, verticalStructure);\n\n // Show extracted vertical lines\n showWaitDestroy(\"vertical\", vertical);\n //! [vert]\n\n //! [smooth]\n // Inverse vertical image\n Core.bitwise_not(vertical, vertical);\n showWaitDestroy(\"vertical_bit\" , vertical);\n\n // Extract edges and smooth image according to the logic\n // 1. extract edges\n // 2. dilate(edges)\n // 3. src.copyTo(smooth)\n // 4. blur smooth img\n // 5. smooth.copyTo(src, edges)\n\n // Step 1\n Mat edges = new Mat();\n Imgproc.adaptiveThreshold(vertical, edges, 255, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, 3, -2);\n showWaitDestroy(\"edges\", edges);\n\n // Step 2\n Mat kernel = Mat.ones(2, 2, CvType.CV_8UC1);\n Imgproc.dilate(edges, edges, kernel);\n showWaitDestroy(\"dilate\", edges);\n\n // Step 3\n Mat smooth = new Mat();\n vertical.copyTo(smooth);\n\n // Step 4\n Imgproc.blur(smooth, smooth, new Size(2, 2));\n\n // Step 5\n smooth.copyTo(vertical, edges);\n\n // Show final result\n showWaitDestroy(\"smooth - final\", vertical);\n //! [smooth]\n\n System.exit(0);\n }", "public void start() {\n\t\tString test = \".test\";\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(test);\n\t\t\tfos.write(2);\n\t\t\tfos.close();\n\t\t} \n\t\tcatch (Throwable e){\n\t\t\tJOptionPane.showMessageDialog(frame,\"Please run from a directory that has file-write access.\\n\",\"Write-Protected Directory\",JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tdoCommandLine();\n\t\tif (scriptRenderFrames > 0){\n\t\t\tPRESETUP = true;\n\t\t}\n\t\twhile (!PRESETUP){\n\t\t\tPRESETUP = true;\n\t\t\t//Show a dialog with options for RUN_MODE\n\t\t\tString [] optionsStr = { \n\t\t\t\t\t\"Run DGraph\", \n\t\t\t\t\t\"Utility: Sequence list -> Fasta\", \n\t\t\t\t\t\"Utility: Fasta -> Sequence List\", \n\t\t\t\t\t\"Utility: Remove Duplicates from Sequence List\", \n\t\t\t\t\t\"Utility: Fasta -> List of headers\",\n\t\t\t\t\t\"Utility: Clustalw output -> Alignment score distance matrix. Note: Copy+paste whole clustalw output, especially 'pairwise alignment' section\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: sliding window approach\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: assume pre-aligned sequences\",\n\t\t\t\t\t\"Utility: DNA Fasta -> DNA Sequence Similarity matrix\",\n\t\t\t\t\t\"Utility: Find all pairs of aligned peptides in a list with PD Score under a threshold\",\n\t\t\t\t\t\"Utility: Jalview all pairwise sequeqnce alignments output -> Parwise alignment score list\",\n\t\t\t\t\t\"Utility: Reorder fasta sequences to match another file\",\n\t\t\t\t\t\"Utility: Fasta -> Line-numbered sequence headers\",\n\t\t\t};\n\t\t\tJRadioButton [] options = new JRadioButton[optionsStr.length];\n\t\t\tButtonGroup group = new ButtonGroup();\n\t\t\tJPanel pane = new JPanel();\n\t\t\tpane.setLayout(new GridLayout(0,1));\n\t\t\tfor(int k = 0; k < optionsStr.length;k++){\n\t\t\t\toptions[k] = new JRadioButton (optionsStr[k]);\n\t\t\t\tgroup.add(options[k]);\n\t\t\t\tpane.add(options[k]);\n\t\t\t}\n\t\t\toptions[0].setSelected(true);\n\n\t\t\tFrame holder = new Frame(\"DGraph - Initializing.\");\n\t\t\tholder.setSize(200,100);\n\t\t\tholder.setLocationRelativeTo(null);\n\t\t\tholder.setVisible(true);\n\t\t\tboolean shouldRun = JOptionPane.showOptionDialog(\n\t\t\t\t\tholder,\n\t\t\t\t\tpane,\n\t\t\t\t\t\"Select operation\",\n\t\t\t\t\tJOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE,null,null,null) == JOptionPane.OK_OPTION;\n\t\t\tif (!shouldRun) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tholder.setVisible(false);\n\n\t\t\tint choice = 0;\n\t\t\tfor(int k = 0; k < options.length; k++){\n\t\t\t\tif (options[k].isSelected()){\n\t\t\t\t\tchoice = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tRUN_MODE = choice-1; //0=-1\n\t\t\t\n\t\t\tif (RUN_MODE != -1){\n\t\t\t\trunUtility(RUN_MODE);\n\t\t\t\t//Go again.\n\t\t\t\tPRESETUP = false;\n\t\t\t}\n\t\t}\n\n\t\theadless = false;\n\t\t//Now do PApplet's start to get things rolling.\n\t\tsuper.start();\n\t}", "public static void main(String[] args) throws IOException {\n AdjListGraph adjListGraph = null;\r\n AdjMatrixGraph adjMatGraph = null;\r\n AdjMatrixMoreEfficientGraph adjEffGraph = null;\r\n \r\n // Create object for input sequence according to the file name\r\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n System.out.print(\"Enter input filename: \");\r\n String filename = br.readLine();\r\n \r\n // Inserting data to each graph, pay attention to different path representation for ubuntu and windows\r\n In inputFile = new In(\"data/\" + filename);\r\n adjListGraph = new AdjListGraph(inputFile);\r\n inputFile = new In(\"data/\" + filename);\r\n adjMatGraph = new AdjMatrixGraph(inputFile);\r\n inputFile = new In(\"data/\" + filename);\r\n adjEffGraph = new AdjMatrixMoreEfficientGraph(inputFile);\r\n \r\n /*\r\n * Step 2\r\n * get the size of graph of each representation\r\n * AdjListGraph.java: adj\r\n * AdjMatrixGraph.java: adj\r\n\t\t * Please use adjListGraph.sizeOfGraph() to get the memory usage of the graph with list implementation. \r\n\t\t * Please use adjMatGraph.sizeOfGraph() to get the memory usage of the graph with matrix implementation. \r\n */\r\n \r\n // Output every required data from all versions\r\n System.out.format(\"1. Number of vertices = %d \\n\", adjListGraph.V());\r\n System.out.format(\"2. Number of edges = %d \\n\", adjListGraph.E());\r\n System.out.format(\"3. Output of the graph using adjacency list:\\n\");\r\n //adjListGraph.printGraph();\r\n System.out.format(\"4. Adjacency list\\n (a) Memory needed to record edges = %d\\n\", adjListGraph.E() * Size.INTEGER);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjListGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjListGraph.E() * Size.INTEGER / adjListGraph.sizeOfGraph());\r\n System.out.format(\"5. Output of the graph using matrix:\\n\");\r\n //adjMatGraph.printGraph();\r\n System.out.format(\"6. Adjacency matrix\\n (a) Memory needed to record edges = %d\\n\", adjMatGraph.E() * Size.BOOLEAN);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjMatGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjMatGraph.E() * Size.BOOLEAN / adjMatGraph.sizeOfGraph());\r\n //adjEffGraph.printGraph();\r\n System.out.format(\"Additional task: Efficient Adjacency matrix\\n (a) Memory needed to record edges = %d\\n\", adjEffGraph.E() * Size.BOOLEAN);\r\n System.out.format(\" (b) Total amount of memory used = %d\\n\", adjEffGraph.sizeOfGraph());\r\n System.out.format(\" (c) Efficiency = %f\\n\", 100.0 * adjEffGraph.E() * Size.BOOLEAN / adjEffGraph.sizeOfGraph());\r\n }", "public PGMN_Precipitation(final String title) {\n super(title);\n try{\n // Open the file that is the first \n // command line parameter\n FileInputStream fstream = new FileInputStream(\"Y:\\\\PGMN\\\\Precipitation\\\\1.txt\");\n // Get the object of DataInputStream\n DataInputStream in = new DataInputStream(fstream);\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n String strLine;\n //Read File Line By Line\n int i = 0;\n while ((strLine = br.readLine()) != null) {\n //System.out.println(strLine.length());\n if((strLine.length() < 45)||(strLine.length() > 46)){\n continue;\n }\n if(!strLine.contains(\"csv\")){\n continue;\n }\n \n String wellId = strLine.substring(39, strLine.length()-4);\n System.out.println(wellId);\n //Double depth = (Double)hm.get(wellId);\n String lang = \"EN\";\n final XYDataset dataset = createDataset(wellId, lang);\n final JFreeChart chart = createChart(dataset, wellId, lang);\n XYPlot xyplot = (XYPlot)chart.getPlot();\n XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer)xyplot.getRenderer();\n renderer.setSeriesPaint(0, Color.blue);\n try {\n ChartUtilities.saveChartAsPNG(new File(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + lang + \"\\\\\" + wellId + \".png\"), chart, 400, 300);\n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n \n lang = \"FR\";\n final XYDataset dataset_fr = createDataset(wellId, lang);\n final JFreeChart chart_fr = createChart(dataset_fr, wellId, lang);\n XYPlot xyplot_fr = (XYPlot)chart_fr.getPlot();\n XYLineAndShapeRenderer renderer_fr = (XYLineAndShapeRenderer)xyplot_fr.getRenderer();\n renderer_fr.setSeriesPaint(0, Color.blue);\n try {\n ChartUtilities.saveChartAsPNG(new File(\"Y:\\\\PGMN\\\\Precipitation\\\\\" + lang + \"\\\\\" + wellId + \".png\"), chart_fr, 400, 300);\n }\n catch (Exception e) {\n System.err.println(e.getMessage());\n }\n i++;\n }\n //Close the input stream\n in.close();\n }catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }", "public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }", "public static void main(String[] args) throws MalformedURLException, Exception {\n int maxPopulationSize = 35000;\r\n\r\n\r\n // set to true in order to make server wait for at least 1 client, for instance viewer client\r\n boolean waitForClients = false;\r\n\r\n // END: CUSTOMIZE -------------------------------------------------\r\n\r\n // open server port for clients to connect to\r\n SimulationServer.INSTANCE.startAcceptingNonBlocking();\r\n SimulationServer.INSTANCE.setWaitForClients(waitForClients);\r\n\r\n DvrpConfigGroup dvrpConfigGroup = new DvrpConfigGroup();\r\n dvrpConfigGroup.setTravelTimeEstimationAlpha(0.05);\r\n\r\n File configFile = new File(args[0]);\r\n //Config config = ConfigUtils.loadConfig(configFile.toString(), new AVConfigGroup(), dvrpConfigGroup);\r\n Config config = ConfigUtils.loadConfig(configFile.toString(), new AVConfigGroup(), dvrpConfigGroup, new BlackListedTimeAllocationMutatorConfigGroup());\r\n Scenario scenario = ScenarioUtils.loadScenario(config);\r\n final Population population = scenario.getPopulation();\r\n MatsimStaticDatabase.initializeSingletonInstance( //\r\n scenario.getNetwork(), ReferenceFrame.IDENTITY);\r\n \r\n \r\n// // admissible Nodes sebhoerl\r\n// final Network network = scenario.getNetwork();\r\n// \r\n// FileInputStream stream = new FileInputStream(ConfigGroup.getInputFileURL(config.getContext(), \"nodes.list\").getPath());\r\n// BufferedReader reader = new BufferedReader(new InputStreamReader(stream));\r\n//\r\n// final Set<Node> permissibleNodes = new HashSet<>();\r\n// final Set<Link> permissibleLinks = new HashSet<>();\r\n//\r\n// reader.lines().forEach((String nodeId) -> permissibleNodes.add(network.getNodes().get(Id.createNodeId(nodeId))) );\r\n// permissibleNodes.forEach((Node node) -> permissibleLinks.addAll(node.getOutLinks().values()));\r\n// permissibleNodes.forEach((Node node) -> permissibleLinks.addAll(node.getInLinks().values()));\r\n// final Set<Link> filteredPermissibleLinks = permissibleLinks.stream().filter((l) -> l.getAllowedModes().contains(\"car\")).collect(Collectors.toSet());\r\n \r\n \r\n TheApocalypse.decimatesThe(population).toNoMoreThan(maxPopulationSize).people();\r\n Controler controler = new Controler(scenario);\r\n controler.addOverridingModule(VrpTravelTimeModules.createTravelTimeEstimatorModule(0.05));\r\n controler.addOverridingModule(new DynQSimModule<>(AVQSimProvider.class));\r\n controler.addOverridingModule(new AVModule());\r\n controler.addOverridingModule(new DatabaseModule()); // added only to listen to iteration counter\r\n controler.addOverridingModule(new BlackListedTimeAllocationMutatorStrategyModule());\r\n controler.addOverridingModule(new AVTravelTimeModule());\r\n \r\n \r\n// controler.addOverridingModule(new AbstractModule() {\r\n// @Override\r\n// public void install() {\r\n// bind(new TypeLiteral<Collection<Link>>() {}).annotatedWith(Names.named(\"zurich\")).toInstance(filteredPermissibleLinks);\r\n// //AVUtils.registerDispatcherFactory(binder(), \"ZurichDispatcher\", ZurichDispatcher.ZurichDispatcherFactory.class);\r\n// AVUtils.registerGeneratorFactory(binder(), \"ZurichGenerator\", ZurichGenerator.ZurichGeneratorFactory.class);\r\n//\r\n// addPlanStrategyBinding(\"ZurichModeChoice\").toProvider(ZurichPlanStrategyProvider.class);\r\n// }\r\n// });\r\n \r\n \r\n controler.run();\r\n \r\n SimulationServer.INSTANCE.stopAccepting(); // close port\r\n\r\n AnalyzeAll.analyze(args);\r\n //AnalyzeMarc.analyze(args);\r\n }", "private void createGraph() {\r\n graph = new Graph(SHELL, SWT.NONE);\r\n\r\n final GridData gridData = new GridData();\r\n gridData.horizontalAlignment = GridData.FILL;\r\n gridData.verticalAlignment = GridData.FILL;\r\n gridData.grabExcessHorizontalSpace = true;\r\n gridData.grabExcessVerticalSpace = true;\r\n gridData.heightHint = DEFAULT_GRAPH_SIZE;\r\n gridData.widthHint = DEFAULT_GRAPH_SIZE;\r\n graph.setLayoutData(gridData);\r\n }", "public void setNewGraph() {\n\tresetHints();\r\n Random random = new Random();\r\n if (graphMode == 1) {\r\n if (selectedSize == 1) {\r\n currentGraph = chromaticManager.calculate(random.nextInt(myInformation.smallGraph) + 1, -1);\r\n }\r\n if (selectedSize == 2) {\r\n currentGraph = chromaticManager.calculate(random.nextInt(myInformation.middleGraph - myInformation.smallGraph) + myInformation.smallGraph + 1, -1);\r\n }\r\n if (selectedSize == 3) {\r\n currentGraph = chromaticManager.calculate(random.nextInt(myInformation.bigGraph - myInformation.middleGraph) + myInformation.middleGraph + 1, -1);\r\n }\r\n }\r\n if (graphMode == 2) {\r\n currentGraph = chromaticManager.calculate(myGraph);\r\n }\r\n if (graphMode == 3) {\r\n try {\r\n stackPane.getChildren().removeAll(textFieldHBox, backPane);\r\n myVertices = Integer.parseInt(textFieldVertices.getText());\r\n myEdges = Integer.parseInt(textFieldEdges.getText());\r\n currentGraph = chromaticManager.calculate(myVertices, myEdges);\r\n setDisplay(currentGraph);\r\n } catch (NumberFormatException e) {\r\n\r\n }\r\n }\r\n threadPoolExecutor.execute(() -> {\r\n NewForce newForce = new NewForce();\r\n currentGraph.setCNumer(newForce.doNewForce(currentGraph,currentGraph.getUpperBound(),currentGraph.getLowerBound()));\r\n });\r\n }", "public ProcessingTarget buildGraph(){\n \t\tgetTibbrGraph();\n \n \t\t//Init a project - and therefore a workspace\n \t\tProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n \t\tpc.newProject();\n \t\tWorkspace workspace = pc.getCurrentWorkspace();\n \n \t\t//Get a graph model - it exists because we have a workspace\n \t\tGraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();\n \t\tAttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n \t\tImportController importController = Lookup.getDefault().lookup(ImportController.class);\n \n \t\t//Import file \n \t\tContainer container;\n \t\ttry {\n \t\t\tFile f = new File(this.filename);\n \t\t\tcontainer = importController.importFile(f);\n \t\t\tcontainer.getLoader().setEdgeDefault(EdgeDefault.DIRECTED); //Force DIRECTED\n \t\t container.setAllowAutoNode(false); //Don't create missing nodes\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \n \t\t//Append imported data to GraphAPI\n \t\timportController.process(container, new DefaultProcessor(), workspace);\n \n \t\t//See if graph is well imported\n \t\t//DirectedGraph graph = graphModel.getDirectedGraph();\n \t\t//---------------------------\n \n \t\t//Layout for 1 minute\n \t\tAutoLayout autoLayout = new AutoLayout(5, TimeUnit.SECONDS);\n \t\tautoLayout.setGraphModel(graphModel);\n \t\t//YifanHuLayout firstLayout = new YifanHuLayout(null, new StepDisplacement(1f));\n \t\tForceAtlasLayout secondLayout = new ForceAtlasLayout(null);\n \t\tAutoLayout.DynamicProperty adjustBySizeProperty = AutoLayout.createDynamicProperty(\"forceAtlas.adjustSizes.name\", Boolean.TRUE, 0.1f);//True after 10% of layout time\n \t\tAutoLayout.DynamicProperty repulsionProperty = AutoLayout.createDynamicProperty(\"forceAtlas.repulsionStrength.name\", new Double(10000.), 0f);//500 for the complete period\n \t\t//autoLayout.addLayout( firstLayout, 0.5f );\n \t\tautoLayout.addLayout(secondLayout, 1f, new AutoLayout.DynamicProperty[]{adjustBySizeProperty, repulsionProperty});\n \t\tautoLayout.execute();\n \n \n \n \n \n \t\t//Rank color by Degree\n \t\tRankingController rankingController = Lookup.getDefault().lookup(RankingController.class);\n\t\tRanking<?> degreeRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, Ranking.DEGREE_RANKING);\n\t\tAbstractColorTransformer<?> colorTransformer = (AbstractColorTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_COLOR);\n \n \t\tcolorTransformer.setColors(new Color[]{new Color(0xFEF0D9), new Color(0xB30000)});\n \t\trankingController.transform(degreeRanking,colorTransformer);\n \n \t\t//Get Centrality\n \t\tGraphDistance distance = new GraphDistance();\n \t\tdistance.setDirected(true);\n \t\tdistance.execute(graphModel, attributeModel);\n \n \t\t//Rank size by centrality\n \t\tAttributeColumn centralityColumn = attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);\n\t\tRanking<?> centralityRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> sizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_SIZE);\n \t\tsizeTransformer.setMinSize(3);\n \t\tsizeTransformer.setMaxSize(20);\n \t\trankingController.transform(centralityRanking,sizeTransformer);\n \n \t\t//Rank label size - set a multiplier size\n\t\tRanking<?> centralityRanking2 = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> labelSizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.LABEL_SIZE);\n \t\tlabelSizeTransformer.setMinSize(1);\n \t\tlabelSizeTransformer.setMaxSize(3);\n \t\trankingController.transform(centralityRanking2,labelSizeTransformer);\n \n \t\tfloat[] positions = {0f,0.33f,0.66f,1f};\n \t\tcolorTransformer.setColorPositions(positions);\n \t\tColor[] colors = new Color[]{new Color(0x0000FF), new Color(0xFFFFFF),new Color(0x00FF00),new Color(0xFF0000)};\n \t\tcolorTransformer.setColors(colors);\n \n \t\t\n \t\t//---------------------------------\n \t\t//Preview configuration\n \t\tPreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);\n \t\tPreviewModel previewModel = previewController.getModel();\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.DIRECTED, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.BACKGROUND_COLOR, Color.BLACK);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.NODE_LABEL_COLOR, new DependantOriginalColor(Color.YELLOW));\n \t\t\n \t\t\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_CURVED, Boolean.TRUE);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_OPACITY, 100);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_RADIUS, 1f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,0.2f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.ARROW_SIZE,0.2f);\n \n \t\tpreviewController.refreshPreview();\n \n \t\t//----------------------------\n \n \t\t//New Processing target, get the PApplet\n \t\tProcessingTarget target = (ProcessingTarget) previewController.getRenderTarget(RenderTarget.PROCESSING_TARGET);\n \t\t\n \t\tPApplet applet = target.getApplet();\n \t\tapplet.init();\n \n \t\t// Add .1 second delay to fix stability issue - per Gephi forums\n try {\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (InterruptedException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \n \t\t\n \t\t//Refresh the preview and reset the zoom\n \t\tpreviewController.render(target);\n \t\ttarget.refresh();\n \t\ttarget.resetZoom();\n \t\ttarget.zoomMinus();\n \t\ttarget.zoomMinus();\n \t\t\n \t\treturn target;\n \t\t\n \n \t}", "public static void main(String[] args) {\n\t\tString filename = \"Input/WG1.txt\";\n\t\t//String filename = \"Input/WG2.txt\";\n\t\tdouble teleportationFactor = 0.95;\n\t\tWebGraph webGraph = new WebGraph(filename, teleportationFactor);\n\t\twebGraph.constructGraph();\n\t}", "private void drawImage(Graphics g) {\n ProxyModel proxyModel = ProxyModel.instance();\n ClassLoader cl = this.getClass().getClassLoader();\n Graphics2D g2d = (Graphics2D) g;\n InputStream url = cl.getResourceAsStream(\"title.png\");\n BufferedImage img = null;\n\n try {\n img = ImageIO.read(url);\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n Font font = new Font(\"Serif\", Font.PLAIN, 24);\n g2d.drawImage(img, 0, 0, 600, 600, null);\n g2d.setColor(new Color(20, 20, 20));\n g2d.setFont(font);\n g2d.drawString(\"SANTORINI BOARD GAME GUI SIMULATION\", 15, 640);\n\n /*\n g2d.drawImage(img, 0, 0, 600, 600, null);\n JTextField textField = new JTextField(\"Nickname\",20);\n textField.setFont(font);\n this.add(textField);\n\n */\n\n }", "public static void main(String[] args) {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n GraphicsDevice gd = ge.getDefaultScreenDevice();\n\n //If translucent windows aren't supported, exit.\n if (!gd.isWindowTranslucencySupported(PERPIXEL_TRANSLUCENT)) {\n System.err.println(\"Per-pixel translucency is not supported\");\n System.exit(ERR_STATUS_TRANSPARENCY);\n }\n\n SynthLookAndFeel ginjLookAndFeel = new GinjSynthLookAndFeel();\n try {\n ginjLookAndFeel.load(Ginj.class.getResourceAsStream(LAF_XML), Ginj.class);\n UIManager.setLookAndFeel(ginjLookAndFeel);\n// UIManager.setLookAndFeel(EaSynthLookAndFeel.class.getName());\n// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n }\n catch (Exception e) {\n System.err.println(\"Error loading Ginj look and feel\");\n e.printStackTrace();\n System.exit(ERR_STATUS_LAF);\n }\n\n Prefs.load();\n\n // Creating a JFileChooser can take time if you have network drives. So start loading one now, in a separate thread...\n // TODO check if this is really effective...\n futureFileChooser = new FutureTask<>(JFileChooser::new);\n ExecutorService executor = Executors.newSingleThreadExecutor();\n executor.execute(futureFileChooser);\n\n javax.swing.SwingUtilities.invokeLater(() -> {\n starWindow = new StarWindow();\n starWindow.setVisible(true);});\n\n }", "public static void main(String args[]) {\n try {\n for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n javax.swing.UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n } catch (ClassNotFoundException ex) {\n java.util.logging.Logger.getLogger(Reporte5_vista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (InstantiationException ex) {\n java.util.logging.Logger.getLogger(Reporte5_vista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (IllegalAccessException ex) {\n java.util.logging.Logger.getLogger(Reporte5_vista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n } catch (javax.swing.UnsupportedLookAndFeelException ex) {\n java.util.logging.Logger.getLogger(Reporte5_vista.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\n }\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n //</editor-fold>\n\n /* Create and display the form */\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n new Reporte5_vista().setVisible(true);\n }\n });\n }", "public Visualize() {\n initComponents();\n \n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\tPattern.setSize(400, 600); \n\t\tfinal int nbMaxPat = 6;\n\t\t\n\t\t//list types images\n\t\tList<TypeImage> tImages = new ArrayList<>();\n\t\ttImages.add(new TypeImage(1, 130, 56, 562));\n\t\ttImages.add(new TypeImage(0, 240, 30, 246));\n\t\ttImages.add(new TypeImage(2, 140, 22, 1000));\n\t\ttImages.add(new TypeImage(3, 90, 23, 3498));\t\n\t\t\n\t\t//trier les images\n\t\tList<TypeImage> tempListTi = new ArrayList<TypeImage>(tImages);\n\t\tList<TypeImage> tit = new ArrayList<TypeImage>();\n\t\twhile (tit.size() <= tImages.size())\n\t\t{\n\t\t\tif (tempListTi.size() == 0) break;\n\t\t\t\n\t\t\tTypeImage bigest = tempListTi.get(0);\n\t\t\tfor (TypeImage ti : tempListTi)\n\t\t\t\tif (bigest.getSurface() < ti.getSurface())\n\t\t\t\t\tbigest = ti;\n\t\t\t\n\t\t\ttempListTi.remove(bigest);\n\t\t\ttit.add(bigest);\n\t\t}\n\t\t\n\t\tSolution s = new GenerateRandomSolution(tit).generate(nbMaxPat);\n\t\t\n\t\tJFrame frame = new Affichage(s,new Dimension((int)Pattern.getWidth(),(int)Pattern.getHeight()));\n\t\taffiche(frame);\n\t\tSystem.out.println(s);\n\t}", "public static void main( String[] args ) {\n\n infile = \"/home/daniele/Jgrassworkspace/trentino/provaPitfiller/cell/testDem\";\n\n // outfile = \"/home/moovida/grass/grassdb/flangitest/prova/cell/writetest\";\n\n // to test with svnrepo dataset uncomment the following and supply the\n // root folder\n // String jaiTestFolder =\n // \"/home/moovida/rcpdevelopment/WORKSPACES/eclipseGanimede/jai_tests/\";\n // infile = jaiTestFolder + File.separator + \"spearfish/PERMANENT/cell/elevation.dem\";\n // outfile = jaiTestFolder + File.separator + \"spearfish/PERMANENT/cell/writetest\";\n new DisplayImage(infile);\n }", "public void showGrid(Vector<int[]> predictionList) \n{\n int width=1000, height=600;\n//System.out.println(\"I am here\");\n\t//readChartData();\n\t//f.pack();\n\t//Demo2D.setSize(new Dimension(width, height));\n //f.setSize(new Dimension(width, height));\n //f.setVisible(true);\n\t//BufferedImage bi=(BufferedImage)Demo2D.createImage(width, height);\n\tBufferedImage bi=ImgFactory.getImg(width, height); //new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);\n\tGraphics g=bi.getGraphics();\n\t//paint(g);\n\t//Demo2D.paint(g);\n\t//int i=0;\n\t//if (myQuotes.size() <1) return;\n\t\n\tGraphics2D g2 = (Graphics2D) g;\n \t//BufferedImage toDraw=buildImgBuf(new Dimension(width, height));\n\tboolean ok=drawGrid(g2, new Dimension(width, height), predictionList);\n\t//if (toDraw == null) return false;\n\tg2.setBackground(Color.white);\n\t\n\tg2.drawImage(bi, null, 0, 0);\n\t\n\tg2.getBackground();\n \n\tg2.drawImage(bi, null, 0, 0);\n\t\n\tString dFF=\"PossibleHits\";\n\tFile myPredic=new File(dFF+\".png\");\n\ttry {\n\t\tImageIO.write(bi, \"png\", myPredic);\n\t} catch (IOException e){return ;}\n\t\t\n\t\n\t\n\t\tFile myDup=new File(dFF+\"_2.png\");\n\t\tFile myOld=new File(dFF+\"Old.png\");\n\t\tif (myOld.exists()) myOld.delete();\n\t\tif (myDup.exists() && !myOld.exists()) myDup.renameTo(myOld);\n\t\tmyPredic.renameTo(myDup);\n\t\n}", "public static void main(String[] args){\n\tImage test = new Image(700,700);\n\t//addRectangle(test, 0, 0, 600, 600, -1, -1, -1);\n\t//test.display();\n\taddCircle(test, 300, 300, 100, 255, 255, 255);\n\taddCircle(test, 500, 300, 100, 255, 255, 255);\n\taddCircle(test, 400, 400, 150, 255, 255, 255);\n\taddCircle(test, 350, 350, 25, 0, 0, 0);\n\taddCircle(test, 450, 350, 25, 0, 0, 0);\n\taddCircle(test, 350, 350, 24, 255, 255, 255);\n\taddCircle(test, 450, 350, 24, 255, 255, 255);\n\taddCircle(test, 350, 350, 10, 0, 0, 0);\n\taddCircle(test, 450, 350, 10, 0, 0, 0);\n\taddRectangle(test, 325, 475, 150, 20, 0, 0, 0);\n\ttest.setPixel(0,0,255,255,255);\n\ttest.display();\n\tencrypt(test, \"PerfektDokumentation\");\n\ttest.display();\n\tdecrypt(test, \"PerfektDokumentation\");\n\t\n\ttest.display();\n\t}", "public void showGraphInSwingWindow() {\n GraphModel model = new DefaultGraphModel();\n JGraph graph = new JGraph(model);\n // Control-drag should clone selection\n graph.setCloneable(true);\n\n // Enable edit without final RETURN keystroke\n graph.setInvokesStopCellEditing(true);\n\n // When over a cell, jump to its default port (we only have one, anyway)\n graph.setJumpToDefaultPort(true);\n\n // Insert all three cells in one call, so we need an array to store them\n List<DefaultGraphCell> cellsList = new ArrayList<DefaultGraphCell>();\n Map<String, Integer> conformityMap = new HashMap<String, Integer>();\n\n\n // Create vertex\n int vertexNumber = 0;\n for (String loopVertex : undirectedGraph.keySet()) {\n cellsList.add(createVertex(loopVertex, 40 * (vertexNumber + 1) + 20 * ((vertexNumber + 1) % 2),\n 20 * (vertexNumber + 2) + 50 * ((vertexNumber + 1) % 2), 80, 20, null, false));\n conformityMap.put(loopVertex, vertexNumber);\n vertexNumber++;\n }\n\n int firstVertexNumber;\n int secondVertexNumber;\n for (String loopVertex : undirectedGraph.keySet()) {\n\n firstVertexNumber = conformityMap.get(loopVertex);\n for (String loopCorrespondingVertex : undirectedGraph.get(loopVertex)) {\n secondVertexNumber = conformityMap.get(loopCorrespondingVertex);\n if (secondVertexNumber <= firstVertexNumber) {\n continue;\n }\n // Create Edge\n DefaultEdge edge = new DefaultEdge();\n // Fetch the ports from the new vertices, and connect them with the edge\n edge.setSource(cellsList.get(firstVertexNumber).getChildAt(0));\n edge.setTarget(cellsList.get(secondVertexNumber).getChildAt(0));\n cellsList.add(edge);\n int arrow = GraphConstants.ARROW_SIMPLE;\n GraphConstants.setLineEnd(edge.getAttributes(), arrow);\n GraphConstants.setEndFill(edge.getAttributes(), true);\n }\n }\n\n\n // Set Arrow Style for edge\n// int arrow = GraphConstants.ARROW_NONE;\n// GraphConstants.setLineEnd(edge.getAttributes(), arrow);\n// GraphConstants.setEndFill(edge.getAttributes(), true);\n\n // Insert the cells via the cache, so they get selected\n\n DefaultGraphCell[] cells = new DefaultGraphCell[cellsList.size()];\n for (int i = 0; i < cellsList.size(); i++) {\n cells[i] = cellsList.get(i);\n }\n graph.getGraphLayoutCache().insert(cells);\n\n // Show in Frame\n JFrame frame = new JFrame();\n frame.getContentPane().add(new JScrollPane(graph));\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.pack();\n frame.setVisible(true);\n }", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n if(e.getSource().equals(b1)){\n String str = tf1.getText();\n CreateGraph mt = new CreateGraph();\n mt.choice(1, str);\n mt.start(mt.nodes, mt.bt);\n //JLabel展示本地图片\n jl.setText(\"<html><img src='file:///C:/Users/fanghui/Desktop/GraphTest/out.gif'/></html>\");\n SwingUtilities.updateComponentTreeUI (this);\n }\n else if(e.getSource().equals(b2)){\n String str = tf2.getText();\n CreateGraph mt = new CreateGraph();\n mt.choice(2, str);\n mt.start(mt.nodes, mt.bt);\n //JLabel展示本地图片\n jl.setText(\"<html><img src='file:///C:/Users/fanghui/Desktop/GraphTest/out.gif'/></html>\");\n //刷新JLabel\n SwingUtilities.updateComponentTreeUI (this);\n }\n else if(e.getSource().equals(b3)){\n String str = tf3.getText();\n CreateGraph mt = new CreateGraph();\n mt.choice(3, str);\n mt.start(mt.nodes, mt.bt);\n //JLabel展示本地图片\n jl.setText(\"<html><img src='file:///C:/Users/fanghui/Desktop/GraphTest/out.gif'/></html>\");\n SwingUtilities.updateComponentTreeUI (this);\n }\n else if(e.getSource().equals(b4)){\n String str = tf4.getText();\n CreateGraph mt = new CreateGraph();\n mt.choice(4, str);\n mt.start(mt.nodes, mt.bt);\n //JLabel展示本地图片\n jl.setText(\"<html><img src='file:///C:/Users/fanghui/Desktop/GraphTest/out.gif'/></html>\");\n SwingUtilities.updateComponentTreeUI (this);\n }\n }", "public static void main(String[] args) {\n MyImageVector.Double img = new MyImageVector.Double(new Loader().loadSVGDocument(\"D:\\\\sample_images_PA\\\\trash_test_mem\\\\images_de_test_pr_figure_assistant\\\\test_scaling_SVG.svg\"));\n //MyImage2D img = new MyImage2D.Double(0, 0, \"D:\\\\sample_images_PA\\\\trash_test_mem\\\\mini\\\\focused_Series010.png\");\n img.addAssociatedObject(new MyRectangle2D.Double(10, 10, 128, 256));\n img.addAssociatedObject(new MyRectangle2D.Double(200, 20, 256, 256));\n img.addAssociatedObject(new MyRectangle2D.Double(100, 10, 256, 128));\n MyPoint2D.Double text = new MyPoint2D.Double(220, 220);\n text.setText(new ColoredTextPaneSerializable(new StyledDoc2Html().reparse(\"<i>test<i>\"), \"\"));\n img.addAssociatedObject(text);\n CheckLineArts iopane = new CheckLineArts(img, 1.5f, true);\n if (!iopane.noError) {\n int result = JOptionPane.showOptionDialog(null, new Object[]{iopane}, \"Check stroke width of line arts\", JOptionPane.CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[]{\"Accept automated solution\", \"Ignore\"}, null);\n if (result == JOptionPane.OK_OPTION) {\n //--> replace objects with copy\n Object strokeData = iopane.getModifiedStrokeData();\n if (strokeData instanceof ArrayList) {\n img.setAssociatedObjects(((ArrayList<Object>) strokeData));\n// for (Object string : img.getAssociatedObjects()) {\n// if (string instanceof PARoi) {\n// System.out.println(((PARoi) string).getStrokeSize());\n// }\n// }\n } else if (strokeData instanceof String) {\n ((MyImageVector) img).setSvg_content_serializable((String) strokeData);\n ((MyImageVector) img).reloadDocFromString();\n }\n }\n }\n System.exit(0);\n }", "public void createGraph() {\n System.out.println(\"The overlay graph will be created from scratch\");\n graph = new MatrixOverlayGraph();\n parse(dumpPath);\n saveGraph();\n graph.createSupporters(kdTreeSupporterActived);\n saveSupporters();\n }", "public static void main(String[] args) {\n\t\tWebDriver driver;\n\t\t\n\t\t System.setProperty(\"webdriver.gecko.driver\",\n\t\"C:\\\\Users\\\\dell\\\\Downloads\\\\Compressed\\\\geckodriver-v0.20.1-win64_2\\\\geckodriver.exe\");\n\t\t \n\t\t driver=new FirefoxDriver();\n\t\t \n\t\t driver.get(\"https://www.google.com\");\n\t\t \n\t\t ScreenShot(driver,\"c://test.png\");\n\t\t \n\t}", "public static void main(String[] args) {\n\t\tint loop = 20;\n\t\tloop = loop - 4; // remove initial Point\n\t\t\n\t\tdouble dt = 0.25;\n\t\tdouble K = 0.3;\n\n\t\tKuramotoNetWork_Manage nm = new KuramotoNetWork_Manage(loop, size, dt, K);\n\t\t\n\t\tfor(int i = 0; i < loop; i++) {\n\t\t\tnm.addNewNode();\n\t\t}\n\n\t\t\n//\t\tWriteWire ww = new WriteWire();\n//\t\tww.write(path, nm.getAllNode());\n\t\t\n\t\tJFrame frame = new JFrame();\n\t\tframe.setTitle(\"DataPlot\");\n\t\tframe.setSize(size, size);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\tKuramoto_DataPlot dp = new Kuramoto_DataPlot(nm);\n//\t\tdp.drawBANode(nm.getAllNode());\n\t\t\n\t\tdp.setVisible(true);\n\t\tdp.repaint();\n\t\t\n\t\tframe.getContentPane().add(dp);\n\t\tframe.setVisible(true);\n\t\t\n\t\tSystem.out.println(\"fin\");\n\t}", "private void setUpGraph() {\n \tString title;\n\t\ttry {\n\t\t\ttitle = util.readTextFile(new File(UI.UITEXT_DIRECTORY)).get(GRAPHTITLE_DEX);\n\t\t\taCS = new AreaChartSample(cellStateNames,title);\n\t\t} catch (FileNotFoundException e) {\n\t\t\taCS = new AreaChartSample(cellStateNames, \"ERROR ON TITLE\");\n\t\t}\n\t\troot.getChildren().add(aCS.getAreaChart());\n \tplot();\n }", "public static void main(String[] ignore)\r\n/* 128: */ {\r\n/* 129:103 */ Spider spider = new Spider();\r\n/* 130:104 */ double[] constant1 = { 1.0D, 0.1D, 0.3D, 0.5D, 0.7D, 0.9D };\r\n/* 131:105 */ double[] constant2 = { 1.0D, 0.2D, 0.4D, 0.6D, 0.8D, 1.0D };\r\n/* 132:106 */ spider.setData(constant1);\r\n/* 133:107 */ JFrame frame = new JFrame();\r\n/* 134:108 */ frame.getContentPane().add(spider);\r\n/* 135:109 */ frame.setBounds(100, 100, 500, 700);\r\n/* 136:110 */ frame.addWindowListener(new WindowAdapter()\r\n/* 137: */ {\r\n/* 138: */ public void windowClosing(WindowEvent e)\r\n/* 139: */ {\r\n/* 140:112 */ System.exit(0);\r\n/* 141: */ }\r\n/* 142:114 */ });\r\n/* 143:115 */ spider.setData(constant2);\r\n/* 144:116 */ spider.setDataColor(Color.RED);\r\n/* 145:117 */ spider.setAreaColor(Color.LIGHT_GRAY);\r\n/* 146:118 */ frame.show();\r\n/* 147:119 */ spider.setConnectDots(true);\r\n/* 148:120 */ spider.setFillArea(true);\r\n/* 149: */ }", "public JavFx() {\n JFrame frame = new JFrame(\"FX\");\n Dimension dm = new Dimension(850, 630);\n\n frame.getContentPane().setLayout(null);\n\n final JTextArea url = new JTextArea(); //a field for entering an url addresses\n url.setToolTipText(\"Example: google.com\");\n\n final JButton jButton = new JButton(\"Dataset\");\n final JButton jLoad = new JButton(\"Load\");\n\n JMenuBar jmb = new JMenuBar();\n JMenu jm = new JMenu(\"File\");\n JMenuItem rec = new JMenuItem(\"Learn\");\n\n JMenuItem setting = new JMenuItem(\"Settings\");\n\n JPanel paramsPane = new JPanel();\n JPanel settingPane = new JPanel();\n settingPane.setLayout(new BoxLayout(settingPane,BoxLayout.Y_AXIS));\n\n final Checkbox ck = new Checkbox(\"Draw the facial rectangles within the window (Haar)\");\n final Checkbox eigenCheck = new Checkbox(\"Eigenfaces recognition\");\n final Checkbox AFRCheck = new Checkbox(\"AnnotatorFaceRecogniser KNN\");\n final Checkbox fisherCheck = new Checkbox(\"Fisherfaces recognition + KEFaceDetector\");\n\n final JTextField threshold = new JTextField(3);\n threshold.setToolTipText(\"Threshold for EigenFaces\");\n threshold.setText(\"Threashold\");\n\n //overriding of paintComponent() method for drawing operations in window\n fxPanel = new JFXPanel() {\n @Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n w = getWidth();\n h = getHeight();\n g2D = (Graphics2D) g;\n g2D.setPaint(Color.RED);\n g2D.setStroke(bsk);\n if (faces != null && ifInside) {\n\n int bounderer = 0;\n\n for (DetectedFace face : faces) {\n if (face.getConfidence() < 8.0f) continue;\n x = Math.round(face.getBounds().x);\n y = Math.round(face.getBounds().y);\n buf = \"\" + face.getConfidence();\n width = Math.round(face.getBounds().width);\n height = Math.round(face.getBounds().height);\n g.drawString(buf, x + 10, y - 10);\n g.drawRect(x, y, width, height);\n\n thrName = Thread.currentThread().getName();\n\n if (namesAwt != null && !thrName.equals(\"firstWorker\") && !thrName.equals(\"secondWorker\")) {\n\n if (bounderer < namesAwt.size()) {\n if (!namesAwt.get(bounderer).isEmpty()) {\n g.drawString(namesAwt.get(bounderer), x + 40, y - 10);\n bounderer++;\n }\n }\n if (bounderer == namesAwt.size()) bounderer = 0;\n }\n }\n }\n if(kefaces != null){\n int bounderer = 0;\n\n for (KEDetectedFace face : kefaces) {\n if (face.getConfidence() < 8.0f) continue;\n x = Math.round(face.getBounds().x);\n y = Math.round(face.getBounds().y);\n buf = \"\" + face.getConfidence();\n width = Math.round(face.getBounds().width);\n height = Math.round(face.getBounds().height);\n g.drawString(buf, x + 10, y - 10);\n g.drawRect(x, y, width, height);\n\n thrName = Thread.currentThread().getName();\n\n if (namesAwt != null && !thrName.equals(\"firstWorker\") && !thrName.equals(\"secondWorker\")) {\n\n if (bounderer < namesAwt.size()) {\n if (!namesAwt.get(bounderer).isEmpty()) {\n g.drawString(namesAwt.get(bounderer), x + 40, y - 10);\n bounderer++;\n }\n }\n if (bounderer == namesAwt.size()) bounderer = 0;\n }\n }\n }\n }\n };\n\n Platform.runLater(() -> { //runs long-running process for making images and facial detecting\n MixedProcess process = new MixedProcess();\n try {\n process.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n\n Platform.runLater(() -> { //runs second long-running process for making images and performing recognition\n LongRunProcess process2 = new LongRunProcess();\n try {\n process2.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n\n //\n frame.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n Platform.runLater(new Runnable() { //closes frame consisting initFX and set the WebView to null\n @Override\n public void run() {\n webView.getEngine().load(null);\n frame.setVisible(false);\n }\n });\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n //allows us to change a loaded page by pushing the jLoad button\n jLoad.addActionListener(e -> {\n Platform.runLater(() -> {\n if (!url.getText().equals(\"\"))\n webView.getEngine().load(\"http:\\\\\\\\\" + url.getText());\n });\n });\n\n jButton.addActionListener(e -> { //Execute some JS code by pushing button\n Platform.runLater(() -> {\n if(!(JOptionPane.showConfirmDialog(null,\"Are you sure?\",\"Datasets handling\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE) == JOptionPane.OK_OPTION))\n return;\n if(dataset == null && KNN_dataset == null && training == null) {\n JOptionPane.showMessageDialog(null, \"Please train any algorithm first!\", \"Prompt\", JOptionPane.WARNING_MESSAGE);\n return;\n }\n if(dataset != null && method == 3)\n if(!dataset.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Method: Fisherfaces + KEFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},dataset.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = dataset.getGroups().iterator();\n for (int i = 0; i < dataset.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(dataset.getRandomInstance(buff).getFacePatch())),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n dataset = null;\n fisherCheck.setState(false);\n fisher_recogniser = null;\n ck.setState(false);\n kefaces = null;\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n\n if(KNN_dataset != null && method == 2)\n if(!KNN_dataset.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Method: KNNAnnotator + HaarFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},KNN_dataset.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = KNN_dataset.getGroups().iterator();\n for (int i = 0; i < KNN_dataset.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(KNN_dataset.getRandomInstance(buff).getFacePatch())),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n KNN_dataset = null;\n AFRCheck.setState(false);\n recogniser = null;\n ck.setState(false);\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n\n if(training != null && method == 1)\n if(!training.isEmpty()) {\n frame.setEnabled(false);\n JFrame jfr = new JFrame(\"Eigenfaces + HaarFaceDetection\");\n JLabel info = new JLabel(\"Training dataset:\",SwingConstants.CENTER);\n JButton erase = new JButton(\"Erase dataset\");\n DefaultTableModel model = new DefaultTableModel(new String[]{\"Facial name\",\"Image\"},training.keySet().size()){\n public Class getColumnClass(int column)\n {\n return getValueAt(0, column).getClass();\n }\n };\n\n Iterator<String> it = training.getGroups().iterator();\n for (int i = 0; i < training.keySet().size(); i++) {\n String buff = it.next();\n model.setValueAt(buff,i,0);\n //model.setValueAt(dataset.getRandomInstance(buff),i,1);\n model.setValueAt(new ImageIcon(ImageUtilities.createBufferedImage(training.getRandomInstance(buff))),i,1);\n }\n JTable table = new JTable(model);\n table.setPreferredScrollableViewportSize(table.getPreferredSize());\n table.setCellSelectionEnabled(false);\n table.setRowHeight(rows);\n JScrollPane jsp = new JScrollPane(table);\n jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);\n\n erase.addActionListener((e2)->{\n training = null;\n eigenCheck.setState(false);\n eigen = null;\n ck.setState(false);\n faces = null;\n names = null;\n namesAwt = null;\n model.setRowCount(0);\n table.revalidate();\n ifInside = false;\n });\n\n jfr.getContentPane().add(info,BorderLayout.NORTH);\n jfr.getContentPane().add(jsp,BorderLayout.CENTER);\n jfr.getContentPane().add(erase,BorderLayout.SOUTH);\n\n jfr.setSize(400,rows + 200);\n\n jfr.addWindowListener(new WindowListener() {\n @Override\n public void windowOpened(WindowEvent e) {\n\n }\n\n @Override\n public void windowClosing(WindowEvent e) {\n frame.setEnabled(true);\n }\n\n @Override\n public void windowClosed(WindowEvent e) {\n\n }\n\n @Override\n public void windowIconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeiconified(WindowEvent e) {\n\n }\n\n @Override\n public void windowActivated(WindowEvent e) {\n\n }\n\n @Override\n public void windowDeactivated(WindowEvent e) {\n\n }\n });\n\n jfr.setVisible(true);\n }\n /*\n CloseableHttpClient httpclient = HttpClients.createMinimal();\n HttpPost request = new HttpPost(\"http://bit.do/mod_perl/url-shortener.pl\");\n StringBody action = new StringBody(\"shorten\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody urlPost = new StringBody(\"http://opds.spbsut.ru/data/_uploaded/mu/vlss16mu_opentest.pdf\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url2Post = new StringBody(\" site2 \", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url_hash = new StringBody(\"\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody url_stats_is_private = new StringBody(\"0\", ContentType.APPLICATION_FORM_URLENCODED);\n StringBody permission = new StringBody(\"1555799293|i7daeiv0bj\", ContentType.APPLICATION_FORM_URLENCODED);\n\n MultipartEntityBuilder builder = MultipartEntityBuilder.create();\n builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);\n builder.addPart(\"action\", action);\n builder.addPart(\"url\", urlPost);\n builder.addPart(\"url2\", url2Post);\n builder.addPart(\"url_hash\", url_hash);\n builder.addPart(\"url_stats_is_private\", url_stats_is_private);\n builder.addPart(\"permasession\", permission);\n\n HttpEntity entity = builder.build();\n\n request.setEntity(entity);\n try {\n HttpResponse response = httpclient.execute(request);\n HttpEntity he = response.getEntity();\n InputStream in = new PushbackInputStream(he.getContent());\n\n byte[] buff = in.readAllBytes();\n if (buff.length == 0) System.out.println(\"SUCK!\");\n\n FileOutputStream fw = new FileOutputStream(new File(\"logger.txt\"));\n OutputStreamWriter osw = new OutputStreamWriter(fw, \"UTF-8\");\n osw.write(response.toString());\n osw.write(\"|-|\");\n fw.write(buff);\n\n //webView.getEngine().load(EntityUtils.toString(he, \"UTF-8\")); //почему то не работает\n osw.close();\n } catch (IOException ie) {\n ie.printStackTrace();\n }\n\n //some another JS Script\n /*CloseableHttpClient httpclient = HttpClients.createMinimal();\n /*\n HttpClient client = new HttpClient();\n HttpMethod method = new PostMethod(\"https://cabinet.sut.ru/raspisanie_all_new?type_z=1\");\n /\n HttpPost request = new HttpPost(\"https://cabinet.sut.ru/raspisanie_all_new?type_z=1\");\n StringBody faculty = new StringBody(\"50029\", ContentType.MULTIPART_FORM_DATA);\n StringBody kurs = new StringBody(\"4\", ContentType.MULTIPART_FORM_DATA);\n StringBody group = new StringBody(\"52543\", ContentType.MULTIPART_FORM_DATA);\n StringBody ok = new StringBody(\"Показать\", ContentType.MULTIPART_FORM_DATA);\n StringBody group_el = new StringBody(\"0\", ContentType.MULTIPART_FORM_DATA);\n\n MultipartEntityBuilder builder = MultipartEntityBuilder.create();\n builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);\n builder.addPart(\"faculty\",faculty);\n builder.addPart(\"kurs\",kurs);\n builder.addPart(\"group\",group);\n builder.addPart(\"ok\",ok);\n builder.addPart(\"group_el\",group_el);\n\n HttpEntity entity = builder.build();\n\n request.setEntity(entity);\n try {\n HttpResponse response = httpclient.execute(request);\n HttpEntity he = response.getEntity();\n webView.getEngine().load(EntityUtils.toString(he, \"UTF-8\")); //почему то не работает\n }catch (IOException ie){\n ie.printStackTrace();\n }\n }\n );\n */\n });\n });\n\n final JavaBridge bridge = new JavaBridge(); //allows us to get a console.log() method's results as System.out.println()\n\n bridge2 = bridge;\n\n ck.setState(false);\n ck.addItemListener(new ItemListener() {\n @Override\n public void itemStateChanged(ItemEvent e) {\n ifInside = !ifInside;\n }\n });\n\n eigenCheck.addItemListener(new ItemListener() { //prevents the use of several recognition methods concurrently\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(dataset == null) || !(KNN_dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n eigenCheck.setState(false);\n return;\n }\n method = 1;\n AFRCheck.setState(false);\n fisherCheck.setState(false);\n if(eigenCheck.getState() == false) method = 0;\n }\n });\n\n AFRCheck.addItemListener(new ItemListener() { //does the same as previous one\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(eigen == null) || !(dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n AFRCheck.setState(false);\n return;\n }\n method = 2;\n eigenCheck.setState(false);\n fisherCheck.setState(false);\n if(AFRCheck.getState() == false) method = 0;\n }\n });\n\n fisherCheck.addItemListener(new ItemListener() { //does the same as previous one\n @Override\n public void itemStateChanged(ItemEvent e) {\n if(!(eigen == null) || !(KNN_dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n fisherCheck.setState(false);\n return;\n }\n method = 3;\n eigenCheck.setState(false);\n AFRCheck.setState(false);\n if(fisherCheck.getState() == false) method = 0;\n }\n });\n\n fisherCheck.addItemListener((e)->{\n if(fisherCheck.getState() == true)\n JOptionPane.showMessageDialog(null,\n \"Please make sure you set the amount greater than 20 for this method.\\nRecognition won't be working until 3 faces get added to\",\n \"Warning\", JOptionPane.WARNING_MESSAGE);\n });\n\n //setting of the component placements and their sizes\n jButton.setSize(new Dimension(200, 27));\n jButton.setLocation(0, 0);\n url.setBounds(Math.round(jButton.getWidth()) + 5, 5, 300,\n url.getPreferredSize().height);\n jLoad.setBounds(url.getX() + url.getWidth() + 5, 0, 70, jButton.getHeight());\n\n fxPanel.setSize(dm);\n fxPanel.setLocation(new Point(0, jButton.getHeight()));\n\n //adding of the menu on the frame\n jm.add(setting);\n jm.add(rec);\n jmb.add(jm);\n frame.setJMenuBar(jmb);\n\n //settings in MessageDialog\n setting.addActionListener((e)->{\n settingPane.add(threshold);\n settingPane.add(ck);\n settingPane.add(eigenCheck);\n settingPane.add(AFRCheck);\n settingPane.add(fisherCheck);\n\n JOptionPane.showMessageDialog(null, settingPane,\"Settings\",JOptionPane.OK_OPTION);\n if(threshold.getText().isEmpty() || threshold.getText().equals(\"Threashold\")) {maxVecVal = 20; threshold.setText(\"\" + maxVecVal); return;}\n //else threshold.setText(threshold.getText());\n try {\n maxVecVal = Math.round(Double.parseDouble(threshold.getText()));\n }catch (NumberFormatException nfe){\n threshold.setText(\"20.0\");\n maxVecVal = 20;\n JOptionPane.showMessageDialog(null,\"Threshold was set in the wrong way and so set by default\");\n }\n });\n\n //starts learning operations for previously selected recognition method\n rec.addActionListener((e) -> {\n\n if(ck.getState() == false || (eigenCheck.getState() == false && AFRCheck.getState() == false && fisherCheck.getState() == false)){\n JOptionPane.showMessageDialog(null,\"You have to first select method and turn detection on!\",\"Warning\",JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n name.setText(\"Name:\");\n if(amnt == 0) amount.setText(\"Amount:\");\n\n paramsPane.add(name);\n\n if (!checking)\n for (Component cmp : paramsPane.getComponents())\n if (cmp == amount) {\n checking = true;\n paramsPane.remove(amount);\n }\n\n if(amount.getText().isEmpty() || amnt == 0) checking = false;\n\n if (!checking) paramsPane.add(amount);\n\n JOptionPane.showMessageDialog(null, paramsPane,\"Parameters\",JOptionPane.PLAIN_MESSAGE);\n if(!name.getText().isEmpty() && !amount.getText().isEmpty() && !name.getText().equals(\"Name:\") && method != 0) {\n try{\n Integer.parseInt(amount.getText());\n }catch(NumberFormatException nfe){\n checking = false;\n amount.setText(\"Amount:\");\n return;\n }\n rc = new Recognition();\n rc.execute();\n }\n\n });\n\n frame.add(jButton);\n frame.add(jLoad);\n frame.add(url);\n //frame.add(ck);\n frame.add(fxPanel);\n\n frame.setVisible(true);\n\n frame.getContentPane().setPreferredSize(dm);\n frame.pack();\n frame.setResizable(false);\n\n frame.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n Platform.runLater(new Runnable() { // this will run initFX as JavaFX-Thread\n @Override\n public void run() {\n initFX(fxPanel);\n }\n });\n }", "private static void createAndShowGUI() {\r\n\t\tString pathwayFile = System.getenv(\"PATHWAY_FILE\");\r\n\t\tString defaultsFile = System.getenv(\"DEFAULTS_FILE\");\r\n\r\n\t\tPathway path;\r\n\r\n\t\tif (defaultsFile == null) {\r\n\t\t\tpath = new Pathway(pathwayFile);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Using defaults file \" + defaultsFile);\r\n\t\t\tpath = new Pathway(pathwayFile, defaultsFile);\r\n\t\t}\r\n\r\n\t\t// Disable boldface controls.\r\n\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\r\n\t\t// Create and set up the window.\r\n\t\tJFrame frame = new JFrame(\"Pathway Simulator\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Create and set up the content pane.\r\n\t\tSimPanel newContentPane = new SimPanel(path);\r\n\t\tnewContentPane.setOpaque(true); // content panes must be opaque\r\n\t\tframe.setContentPane(newContentPane);\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public RoutingResourceGraph() {\n ex = new RunGraph(3,2);\n squares = new JLabel[ex.getGraphSize()][ex.getGraphSize()];\n squares_sinks = new JLabel[ex.getGraphSize()][ex.getGraphSize()];\n squares_wires = new JLabel[2 * ex.getGraphSize() * ex.getGraphSize()][ex.getWireSize()];\n switches = new JToggleButton[ex.getGraphSize()][ex.getGraphSize()];\n ex.initialize();\n initComponents();\n initialize();\n add_edge();\n ex.find_shortest_path();\n showCong();\n showGraph();\n }", "private static void createGUI(LinkedList<Visualizator> windows) {\n\n LinkedList<Visualizator> ia = new LinkedList();\n Visualizator test1 = new Visualizator();\n JFrame f1 = new JFrame();\n f1.setTitle(\"Average system utilization\");\n f1.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f1.getContentPane().add(test1);\n test1.setBackground(Color.white);\n f1.setSize(600, 310);\n f1.setLocation(130, 0);\n f1.setVisible(true);\n test1.setName(\"day_usage\");\n test1.start();\n windows.add(test1);\n\n Visualizator test2 = new Visualizator();\n JFrame f2 = new JFrame();\n f2.setTitle(\"Average utilization per cluster\");\n f2.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f2.getContentPane().add(test2);\n test2.setBackground(Color.white);\n f2.setSize(1410, 230);\n f2.setLocation(25, 630);\n f2.setVisible(true);\n test2.setName(\"cl_usage\");\n test2.start();\n windows.add(test2);\n\n Visualizator test3 = new Visualizator();\n JFrame f3 = new JFrame();\n f3.setTitle(\"Waiting and running jobs\");\n f3.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f3.getContentPane().add(test3);\n test3.setBackground(Color.white);\n f3.setSize(700, 310);\n f3.setLocation(735, 0);\n f3.setVisible(true);\n test3.setName(\"jobs\");\n test3.start();\n windows.add(test3);\n\n Visualizator test4 = new Visualizator();\n JFrame f4 = new JFrame();\n f4.setTitle(\"Requested, available and used CPUs\");\n f4.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f4.getContentPane().add(test4);\n test4.setBackground(Color.white);\n f4.setSize(700, 310);\n f4.setLocation(735, 315);\n f4.setVisible(true);\n test4.setName(\"CPUs\");\n test4.start();\n windows.add(test4);\n\n Visualizator test5 = new Visualizator();\n JFrame f5 = new JFrame();\n f5.setTitle(\"24 hour usage profile\");\n f5.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f5.getContentPane().add(test5);\n test5.setBackground(Color.white);\n f5.setSize(350, 310);\n f5.setLocation(25, 315);\n f5.setVisible(true);\n test5.setName(\"24hour_profile\");\n test5.start();\n windows.add(test5);\n\n Visualizator test6 = new Visualizator();\n JFrame f6 = new JFrame();\n f6.setTitle(\"Cluster usage per hour\");\n f6.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f6.getContentPane().add(test6);\n test6.setBackground(Color.white);\n f6.setSize(350, 310);\n f6.setLocation(380, 315);\n f6.setVisible(true);\n test6.setName(\"Cluster_hour_usage\");\n test6.start();\n windows.add(test6);\n\n Visualizator test7 = new Visualizator();\n JFrame f7 = new JFrame();\n f7.setTitle(\"Average utilization per day\");\n f7.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f7.getContentPane().add(test7);\n test7.setBackground(Color.white);\n f7.setSize(650, 310);\n f7.setLocation(200, 100);\n f7.setVisible(true);\n test7.setName(\"Cluster_day_usage\");\n test7.start();\n windows.add(test7);\n\n Visualizator test8 = new Visualizator();\n JFrame f8 = new JFrame();\n f8.setTitle(\"Average UP/DOWN status per day\");\n f8.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n //test.setOpaque(false);\n f8.getContentPane().add(test8);\n test8.setBackground(Color.white);\n f8.setSize(650, 310);\n f8.setLocation(320, 110);\n f8.setVisible(true);\n test8.setName(\"Cluster_day_status\");\n test8.start();\n windows.add(test8);\n\n\n ia.add(test1);\n ia.add(test2);\n ia.add(test3);\n ia.add(test4);\n ia.add(test5);\n ia.add(test6);\n ia.add(test7);\n ia.add(test8);\n\n MainFrame mf = new MainFrame(ia);\n mf.setVisible(true);\n }", "private void setup() {\n setPreferredSize(DEFAULT_SIZE);\n setBackground(Color.WHITE);\n addComponentsTopane();\n \n File f = new File(\"icons/title.png\");\n try {\n myImage = ImageIO.read(f);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String arg[]) throws IOException, InterruptedException {\n\n\t\tString fileName = new File(arg[0]).getName();\n\t final String path = \"C:\\\\Users\\\\alessandro\\\\Desktop\\\\Test\\\\\"+fileName+\".txt\";\n\n\t File file = new File(path);\n\t \n\t \n\t double archi, nodi,densitÓ;\n\n\t\tImmutableGraph graph1 = ArcListASCIIGraph.loadOffline(arg[0]);\n\t\t\t\n\t\t\tif(file.exists()){\n\t\t\tSystem.out.println(\"dentro if\");\n\t\t\t\tBufferedWriter bw = null;\n\t\t\t\t\tFileWriter fw = null;\n\t\t\t\t\tfw = new FileWriter(file.getAbsoluteFile(), true);\n\t\t\t\t\tbw = new BufferedWriter(fw);\n//\t\t\t\t\t dispersionCentrality disp = new dispersionCentrality();\n//\t\t\t\t\t Date primaDisp = new Date();\n//\t\t\t\t\t\tbw.write(\"Dispersion Index:\" +disp.dispersionCentrality(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\t\tDate dopoDisp = new Date();\n//\t\t\t\t\t\tbw.write(dopoDisp.getTime()-primaDisp.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\t\n//\t\t\t\t\t embeddednessIndex embe = new embeddednessIndex();\t\n//\n//\t\t\t\t\t Date primaEmb = new Date();\n//\t\t\t\t\t\tbw.write(\"Embeddedness Index: \"+embe.computeEmbeddedness(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\t\tDate dopoEmb = new Date();\n//\t\t\t\t\t\tbw.write(dopoEmb.getTime()-primaEmb.getTime()+\" ms \\r\\n\");\n\t\t\t\t\t\n//\t\t\t\t\tdegreeCentrality degree = new degreeCentrality();\n//\t\t\t\t\tDate primaDegree = new Date();\n//\t\t\t\t\tbw.write(\"Index Degree centrality node: \"+degree.computeNodeDegree(graph1)+\" tempo dis esecuzione: \");\n//\t\t\t\t\tDate dopoDegree = new Date();\n//\t\t\t\t\tbw.write(dopoDegree.getTime()-primaDegree.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\n//\t\t\t\t\tcenter cent = new center();\n//\t\t\t\t\tDate primaCenter = new Date();\n//\t\t\t\t\tbw.write(\"Center of Graph: \"+ cent.getcenter(graph1)+\" tempo di esecuzione: \");\n//\t\t\t\t\tDate dopoCenter = new Date();\n//\t\t\t\t\tbw.write(dopoCenter.getTime()-primaCenter.getTime()+\" ms \\r\\n\");\n//\t\t\t\t\tSystem.out.println(\"DONE\");\n//\t\t\t\t\tbw.close();\n\t\t\t\t\t\n\t\t\t\t\t deleteDuplicate delete = new deleteDuplicate();\n\t\t\t\t\t delete.stripDuplicatesFromFile(arg[0]);\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\tarchi=graph1.numArcs();\n\t\t\tnodi =graph1.numNodes();\n\t\t\tdensitÓ = archi/(nodi*(nodi-1));\n\t\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tfr = new FileReader(arg[0]);\n\t\tbr = new BufferedReader(fr);\n\t\t\n\t\tString sCurrentLine;\n\t\tString app;\n\n\t\tbr = new BufferedReader(new FileReader(arg[0]));\n\t\tint countLine = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\tcountLine = countLine + 1;\n\t\t\tapp = sCurrentLine.replaceAll(\"[^0-9]+\", \" \");\n\t\tfor (String s : Arrays.asList(app.trim().split(\" \")))\n\t\t\t\tListanodi.add(Integer.valueOf(s));\n\n\t\t}\n\t\tif (br != null)\n\t\t\tbr.close();\n\n\t\tif (fr != null)\n\t\t\tfr.close();\n\t\tDirectedGraph<String, DefaultEdge> graph = createStringGraph(Listanodi);\n\t\tConnectivityInspector<String, DefaultEdge> inspector = new ConnectivityInspector<String, DefaultEdge>(\n\t\t\t\tgraph);\n\t\t\t\t\n\t\tKosarajuStrongConnectivityInspector<String,DefaultEdge>finder = new KosarajuStrongConnectivityInspector<String,DefaultEdge>( graph);\n\t\t\n\t\t\n\t\tBridge bridge= new Bridge();\n\t\tList<String> weaklyBridge =bridge.numberOfWeaklyBridge(graph, Listanodi, inspector.connectedSets().size());\n\t\tList<String> strongBridge =bridge.numberStrongBridge(graph, Listanodi, finder.stronglyConnectedSets().size());\n\t\t\n\t\tarticulationPoint artPoint = new articulationPoint();\n\t\tList<String> weaklyArtPoit = artPoint.numberOfWeaklyArticulationPoint(graph, Listanodi, inspector.connectedSets().size());\n\t\tList<String> strengthArtPoint = artPoint.numberOfStrongArticulationPoint(graph, Listanodi, finder.stronglyConnectedSets().size());\n\t\t\n\t\tBufferedWriter bw = null;\n\t\tFileWriter fw = null;\n\n\t\tcomponentiConnesse componenti = new componentiConnesse();\n\t\t\n\t\t\n\t\t double sum=0,average;\n\t\t List<Integer> temp = new ArrayList<Integer>();\n\t\t for(int i = 0; i<nodi ;i++){\n\t\t\ttemp.add(graph1.outdegree(i));\n\t\t\tsum= sum+graph1.outdegree(i); \n\t\t }\n\t\t average = sum/nodi;\n\t\t\n\t\t \n\t\t\n\t\t List<Double> ListOfneighbourdhood = new ArrayList<Double>();\n\t\t neighbourhood prova = new neighbourhood();\n\t\t ListOfneighbourdhood = prova.computeNeighbour(graph1, 10);\n\t\t\n\t\tcenter cent = new center();\n\t\t \n\t\t diameter d = new diameter();\n\t\t double diameter = d.effectiveDiamete(0.9, ListOfneighbourdhood);\n\t\t\n\t\t NeighbourhoodFunction n = new NeighbourhoodFunction();\n\t\tlong [] x = n.computeExact(graph1, 0, new ProgressLogger());\n\t\n\t\tdouble diametro =n.effectiveDiameter(0.9, n.compute(graph1,0,new ProgressLogger()));\n\t\t\n\t\tcloseness closeness = new closeness();\n\t\tbetweenness between = new betweenness();\n\t\tdegreeCentrality degree = new degreeCentrality();\n\t\tpageRankCentrality page = new pageRankCentrality();\n\t\t clusteringIndex cluster = new clusteringIndex();\n\t\t embeddednessIndex embe = new embeddednessIndex();\t\n\t\t dispersionCentrality disp = new dispersionCentrality();\t\t\n\n\t\t\n\t\ttry {\n\n\n\t\t\tfw = new FileWriter(path);\n\t\t\t\n\t\t\t\t\t\t\n\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\n\t\t\t\n\t\t\tbw.write(\"Numero nodi: \"+nodi+\"\\r\\n\");\n\t\t\tbw.write(\"Numero archi: \"+archi+\"\\r\\n\");\n\t\t\tbw.write(\"Dimensione grafo: \"+ archi+\"\\r\\n\");\n\t\t\tbw.write(\"DensitÓ: \"+densitÓ+\"\\r\\n\");\n\t\t\tbw.write(\"Numero Componenti Connesse di un grafo: \"+componenti.computeWeakConnectedComponents(graph1)+\"\\r\\n\");\n\t\t\tbw.write(\"Numero Componenti Fortemente Connesse: \"+ componenti.computeStrongConnectedComponents(graph1)+\"\\r\\n\");\n\t\t\t\n\t\t\t bw.write(\"Numero Medio Grado Nodo: \"+ average+\"\\r\\n\");\n\t\t\t bw.write(\"Massimo: \"+ Collections.max(temp)+\"\\r\\n\");\n\t\t\t bw.write(\"Minimo:\"+ Collections.min(temp)+\"\\r\\n\");\n\t\t\t\n\t\t\t ParallelBreadthFirstVisit grafo = new ParallelBreadthFirstVisit(graph1, 0,false,null);\n\t\t\t for (int i=0 ; i< nodi ; i++){\n\t\t\t\t bw.write(\"Nodi visitati: \"+grafo.visit(i)+\"\\r\\n\");\n\n\t\t\t }\n\t\t\t \n\t\t\t bw.write(\"Lista vicinanza: \"+ListOfneighbourdhood+\"\\r\\n\");\n\t\t\t Date primaCenter = new Date();\n\t\t\t\tbw.write(\"Center of Graph: \"+ cent.getcenter(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCenter = new Date();\n\t\t\t\tbw.write(dopoCenter.getTime()-primaCenter.getTime()+\" ms \\r\\n\");\n\t\t\t bw.write(\"effective diameter: \"+ diameter+\"\\r\\n\");\n\t\t\t\tfor ( int i=0 ; i< x.length;i++)\n\t\t\t\t\t bw.write(\"visitati i nodi x[\"+i+\"]: \"+x[i]+\"\\r\\n\" );\n\t\t\t bw.write(\"Diametro: \"+diametro+\"\\r\\n\");\n\t\t\t Date primaWBridge = new Date();\n\t\t\t bw.write(\"WeakBridge: \"+weaklyBridge+\" tempo di esecuzione: \");\n\t\t\t Date dopoWBridge = new Date();\n\t\t\t \n\t\t\tbw.write(dopoWBridge.getTime()-primaWBridge.getTime()+\" ms \\r\\n\");\n\t\t\t\n\t\t\tDate primaSBridge = new Date();\n\t\t\t bw.write(\"StrengtBridge: \"+strongBridge+\" tempo di esecuzione: \");\n\t\t\t Date dopoSBridge = new Date();\n\t\t\t\tbw.write(dopoSBridge.getTime()-primaSBridge.getTime()+\" ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaWArt = new Date();\n\t\t\t bw.write(\"Weak ArticulationPoint: \"+weaklyArtPoit+\" tempo di esecuzione: \");\n\t\t\t Date dopoWArt = new Date();\n\t\t\t\tbw.write(dopoWArt.getTime()-primaWArt.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaSArt = new Date();\n\t\t\t bw.write(\"Strengt ArticulationPoint: \"+strengthArtPoint+\" tempo di esecuzione: \");\n\t\t\t Date dopoSArt = new Date();\n\t\t\t\tbw.write(dopoSArt.getTime()-primaSArt.getTime()+\" ms \\r\\n\");\n\n\t\t\t \n\t\t\t bw.write(\"\\r\\n\\r\\n\\r\\n Indici di centralitÓ:\\r\\n\");\n\t\t\t\tDate primaCloseness = new Date();\n\t\t\t\tbw.write(\"Set Of Closeness: \"+closeness.computeCloseness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCloseness = new Date();\n\t\t\t\tbw.write(dopoCloseness.getTime()-primaCloseness.getTime()+\"ms \\r\\n\");\n\t\t\t\tDate primaBetweenness = new Date();\n\t\t\t\tbw.write(\"List of Betweenness: \"+ between.computeBetweenness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoBetweenness = new Date();\n\t\t\t\tbw.write(dopoBetweenness.getTime()-primaBetweenness.getTime()+\"ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaNBetweenness = new Date();\n\t\t\t\t\n\t\t\t\tbw.write(\"List of Normalized Betweenness: \"+between.normalize(between.computeBetweenness(graph1),nodi)+\" tempodiesecuzione: \");\n\t\t\t\tDate dopoNBetweenness= new Date();\n\t\t\t\tbw.write(dopoNBetweenness.getTime()-primaNBetweenness.getTime()+\"ms \\r\\n\");\n\n\t\t\t\tDate primaDegree = new Date();\n\t\t\t\tbw.write(\"Index of degree:\"+degree.computeDegreeCentrality(graph1)+\"\\r\\n\");\n\t\t\t\tDate dopoDegree = new Date();\n\t\t\t\tbw.write(dopoDegree.getTime()-primaDegree.getTime()+\"ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaSDegree = new Date();\n\t\t\t\tbw.write(\"Index Degree centrality node: \"+degree.computeNodeDegree(graph1)+\" tempo dis esecuzione: \");\n\t\t\t\tDate dopoSDegree = new Date();\n\t\t\t\tbw.write(dopoSDegree.getTime()-primaSDegree.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaPage = new Date();\n\t\t\t\tbw.write(\"Indice di Autovettore:\"+page.getPageRankIntex(page.computePageRankCentrality(graph1))+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoPage = new Date();\n\t\t\t\tbw.write(dopoPage.getTime()-primaPage.getTime()+\"ms \\r\\n\");\n\n\t\t\t\tfor(int i=0 ; i<graph1.numNodes();i++)\n\t\t\t\tbw.write(\"Per il nodo:\"+i+\" il valore di Clustering Ŕ pari a :\"+cluster.clusterCoefficent(graph1, i)+\"\\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaCluster =new Date();\n\t\t\t\tbw.write(\"L'Indice di Clustering Ŕ pari a: \"+cluster.clusterIndex(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoCluster = new Date();\n\t\t\t\tbw.write(dopoCluster.getTime()-primaCluster.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tDate primaEmb = new Date();\n\t\t\t\tbw.write(\"Embeddedness Index: \"+embe.computeEmbeddedness(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoEmb = new Date();\n\t\t\t\tbw.write(dopoEmb.getTime()-primaEmb.getTime()+\" ms \\r\\n\");\n\t\t\t\t\n\t\t\t\tDate primaDisp = new Date();\n\t\t\t\tbw.write(\"Dispersion Index:\" +disp.dispersionCentrality(graph1)+\" tempo di esecuzione: \");\n\t\t\t\tDate dopoDisp = new Date();\n\t\t\t\tbw.write(dopoDisp.getTime()-primaDisp.getTime()+\" ms \\r\\n\");\n\n\t\t\t\tSystem.out.println(\"Done\");\n\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\n\t\t\ttry {\n\n\t\t\t\tif (bw != null)\n\t\t\t\t\tbw.close();\n\n\t\t\t\tif (fw != null)\n\t\t\t\t\tfw.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void setImagePath(String path) {\r\n\t\tsuper.setImagePath(path);\t\r\n\t\tparams.put(\"tnznetgraph\", path+nng.getImgName());\t\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tString fileBase = \"GasWaterElectricity3\";\r\n\t\t//String fileBase = \"000cwHDLdata\";\r\n\t\tBufferedReader b = new BufferedReader(\r\n\t\t\t\tnew FileReader(fileBase+\".txt\"));\r\n\t\tPrintStream fo = new PrintStream(fileBase+\".svg\");\r\n\t\tStringBuffer chips = new StringBuffer();\r\n\t\tStringBuffer joins = new StringBuffer();\r\n\t\tint joinCount = 1;\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\t\tString ln ;\r\n\t\twhile ((ln = b.readLine()) != null){\r\n\t\t\tString [] wrds = ln.split(\"\\\\s+\");\r\n\t\t\tif (wrds.length==0) continue; // A blank line\r\n\t\t\tint x0,y0,x1,y1;\r\n\t\t\tdouble t = 0.1;\r\n\t\t\tswitch (wrds[0])\r\n\t\t\t{\r\n\t\t\tcase \"D\":\r\n\t\t\t\tgridW = Integer.parseInt(wrds[1]);\r\n\t\t\t\tgridH = Integer.parseInt(wrds[2]);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase \"C\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tchips.append(String.format(\"<rect x='%f' y='%f' width='%f' height='%f' rx='.2' ry='.2' fill='pink' stroke='black' stroke-width='.2'/>\\n\",\r\n\t\t\t\t\t\tx0+t,y0+t,x1+1-x0-2*t,y1+1-y0-2*t));\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"J\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tdouble f = 0.04;\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+.5));\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+.5));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+0.7f,f,f,joinCount));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+0.7f,f,f,joinCount++));\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"#\"://A comment, ignore\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"T\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tStringBuffer p = new StringBuffer();\r\n\t\t\t\tp.append(\"M\"+(x0+.5)+\" \"+(y0+.5)+\" l\");\r\n\t\t\t\tfor(int i=3;i<wrds.length;i++)\r\n\t\t\t\t\tfor(int j=0;j<wrds[i].length();j++){\r\n\t\t\t\t\t\tswitch (wrds[i].charAt(j))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'N':\r\n\t\t\t\t\t\t\tp.append(\" 0 -1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'E':\r\n\t\t\t\t\t\t\tp.append(\" l 1 0\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'S':\r\n\t\t\t\t\t\t\tp.append(\" 0 1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'W':\r\n\t\t\t\t\t\t\tp.append(\" -1 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\tpaths.append(String.format(\"<path stroke='gray' stroke-width='.2' fill='none' d='%s'/>\\n\",p));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.close();\r\n\t\tfo.printf(\"<svg width='10cm' height='10cm' viewBox='0 0 %d %d' xmlns='http://www.w3.org/2000/svg' version='1.1'>\\n\",\r\n\t\t\t\tgridW,gridH);\r\n\t\tString s=\"\";\r\n\t\tfor(int i=0;i<gridW;i++)\r\n\t\t\ts += String.format(\"M %d 0 l 0 %d \",i,gridH);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\ts=\"\";\r\n\t\tfor(int i=0;i<gridH;i++)\r\n\t\t\ts += String.format(\"M 0 %d l %d 0 \",i,gridW);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\tfo.print(chips);\r\n\t\tfo.print(paths);\r\n\t\tfo.print(joins);\r\n\t\tfo.print(\"</svg>\");\r\n\t\tfo.close();\r\n\t}", "public String getGUIconfigData(){\n String zlgcnfg=null;\n try {\n // get connected to Rserve\n //String RSERVE_HOST = \"vdc-build.hmdc.harvard.edu\";//\"140.247.115.232\"\n //int RSERVE_PORT = 6311;\n RConnection c = new RConnection(RSERVE_HOST, RSERVE_PORT);\n \n // login(String user, String pwd)\n //String RSERVE_USER = \"rserve\";\n //String RSERVE_PWD = \"rserve\";\n c.login(RSERVE_USER, RSERVE_PWD);\n \n // get the hostname of the caller\n String hostname = null;\n Map<String, String> env = System.getenv();\n for (String envName : env.keySet()) {\n if (envName.equals(\"HOST\")){\n hostname = env.get(envName);\n }\n }\n dbgLog.fine(\"hostname=\"+hostname);\n \n // set-up R command lines\n // temp file\n String R_TMP_DIR = \"/tmp/VDC/\";\n //String cnfgfl = R_TMP_DIR +\"configZeligGUI.\"+RandomStringUtils.randomNumeric(6)+ \".xml\"; \n String cnfgfl = R_TMP_DIR +\"configZeligGUI.xml\"; \n dbgLog.fine(\"cnfgfl=\"+cnfgfl);\n \n // remove the existing config file if exists\n String removeOLdLine = \"if (file.exists('\"+cnfgfl+\"')){file.remove('\"+cnfgfl+\"');}\";\n c.voidEval(removeOLdLine);\n // R code line part 1 \n String cmndline = \"library(VDCutil); printZeligSchemaInstance('\"+ cnfgfl + \"')\";\n // cnfgfl + \"',\" + \"'\" + RSERVE_HOST + \"')\";\n dbgLog.fine(\"comand line=\"+cmndline);\n \n // write zelig GUI-config data to the temp ifle\n c.voidEval(cmndline);\n //dbgLog.fine(\"commandline output=\"+outString);\n \n // check whether the temp file exists (Rserve is local)\n long filelength=0;\n try {\n if (RSERVE_HOST.equals(\"localhost\") || RSERVE_HOST.equals(hostname)){\n File flnm =new File(cnfgfl);\n boolean exists = flnm.exists();\n if (exists) {\n dbgLog.fine(\"configuration xml file (\"+cnfgfl+\") was found\");\n filelength = flnm.length();\n // Get the number of bytes in the file\n dbgLog.fine(\"The size of the file =\"+filelength);\n } else {\n dbgLog.fine(\"configuration xml file (\"+cnfgfl+\") was not found\");\n }\n }\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n \n //if (filelength > 0){\n // read-back the config file\n c.voidEval(\"zz<-file('\"+cnfgfl+\"', 'r')\");\n c.voidEval(\"open(zz)\");\n zlgcnfg = c.eval(\"paste(readLines(zz),collapse='')\").asString();\n dbgLog.fine(\"string length=\"+zlgcnfg.length());\n if (zlgcnfg.length()>0){\n dbgLog.fine(\"first 72 bytes=[\\n\"+zlgcnfg.substring(0, 71) +\"\\n]\\n\");\n }\n //}\n } catch (Exception ex){\n ex.printStackTrace();\n }\n return zlgcnfg;\n }", "@MediumTest\n public void test_1314_2() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/statement_without_prev.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "@Override\r\n\tpublic void createContents(Composite viewArea, Map<String, Image> imageMap) {\n\t\tgraph = new Graph(viewArea, SWT.None);\r\n\t\tnodes = new LinkedList<GraphNode>();\r\n\t\tconnections = new LinkedList<GraphConnection>();\r\n\r\n\t\tString[] name = { \"Core\", \"Outline\", \"Package Explorer\", \"JUnit\",\r\n\t\t\t\t\"JavaDoc\", \"Debug\" };\r\n\t\tfor (int i = 0; i < name.length; i++) {\r\n\t\t\tnodes.add(new GraphNode(graph, SWT.None, name[i]));\r\n\t\t}\r\n\r\n\t\tconnections.add(CreateConnection(\"Core\", \"Outline\"));\r\n\t\tgraph.setLayoutAlgorithm(new SpringLayoutAlgorithm(\r\n\t\t\t\tLayoutStyles.NO_LAYOUT_NODE_RESIZING), true);\r\n\t\tgraph.addSelectionListener(new SelectionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\tSystem.out.println(arg0);\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void paintComponent(Graphics g) {\r\n super.paintComponent(g);\r\n\r\n int xDatabase = 50;\r\n int xWebserver = 400;\r\n int xFirewall = 250;\r\n\r\n int yDatabase = 50;\r\n int yWebserver = 50;\r\n int dCount = 0;\r\n int wCount = 0;\r\n\r\n for (Componenten s : database) {\r\n try {\r\n Image image = ImageIO.read(new File(\"Images/Database.png\")).getScaledInstance(50, 50, Image.SCALE_SMOOTH); // DBserver-image\r\n if (s.getType().equals(\"DBserver\")) { // draw database\r\n if (dCount == 7 || dCount == 14) {\r\n xDatabase += 100;\r\n yDatabase = 50;\r\n\r\n }\r\n\r\n g.drawImage(image, xDatabase, yDatabase, null); // neerzetten van de lijnen in IO\r\n g.drawString(s.getNaam(), xDatabase , yDatabase + 60);\r\n g.setColor(Color.BLACK);\r\n g.drawLine(225, 50, 225, 700);\r\n g.drawLine(25,50 ,600 ,50); //up\r\n g.drawLine(600 , 50,600, 700); // right\r\n g.drawLine(25 , 50,25, 700); // left\r\n g.drawLine(25,700 ,600 ,700); //up\r\n yDatabase += 100;\r\n dCount++;\r\n\r\n\r\n } else if (s.getType().equals(\"webserver\")) {\r\n if (wCount == 7 || wCount == 14 ) {\r\n xWebserver += 100;\r\n yWebserver = 50;\r\n\r\n }\r\n Image image2 = ImageIO.read(new File(\"Images/Webserver.png\")).getScaledInstance(50, 50, Image.SCALE_SMOOTH);// webserver image\r\n g.drawImage(image2, xWebserver, yWebserver, null);\r\n g.drawString(s.getNaam(), xWebserver , yWebserver +60);\r\n g.setColor(Color.BLACK);\r\n g.drawLine(333, 50, 333, 700);\r\n yWebserver += 100;\r\n wCount++;\r\n\r\n } else {\r\n Image image3 = ImageIO.read(new File(\"Images/FireWall.png\")).getScaledInstance(50, 50, Image.SCALE_SMOOTH);// Firewall image\r\n g.drawImage(image3, xFirewall, 80, null);\r\n g.drawString(s.getNaam(), xFirewall, 140);\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public static void createAndShowGui() {\n updateShapes();\n initialiseShapeTurtleLinden();\n Painting painting = new Painting();\n ButtonsController buttonsController = new ButtonsController(painting);\n Buttons buttonPanel = new Buttons(buttonsController);\n buttonsController.turtleInit(turtle, linSys);\n\n JPanel mainPanel = new JPanel(false);\n mainPanel.add(painting);\n mainPanel.add(buttonPanel, BorderLayout.SOUTH);\n\n\n ProdPainter prodPaint = new ProdPainter();\n ProductionsController productionsController = new ProductionsController(shape, prodPaint);\n Productions productions = new Productions(productionsController);\n JPanel productionsTab = new JPanel(false);\n productionsTab.add(productions);\n productionsTab.add(prodPaint);\n\n SettingsController settingsController = new SettingsController(turtle, linSys, shape,\n buttonsController, productionsController);\n settingsController.init();\n Settings settings = new Settings(settingsController);\n JPanel settingsTab = new JPanel(false);\n settingsTab.add(settings);\n\n\n JTabbedPane tabs = new JTabbedPane();\n tabs.addTab(\"Drawing\", mainPanel);\n tabs.addTab(\"Productions\", productionsTab);\n tabs.addTab(\"Settings\", settingsTab);\n\n\n JFrame frame = new JFrame();\n frame.setSize(frameWidth, frameHeight + 120);\n setDefaultLookAndFeelDecorated(true);\n frame.add(tabs);\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public static void main(String[] args) {\n GeometricBrownianMotion gbm = new GeometricBrownianMotion(PROCESSES, ITERATIONS, INCREMENT);\n gbm.setProcess(0, 1, 0.1f, 0.4f);\n gbm.setProcess(1, 1, 0.1f, 0.3f, true);\n gbm.setProcess(2, 1, 0.2f, 0.2f);\n gbm.setProcess(3, 1, 0.1f, 0.1f);\n //gbm.setProcess(4, 5, 0.01f, 0.2f, true);\n DataGrapher graph = new DataGrapher(gbm.generateData());\n\n JFrame f = new JFrame();\n f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n f.add(graph);\n f.setSize(400,400);\n f.setLocation(200,200);\n f.setVisible(true);\n }", "public static void main( String[] args) {\n\n printFancyTitle(); // creative element (smile)\n\n Scanner keyboard = new Scanner( System.in); // used for all console input\n\n // read graph file specified by user\n String fileName = P4Helper.queryFileName( keyboard);\n Graph210 g = P4Helper.readGraph( fileName);\n if( g == null) { System.exit(1); }\n\n // print the graph\n if( P4Helper.queryYesNo(keyboard, \"Print graph?\")) {\n P4Helper.printGraph( g);\n }\n\n // run Prim's on the graph to get MST\n Graph210 pg1 = null;\n if( P4Helper.queryYesNo(keyboard, \"Run Prim's on graph?\")) {\n PrimsAlgorithm algo1 = new MyPrims( g);\n P4Helper.doPrimsMST( algo1, \"Original\", PRIMS_FILE_NAME);\n pg1 = algo1.getGraph();\n }\n\n // run Prims2 on the graph to get MST\n Graph210 pg2 = null;\n if( P4Helper.queryYesNo(keyboard, \"Run Prims2 on graph?\")) {\n PrimsAlgorithm algo2 = new MyPrims2( g);\n P4Helper.doPrimsMST( algo2, \"Prims2\", PRIMS2_FILE_NAME);\n pg2 = algo2.getGraph();\n }\n\n // compare two Prim's results to make sure they are equal\n if( pg1 != null && pg2 != null) {\n System.out.println( \"Compare two Prim results...\");\n int errorCount;\n errorCount = GraphHelper.compareGraphs( pg1, pg2);\n if( errorCount == 0) {\n System.out.println( \"\\tOK: The two Prim results are EQUAL!\");\n }\n else {\n System.out.println( \"\\tERROR: Compare found errors=\" + errorCount);\n }\n }\n\n keyboard.close();\n System.out.println(); // bye\n }", "public DefaultMutableTreeNode execute(IFramework framework) throws AlgorithmException {\r\n\t\t//Before anything check for Mac OS and throw appropriate msg\r\n\t\tif(sysMsg(\"R 2.11.x\", \"GlobalAncova\") != JOptionPane.OK_OPTION)\r\n\t\t\treturn null;\r\n\t\t\r\n this.experiment = framework.getData().getExperiment(); \r\n this.data = framework.getData();\r\n exptNamesVector = new Vector<String>();\r\n int number_of_samples = experiment.getNumberOfSamples();\r\n \r\n int [] columnIndices = experiment.getColumnIndicesCopy(); \r\n \r\n sampleLabels = new ArrayList<String>();\r\n geneLabels = new ArrayList<String>();\r\n for (int i = 0; i < number_of_samples; i++) {\r\n exptNamesVector.add(framework.getData().getFullSampleName(columnIndices[i]));\r\n sampleLabels.add(framework.getData().getFullSampleName(columnIndices[i])); //Raktim\r\n } \r\n \t\r\n \r\n GLOBANCInitBox GLOBALANCDialog = new GLOBANCInitBox((JFrame)framework.getFrame(), true, exptNamesVector,framework.getData().getAllFilledAnnotationFields(), framework.getClusterRepository(1));\r\n GLOBALANCDialog.setVisible(true);\r\n \r\n annotChosen = GLOBALANCDialog.getSelectedAnnotation();\r\n for (int i = 0; i < experiment.getNumberOfGenes(); i++) {\r\n \tgeneLabels.add(framework.getData().getElementAnnotation(i, annotChosen)[0]);\r\n }\r\n \r\n if (!GLOBALANCDialog.isOkPressed()) return null;\r\n \r\n alpha = GLOBALANCDialog.getAlpha();\r\n dataDesign = 4;\r\n numGroups = GLOBALANCDialog.getNumGroups();\r\n numPerms = GLOBALANCDialog.getNumPerms();\r\n numFullGroups = GLOBALANCDialog.getNumFullGroups();\r\n numRedGroups = GLOBALANCDialog.getNumRedGroups();\r\n factorAName = GLOBALANCDialog.getFactorAName();\r\n factorBName = GLOBALANCDialog.getFactorBName();\r\n groupAssignments=GLOBALANCDialog.getGroupAssignments();\r\n geneSetFilePath = GLOBALANCDialog.getGeneSetFilePath();\r\n geneSetOrigin = GLOBALANCDialog.getGeneSetOrigin();\r\n if (groupAssignments == null)\r\n \treturn null;\r\n \r\n IDistanceMenu menu = framework.getDistanceMenu();\r\n int function = menu.getDistanceFunction();\r\n if (function == Algorithm.DEFAULT) {\r\n function = Algorithm.EUCLIDEAN;\r\n }\r\n \r\n \r\n Listener listener = new Listener();\r\n \r\n try {\r\n algorithm = framework.getAlgorithmFactory().getAlgorithm(\"GLOBANC\");\r\n algorithm.addAlgorithmListener(listener);\r\n \r\n this.progress = new Progress(framework.getFrame(), \"Running Global ANCOVA Analysis\", listener);\r\n this.progress.setIndeterminate(true);\r\n this.progress.setIndeterminantString(\"Running Analysis...\");\r\n this.progress.show();\r\n \r\n AlgorithmData data = new AlgorithmData();\r\n \r\n data.addMatrix(\"experiment\", experiment.getMatrix());\r\n data.addIntArray(\"group_assignments\", groupAssignments);\r\n data.addParam(\"dataDesign\", String.valueOf(dataDesign));\r\n data.addParam(\"numGroups\", String.valueOf(numGroups));\r\n data.addParam(\"alpha\", String.valueOf(alpha));\r\n data.addParam(\"numAGroups\",String.valueOf(numFullGroups));\r\n data.addParam(\"numPerms\",String.valueOf(numPerms));\r\n data.addParam(\"numBGroups\",String.valueOf(numRedGroups));\r\n data.addParam(\"nameA\",String.valueOf(factorAName));\r\n data.addParam(\"nameB\",String.valueOf(factorBName));\r\n data.addParam(\"geneSetOrigin\",String.valueOf(geneSetOrigin));\r\n data.addStringArray(\"geneSetFilePaths\", geneSetFilePath);\r\n if (dataDesign==5){\r\n data.addParam(\"numAGroups\",String.valueOf(2));\r\n data.addParam(\"numBGroups\",String.valueOf(numGroups));\r\n\t data.addParam(\"nameA\",String.valueOf(\"Condition\"));\r\n\t data.addParam(\"nameB\",String.valueOf(\"Time\"));\r\n }\r\n\r\n //Raktim\r\n data.addStringArray(\"geneLabels\", geneLabels.toArray(new String[geneLabels.size()]));\r\n data.addStringArray(\"sampleLabels\", sampleLabels.toArray(new String[sampleLabels.size()]));\r\n \r\n long start = System.currentTimeMillis();\r\n AlgorithmData result = algorithm.execute(data);\r\n long time = System.currentTimeMillis() - start;\r\n \r\n // getting the results\r\n Cluster result_cluster = result.getCluster(\"cluster\");\r\n this.means = result.getMatrix(\"clusters_means\");\r\n this.variances = result.getMatrix(\"clusters_variances\");\r\n \r\n this.geneLists = result.getIntMatrix(\"geneListsMatrix\");\r\n this.geneListNames = result.getStringArray(\"gene-list-names\");\r\n this.resultMatrix = result.getMatrix(\"result-matrix\"); \r\n FloatMatrix geneGroupMeansMatrix = result.getMatrix(\"geneGroupMeansMatrix\"); \r\n FloatMatrix geneGroupSDsMatrix = result.getMatrix(\"geneGroupSDsMatrix\");\r\n \r\n iterations = result.getParams().getInt(\"iterations\");\r\n \r\n geneGroupMeans = new float[geneGroupMeansMatrix.getRowDimension()][geneGroupMeansMatrix.getColumnDimension()];\r\n geneGroupSDs = new float[geneGroupSDsMatrix.getRowDimension()][geneGroupSDsMatrix.getColumnDimension()];\r\n for (int i = 0; i < geneGroupMeans.length; i++) {\r\n for (int j = 0; j < geneGroupMeans[i].length; j++) {\r\n geneGroupMeans[i][j] = geneGroupMeansMatrix.A[i][j];\r\n geneGroupSDs[i][j] = geneGroupSDsMatrix.A[i][j];\r\n }\r\n }\r\n GeneralInfo info = new GeneralInfo();\r\n info.time = time;\r\n //ADD MORE INFO PARAMETERS HERE\r\n info.alpha = alpha;\r\n info.function = menu.getFunctionName(function);\r\n Vector<String> titlesVector = new Vector<String>();\r\n for (int i = 0; i < geneGroupMeans[0].length; i++) {\r\n titlesVector.add(\"Group \" + (i+1) + \" mean\");\r\n titlesVector.add(\"Group \" + (i+1) + \" std.dev\");\r\n }\r\n\r\n titlesVector.add(\"F-values\");\r\n int x=1; int y=2;\r\n for (int i=0; i<getTotalInteractions(numGroups); i++) {\r\n\r\n titlesVector.add(\"significance-values, \"+x+\"vs.\"+y);\r\n titlesVector.add(\"adj-p-values, \"+x+\"vs.\"+y);\r\n titlesVector.add(\"log fold change, \"+x+\"vs.\"+y);\r\n titlesVector.add(\"t-statistic, \"+x+\"vs.\"+y);\r\n titlesVector.add(\"log-odds, \"+x+\"vs.\"+y);\r\n \t\r\n y++;\r\n if (y>numGroups){\r\n \tx++;\r\n \ty=x+1;\r\n }\r\n }\r\n \r\n auxTitles = new String[titlesVector.size()];\r\n for (int i = 0; i < auxTitles.length; i++) {\r\n auxTitles[i] = (String)(titlesVector.get(i));\r\n }\r\n \r\n auxData = new Object[experiment.getNumberOfGenes()][auxTitles.length];\r\n for (int i = 0; i < auxData.length; i++) {\r\n int counter = 0;\r\n for (int j = 0; j < geneGroupMeans[i].length; j++) {\r\n auxData[i][counter++] = new Float(geneGroupMeans[i][j]);\r\n auxData[i][counter++] = new Float(geneGroupSDs[i][j]);\r\n }\r\n }\r\n return createResultTree(result_cluster, info);\r\n \r\n } finally {\r\n if (algorithm != null) {\r\n algorithm.removeAlgorithmListener(listener);\r\n }\r\n if (progress != null) {\r\n progress.dispose();\r\n }\r\n }\r\n }", "public static void main(String[] args) {\r\n\t\tiniziale = new JFrame(\"KMeans\");\r\n\t\tiniziale.setLayout(new GridLayout(1, 1));\r\n\t\tKMeans k = new KMeans();\r\n\t\tDialog dialog = k.new Dialog(iniziale, \"Connessione Server\", true);\r\n\t\tdialog.addWindowListener(new WindowAdapter() {\r\n\t\t\tpublic void windowClosing(WindowEvent ev) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdialog.setSize(1000, 100);\r\n\t\tdialog.setVisible(true);\t\r\n\t\tiniziale.setSize(500, 600);\r\n\t\tiniziale.setVisible(true);\r\n\t\tiniziale.setLocationRelativeTo(null);\r\n\t\tImageIcon img = new ImageIcon(\"K_icon.png\");\r\n\t\tiniziale.setIconImage(img.getImage());\r\n\t\t\r\n\t\tk.new TabbelPane();\r\n\t}", "private void setupGraph() {\n graph = new DualGraph(SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema());\n try {\n\n WritableGraph wg = graph.getWritableGraph(\"\", true);\n\n // Create LayerMask attributes\n layerMaskV = LayersConcept.VertexAttribute.LAYER_MASK.ensure(wg);\n layerMaskT = LayersConcept.TransactionAttribute.LAYER_MASK.ensure(wg);\n\n // Create LayerVisilibity Attributes\n layerVisibilityV = LayersConcept.VertexAttribute.LAYER_VISIBILITY.ensure(wg);\n layerVisibilityT = LayersConcept.TransactionAttribute.LAYER_VISIBILITY.ensure(wg);\n\n // Create Selected Attributes\n selectedV = VisualConcept.VertexAttribute.SELECTED.ensure(wg);\n selectedT = VisualConcept.TransactionAttribute.SELECTED.ensure(wg);\n\n // Adding 2 Vertices - not selected, layer 1, visible\n vxId1 = wg.addVertex();\n wg.setIntValue(layerMaskV, vxId1, 1);\n wg.setFloatValue(layerVisibilityV, vxId1, 1.0f);\n wg.setBooleanValue(selectedV, vxId1, false);\n\n vxId2 = wg.addVertex();\n wg.setIntValue(layerMaskV, vxId2, 1);\n wg.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n wg.setBooleanValue(selectedV, vxId2, false);\n\n // Adding 2 Transactions - not selected, layer 1, visible\n txId1 = wg.addTransaction(vxId1, vxId2, true);\n wg.setIntValue(layerMaskT, txId1, 1);\n wg.setFloatValue(layerVisibilityT, txId1, 1.0f);\n wg.setBooleanValue(selectedT, txId1, false);\n\n txId2 = wg.addTransaction(vxId1, vxId2, false);\n wg.setIntValue(layerMaskT, txId2, 1);\n wg.setFloatValue(layerVisibilityT, vxId2, 1.0f);\n wg.setBooleanValue(selectedT, vxId2, false);\n\n wg.commit();\n\n } catch (final InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n Thread.currentThread().interrupt();\n }\n }", "public static void main(String[] args) {\n\t\twindowGraphicMode();\r\n\t}", "public MainUI() throws UnknownHostException {\n initComponents();\n //server();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\nwidth = screenSize.getWidth();\n height = screenSize.getHeight();\n setIcon();\n \n }", "public static void main(String[] args) {\n\t\tVector<Edge> edges = GraphReader.readFromFile(\"/tmp/tinyG.txt\",2);\r\n\t\tGraph G = new Graph(edges);\r\n int s = Integer.parseInt(\"1\");\r\n DepthFirstSearch search = new DepthFirstSearch(G.getNodeNum());\r\n Path res = search.dfs(G, s);\r\n res.packetToJson();\r\n //System.out.print(\"success!\");\r\n }", "public static JPanel createGraphPanel(final Graph g,final String label){\n final NCMS_Routing gview = new NCMS_Routing(g, label);\n final Visualization vis = gview.getVisualization();\n\n // create a search panel for the tree map\n SearchQueryBinding sq = new SearchQueryBinding(\n (Table)vis.getGroup(treeNodes), label,\n (SearchTupleSet)vis.getGroup(Visualization.SEARCH_ITEMS));\n final JSearchPanel search = sq.createSearchPanel();\n search.setShowResultCount(true);\n search.setBackground(Color.WHITE);\n search.setBorder(BorderFactory.createEmptyBorder(5,5,4,0));\n search.setFont(FontLib.getFont(\"Calibri\", Font.PLAIN,13));\n gview.setSearchPanel(search);\n\n final JFastLabel title = new JFastLabel(\" \");\n title.setBackground(Color.RED);\n title.setPreferredSize(new Dimension(350, 20));\n title.setVerticalAlignment(SwingConstants.BOTTOM);\n title.setBorder(BorderFactory.createEmptyBorder(3,0,0,0));\n title.setFont(FontLib.getFont(\"Calibri\", Font.PLAIN, 16));\n// final JLabel childrenLabel = new JLabel(\"\");\n final JButton childrenLabel = new JButton();\n childrenLabel.setText(\"<HTML><FONT color=\\\"#000099\\\"><U> -> Site</U></FONT></HTML>\");\n childrenLabel.setHorizontalAlignment(SwingConstants.LEFT);\n childrenLabel.setBorderPainted(false);\n childrenLabel.setBorder(BorderFactory.createEmptyBorder());\n childrenLabel.setOpaque(false);\n childrenLabel.setBackground(Color.WHITE);\n childrenLabel.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String query = \"gtCode = 'root'\";\n Predicate myPredicate1 = (Predicate)ExpressionParser.parse(query);\n Iterator ite = vis.getVisualGroup(treeNodes).tuples(myPredicate1);\n while(ite.hasNext()){\n Object obj = ite.next();\n if(obj instanceof NodeItem){\n TupleSet ts = vis.getFocusGroup(hover);\n\n if(((NodeItem)obj).getString(\"gtCode\").equalsIgnoreCase(\"root\")){\n ts.setTuple((NodeItem)obj);\n }\n\n }\n }\n\n gview.getMyPredicate().setFilterInfo(\"Ha Noi\",\"site\",true);\n\n// gview.getMyPredicate().setAllInfo(true);\n\n vis.run(\"filter\");\n }\n });\n\n gview.addControlListener(new ControlAdapter() {\n public void itemEntered(VisualItem item, MouseEvent e) {\n if ( item.canGetString(label) ){\n if(gview.getCurrentItem()==null){\n gview.setCurrentItem(item);\n }\n title.setText(item.getString(label));\n// if(item.getString(\"site\").equalsIgnoreCase(\"hidden\")){\n// childrenLabel.setText(\"<HTML>-> <FONT color=\\\"#000099\\\"><U>\"+item.getString(\"name\")+\"</U></FONT></HTML>\");\n// }else{\n// childrenLabel.setText(\"<HTML>-> <FONT color=\\\"#000099\\\"><U>\"+item.getString(\"site\")+\"</U></FONT></HTML>\");\n// }\n\n if(item.getString(\"gtCode\").equalsIgnoreCase(\"group\")){\n gview.getMyPredicate().setFilterInfo(item.getString(\"name\"),\"site\",true);\n }else{\n gview.getMyPredicate().setSearchOneNodeInfo(item.getString(\"name\"),item.getString(\"mainPath\"),item.getString(\"slavePath\"));\n }\n\n }\n\n\n }\n public void itemExited(VisualItem item, MouseEvent e) {\n title.setText(null);\n// childrenLabel.setText(item.getString(label));\n }\n });\n\n Box box = new Box(BoxLayout.X_AXIS);\n\n box.setBackground(Color.WHITE);\n box.add(Box.createHorizontalStrut(10));\n box.add(title);\n box.add(Box.createHorizontalGlue());\n box.add(search);\n box.add(Box.createHorizontalStrut(3));\n\n JPanel levelFillPanel = new JPanel(new BorderLayout());\n final JButton homeLabel = new JButton();\n homeLabel.setText(\"<HTML><FONT color=\\\"#000099\\\"><U>Home</U></FONT></HTML>\");\n homeLabel.setHorizontalAlignment(SwingConstants.LEFT);\n homeLabel.setBorderPainted(false);\n homeLabel.setBorder(BorderFactory.createEmptyBorder());\n homeLabel.setOpaque(false);\n homeLabel.setBackground(Color.WHITE);\n homeLabel.setForeground(Color.RED);\n homeLabel.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String query = \"name = 'Home'\";\n Predicate myPredicate1 = (Predicate)ExpressionParser.parse(query);\n Iterator ite = vis.getVisualGroup(treeNodes).tuples(myPredicate1);\n while(ite.hasNext()){\n Object obj = ite.next();\n if(obj instanceof NodeItem){\n TupleSet ts = vis.getFocusGroup(hover);\n\n if(((NodeItem)obj).getString(\"name\").equalsIgnoreCase(\"Home\")){\n ts.setTuple((NodeItem)obj);\n }\n\n }\n }\n\n// gview.getMyPredicate().setFilterInfo(\"Ha Noi\",\"site\",true);\n\n gview.getMyPredicate().setAllInfo(true);\n\n vis.run(\"filter\");\n }\n });\n\n\n levelFillPanel.add(homeLabel,BorderLayout.WEST);\n levelFillPanel.add(childrenLabel,BorderLayout.CENTER);\n levelFillPanel.setBackground(Color.WHITE);\n\n JTextPane textPane = new JTextPane();\n gview.setLogDetailListener(new LogDetailListener(textPane));\n gview.setLogScrollPane(new JScrollPane());\n gview.getLogScrollPane().add(textPane);\n gview.getLogScrollPane().setVisible(true);\n\n JPanel logPanel = new JPanel(new BorderLayout());\n logPanel.add(gview, BorderLayout.CENTER);\n logPanel.add(gview.getLogScrollPane(), BorderLayout.SOUTH);\n JDialog dialog = new JDialog();\n dialog.getContentPane().add(textPane);\n dialog.setSize(500,700);\n gview.setLogDetailDialog(dialog);\n\n\n\n JPanel panel = new JPanel(new BorderLayout());\n panel.add(levelFillPanel, BorderLayout.NORTH);\n panel.add(gview, BorderLayout.CENTER);\n panel.add(box, BorderLayout.SOUTH);\n panel.setBackground(Color.WHITE);\n\n Color BACKGROUND = Color.WHITE;\n Color FOREGROUND = Color.BLACK;\n UILib.setColor(panel, BACKGROUND, FOREGROUND);\n // panel.add(totalGUI, BorderLayout.WEST);\n vis.run(\"onlydraw\");\n return panel;\n }", "private void saveLab(boolean usetmp) throws FileNotFoundException{\n //Get path to start.config\n String startConfigPath;\n if(!usetmp){\n startConfigPath = currentLab.getPath()+File.separator+\"config\"+File.separator+\"start.config\";\n }else{\n startConfigPath = currentLab.getPath()+File.separator+\"config\"+File.separator+\"start.config\";\n }\n PrintWriter writer = new PrintWriter(startConfigPath);\n String startConfigText = \"\"; \n \n // Write Global Params\n for(String line : labDataCurrent.getGlobals()){\n startConfigText += line+\"\\n\";\n }\n\n // Cycle through network objects and write\n Component[] networks = NetworkPanePanel.getComponents();\n for(Component network : networks){\n NetworkData data = ((NetworkObjPanel)network).getConfigData();\n startConfigText += \"NETWORK \"+data.name+\"\\n\";\n startConfigText += \" MASK \"+data.mask+\"\\n\";\n startConfigText += \" GATEWAY \"+data.gateway+\"\\n\";\n \n if(data.macvlan > 0){\n startConfigText += \" MACVLAN \"+data.macvlan+\"\\n\";\n }\n if(data.macvlan_ext > 0){\n startConfigText += \" MACVLAN_EXT\" +data.macvlan_ext+\"\\n\";\n }\n \n if(!data.ip_range.isEmpty()){\n startConfigText += \" IP_RANGE \"+data.ip_range+\"\\n\";\n } \n\n if(data.tap){\n startConfigText += \" TAP YES\"+\"\\n\";\n }\n for(String unknownParam : data.unknownNetworkParams){\n startConfigText += \" \"+unknownParam+\"\\n\";\n }\n }\n \n // Cycle through container objects and write \n Component[] containers = ContainerPanePanel.getComponents();\n for(Component container : containers){\n ContainerData data = ((ContainerObjPanel)container).getConfigData(); \n startConfigText += \"CONTAINER \"+data.name+\"\\n\";\n startConfigText += \" USER \"+data.user+\"\\n\";\n if(data.script.isEmpty()){\n startConfigText += \" SCRIPT NONE\\n\";\n }\n else{\n startConfigText += \" SCRIPT \"+data.script+\"\\n\"; \n }\n \n if(data.x11){\n startConfigText += \" X11 YES\\n\"; \n }\n else{\n startConfigText += \" X11 NO\\n\";\n }\n // Not default\n if(data.terminal_count != 1)\n startConfigText += \" TERMINALS \"+data.terminal_count+\"\\n\";\n if(!data.terminal_group.isEmpty())\n startConfigText += \" TERMINAL_GROUP \"+data.terminal_group+\"\\n\";\n if(!data.xterm_title.isEmpty())\n startConfigText += \" XTERM \"+data.xterm_title+\" \"+data.xterm_script+\"\\n\";\n if(!data.password.isEmpty())\n startConfigText += \" PASSWORD \"+data.password+\"\\n\";\n for(LabData.ContainerAddHostSubData addHost : data.listOfContainerAddHost){\n if(addHost.type.equals(\"network\"))\n startConfigText += \" ADD-HOST \"+addHost.add_host_network+\"\\n\";\n else if(addHost.type.equals(\"ip\"))\n startConfigText += \" ADD-HOST \"+addHost.add_host_host+\":\"+addHost.add_host_ip+\"\\n\"; \n }\n for(LabData.ContainerNetworkSubData network : data.listOfContainerNetworks){\n startConfigText += \" \"+network.network_name+\" \"+network.network_ipaddress+\"\\n\"; \n }\n if(data.clone > 0){\n startConfigText += \" CLONE \"+data.clone+\"\\n\";\n }\n if(!data.lab_gateway.isEmpty()){\n startConfigText += \" LAB_GATEWAY \"+data.lab_gateway+\"\\n\";\n }\n if(data.no_gw){\n startConfigText += \" NO_GW YES\\n\";\n }\n if(!data.base_registry.isEmpty()){\n startConfigText += \" BASE_REGISTRY \"+data.base_registry+\"\\n\";\n }\n if(!data.thumb_volume.isEmpty()){\n startConfigText += \" THUMB_VOLUME \"+data.thumb_volume+\"\\n\";\n }\n if(!data.thumb_command.isEmpty()){\n startConfigText += \" THUMB_COMMAND \"+data.thumb_command+\"\\n\";\n }\n if(!data.thumb_stop.isEmpty()){\n startConfigText += \" THUMB_STOP \"+data.thumb_stop+\"\\n\";\n }\n if(!data.publish.isEmpty()){\n startConfigText += \" PUBLISH \"+data.publish+\"\\n\";\n }\n if(data.hide){\n startConfigText += \" HIDE YES\\n\";\n }\n if(data.no_privilege){\n startConfigText += \" NO_PRIVILEGE YES\\n\";\n }\n if(data.no_pull){\n startConfigText += \" NO_PULL YES\\n\";\n }\n if(data.mystuff){\n startConfigText += \" MYSTUFF YES\\n\";\n }\n if(data.tap){\n startConfigText += \" TAP YES\\n\";\n }\n if(!data.mount1.isEmpty() && !data.mount2.isEmpty()){\n startConfigText += \" MOUNT \"+data.mount1+\":\"+data.mount2+\"\\n\";\n }\n \n }\n \n //Write to File\n writer.print(startConfigText);\n writer.close();\n \n //Save results.config and goals.config file\n labDataCurrent.getResultsData().writeResultsConfig(usetmp);\n labDataCurrent.getGoalsData().writeGoalsConfig(usetmp);\n labDataCurrent.getParamsData().writeParamsConfig(usetmp);\n \n System.out.println(\"Lab Saved\");\n }", "public static void main(String[] args) {\n DrawingPanel dp = new DrawingPanel();\n dp.figures.add(new Circle(234,132,15));\n dp.figures.add(new Circle(14,75,21));\n dp.figures.add(new Rectangle(33,271,12,15));\n dp.figures.add(new Triangle(\n 22,25,\n 32,25,\n 12,12));\n //DOTO Drawing and GUI\n double f = dp.mesaure(MeasurerType.FieldMeasurer);\n System.out.println(f);\n double p = dp.mesaure(MeasurerType.PerimeterMeasurer);\n System.out.println(p);\n\n }", "private static void izpisiNavodila() {\n System.err.println(\"java ... [<datoteka.png>] [<sirina>x<visina>]\");\n System.err.println();\n System.err.println(\"java ...\");\n System.err.println(\" sliko nariše v okno velikosti 800 krat 600\");\n System.err.println();\n System.err.println(\"java ... 640x480\");\n System.err.println(\" sliko nariše v okno velikosti 640 krat 480\");\n System.err.println();\n System.err.println(\"java ... primer.png\");\n System.err.println(\" izdela sliko primer.png velikosti 800 krat 600\");\n System.err.println();\n System.err.println(\"java ... primer.png 640x480\");\n System.err.println(\" izdela sliko primer.png velikosti 640 krat 480\");\n }", "void createGraphForMassiveLoad();", "@Override\n public void simpleInitApp() {\n setDisplayStatView(false);\n setDisplayFps(false);\n\n // just a blue box\n Box mesh = new Box(1, 1, 1);\n Geometry geom = new Geometry(\"Box\", mesh);\n Material mat = new Material(assetManager,\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n mat.setColor(\"Color\", ColorRGBA.Blue);\n geom.setMaterial(mat);\n rootNode.attachChild(geom);\n\n // Display a line of text in the default font on depth layer 0\n guiFont = assetManager.loadFont(\"Interface/Fonts/Default.fnt\");\n distanceText = new BitmapText(guiFont);\n distanceText.setSize(guiFont.getCharSet().getRenderedSize());\n distanceText.move( // x/y coordinates and z = depth layer 0\n settings.getWidth() / 2 + 50,\n distanceText.getLineHeight() + 20,\n 0);\n guiNode.attachChild(distanceText);\n\n // Display a 2D image or icon on depth layer -2\n Picture frame = new Picture(\"User interface frame\");\n frame.setImage(assetManager, \"Interface/frame.png\", false);\n frame.move(settings.getWidth() / 2 - 265, 0, -2);\n frame.setWidth(530);\n frame.setHeight(10);\n guiNode.attachChild(frame);\n\n // Display a 2D image or icon on depth layer -1\n Picture logo = new Picture(\"logo\");\n logo.setImage(assetManager, \"Interface/Monkey.png\", true);\n logo.move(settings.getWidth() / 2 - 47, 2, -1);\n logo.setWidth(95);\n logo.setHeight(75);\n guiNode.attachChild(logo);\n }", "public static void main(String[] args) {\n \t\r\n long start = System.currentTimeMillis();\r\n \r\n // readInputSensors\r\n initialize();\r\n \r\n //set some features for g2 to draw\r\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n g2.setColor(Color.BLUE);\r\n g2.draw(new Rectangle2D.Double(0, 0, Config.LENGTH - 0.1, Config.WIDTH - 0.1));\r\n \r\n // create elements for oneCycle\r\n Tools.initCycle();\r\n \r\n // all processing here\r\n browse();\r\n// Tools.printSensorsVerFull(setOfSensors);\r\n \r\n // drawToFile\r\n try {\r\n ImageIO.write(myImage, \"png\", Config.IMAGE_OUT);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n System.out.println(\"top = \" + top);\r\n System.out.println(\"bottom = \" + bottom);\r\n System.out.println(\"counter = \" + counter);\r\n long end = System.currentTimeMillis();\r\n System.out.println(\"Runtime : \" + (end - start));\r\n }", "public static void main(String[] args) throws IOException {\n\n\t\tArrayList<Node> nodes = new ArrayList<Node>();\n\n\t\tStringBuilder graphVis = new StringBuilder();\n\t\t\n\t\tfloat edgeProb = 0.001f;\n\t\tgenerateNodesAndEdges(nodes, graphVis, edgeProb, // GraphConfig.EDGE_PROHABILITY\n\t\t\t\tGraphConfig.EDGE_LEVEL_LIMIT, GraphConfig.EDGE_LEVEL_FUNCTION);\n\t\t//generateNodesAndEdgesRecursiv(nodes, graphVis);\n\t\taddColocations(nodes);\n\n\t\t// do the visualization string creation after setting colocation\n\t\t// constraints, if not colocation constraints are not set correctly\n\t\tString graphPath = \"../../Sample_Data/Graph/Evaluation/\" + nodes.size() + \"n_\"\n\t\t\t\t+ m + \"_\" + Util.currentTime();\n\t\t/*\n\t\t * StringBuilder content = new StringBuilder();\n\t\t * \n\t\t * for (Node node : nodes) { content.append(node.toString()); }\n\t\t * \n\t\t * GraphWriter writer = new GraphWriter();\n\t\t * writer.write(content.toString(), graphPath);\n\t\t * if(shallCreateGraphVisualization){\n\t\t * writer.writeVisualisation(graphVis.toString(), graphPath); }\n\t\t */\n\t\tFile file = new File(graphPath + \".csv\");\n\n\t\t// if file doesnt exists, then create it\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(GraphConfig.configToString() + \"\\n\");\n\t\tbw.write(\n\t\t\t\t\"Id,(Outgoing) node,(Incoming) node,Colocation nodes,#tensorSize, #operations, RAM storage,Device constraint ,name\\n\");\n\t\tfor (Node node : nodes) {\n\t\t\tbw.write(node.toString());\n\t\t}\n\t\tbw.close();\n\t\tfw.close();\n\t\t// now change properties of the graph\n\n\t\t// String[] edge_probability = {\"0.025\",\"0.05\",\"0.\",\"0.1\", \"0.2\",\"0.4\",\n\t\t// \"0.6\", \"0.8\",\"1\"};\n\t\t/*\n\t\t * String[] edge_probability = { \"0.05\", \"0.1\", \"0.2\", \"0.3\", \"0.4\" };\n\t\t * int nodeLevelDistance = -1; // watch out that all nodes are reachable\n\t\t * -> need sink node // ode sink = new Node(0, \"SINK\"); // not problem\n\t\t * anymore for (String factor : edge_probability) { content = new\n\t\t * StringBuilder(); // remove all edges for (Node nodeToRemoveEdges :\n\t\t * nodes) { nodeToRemoveEdges.removeAllEdges(); } for (Node node :\n\t\t * nodes) { // könnte man beschleunigen da es sich um eine Arraylist\n\t\t * handelt for (Node possibleEdge : nodes) { // To avoid cycles, would\n\t\t * be faster to exploid properties of // the arraylist if (node.level <\n\t\t * possibleEdge.level) { if (Math.random() < Float.parseFloat(factor)) {\n\t\t * if (nodeLevelDistance < 0 || (possibleEdge.level - node.level <\n\t\t * nodeLevelDistance)) { node.getOutgoingNodes().add(possibleEdge);\n\t\t * possibleEdge.getIncomingNodes().add(node);\n\t\t * \n\t\t * } } } } } // koennte man auch schon vorher hinzufuegen, aber um\n\t\t * Fehler // auszuschließen for (Node node : nodes) {\n\t\t * content.append(node.toString()); } writer.write(content.toString(),\n\t\t * graphPath + \"_\" + factor); }\n\t\t */\n\t\t// System.out.println(\"isReachable:\" +\n\t\t// isEveryNodeReachable(sink,numberOfNodes));\n\t\t\n\t\tif(shallCreateGraphVisualization){\n\t\t\tSystem.out.println(graphVis.toString());\n\t\t}\n\t}", "public static void showGUI() {\n Display display = Display.getDefault();\n Shell shell = new Shell(display);\n EntropyUIconfig inst = new EntropyUIconfig(shell, SWT.NULL);\n Point size = inst.getSize();\n shell.setLayout(new FillLayout());\n shell.layout();\n if (size.x == 0 && size.y == 0) {\n inst.pack();\n shell.pack();\n } else {\n Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);\n shell.setSize(shellBounds.width, shellBounds.height);\n }\n shell.open();\n while (!shell.isDisposed()) {\n if (!display.readAndDispatch())\n display.sleep();\n }\n }", "private void setGraphPanels() {\n\n GraphArray g;\n\n for (Sort s : sorts) {\n //g = new GraphArray(s.getArray(), s.getClass().getSimpleName());\n container.add(s.getGraph().getChartPanel());\n }\n }", "public static void testEdgeDetection()\n {\n Picture swan = new Picture(\"swan.jpg\");\n swan.edgeDetection();\n swan.explore();\n }", "public static void main(String[] args) {\n\t\tlong start=System.currentTimeMillis();\r\n\r\n\t\tGraph g = new Graph(9);\r\n\t\tg.addEdge(0, 1);\r\n\t\tg.addEdge(1, 2);\r\n\t\tg.addEdge(1, 3);\r\n\t\tg.addEdge(2, 4);\r\n\t\tg.addEdge(2, 3);\r\n\t\tg.addEdge(3, 4);\r\n\t\tg.addEdge(3, 5);\r\n\t\tg.addEdge(5, 6);\r\n\t\tg.addEdge(5, 7);\r\n\t\tg.addEdge(6, 8);\r\n\t\t//g.dfs();\r\n\t\t//0 1 3 5 7 6 8 4 2 0.004초\r\n\t\t//g.bfs();\r\n\t\t//0 1 2 3 4 5 6 7 8 0.006초\r\n\t\tg.dfsR(); \r\n\t\t//0 1 2 3 4 5 6 7 8 0.004초 \r\n\t\t\r\n\t\t\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(\" 실행 시간 : \" + (end - start)/1000.0 + \"초\");\r\n\t\t\r\n\t\r\n\t}", "public void stegoTest() {\n\t\tSequentialImageAccessScheme seqImScheme = new SequentialImageAccessScheme();\n\t\tDualLSBImageHidingScheme imHidingScheme = new DualLSBImageHidingScheme();\n\t\tSimpleComponentModulationScheme compModScheme = new SimpleComponentModulationScheme();\n\t\n\t\tCarrierImage carrierImage = new CarrierImage(seqImScheme, imHidingScheme, compModScheme);\n\t\tStoreToList store = new StoreToList(\"logfile.txt\");\n\t\tCharacter nodeForward = '3';\n\t\tCharacter cCMsg = null;\n\t\t\n\t \n\t\tImageManager imgManager = new ImageManager();\n\t\ttry {\n\t\t\t\t//the image to embed data in\n\t\t\t\tFile f = new File(\"Truecolor.png\");\n\t\t\t\tif(f.exists()) {\n\t\t\t\t\t//get the list of encrypted data to embed\n\t\t\t\t\tstore.generateList();\n\t\t\t\t\tList<String> data = store.getEncryptedList();\n\t\t\t\t\t\n\t\t\t\t\tString stegText = nodeForward + \":\" + cCMsg + \":\";\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < data.size(); i++) {\n\t\t\t\t\t\tstegText = stegText + data.get(i) + \" \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"stegText: \" + stegText);\n\t\t\t\t\t\n\t\t\t\t\tRenderedImage img = imgManager.loadImage(f);\n\t\t\t\t\t\n\t\t\t\t\tcarrierImage.setCarrierImage(img);\n\t\t\t\t \n\t\t\t\t\tHidingText hidingText = new HidingText();\n\t\t\t\t\thidingText.setText(stegText);\n\t\t\t\t\t\n\t\t\t\t\t//embed data in the image chosen\n\t\t\t\t\tcarrierImage.hide(hidingText);\n\t\t\t\t\t//create a new image file to write the stego image to\n\t\t\t\t\tFile fS = new File(\"downloaded/image0.png\");\n\t\t\t\t\tImageManager.writeImage(carrierImage.getCarrierImage(), fS, true);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Finished Steganography\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"File does not exist :/\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (InvalidTypeException 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} catch (CarrierInitializationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingComponentInitializationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (HidingComponentSizeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierSizeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierAccessSchemeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CarrierHidingSchemeException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (CompatibilityException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\timgManager.terminate();\n\t\t}\n\t}", "public static void main(String[] args)\n {\n \n //opens selfie picture \n /**/ \n //relative path\n //og pics\n Picture apic = new Picture(\"images/selfie.jpg\");\n Picture obama = new Picture(\"images/obama.jpg\");\n apic.explore();\n obama.explore();\n\n //change with selfie picture\n Picture me = new Picture(\"images/selfie.jpg\"); \n Picture me1 = new Picture(\"images/selfie.jpg\");\n Picture me2 = new Picture(\"images/selfie.jpg\");\n \n //initializes array pix\n Pixel[] pix;\n \n /**\n * method 1 change\n * divides colors into 4 equal groups\n */\n //initializes vars for rgb values\n int red;\n int blue;\n int green;\n pix = me.getPixels(); \n \n for (Pixel spot: pix) {\n //gets rgb values of colors\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n //if pixel under a certain value then the color is changed\n if (red < 63 && blue < 63 && green < 63) {\n spot.setColor(new Color(2, 32, 62));\n }\n else if (red < 127 && blue < 127 && green < 127) {\n spot.setColor(new Color(198, 37, 8));\n }\n else if (red < 191 && blue < 191 && green < 191) {\n spot.setColor(new Color(102, 157, 160));\n }\n else {\n spot.setColor(new Color(250, 238, 192));\n }\n }\n me.explore();\n me.write(\"images/selfie1.jpg\");\n\n /**\n * method 2 change\n * changes color based on intensity using max and min grayscale values\n */\n pix = me1.getPixels(); \n int s = 0; //smallest pix value\n int b = 255; //largest pix value\n int ave;\n int quads; //size of four equal range of colors\n \n for (Pixel spot: pix) {\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n ave = (red + blue + green)/3;\n if (ave > b) { //gets maximum grayscale\n b = ave;\n }\n if (ave < s) { //gets min grayscale\n s = ave;\n }\n quads = (b-s)/4; //divides range of pix values into 4\n \n //sees if pixel value is less than the factor of quad\n if (red < quads && blue < quads && green < quads) {\n spot.setColor(new Color(2, 32, 62));\n }\n else if (red < quads*2 && blue < quads*2 && green < quads*2 ) {\n spot.setColor(new Color(198, 37, 8));\n }\n else if (red < quads*3 && blue < quads*3 && green < quads*3) {\n spot.setColor(new Color(102, 157, 160));\n }\n else {\n spot.setColor(new Color(250, 238, 192));\n }\n }\n me1.explore();\n me1.write(\"images/selfie2.jpg\");\n \n /**\n * custom color palette\n */\n pix = me2.getPixels();\n \n for (Pixel spot: pix) {\n red = spot.getRed();\n blue = spot.getBlue();\n green = spot.getGreen();\n \n //sets color to new value if under a certain value\n if (red < 63 && blue < 63 && green < 63) {\n spot.setColor(new Color(77, 105, 170));\n }\n else if (red < 127 && blue < 127 && green < 127) {\n spot.setColor(new Color(71, 183, 116));\n }\n else if (red < 191 && blue < 191 && green < 191) {\n spot.setColor(new Color(254, 129, 99));\n }\n else {\n spot.setColor(new Color(254, 202, 99));\n }\n }\n me2.explore();\n me2.write(\"images/selfie3.jpg\");\n \n }", "public static void DrawIt (Graph<Integer,String> g) {\n\t\tISOMLayout<Integer,String> layout = new ISOMLayout<Integer,String>(g);\r\n\t\t// The Layout<V, E> is parameterized by the vertex and edge types\r\n\t\tlayout.setSize(new Dimension(650,650)); // sets the initial size of the space\r\n\t\t// The BasicVisualizationServer<V,E> is parameterized by the edge types\r\n\t\tBasicVisualizationServer<Integer,String> vv =\r\n\t\tnew BasicVisualizationServer<Integer,String>(layout);\r\n\t\tvv.setPreferredSize(new Dimension(650,650)); //Sets the viewing area size\r\n\t\tJFrame frame = new JFrame(\"Simple Graph View\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().add(vv);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\r\n\t}", "@MediumTest\n public void test_1314_7() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/while_without_next.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "public void actionPerformed(ActionEvent e) {\nString label = e.getActionCommand();\nif (label==null)\n return;\n\nif (label==\"Open\") {\nif (running==false){\nif(openHoechstDialog()){\nif (openStainDialog()){\n\nrunThis();\n++count;\n\n}\n}\n}\n}\nif (label==\"Open Overlay\") {\nint selRow = dataTable.getSelectedRow();\nif (count<1){\n\t//do nuthin\n}else{\n\tImagePlus showPrev = imgs.get(selRow);\n\tImagePlus showPrev2 = showPrev.duplicate();\n\tshowPrev2.setTitle(showPrev.getTitle());\n\tshowPrev2.show();\n}\n}\n\nif (label==\"Settings\") {\n\nIJ.showMessage(\"not quite that fancy yet\");\n}\n\nif (label==\"Help\") {\n // Find the current working directory: it is assumed that\n // ImageJ is in this directory.\n // String urlString = \"file:\" + System.getProperty(\"user.dir\") + \"/plugins/morpho_doc/index.html\";\n //new NeuronMorphoHelpViewer(urlString);\n IJ.showMessage(\"ask Jon\");\n return;\n};\n\nif (label==\"Quit\") {\n instance = null;\n frame.dispose();\n return;\n}\n\n/*****************************************\n* South panel - Measurements operations.\n*****************************************/\n \n/* We need an image. */\n\nimg = WindowManager.getCurrentImage();\nif (img==null) {\n // IJ.beep();\n IJ.showStatus(\"No image\");\n return;\n}\n\n\n\nif (label==\"Start\") {\n\n\n return;\n}\n\n\nif (label==\"Stop\") {\n\n\n\n return;\n}\n\n }", "int wkhtmltoimage_init(int use_graphics);", "public LetterpressSolverGUI() throws HeadlessException {\n\n }", "public static void main(String[] args) {\n EnergyData energyData = new EnergyData();\n GUIVerbrauchsdiagramm guiVerbrauchsdiagramm = new GUIVerbrauchsdiagramm(\n \"Stromzähler\", energyData);\n\n //guiVerbrauchsdiagramm.pack();\n UIUtils.centerFrameOnScreen(guiVerbrauchsdiagramm);\n guiVerbrauchsdiagramm.setVisible(true);\n\n }", "public static void main(String[] args) throws IOException {\n\t\t\t\tWebDriver driver=new FirefoxDriver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t//passing the url\r\n\t\t\t\tdriver.get(\"http://www.testingmasters.com/hrm/symfony/web/index.php/auth/login\");\r\n\r\n\t\t\t\t//maximize the browser\r\n\t\t\t\t\t\t\r\n\t\t\t\tdriver.manage().window().maximize();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tTakesScreenshot sht=(TakesScreenshot)driver;\r\n\t\t\t\t\r\n\t\t\t\tFile src=sht.getScreenshotAs(OutputType.FILE);\r\n\t\t\t\t\r\n\t\t\t\tString dest=\"C:\\\\Users\\\\tm\\\\Desktop\\\\Java Test\\\\mypic.png\";\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\torg.apache.commons.io.FileUtils.copyFile(src, new File(dest));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tRuntime.getRuntime().exec(\"taskkill /im firefox.exe /f\");\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t}", "private void generateGraphCode() {\n StringBuilder finalCode = new StringBuilder(\"digraph G{\\n\");\n for (int idx = 0; idx < jTabbedPane.getTabCount(); idx++) {\n WorkingPanel workingPanel = (WorkingPanel) jTabbedPane.getComponent(idx);\n finalCode.append(generateSubGraphCode(workingPanel.getConnections(), idx));\n }\n finalCode.append(\"\\n}\");\n JFrame generatedCodeFrame = new JFrame(\"Code Generator\");\n JTextArea codeDisplay = new JTextArea();\n generatedCodeFrame.add(codeDisplay);\n codeDisplay.append(finalCode.toString());\n generatedCodeFrame.setSize(400, 700);\n generatedCodeFrame.setVisible(true);\n }", "private void createGraph() {\n \t\t\n \t\t// Check capacity\n \t\tCytoscape.ensureCapacity(nodes.size(), edges.size());\n \n \t\t// Extract nodes\n \t\tnodeIDMap = new OpenIntIntHashMap(nodes.size());\n \t\tginy_nodes = new IntArrayList(nodes.size());\n \t\t// OpenIntIntHashMap gml_id2order = new OpenIntIntHashMap(nodes.size());\n \n \t\tfinal HashMap gml_id2order = new HashMap(nodes.size());\n \n \t\tSet nodeNameSet = new HashSet(nodes.size());\n \n \t\tnodeMap = new HashMap(nodes.size());\n \n \t\t// Add All Nodes to Network\n \t\tfor (int idx = 0; idx < nodes.size(); idx++) {\n \t\t\t\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1,\n \t\t\t\t\t\tidx, nodes.size()));\n \t\t\t}\n \n \t\t\t// Get a node object (NOT a giny node. XGMML node!)\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) nodes\n \t\t\t\t\t.get(idx);\n \t\t\tfinal String nodeType = curNode.getName();\n \t\t\tfinal String label = (String) curNode.getLabel();\n \n \t\t\treadAttributes(label, curNode.getAtt(), NODE);\n \n \t\t\tnodeMap.put(curNode.getId(), label);\n \n \t\t\tif (nodeType != null) {\n \t\t\t\tif (nodeType.equals(\"metaNode\")) {\n \t\t\t\t\tfinal Iterator it = curNode.getAtt().iterator();\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tfinal Att curAttr = (Att) it.next();\n \t\t\t\t\t\tif (curAttr.getName().equals(\"metanodeChildren\")) {\n \t\t\t\t\t\t\tmetanodeMap.put(label, ((Graph) curAttr.getContent()\n \t\t\t\t\t\t\t\t\t.get(0)).getNodeOrEdge());\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\tif (nodeNameSet.add(curNode.getId())) {\n \t\t\t\tfinal Node node = (Node) Cytoscape.getCyNode(label, true);\n \n \t\t\t\tginy_nodes.add(node.getRootGraphIndex());\n \t\t\t\tnodeIDMap.put(idx, node.getRootGraphIndex());\n \n \t\t\t\t// gml_id2order.put(Integer.parseInt(curNode.getId()), idx);\n \n \t\t\t\tgml_id2order.put(curNode.getId(), Integer.toString(idx));\n \n \t\t\t\t// ((KeyValue) node_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// node.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\"XGMML id \" + nodes.get(idx)\n \t\t\t\t\t\t+ \" has a duplicated label: \" + label);\n \t\t\t\t// ((KeyValue)node_root_index_pairs.get(idx)).value = null;\n \t\t\t}\n \t\t}\n \t\tnodeNameSet = null;\n \n \t\t// Extract edges\n \t\tginy_edges = new IntArrayList(edges.size());\n \t\tSet edgeNameSet = new HashSet(edges.size());\n \n \t\tfinal CyAttributes edgeAttributes = Cytoscape.getEdgeAttributes();\n \n \t\t// Add All Edges to Network\n \t\tfor (int idx = 0; idx < edges.size(); idx++) {\n \n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(2,\n \t\t\t\t\t\tidx, edges.size()));\n \t\t\t}\n \t\t\tfinal cytoscape.generated2.Edge curEdge = (cytoscape.generated2.Edge) edges\n \t\t\t\t\t.get(idx);\n \n \t\t\tif (gml_id2order.containsKey(curEdge.getSource())\n \t\t\t\t\t&& gml_id2order.containsKey(curEdge.getTarget())) {\n \n \t\t\t\tString edgeName = curEdge.getLabel();\n \n \t\t\t\tif (edgeName == null) {\n \t\t\t\t\tedgeName = \"N/A\";\n \t\t\t\t}\n \n \t\t\t\tint duplicate_count = 1;\n \t\t\t\twhile (!edgeNameSet.add(edgeName)) {\n \t\t\t\t\tedgeName = edgeName + \"_\" + duplicate_count;\n \t\t\t\t\tduplicate_count += 1;\n \t\t\t\t}\n \n \t\t\t\tEdge edge = Cytoscape.getRootGraph().getEdge(edgeName);\n \n \t\t\t\tif (edge == null) {\n \n \t\t\t\t\tfinal String sourceName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getSource());\n \t\t\t\t\tfinal String targetName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getTarget());\n \n \t\t\t\t\tfinal Node node_1 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\tsourceName);\n \t\t\t\t\tfinal Node node_2 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\ttargetName);\n \n \t\t\t\t\tfinal Iterator it = curEdge.getAtt().iterator();\n \t\t\t\t\tAtt interaction = null;\n \t\t\t\t\tString itrValue = \"unknown\";\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tinteraction = (Att) it.next();\n \t\t\t\t\t\tif (interaction.getName().equals(\"interaction\")) {\n \t\t\t\t\t\t\titrValue = interaction.getValue();\n \t\t\t\t\t\t\tif (itrValue == null) {\n \t\t\t\t\t\t\t\titrValue = \"unknown\";\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tedge = Cytoscape.getCyEdge(node_1, node_2,\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue, true);\n \n \t\t\t\t\t// Add interaction to CyAttributes\n \t\t\t\t\tedgeAttributes.setAttribute(edge.getIdentifier(),\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue);\n \t\t\t\t}\n \n \t\t\t\t// Set correct ID, canonical name and interaction name\n \t\t\t\tedge.setIdentifier(edgeName);\n \n \t\t\t\treadAttributes(edgeName, curEdge.getAtt(), EDGE);\n \n \t\t\t\tginy_edges.add(edge.getRootGraphIndex());\n \t\t\t\t// ((KeyValue) edge_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// edge.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\n \t\t\t\t\t\t\"Non-existant source/target node for edge with gml (source,target): \"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getSource()) + \",\"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getTarget()));\n \t\t\t}\n \t\t}\n \t\tedgeNameSet = null;\n \n \t\tif (metanodeMap.size() != 0) {\n \t\t\tfinal Iterator it = metanodeMap.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal String key = (String) it.next();\n \t\t\t\tcreateMetaNode(key, (List) metanodeMap.get(key));\n \t\t\t}\n \t\t}\n \t}", "public static void main(String[] args) {\n\r\n List<Image> imageList = new ArrayList<>();\r\n imageList.add(new ProxyImage(\"Dali_Atomicus_1948\", \"Dalí Atomicus, photo by Philippe Halsman (1948), shown before support wires were removed from the image\"));\r\n imageList.add(new ProxyImage(\"The_Falling_Soldier_1936\", \"Original title Loyalist Militiaman at the Moment of Death, Cerro Muriano, September 5, 1936\"));\r\n imageList.add(new ProxyImage(\"The_Seven_Year_Itch\", \"Monroe posing for photographers while filming the subway grate scene for The Seven Year Itch in September 1954\"));\r\n imageList.add(new ProxyImage(\"Robert_Mapplethorpe\", \"Self portrait (1980)\"));\r\n \r\n System.out.println(\"Show data\");\r\n for (Image image : imageList) {\r\n\t\t\timage.showData();\r\n\t\t}\r\n \r\n System.out.println(\"\\nLoad & display images\");\r\n for (Image image : imageList) {\r\n\t\t\timage.displayImage();\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n jmeVisualization = new JMEVisualization();\n jmeVisualization.setRotated(false);\n jmeVisualization.setWidth(getVisualizationPanel().getWidth() - 15);\n jmeVisualization.setHeight(getVisualizationPanel().getHeight() - 30);\n jmeVisualization.startApplication();\n\n /*\n Fetch Canvas from JMEVisualization instance\n */\n jmeCanvas = jmeVisualization.getJmeCanvasContext().getCanvas();\n\n getVisualizationPanel().setLayout(new FlowLayout());\n getVisualizationPanel().add(jmeCanvas);\n getVisualizationPanel().revalidate();\n\n }", "public static void main(String args[]) throws Exception\n {\n if(args.length != 1)\n {\n System.out.println(\"Usage: java -cp PanelSegJ.jar gov.nih.nlm.lhc.openi.panelseg.DataPreviewAll <data folder>\");\n System.out.println(\"\tThis is a utility program to generate images with annotations superimposed on the original figure images.\");\n System.exit(0);\n }\n\n DataPreviewAll statistics = new DataPreviewAll(args[0]);\n statistics.generatePreview();\n System.out.println(\"Completed!\");\n }", "private void viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "public static void main(String[] args) throws InterruptedException, IOException {\n\t\t\r\nSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\test\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe\");\r\nChromeDriver dr = new ChromeDriver();\r\ndr.get(\"https://www.w3schools.com/\");\r\ndr.manage().window().maximize();\r\ndr.findElement(By.xpath(\"//*[text()='LEARN CSS']\")).click();\r\nSystem.out.println(dr.getTitle());\r\nFile src=dr.getScreenshotAs(OutputType.FILE);\r\nFileUtils.copyFile(src, new File(\"C:\\\\Users\\\\test\\\\\"+dr.getTitle()+\".png\"));\r\nThread.sleep(5000);\r\ndr.quit();\r\n\t}", "@MediumTest\n public void test_1314_5() throws Exception {\n String imagePath = Environment.getExternalStorageDirectory()+\"/LeCoder_Image/if_without_next.png\";\n //Load the file and process it\n activity.loadImageFile(imagePath);\n activity.processImage();\n //Generate the nodes and construct the graph\n activity.generateNodes();\n activity.generateGraph();\n //Print all nodes\n activity.printAllNodes();\n //Check whether the flowchart has no start point\n assertFalse(activity.checkAllNodes());\n }", "public static void main( String[] args )\n\t{\n\t\tImageJ ij = new ImageJ();\n\t\tij.ui().showUI();\n\n\t\t// Gets active BdvHandle instance\n\t\tBdvHandle bdv = SourceAndConverterServices.getSourceAndConverterDisplayService().getActiveBdv();\n\n\t\t// Import SpimData\n\t\tnew SpimDataFromXmlImporter(\"src/test/resources/mri-stack.xml\").run();\n\t\tnew SpimDataFromXmlImporter(\"src/test/resources/mri-stack-shiftedX.xml\").run();\n\t\tnew SpimDataFromXmlImporter(\"src/test/resources/mri-stack-shiftedY.xml\").run();\n\n\t\tfinal List< SourceAndConverter > sourceAndConverters = SourceAndConverterServices.getSourceAndConverterService().getSourceAndConverters();\n\n\t\t// Show all three sacs\n\t\tsourceAndConverters.forEach( sac -> {\n\t\t\tSourceAndConverterServices.getSourceAndConverterDisplayService().show(bdv, sac);\n\t\t\tnew ViewerTransformAdjuster(bdv, sac).run();\n\t\t\tnew BrightnessAutoAdjuster(sac, 0).run();\n\t\t});\n\n\t\t// For the first two, change the projection mode to avg (default is sum, if it is not set)\n\t\tfinal SourceAndConverter[] sacs = new SourceAndConverter[ 2 ];\n\t\tsacs[ 0 ] = sourceAndConverters.get( 0 );\n\t\tsacs[ 1 ] = sourceAndConverters.get( 1 );\n\n\t\tnew ProjectionModeChanger( sacs, Projection.PROJECTION_MODE_AVG ).run();\n\t}", "public void initComponets(){\r\n\r\n graphPanel = new MathGraph();\r\n graphPanel.setToolTipText(\"Gráfico do lançamento oblíquo.\");\r\n animationPanel = new JPanel();\r\n topPanel = new JPanel();\r\n \r\n speedField = new JTextField(5);\r\n speedField.setToolTipText(\"Velocidade do lançamento medida em m/s.\");\r\n speedPanel = new JPanel();\r\n\t\t\r\n angleSlider = new JSliderText(\"45\",1, 89, 45);\r\n angleSlider.setToolTipText(\"Ajuste a medida do ângulo (1º - 89º).\");\r\n anglePanel = new JPanel();\r\n\t\t\r\n gravityField = new JTextField(5);\r\n gravityField.setToolTipText(\"Gravidade do espaço de lançamento medido em m/s^2.\");\r\n gravityPanel = new JPanel();\r\n String[] spaceOption = {\" Terra\",\" Lua\", \" Sol\"};\r\n spaceComboBox = new JComboBox(spaceOption);\r\n\t \t\t \r\n\t\treachField = new JTextField(5);\r\n\t \treachField.setToolTipText(\"Valor do Alcance\");\r\n\t \treachField.disable();\r\n\t \treachPanel = new JPanel();\r\n\t \r\n\t\tmHeightField = new JTextField(5);\r\n\t \tmHeightField.setToolTipText(\"Valor da Altura Máxima\");\r\n\t \tmHeightField.disable();\r\n\t \tmHeightPanel = new JPanel();\r\n\t \r\n\t spaceBoxPanel = new JPanel();\r\n\t informationPanel = new JPanel();\r\n \r\n\t situationPanel = new JPanel();\r\n \t String[] situationOptions = {\" Ângulo e Velocidade Inicial\",\" Velocidade Inicial e Alcance\",\" Angulo e Alcance\",\" Alcance e Altura Máxima\"};\r\n\t situationsComboBox = new JComboBox(situationOptions);\r\n\t situationDescriptionArea = new JTextArea(3,30);\r\n\t situationDescriptionScroll = new JScrollPane(situationDescriptionArea);\r\n\t \r\n confResPanel = new JPanel();\r\n\t \r\n resultArea = new JTextArea(5,45);\r\n resultArea.setToolTipText(\"Resultados do gráfico do lançamento\");\r\n resultScroll = new JScrollPane(resultArea);\r\n resultPanel = new JPanel();\r\n \r\n bottomPanel = new JPanel();\r\n basePanel = new JPanel();\r\n mainFrame = new JFrame(\"FIS308 - Lançamento Oblíquo - Augusto Cesar : Julian Herrera : Marcello Junior - UFAL - Julho de 2002\");\r\n \r\n mainFrame.addWindowListener(new WindowAdapter() {\r\n public void windowClosing(WindowEvent e) {\r\n System.exit(0);\r\n }\r\n });\r\n }" ]
[ "0.6277086", "0.59298575", "0.582656", "0.57764184", "0.5744915", "0.5735792", "0.5726212", "0.5726148", "0.5710671", "0.56604815", "0.5648916", "0.5633941", "0.5633694", "0.5588499", "0.55732", "0.5556085", "0.555213", "0.55509746", "0.5548842", "0.5528789", "0.55251974", "0.5521174", "0.5519427", "0.55007184", "0.5468315", "0.54479593", "0.5433111", "0.5433056", "0.5428106", "0.54173374", "0.5416645", "0.5414709", "0.54146904", "0.5413798", "0.540566", "0.5400254", "0.5395726", "0.53893435", "0.5364185", "0.5356599", "0.5351821", "0.5343606", "0.5332162", "0.5328983", "0.5319395", "0.5305784", "0.53047657", "0.5298007", "0.529244", "0.52924204", "0.528788", "0.5277745", "0.5274656", "0.52642685", "0.52628756", "0.52571917", "0.5250106", "0.5249431", "0.5236054", "0.5232034", "0.5227507", "0.52270883", "0.52232844", "0.52227396", "0.52205765", "0.52198225", "0.5214664", "0.52049553", "0.52010065", "0.51994157", "0.51962596", "0.51940906", "0.5181191", "0.51735854", "0.5173072", "0.51680815", "0.5166561", "0.5163848", "0.51608634", "0.5155342", "0.51530194", "0.51503646", "0.5148414", "0.5143711", "0.5133964", "0.513158", "0.5128948", "0.512799", "0.51254284", "0.5121168", "0.5115388", "0.51129824", "0.51083684", "0.510522", "0.5104753", "0.50988364", "0.50985116", "0.5095601", "0.509515", "0.5093118" ]
0.59345764
1
TODO Autogenerated method stub
public void actionPerformed(ActionEvent arg0) { GraphVisHandler.saveImageByType(viz, System.getProperty("user.dir") + "/..", graphFile, true, pw, 400, 400, CommonDef.ISMAPPING); System.out.println("---------"); //Upload }
{ "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 void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; }
{ "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 initFlowRules(); loadRules();
@Override public void afterPropertiesSet() throws Exception { loadRules2(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\npublic void initRules(){\r\n\t\r\n}", "@Override\r\n protected void initializeRules(List<AbstractValidationCheck> rules) {\n\r\n }", "private void loadRules2() {\n\t\t\r\n\t\tint type = Integer.valueOf(env.getProperty(\"sentinel.server.type\")) ;\r\n\t\t\r\n String appId = \"sentinel-demo\";\r\n String apolloMetaServerAddress = \"http://10.1.77.106:8080\";\r\n System.setProperty(\"app.id\", appId);\r\n System.setProperty(\"apollo.meta\", apolloMetaServerAddress);\r\n\r\n String namespaceName = \"application\";\r\n String flowRuleKey = \"flowRules\";\r\n // It's better to provide a meaningful default value.\r\n String defaultFlowRules = \"[]\";\r\n\r\n ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ApolloDataSource<>(namespaceName,\r\n flowRuleKey, defaultFlowRules, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {\r\n }));\r\n FlowRuleManager.register2Property(flowRuleDataSource.getProperty());\r\n ClusterFlowRuleManager.setPropertySupplier(namespace ->flowRuleDataSource.getProperty());\r\n \r\n\r\n\t\tif (ClusterStateManager.CLUSTER_SERVER == type) \r\n\t\t{\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_SERVER);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_CLIENT);\r\n\t\t\tinitClientConfigProperty(namespaceName);\r\n\t\t\tinitClientServerAssignProperty(namespaceName);\r\n\t\t}\r\n \r\n \r\n \r\n \r\n }", "public FlowRule() {\r\n }", "private void installRulesOnFlow()\n\t{\t\t\t\n\t\tVertex sourceVertex = m_graph.getSourceVertex();\n\t\tshort vlanNum = 1;\n\t\tfor(Edge sourceOutEdge :sourceVertex.getOutgoingEdges())\n\t\t{\n\t\t\tif(sourceOutEdge.getFlow()>0)\n\t\t\t{\n\t\t\t\tattachIpAddressToVlan(vlanNum);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_IPV4);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ARP_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_ARP);\n\t\t\t\tinstallRuleToHostSrc(sourceVertex.getName(),vlanNum, sourceOutEdge.getSourcePort());\n\t\t\t\tsourceOutEdge.setIsRuleInstalled();\n\t\t\t\tinstallRulesOnFlowDFS(sourceOutEdge.getTo(),vlanNum);\n\t\t\t\tvlanNum++;\n\t\t\t}\n\t\t}\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate void setRules() {\n\t\tthis.result = Result.START;\n\t\t// Create all initial rule executors, and shuffle them if needed.\n\t\tthis.rules = new LinkedList<>();\n\t\tModule module = getModule();\n\t\tfor (Rule rule : module.getRules()) {\n\t\t\tRuleStackExecutor executor = (RuleStackExecutor) getExecutor(rule, getSubstitution());\n\t\t\texecutor.setContext(module);\n\t\t\tthis.rules.add(executor);\n\t\t}\n\t\tif (getRuleOrder() == RuleEvaluationOrder.RANDOM || getRuleOrder() == RuleEvaluationOrder.RANDOMALL) {\n\t\t\tCollections.shuffle((List<RuleStackExecutor>) this.rules);\n\t\t}\n\t}", "public void setRules(ArrayList<Rule> rules) {\n\t\tthis.rules = rules;\n\t}", "FlowRule build();", "public Rules getRules()\r\n {\r\n return rules;\r\n }", "public void readRules( String filename ) {\r\n\t\ttry {\r\n\t\t\ts.readRules(filename);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void loadRules() throws DataNormalizationException {\n\t\tloadRules(TableVersion.COMMITTED);\n\t}", "public void loadRules(String path) {\n\n // Checking if the file exists...\n File ruleFile = new File(path);\n if (!ruleFile.exists()) {\n System.err.println(\"The file at \" + path + \" could not be found in RuleLoader!\");\n return;\n }\n\n Scanner sc;\n try {\n sc = new Scanner(ruleFile);\n } catch (FileNotFoundException e) {\n System.err.println(\"The file at \" + path + \" could not be found in RuleLoader!\");\n return;\n }\n sc.useDelimiter(\",\");\n\n // Now begin reading each line in the file.\n // - Lines which are blank or start with # (comment) are ignored.\n // - PathRules start with an & to indicate that they are\n // referencing an existing rule.\n // - Rules created from each line are added to the PhuJusAgent via the\n // addRule method.\n while (sc.hasNextLine()) {\n String readLine = sc.nextLine();\n\n // Ignore blank lines or comments\n if (readLine.length() == 0 || readLine.startsWith(\"#\")) {\n continue;\n }\n\n TFRule tfNewbie = null;\n // PathRules start with a ~/= to indicate that they are pathrules\n if (readLine.startsWith(\"&\")) {\n //TODO: Fix the PathRule loading code\n agent.debugPrintln(\"PathRule loading code not implemented.\");\n //pathNewbie = createPathRuleFromLine(readLine);\n }\n else {\n tfNewbie = createTFRuleFromLine(readLine);\n System.out.println(\"Loading rule \" + readLine);\n }\n if (tfNewbie != null) agent.addRule(tfNewbie);\n }\n }", "public void setRules(List<T> rules) {\n\t\tthis.rules = rules;\n\t}", "public void clearRules() {\n this.rules_ = emptyProtobufList();\n }", "private void actOnRules() {\r\n\r\n\t\tfor(String key: myRuleBook.keySet())\r\n\t\t{\r\n\r\n\t\t\tRule rule = myRuleBook.get(key);\r\n\t\t\tSpriteGroup[] obedients = myRuleMap.get(rule);\r\n\r\n\t\t\tif(rule.isSatisfied(obedients))\r\n\t\t\t{\r\n\t\t\t\trule.enforce(obedients);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void test() throws DroolsParserException, IOException {\n\t\tRuleBase ruleBase = initialiseDrools();\n\t\tWorkingMemory workingMemory = initializeMessageObjects(ruleBase);\n\t\tint expectedNumberOfRulesFired = 1;\n\n\t\tint actualNumberOfRulesFired = workingMemory.fireAllRules();\n\t}", "@Override\n public List getRules() {\n return rules;\n }", "@Required\n public void setRules(Set<Rule> rules)\n {\n this.rules = new TreeSet<Rule>(new RuleComparator());\n this.rules.addAll(rules);\n }", "public RuleConfiguration() {\n\t\trule = new Rule();\n\t}", "public RuleBasedValidator() {\n globalRules = new ArrayList();\n rulesByProperty = new HashMap();\n }", "public void deduceRules()\n{\n List<RuleInstance> allrules = loadRules();\n\n List<UpodRule> rules = new ArrayList<UpodRule>();\n for (UpodRule ur : for_program.getRules()) {\n if (ur.isExplicit()) {\n\t rules.add(ur);\n\t RuleInstance ri = new RuleInstance(ur,from_world.getUniverse());\n\t allrules.add(ri);\n }\n }\n\n Set<Condition> allconds = getConditions(allrules);\n\n tree_root = new TreeNode(allrules,null);\n\n expandTree(tree_root,allconds);\n\n generateRules(tree_root);\n}", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "public FlowRule(Flow flow, int seq) {\r\n super(flow, seq);\r\n }", "private void enterRules()\n {\n String ruleString = ruleTextField.getText();\n transition.buildRulesFromString(ruleString);\n ruleString = transition.buildStringFromRules();\n ruleTextField.setText(ruleString);\n optionsPanel.getWorkspacePanel().requestFocusInWindow();\n optionsPanel.getWorkspacePanel().repaint();\n // Daniel didn't like this automatic switching any more.\n // optionsPanel.getWorkspacePanel().setTool(LMWorkspacePanel.SELECT_TOOL);\n }", "void setRule(Rule rule);", "public static void main(String[] args)\n {\n /*\n * Create a new loader with default factory.\n * \n * A factory will create all rule components when loader requires them\n * Default engine is used that creates all the default constructs in:\n * org.achacha.rules.compare\n * org.achacha.rules.condition\n * org.achacha.rules.action\n * \n * RulesEngineFactoryExtension can be used to extend a default factory while keeping existing constructs\n * for basic rules the default factory provides a wide variety of comparators and action elements\n * \n * The loader uses the factory to resolve where the rule parts are loaded from\n * There are several load types (file system, in-memory string, in-memory XML)\n * Here we will configure a simple in-memory string based loader and add the\n * conditions and actions from constants\n */\n RulesEngineLoaderImplMappedString loader = new RulesEngineLoaderImplMappedString(new RulesEngineFactory());\n \n // Add a simple rule and call it 'alwaysTrue', we will execute this rule using this name\n loader.addRule(\"alwaysTrue\", SIMPLE_RULE);\n \n /*\n * Create a rules engine that uses the loader and factory we just created\n * Normally these 3 objects would be someone retained so we don't have to re-parse the rules every execution\n * However this is a tutorial example\n */\n RulesEngine engine = new RulesEngine(loader);\n \n /////////////////////////// Everything above is initialization ///////////////////////////////////////\n \n /////////////////////////// Everything below is rule execution ///////////////////////////////////////\n /*\n * Now we need to have some input for the rule to process but since were are using constants in comparison we can just pass\n * an empty input model\n * \n * We use dom4j XML Element for input\n * \n * <request>\n * <input />\n * </request>\n */\n Element request = DocumentHelper.createElement(\"request\");\n request.addElement(\"input\");\n \n /*\n * RuleContext is an object that holds the input, output, event log, etc for a given rule execution\n * The engine can create a new context for us if we specify the input for the rule\n */\n RuleContext ruleContext = engine.createContext(request);\n \n /*\n * Now that we have set up our context we can execute the rule\n * Since we used addRule above and called this rule 'alwaysTrue', this is how we invoke this rule\n * \n * NOTE:\n * you can run multiple rules sequentially against the same context\n * some actions can modify input context and some conditions can check output context\n * so rules can depend on other rules\n */\n engine.execute(ruleContext, \"alwaysTrue\");\n \n /*\n * Display the output model\n * \n * Since the action we used is:\n * \n * <Action Operator='OutputValueSet'>\"\n * <Path>/result</Path>\"\n * <Value Source='Constant'><Data>yes</Data></Value>\"\n * </Action>\"\n * \n * We get the following output model:\n * <output><result>yes</result></output>\n * \n * NOTE: The path on the output action is always relative to the output element\n */\n System.out.println(\"Output Model\\n------------\");\n System.out.println(ruleContext.getOutputModel().asXML());\n }", "public OrderRules() {\n this(DSL.name(\"order_rules\"), null);\n }", "private void applyRules () throws DataNormalizationException {\n\t\tapplyRules(null);\n\t}", "public abstract List<NARule> getRules(Context context);", "@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}", "@Override\n\tpublic void reportRuleInstantiation(Rule rule) {\n\t\t\n\t}", "public void droolsFusionSession(Netdata netdata) throws JSONException{\n KnowledgeBuilder kBuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();\n File file = getRulesFile();\n kBuilder.add(ResourceFactory.newFileResource(file.getPath()), ResourceType.DRL);\n if (kBuilder.hasErrors()){\n System.out.println(kBuilder.getErrors().toString());\n }\n\n // KnowledgeBaseConfiguration is used to set the event processing mode as STREAM\n KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();\n config.setOption(EventProcessingOption.STREAM);\n\n // KnowledgeBase: We created KnowledgeBase considering the connection of DRL files the KnowledgeBuilder has\n KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(config);\n kBase.addKnowledgePackages(kBuilder.getKnowledgePackages());\n\n // Pseudo Clock Configuration\n KnowledgeSessionConfiguration conf = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();\n conf.setOption(ClockTypeOption.get(\"realtime\"));\n\n// // StatefulKnowledgeSession: Once we have our KnowledgeBase we create a Session to use it\n StatefulKnowledgeSession kSession = kBase.newStatefulKnowledgeSession();\n\n// // If we have the pseudo clock the above code turns into\n// StatefulKnowledgeSession kSession = kBase.newStatefulKnowledgeSession(conf, null);\n// SessionPseudoClock clock = kSession.getSessionClock();\n\n // Create Netdata entry point\n WorkingMemoryEntryPoint netdataStream = kSession.getWorkingMemoryEntryPoint(\"Netdata\");\n insertEvent(netdataStream, netdata);\n\n NetdataBucket netdataBucketObj = new NetdataBucket();\n // Create NetdataBucket entry point\n WorkingMemoryEntryPoint netdataBucket = kSession.getWorkingMemoryEntryPoint(\"NetdataBucket\");\n netdataBucket.insert(netdataBucketObj);\n// netdataStream.insert(netdata);\n kSession.fireAllRules();\n\n kSession.dispose();\n System.out.println();\n\n// // get the path if the rules file (debug)\n// System.out.println(getRulesFile().getPath());\n\n// // print the rules file (debug)\n// printRules(rulesFile.getPath());\n }", "@Bean\n public RulesEngine getRulesEngine() {\n return new DefaultRulesEngine(new RulesEngineParameters().skipOnFirstAppliedRule(false));\n }", "public void add_rule(Rule rule) throws Exception;", "private S101() {\n\t\tsetType(RuleType.SCENARIO);\n\t}", "public abstract void setRules (CellProfile rules);", "@Override\n public void setRules(List rules) {\n this.rules = rules;\n if (schemaGraph != null) {\n // The change of rules invalidates the existing precomputed schema graph\n // This might be recoverable but for now simply flag the error and let the\n // user reorder their code to set the rules before doing a bind!\n throw new ReasonerException(\"Cannot change the rule set for a bound rule reasoner.\\nSet the rules before calling bindSchema\");\n }\n }", "@Override\r\n\tpublic void execute() throws BuildException {\r\n\r\n\t\tif (StringUtils.isBlank(getViewPath())) {\r\n\t\t\tthrow new BuildException(\"'viewpath' must be specified\");\r\n\t\t}\r\n\r\n\t\tSet<String> currentLoadRules = getCurrentLoadRules();\r\n\t\tlog(\"Current load rules: \" + currentLoadRules, Project.MSG_VERBOSE);\r\n\r\n\t\tString bl = determineBaseline();\r\n\t\tCcListBlcompRoots listBlRoots = new CcListBlcompRoots();\r\n\t\tlistBlRoots.setProject(getProject());\r\n\t\tlistBlRoots.setBaseline(bl);\r\n\t\tlistBlRoots.execute();\r\n\t\tlog(\"Required load rules: \" + listBlRoots.getLoadRules(),\r\n\t\t\t\tProject.MSG_VERBOSE);\r\n\t\tSet<String> toAdd = new HashSet<String>();\r\n\t\ttoAdd.addAll(listBlRoots.getLoadRules());\r\n\r\n\t\tString[] split = explicitLoadRules.split(System\r\n\t\t\t\t.getProperty(\"line.separator\"));\r\n\t\tfor (String string : split) {\r\n\t\t\ttoAdd.add(string);\r\n\t\t}\r\n\t\ttoAdd.removeAll(currentLoadRules);\r\n\t\tlog(\"Rules to add to view [\" + viewTag + \"] : \" + toAdd,\r\n\t\t\t\tProject.MSG_DEBUG);\r\n\r\n\t\tCcAddLoadRules addLoadRule = new CcAddLoadRules();\r\n\t\taddLoadRule.setProject(getProject());\r\n\t\taddLoadRule.setViewPath(getViewPath());\r\n\t\taddLoadRule.setOverwrite(true);\r\n\t\tfor (String newRule : toAdd) {\r\n\t\t\tif (!StringUtils.isEmpty(newRule)) {\r\n\t\t\t\taddLoadRule.setLoadRule(newRule);\r\n\t\t\t\taddLoadRule.execute();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public List<Rule> getRules() {\r\n\t\treturn rules;\r\n\t}", "public void setRule(int rule) {\n\t\tthis.rule = rule;\n\t}", "Flow createFlow();", "String getRules();", "public void setRule(IRule rule)\n\t{\n\t\tthis.rule = rule;\n\t}", "public FetchRule() {\n }", "@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }", "public void xsetRules(com.walgreens.rxit.ch.cda.StrucDocTable.Rules rules)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Rules target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().find_attribute_user(RULES$26);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().add_attribute_user(RULES$26);\n }\n target.set(rules);\n }\n }", "Flows createFlows();", "public RulesBook(Collection<Rule<A, B>> rules) {\n this(rules, StreamingRulesEngine.create());\n }", "public AscendingRules() {}", "private void applyRules(boolean install, FlowRule rule) {\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n\n ops = install ? ops.add(rule) : ops.remove(rule);\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n log.trace(\"HP Driver: - applyRules onSuccess rule {}\", rule);\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n log.trace(\"HP Driver: applyRules onError rule: \" + rule);\n }\n }));\n }", "public void refreshPushRules() {\n if (isAlive() && (null != mBingRulesManager)) {\n mBingRulesManager.loadRules(new SimpleApiCallback<Void>() {\n @Override\n public void onSuccess(Void info) {\n onBingRulesUpdate();\n }\n });\n }\n }", "private RuleDefinition() {\r\n \tthis.id = null;\r\n \tthis.name = null;\r\n \tthis.namespace = null;\r\n this.description = null;\r\n \tthis.typeId = null;\r\n \tthis.propId = null;\r\n this.active = true;\r\n \tthis.proposition = null;\r\n \tthis.actions = null;\r\n \tthis.attributes = null;\r\n this.versionNumber = null;\r\n }", "public LogicalRule(ExecutionPolicy...rules)\n\t\t{\n\t\t\tthis.rules = rules;\n\t\t}", "public ConfigurationValidator2D(VersionRules theRules){\n\t\tthis.theRules = theRules;\n\t}", "public ArrayList<String> getRules() {\n return rules;\n }", "public void setFlow(int flow) {\r\n\r\n this.flow = flow;\r\n }", "public void addRulesFile(String fileName) {\n\t\tString newFamilyRules = JenaRules.class.getClassLoader().getResource(fileName).getPath();//path of family rules\n\t\tList<Rule> newRules = Rule.rulesFromURL(newFamilyRules);\n\t\tReasoner newReasoner = new GenericRuleReasoner(newRules);\n\t\tthis.infmodel = ModelFactory.createInfModel(newReasoner, infmodel); //create new inference by adding new rules\n\t\tthis.infmodel.removeNsPrefix(this.prefix);\n\t}", "int getRulesCount();", "public interface FlowRule extends PiTranslatable {\n\n IndexTableId DEFAULT_TABLE = IndexTableId.of(0);\n int MAX_TIMEOUT = 60;\n int MIN_PRIORITY = 0;\n int MAX_PRIORITY = 65535;\n\n /**\n * Reason for flow parameter received from switches.\n * Used to check reason parameter in flows.\n */\n enum FlowRemoveReason {\n IDLE_TIMEOUT,\n HARD_TIMEOUT,\n DELETE,\n GROUP_DELETE,\n METER_DELETE,\n EVICTION,\n NO_REASON;\n\n /**\n * Covert short to enum.\n * @return reason in enum\n * @param reason remove reason in integer\n */\n public static FlowRemoveReason parseShort(short reason) {\n switch (reason) {\n case -1 :\n return NO_REASON;\n case 0:\n return IDLE_TIMEOUT;\n case 1:\n return HARD_TIMEOUT;\n case 2 :\n return DELETE;\n case 3:\n return GROUP_DELETE;\n case 4:\n return METER_DELETE;\n case 5:\n return EVICTION;\n default :\n return NO_REASON;\n }\n }\n }\n\n /**\n * Returns the ID of this flow.\n *\n * @return the flow ID\n */\n FlowId id();\n\n /**\n * Returns the application id of this flow.\n *\n * @return an applicationId\n */\n short appId();\n\n /**\n * Returns the group id of this flow.\n *\n * @return an groupId\n */\n GroupId groupId();\n\n /**\n * Returns the flow rule priority given in natural order; higher numbers\n * mean higher priorities.\n *\n * @return flow rule priority\n */\n int priority();\n\n /**\n * Returns the identity of the device where this rule applies.\n *\n * @return device identifier\n */\n DeviceId deviceId();\n\n /**\n * Returns the traffic selector that identifies what traffic this rule\n * should apply to.\n *\n * @return traffic selector\n */\n TrafficSelector selector();\n\n /**\n * Returns the traffic treatment that applies to selected traffic.\n *\n * @return traffic treatment\n */\n TrafficTreatment treatment();\n\n /**\n * Returns the timeout for this flow requested by an application.\n *\n * @return integer value of the timeout\n */\n int timeout();\n\n /**\n * Returns the hard timeout for this flow requested by an application.\n * This parameter configure switch's flow hard timeout.\n * In case of controller-switch connection lost, this variable can be useful.\n * @return integer value of the hard Timeout\n */\n int hardTimeout();\n\n /**\n * Returns the reason for the flow received from switches.\n *\n * @return FlowRemoveReason value of reason\n */\n FlowRemoveReason reason();\n\n /**\n * Returns whether the flow is permanent i.e. does not time out.\n *\n * @return true if the flow is permanent, otherwise false\n */\n boolean isPermanent();\n\n /**\n * Returns the table id for this rule.\n *\n * @return an integer.\n * @deprecated in Loon release (version 1.11.0). Use {@link #table()} instead.\n */\n @Deprecated\n int tableId();\n\n /**\n * Returns the table identifier for this rule.\n *\n * @return a table identifier.\n */\n TableId table();\n\n /**\n * {@inheritDoc}\n *\n * Equality for flow rules only considers 'match equality'. This means that\n * two flow rules with the same match conditions will be equal, regardless\n * of the treatment or other characteristics of the flow.\n *\n * @param obj the reference object with which to compare.\n * @return {@code true} if this object is the same as the obj\n * argument; {@code false} otherwise.\n */\n boolean equals(Object obj);\n\n /**\n * Returns whether this flow rule is an exact match to the flow rule given\n * in the argument.\n * <p>\n * Exact match means that deviceId, priority, selector,\n * tableId, flowId and treatment are equal. Note that this differs from\n * the notion of object equality for flow rules, which does not consider the\n * flowId or treatment when testing equality.\n * </p>\n *\n * @param rule other rule to match against\n * @return true if the rules are an exact match, otherwise false\n */\n boolean exactMatch(FlowRule rule);\n\n /**\n * A flowrule builder.\n */\n interface Builder {\n\n /**\n * Assigns a cookie value to this flowrule. Mutually exclusive with the\n * fromApp method. This method is intended to take a cookie value from\n * the dataplane and not from the application.\n *\n * @param cookie a long value\n * @return this\n */\n Builder withCookie(long cookie);\n\n /**\n * Assigns the application that built this flow rule to this object.\n * The short value of the appId will be used as a basis for the\n * cookie value computation. It is expected that application use this\n * call to set their application id.\n *\n * @param appId an application id\n * @return this\n */\n Builder fromApp(ApplicationId appId);\n\n /**\n * Sets the priority for this flow rule.\n *\n * @param priority an integer\n * @return this\n */\n Builder withPriority(int priority);\n\n /**\n * Sets the deviceId for this flow rule.\n *\n * @param deviceId a device id\n * @return this\n */\n Builder forDevice(DeviceId deviceId);\n\n /**\n * Sets the table id for this flow rule, when the identifier is of type {@link TableId.Type#INDEX}. Default\n * value is 0.\n * <p>\n * <em>Important:</em> This method is left here for backward compatibility with applications that specifies\n * table identifiers using integers, e.g. as in OpenFlow. Currently there is no plan to deprecate this method,\n * however, new applications should favor using {@link #forTable(TableId)}.\n *\n * @param tableId an integer\n * @return this\n */\n Builder forTable(int tableId);\n\n /**\n * Sets the table identifier for this flow rule.\n * Default identifier is of type {@link TableId.Type#INDEX} and value 0.\n *\n * @param tableId table identifier\n * @return this\n */\n Builder forTable(TableId tableId);\n\n /**\n * Sets the selector (or match field) for this flow rule.\n *\n * @param selector a traffic selector\n * @return this\n */\n Builder withSelector(TrafficSelector selector);\n\n /**\n * Sets the traffic treatment for this flow rule.\n *\n * @param treatment a traffic treatment\n * @return this\n */\n Builder withTreatment(TrafficTreatment treatment);\n\n /**\n * Makes this rule permanent on the dataplane.\n *\n * @return this\n */\n Builder makePermanent();\n\n /**\n * Makes this rule temporary and timeout after the specified amount\n * of time.\n *\n * @param timeout an integer\n * @return this\n */\n Builder makeTemporary(int timeout);\n\n /**\n * Sets the idle timeout parameter in flow table.\n *\n * Will automatically make it permanent or temporary if the timeout is 0 or not, respectively.\n * @param timeout an integer\n * @return this\n */\n default Builder withIdleTimeout(int timeout) {\n if (timeout == 0) {\n return makePermanent();\n } else {\n return makeTemporary(timeout);\n }\n }\n\n /**\n * Sets hard timeout parameter in flow table.\n * @param timeout an integer\n * @return this\n */\n Builder withHardTimeout(int timeout);\n\n /**\n * Sets reason parameter received from switches .\n * @param reason a short\n * @return this\n */\n Builder withReason(FlowRemoveReason reason);\n\n /**\n * Builds a flow rule object.\n *\n * @return a flow rule.\n */\n FlowRule build();\n\n }\n}", "public IronSyslogDrools() {\n this.mRuleFiles = new ArrayList<>();\n prepareRuleFiles();\n initialiseSession();\n }", "Rule createRule();", "Rule createRule();", "Rule createRule();", "public HashMap<String,Rule> get_rules_to_action() throws Exception;", "public void showRules() {\r\n data.rulesFlag = true;\r\n setChanged();\r\n notifyObservers(data);\r\n data.rulesFlag = false;\r\n }", "@Test\n\tpublic void testSimpleOneRuleExecutionWithExternalDataTest() {\n\t\tSkRuleBase rule = buildThings(ONE_RULE_FAIL_FILE_NAME, SkRuleBase.class, \"rule\");\n\t\tSkActions actions = buildThings(ONE_ACTION_FILE_NAME, SkActions.class, \"actions\");\n\n\t\tSkRuleMaster master = new SkRuleMaster.Builder().addRule(rule)\n\t\t\t\t.addActions(actions)\n\t\t\t\t.build();\n\n\t\tSkRuleRunner runner = master.getRuleRunner();\n\t\trule.run(runner);\n\t}", "public AccrualRule(){}", "public void start() {\r\n\t\tDatabaseHandler db = new DatabaseHandler(context);\r\n\t\trules = db.getAllRulesByType(type);\r\n\t\tdb.close();\r\n\t\tString sequence = \"\";\r\n\t\tfor (Rule r : rules) {\r\n\t\t\tif (r.getActive() == true) {\r\n\t\t\t\tsequence = r.getTreeData();\r\n\t\t\t\tCauseChecker c = new CauseChecker();\r\n\t\t\t\tc.execute(sequence, \"\" + r.getID());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void actionPerformed( ActionEvent e){\n\t\treadFile();\n\t\t//displaying all possible conditions lists.\n\t\tdisplayConditions();\n\t\t//loading unique rules along with there all possible inputs in an array (only for string rules)\n\t\tfillDistinctRules();\n\t}", "private static void getRulesFromFile() {\n File ruleFolder = new File(\"rules\");\n List<String> packageManagersWithRules = Stream.of(ruleFolder.list())\n .filter(f -> f.endsWith(\".rules\"))\n .map(f -> f.substring(0,f.lastIndexOf('.')))\n .sorted()\n .collect(Collectors.toList());\n\n RULES_BY_PACKAGE = new HashMap<>();\n for (String packagemanager : packageManagersWithRules) {\n RULES_BY_PACKAGE.put(packagemanager, parseRules(ruleFolder, packagemanager));\n }\n\n }", "public void analize() {\n\t\t//clearing dropping rules\n\t\tthis.droppingRules.clear();\n\t\t//analysing new rules\n\t\tanalizeParts();\n\t}", "public void rulesOnEnter() {\n try {\n String ruleString = ruleInputField.getText().toUpperCase();\n gOL.setRuleString(ruleString);\n ruleLabel.setText(gOL.getRuleString().toUpperCase());\n ruleInputField.setText(\"\");\n\n //Checks if the input matches any predefined rules. Clears the selection if not.\n if(!chooseRulesList.contains(gOL.getRuleName())){\n chooseRulesBox.getSelectionModel().clearSelection();\n }else{\n chooseRulesBox.getSelectionModel().select(gOL.getRuleName());\n }\n\n //Produces a warning if a RulesFormatException is thrown\n } catch (RulesFormatException rfe) {\n PopUpAlerts.ruleAlert2();\n }\n }", "Rule getRule();", "public void loadWorkflow(String filename);", "@Override\n\t\t\tpublic void fireAllRules() {\n\t\t\t\tthrow new IllegalStateException(\"Not implemented yet\");\n\t\t\t}", "private void applyOrSaveRules() {\n final boolean enabled = Api.isEnabled(this);\n final Context ctx = getApplicationContext();\n\n Api.generateRules(ctx, Api.getApps(ctx, null), true);\n\n if (!enabled) {\n Api.setEnabled(ctx, false, true);\n setDirty(false);\n return;\n }\n Api.updateNotification(Api.isEnabled(getApplicationContext()), getApplicationContext());\n new RunApply().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "@Test\n public void testFactsPreProcessorNoConfiguration() {\n DroolsRulesServiceFactoryFromFile reader = buildDefaultReader();\n\n EngineConfigDTO engine = new EngineConfigDTO();\n List<IFactsPreProcessor> preProcessors = reader.configurePreProcessors(engine, new ArrayList<String>());\n\n assertEquals(0, preProcessors.size());\n }", "private void applyTheRule() throws Exception {\n System.out.println();\n System.out.println();\n System.out.println();\n System.out.println(\"IM APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n System.out.println();\n if (parameter.rule.equals(\"1\")) {\n Rule1.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"2\")) {\n Rule2.apply(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3\")) {\n Rule3.all(resultingModel);\n System.out.println();\n }\n\n if (parameter.rule.equals(\"3a\")) {\n Rule3.a(resultingModel);\n\n }\n\n if (parameter.rule.equals(\"3b\")) {\n Rule3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"3c\")) {\n Rule3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"4\")) {\n Rule4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"4a\")) {\n Rule4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"4b\")) {\n Rule4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"4c\")) {\n Rule4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r1\")) {\n Reverse1.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r2\")) {\n Reverse2.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3\")) {\n Reverse3.apply(resultingModel, parameter.aggregateBy);\n }\n\n if (parameter.rule.equals(\"r3a\")) {\n Reverse3.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3b\")) {\n Reverse3.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r3c\")) {\n Reverse3.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4\")) {\n Reverse4.all(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4a\")) {\n Reverse4.a(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4b\")) {\n Reverse4.b(resultingModel);\n }\n\n if (parameter.rule.equals(\"r4c\")) {\n Reverse4.c(resultingModel);\n }\n\n if (parameter.rule.equals(\"5\")){\n Rule5.apply(resultingModel);\n }\n\n System.out.println(\"IM DONE APPLYING RULE \" + this.parameter.rule + \" ON MODEL: \" + this.resultingModel.path);\n\n this.resultingModel.addRule(parameter);\n //System.out.println(this.resultingModel.name);\n this.resultingModel.addOutputInPath();\n }", "@Override\n\tpublic void check() throws ApiRuleException {\n\t\t\n\t}", "public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }", "public List< Flow > useCaseFlows() {\r\n\t\tif ( null == getUseCase() ) {\r\n\t\t\treturn new ArrayList< Flow >();\r\n\t\t}\r\n\t\treturn getUseCase().getFlows();\r\n\t}", "public void fireRules() throws Exception {\n if(isRulesFired.compareAndSet(false, true)) {\n this.outcome = new GameOutcome();\n List<Object> ruleInputs = new ArrayList<>();\n ruleInputs.add(player1);\n ruleInputs.add(player2);\n DrlUtilities.fireRulesForScope(SCOPE, ruleInputs, \"outcome\", this.outcome);\n }\n assertNotNull(this.outcome);\n }", "@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }", "public void setRules(com.walgreens.rxit.ch.cda.StrucDocTable.Rules.Enum rules)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(RULES$26);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(RULES$26);\n }\n target.setEnumValue(rules);\n }\n }", "void activateFlowStorer();", "@Test\n public void testLoadPolicy() throws ControlLoopException {\n mgr.start();\n\n assertNull(mgr.getFinalResult());\n\n MyStep step = mgr.getSteps().peek();\n assertNotNull(step);\n assertEquals(\"First\", step.getActorName());\n assertEquals(\"OperationA\", step.getOperationName());\n\n ControlLoopOperationParams params2 = step.getParams();\n assertSame(actors, params2.getActorService());\n assertSame(REQ_ID, params2.getRequestId());\n assertSame(ForkJoinPool.commonPool(), params2.getExecutor());\n assertNotNull(params2.getTargetType());\n assertNotNull(params2.getTargetEntityIds());\n assertEquals(Integer.valueOf(300), params2.getTimeoutSec());\n assertEquals(Integer.valueOf(0), params2.getRetry());\n assertThat(params2.getPayload()).isEmpty();\n assertNotNull(params2.getStartCallback());\n assertNotNull(params2.getCompleteCallback());\n }", "public int parseRulesFile() {\n\t BufferedReader reader = null;\n\t List<String> allLines = new ArrayList<String>();\n\t List<String> allLinesWithLintChecks = new ArrayList<String>();\n\t listOfRules = new ArrayList<String>();\n\t boolean eof = false;\n\t try {\n\t reader = new BufferedReader(new FileReader(pathTextFile));\n\t while (!eof) {\n\t String line = reader.readLine();\n\n\t if (line != null) {\n\t allLines.add(line);\n\t } else {\n\t eof = true;\n\t }\n\t }\n\n\t for (String line : allLines) {\n\t if (line.contains(\":\") && line.contains(\"\\\"\")) {\n\t allLinesWithLintChecks.add(line);\n\t }\n\t }\n\n\t for (String rule : allLinesWithLintChecks) {\n\t int position = rule.indexOf(\":\");\n\t listOfRules.add(rule.substring(1, position - 1));\n\t }\n\t } catch (FileNotFoundException ex) {\n\t System.err.println(\"File not found!\");\n\t ex.printStackTrace();\n\t } catch (IOException ex) {\n\t System.err.println(\"Error!!\");\n\t ex.printStackTrace();\n\t } finally {\n\t try {\n\t reader.close();\n\t } catch (IOException ex1) {\n\t System.out.println(\"Error when closing file !!\");\n\t }\n\t }\n\t return listOfRules.size();\n\t }", "public HashMap<String,ArrayList<Rule_in_State>> get_rules_of_next_state() throws Exception;", "public final RuleBaseFacility getRules()\n{\n\treturn _rules;\n}", "private static void go(List<CodeShapeRule> rules, List<State> states) {\n\t\trules.stream().map(rule -> new Feature(rule, rule.index)).collect(Collectors.toList());\n\n\t}", "@Override\n\tpublic void define(Context context) {\n\t\tcontext.addExtension(JavaCustomRulesDefinition.class);\n\n\t\t// batch extensions -> objects are instantiated during code analysis\n\t\tcontext.addExtension(JavaCustomRulesCheckRegistrar.class);\n\t}", "private void load() {\r\n\t\tswitch (this.stepPanel.getStep()) {\r\n\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\tloadGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\tloadPairs();\r\n\t\t\tbreak;\r\n\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "public interface RulesManager extends RulesService {\n\n boolean applyPortForwardingRules(long ipAddressId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyPortForwardingRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void checkIpAndUserVm(IpAddress ipAddress, UserVm userVm, Account caller);\n\n void checkRuleAndUserVm(FirewallRule rule, UserVm userVm, Account caller);\n\n boolean revokeAllPFAndStaticNatRulesForIp(long ipId, long userId, Account caller) throws ResourceUnavailableException;\n\n boolean revokeAllPFStaticNatRulesForNetwork(long networkId, long userId, Account caller) throws ResourceUnavailableException;\n\n List<? extends FirewallRule> listFirewallRulesByIp(long ipAddressId);\n\n /**\n * Returns a list of port forwarding rules that are ready for application\n * to the network elements for this ip.\n * \n * @param ip\n * @return List of PortForwardingRule\n */\n List<? extends PortForwardingRule> listPortForwardingRulesForApplication(long ipId);\n\n List<? extends PortForwardingRule> gatherPortForwardingRulesForApplication(List<? extends IpAddress> addrs);\n\n boolean revokePortForwardingRulesForVm(long vmId);\n\n boolean revokeStaticNatRulesForVm(long vmId);\n\n FirewallRule[] reservePorts(IpAddress ip, String protocol, FirewallRule.Purpose purpose, boolean openFirewall, Account caller, int... ports) throws NetworkRuleConflictException;\n\n boolean releasePorts(long ipId, String protocol, FirewallRule.Purpose purpose, int... ports);\n\n List<PortForwardingRuleVO> listByNetworkId(long networkId);\n\n boolean applyStaticNatForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyStaticNatsForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void getSystemIpAndEnableStaticNatForVm(UserVm vm, boolean getNewIp) throws InsufficientAddressCapacityException;\n\n boolean disableStaticNat(long ipAddressId, Account caller, long callerUserId, boolean releaseIpIfElastic) throws ResourceUnavailableException;\n\n}", "private CoreFlowsAll() {\n }", "public ParserRules(InputStream inputStream, boolean logBit) {\n\n\t\tlexAnalyser = new LexicalAnalyser(inputStream);\n\t\ttry {\n\t\t\tlog = new ParserLog(logBit);\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\tpeekToken = lexAnalyser.peekToken();\n\t\tfunctionStack = new ArrayDeque<String>();\n\t}", "public void buildFlow(FlowDO flow) {\n\t}", "public ParallelProcessor(List<Rule> rules) {\n _rules = rules;\n }", "public InboundSecurityRules() {\n }", "public CcUpdateLoadRules(String command) {\r\n super(command);\r\n }" ]
[ "0.68419904", "0.6802403", "0.6700146", "0.66220754", "0.6569806", "0.627001", "0.6224775", "0.6148449", "0.60894513", "0.60483474", "0.60075074", "0.5955839", "0.59498554", "0.5924517", "0.5916717", "0.5824446", "0.576085", "0.57229555", "0.569271", "0.567064", "0.5649081", "0.55911386", "0.5573679", "0.5552915", "0.5523873", "0.5485799", "0.5444812", "0.5443903", "0.5440042", "0.5397024", "0.53609294", "0.5345504", "0.5330637", "0.5329135", "0.5326562", "0.53253824", "0.53233075", "0.53138983", "0.530954", "0.52872586", "0.52857363", "0.5283691", "0.52809876", "0.5275063", "0.5275", "0.5273681", "0.52706224", "0.52699786", "0.52622753", "0.5259153", "0.5251873", "0.52397597", "0.51953536", "0.51909286", "0.51902056", "0.51612896", "0.5160074", "0.5154266", "0.51487434", "0.5133985", "0.51208085", "0.51208085", "0.51208085", "0.51185024", "0.5118075", "0.51180553", "0.51173544", "0.5098479", "0.50975287", "0.50966305", "0.50868", "0.50841343", "0.50824726", "0.50705045", "0.5069608", "0.5069361", "0.5069261", "0.5065258", "0.5062475", "0.505904", "0.50508106", "0.50504816", "0.50390095", "0.5036787", "0.50359285", "0.5035714", "0.5031675", "0.50277865", "0.5026909", "0.50255036", "0.502507", "0.502104", "0.50206155", "0.50141233", "0.5013502", "0.5007518", "0.5005884", "0.50050616", "0.500073", "0.49735892" ]
0.58407515
15
Set up basic information, only for demo purpose. You may adjust them based on your actual environment. For more information, please refer
private void loadRules2() { int type = Integer.valueOf(env.getProperty("sentinel.server.type")) ; String appId = "sentinel-demo"; String apolloMetaServerAddress = "http://10.1.77.106:8080"; System.setProperty("app.id", appId); System.setProperty("apollo.meta", apolloMetaServerAddress); String namespaceName = "application"; String flowRuleKey = "flowRules"; // It's better to provide a meaningful default value. String defaultFlowRules = "[]"; ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ApolloDataSource<>(namespaceName, flowRuleKey, defaultFlowRules, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() { })); FlowRuleManager.register2Property(flowRuleDataSource.getProperty()); ClusterFlowRuleManager.setPropertySupplier(namespace ->flowRuleDataSource.getProperty()); if (ClusterStateManager.CLUSTER_SERVER == type) { ClusterStateManager.applyState(ClusterStateManager.CLUSTER_SERVER); } else { ClusterStateManager.applyState(ClusterStateManager.CLUSTER_CLIENT); initClientConfigProperty(namespaceName); initClientServerAssignProperty(namespaceName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setup() {\n }", "public void setup() {\r\n\r\n\t}", "public void setup() {\r\n\t\tthis.greet(\"Hello, my name is \" + this.name + \", this message is brought to you from the AI.java file under the greet method!\");\r\n\t\t//TODO ask for name\r\n\t\t// check if setup file exists and make sure nothing is invalid\r\n\t\t/*if(!(fileManager.getFile(\"settings.cy\").exists())) { // TODO finish this\r\n\t\t\tFile settings = fileManager.createFile(\"settings\");\r\n\t\t\tint i = 0;\r\n\t\t\tfileManager.writeToFile(settings, \"color: red\", i++);\r\n\t\t\t// no other settings at the moment\r\n\t\t}*/\r\n\t}", "protected void setup() {\r\n }", "public void startDemo() {\n // Welcoming display\n this.view.displayMenu();\n\n // State of the inventory and the users\n this.view.displaySystem(this.system);\n\n this.view.displayExampleMessage();\n\n // Example with a student\n Student s = this.system.getStudents().get(0);\n\n Calendar startDate = Calendar.getInstance();\n Calendar endDate = Calendar.getInstance();\n endDate.setTimeInMillis(endDate.getTimeInMillis() + 6*24*60*60*1000);\n\n Loan l = s.book(Model.IPAD3, new Period(startDate, endDate));\n this.system.checkLoan(l);\n\n this.view.displayBorrow(s, l);\n this.system.putAway(l);\n this.view.displayReturn(s, l);\n\n // Example with a teacher\n\n Teacher t = this.system.getTeachers().get(0);\n\n Loan l2 = s.book(Model.XPERIAZ, new Period(startDate, endDate));\n this.system.checkLoan(l2);\n\n this.view.displayBorrow(t, l2);\n this.system.putAway(l2);\n this.view.displayReturn(t, l2);\n\n }", "@Before\n\tpublic void setup(){\n\t\tuuid = UUID.randomUUID();\n\t\ttitle = \"The Dark Knight\";\n\t\tdescription = \"Nanananana Batmaaaaan!\";\n\t\tstartDate = new Date(2008, 01, 01);\n\t\ttagLabel = \"Test-Tag\"; \n\t}", "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 initialize() {\n\ttry {\n\t\t// user code begin {1}\n\t\t// user code end\n\t\tsetName(\"PlatformInfoPanel\");\n\t\tsetLayout(null);\n\t\tsetSize(353, 240);\n\t\tadd(getPnlOS(), getPnlOS().getName());\n\t\tadd(getPnlJava(), getPnlJava().getName());\n\t} catch (java.lang.Throwable ivjExc) {\n\t\thandleException(ivjExc);\n\t}\n\t// user code begin {2}\n\tgetTxtOSName().setText(System.getProperty(\"os.name\"));\n\tgetTxtOSArchitecture().setText(System.getProperty(\"os.arch\"));\n\tgetTxtOSVersion().setText(System.getProperty(\"os.version\"));\n\tgetTxtOSLocale().setText(java.util.Locale.getDefault().toString());\n\tgetTxtJavaVersion().setText(System.getProperty(\"java.version\"));\n\tgetTxtJavaVMVersion().setText(System.getProperty(\"java.vm.version\"));\n\t// user code end\n}", "protected void setupImpl()\n {\n hint(DISABLE_DEPTH_TEST);\n font = loadFont(\"Futura-CondensedExtraBold-200.vlw\");\n textFont(font, 200);\n mode = 0;\n\n // Mode 3\n w = width * 2;\n dx = (TWO_PI / period) * xspacing;\n yvalues = new float[w/xspacing];\n\n // Mode 5\n mod = loadImage(\"mod.png\");\n modSizes = new int[scaledBandLevels.length];\n }", "@Override\n protected void setup() {\n }", "public DemonstrationApp()\n {\n // Create Customers of all 3 types\n s = new Senior(\"alice\", \"123 road\", 65, \"555-5555\", 1);\n a = new Adult(\"stacy\", \"123 lane\", 65, \"555-1111\", 2);\n u = new Student(\"bob\", \"123 street\", 65, \"555-3333\", 3);\n \n //Create an account for each customer \n ca = new CheckingAccount(s,1,0);\n sa = new SavingsAccount(a,2,100);\n sav = new SavingsAccount(u,3,1000);\n \n //Create a bank\n b = new Bank();\n \n //Create a date object\n date = new Date(2019, 02, 12);\n }", "public static void setup() {\n/* 78 */ s_envCurrentJRE = getProperty(\"jnlpx.jpda.env\");\n/* 79 */ o_envCurrentJRE = decodeJpdaEnv(s_envCurrentJRE);\n/* */ \n/* */ \n/* */ \n/* 83 */ if (getProperty(\"jpda.notification\") != null) {\n/* 84 */ showJpdaNotificationWindow(o_envCurrentJRE);\n/* 85 */ Main.systemExit(0);\n/* */ } \n/* */ }", "private void setup() {\n\t\tJTextArea jta = new JTextArea();\n\t\tsetLayout(new BorderLayout());\n\t\tadd(new JScrollPane(jta), BorderLayout.CENTER);\n\t\tsetTitle(SERVER_NAME);\n\t\tjta.setEditable(false);\n\t\tsetSize(500, 300);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t\tjta.append(new Date().toString());\n\t}", "public void prepare() {\r\n\t\tsuper.prepare();\r\n\t\tSystem.out.println(\" - Gather the grains\");\r\n\t\tSystem.out.println(\" - Shape into circles\");\r\n\t\tSystem.out.println(\" - Randomly color circles\");\r\n\t\tSystem.out.println(\" - Let circles dry\");\r\n\t}", "public Informations() {\n initComponents();\n \n Affichage();\n }", "public void set_info() {\n System.out.println(\"The name of the donor is \" + donor_name);\n System.out.println(\"The rating of the donor is \" + donor_rating); //display\n }", "private void setupDefaultAsPerProperties()\n {\n /// Do the minimum of what App.init() would do to allow to run.\n Gui.mainFrame = new MainFrame();\n App.p = new Properties();\n App.loadConfig();\n System.out.println(App.getConfigString());\n Gui.progressBar = Gui.mainFrame.getProgressBar(); //must be set or get Nullptr\n\n // configure the embedded DB in .jDiskMark\n System.setProperty(\"derby.system.home\", App.APP_CACHE_DIR);\n\n // code from startBenchmark\n //4. create data dir reference\n App.dataDir = new File(App.locationDir.getAbsolutePath()+File.separator+App.DATADIRNAME);\n\n //5. remove existing test data if exist\n if (App.dataDir.exists()) {\n if (App.dataDir.delete()) {\n App.msg(\"removed existing data dir\");\n } else {\n App.msg(\"unable to remove existing data dir\");\n }\n }\n else\n {\n App.dataDir.mkdirs(); // create data dir if not already present\n }\n }", "public void setup()\n {\n }", "@Test(priority = 1)\r\n\tpublic void setup() {\n\t\tResponse res = get(\"http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22\");\r\n\t\tint rescode = res.getStatusCode();\r\n\t\tSystem.out.println(\"Api response code \" + rescode);\r\n\t}", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "@Override\n public void simpleInitApp() {\n configureCamera();\n configureMaterials();\n viewPort.setBackgroundColor(new ColorRGBA(0.5f, 0.2f, 0.2f, 1f));\n configurePhysics();\n initializeHeightData();\n addTerrain();\n showHints();\n }", "public static void intro() {\n System.out.println(\"-----------------------------------------------------------------------\");\n System.out.println(\"Project Phase One\\nCPSC 377\\nVincent Tennant\\n230099844\");\n System.out.println(\"A simple interface to do unit testsing, perform the XOR problem, and give an example of a\\n\" +\n \"rubix cube neural network. The XOR problem and the rubix cube problems will be performed using neural\\n\" +\n \"networks, and trained by stochastic backpropagation.\");\n }", "public void setup() {\n\n\t\t// example of loading an image file - edit to suit your project\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"angrybirds.jpg\"));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// your code here\n\t\t\n\t\t\n\t}", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "@Override\r\n public void info() {\n System.out.println(\"开始介绍\");\r\n }", "public void setUpData() {\n generalStatsCalculator.calculateOffsetTrees();\n this.MostEmissionsRouteString =\n RoutesArrayToString(routeStatsCalculator.getMostEmissionsRoutes());\n this.LeastEmissionsRouteString =\n RoutesArrayToString(routeStatsCalculator.getLeastEmissionsRoutes());\n this.MostDistanceRouteString =\n RoutesArrayToString(routeStatsCalculator.getMostDistanceRoutes());\n this.LeastDistanceRouteString =\n RoutesArrayToString(routeStatsCalculator.getLeastDistanceRoutes());\n this.MostVisitedSourceAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getMostVisitedSrcAirports());\n this.LeastVisitedSourceAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getLeastVisitedSrcAirports());\n this.MostVisitedDestAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getMostVisitedDestAirports());\n this.LeastVisitedDestAirportString =\n CombineAirportsToOneString(airportStatsCalculator.getLeastVisitedDestAirports());\n numOfTreesToString(generalStatsCalculator.getTreesToGrow());\n generalStatsCalculator.createCarbonEmissionsComment();\n }", "public void setup() {\n font = loadFont(\"Georgia-Italic-24.vlw\"); \n textFont(font,24);\n \n system = new System();\n keyboard = new Keyboard();\n //hmmm... controller definitions:\n //application = new Controller(); // this could contain subcontrollers?\n analyze = new Analyze();\n header = new Header();\n server = new Server();\n \n //size(640, 480, P2D);\n //size(1280, 720, P2D);\n // Or run full screen, more fun! Use with Sketch -> Present\n size(screen.width, screen.height-20, P2D);\n \n //video = new Video(this,640,480,0);\n video = new Video(this,1280,720,0);\n spectrum = new Spectrum(int (height-headerHeight)/2,int (height*(0.18))); //history (length),samplerow (row # to begin sampling)\n filter = new Filter(this);\n }", "private void initializeWithDefaultValues() {\n setProjectFolder(\"projectFolder\");\n setContext(\"context\");\n setGroupId(\"com.company.project\");\n setArtifactId(\"project\");\n setModulePrefix(\"project-\");\n setVersion(\"0.0.1-SNAPSHOT\");\n setName(\"Project Name\");\n setDescription(\"Project Description\");\n setUrl(\"https://www.company-project.com\");\n setInceptionYear(String.valueOf(LocalDateTime.now().getYear()));\n setOrganizationName(\"Your Company Name\");\n setOrganizationUrl(\"https://www.company.com\");\n setLicenseName(\"apache_v2\");\n setLicenseUrl(\"https://www.license-url.com\");\n setScmConnection(\"\");\n setScmDeveloperConnection(\"\");\n setScmUrl(\"\");\n setDistributionProfile(\"\");\n setExtraModules(new LinkedHashSet<>());\n setContextDescriptions(new LinkedHashSet<>());\n setAppConfigLocationType(AppConfigLocationType.INSIDE);\n }", "private void setup()\n {\n putValue(NAME, \"Copy\");\n putValue(SMALL_ICON, new ImageIcon(getClass().getResource(\"/res/copy16.gif\")));\n putValue(SHORT_DESCRIPTION, \"Copy the selected data record\");\n putValue(LONG_DESCRIPTION, \"Copy the selected data record\");\n putValue(MNEMONIC_KEY, new Integer(KeyEvent.VK_C));\n putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.SHIFT_MASK));\n putValue(ACTION_COMMAND_KEY, \"copy-command\");\n }", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "public void start()\n\t{\n\t\t\n//\t\tlistExample();\n\t\tlistExample2();\n\t\t\n//\t\tstart1();\n\t\t// forPractice();\n\t//\t askUser();\n\t//\t Looooop2();\n//\t\t myLooooop();\n\t//\t JOptionPane.showMessageDialog(null, myProperties); //THIS WOULD PRINT THE\n\t\t// DEFAULT VALUES!!!\n\t\t \n\n\t}", "@Override\n public void setup() {\n\n }", "private void initialize() {\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(createInfoTable(), BorderLayout.CENTER);\r\n\r\n\t\t// load the data\r\n\t\ttry {\r\n\t\t\tProperties props = System.getProperties();\r\n\t\t\tEnumeration names = props.propertyNames();\r\n\t\t\twhile (names.hasMoreElements()) {\r\n\t\t\t\tString name = (String) names.nextElement();\r\n\t\t\t\tString value = props.getProperty(name);\r\n\t\t\t\tObject[] row = new Object[2];\r\n\t\t\t\trow[0] = name;\r\n\t\t\t\trow[1] = value;\r\n\t\t\t\tm_model.addRow(row);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t}", "public static void setup() {\n\t\toutputs.add(new Console.stdout());\n\t}", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "@Before\n public void setUp() {\n Assume.assumeTrue(!IS_CIRCLE_BUILD);\n\n searchField = myDashboard.searchField;\n showAllButton = myDashboard.showAllButton;\n subjectCheckboxes = myDashboard.subjectCheckboxes;\n openPresButton = myDashboard.openPresButton;\n fileChooser = myDashboard.fileChooser;\n menuBar = myDashboard.menuBar;\n calendarNode = myDashboard.calendarNode;\n calendar = myDashboard.calendar;\n\n subjectSortCombo = myDashboard.subjectSortCombo;\n moduleSortCombo = myDashboard.moduleSortCombo;\n presSortCombo = myDashboard.presSortCombo;\n\n subjectPanels = myDashboard.subjectPanels;\n presentationPanels = myDashboard.presentationPanels;\n modulePanels = subjectPanels.get(0).getModulePanels();\n }", "@BeforeMethod\n\tpublic void setup()\n\t{\n\t ExtentHtmlReporter reporter=new ExtentHtmlReporter(\"./Reports/amazon.html\");\n\t\t\n\t extent = new ExtentReports();\n\t \n\t extent.attachReporter(reporter);\n\t \n\t logger=extent.createTest(\"LoginTest\");\n\t}", "public void setUpTestdata() {\n\t\tsetDefaultUserName(Config.getProperty(\"defaultUserName\"));\r\n\t\tsetDefaultPassword(Config.getProperty(\"defaultPassword\"));\r\n\t\tsetTestsiteurl(Config.getProperty(\"testsiteurl\"));\r\n\t\tsetChromeDriverPath(Config.getProperty(\"chromeDriverPath\"));\r\n\t\tsetGeckoDriverPath(Config.getProperty(\"geckoDriverPath\"));\r\n\t\tsetIeDriverPath(Config.getProperty(\"ieDriverPath\"));\r\n\t}", "@Override\n\tprotected void setup() {\n\t\tcarImg();\n\t\tsetResolution(Resolution.MSX);\n\t\tsetFramesPerSecond(100);\n\t\t\n\t\tbola = new Bola();\n\n\t\tbotoes();\n\n\t\tcriaBlocos();\n\n\t\tpaddle = new Paddle();\n\n\t\t\n\n\t}", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "public void setup(){\n this.cluster = Cluster.builder().addContactPoint(\"127.0.0.1\").build();\n this.session = this.cluster.connect(\"demo\");\n }", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "@Override\r\n\tprotected void setup() {\n\t\tgetContentManager().registerLanguage(codec);\r\n\t\tgetContentManager().registerOntology(ontology);\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\t\tif(args != null && args.length > 0) {\r\n\t\t\tbroker = (Broker)args[0];\r\n\t\t} else {\r\n\t\t\tbroker = new Broker(\"Broker\");\r\n\t\t}\r\n\t\t\r\n\t\tProgramGUI.getInstance().printToLog(broker.hashCode(), getLocalName(), \"created\", Color.GREEN.darker());\r\n\t\t\r\n\t\t// Register in the DF\r\n\t\tDFRegistry.register(this, BROKER_AGENT);\r\n\t\t\r\n\t\tsubscribeToRetailers();\r\n\t\tquery();\r\n\t\tpurchase();\r\n\t}", "public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "protected void setupParameters() {\n \n \n\n }", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public void setup() {\n statsTable();\n spawnsTable();\n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "public void setupProperties() {\n // left empty for subclass to override\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "private void initData() {\n requestServerToGetInformation();\n }", "public void setup() {\n\tsize(800, 600);\n\t// other stuff.\n }", "@BeforeMethod\n\tpublic void setup() {\n\t\tinitialization();\n\t\tloginpage = new LoginPage();\n\t\tcontactpage=new ContactPage();\n\t\ttestutil = new TestUtil();\n\t\thomepage=loginpage.login(prop.getProperty(\"username\"), prop.getProperty(\"password\"));\n\t}", "@Test(enabled= true,description = \"Create Assets/Deals and add pre-requites data which is given in Manual Test Case\")\r\n\tpublic void preRequisites() throws Exception {\r\n\r\n\t\t\r\n\t}", "private void setup() {\n\t\t map.setMyLocationEnabled(true);\n\t \n\t CameraPosition cameraPosition = new CameraPosition.Builder()\n\t .target(USMP_LOCATION) // Sets the center of the map to\n\t // Golden Gate Bridge\n\t .zoom(16) // Sets the zoom\n\t .bearing(90) // Sets the orientation of the camera to east\n\t .tilt(60) // Sets the tilt of the camera to 30 degrees\n\t .build(); // Creates a CameraPosition from the builder\n\t \n\t CameraUpdate cameraUpdate=CameraUpdateFactory.newCameraPosition(\n\t \t cameraPosition);\n\t\t map.animateCamera(cameraUpdate);\n\t\t \n\t map.addMarker(new MarkerOptions()\n\t .position(USMP_LOCATION)\n\t .title(\"DevFest 2013 Season 2\"));\n\t}", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "public void showInformation() {\n\t\tSystem.out.println(\"Title: \" + getTitle());\n\t\tSystem.out.println(\"Time: \" + getTime());\n\t\tSystem.out.println(\"Number: \" + getNumber());\n\t}", "public Ventana_Central() {\n initComponents();\n setup();\n }", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "public static void show(){\n // We will test all the APIs here\n System.out.println(\"Pasture seeds: \" + PastureSeed.count + \"\\tPasture product : \" + PastureProduct.count);\n System.out.println(\"Corn seeds: \" + CornSeed.count + \"\\t\\tCorn product : \" + CornProduct.count);\n System.out.println(\"Rice seeds: \" + RiceSeed.count + \"\\t\\tRice product : \" + RiceProduct.count);\n }", "public void initialize() {\n\n Employee emp = new Employee(\"jaden Williams\", \"abEFc123!\");\n\n //Widget newProductTest = new Widget(\"iPod45\", \"Apple\", ItemType.AUDIO); //Test widget\n\n System.out.println(\"Launched program\");\n loadDatabaseProducts();\n loadDatabaseRecords();\n tableViewSetup(); //Sets up table structure\n populateProductLineTabs(); //Populates item type dropdown\n populateItemQuantity(); //Populates quantity dropdown\n //testMultimedia(); //Testing\n //testProductionRecord(); //Testing text log on last page\n }", "public void show(){\n System.out.println(\"Welcome to Edureka's Tutorial\");\n }", "public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}", "@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}", "void setup();", "void setup();", "void setup();", "public void setup() {\n space = null;\n rabbitList = new ArrayList<>();\n schedule = new Schedule(1);\n\n //recreate main window\n if (displaySurf != null) {\n displaySurf.dispose();\n }\n displaySurf = null;\n displaySurf = new DisplaySurface(this, \"Rabbits Grass Simulation 1\");\n registerDisplaySurface(\"Rabbits Grass Simulation 1\", displaySurf);\n\n //recreate population plot\n if (populationPlot != null) {\n populationPlot.dispose();\n }\n populationPlot = null;\n populationPlot = new OpenSequenceGraph(\"Population Plot\", this);\n populationPlot.setYAutoExpand(false);\n populationPlot.setYRange(0, 200);\n this.registerMediaProducer(\"Plot\", populationPlot);\n }", "private InformationManager() {\n\t\tlives = ConfigurationManager.getConfigurationManager().getConfiguration().getLives();\n\t\tshields = ConfigurationManager.getConfigurationManager().getConfiguration().getShields();\n\t}", "public void setup() {\n \n populating_variables();\n frameRate(120);\n background(white);\n load_songs();\n instructions();\n music_player_setup();\n scrollable_list();\n}", "public void setUp() {\n getRef().println(\"'token image' [offset, length]; tokenID name; tokenID id; token category name; <list of token context names>\\n--------------------\\n\");\n }", "public void setup()\n\t\t{\n\t\tsize(800, 600, P3D);\n\t\tsmooth();\n\t\tgfx = new ToxiclibsSupport(this);\n\t\tvoronoi = new Voronoi();\n\t\t// focus x positions around horizontal center (w/ 33% standard deviation)\n\t\txPos = new BiasedFloatRange(0, width, width / 2, 0.333f);\n\t\t// focus y positions around bottom (w/ 50% standard deviation)\n\t\tyPos = new BiasedFloatRange(0, height, height, 0.5f);\n\t\tclipper = new SutherlandHodgemanClipper(new Rect(0, 0, width, height));\n\t\tpos = new ArrayList<Vec2D>();\n\t\theights = new ArrayList<Vec3D>();\n\t\tdoShowPoint = true;\n\t\tdoShowPolygon = true;\n\t\tdoTriangle = true;\n\t\tdoTerrain = false;\n\t\tdoInteract = true;\n\t\t//addGridSites();\n\t\t}", "protected void setup() {\n\n // Setup budget randomly between 1000 - 2000\n budget = rn.nextInt(1000) + 1000;\n\t\tSystem.out.println(\"Hello! Bidder \"+getAID().getName()+\" is ready with budget \" + budget);\n\n\t\t// Create and show the GUI \n\t\tmyGui = new BidderHumanGUI(this);\n\t\tmyGui.showGui();\n\n\t\t// Register as bidder to the yellow pages\n\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\tdfd.setName(getAID());\n\t\tServiceDescription sd = new ServiceDescription();\n\t\tsd.setType(\"blind-auction\");\n\t\tsd.setName(\"Blind-Auction\");\n\t\tdfd.addServices(sd);\n\t\ttry {\n\t\t\tDFService.register(this, dfd);\n\t\t}\n\t\tcatch (FIPAException fe) {\n\t\t\tfe.printStackTrace();\n\t\t}\n\n\t\t// Add the behaviour for receiving CFP from Auctioneer\n\t\taddBehaviour(new ReceiveCFPHuman(this));\n\n\t\t// Add the behaviour for receiving item --as the auction winner\n\t\taddBehaviour(new ReceiveItemAsWinnerHuman(this));\n\t}", "private void setup() {\n\t\tpopulateEntitiesLists();\n\t\t// rayHandler.setCombinedMatrix(batch.getProjectionMatrix());\n\t\tambientColor = Color.CLEAR;\n\t\tsetAmbientAlpha(.3f);\n\t\tfpsLogger = new FPSLogger();\n\t\tdynamicEntities = new ArrayList<DynamicEntity>();\n\t\tfont.getData().setScale(DEBUG_FONT_SCALE);\n\t}", "public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }", "@Before\n\tpublic static void setup() {\n\t\trenderArgs.put(\"base\", request.getBase());\n\t\tString location = request.getBase() + \"/services/MonitoringService\";\n\t\trenderArgs.put(\"location\", location);\n\t}", "public static void main(String[] args) {\n\t\tshowInfo(\"홍길동\");\r\n\t\tshowInfo(\"김길동\"); //문자\r\n\t\t\r\n\t\tStudentInfo std = new StudentInfo(); // std 변수를 매개값으로받는\r\n\t\tstd.setStudentName(\"박소현\");\r\n\t\tshowInfo(std);\r\n\t\tstd.setEng(90);\r\n\t\tstd.setMath(95);\r\n\t\tshowInfo(std);\r\n\t\t\r\n\t\tStudentInfo[] stds = new StudentInfo[3]; // 배열을 매개값으로 받는\r\n\t\t\r\n\t\tstds[0] = new StudentInfo(\"김영호\", 77, 88);\r\n\t\tstds[1] = new StudentInfo(\"이영호\", 79, 89);\r\n\t\tstds[2] = new StudentInfo(\"박영호\", 72, 86);\r\n\t\tshowInfo(stds);\r\n\r\n\t}", "final void setup() {\n frame.add(label, BorderLayout.CENTER);\n }", "private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }", "public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n\r\n }", "public void preSetup() {\r\n // Any of your pre setup before the loop starts should go here\r\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "public static void intro() {\n printHighlighted(\"SECRET SANTA\");\n printHighlighted(\"This program allows you to add the participants of the\");\n printHighlighted(\"game and assign them matches to send and receive gifts.\");\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(0, 0, 1000, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tframeContent = new JPanel();\n\t\tframe.getContentPane().add(frameContent);\n\t\tframeContent.setBounds(10, 10, 700, 640);\n\t\tframeContent.setLayout(null);\n\t\t\n\t\tinfoPane = new JPanel();\n\t\tframe.getContentPane().add(infoPane);\n\t\tinfoPane.setBounds(710, 10, 300, 640);\n\t\tinfoPane.setLayout(null);\n\t}", "private void initSetUp()\n\t{\n\t\tthis.setActionName(NAME);\n\t\tthis.setDescription(DESCRIPTION);\n\t\tthis.setMagic(IS_MAGIC);\n\t\tthis.setAttack(IS_ATTACK);\n\t\tthis.setTargetSelf(IS_TARGET_SELF);\n\t\tthis.setInternalName(INTERNAL_NAME);\n\t}", "private void initConfigVar() {\n\t\tConfigUtils configUtils = new ConfigUtils();\n\t\tmenuColor = configUtils.readConfig(\"MENU_COLOR\");\n\t\taboutTitle = configUtils.readConfig(\"ABOUT_TITLE\");\n\t\taboutHeader = configUtils.readConfig(\"ABOUT_HEADER\");\n\t\taboutDetails = configUtils.readConfig(\"ABOUT_DETAILS\");\n\t\tgsTitle = configUtils.readConfig(\"GS_TITLE\");\n\t\tgsHeader = configUtils.readConfig(\"GS_HEADER\");\n\t\tgsDetailsFiles = configUtils.readConfig(\"GS_DETAILS_FILES\");\n\t\tgsDetailsCases = configUtils.readConfig(\"GS_DETAILS_CASES\");\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }", "void infoSetUp() {\r\n\t\tJPanel imageInfo = new JPanel();\r\n\t\timageInfo.setLayout(new GridLayout(2, 0));\r\n\t\tJPanel mButtons = new JPanel();\r\n\r\n\t\tJButton save = new JButton(\"save\");\r\n\t\tJButton upload = new JButton(\"upload\");\r\n\t\tJButton delete = new JButton(\"delete\");\r\n\t\tJButton view = new JButton(\"open\");\r\n\r\n\t\tupload.setActionCommand(\"upload\");\r\n\t\tview.setActionCommand(\"view\");\r\n\t\tActionListener upList = new UpList();\r\n\t\tupload.addActionListener(upList);\r\n\t\tview.addActionListener(upList);\r\n\t\tmButtons.add(save);\r\n\t\tmButtons.add(upload);\r\n\t\tmButtons.add(delete);\r\n\t\tmButtons.add(view);\r\n\r\n\t\tJTextArea info = new JTextArea(\"Path: \");\r\n\t\tinfo.setEditable(false);\r\n\t\timageInfo.add(info);\r\n\t\timageInfo.add(mButtons);\r\n\t\tmainFrame.add(imageInfo);\r\n\t\tinfoText = info;\r\n\t}", "private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}", "private void help() {\n String border = \"=====================================================================================\";\n String title = \"AILearning API:\\n\";\n String template = \"arguments: numOfControls, controls..., quantityOfEach, hasHighContrast, hasDisabled, \" +\n \"hasNoise, isUnsorted\\n\";\n String numOfCon= \"numOfControls - integer number of controls (1 - 6)\\n\";\n String contrls = \"controls... - each control is string and number of strings equals numOfControls\";\n String namesOfControls = \"Every string is define symbol:\\nB - Button, TF - TextField, RB - RadioButton\" +\n \"Sp - Spinner, Sl - Slider, CB - CheckBox\\n\";\n String quantityOfEach = \"quantityOfEach - integer number of each control (0 - 1 000 000)\\n\";\n String highContrast = \"hasHighContrast - string (true or false)\\n\";\n String disabled = \"hasDisabled - string (true of false)\\nif true - some controls will be disabled\\n\";\n String noise = \"hasNoise - string (true or false)\\n\";\n String unsorted = \"isUnsorted - string (true or false)\\nif true - controls will be in one folder\\n\";\n String example = \"Example: 3 B TF RB 100 true true true false\";\n String meaning = \"It means that app will generate 100 Buttons, 100 TextFields, 100 RadioButtons \" +\n \"with high contrast, noise,\\nsome controls will be disabled and locate in different folders\";\n\n System.out.println(String.format(\"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", border, title, template, numOfCon,\n contrls, namesOfControls, quantityOfEach, highContrast, disabled, noise, unsorted, example, meaning));\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\taddSampleData();\n\t\tsetDefaultSettings();\n\t\topenHomePage();\n\t\tframe.setVisible(true);\n\t}", "private void initializeFile() {\n\t\twriter.println(\"name \\\"advcalc\\\"\");\n\t\twriter.println(\"org 100h\");\n\t\twriter.println(\"jmp start\");\n\t\tdeclareArray();\n\t\twriter.println(\"start:\");\n\t\twriter.println(\"lea si, \" + variables);\n\t}", "public static void main(String[] args) {\n System.out.println(\"Hi Everyone\");\n //it is needed to be able to work with the team remotely\n System.out.println(\"I am happy to learn something new\");\n //i need to focus on practicing\n }", "@BeforeMethod\n\tpublic void setup()\n\t{\n\t ExtentHtmlReporter reporter=new ExtentHtmlReporter(\"./Reports/naveen-report.html\");\n\t\t\n\t extent = new ExtentReports();\n\t \n\t extent.attachReporter(reporter);\n\t \n\t logger=extent.createTest(\"LoginTest\");\n\t}", "public void printInfo() {\n\t\tSystem.out.println(\"User: \" + userName);\n\t\tSystem.out.println(\"Login: \" + loginName);\n\t\tSystem.out.println(\"Host: \" + hostName);\n\t}", "public void info(){\r\n System.out.println(\"Title : \" + title);\r\n System.out.println(\"Author . \" + author);\r\n System.out.println(\"Location : \" + location);\r\n if (isAvailable){\r\n System.out.println(\"Available\");\r\n }\r\n else {\r\n System.out.println(\"Not available\");\r\n }\r\n\r\n }", "private void myInit() {\n init_key();\n\n String business_name = System.getProperty(\"business_name\", \"Tyrol Restaurant\");\n jTextField1.setText(business_name);\n String operated_by = System.getProperty(\"operated_by\", \"Fely Romano Sanin\");\n jTextField2.setText(operated_by);\n String address = System.getProperty(\"address\", \"Mayfair place 12th Lacson St, Bacolod City\");\n jTextField3.setText(address);\n\n String tin_no = System.getProperty(\"tin_no\", \"161-107-778-000\");\n jTextField4.setText(tin_no);\n String serial_no = System.getProperty(\"serial_no\", \"\");\n jTextField5.setText(serial_no);\n String permit_no = System.getProperty(\"permit_no\", \"\");\n jTextField6.setText(permit_no);\n }" ]
[ "0.6883867", "0.6713654", "0.6612482", "0.6567675", "0.6553602", "0.64493144", "0.634836", "0.6329768", "0.6325873", "0.62953264", "0.6278008", "0.6269998", "0.6262769", "0.6245164", "0.62239665", "0.6200961", "0.61976635", "0.6190985", "0.61908513", "0.61900604", "0.61900604", "0.61864775", "0.61783874", "0.614632", "0.6138999", "0.6111845", "0.61104393", "0.61099327", "0.61073846", "0.6106335", "0.6092717", "0.6081114", "0.606235", "0.6055514", "0.60536265", "0.60529786", "0.6043115", "0.60383236", "0.60351014", "0.60320705", "0.6023643", "0.6017938", "0.60134244", "0.59942496", "0.5991319", "0.59870315", "0.59859693", "0.5985877", "0.5985472", "0.5974879", "0.597241", "0.59718794", "0.596654", "0.59657884", "0.59632367", "0.59610677", "0.5960862", "0.59560144", "0.59516335", "0.5949507", "0.59470904", "0.5938275", "0.59376854", "0.5930018", "0.59265083", "0.5926385", "0.5918017", "0.5911537", "0.5911537", "0.5911537", "0.5909997", "0.5908615", "0.59060556", "0.5901435", "0.58993584", "0.58982885", "0.5895743", "0.5892239", "0.58901787", "0.5886004", "0.5884152", "0.588089", "0.5877113", "0.5873458", "0.5872394", "0.5866928", "0.5866017", "0.5864158", "0.58619976", "0.5853445", "0.58526903", "0.5851216", "0.5846365", "0.5842605", "0.5837003", "0.5834767", "0.5834586", "0.5831997", "0.5827445", "0.582606", "0.58241" ]
0.0
-1
Creates a new instance of MouthNotEmptyException
public MouthNotEmptyException(Hamster hamster) { super(hamster); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public NotEmptyException() {\n \tsuper(\"Object was occupied.\");\n }", "public EmptyException() {\n super();\n }", "public InvalidMembershipProofException() {\n super();\n }", "public NotEmptyException(String msg) {\n super(msg);\n }", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException createSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException();", "public NotAnOrphanException()\n {\n super();\n }", "public EmptyException(String message) {\n super(message);\n }", "public NotBoundException(){\n\t\t super();\n\t }", "public EmptyDeckException() {\n\t}", "public UnmatchedException(){\r\n\r\n\t}", "@Test(expected = IllegalArgumentException.class)\r\n public void constructorExceptionTest(){\n Owner invalid = new Owner(\"First\", \"Last\", \"333\");\r\n }", "public InvalidBrainException() {\n }", "public OLMSException() {\r\n super();\r\n }", "public NotToBeFriendsException(String errMsg){\n super(\"The error message is \"+errMsg);\n System.err.println(\"make friends failed\");\n }", "public EmptyHeapException() {\n }", "WireframeException(String message){\r\n super(message);\r\n }", "public EmptyStackException() {\n\t\tsuper(\"Stack is empty\");\n\t}", "public NotEnoughFundsException() {\n super(\"Not enough money rock star, try again\");\n }", "public FullArrayListException()\r\n {\r\n super(\"List is full\");\r\n }", "public GameBuyException() {\n }", "public MRFException() {\n\t\tsuper();\n\t}", "public DynamicDeckDynamoException() {\n }", "public CollisionSnakeException(String message){\n\n super(message);\n }", "public PizzaException() {\n super(\"That pizza has been eaten.\");\n }", "public PictureException()\n {\n }", "public VariableNotSetException() {\n }", "public EventException() {\n super(\"OOPS!!! The description or time of an event cannot be empty.\");\n }", "public Error() {\n }", "public EmptyCommandException() {\n super(\"Input is empty! Please enter something into the chat\");\n }", "public EmptyListException (String message) {\n super (message);\n }", "public EANAlreadyExists() {\n }", "GitletException() {\n super();\n }", "public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }", "public IllegalArgumentException buildException() {\n return this.buildException(null);\n }", "public ShieldException() {\n }", "public EntityAlreadyExistsException() {\n\t\tsuper(\"exception.entity.already.exists\");\n\t}", "public BusinessObjectException() {\r\n super();\r\n }", "public SmppException() {\n\t\tsuper();\n\t}", "public CanyonException()\r\n {\r\n super();\r\n }", "public SMSLibException() {}", "public OutOfBoundException() {\n super(\"Task does not exist. Please send a correct task number ><\");\n }", "public NotValidException(String message) {\r\n super(message);\r\n }", "public void testCtor1Accuracy() {\n ContestEligibilityValidatorException exception = new ContestEligibilityValidatorException();\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n }", "public MyException() {\n super(\"This is my message. There are many like it but this one is mine.\");\n }", "public DuplicateSensorException(){\n }", "public InvalidRectangleException(String message) {\n\t\tsuper(message);\n\t}", "public static ValidationException from(BindException exception) {\n return new ValidationException(collectErrorMessages(exception.getAllErrors()));\n }", "public TrafficspacesAPIException() {\n \tthis(null, DEFAULT_MESSAGE);\n }", "public PetsValidationException(String message) {\n super(message);\n }", "public AlreadyOnlineException() {\n\t\tsuper(\"The client is already logged in.\");\n\t\t\n\t\tthis.username = null;\n\t}", "public void testCtor4Accuracy() {\n ContestEligibilityValidatorException exception =\n new ContestEligibilityValidatorException(MESSAGE, CAUSE);\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n assertEquals(\"Error message is not properly propagated to super class.\", MESSAGE, exception\n .getMessage());\n assertEquals(\"Cause is not properly propagated to super class.\", CAUSE, exception.getCause());\n }", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement createSpaceInvaderTest_test_UnNouveauVaisseauPositionneDansEspaceJeuMaisAvecDimensionTropGrande_DoitLeverUneExceptionDeDebordement();", "protected void testLessThanMaxLots () throws OutsideMaxLotsException\n {\n if (lots.size() >= MAX_LOTS)\n throw new OutsideMaxLotsException();\n }", "public FullCarException() {\r\n super(\"\");\r\n }", "public ModeloNoValidoException(String mensaje) {\n\t\tsuper(mensaje);\n\t}", "@Test(expected=IllegalArgumentException.class)\r\n public void testConstructor_max0() {\r\n \r\n new LengthMax(0);\r\n fail();\r\n \r\n }", "public BadDiceException() {\n }", "public NeptunianAlienMouth() {\n\t\tinit(\"mouth-1\", 3, 27, 0);\n\t}", "public OccupiedSlotExtraStorageLeaderCardException(){\n super(\"This leader card cannot accept anymore resources!\");\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void creacionIncorrecta() throws IllegalArgumentException {\r\n P = new Partido(\"Camp Nou\",\"28-04-2010\");\r\n }", "public OfferingException() {\n }", "public EmptyStackException(String message){\n\t\tsuper(message);\n\t}", "public CropException() { }", "public FullArrayListException(String message)\r\n {\r\n super(message);\r\n }", "public ToDoException() {\n super(\"OOPS!!! The description of a todo cannot be empty.\");\n }", "public InstanceOverflowException() {\n\t\tsuper();\n\t}", "public InvalidMembershipProofException(String s) {\n super(s);\n }", "public DimensionalityMismatchException()\n {\n super();\n }", "public void testConstructorWithMessage() {\r\n RejectReasonNotFoundException exception = new RejectReasonNotFoundException(message);\r\n\r\n assertNotNull(\"Unable to instantiate RejectReasonNotFoundException\", exception);\r\n assertTrue(\"Message is not initialized correctly\", exception.getMessage().matches(message + \".*\"));\r\n assertEquals(\"Cause is not initialized correctly\", null, exception.getCause());\r\n assertEquals(\"ProblemRejectReason is not initialized correctly\", null, exception.getProblemRejectReason());\r\n }", "@Test\n\tpublic void excepHeighthMaxRange()\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew Game(\"BoulderDash\", 768, 768);\n\t\t\tfail(\"Schould throw exception when width > 768\");\n\t\t}\n\t\tcatch(final Exception e)\n\t\t{\n\t\t\tfinal String expected = \"width out range\";\n\t\t\tassertEquals(expected, e.getMessage());\n\t\t}\n\t}", "public void testCtor2Accuracy() {\n ContestEligibilityValidatorException exception = new ContestEligibilityValidatorException(MESSAGE);\n assertNotNull(\"Unable to instantiate ContestEligibilityValidatorException.\", exception);\n assertEquals(\"Error message is not properly propagated to super class.\", MESSAGE, exception\n .getMessage());\n }", "public LinkedListIsEmptyException(String error){\n super(error);\n }", "public InvalidMarkException() { }", "public Exception() {\n\t\t\tsuper();\n\t\t}", "public OLMSException(String message) {\r\n super(message);\r\n }", "public VTorInUseException() {\n super();\n }", "public StackUnderflowException(){\n super(\"Can not pop from an empty stack\");\n }", "public InvalidBrainException(String msg) {\n super(msg);\n }", "public GLMatrixStackUnderflowException() {\r\n\r\n\t\t}", "public PropertyNotDefinedException() {\n super();\n }", "@Test\n\tpublic void excepHeighthMinRange()\n\t{\n\t\ttry\n\t\t{\n\t\t\tnew Game(\"BoulderDash\", 768, 768);\n\t\t\tfail(\"Schould throw exception when width > 100\");\n\t\t}\n\t\tcatch(final Exception e)\n\t\t{\n\t\t\tfinal String expected = \"width out range\";\n\t\t\tassertEquals(expected, e.getMessage());\n\t\t}\n\t}", "public MyMoneyException() {\r\n\t\tsuper();\r\n\t}", "public DuplicateItemException() {\r\n super();\r\n }", "public MessageParseException() {\n }", "public EmptyStackException(String message) {\r\n\t\tsuper(message);\r\n\t}", "public SearchException() {\n }", "public EmptyQueueException(String msg){\n\t\tsuper(msg);\n\t}", "public NoMatchingLastNameException(String LastName) {\n\t\t// Call constructor of parent Exception\n\t\tsuper(\"No last name found matching \" + (LastName));\n\t}", "public void testNewEntity_Boom() throws DataBaseNotReadyException {\n // Verify that our test database is set-up as expected.\n // Access test-person , test-event and test-job.\n // Verify that such items exist in the database\n // and that the test-person has yet no allocations.\n Person p = Manager.getPersonCollection().findEntity(3);\n assertNotNull(\"Bad test data?\", p);\n Event e = Manager.getEventCollection().findEntity(4);\n assertNotNull(\"Bad test data?\", e);\n Job j1 = Manager.getJobCollection().findEntity(1);\n assertNotNull(\"Bad test data?\", j1);\n Job j2 = Manager.getJobCollection().findEntity(2);\n assertNotNull(\"Bad test data?\", j2);\n\n Allocation testItem1 = allocationCollection.newEntity(p, e, j1, \"USER\");\n\n // Here is the statement that should throw the exception:\n System.out.println(\"### testNewEntity_Boom() Exception is expected!\");\n Allocation testItem2 = allocationCollection.newEntity(p, e, j2, \"USER\");\n\n }", "WireframeException(String message, Throwable e){\r\n super(message, e);\r\n }", "public FrameEndedException() {\n }", "public NotToBeFriendsException(String errMsg,double age){\n super(\"The error message is \"+errMsg);\n System.err.println(\"make failed with \"+age+\" years old child failed, the age gap is larger than 3\");\n }", "public static void verify() throws IllegalStateException{\n\t\tif (Blocks.dragon_egg.getClass() != BlockDragonEggCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Dragon Egg class mismatch: \"+Blocks.dragon_egg.getClass().getName());\n\t\t}\n\n\t\tif (Blocks.end_portal.getClass() != BlockEndPortalCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End Portal class mismatch: \"+Blocks.end_portal.getClass().getName());\n\t\t}\n\n\t\tif (Blocks.end_portal_frame.getClass() != BlockEndPortalFrameCustom.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End Portal Frame class mismatch: \"+Blocks.end_portal_frame.getClass().getName());\n\t\t}\n\t\t\n\t\tif (BiomeGenBase.sky.getClass() != BiomeGenHardcoreEnd.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End biome class mismatch: \"+BiomeGenBase.sky.getClass().getName());\n\t\t}\n\t\t\n\t\tif (getWorldProviderType(1) != WorldProviderHardcoreEnd.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - End world provider class mismatch: \"+getWorldProviderType(1).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"Enderman\") != EntityMobEnderman.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Enderman class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"Enderman\")).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"Silverfish\") != EntityMobSilverfish.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Silverfish class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"Silverfish\")).getName());\n\t\t}\n\t\t\n\t\tif (EntityList.stringToClassMapping.get(\"EnderCrystal\") != EntityBlockEnderCrystal.class){\n\t\t\tthrow new IllegalStateException(\"Mod conflict detected - Ender Crystal class mismatch: \"+((Class)EntityList.stringToClassMapping.get(\"EnderCrystal\")).getName());\n\t\t}\n\t}", "protected MultiException() {\n\t\t// Can't delegate to the other constructor or GWT RPC gets cranky\n\t\tsuper(MULTIPLE);\n\t\t_causes = Collections.<Throwable> emptySet();\n\t}", "public ApiLimitException() {\n super();\n }", "public InvalidPlayerNumberException() {\n\n }", "public EmptyStackException(String message) {\n\t\tsuper(message);\n\t}", "public EmptyStackException(String message) {\n\t\tsuper(message);\n\t}", "public PictureException(String msg)\n {\n super(msg);\n }", "public NotBoundException(String s){\n\t\t super(s);\n\t }" ]
[ "0.6475501", "0.58057857", "0.57284975", "0.5605687", "0.55252904", "0.54517025", "0.5396253", "0.53744984", "0.5374099", "0.53500104", "0.5309424", "0.52848846", "0.5111184", "0.5098066", "0.50574195", "0.5051171", "0.50355774", "0.503088", "0.50276464", "0.50008553", "0.4994577", "0.49904776", "0.49661827", "0.49553102", "0.49513307", "0.49495113", "0.4939434", "0.4932676", "0.49170464", "0.49032557", "0.49015033", "0.4898687", "0.48620826", "0.4857288", "0.4856274", "0.48547962", "0.48511338", "0.48483005", "0.48308367", "0.48126656", "0.48054978", "0.4796524", "0.47959086", "0.47943643", "0.47892043", "0.47808123", "0.47762278", "0.47453418", "0.4742355", "0.4738295", "0.47376904", "0.47294897", "0.47244227", "0.47243032", "0.47128212", "0.47057596", "0.47045523", "0.47044015", "0.46947372", "0.46908304", "0.46881008", "0.46818212", "0.46777272", "0.46772113", "0.46762568", "0.46733767", "0.4672887", "0.4668337", "0.46679026", "0.46662813", "0.46644536", "0.46552753", "0.4653045", "0.46511346", "0.46500894", "0.46466386", "0.46436837", "0.4640772", "0.4640579", "0.46350536", "0.46346113", "0.46343738", "0.46332192", "0.46248776", "0.46240333", "0.4617525", "0.46166518", "0.46160895", "0.46160078", "0.46045515", "0.4600202", "0.45974058", "0.45957565", "0.45954013", "0.4584893", "0.4584679", "0.4583629", "0.4583629", "0.45805973", "0.45770913" ]
0.7412242
0
java.lang.ClassNotFoundException: Didn't find class "okhttp3.Interceptor.Chain" on path: DexPathList
private void hookLastInterceptor(final LoadPackageParam lp) { Log.i(TAG, "start hookLastInterceptor:" + lp.packageName); XposedHelpers.findAndHookMethod(Application.class, "attach", Context.class, new XC_MethodHook() { @Override protected void afterHookedMethod(MethodHookParam param) throws Throwable { final ClassLoader cl = ((Context) param.args[0]).getClassLoader(); try { cl.loadClass("okhttp3.internal.http.CallServerInterceptor"); cl.loadClass("okhttp3.Interceptor.Chain"); classInDexFound = true; realHookLastInterceptor(cl); } catch (Throwable e) { if (e instanceof ClassNotFoundException) { findHideDex(findDexListener); } else { e.printStackTrace(); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Dex2JarProxy() {\r\n\t}", "private static OkHttpClient getOkHttpClient() {\n OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder()\n .addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n\n Request.Builder requestBuilder = original.newBuilder()\n .method(original.method(), original.body());\n\n addAdditionalHttpHeaders(requestBuilder);\n addParleyHttpHeaders(requestBuilder);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n })\n .connectTimeout(30, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS);\n\n applySslPinning(okHttpClientBuilder);\n\n return okHttpClientBuilder.build();\n }", "void m14051a(okhttp3.aa r2, okhttp3.aa r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r1 = this;\n r0 = new okhttp3.c$c;\n r0.<init>(r3);\n r2 = r2.m14017h();\n r2 = (okhttp3.C2900c.C4340b) r2;\n r2 = r2.f18085a;\n r2 = r2.m14105a();\t Catch:{ IOException -> 0x001a }\n if (r2 == 0) goto L_0x001e;\n L_0x0013:\n r0.m14043a(r2);\t Catch:{ IOException -> 0x001b }\n r2.m14099b();\t Catch:{ IOException -> 0x001b }\n goto L_0x001e;\n L_0x001a:\n r2 = 0;\n L_0x001b:\n r1.m14047a(r2);\n L_0x001e:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.aa, okhttp3.aa):void\");\n }", "private static OkHttpClient m35241c() {\n return new OkHttpClient();\n }", "private static OkHttpClient initializeRetrofitClients() {\n OkHttpClient.Builder okHttpBuilder = new OkHttpClient().newBuilder();\n okHttpBuilder.interceptors().add(new Interceptor() {\n @Override\n public okhttp3.Response intercept(@NonNull Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n // Nothing to add to intercepted request if:\n // a) Authorization value is empty because user is not logged in yet\n // b) There is already a header with updated Authorization value\n if (authorizationTokenIsEmpty() || alreadyHasAuthorizationHeader(originalRequest)) {\n return chain.proceed(originalRequest);\n }\n\n // Add authorization header with updated authorization value to intercepted request\n Request authorisedRequest = originalRequest.newBuilder()\n .header(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n return chain.proceed(authorisedRequest);\n }\n });\n okHttpBuilder.authenticator(new Authenticator() {\n @Nullable\n @Override\n public Request authenticate(@NonNull Route route, @NonNull okhttp3.Response response) throws IOException {\n // Refresh your access_token using a synchronous api request\n ABBYYLingvoAPI abbyyLingvoAPI = getApi();\n\n Call<ResponseBody> myCall = abbyyLingvoAPI.getBasicToken();\n Response<ResponseBody> response1;\n try {\n response1 = myCall.execute();\n if (response1.isSuccessful()) {\n accessToken = response1.body().string();\n Log.d(Constants.LOG_TAG, \"basic response is success, got accessToken\");\n } else {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful, response code is: \" + response1.code());\n }\n } catch (IOException e) {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful cause error: \" + e.toString());\n }\n\n // Add new header to rejected request and retry it\n accessTokenRequest = response.request().newBuilder()\n .addHeader(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n\n return accessTokenRequest;\n }\n });\n\n try {\n // Create a trust manager that does not validate certificate chains\n final TrustManager[] trustAllCerts = new TrustManager[]{\n new X509TrustManager() {\n @Override\n public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return new java.security.cert.X509Certificate[]{};\n }\n }\n };\n\n // Install the all-trusting trust manager\n final SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustAllCerts, new java.security.SecureRandom());\n // Create an ssl socket factory with our all-trusting manager\n final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\n\n okHttpBuilder.sslSocketFactory(sslSocketFactory);\n okHttpBuilder.hostnameVerifier(new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n\n return okHttpBuilder.build();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Provides\n @Singleton\n OkHttpClient provideOkHttpClient() {\n final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();\n loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder()\n .addInterceptor(loggingInterceptor);\n\n return clientBuilder.build();\n }", "@PostConstruct\n private void init(){\n\n okHttpClient = new OkHttpClient();\n\n// loadEtoroInstruments();\n\n }", "static Downloader m61430a(Context context) {\n try {\n Class.forName(\"com.squareup.okhttp.OkHttpClient\");\n return C18811c.m61450a(context);\n } catch (ClassNotFoundException unused) {\n return new C18803ab(context);\n }\n }", "@Provides\n OkHttpClient.Builder providesOkHttpClientBuilder(){\n return new OkHttpClient.Builder()\n .connectTimeout(10, TimeUnit.SECONDS)\n .writeTimeout(20,TimeUnit.SECONDS)\n .readTimeout(20,TimeUnit.SECONDS);\n //.addInterceptor(new MyInterceptor());\n }", "private void m14047a(@javax.annotation.Nullable okhttp3.internal.p155a.C2918d.C2915a r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.core.ProcessClass.processDependencies(ProcessClass.java:56)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:39)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = this;\n if (r1 == 0) goto L_0x0005;\n L_0x0002:\n r1.m14100c();\t Catch:{ IOException -> 0x0005 }\n L_0x0005:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.c.a(okhttp3.internal.a.d$a):void\");\n }", "@Provides\n @Singleton\n public OkHttpClient providesOkHttpClient() {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(interceptor);\n\n return httpClient.build();\n\n }", "interface BaseApi {\n Retrofit getRetrofit();\n\n OkHttpClient.Builder setInterceptor(Interceptor interceptor);\n\n Retrofit.Builder setConverterFactory(Converter.Factory factory);\n}", "@NonNull\n public static OkHttpClient provideOkHttpClient(Application app) {\n File cacheDir = new File(app.getCacheDir(), \"http\");\n Cache cache = new Cache(cacheDir, DISK_CACHE_SIZE);\n\n OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder()\n .cache(cache);\n\n if (BuildConfig.DEBUG) {\n okHttpClient.addInterceptor(provideHttpLoggingInterceptor());\n }\n return okHttpClient.build();\n }", "@Provides\n @Singleton\n OkHttpClient provideOkHttpClient() {\n OkHttpClient client = new OkHttpClient();\n return client;\n }", "public static OkHttpClient getOkHttpClient() {\n return OK_HTTP_CLIENT;\n }", "public void initOkGo() throws IOException {\r\n mSPCookieStore = new SPCookieStore(this);\r\n HttpHeaders headers = new HttpHeaders();\r\n if (new SPCookieStore(this).getAllCookie().size() != 0) {\r\n headers.put(\r\n \"Set-Cookie\",\r\n String.valueOf(mSPCookieStore.getCookie(HttpUrl.parse(BaseUrl.HTTP_Get_code_auth))));\r\n }\r\n headers.put(\"version\", \"3.0\");\r\n headers.put(\"uid\", \"6f1a8e0eb24afb7ddc829f96f9f74e9d\");\r\n\r\n OkHttpClient.Builder builder = new OkHttpClient.Builder();\r\n // log相关\r\n HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(\"OkHttp\");\r\n loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY); // log打印级别,决定了log显示的详细程度\r\n loggingInterceptor.setColorLevel(Level.INFO); // log颜色级别,决定了log在控制台显示的颜色\r\n builder.addInterceptor(loggingInterceptor); // 添加OkGo默认debug日志\r\n // 超时时间设置\r\n builder.readTimeout(10000, TimeUnit.MILLISECONDS); // 全局的读取超时时间\r\n builder.writeTimeout(10000, TimeUnit.MILLISECONDS); // 全局的写入超时时间\r\n builder.connectTimeout(10000, TimeUnit.MILLISECONDS); // 全局的连接超时时间\r\n builder.cookieJar(new CookieJarImpl(mSPCookieStore)); // 使用sp保持cookie,如果cookie不过期,则一直有效\r\n\r\n HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(getAssets().open(\"server.cer\"));\r\n builder.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager);\r\n // //配置https的域名匹配规则,使用不当会导致https握手失败\r\n builder.hostnameVerifier(HttpsUtils.UnSafeHostnameVerifier);\r\n\r\n // 其他统一的配置\r\n OkGo.getInstance()\r\n .init(this.getApplication()) // 必须调用初始化\r\n .setOkHttpClient(builder.build()) // 必须设置OkHttpClient\r\n .setCacheMode(CacheMode.NO_CACHE) // 全局统一缓存模式,默认不使用缓存,可以不传\r\n .setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE) // 全局统一缓存时间,默认永不过期,可以不传\r\n .setRetryCount(3) // 全局统一超时重连次数,默认为三次,那么最差的情况会请求4次(一次原始请求,三次重连请求),不需要可以设置为0\r\n .addCommonHeaders(headers); // 全局公共头\r\n }", "public interface ZhiHuApi {\n\n /**\n * A factory of ZhiHuApi, you do not need to create it every time for network.\n */\n class Factory {\n\n private static final Retrofit.Builder builder;\n\n static {\n builder = new Retrofit.Builder()\n .baseUrl(Constants.BASE_HTTP_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create());\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz) {\n return create(clazz, HostType.HTTP);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type) {\n return create(clazz, type, false);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type, boolean retryOnFailue) {\n Retrofit retrofit = builder\n .client(OkHttpClientHelper.getClient(type, retryOnFailue))\n .build();\n return retrofit.create(clazz);\n }\n\n\n }\n}", "@Override\r\n public Response intercept(Chain chain) throws IOException {\r\n Request request = chain.request();\r\n //the request url\r\n String url = request.url().toString();\r\n //the request method\r\n String method = request.method();\r\n long t1 = System.nanoTime();\r\n Log.d(TAG,String.format(Locale.getDefault(),\"Sending %s request [url = %s]\",method,url));\r\n //the request body\r\n RequestBody requestBody = request.body();\r\n if(requestBody!= null) {\r\n StringBuilder sb = new StringBuilder(\"Request Body [\");\r\n Buffer buffer = new okio.Buffer();\r\n requestBody.writeTo(buffer);\r\n Charset charset = Charset.forName(\"UTF-8\");\r\n MediaType contentType = requestBody.contentType();\r\n if (contentType != null) {\r\n charset = contentType.charset(charset);\r\n }\r\n if(isPlaintext(buffer)){\r\n sb.append(buffer.readString(charset));\r\n sb.append(\" (Content-Type = \").append(contentType.toString()).append(\",\")\r\n .append(requestBody.contentLength()).append(\"-byte body)\");\r\n }else {\r\n sb.append(\" (Content-Type = \").append(contentType.toString())\r\n .append(\",binary \").append(requestBody.contentLength()).append(\"-byte body omitted)\");\r\n }\r\n sb.append(\"]\");\r\n Log.d(TAG, String.format(Locale.getDefault(), \"%s %s\", method, sb.toString()));\r\n }\r\n Response response = chain.proceed(request);\r\n long t2 = System.nanoTime();\r\n //the response time\r\n Log.d(TAG,String.format(Locale.getDefault(),\"Received response for [url = %s] in %.1fms\",url, (t2-t1)/1e6d));\r\n\r\n //the response state\r\n Log.d(TAG,String.format(Locale.CHINA,\"Received response is %s ,message[%s],code[%d]\",response.isSuccessful()?\"success\":\"fail\",response.message(),response.code()));\r\n\r\n //the response data\r\n ResponseBody body = response.body();\r\n\r\n BufferedSource source = body.source();\r\n source.request(Long.MAX_VALUE); // Buffer the entire body.\r\n Buffer buffer = source.buffer();\r\n Charset charset = Charset.defaultCharset();\r\n MediaType contentType = body.contentType();\r\n if (contentType != null) {\r\n charset = contentType.charset(charset);\r\n }\r\n String bodyString = buffer.clone().readString(charset);\r\n Log.d(TAG,String.format(\"Received response json string [%s]\",bodyString));\r\n\r\n return response;\r\n }", "public void buildPicasso() {\n OkHttpClient client = new OkHttpClient.Builder()\n .addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request newRequest = chain.request().newBuilder()\n .addHeader(\"Authorization\", \"Token \" + token)\n .build();\n return chain.proceed(newRequest);\n }\n })\n .build();\n Picasso.Builder picassoBuilder = new Picasso.Builder(context)\n .downloader(new OkHttp3Downloader(client));\n picasso = picassoBuilder.build();\n isPicasso = true;\n }", "public Class<?> loadClass(String str, boolean z) throws ClassNotFoundException {\n if (str.startsWith(BuildConfig.APPLICATION_ID) || str.startsWith(\"android\") || str.startsWith(\"external\") || str.startsWith(\"me.weishu.epic.art\") || str.startsWith(\"com.taobao.android.dexposed\")) {\n return this.mHostClassLoader.loadClass(str);\n }\n return super.loadClass(str, z);\n }", "private void setupHttpConnectionStuff() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n try {\n final File httpCacheDir = new File(getCacheDir(), \"http\");\n HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES);\n } catch (IOException ioe) {\n Log.e(Constants.LOG_TAG, \"Could not install http cache on this device.\");\n }\n }\n }", "private static void zza(java.lang.ClassLoader r3) throws com.google.android.gms.dynamite.DynamiteModule.zzc {\n /*\n r0 = 0\n java.lang.String r1 = \"com.google.android.gms.dynamiteloader.DynamiteLoaderV2\"\n java.lang.Class r3 = r3.loadClass(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1 = 0\n java.lang.Class[] r2 = new java.lang.Class[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.reflect.Constructor r3 = r3.getConstructor(r2) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object[] r1 = new java.lang.Object[r1] // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n java.lang.Object r3 = r3.newInstance(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n android.os.IBinder r3 = (android.os.IBinder) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r3 != 0) goto L_0x001a\n r3 = r0\n goto L_0x002e\n L_0x001a:\n java.lang.String r1 = \"com.google.android.gms.dynamite.IDynamiteLoaderV2\"\n android.os.IInterface r1 = r3.queryLocalInterface(r1) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n boolean r2 = r1 instanceof com.google.android.gms.dynamite.zzl // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n if (r2 == 0) goto L_0x0028\n r3 = r1\n com.google.android.gms.dynamite.zzl r3 = (com.google.android.gms.dynamite.zzl) r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n goto L_0x002e\n L_0x0028:\n com.google.android.gms.dynamite.zzm r1 = new com.google.android.gms.dynamite.zzm // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r1.<init>(r3) // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n r3 = r1\n L_0x002e:\n zzaSH = r3 // Catch:{ ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException -> 0x0031 }\n return\n L_0x0031:\n r3 = move-exception\n com.google.android.gms.dynamite.DynamiteModule$zzc r1 = new com.google.android.gms.dynamite.DynamiteModule$zzc\n java.lang.String r2 = \"Failed to instantiate dynamite loader\"\n r1.<init>(r2, r3, r0)\n throw r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.dynamite.DynamiteModule.zza(java.lang.ClassLoader):void\");\n }", "public interface OkHttpDownFileCallBackListener {\r\n\r\n public void onError(Call call, Exception e, int errorCode);\r\n public void onResponse(File response, int successCode);\r\n public void inProgress(float progress, long total, int id);\r\n}", "private OkHttpClient createClient(){\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n return new OkHttpClient.Builder()\n .addInterceptor(logging)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .build();\n }", "@Override\n public OkHttpClient customMake() {\n // just for OkHttpClient customize.\n final OkHttpClient.Builder builder = new OkHttpClient.Builder();\n // you can set the connection timeout.\n builder.connectTimeout(15_000, TimeUnit.MILLISECONDS);\n // you can set the HTTP proxy.\n builder.proxy(Proxy.NO_PROXY);\n // etc.\n return builder.build();\n }", "public okhttp3.Request followUpRequest() {\n /*\n r5 = this;\n r1 = 0;\n r0 = r5.userResponse;\n if (r0 != 0) goto L_0x000b;\n L_0x0005:\n r0 = new java.lang.IllegalStateException;\n r0.<init>();\n throw r0;\n L_0x000b:\n r0 = r5.streamAllocation;\n r0 = r0.connection();\n if (r0 == 0) goto L_0x0027;\n L_0x0013:\n r0 = r0.route();\n L_0x0017:\n r2 = r5.userResponse;\n r2 = r2.code();\n r3 = r5.userRequest;\n r3 = r3.method();\n switch(r2) {\n case 300: goto L_0x0063;\n case 301: goto L_0x0063;\n case 302: goto L_0x0063;\n case 303: goto L_0x0063;\n case 307: goto L_0x0053;\n case 308: goto L_0x0053;\n case 401: goto L_0x0046;\n case 407: goto L_0x0029;\n case 408: goto L_0x00dc;\n default: goto L_0x0026;\n };\n L_0x0026:\n return r1;\n L_0x0027:\n r0 = r1;\n goto L_0x0017;\n L_0x0029:\n if (r0 == 0) goto L_0x003f;\n L_0x002b:\n r1 = r0.proxy();\n L_0x002f:\n r1 = r1.type();\n r2 = java.net.Proxy.Type.HTTP;\n if (r1 == r2) goto L_0x0046;\n L_0x0037:\n r0 = new java.net.ProtocolException;\n r1 = \"Received HTTP_PROXY_AUTH (407) code while not using proxy\";\n r0.<init>(r1);\n throw r0;\n L_0x003f:\n r1 = r5.client;\n r1 = r1.proxy();\n goto L_0x002f;\n L_0x0046:\n r1 = r5.client;\n r1 = r1.authenticator();\n r2 = r5.userResponse;\n r1 = r1.authenticate(r0, r2);\n goto L_0x0026;\n L_0x0053:\n r0 = \"GET\";\n r0 = r3.equals(r0);\n if (r0 != 0) goto L_0x0063;\n L_0x005b:\n r0 = \"HEAD\";\n r0 = r3.equals(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0063:\n r0 = r5.client;\n r0 = r0.followRedirects();\n if (r0 == 0) goto L_0x0026;\n L_0x006b:\n r0 = r5.userResponse;\n r2 = \"Location\";\n r0 = r0.header(r2);\n if (r0 == 0) goto L_0x0026;\n L_0x0075:\n r2 = r5.userRequest;\n r2 = r2.url();\n r0 = r2.resolve(r0);\n if (r0 == 0) goto L_0x0026;\n L_0x0081:\n r2 = r0.scheme();\n r4 = r5.userRequest;\n r4 = r4.url();\n r4 = r4.scheme();\n r2 = r2.equals(r4);\n if (r2 != 0) goto L_0x009d;\n L_0x0095:\n r2 = r5.client;\n r2 = r2.followSslRedirects();\n if (r2 == 0) goto L_0x0026;\n L_0x009d:\n r2 = r5.userRequest;\n r2 = r2.newBuilder();\n r4 = okhttp3.internal.http.HttpMethod.permitsRequestBody(r3);\n if (r4 == 0) goto L_0x00c3;\n L_0x00a9:\n r4 = okhttp3.internal.http.HttpMethod.redirectsToGet(r3);\n if (r4 == 0) goto L_0x00d8;\n L_0x00af:\n r3 = \"GET\";\n r2.method(r3, r1);\n L_0x00b4:\n r1 = \"Transfer-Encoding\";\n r2.removeHeader(r1);\n r1 = \"Content-Length\";\n r2.removeHeader(r1);\n r1 = \"Content-Type\";\n r2.removeHeader(r1);\n L_0x00c3:\n r1 = r5.sameConnection(r0);\n if (r1 != 0) goto L_0x00ce;\n L_0x00c9:\n r1 = \"Authorization\";\n r2.removeHeader(r1);\n L_0x00ce:\n r0 = r2.url(r0);\n r1 = r0.build();\n goto L_0x0026;\n L_0x00d8:\n r2.method(r3, r1);\n goto L_0x00b4;\n L_0x00dc:\n r0 = r5.requestBodyOut;\n if (r0 == 0) goto L_0x00e6;\n L_0x00e0:\n r0 = r5.requestBodyOut;\n r0 = r0 instanceof okhttp3.internal.http.RetryableSink;\n if (r0 == 0) goto L_0x00f1;\n L_0x00e6:\n r0 = 1;\n L_0x00e7:\n r2 = r5.callerWritesRequestBody;\n if (r2 == 0) goto L_0x00ed;\n L_0x00eb:\n if (r0 == 0) goto L_0x0026;\n L_0x00ed:\n r1 = r5.userRequest;\n goto L_0x0026;\n L_0x00f1:\n r0 = 0;\n goto L_0x00e7;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: okhttp3.internal.http.HttpEngine.followUpRequest():okhttp3.Request\");\n }", "private void buildRetrofit() {\n OkHttpClient client = new OkHttpClient.Builder()\n .addInterceptor(new ResponseInterceptor())\n .build();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(baseURL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n\n apiInterface = retrofit.create(APIInterface.class);\n }", "public static Retrofit getRetrofitInstance(String BASE_URL, final String c_username, final String c_password) {\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n\n\n\n /*OkHttpClient okHttpClient = new OkHttpClient().newBuilder().addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n })\n .addInterceptor(logging)\n .build();*/\n OkHttpClient okHttpClient = getUnsafeOkHttpClient(BASE_URL, c_username, c_password, logging);\n /*OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder();\n okHttpClient.addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n });\n\n okHttpClient.connectTimeout(1, TimeUnit.MINUTES)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS);\n\n if (BuildConfig.DEBUG) {//only LOG REST for DEBUG\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n logging.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n okHttpClient.addInterceptor(logging);\n }\n*/\n\n if (retrofit == null) {\n retrofit = new retrofit2.Retrofit.Builder()\n .baseUrl(BASE_URL)\n\n //Add the converter//\n .addConverterFactory(GsonConverterFactory.create())\n .client(okHttpClient)\n //.client(okHttpClient.build())\n\n //Build the Retrofit instance//\n .build();\n }\n return retrofit;\n }", "public TankOkHttpClient() {\n try {\n\n final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n\n @Override\n public X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n\n @Override\n public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}\n\n @Override\n public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}\n } };\n\n // Setup SSL to accept all certs\n final SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustAllCerts, null);\n sslSocketFactory = sslContext.getSocketFactory();\n\n // Setup Cookie manager\n cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);\n CookieHandler.setDefault(cookieManager);\n okHttpClient.setCookieHandler(cookieManager);\n\n okHttpClient.setConnectTimeout(30000, TimeUnit.MILLISECONDS);\n okHttpClient.setReadTimeout(30000, TimeUnit.MILLISECONDS); // Socket-timeout\n okHttpClient.setFollowRedirects(true);\n okHttpClient.setFollowSslRedirects(true);\n\n okHttpClient.setSslSocketFactory(sslSocketFactory);\n okHttpClient.setHostnameVerifier(new HostnameVerifier() {\n\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n\n } catch (Exception e) {\n LOG.error(\"Error setting accept all: \" + e, e);\n }\n }", "interface HttpRedirectsService {\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/300\")\n Call<Void> head300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/300\")\n Call<ResponseBody> get300();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/301\")\n Call<Void> head301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/301\")\n Call<ResponseBody> get301();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/301\")\n Call<ResponseBody> put301(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/302\")\n Call<Void> head302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/302\")\n Call<ResponseBody> get302();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/302\")\n Call<ResponseBody> patch302(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/303\")\n Call<ResponseBody> post303(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HEAD(\"http/redirect/307\")\n Call<Void> head307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @GET(\"http/redirect/307\")\n Call<ResponseBody> get307();\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PUT(\"http/redirect/307\")\n Call<ResponseBody> put307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @PATCH(\"http/redirect/307\")\n Call<ResponseBody> patch307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @POST(\"http/redirect/307\")\n Call<ResponseBody> post307(@Body Boolean booleanValue);\n\n @Headers(\"Content-Type: application/json; charset=utf-8\")\n @HTTP(path = \"http/redirect/307\", method = \"DELETE\", hasBody = true)\n Call<ResponseBody> delete307(@Body Boolean booleanValue);\n\n }", "@Override\n\t public void onCreate() {\n\t super.onCreate();\n\n\t instance = this;\n\t okHttp = new OkHttpClient();\n\t getDefaultSSLSocketFactory();\n\t }", "@Override\r\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\r\n\r\n }", "public interface GitHubInterface {\n //http://test.xdyapi.haodai.net/Wallet/getAccountList?os_type=1&appid=1&imei=867614023363542&app_version=35000&channel=web&auth_tms=20170306133730&auth_did=5793&auth_dsig=08526488a4ade5a8&auth_uid=193594&auth_usig=8493bf3e111114c9?os_type=1&appid=1&imei=867614023363542&app_version=35000&channel=web&auth_tms=20170306133730&auth_did=5793&auth_dsig=08526488a4ade5a8&auth_uid=193594&auth_usig=8493bf3e111114c9&xid=193594\n\n //这是retrofit版本\n// @POST(\"Wallet/{user}\")\n// Call<Repo> listRepos(@Path(\"user\") String user, @QueryMap Map<String, String> map);\n\n //这是retrofit2版本\n //注意:ResponseBody这个类需要导入\"import okhttp3.ResponseBody\"这个包的\n @POST(\"Wallet/{user}\")\n Call<ResponseBody> listRepos(@Path(\"user\") String user, @QueryMap Map<String, String> map);\n}", "@Override\n public void onFailure(Call<Response> call, Throwable t) {\n }", "public interface Api {\n\n// root url after add multiple servlets\n\n String BASE_URL = \"https://simplifiedcoding.net/demos/\";\n\n @GET(\"marvel\")\n Call<List<Modelclass>> getmodelclass();\n\n\n\n}", "private ClassProxy() {\n }", "@Override\n\tpublic void onFailure(Request request, Exception e) {\n\t\ttry {\n\t\t\tT t = clazz.newInstance();\n\t\t\tt.setMessage(\"网络访问失败\");\n\t\t\tonComplete(null, t);\n\t\t\treturn ;\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public OkHttpDownloader(Context context) {\n\n\t\t// Create cache directory\n\t\tmCacheDir = new File(context.getApplicationContext().getCacheDir(), \"picasso-cache\");\n\t\tif (!mCacheDir.exists()) {\n\t\t\tmCacheDir.mkdirs();\n\t\t}\n\n\t\tmUrlFactory = new OkUrlFactory(MizuuApplication.getOkHttpClient());\n\n\t\ttry {\n\t\t\tmUrlFactory.client().setCache(new Cache(mCacheDir, calculateDiskCacheSize(mCacheDir)));\n\t\t} catch (IOException e) {}\n\n\t\t// Set context\n\t\tmContext = context;\n\t}", "public interface OnInterceptListener {\n\n /**\n * This method is fired when new request comes\n *\n * @param url url of the request\n * @param requestBody request body\n * @param responseBody response body\n */\n void onInterceptRequest(String url, String requestBody, String responseBody);\n\n /**\n * This method is fired if interception failed due to some reasons\n */\n void onInterceptFailed();\n\n}", "public interface ApiManager {\n @POST\n Call<ResponseBody> upload(@Url() String url);\n\n //上传文件\n @POST\n Call<ResponseBody> uploadFile(@Url() String url, @Body RequestBody body);\n\n //修改手机号\n @POST\n Call<ResponseBody> changePhone(@Url() String url);\n\n //订单详情\n @POST\n Observable<PayDetails> orderDetatls(@Url() String url);\n\n //通知已读\n @POST\n Call<ResponseBody> notityReader(@Url() String url);\n}", "Retrofit getRetrofit(Integer logLevel) {\n if (this.retrofit == null) {\n \tHttpLoggingInterceptor logging = new HttpLoggingInterceptor(); \n \tif (logLevel==1)\n \t\tlogging.setLevel(HttpLoggingInterceptor.Level.BODY);\n \telse if (logLevel==2)\n \t\tlogging.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n \tOkHttpClient.Builder httpClient = new OkHttpClient.Builder(); \n \tif (logLevel!=null && logLevel>0)\n \t\thttpClient.addInterceptor(logging); \n this.retrofit = new Retrofit.Builder()\n .baseUrl(baseUrl)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient.build())\n .build();\n }\n return retrofit;\n }", "public Void call() throws Exception {\n MultiDex.install(C1814d.this.f4522b);\n Log.d(C1814d.f4521a, \"LoadMutiDex done\");\n C1814d.this.f4523c.onSuccess();\n return null;\n }", "@Override\n\t\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\t\tupLoadPhones();\n\t\t\t\t\t\t}", "public interface RequestService {\n //http://gank.io/api/data/Android/10/1\n /*@GET(\"api/data/Android/10/1\")\n Call<ResponseBody> getAndroidInfo();*/\n @GET(\"api/data/Android/10/1\")\n Call<GankBean> getAndroidInfo();\n @GET(\"api/data/Android/10/{page}\")\n Call<GankBean> getAndroidInfo(@Path(\"page\") int page);\n @GET(\"api/data/query?cityname=深圳\")\n Call<ResponseBody> getWeather(@Query(\"key\") String key,@Query(\"area\") String area);\n @GET(\"group/{id}/users\")\n Call<List<User2>> groupList(@Field(\"id\") int groupId, @QueryMap Map<String,String> options);\n @GET\n Call<GankBean> getAndroid2Info(@Url String url);\n\n}", "@Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n Request.Builder newRequest;\n\n newRequest = request.newBuilder()\n .addHeader(\"Content-type\", \"application/json;charset=UTF-8\")\n .addHeader(\"Accept\", \"application/json\");\n return chain.proceed(newRequest.build());\n }", "public interface GitHubService {\n @GET(\"repos/{owner}/{repo}/contributors\")\n Call<List<Contributor>> repoContributors(\n @Path(\"owner\") String owner,\n @Path(\"repo\") String repo);\n\n\n HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient okHttpClient = new OkHttpClient.Builder().addInterceptor(httpLoggingInterceptor).addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n HttpUrl originalHttpUrl = original.url();\n\n HttpUrl.Builder originalUrlBuilder = originalHttpUrl.newBuilder();\n originalUrlBuilder.addQueryParameter(\"access_token\", \"YOUR_TOKEN\");\n\n HttpUrl url = originalUrlBuilder.build();\n\n Request.Builder reqBuilder = original.newBuilder().url(url);\n return chain.proceed(reqBuilder.build());\n }\n }).build();\n\n\n\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"https://api.github.com/\")\n .addConverterFactory(GsonConverterFactory.create()).client(okHttpClient)\n .build();\n\n @GET(\"/users/{username}\")\n Call<Contributor>user(\n @Path(\"username\")String login);\n\n @GET\n Call<List<Repository>> getRepos(@Url String url);\n\n}", "public static Retrofit getClient() {\n if (retrofit==null) {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n // set your desired log level\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n final OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .readTimeout(120, TimeUnit.SECONDS)\n .connectTimeout(120, TimeUnit.SECONDS)\n .addInterceptor(logging)\n .build();\n\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();\n\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n }\n return retrofit;\n }", "@Override\n public void onFailure(retrofit2.Call<FinalResponsePoJo> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n\n }", "@Override\n public void onFailure(retrofit2.Call<FinalResponsePoJo> call, Throwable t) {\n Log.e(\"TAG\", t.toString());\n\n }", "public OkHttpDownloader(OkHttpClient client) {\n this.client = client;\n }", "public interface RestService {\n\n @GET\n Call<String> get(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @FormUrlEncoded\n @POST\n Call<String> post(@Url String url, @FieldMap Map<String, Object> params);\n\n// @Multipart\n// @PUT\n// Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @PUT\n Call<String> put(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> delete(@Url String url, @HeaderMap Map<String, String> headers, @QueryMap Map<String, Object> params);\n\n @Streaming\n @GET\n Call<ResponseBody> download(@Url String url, @QueryMap Map<String, Object> params);\n\n @Multipart\n @POST\n Call<String> upload(@Url String url, @Part MultipartBody.Part file);\n\n// @GET\n// Call<SongSearchEntity> getSongSearchList(@Url String url, @QueryMap Map<String, Object> params, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<User> signIn(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<User> profile(@Url String url, @HeaderMap Map<String, String> headers);\n\n// @Multipart\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Part(\"id\") RequestBody id, @Part(\"key\") RequestBody key, @Part(\"value\") RequestBody value);\n//\n// @PUT\n// Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> user(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @GET\n Call<SongListEntity> musicbillList(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<SongListDetailEntity> musicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> createMusicbill(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @DELETE\n Call<String> deleteMusicbill(@Url String url, @HeaderMap Map<String, String> headers);\n\n @POST\n Call<String> addMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @Multipart\n @PUT\n Call<String> updateMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @PartMap Map<String, RequestBody> params);\n\n @DELETE\n Call<String> deleteMusicbillMusic(@Url String url, @HeaderMap Map<String, String> headers, @Body RequestBody body);\n\n @GET\n Call<SongSearchEntity> getMusic(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<LyricEntity> getLyric(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<String> getSinger(@Url String url, @HeaderMap Map<String, String> headers);\n\n @GET\n Call<ZhiliaoEntity> getVerify(@Url String url, @HeaderMap Map<String, String> headers);\n}", "public interface Interceptor {\n\n Response intercept(ChainNode nextChainNode, Request request);\n}", "OkHttpClient getClient(CertificateBlacklist certificateBlacklist, int eventCount) {\n Interceptor[] interceptors = {\n new GzipRequestInterceptor() };\n // TODO: add network interceptors in the following order\n // new NetworkUsageInterceptor(new NetworkUsageMetricsCollector(context, metrics)),\n // new NetworkErrorInterceptor(metrics, eventCount) };\n return configureHttpClient(certificateBlacklist, interceptors);\n }", "private void registerJsonFormatInterceptor() {\n RestTemplate restTemplate = getRestTemplate();\n if (interceptorsSupported) {\n List<ClientHttpRequestInterceptor> interceptors = restTemplate.getInterceptors();\n interceptors.add(new JsonFormatInterceptor());\n }\n }", "public interface HttpClientInterface {\n\n Retrofit getClient();\n}", "void onInterceptFailed();", "void onInterceptRequest(String url, String requestBody, String responseBody);", "@Override\n public void onFailure(Call<ModelBase> call, Throwable e) {\n Log.e(\"onError\", \"yes \");\n e.printStackTrace();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"ParentInfo\", \"ERROR.._---\" + error.getCause());\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"ParentInfo\", \"ERROR.._---\" + error.getCause());\n }", "@Override\n public void onResponse(String response) {\n }", "public interface Interceptor extends Instance {\n\n /**\n * First available number which you can use to set interceptor priority order. Interceptor with\n * order value = 1000 will be execute first and so on. This is valid only for interceptors\n * implemented by application and not framework.\n */\n public static final int APPLICATION_PRIORITY = 1000;\n\n /**\n * Set interceptor priority order.\n *\n * @return Interceptor priority order.\n */\n int order();\n\n}", "public void loadFromNetworkWithAuth(final String ServiceTag,\n int RequestType,\n final String Url,\n final JSONObject JsonRequest,\n final OnTaskCompleted callback,\n final OnTaskError errorCallback){\n\n JsonObjectRequest jsonObjReq=new JsonObjectRequest(RequestType, Url, JsonRequest,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(ServiceTag, response.toString());\n callback.onTaskCompleted(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (error instanceof TimeoutError || error instanceof NoConnectionError) {\n Toast.makeText(context,\"Error: Timeout\",Toast.LENGTH_LONG).show();\n } else if (error instanceof AuthFailureError) {\n Toast.makeText(context,\"Error: AuthFailure\",Toast.LENGTH_LONG).show();\n } else if (error instanceof ServerError) {\n String responseBody = null;\n try {\n responseBody = new String(error.networkResponse.data, \"utf-8\");\n JSONObject jsonObject = new JSONObject(responseBody);\n Log.e(\"Error-Msg\",jsonObject.getString(\"errorMessage\"));\n Toast.makeText(context, jsonObject.getString(\"errorMessage\"), Toast.LENGTH_LONG).show();\n errorCallback.onTaskError(jsonObject.getString(\"errorMessage\"));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else if (error instanceof NetworkError) {\n Toast.makeText(context,\"Error: Network issue\",Toast.LENGTH_LONG).show();\n } else if (error instanceof ParseError) {\n Toast.makeText(context,\"Error: Parse Error\",Toast.LENGTH_LONG).show();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Authorization\", ConstantVariables.auth_token);\n return headers;\n }\n };\n jsonObjReq.setRetryPolicy(retryPolicy);\n if (checkInternetConnection() == true) {\n try{\n AppController.getInstance().addToRequestQueue(jsonObjReq, ServiceTag);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n\n }", "public interface APIInterface {\n// @GET(\"api/home/books\")\n// Call<BookListResponse> getBookList();\n//\n// @GET(\"api/home/tests\")\n// Call<BookListResponse> getTestList();\n//\n// @GET(\"api/home/banners\")\n// Call<BannerResponse> getBanners();\n//\n\n @GET\n Call<LectureResponse> loadLectures(@Url String url);\n\n @GET\n Call<HomeResponse> loadHomePageFromApi(@Url String url);\n\n @GET(\"api/root\")\n Call<RootApiResponse> loadApiList();\n\n @GET\n Call<BannerResponse> loadBanners(@Url String url);\n\n @GET\n Call<BookListResponse> loadBookList(@Url String url);\n\n @GET\n Call<PracticeDetailResponse> loadPracticeDetail(@Url String url);\n\n @GET\n Call<PracticeListResponse> loadPracticeList(@Url String url);\n\n @GET\n Call<SectionResponse> loadSections(@Url String url);\n\n @GET\n Call<QuestionResponse> loadQuestion(@Url String url);\n\n @GET\n Call<ReadingTestResponse> loadReadingTest(@Url String url);\n\n @GET\n Call<ReadingQuestionResponse> loadReadingAnswer(@Url String url);\n\n @GET\n Call<AudioListRespone> loadAudioList(@Url String url);\n\n @FormUrlEncoded\n @POST\n Call<LoginResponse> login(@Url String url,\n @Field(\"email\") String username,\n @Field(\"password\") String password,\n @Field(\"facebookId\") String facebookId,\n @Field(\"googlePlusId\") String googlePlusId);\n\n @FormUrlEncoded\n @POST\n Call<BaseResponse> logout(@Url String url,\n @Field(\"accessToken\") String accessToken);\n}", "@ApiUrl(\"https://getman.cn/\")\n//@ApiVariableUrl(RandomUrlConfig.class)\n@ApiOkHttpConfig(MyOkHttpConfig.class)\n@ApiRetrofitConfig(MyRetrofitConfig.class)\npublic interface MyApi {\n\n /**\n * Doc内容 {@link MyOkHttpConfig}\n * xxx\n */\n @GET(\"mock/route/to/demo\")\n Request<ResponseBody> getResponseBody();\n\n @GET(\"mock/route/to/demo\")\n Request<ResponseBody> getResponseBodyWithParams(@QueryMap Map<String, Object> arg);\n\n @GET(\"mock/acap/api/helloworld\")\n Request<BaseModel<String>> getModel();\n\n @GET(\"/mock/acap/api/helloworld/error\")\n Request<BaseModel<String>> getModelError();\n\n @GET(\"mock/route/to/demo\")\n Call<ResponseBody> getCall(@Query(\"1\") String str, @Query(\"2\") String str2, @Query(\"3\") String str3);\n}", "public interface ApiInterface {\n\n //Account API\n String ping(OkHttpClient client);\n\n String obtainAuthToken(OkHttpClient client, String username, String password);\n\n JSONObject checkAccountInfo(OkHttpClient client, String token);\n\n JSONObject getServerInformation(OkHttpClient client);\n\n //Starred File API\n List<StarredFile> listStarredFiles(OkHttpClient client, String token);\n\n //Library API\n List<Library> listLibraries(OkHttpClient client, String token);\n\n Library getLibraryInfo(OkHttpClient client, String token, String repo_id);\n\n List<LibraryHistory> getLibraryHistory(OkHttpClient client, String token, String repo_id);\n\n JSONObject createNewLibrary(OkHttpClient client, String token, String libName, String desc, String password);\n\n boolean deleteLibrary(OkHttpClient client, String token, String repo_id);\n\n //File API\n String getFileDownloadLink(OkHttpClient client, String token, String repo_id, String p, boolean reuse);\n\n FileDetail getFileDetail(OkHttpClient client, String token, String repo_id, String p);\n\n List<FileCommit> getFileHistory(OkHttpClient client, String token, String repo_id, String p);\n\n boolean createFile(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameFile(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean moveFile(OkHttpClient client, String token, String repo_id, String p, String dst_repo, String dst_dir);\n\n boolean revertFile(OkHttpClient client, String token, String repo_id, String p, String commit_id);\n\n boolean deleteFile(OkHttpClient client, String token, String repo_id, String p);\n\n String getUploadLink(OkHttpClient client, String token, String repo_id, String p);\n\n List<UploadFileRes> uploadFile(OkHttpClient client, String token, String uploadLink, String parent_dir, String relative_path, File... files);\n\n String getUpdateLink(OkHttpClient client, String token, String repo_id, String p);\n\n boolean updateFile(OkHttpClient client, String token, String updataLink, File file, String target_file);\n\n //Directory API\n List<DirectoryEntry> listDirEntriesByP(OkHttpClient client, String token, String repo_id, String p);\n\n// List<DirectoryEntry> listDirectoryEntriesByID(OkHttpClient client,String token,String repo_id,String id);\n\n List<DirectoryEntry> listAllDirEntries(OkHttpClient client, String token, String repo_id);\n\n boolean createNewDir(OkHttpClient client, String token, String repo_id, String p);\n\n boolean renameDir(OkHttpClient client, String token, String repo_id, String p, String newName);\n\n boolean deleteDir(OkHttpClient client, String token, String repo_id, String p);\n\n String getDirDownloadToken(OkHttpClient client, String token, String repo_id, String parent_dir, String dirents);\n\n boolean queryZipProgress(OkHttpClient client, String token, String dirDownloadToken);\n\n String getDirDownloadLink(OkHttpClient client, String token, String dirDownloadToken);\n}", "@Override\n public void onFailure(Call<statusNearby> call, Throwable t) {\n Log.d(\"Status : \",\"Failed Fetch API 2\");\n }", "@Override\n public void onApiFailure(Throwable mThrowable) {\n\n }", "public interface YandexArtistApi {\n\n String URL = \"http://download.cdn.yandex.net/\";\n\n @GET(\"mobilization-2016/artists.json\")\n Call<List<YandexArtistResponse>> getListArtist();\n}", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(Call<ResponseModel> call, Throwable t) {\n Log.e(\"\", t.toString());\n }", "@Override\n public void onFailure(Call<ResponseModel> call, Throwable t) {\n Log.e(\"\", t.toString());\n }", "@Override\n public void onFailure(Call<ResponseModel> call, Throwable t) {\n Log.e(\"\", t.toString());\n }", "public interface Retrofit2andSqlLiteClient {\n\n @Headers({\"Accept:text/plain\"})\n @GET(\"ajpo-android/retrofit2andSqlLite-db/master/db.ajpo.6.json\")\n Call<ResponseBody> getdbajpo();\n}", "public interface OnComlpeteListener<T> extends OkHttpUtils.OnCompleteListener<T> {\n}", "@Override\n\tpublic void intercept(Object... objects) {\n\t\t\n\t}", "@Override\n protected void setupInterceptors(List<Interceptor> interceptorList) {\n super.setupInterceptors(interceptorList);\n interceptorList.add(mToolbarInterceptor);\n interceptorList.add(mFragmentStatePagerInterceptor);\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\n public void onFailure(Call<ResponseContent> call, Throwable t) {\n\n Log.e( mss.TAG, \"error \"+ t.toString());\n\n }", "@Override\r\n\t public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution)\r\n\t throws IOException {\n\t\t StringBuffer finalBuffer = new StringBuffer();\r\n\t\t finalBuffer.append(System.lineSeparator());\r\n\t\t try\r\n\t\t\t {\r\n\t\t\t finalBuffer.append(\"request URI: \" + request.getMethod() + \" \" + request.getURI());\r\n\t\t\t\t HashMap<String, String> headersMap = new HashMap<String, String>();\r\n\t\t\t\t HttpHeaders httpHeaders = request.getHeaders();\r\n\t\t\t\t Set<String> headerNameSet = httpHeaders.keySet();\r\n\t\t\t\t for(String headerName : headerNameSet)\r\n\t\t\t\t {\r\n\t\t\t\t\t if(HttpHeaders.ACCEPT_CHARSET.equalsIgnoreCase(headerName))\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t continue;\r\n\t\t\t\t\t }\r\n\t\t\t\t\t List list = httpHeaders.get(headerName);\r\n\t\t\t\t\t StringBuffer headerValue = new StringBuffer();\r\n\t\t\t\t\t if(list != null && list.size() > 0)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t for(int i = 0; i < list.size(); i ++)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t if(i == 0)\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t headerValue.append(list.get(i));\r\n\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t else\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t\t\t headerValue.append(\";\"+list.get(i));\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\t headersMap.put(headerName, headerValue.toString());\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t String json = new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(headersMap);\r\n\t\t\t\t finalBuffer.append(System.lineSeparator()).append(\"request headers: \" + json);\r\n\t\t\t\t finalBuffer.append(System.lineSeparator()).append(\"request body: \"+ getRequestBody(body));\t \r\n\t\t\t }\r\n\t\t catch(Exception e)\r\n\t\t\t {\r\n\t\t \t logger.error(\"traceRequest got exception:\"+e.getMessage());\r\n\t\t\t }\r\n\t\t \r\n\t ClientHttpResponse clientHttpResponse = execution.execute(request, body);\r\n\t BufferingClientHttpResponseWrapper bufferingClientHttpResponseWrapper = new BufferingClientHttpResponseWrapper(clientHttpResponse);\r\n\r\n\t try\r\n\t\t {\r\n\t \t finalBuffer.append(System.lineSeparator()).append(\"response status code: \" + clientHttpResponse.getRawStatusCode());\r\n\t \t finalBuffer.append(System.lineSeparator()).append(\"response body: \" + getBodyString(bufferingClientHttpResponseWrapper));\r\n\t\t }\r\n\t\t catch(Exception e)\r\n\t\t {\r\n\t \t logger.error(\"traceResponse got exception:\"+e.getMessage());\r\n\t\t }\r\n\t logger.debug(finalBuffer.toString());\r\n\t return clientHttpResponse;\r\n\t }", "@Override\n public void onResponse(Call<Response> call, retrofit2.Response<Response> response) {\n }", "protected Class getProxyInterfaceClass() throws Exception\n {\n return IMappingFileLocalObj.class;\n }", "public interface MovieDbApi {\n\n @GET(\"movie/upcoming\")\n Observable<MovieResponse> getUpcomingMovie(@Query(\"page\") int page);\n\n @GET(\"movie/now_playing\")\n Observable<MovieResponse> getNowPlayingMovie(@Query(\"page\") int page);\n\n @GET(\"search/movie\")\n Observable<MovieResponse> getSearchMovie(@Query(\"query\") String query,@Query(\"page\") int page);\n\n class Creator {\n public static MovieDbApi instance() {\n final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();\n loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n final MovieDbInterceptor movieDbInterceptor = new MovieDbInterceptor();\n\n final OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .addInterceptor(loggingInterceptor)\n .addInterceptor(movieDbInterceptor)\n .build();\n\n final Retrofit retrofit = new Retrofit.Builder()\n .addCallAdapterFactory(RxJava2CallAdapterFactory.create())\n .addConverterFactory(GsonConverterFactory.create())\n .client(okHttpClient)\n .baseUrl(BuildConfig.BASE_URL_MOVIE)\n .build();\n return retrofit.create(MovieDbApi.class);\n }\n }\n}", "public interface C2034ok extends IInterface {\n\n /* renamed from: com.google.android.gms.internal.ok$a */\n public static abstract class C2035a extends Binder implements C2034ok {\n\n /* renamed from: com.google.android.gms.internal.ok$a$a */\n private static class C2036a implements C2034ok {\n\n /* renamed from: le */\n private IBinder f4164le;\n\n C2036a(IBinder iBinder) {\n this.f4164le = iBinder;\n }\n\n /* renamed from: a */\n public void mo16484a(C2031oj ojVar, Uri uri, Bundle bundle, boolean z) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(\"com.google.android.gms.panorama.internal.IPanoramaService\");\n obtain.writeStrongBinder(ojVar != null ? ojVar.asBinder() : null);\n if (uri != null) {\n obtain.writeInt(1);\n uri.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n if (bundle != null) {\n obtain.writeInt(1);\n bundle.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n obtain.writeInt(z ? 1 : 0);\n this.f4164le.transact(1, obtain, (Parcel) null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public IBinder asBinder() {\n return this.f4164le;\n }\n }\n\n /* renamed from: bG */\n public static C2034ok m6022bG(IBinder iBinder) {\n if (iBinder == null) {\n return null;\n }\n IInterface queryLocalInterface = iBinder.queryLocalInterface(\"com.google.android.gms.panorama.internal.IPanoramaService\");\n return (queryLocalInterface == null || !(queryLocalInterface instanceof C2034ok)) ? new C2036a(iBinder) : (C2034ok) queryLocalInterface;\n }\n\n public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {\n if (i == 1) {\n parcel.enforceInterface(\"com.google.android.gms.panorama.internal.IPanoramaService\");\n C2031oj bF = C2031oj.C2032a.m6019bF(parcel.readStrongBinder());\n Bundle bundle = null;\n Uri uri = parcel.readInt() != 0 ? (Uri) Uri.CREATOR.createFromParcel(parcel) : null;\n if (parcel.readInt() != 0) {\n bundle = (Bundle) Bundle.CREATOR.createFromParcel(parcel);\n }\n mo16484a(bF, uri, bundle, parcel.readInt() != 0);\n return true;\n } else if (i != 1598968902) {\n return super.onTransact(i, parcel, parcel2, i2);\n } else {\n parcel2.writeString(\"com.google.android.gms.panorama.internal.IPanoramaService\");\n return true;\n }\n }\n }\n\n /* renamed from: a */\n void mo16484a(C2031oj ojVar, Uri uri, Bundle bundle, boolean z) throws RemoteException;\n}", "private RetrofitClient(Context context){\n mRetrofit=new Retrofit.Builder()\n .baseUrl(NetworkUtility.BASEURL)\n .addConverterFactory(GsonConverterFactory.create())\n// .client(createClient(context))\n .build();\n }", "public interface BaseModel {\r\n Retrofit retrofit = new Retrofit.Builder()\r\n .baseUrl(\"http://39.107.224.233/firstga/app/\")\r\n .addConverterFactory(GsonConverterFactory.create())\r\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\r\n .build();\r\n}", "public interface RetrofitService {\n\n //TODO.......Created By QiLi.........\n\n /**\n * 登录接口\n * @param userName\n * @param psw\n * @return\n */\n @FormUrlEncoded\n @POST(\"/base/user/login\")\n Observable<BaseResponse<TokenInfo>> doLogin(@Field(\"phone\") String userName, @Field(\"password\") String psw, @Field(\"clientId\") String clientId, @Field(\"imei\") String imei);\n\n /**\n * 用户退出接口\n * @return\n */\n @POST(\"/base/user/logout\")\n Observable<BaseResponse<Boolean>> doLogout();\n\n /**\n * 订单-获取订单\n * @param page 页码\n * @param pageSize 页数\n */\n @POST(\"/buyer/order/list\")\n Observable<BaseResponse<Pager<Order>>> getOrderList(@Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize);\n\n /**\n * 订单-获取订单详情\n */\n @POST(\"/buyer/order/detail\")\n Observable<BaseResponse<Order>> getOrderDetail(@Query(\"orderId\") String orderId);\n\n /**\n * 用户 - 登陆 - QQ登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"/base/user/thirdparty\")\n Observable<BaseResponse<Boolean>> doLoginByQQ(@Query(\"accessToken\") String accessToken,\n @Query(\"authType\") int authType,\n @Query(\"clientId\") String clientId,\n @Query(\"imei\") String imei,\n @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微信登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/wechat/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiChat(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 用户 - 登陆 - 微博登陆\n *\n * @param accessToken\n * @param uid\n */\n @POST(\"callback/weibo/auth\")\n Observable<BaseResponse<Boolean>> doLoginByWeiBo(@Query(\"accessToken\") String accessToken, @Query(\"uid\") String uid);\n\n /**\n * 获取广告Banner图片\n *\n * @param adType 广告位id(app首页轮播图列表id:9)\n */\n @GET(\"/base/ad\")\n Observable<BaseResponse<List<Adv>>> getAdvList(@Query(\"schoolId\")int schoolId, @Query(\"adType\") int adType);\n\n /**\n * 获取食堂配送楼栋\n */\n @POST(\"/buyer/shop/list\")\n Observable<BaseResponse<Pager<StoreStalls>>> getStalls(@Query(\"apartmentId\") int apartmentId,\n @Query(\"page\") int page,\n @Query(\"pageSize\") int pageSize,\n @Query(\"rangeCode\") String rangeCode,\n @Query(\"recomTag\") int recomTag);\n\n /**\n * 获取头条跑马灯\n */\n @POST(\"/buyer/order/marquee\")\n Observable<BaseResponse<List<Marquee>>> getMarquee(@Query(\"schoolId\") int schoolId);\n\n /**\n * 获取主营业务列表\n */\n @POST(\"/buyer/shop/rangelist\")\n Observable<BaseResponse<List<ChannelEntity>>> getRangelist();\n\n /**\n * 获取食堂配送楼栋\n * @param schoolId 配送学校Id\n */\n @POST(\"/buyer/school/apartmentlist\")\n Observable<BaseResponse<List<StoreDelivered>>> getStoreDistributionRange(@Query(\"schoolId\") int schoolId);\n\n /**\n * 选择学校 - 获取定位城市的学校\n * @param areaName 学校所在地区名字\n */\n @POST(\"/buyer/school/list\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolOfLocalCity(@Query(\"areaName\") String areaName);\n\n /**\n * 学校 - LBS:附近学校\n */\n @FormUrlEncoded\n @POST(\"/buyer/school/nearschool\")\n Observable<BaseResponse<List<School>>> getNearSchools(@Field(\"lat\") double lat,\n @Field(\"lng\") double lng,\n @Field(\"distance\") int distance);\n /**\n * 学校 - 检索学校\n */\n @POST(\"/buyer/school/search\")\n Observable<BaseResponse<List<School>>> getSchoolSearchList(@Query(\"schoolName\") String schoolName);\n\n /**\n * 选择学校 - 获取热门城市列表\n */\n @POST(\"area/hotCity\")\n Observable<BaseResponse<List<City>>> getCityHotList();\n\n /**\n * 选择学校 - 获取所有城市列表\n */\n @POST(\"/buyer/area/list\")\n Observable<BaseResponse<CityData>> getCityList();\n\n /**\n * 获取APP信息\n */\n @GET(\"app/auth/androidVersion\")\n Observable<BaseResponse<AppInfoResult>> getAppInfo();\n\n /**\n * 用户-收集手机信息\n * @param userId\n * @param clientId\n * @param os\n * @param osVersion\n * @param deviceModel\n * @param appVersion\n */\n @POST(\"app/collectClientMsg\")\n Observable<BaseResponse<Boolean>> collectClientMsg(@Query(\"userId\") String userId,\n @Query(\"clientId\")String clientId,\n @Query(\"os\")int os,\n @Query(\"osVersion\")String osVersion,\n @Query(\"deviceModel\")String deviceModel,\n @Query(\"appVersion\")String appVersion);\n\n /**\n * 用户 - 信息\n */\n @GET(\"/base/user/current\")\n Observable<BaseResponse<User>> userDoGetInfor();\n\n /**\n * 根据档口获取菜品分类\n * @param shopId 商家id\n */\n @POST(\"/buyer/shop/detail\")\n Observable<BaseResponse<FoodClassList>> getStallsgoodsClass(@Query(\"shopId\") String shopId);\n\n /**\n * 获取档口菜品信息\n * @param shopId 档口Id\n * @param goodsClassId\n * @param page\n * @param pageSize\n */\n @POST(\"/buyer/goods/list\")\n Observable<BaseResponse<Pager<Goods>>> getStallsGoods(@Query(\"apartmentId\") int apartmentId,\n @Query(\"shopId\") String shopId,\n @Query(\"goodsClassId\") String goodsClassId,\n @Query(\"page\")int page,\n @Query(\"pageSize\")int pageSize,\n @Query(\"hotTag\") int hotTag);\n\n\n\n\n /**\n * 用户-下单获取可用红包\n */\n @GET(\"/base/activity/redpacket/queryuserredpacketlist\")\n Observable<BaseResponse<VoucherList>> getUserCoupon();\n\n /**\n * 点餐 - 预计到达时间\n * @param shopId\n */\n @POST(\"/buyer/shop/worktime\")\n Observable<BaseResponse<WorkTimeList>> getEstimatedTime(@Query(\"shopId\") String shopId);\n\n\n /**\n * 订单-获取备注标签\n */\n @GET(\"app/auth/showexplainlabel\")\n Observable<BaseResponse<String>> showexplainlabelReq();\n\n /**\n * 订单-确认下单\n */\n @POST(\"/buyer/order/placeorder\")\n Observable<BaseResponse<String>> placeorder(@Query(\"activityId\") Integer activityId,\n @Query(\"buyerRemark\") String buyerRemark,\n @Query(\"cartIds\") String cartIds,\n @Query(\"channel\") String channel,\n @Query(\"delyEndDate\") String delyEndDate,\n @Query(\"delyFast\") int delyFast,\n @Query(\"delyStartDate\") String delyStartDate,\n @Query(\"shopId\") String shopId,\n @Query(\"userAddressId\") int userAddressId,\n @Query(\"voucherId\") Integer voucherId);\n\n /**\n * 点餐 - 带走 - 绑定手机\n */\n @POST(\"bindPhone\")\n Observable<BaseResponse<Boolean>> doOrderBindPhone(@Query(\"phone\") String phone);\n\n /**\n * 获取下单价格 - 获取实际优惠后价格\n *\n * @param cart_ids 购物车所有商品\n * @param voucherId 优惠券id\n * @param stallsId 档口id\n */\n @POST(\"order/settlement\")\n Observable<BaseResponse<Order>> doPayOrderPrice(@Query(\"cart_ids\") String cart_ids,\n @Query(\"voucherId\")String voucherId,\n @Query(\"stallsId\")String stallsId);\n\n /**\n * 用户 - 钱包 - 支付密码 - 是否认证\n */\n @GET(\"/base/acct/info\")\n Observable<BaseResponse<ActiveInfo>> userWalletPayPswIsAuthReq();\n\n /**\n * 点餐 - 下单 直接下单\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<String>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"payPwd\")String payPwd,\n @Query(\"thdType\")int thdType);\n\n\n /**\n * 点餐 - 支付-微信,支付宝\n *\n */\n @POST(\"/base/acct/payinfo\")\n Observable<BaseResponse<Order>> doPayOrder(\n @Query(\"bizId\") String bizId,\n @Query(\"bizType\")int bizType,\n @Query(\"thdType\")int thdType);\n\n /**\n * 用户 - 钱包 - 支付密码 - 认证\n */\n @POST(\"pdauth/auth\")\n Observable<BaseResponse<Boolean>> userWalletPayPswAuthReq(@Query(\"pdPassword\")String pdPassword);\n\n\n\n //TODO.......Created By QiLi.........\n\n /**\n * 七牛 - 请求TOKEN\n * @return\n */\n @POST(\"getQiniuToken\")\n Observable<BaseResponse<String>> getQiNiuTokenRequest(@Query(\"bucketName\") String bucketName);\n\n /**\n * 用户 - 修改 - 头像\n * @param avatarOldKey\n * @param avatarNewKey\n * @return\n */\n @POST(\"modifyAvatar\")\n Observable<BaseResponse<String>> doModifyAvatar(@Query(\"avatarOldKey\") String avatarOldKey,@Query(\"avatarNewKey\") String avatarNewKey);\n\n\n /**\n * 用户 - 修改 - 头像\n * @return\n */\n @POST(\"/base/user/avatar\")\n Observable<BaseResponse<String>> upLoadUserIcon(@Body RequestBody Body);\n\n /**\n * 用户 - 消息列表\n * @return\n */\n @GET(\"/base/msg/user/list\")\n Observable<BaseResponse<Pager<Message>>> getMessageList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 用户 - 修改 - 性别\n * @param sex\n * @return\n */\n @POST(\"modifySex\")\n Observable<BaseResponse<Boolean>> doModifySex(@Query(\"sex\") String sex);\n\n /**\n * 用户 - 修改 - 昵称\n * @param nikeName\n * @return\n */\n @POST(\"/base/user/nick\")\n Observable<BaseResponse<Boolean>> doModifyNickName(@Query(\"nickname\") String nikeName);\n\n\n /**\n * 用户 - 钱包 - 充值活动\n * @return\n */\n @GET(\"pdr/pdActivity\")\n Observable<BaseResponse<List<Action>>> userPDActivity();\n\n /**\n *用户 - 钱包 - 预存款日志记录\n * @param type\n * @param page\n * @param pagesize\n * @return\n */\n @GET(\"new/predeposit/logs\")\n Observable<BaseResponse<Pager<PredepositLog>>> userPredepositLogsReq(@Query(\"type\") Integer type,\n @Query(\"page\") Integer page,\n @Query(\"pagesize\") Integer pagesize);\n\n /**\n * 用户 - 钱包 - 支付密码 - 修改\n * @return\n */\n @POST(\"/base/acct/updatepwd\")\n Observable<BaseResponse<String>> userWalletPayPswModifly(@Query(\"oldPwd\") String oldPwd, @Query(\"newPwd\") String newPwd);\n\n /**\n * 用户 - 钱包 - 支付密码 - 创建\n * @param pdPassword\n * @return\n */\n @POST(\"/base/acct/setpwd\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCreate(@Query(\"payPwd\") String pdPassword);\n\n /**\n *用户 - 钱包 - 支付密码 - 获取验证码\n * @param mobilePhone\n * @param post\n * @return\n */\n @POST(\"pdauth/verifyregcode\")\n Observable<BaseResponse<Boolean>> userWalletPayPswCode(@Query(\"mobilePhone\") String mobilePhone, @Query(\"regcode\") String post);\n\n /**\n * 用户 - 获取验证码\n * @param mobilePhone\n * @return\n */\n @POST(\"/base/msg/code\")\n Observable<BaseResponse<Boolean>> getRegisterCode(@Query(\"codeType\") String codeType, @Query(\"phone\") String mobilePhone);\n\n\n /**\n * 优惠券提现\n * @return\n */\n @GET(\"getCash\")\n Observable<BaseResponse<Integer>> rapGetUserCashCount();\n\n /**\n * 抢单 - 提现\n * @return\n */\n @GET(\"withdrawCash\")\n Observable<BaseResponse<Boolean>> rapDoUserCash();\n\n /**\n * 用户地址列表\n * @return\n */\n @GET(\"/base/user/address\")\n Observable<BaseResponse<UserAddressListEntity>> getAdressList(@Query(\"page\") int page, @Query(\"pageSize\") int pageSize);\n\n /**\n * 删除地址\n * @param addressId\n * @return\n */\n @DELETE(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> userDoAdressDelete(@Query(\"addressId\") int addressId);\n\n /**\n * 用户-修改地址\n * @param addressId\n * @param sex\n * @param apartmentId\n * @param address\n * @param isDefault\n * @return\n */\n @PUT(\"/base/user/address\")\n Observable<BaseResponse<Boolean>> doModifyAdress(@Query(\"address\") String address,\n @Query(\"addressId\") int addressId,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"isDefault\") int isDefault,\n @Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"sex\") int sex);\n\n /**\n * 用户-设置默认地址\n * @param addressId\n * @return\n */\n @POST(\"/base/user/address/default\")\n Observable<BaseResponse<Boolean>> setAddressDefault(@Query(\"addressId\") int addressId);\n\n /**\n * 点餐 - 获取学校列表和宿舍列表\n * @param schoolId\n * @return\n */\n @GET(\"school/schoolApartmentZones\")\n Observable<BaseResponse<SchoolApartment>> getApartmentBySchoolId(@Query(\"schoolId\") int schoolId);\n\n /**\n * 用户-添加地址\n * @param sex\n * @param apartmentId\n * @param address\n * @param mobPhone\n * @param isDefault\n * @return\n */\n @POST(\"/base/user/address\")\n Observable<BaseResponse<UserAddress>> doAddAdress(@Query(\"name\") String name,\n @Query(\"sex\") String sex,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address,\n @Query(\"phone\") String mobPhone,\n @Query(\"isDefault\") String isDefault);\n\n /**\n * 用户 - 邀请好友\n * @param userId\n * @return\n */\n @GET(\"invitefriends/invite\")\n Observable<BaseResponse<InviteInfo>> getUserInviteInfo(@Query(\"userId\") String userId);\n\n /**\n * 用户 - 提交反馈信息\n * @param content\n * @return\n */\n @POST(\"/base/user/feedback\")\n Observable<BaseResponse<Boolean>> doUserFeedBack(@Query(\"content\") String content);\n\n /**\n * 用户 - 修改密码\n * @param oldpassword\n * @param password\n * @return\n */\n @POST(\"/base/user/pwd/modify\")\n Observable<BaseResponse<Boolean>> doUserModifyPassword(@Query(\"oldPwd\") String oldpassword,\n @Query(\"newPwd\") String password);\n\n\n /**\n * 用户 - 钱包 - 充值\n */\n @POST(\"predeposit\")\n Observable<BaseResponse<PredepositOrder>> doWellatPredeposit(@Query(\"paymentId\") int paymentId,\n @Query(\"predeposit\") double predeposit);\n\n /**\n * 用户-修改密码\n */\n @POST(\"newsignup\")\n Observable<BaseResponse<Boolean>> SignUpReq(@Query(\"schoolId\") int schoolId,\n @Query(\"mobilePhone\") String mobilePhone,\n @Query(\"regcode\") String regcode,\n @Query(\"password\") String password,\n @Query(\"type\") int type,\n @Query(\"invitationCode\") String invitationCode);\n\n /**\n * 用户-注册\n */\n @POST(\"/base/user/register\")\n Observable<BaseResponse<Boolean>> doRegister(@Query(\"inviteCode\") String invitationCode, @Query(\"password\") String password, @Query(\"phone\") String phone,@Query(\"verificationCode\") String regcode);\n\n /**\n * 取消订单\n */\n @POST(\"/buyer/order/cancel\")\n Observable<BaseResponse<Boolean>> orderDoCancal(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 确认收获\n * @param orderId\n */\n @POST(\"/buyer/order/complete\")\n Observable<BaseResponse<Boolean>> userOrderComplete(@Query(\"orderId\") String orderId);\n\n /**\n * 订单 - 催单\n */\n @POST(\"/buyer/order/reminder\")\n Observable<BaseResponse<Integer>> userOrderHurry(@Query(\"orderId\") String orderId);\n\n /**\n\n * 订单 - 获取结算订单详情\n */\n @POST(\"/buyer/order/settlement\")\n Observable<BaseResponse<VoucherList>> setTlement(@Query(\"cartIds\") String cartIds, @Query(\"shopId\") String shopId);\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"order/orderGoods/{goodId}\")\n Observable<BaseResponse<Boolean>> userOrderGoodEvaluate(@Path(\"orderId\") String goodId, @Query(\"scores\") int scores) ;\n\n /**\n * 订单 - 商品 - 评价\n */\n @POST(\"/buyer/order/evaluate\")\n Observable<BaseResponse<String>> evaluate(@Query(\"content\")String content,\n @Query(\"orderId\")String orderId,\n @Query(\"service\")int service,\n @Query(\"speed\")int speed,\n @Query(\"taste\")int taste) ;\n\n /**\n * 选择学校 - 获取学校通过城市Id\n */\n @GET(\"school/acquisitionAreaSchool\")\n Observable<BaseResponse<List<AreaCity>>> getSchoolByAreaId(@Query(\"areaId\") int areaId, @Query(\"areaName\") String areaName);\n\n /**\n * 点餐 - 指定学校的餐厅列表\n * @param schoolId 学校id\n */\n @GET(\"school/stores\")\n Observable<BaseResponse<List<Store>>> getSchoolStorList(@Query(\"schoolId\") int schoolId);\n\n /**\n * 抢单 - 用户 - 认证\n *\n * @param phone 电话\n * @param certificate 证件照片地址\n * @param apartmentId 宿舍id\n * @param address 详细地址\n */\n @POST(\"userjoinin\")\n Observable<BaseResponse<Boolean>> rapDoUserJoin(@Query(\"name\") String name,\n @Query(\"phone\") String phone,\n @Query(\"certificate\") String certificate,\n @Query(\"apartmentId\") int apartmentId,\n @Query(\"address\") String address);\n\n\n\n}", "public interface RetrofitClient\n{\n @GET(\"web\")\n Call<List<Model>> getAllModel();\n\n @GET(\"web/{id}\")\n Call<Model> getModel(@Body int id);\n\n @POST(\"web\")\n Call<Model> signup(@Body Model model);\n\n\n @GET(\"lost\")\n Call<List<LostModel>> getLostThings();\n @POST(\"found\")\n Call<FoundModel> postFoundThings(@Body FoundModel foundModel);\n @POST(\"lost\")\n Call<LostModel> postLostThings(@Body LostModel lostModel);\n\n}", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public void onErrorResponse(VolleyError error){\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onFinally() {\n\t\t\t\t\t\t\t\t\t\t\tupLoadPhones();\n\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n sendRequestWithOkHttp();\n// intent = new Intent(MainActivity.this,JsonText.class);\n// startActivity(intent);\n// Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_SHORT).show();\n }" ]
[ "0.53350735", "0.51587546", "0.5151088", "0.5027592", "0.49386182", "0.49330923", "0.49239275", "0.48286596", "0.47702572", "0.47568625", "0.47356656", "0.47041863", "0.4703149", "0.46235093", "0.44826773", "0.44465432", "0.4417839", "0.43975192", "0.43777388", "0.43742204", "0.43082315", "0.42996842", "0.429414", "0.42779556", "0.4264123", "0.42266384", "0.42220142", "0.41892856", "0.41796345", "0.41735864", "0.41633788", "0.41526186", "0.41422173", "0.4129845", "0.4111545", "0.40823197", "0.40607297", "0.40527594", "0.40460366", "0.40447125", "0.4041972", "0.4032915", "0.40312657", "0.40281367", "0.4027283", "0.40145448", "0.4006276", "0.40046057", "0.40046057", "0.4003031", "0.40006614", "0.40005654", "0.39936054", "0.39887002", "0.39803067", "0.3978386", "0.39680424", "0.39658952", "0.39650258", "0.39650258", "0.395806", "0.39540344", "0.39507583", "0.39451504", "0.39430872", "0.3923514", "0.39121106", "0.3907311", "0.39026064", "0.38955986", "0.38955986", "0.38907194", "0.38907194", "0.38907194", "0.3888963", "0.38822258", "0.38766915", "0.38764757", "0.3872762", "0.3872762", "0.3872762", "0.3872762", "0.3872762", "0.3872762", "0.38641542", "0.3861433", "0.38606185", "0.3858525", "0.38570368", "0.38529676", "0.3846763", "0.38428438", "0.38394403", "0.38385755", "0.38385755", "0.38385755", "0.38311645", "0.38311645", "0.38230234", "0.38226247" ]
0.49287874
6
taking input using Scanner class
public static void main (String[] args) { Scanner sc = new Scanner(System.in); //taking count of total testcases int t = sc.nextInt(); while(t-->0) { //taking total count of elements int n=sc.nextInt(); //creating an array of size n int []arr=new int[n]; //adding elements to the array for(int i=0;i<n;i++) arr[i]=(sc.nextInt()); //calling the method sumUsingStreams //and printing results System.out.println(sumUsingStreams(arr)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inputScanner(){\n\t\t Scanner sc=new Scanner(System.in); \n\t \n\t\t System.out.println(\"Enter your rollno\"); \n\t\t int rollno=sc.nextInt(); \n\t\t System.out.println(\"Enter your name\"); \n\t\t String name=sc.next(); \n\t\t System.out.println(\"Enter your fee\"); \n\t\t double fee=sc.nextDouble(); \n\t\t System.out.println(\"Rollno:\"+rollno+\" name:\"+name+\" fee:\"+fee); \n\t\t sc.close(); \n\t}", "public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}", "public void getInput(){\n\t\tScanner scan= new Scanner(System.in);\n\t\t//Get the range\n\t\tif(scan.hasNext()){\n\t\t\tcount=Integer.parseInt(scan.nextLine()); \n\t\t}\n\t\t//Initialize the array\n\t\tpeople = new People[count];\n\t\t//Get the array elements\n\t\tint i=0;\n\t\twhile(i<count){\n\t\t\tString lin[] = scan.nextLine().split(\" \");\n\t\t\tpeople[i] = new People(Integer.parseInt(lin[0]), Double.parseDouble(lin[1]));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t\n\t}", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "void Input() {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter name of the book::\");\n Bname = scanner.nextLine();\n System.out.println(\"Enter price of the book::\");\n price = scanner.nextDouble();\n }", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}", "public void input()\n\t{\n\t\t// this facilitates the output\n\t\tScanner sc = new Scanner(System.in) ; \n\t\tSystem.out.print(\"The Bike Number:- \") ;\n\t \tthis.bno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The Biker Name:- \") ; \n\t \tthis.name = new Scanner(System.in).nextLine() ; \t\n\t\tSystem.out.print(\"The Phone number:- \") ; \n\t \tthis.phno = sc.nextInt() ; \t\n\t\tSystem.out.print(\"The number of days:- \") ; \n\t \tthis.days = sc.nextInt() ; \t\n\t}", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n\n\n\n }", "public void userInput() {\r\n System.out.println(\"You want to convert from:\");\r\n this.fromUnit = in.nextLine();\r\n System.out.print(\"to: \");\r\n this.toUnit = in.nextLine();\r\n System.out.print(\"The value is \");\r\n this.value = in.nextDouble();\r\n }", "public static String readUserInput() {\n return in.nextLine();\n }", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "void scanner() {\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\tString source = \"asdqw easd casa\";\r\n\t\tScanner s1 = new Scanner(source);\r\n\t\t// hasNext() - testuje wartosc kolejnego tokena, ale go nie pobiera\r\n\t\t// next() - pobiera kolejny token\r\n\t\t// domyslnie bialy znak jest delimiterem\r\n\t\twhile (s1.hasNext()) {\r\n\t\t\tSystem.out.println(s1.next());\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// hasNextXxx() - dla wszystkich primitives oprocz chara\r\n\t\t// nextXxx() - pobiera kolejny prymitywny token\r\n\t\tScanner s2 = new Scanner(\"1 true 34 hi\");\r\n\t\tboolean b;\r\n\t\twhile (b = s2.hasNext()) {\r\n\t\t\tif (s2.hasNextInt()) {\r\n\t\t\t\tint i = s2.nextInt();\r\n\t\t\t\tSystem.out.println(\"integer token: \" + i);\r\n\t\t\t} else if (s2.hasNextBoolean()) {\r\n\t\t\t\tboolean b2 = s2.nextBoolean();\r\n\t\t\t\tSystem.out.println(\"boolean token: \" + b2);\r\n\t\t\t} else {\r\n\t\t\t\tString str = s2.next();\r\n\t\t\t\tSystem.out.println(\"String token: \" + str);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"---------- Scanner\" + ++exampleNumber\r\n\t\t\t\t+ \"----------\");\r\n\r\n\t\t// useDelimiter(delimiter) - ustawienie delimitera (wyrazenia regularnego) wg ktorego bedzie przetwarzany strumien\r\n\t\t// domyslnym delimiterem jest spacja, tabulator, ogolnie bialy znak lub znaki\r\n\t\tScanner s3 = new Scanner(\"Test1 true 34 hi\");\r\n\t\ts3.useDelimiter(\"\\\\d\"); // delimiterem jest cyfra\r\n\t\twhile (s3.hasNext()) {\r\n\t\t\tSystem.out.println(s3.next());\r\n\t\t}\r\n\t}", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}", "public static void main(String[] args) \n {\n Scanner sc = new Scanner(System.in); \n \n // String input\n System.out.print(\"What's your name? \"); \n String name = sc.nextLine(); \n \n // Print the values to check if input was correctly obtained. \n System.out.println(\"Name: \" + name); \n\n // Close the Scanner\n sc.close();\n }", "public static void main(String[] args) {\n\t\tString s = \"We're learning about Scanner\";\n\t\tSystem.out.println(s);\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint m = sc.nextInt();\n//\t\tint n = sc.nextInt();\n//\t\tSystem.out.println(\"The Value of m is: \"+m);\n//\t\tSystem.out.println(\"The Value of n is: \"+n);\n//\t\tdouble d = sc.nextDouble();\n//\t\tString name = sc.next();//Gives us one Word\n//\t\tSystem.out.println(\"Name is: \" + name);\n\t\t\n//\t\tString fullName = sc.nextLine();\n//\t\tSystem.out.println(\"Full Name is: \" + fullName);\n\t\t\n\t\tString intInput = sc.nextLine();\n\t\tint n = Integer.parseInt(intInput);\n\t\tSystem.out.println(n);\n\t}", "public String getUserInput(String question) {\r\n System.out.print(question);\r\n return scanner.next();\r\n }", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "String getInput();", "public void takeUserInput() {\n\t\t\r\n\t}", "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 }", "private static String inputStringHelper(Scanner scanner, String field) {\n System.out.println(\"Type in your new friend's \" + field + \": \");\n return scanner.nextLine();\n }", "public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\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 }", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "public static void echoContents(Scanner in) {\n }", "public void takeInput() {\n\t\tboolean flag = true;\n\t\tMain test = new Main();\n\t\twhile(flag) {\n\t\t\tLOGGER.info(\"Enter an option 1.Calculate Simple Interest 2.Calculate Compound Interest 3.exit\");\n\t\t\tint val = sc.nextInt();\n\t\t\tswitch(val) {\n\t\t\tcase 1:\n\t\t\t\ttest.takeInputForSimpleInterest();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttest.takeInputForCompoundInterest();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOGGER.info(\"Enter valid input\");\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "@Override\n public void input() {\n super.input();\n Scanner sc = new Scanner(System.in);\n System.out.printf(\"Nhập số trang sách giáo khoa: \");\n amountPage = Integer.valueOf(sc.nextLine());\n System.out.printf(\"Nhập tình trạng sách giáo khoa: \");\n status = sc.nextLine();\n System.out.printf(\"Nhập số lượng mượn: \");\n amountBorrow= Integer.valueOf(sc.nextLine());\n }", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "@Override\n public void processInput() throws IllegalArgumentException, InputMismatchException,\n FileNotFoundException {\n Scanner scanner = new Scanner(this.in);\n while (scanner.hasNext()) {\n String input = scanner.next();\n switch (input) {\n case \"q\":\n return;\n case \"load:\":\n File imageFile = new File(scanner.next());\n if (imageFile.exists()) {\n this.model = this.model.fromImage(load(imageFile));\n } else {\n throw new FileNotFoundException(\"File does not exist\");\n }\n break;\n case \"save:\":\n String path = scanner.next();\n this.save(this.model.getModelImage(), getImageFormat(path), path);\n break;\n default:\n Function<Scanner, EnhancedImageModel> getCommand = knownCommands.getOrDefault(\n input, null);\n if (getCommand == null) {\n throw new IllegalArgumentException(\"command not defined.\");\n } else {\n this.model = getCommand.apply(scanner);\n }\n break;\n }\n }\n\n }", "public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}", "static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }", "private static String scan(String text)\r\n\t{\r\n\t\tSystem.out.print(text);\r\n\t\treturn input.nextLine();\r\n\t}", "private static Integer[] readInputFromUser(Scanner in) {\n\t\tInteger[] array = null;\n\t\t/**\n\t\t * Accept the quantity of the data along with actual data.\n\t\t */\n\t\tSystem.out.print(\"Please enter number of integers you want to input:\");\n\t\tint s = in.nextInt();\n\t\tarray = new Integer[s];\n\t\tSystem.out.print(\"Please enter Integers:\");\n\n\t\tfor (int i = 0; i < s; i++) {\n\t\t\tarray[i] = in.nextInt();\n\t\t}\n\t\tSystem.out.println(\"Input Array: \" + Arrays.toString(array));\n\t\treturn array;\n\t}", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public InputReader() {\n reader = new Scanner(System.in);\n }", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "public static int askUser(Scanner in)\n {\n System.out.println(\"What do you want, respectable human being?\");\n System.out.println(\"1. Add Reminder\");\n System.out.println(\"2. View Reminder\");\n System.out.println(\"3. Edit Reminder\");\n System.out.println(\"4. Delete Reminder\");\n System.out.println(\"5. Exit\");\n System.out.print(\"User Input : \");\n return in.nextInt();\n }", "public void getInfo() {\n Scanner scanner = new Scanner(System.in);\n //get values from the user using scanner and sets class variables appropriately\n System.out.print(\"Enter the first name: \");\n setFirstName(scanner.nextLine());\n\n System.out.print(\"Enter the last name: \");\n setLastName(scanner.nextLine());\n\n System.out.print(\"Enter the ZIP code: \");\n setZipcode(scanner.nextLine());\n\n System.out.print(\"Enter the employee ID: \");\n setEmployeeID(scanner.next());\n }", "public static void main(String args[])throws IOException\n\t{\n\tScanner obj=new Scanner(System.in);\n\n\t//Entering a string\n\tSystem.out.println(\"\\nEnter a string !\");\n\tString s=obj.nextLine();\n\tSystem.out.println(\"you have entered \"+ s);\n\n\t//entering a word\n\tSystem.out.println(\"\\nEnter a word !\");\n\tString w=obj.next();\n\n\t//entering an integer\n\tSystem.out.println(\"\\nEnter an integer !\");\n\tint n=obj.nextInt();\n\n\t//entering a float\n\tSystem.out.println(\"\\nEnter a floating point number !\");\n\tfloat f=obj.nextFloat();\n\n\t//Printing the inputs\n\tSystem.out.println(\"\\nThe inputs are .....\");\n\tSystem.out.println(\"\\nWord : \"+w+\"\\nInteger : \"+n+\"\\nFloat : \"+f);\n\n\n}", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\r\n System.out.println(\"Introduzca un entero: \");\r\n int a = scn.nextInt();\r\n System.out.println(\"El numero introducido es el: \" + a);\r\n String b = scn.nextLine();\r\n System.out.println(b);\r\n String c = scn.next();\r\n System.out.println(c);\r\n }", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "public void input() throws ParseException {\r\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Please enter id: \");\r\n\t\tString idSt = scn.nextLine();\r\n\t\tid = Integer.parseInt(idSt);\r\n\t\tSystem.out.println(\"Please enter title: \");\r\n\t\ttitle = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter authors name: \");\r\n\t\tauthor = scn.nextLine();\r\n\t\tSystem.out.println(\"Please enter date (dd.MM.yyyy): \");\r\n\t\tString scnDate = scn.nextLine();\r\n\t\tdateOfPublication = stringToDate(scnDate);\r\n\t}", "public String userCommand(){\n return scanner.nextLine();\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n String str=sc.next();\n String str1=sc.next();\n String str2=sc.next();\n String str3=sc.next();\n System.out.println(str);\n System.out.println(str1);\n System.out.println(str2);\n System.out.println(str3);\n\n\n }", "String getUserInput();", "private static String getInput(String message, Scanner sc) {\n String result = \"\";\n while (result.equals(\"\")) {\n System.out.println(message);\n result = sc.nextLine();\n }\n return result;\n }", "private static Object getInput(String message, Scanner sc, Class type) throws IllegalArgumentException {\n while (true) {\n System.out.println(message);\n String in = sc.nextLine();\n if (type.equals(Integer.class)) {\n try {\n return Integer.parseInt(in, 10);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Float.class)) {\n try {\n return Float.parseFloat(in);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Boolean.class)) {\n switch (in.toLowerCase()) {\n case \"y\":\n return true;\n case \"n\":\n return false;\n default:\n System.out.println(\"You responded '\" + in + \"' - invalid, defaulting to No\");\n return false;\n }\n }\n else {\n throw new IllegalArgumentException(\"Can't convert to type \" + type.toString());\n }\n }\n }", "public void processInput() {\n\n\t}", "public static void main(String[] args) {\n String query,input;\n int numberOfInputs;\n Scanner scan=new Scanner(System.in);\n numberOfInputs=scan.nextInt();\n for(int i=0;i<numberOfInputs;i++){\n query=scan.next();\n if(query.equals(\"add\")){\n input=scan.next();\n add(input);\n }\n if(query.equals(\"find\")){\n input=scan.next();\n find(input);\n }\n }\n\n }", "private String getUserInput(Scanner sc) {\n\t\t\n\t\tif (sc == null) {\n\t\t\treturn null;\n\t\t}\n\n\t System.out.print(\"\\nctransfer > \");\n\t return sc.nextLine();\n\t}", "@Test\n\tpublic void one()\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"enter the value of a\");\n\t\tint a = sc.nextInt();\n\t\tSystem.out.println(\"value of a is: \" +a);\n\t}", "private static String[] collectInput() {\n\t\tString command = sc.next();\n\t\tString i = sc.next();\n\t\tString destination = sc.next();\n\t\treturn new String[] { command, destination };\n\t\t\n\t}", "public UserInput()\n {\n try\n {\n scanner = new Scanner(System.in);\n input = new InputMethods();\n citiesTotal = new CityContainer();\n\n if(scanner != null)\n {\n askUser();\n }\n } catch(Exception ex)\n {\n }\n }", "public static void main(String[] args) throws IOException {\n Scanner scanner = new Scanner(System.in);\n /* Use nextInt to get user integer */\n System.out.print(\"Enter Integer:\\n\");\n try{\n int i = scanner.nextInt();\n System.out.printf(\"%d\\n\", i);\n }catch(NumberFormatException nfe){\n System.err.println(\"Invalid Format!\\n\");\n }\n /* Use next to get 3 strings from user */\n System.out.println(\"Enter 3 words:\");\n String first = scanner.next();\n String second = scanner.next();\n String third = scanner.next();\n\n System.out.printf(\"%s %s %s\\n\", first, second, third);\n\n /* Use nextLine to capture user sentence */\n System.out.println(\"Enter a sentence:\");\n try{\n String userSentence = scanner.nextLine();\n userSentence = scanner.nextLine();\n System.out.printf(\"%s\\n\", userSentence);\n }catch(NumberFormatException nfe){\n System.out.println(\"No sentence\");\n }\n\n System.out.println(\"Enter length: \");\n int length = scanner.nextInt();\n\n System.out.println(\"Enter width: \");\n int width = scanner.nextInt();\n\n System.out.printf(\"area: %d\\n\", length*width);\n System.out.printf(\"perimeter: %d\\n\", 2*length+2*width);\n\n // close the scanner\n scanner.close();\n }", "private static void inputs(Scanner fileScanner) {\n\t\tSystem.out.printf(\"You will now need to enter in the correct pathway to the files containing: \\n\\t1.) RNA table\\n\\t2.) RNA strand\\n\\t3.) Output Protien strand (this will create a new file)\\n\");\n\t\tSystem.out.println(\"Example pathway: C:/CSC142_143/DataFiles/RNATable.txt\");\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Table: \");\n\t\tsetRNATablePathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Strand: \");\n\t\tsetRNAStrandPathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the decoded protien: \");\n\t\tsetRNAOutPathway(fileScanner.next());\n\t\tfileScanner.close();\n\t\t\n\t}", "public static void getString()\n\t{\n\t\t\n\t\tScanner s=new Scanner(System.in);\n\t\t\n\t\t//Here Scanner is the class name, a is the name of object, \n\t\t//new keyword is used to allocate the memory and System.in is the input stream. \n\t\t\n\t\tSystem.out.println(\"Entered a string \");\n\t\tString inputString = s.nextLine();\n\t\tSystem.out.println(\"You entered a string \" + inputString );\n\t\tSystem.out.println();\n\t}", "public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }", "public static String inputStringFromKeyboard(String input){\n System.out.println(\"Input the String: \");\n //Scanner, save the inputted from keyboard\n Scanner scanner = new Scanner(System.in);\n //The value 'scanner' is assigned to 'input'\n input = scanner.next();\n return input;\n }", "public static void main(String[] args) {\n\t\tScanner reader=new Scanner(System.in);\r\n\t\tSystem.out.println(\"what is u r name\");\r\n\t\tString name=reader.next();\r\n\t\tSystem.out.println(\"u r name is\"+ name);\r\n\t\tScanner reader1=new Scanner(System.in);\r\n\t\tSystem.out.println(\"how old r u\");\r\n\t\tint age=reader1.nextInt();\r\n\t\tSystem.out.println(\" u r age is\"+ age);\r\n\t\t\r\n\r\n\t}", "public void readInSupercar() {\r\n\t\tScanner kbInput = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Car's make and model? \");\r\n\t\tthis.setMakeAndModel(kbInput.nextLine());\r\n\t\tSystem.out.print(\"Country of origin? \");\r\n\t\tthis.setCountry(kbInput.nextLine());\r\n\t\tSystem.out.print(\"0 to 60 time (in seconds)? \");\r\n\t\tthis.setZeroTo60(kbInput.nextDouble());\r\n\t\tSystem.out.print(\"Total cost? $\");\r\n\t\tthis.setTotalCost(kbInput.nextInt());\r\n\t\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in); \r\n\t\twhile(sc.hasNext()){\r\n\t\t\tint x=sc.nextInt();\r\n\t\t\tint y=sc.nextInt();\r\n\t\t\tint result=getResult(x,y);\r\n\t\t\tSystem.out.println(result);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void pedirPalabra() {\r\n\r\n Scanner entradaEscaner = new Scanner(System.in);\r\n palabra = entradaEscaner.nextLine();\r\n }", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "private static String getUserInput(Scanner scanner) {\n\t\tString stringGuess = \"\";\n\t\t//16\n while (true) {\n\t\t System.out.println(\"Enter a three-digit number guess:\");\n\t\t stringGuess = scanner.nextLine(); \n\t\t if (stringGuess.length() == 3){\n\t\t break;\n\t\t }\n\t\t}\n\t\treturn stringGuess;\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 Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "public static void take_inputs(){\n\t\tScanner in = new Scanner(System.in);\n\t\tSystem.out.println(\"Input the ideal restaurant attributes:\");\n\t\tSystem.out.print(\"Cheap: \"); cheap = in.nextFloat();\n\t\tSystem.out.print(\"Nice: \"); nice = in.nextFloat();\n\t\tSystem.out.print(\"Traditional: \"); traditional = in.nextFloat();\n\t\tSystem.out.print(\"creative: \"); creative = in.nextFloat();\n\t\tSystem.out.print(\"Lively: \"); lively = in.nextFloat();\n\t\tSystem.out.print(\"Quiet: \"); quiet = in.nextFloat();\n\t\t\n\t\tSystem.out.println(\"Input the attributes weights:\");\n\t\tSystem.out.print(\"Weight for Cheap: \"); wt_cheap = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Nice: \"); wt_nice = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Traditional: \"); wt_traditional = in.nextFloat();\n\t\tSystem.out.print(\"Weight for creative: \"); wt_creative = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Lively: \"); wt_lively = in.nextFloat();\n\t\tSystem.out.print(\"Weight for Quiet: \"); wt_quiet = in.nextFloat();\n\t}", "void run() {\n Scanner sc = new Scanner(System.in);\r\n int N = sc.nextInt();\r\n while (N-- > 0)\r\n AddSuggestion(sc.next());\r\n\r\n int Q = sc.nextInt();\r\n while (Q-- > 0)\r\n System.out.println(Query(sc.next() )); // subString \r\n \r\n sc.close();\r\n }", "private static void input(Scanner userScn)\n {\n // Prompt\n //System.out.print(\"Degree value of polynomial? (1-4): \");\n Prompt();\n\n // Sanitation logic... .next() should catch all\n if(!userScn.hasNextInt())\n {\n userScn.next();\n Prompt();\n }\n else if((d = userScn.nextInt()) > MaxDegree || d < MinDegree) // super efficient\n {\n Prompt();\n }\n else // exits with valid input\n {\n System.out.println(\"Your polynomial degree is: \" + d);\n }\n }", "public static void main(String[] args) {\r\n //create a scanner to obtain input from the console window\r\n\r\n Scanner input = new Scanner(System.in);\r\n\r\n System.out.print(\"Enter Name \"); //prompt\r\n String name1 = input.nextLine(); //read first number from user \r\n\r\n System.out.print(\"Enter age: \"); //prompt\r\n\r\n int num2 = input.nextInt(); //read second number from user \r\n\r\n input.close();\r\n\r\n\r\n \r\n\r\n System.out.println(\"Your name is \" + name1 + \" You are \"+ num2 + \" years old\");\r\n\r\n }", "@Override\n public T getData() {\n Scanner scanner = new Scanner(System.in);\n return (T) scanner.next();\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "public Game()\n {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Get player name\"); \n playerName = userInput.nextLine(); \n }", "String consoleInput();", "public void doIt(Input in);", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "private static String[] collectInput(Scanner sc) {\n\t\tString y1= \"north\";\n\t\tString y2 = \"south\";\n\t\tString y3 = \"east\";\n\t\tString y4 = \"west\"; \n\t\tString y5 = \"0\";\n\t\t\n\t\tSystem.out.println(\"\\n Choose a direction north, south, east, or west\");\n\t\tSystem.out.println(\"Press 0 to end the programd\");\n\t\n\t\t\tString y = sc.nextLine();\n\t\t\tif(y.equals(y1)) {\n\t\t\t\tSystem.out.println(\"You travel north\");\n\t\t\t} \telse if(y.equals(y2)) {\n\t\t\t\tSystem.out.println(\"You travel south\");\n\t\t\t} \telse if(y.equals(y3)) {\n\t\t\t\tSystem.out.println(\"You travel east\");\n\t\t\t} \telse if(y.equals(y4)) {\n\t\t\t\tSystem.out.println(\"You travel west\");\n\t\t\t} \telse if(y.equals(y5)) {\n\t\t\t\tSystem.out.println(\"Exiting\");\n\t\t\t\tSystem.exit(0);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Not a valid direction \");\n\t\t\t}\n\t\t\t\n\t\treturn null;\n\t}", "private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\n\t\tint a = Integer.valueOf(sc.nextLine());\n\t\tint b = Integer.valueOf(sc.nextLine());\n\t\tint c = Integer.valueOf(sc.nextLine());\n\n\t\tSystem.out.println(getVal(arr, a));\n\t\tSystem.out.println(getVal(arr, b));\n\t\tSystem.out.println(getVal(arr, c));\n\t}", "public String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public static String getInput(Scanner scan){\n int box = scan.nextInt();\n switch(box){\n case 1:\n System.out.print(\"You've won $10,000\");\n break;\n case 2:\n System.out.print(\"You've won a half eaten turkey sandwhich\");\n break;\n case 3: \n System.out.print(\"You've won a one-on-one date with Betty White\");\n break;\n default:\n System.out.println(\"A Wrong Number! You get nothing! Better restart the game LOL\");\n System.exit(1);\n break;\n }\n String string = \"t\";\n return string;\n }", "protected static int easyIn() {\n // ADDITIONAL CHECKS?\n int a;\n debug(\"Please enter your selection: \");\n scanner = new Scanner(System.in);\n\t\ta = scanner.nextInt();\n return a;\n }", "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 int getUserIntInput(String question) {\r\n System.out.print(question);\r\n while (!scanner.hasNextInt()) {\r\n scanner.next();\r\n }\r\n int result = scanner.nextInt();\r\n return result;\r\n }", "public void input() {\r\n System.out.print(\"Enter your employee ID number: \");\r\n ID = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Gross Pay: \");\r\n grosspay = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your State Tax: \");\r\n Statetax = enter.nextDouble();\r\n \r\n System.out.print(\"Enter your Federal Tax: \");\r\n Fedtax = enter.nextDouble(); }", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public void get_UserInput(){\r\n\t Scanner s = new Scanner(System.in);\r\n\t // get User inputs \r\n\t System.out.println(\"Please enter a number for Dry (double):\");\r\n\t DRY = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wet (double):\");\r\n\t WET = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for ISNOW (double):\");\r\n\t ISNOW = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Wind(double):\");\r\n\t WIND = s.nextDouble(); \r\n\t System.out.println(\"Please enter a number for BUO (double):\");\r\n\t BUO = s.nextDouble();\r\n\t System.out.println(\"Please enter a number for Iherb (int):\");\r\n\t IHERB = s.nextInt(); \r\n\t System.out.println(\"****Data for parameters are collected****.\");\r\n\t System.out.println(\"Data for parameters are collected.\");\r\n\t dry=DRY;\r\n\t wet=WET;\r\n}", "public static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t \n\t\tSystem.out.println(\"Enter street address:\");\n\t\t \n\t\tint houseNumber = input.nextInt();\n\t\tString street = input.nextLine(); // instead of next(); which only reads to next space.\n\t\t \n\t\tSystem.out.println(\"house number is \" + houseNumber);\n\t\tSystem.out.println(\"street is \" + street);\n\t\t\n\t\tinput.close();\n\t\t\n\t\t\n\t}", "private static int buscarEntero(Scanner s) {\n\t\tint Temp = -1;\n\n\t\tif (!s.hasNextLine() || !s.hasNextInt()) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tString ValorLeido = s.nextLine();\n\t\tif (ValorLeido.length() != 0) {\n\t\t\tScanner Aux = new Scanner(ValorLeido);\n\t\t\twhile (Aux.hasNextInt()) {\n\t\t\t\tTemp = Aux.nextInt();\n\t\t\t}//fin while\n\t\t\tAux.close();\n\t\t}\n\t\treturn Temp;\n\t}" ]
[ "0.72666794", "0.7260617", "0.69082665", "0.6770765", "0.67132956", "0.6695114", "0.66887337", "0.66863775", "0.6684505", "0.6645453", "0.6627389", "0.6617125", "0.660051", "0.65862167", "0.6572887", "0.65695107", "0.6466872", "0.64412695", "0.64167774", "0.641208", "0.6407738", "0.64064133", "0.63907003", "0.6353831", "0.6353738", "0.63527995", "0.63317144", "0.63312334", "0.63296044", "0.6323512", "0.6312848", "0.6309192", "0.6306622", "0.62360084", "0.6226821", "0.6225556", "0.62251395", "0.6222383", "0.62221956", "0.6213936", "0.6204266", "0.6189019", "0.6187204", "0.6181426", "0.61734563", "0.61706823", "0.6169094", "0.6162803", "0.61604506", "0.61598825", "0.6146157", "0.61438453", "0.61410916", "0.6122362", "0.6114879", "0.6114691", "0.6112723", "0.61116207", "0.6100275", "0.60972244", "0.6094005", "0.60860914", "0.6079793", "0.6072296", "0.6063842", "0.60584676", "0.6057539", "0.6056642", "0.60543543", "0.60510796", "0.6049555", "0.6042055", "0.603429", "0.60300696", "0.60286266", "0.6027161", "0.6018772", "0.6011531", "0.60024875", "0.59967595", "0.5991491", "0.5988481", "0.59875447", "0.59800255", "0.5979045", "0.59760326", "0.59710014", "0.5962091", "0.5958995", "0.5957743", "0.595712", "0.5956951", "0.5954863", "0.5954863", "0.59502494", "0.5937056", "0.59293115", "0.59259343", "0.59230083", "0.5917759", "0.59167844" ]
0.0
-1
} Driver Code Ends User function Template for Java
public static int sumUsingStreams(int []arr) { //Your code here //using stream.sum() return Arrays.stream( arr) .sum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "private static void showJava(String string) { TODO Auto-generated method stub\n\t//\n\t\n}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "protected void javaCallback() {\n\t}", "public abstract String mo9239aw();", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "JavaStatement createJavaStatement();", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "public void method_201() {}", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public abstract String mo41079d();", "public void method_4270() {}", "public static jn J(Context param0) {\n }", "void mo57277b();", "public abstract String mo11611b();", "public void mo21785J() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "zzafe mo29840Y() throws RemoteException;", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "zzang mo29839S() throws RemoteException;", "public void handleJava(HtmlObjects.Java t)\n {\n }", "public void mo21793R() {\n }", "public abstract void mo42331g();", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) {\n\t\tFunctionsInJava obj = new FunctionsInJava();\n\t\t\n\t\t//Calling noReturn Method with Class Object\n\t\tobj.noReturn(); // this will not return anything\n\t\t\n\t\t// Calling Retuen method with Class Object\n\t\tint A = obj.Return(); // this will return an integer Value\n\t\tSystem.out.println(A);\n\t\t\n\t\t//Calling Devision Method with Class Object\n\t\tA = obj.devision(10, 2); // this will pass some values in parameter and then method will return a Value\n\t\tSystem.out.println(\"A-\"+A);\n\t}", "public void jeu() {\n\n }", "public abstract void mo2624j();", "public abstract String mo9091a();", "public static void main(String[] args)\r\t{", "private void test() {\n\n\t}", "private static void oneUserExample()\t{\n\t}", "public abstract String mo41086i();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tnew Action() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String content) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tSystem.out.println(content);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}.execute(\"jdk1.8之前匿名内部类实现方式\");\r\n\t\t\r\n\t\t\r\n\t\t//lambda\r\n\t\tAction login=(String content)->{\r\n\t\t\tSystem.out.println(\"jdk1.8的lambda语法实现\");\r\n\t\t};\r\n\t\tlogin.execute(\"jdk1.8的lambda语法实现\");\r\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "public abstract String mo118046b();", "public abstract int mo9745j();", "public interface JavaCode {\n\n /**\n * Get an unique identification code for an object\n * TODO: This method is not reliable as hash codes are not unique, should use an UUID generator singleton instead.\n *\n * @param obj the object\n * @return the unique identification code\n */\n static int getUniqueID(Object obj) {\n return obj.hashCode();\n }\n\n /**\n * Compiles this code. If an object implements both {@link JavaCode}\n * and {@link JavaExpression}, only one of this method and\n * {@link JavaExpression#compileExpression(Subroutine, JavaScope)} should be called.\n *\n * @param subroutine the subroutine which this code belongs to\n * @param parent the parent scope of this code\n * @throws JTAException if an error occurs\n */\n void compileCode(Subroutine subroutine, JavaScope parent) throws JTAException;\n}", "public abstract String mo9238av();", "public void mo115188a() {\n }", "public abstract Code vreturn();", "void mo54405a();", "public void mo21791P() {\n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void mo21795T() {\n }", "static void jhat() {\n\n }", "public void mo38117a() {\n }", "void mo57278c();", "public abstract String mo10149a();", "public abstract void mo27385c();", "private UsingSwig() {\n\t}", "public static void main(String[] args) {\n throw new NotImplementedException();\n }", "public static void main(String args[]){\n //---------------------------------------------------------------------------\n SQLTagsGeneratorTable sqlTagsGeneratorTable=new SQLTagsGeneratorTable();\n ClassVariables classVariables=new ClassVariables(sqlTagsGeneratorTable);\n System.out.println(classVariables.getClassVariablesMethods());\n\t}", "public void logic(){\r\n\r\n\t}", "public abstract String mo24850a();", "public void miseAJour();", "void mo41083a();", "public abstract void mo70713b();", "private void ss(){\n }", "public static void main(String[] args){\n\t\tScanner jsonScan = new Scanner(System.in);\n\t\tString source =\"\";\n\t\twhile(jsonScan.hasNext()){\n\t\t\tsource += jsonScan.next();\n\t\t}\n\t\tArrayList<Token> list = (ArrayList<Token>) JSON.fromJsonToTokens(source);\n\t\tGenerator newGen = new Generator();\n\t\tfor(int i =0; i<list.size(); i++){\n\t\t\tnewGen.insert(list.get(i).value);\n\t\t}\n\t\t// start create output program\n\t\tSystem.out.println(\"public class \"+ args[0] + \" {\");\t\t\n\t\tSystem.out.println(\"\tpublic static Token getToken(char[] s, int index){\");\t\n\t\tString emptyString =\"\";\n\t\tprintSwitchCase(newGen.root,0,emptyString,list,\"\");\t// switch main part\n\t\tSystem.out.println(\"\t\tdefault:return null;\");\n\t\tSystem.out.println(\"\t\t}\");\n\t\tSystem.out.println(\"\t}\");\t\t\n\t\tSystem.out.println(\"}\");\n\t\t\n\t}", "public void mo97908d() {\n }", "void mo84655a();", "public void mo44053a() {\n }", "public void mo21782G() {\n }", "abstract public interface Interpreter {\n\n /**\n * Evaluates a given JavaScript expression for a given userid.\n * \n * @param expression the expression to evaluate\n * @return the result of evaluating the expression\n */\n public String evaluate(String expression);\n}", "void mo67923b();", "public void mo21825b() {\n }", "private test5() {\r\n\t\r\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public abstract void mo35054b();", "public void mo21878t() {\n }", "public abstract void mo30696a();", "public static void main() {\n \n }", "Operations operations();", "public abstract void mo56925d();", "void mo119581a();", "public void mo21877s() {\n }", "private JacobUtils() {}", "abstract String mo1748c();", "void mo119582b();", "public void mo55254a() {\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "void mo41086b();", "public void mo21794S() {\n }", "public void mo6944a() {\n }", "void example(org.linlinjava.litemall.db.domain.example.SaleClassifyGoodExample example);", "public static void main(String[] args) {\n\t\t\r\n\t\tJavainterface e = new Javainterface();\r\n\t\te.studentName();\r\n\t\te.subject();\r\n\t}" ]
[ "0.5924226", "0.5811945", "0.5700109", "0.5700109", "0.56417835", "0.5636858", "0.56322086", "0.56123304", "0.55981994", "0.55886185", "0.5583528", "0.55289567", "0.55206555", "0.5486175", "0.5486175", "0.546304", "0.5460764", "0.5458329", "0.54582024", "0.5452999", "0.5447824", "0.5443033", "0.54386723", "0.5435902", "0.5432066", "0.5429584", "0.54263544", "0.54263544", "0.5421245", "0.5417498", "0.54143393", "0.541116", "0.5409376", "0.54039353", "0.54000634", "0.53999794", "0.5397035", "0.5395147", "0.53946257", "0.53853893", "0.53842616", "0.5379154", "0.5373059", "0.53691405", "0.5362328", "0.53589845", "0.53588295", "0.53564113", "0.5351376", "0.53480804", "0.53472173", "0.53325397", "0.5332135", "0.53300756", "0.5328159", "0.5324889", "0.53219265", "0.53214115", "0.5320339", "0.5319942", "0.5316775", "0.53109175", "0.5308947", "0.5306578", "0.5303508", "0.530206", "0.528212", "0.5280013", "0.5277768", "0.52768415", "0.5276656", "0.52761245", "0.527538", "0.5274013", "0.5270351", "0.5268074", "0.52658445", "0.5264817", "0.5264817", "0.5264817", "0.5264817", "0.5264817", "0.5264817", "0.5257475", "0.5246681", "0.5245985", "0.52456534", "0.5242873", "0.5240562", "0.52391094", "0.5239022", "0.52365416", "0.5232774", "0.5229256", "0.5226279", "0.5225991", "0.522488", "0.5220993", "0.52179843", "0.52159154", "0.5208022" ]
0.0
-1
TODO Autogenerated method stub
public void deleteSuperMarket(int superMarketID) throws ServiceLayerException { boolean found = false; try { superMarkets = sdoa.getSuperMarket(); for (int i : superMarkets.keySet()) { SuperMarket superMarket = superMarkets.get(i); if (superMarket.getId() == superMarketID) { found = true; sdoa.deleteSuperMarket(superMarketID); } } if (!found) { throw new NoSuperMarketFoundException("Super market not found"); } } catch (DoaException e) { throw new ServiceLayerException(e); } }
{ "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
private UrlPathHelper urlPathHelper = new UrlPathHelper();
public PathPermissionAnnotationHandler() { super(RequiresPathPermission.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UrlPathHelper getUrlPathHelper()\n/* */ {\n/* 544 */ return this.urlPathHelper;\n/* */ }", "private URLHelper() {\n\n }", "public void setUrlPathHelper(UrlPathHelper urlPathHelper)\n/* */ {\n/* 537 */ this.urlPathHelper = urlPathHelper;\n/* */ }", "private HelperLocation() {}", "protected UrlPattern() {\n }", "private RequestNodePath() {\n }", "private PathUtils() {\n }", "private URLs() {\n }", "private UrlDAO() { }", "private ApiUrlCreator() {\n }", "@Test\n public void urlTest() {\n // TODO: test url\n }", "@Override\r\n\tpublic void getUrl() {\n\r\n\t}", "public interface ISimpleURL\n{\n /**\n * @return The protocol used. May be <code>null</code> for an unknown\n * protocol.\n */\n @Nullable\n default IURLProtocol getProtocol ()\n {\n return URLProtocolRegistry.getInstance ().getProtocol (getPath ());\n }\n\n /**\n * @return <code>true</code> if the URL has a known protocol\n */\n default boolean hasKnownProtocol ()\n {\n return URLProtocolRegistry.getInstance ().hasKnownProtocol (getPath ());\n }\n\n /**\n * @return The path part of the URL (everything before the \"?\" and the \"#\",\n * incl. the protocol). Never <code>null</code> but maybe empty (e.g.\n * for \"?x=y\").\n */\n @Nonnull\n String getPath ();\n\n /**\n * @return A map of all query string parameters. May be <code>null</code>.\n */\n @Nullable\n @ReturnsMutableObject\n URLParameterList params ();\n\n /**\n * @return The name of the anchor (everything after the \"#\") or\n * <code>null</code> if none is defined.\n */\n @Nullable\n String getAnchor ();\n\n /**\n * @return <code>true</code> if an anchor is present, <code>false</code>\n * otherwise.\n */\n default boolean hasAnchor ()\n {\n return StringHelper.hasText (getAnchor ());\n }\n\n /**\n * Check if this URL has an anchor with the passed name.\n *\n * @param sAnchor\n * The anchor name to check.\n * @return <code>true</code> if the passed anchor is present.\n */\n default boolean hasAnchor (@Nullable final String sAnchor)\n {\n return EqualsHelper.equals (sAnchor, getAnchor ());\n }\n\n /**\n * @return The final string representation of this URL not encoding the\n * request parameters.\n */\n @Nonnull\n default String getAsStringWithoutEncodedParameters ()\n {\n return URLHelper.getURLString (this, (Charset) null);\n }\n\n /**\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values. Using the default URL charset as\n * determined by {@link URLHelper#CHARSET_URL_OBJ}.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters ()\n {\n return URLHelper.getURLString (this, URLHelper.CHARSET_URL_OBJ);\n }\n\n /**\n * @param aCharset\n * The charset used for encoding the parameters. May not be\n * <code>null</code>.\n * @return The final string representation of this URL with encoded URL\n * parameter keys and values.\n */\n @Nonnull\n default String getAsStringWithEncodedParameters (@Nonnull final Charset aCharset)\n {\n ValueEnforcer.notNull (aCharset, \"ParameterCharset\");\n return URLHelper.getURLString (this, aCharset);\n }\n\n @Nullable\n default URL getAsURL ()\n {\n return URLHelper.getAsURL (getAsStringWithEncodedParameters ());\n }\n\n @Nullable\n default URI getAsURI ()\n {\n return URLHelper.getAsURI (getAsStringWithEncodedParameters ());\n }\n}", "public interface BaseURL {\n\n //INFOQ网址[目前全为移动端]\n String INFOQ_PATH = \"http://www.infoq.com/cn/\";\n\n //CSDN网址\n String CSDN_PATH = \"http://geek.csdn.net/\";\n\n //CSDN ajax请求算法\n String GEEK_CSDN_PATH = \"http://geek.csdn.net/service/news/\";\n\n String ITEYE_PATH_SHORT = \"http://www.iteye.com\";\n\n //ITEYE网址\n String ITEYE_PATH = ITEYE_PATH_SHORT + \"/\";\n\n //泡在网上的日子[移动版块]\n String JCC_PATH = \"http://www.jcodecraeer.com/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH = \"https://www.oschina.net/\";\n\n //开源中国 [使用ajax请求]\n String OS_CHINA_PATH_AJAX = \"https://www.oschina.net/action/ajax/\";\n\n //CSDN搜索区\n String SEARCH_CSDN = \"http://so.csdn.net/so/search/\";\n\n //OSCHINA搜索区\n String SEARCH_OSCHINA = \"https://www.oschina.net/\";\n\n //INFOQ搜索区\n String SEARCH_INFOQ = \"http://www.infoq.com/\";\n\n\n /**\n * 获取CSDN文章链接\n *\n * @return\n * @\n */\n @GET(\"get_category_news_list\")\n Observable<String> getCSDNArticle(@Query(\"category_id\") String category_id,\n @Query(\"jsonpcallback\") String jsonpcallback,\n @Query(\"username\") String username,\n @Query(\"from\") String from,\n @Query(\"size\") String size,\n @Query(\"type\") String type,\n @Query(\"_\") String other);\n\n /**\n * ITeye文章链接\n *\n * @param page\n * @return\n */\n @GET(\"{type}\")\n Observable<String> getITEyeArticle(@Path(\"type\") String path, @Query(\"page\") int page);\n\n /**\n * ITEye 专栏笔记 位于blog之下\n *\n * @param path\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getITEyeSubject(@Path(\"path\") String path);\n\n\n /**\n * Info文章链接\n *\n * @param id\n * @return\n */\n @GET(\"{type}/articles/{id}\")\n Observable<String> getInfoQArticle(@Path(\"type\") String type, @Path(\"id\") int id);\n\n /**\n * 泡在网上的日子 链接\n *\n * @param tid\n * @param pageNo\n * @return\n */\n @GET(\"plus/list.php\")\n Observable<String> getJccArticle(@Query(\"tid\") int tid, @Query(\"PageNo\") int pageNo);\n\n /**\n * OSChina 链接 ?type=0&p=5#catalogs\n *\n * @return\n */\n @GET(\"get_more_recommend_blog\")\n Observable<String> getOSChinaArticle(@Query(\"classification\") String classification, @Query(\"p\") int p);\n\n /**\n * 获取网页详细内容\n *\n * @return\n */\n @GET(\"{path}\")\n Observable<String> getWebContent(@Path(\"path\") String path);\n\n //http://so.csdn.net/so/search/s.do?q=Android&t=blog&o=&s=&l=null\n @GET(\"s.do\")\n Observable<String> searchCSDNContent(@Query(\"q\") String keyWords,\n @Query(\"t\") String type,\n @Query(\"o\") String o,\n @Query(\"s\") String s,\n @Query(\"l\") String l);\n\n //https://www.oschina.net/search?scope=blog&q=Android&fromerr=Nigvshhe\n @GET(\"search\")\n Observable<String> searchOSChinaContent(@Query(\"q\") String keyWords,\n @Query(\"scope\") String type,\n @Query(\"fromerr\") String formerr);\n\n\n //http://www.iteye.com/search?query=Android&type=blog\n @GET(\"search\")\n Observable<String> searchItEyeContent(@Query(\"query\") String keyWords,\n @Query(\"type\") String type);\n\n\n //http://www.jcodecraeer.com/plus/search.php?kwtype=0&q=Java\n @GET(\"plus/search.php\")\n Observable<String> searchJCCContent(@Query(\"keyword\") String keyWord,\n @Query(\"searchtype\") String searchType,\n @Query(\"orderby\") String orderby,\n @Query(\"kwtype\") String type,\n @Query(\"pagesize\") String pagesize,\n @Query(\"typeid\") String typeid,\n @Query(\"pageNo\") String pageNo);\n\n //http://www.infoq.com/cn/search.action?queryString=java&page=1&searchOrder=&sst=o9OURhPD52ER0BUp\n //sst 在infoQ中为搜索验证时使用 不对的话 将会有HTTP 404 异常\n //o9OURhPD52ER0BUp\n @GET(\"search.action\")\n Observable<String> searchInfoQContent(@Query(\"queryString\") String keyWords,\n @Query(\"page\") int page,\n @Query(\"searchOrder\") String order,\n @Query(\"sst\") String sst);\n\n //获取INFOQ的sst用于搜索\n @GET(\"mobile\")\n Observable<String> searchInfoQSST();\n\n //文件下载\n @GET(\"{photoPath}\")\n Observable<ResponseBody> downloadFile(@Path(value = \"photoPath\") String photoPath);\n\n\n}", "interface UrlModifier {\n\n String createUrl(String url);\n\n }", "public RequestUrlHandler() {\n // requestService = SpringContextHolder.getBean(ScfRequestService.class);\n }", "public abstract String getUrl();", "private ServletUtils() { }", "public ControlUrlControler() {\r\n\r\n }", "private OfbizUrlBuilder(ControllerConfig config, WebSiteProperties webSiteProps, String servletPath, String contextPath) {\n this.config = config;\n this.webSiteProps = webSiteProps;\n // SCIPIO: 2018-08-01: this comes in with a trailing slash half the time, strip it here\n // because it complicates everything else for no reason...\n if (servletPath != null && servletPath.endsWith(\"/\")) {\n servletPath = servletPath.substring(0, servletPath.length() - 1);\n }\n this.servletPath = servletPath;\n this.contextPath = contextPath;\n }", "public static UrlUtils getInstance() {\n\t\treturn INSTANCE;\n\t}", "protected abstract String getUrl();", "public abstract String getURL();", "public abstract RestURL getURL();", "public abstract String getRequestPathInfo();", "private Helper() {\r\n // empty\r\n }", "@Override\npublic void get(String url) {\n\t\n}", "public PathAdapter() {\n }", "public FileUploadHelper() throws IOException {\n //For using dynamic path\n }", "public interface UrlConnector {\n /**\n * Obtains an HTTP GET request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpGet getRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PUT request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPut putRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP POST request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPost postRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP DELETE request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;\n\n /**\n * Obtains an HTTP PATCH request object.\n *\n * @param request the servlet request.\n * @param address the address to connect to.\n * @return the request.\n * @throws IOException if the connection can't be established.\n */\n HttpPatch patchRequest(HttpServletRequest request, String address) throws IOException;\n}", "String url();", "@Nullable\n public abstract String url();", "public String getUrl(){\n \treturn url;\n }", "private SpringBoHelper() {\n\n\t}", "public MyPathResource() {\r\n }", "private TemplateManagerHelper() {\n\n }", "private String getURL() {\n\t\t// TODO : Generate URL\n\t\treturn null;\n\t}", "HandlerHelper getHandlerHelper() {\n return handlerHelper;\n }", "public UrlEncapsulation() {\r\n\t\t\r\n\t\tthis(null\r\n\t\t\t\t, null, null, null, null\r\n\t\t\t\t, false, null, null, null, null, null, null, null);\r\n\t\t\r\n\t}", "private Helper getHelper() {\r\n return this.helper;\r\n }", "URL getUrl();", "public interface HttpConstants {\n\n String BASE_URL = \"http://apis.tudou.com/\";\n String REQUEST_HTTP_URL = \"classification/v1/startPage\";\n}", "private WAPIHelper() { }", "public abstract String getRequestServletPath();", "public void setUrlPath(String urlPath) {\r\n this.urlPath = urlPath;\r\n }", "URIGenerator getURIGenerator();", "public String getApiUrl();", "@Override\n public String getUrlContextPath() {\n return \"\";\n }", "@Override\n public void configurePathMatch(PathMatchConfigurer configurer) {\n UrlPathHelper urlPathHelper = new UrlPathHelper();\n urlPathHelper.setRemoveSemicolonContent(false);\n configurer.setUrlPathHelper(urlPathHelper);\n }", "public interface RequestURLs {\n String DEFAULT_URL = \"http://aperturedev.co.kr:21002/petcommunity/\";\n\n /*\n 매칭 서비스 관련\n */\n String GET_PET_TYPES = DEFAULT_URL + \"services/get-pettypes.php\"; // 강아지 종을 가져온다.\n String REGIST_MATCH_PET = DEFAULT_URL + \"matching/regist-new-pet.php\"; // 팻 등록 실시\n String MATCHING_OTHER_PET = DEFAULT_URL + \"matching/matching.php\"; // 매칭할 팻을 하나 가져옵니다.\n\n /*\n 사용자 정보 관련\n */\n String GET_USER_INFO = DEFAULT_URL + \"users/get-info.php\"; // UUID -> 사용자 정보\n String REGIST_SERVICE = DEFAULT_URL + \"users/signup.php\"; // 회원가입을 실시한다.\n String IS_REGIST_SERVICE = DEFAULT_URL + \"/users/is-registed.php\"; // 회원가입 되어 있는지 확인한다.\n String LOGIN_SERVICE = DEFAULT_URL + \"users/signin.php\"; // 로그인 처리한다.\n\n\n\n\n}", "public String getURL();", "public HttpUrl url() {\n return url;\n }", "private String initUrlParameter() {\n StringBuffer url = new StringBuffer();\n url.append(URL).append(initPathParameter());\n return url.toString();\n }", "String getRequestURL();", "@Column(length = 2048)\r\n @PlaceHolder(key = \"schema\")\r\n public String getUrlPath() {\r\n return urlPath;\r\n }", "public static Constraints.Validator<String> url() {\n return new UrlValidator();\n }", "public interface Constants {\n String LIEPIN_HOST =\"https://h.liepin.com\";\n String SEARCH_URL =\"https://h.liepin.com/cvsearch/soResume/\";\n //String WORK_EXPERIENCE_URL =\"https://h.liepin.com/resume/showresumedetail/showresumeworkexps/\";\n String WORK_EXPERIENCE_URL =\"https://h.liepin.com/resume/showresumedetail/showworkexps/\";\n String ANCHOR_TAG =\"<div class=\\\"resume-work\\\" id=\\\"workexp_anchor\\\">\";\n String GET_METHOD =\"GET\";\n String POST_METHOD =\"POST\";\n}", "public abstract String getBaseURL();", "public VideoCreationControllerHelper() {\n\n }", "public interface CeshiUrl {\n String SINGLE_URL = \"http://nq.website-art.com/app/category.php\";\n\n String TEST=\"http://nq.website-art.com/app/test.php\";\n}", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "String getUrl();", "@NotNull\n/* 52 */ public String getServerPath() { return this.myServerPath; }", "public interface TinyurlService {\n\n /**\n * 根据长链接生成短链接\n * @param baseUrl\n * @param rawUrl\n * @return\n */\n BaseResult<String> createTinyurl(String baseUrl, String rawUrl);\n\n /**\n * 根据短连接code查找长地址\n * @param base62Code\n * @return\n */\n BaseResult<String> getLongUrl(String baseUrl,String base62Code);\n\n /**\n * 个性化code\n * @param baseUrl\n * @param base62Code\n * @param rawUrl\n * @return\n */\n BaseResult<String> createTinyurl(String baseUrl,String base62Code, String rawUrl);\n}", "public ReferenceHelper getReferenceHelper();", "String getServerUrl();", "@Test\n\tpublic void testGetBaseUrlDir() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}", "public test_SDURL() {\n super();\n }", "public interface LinkGenerator {\n\n String ATTRIBUTE_CONTROLLER = \"controller\";\n String ATTRIBUTE_RESOURCE = \"resource\";\n String ATTRIBUTE_ACTION = \"action\";\n String ATTRIBUTE_METHOD = \"method\";\n String ATTRIBUTE_URI = \"uri\";\n String ATTRIBUTE_RELATIVE_URI = \"relativeUri\";\n String ATTRIBUTE_INCLUDE_CONTEXT = \"includeContext\";\n String ATTRIBUTE_CONTEXT_PATH = \"contextPath\";\n String ATTRIBUTE_URL = \"url\";\n String ATTRIBUTE_BASE = \"base\";\n String ATTRIBUTE_ABSOLUTE = \"absolute\";\n String ATTRIBUTE_ID = \"id\";\n String ATTRIBUTE_FRAGMENT = \"fragment\";\n String ATTRIBUTE_PARAMS = \"params\";\n String ATTRIBUTE_MAPPING = \"mapping\";\n String ATTRIBUTE_EVENT = \"event\";\n String ATTRIBUTE_ELEMENT_ID = \"elementId\";\n String ATTRIBUTE_PLUGIN = \"plugin\";\n String ATTRIBUTE_NAMESPACE = \"namespace\";\n \n\n Set<String> LINK_ATTRIBUTES = CollectionUtils.newSet(\n ATTRIBUTE_RESOURCE,\n ATTRIBUTE_METHOD,\n ATTRIBUTE_CONTROLLER,\n ATTRIBUTE_ACTION,\n ATTRIBUTE_URI,\n ATTRIBUTE_RELATIVE_URI,\n ATTRIBUTE_CONTEXT_PATH,\n ATTRIBUTE_URL,\n ATTRIBUTE_BASE,\n ATTRIBUTE_ABSOLUTE,\n ATTRIBUTE_ID,\n ATTRIBUTE_FRAGMENT,\n ATTRIBUTE_PARAMS,\n ATTRIBUTE_MAPPING,\n ATTRIBUTE_EVENT,\n ATTRIBUTE_ELEMENT_ID,\n ATTRIBUTE_PLUGIN,\n ATTRIBUTE_NAMESPACE\n );\n\n Map<String, String> REST_RESOURCE_ACTION_TO_HTTP_METHOD_MAP = CollectionUtils.<String, String>newMap(\n \"create\", \"GET\",\n \"save\", \"POST\",\n \"show\", \"GET\",\n \"index\", \"GET\",\n \"edit\", \"GET\",\n \"update\", \"PUT\",\n \"patch\", \"PATCH\",\n \"delete\", \"DELETE\"\n );\n\n Map<String, String> REST_RESOURCE_HTTP_METHOD_TO_ACTION_MAP = CollectionUtils.<String, String>newMap(\n \"GET_ID\", \"show\",\n \"GET\", \"index\",\n \"POST\", \"save\",\n \"DELETE\", \"delete\",\n \"PUT\", \"update\",\n \"PATCH\", \"patch\"\n );\n\n\n /**\n * Generates a link to a static resource for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>base - The base path of the URL, typically an absolute server path</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>dir - The directory to link to</li>\n * <li>file - The file to link to (relative to the directory if specified)</li>\n * <li>plugin - The plugin that provides the resource</li>\n * <li>absolute - Whether the link should be absolute or not</li>\n * </ul>\n *\n * @param params The named parameters\n * @return The link to the static resource\n */\n String resource(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>contextPath - The context path to link to, defaults to the servlet context path</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params);\n\n /**\n * Generates a link to a controller, action or URI for the given named parameters.\n *\n * Possible named parameters include:\n *\n * <ul>\n * <li>resource - If linking to a REST resource, the name of the resource or resource path to link to. Either 'resource' or 'controller' should be specified, but not both</li>\n * <li>controller - The name of the controller to use in the link, if not specified the current controller will be linked</li>\n * <li>action - The name of the action to use in the link, if not specified the default action will be linked</li>\n * <li>uri - relative URI</li>\n * <li>url - A map containing the action,controller,id etc.</li>\n * <li>base - Sets the prefix to be added to the link target address, typically an absolute server URL. This overrides the behaviour of the absolute property, if both are specified.</li>\n * <li>absolute - If set to \"true\" will prefix the link target address with the value of the grails.serverURL property from Config, or http://localhost:&lt;port&gt; if no value in Config and not running in production.</li>\n * <li>id - The id to use in the link</li>\n * <li>fragment - The link fragment (often called anchor tag) to use</li>\n * <li>params - A map containing URL query parameters</li>\n * <li>mapping - The named URL mapping to use to rewrite the link</li>\n * <li>event - Webflow _eventId parameter</li>\n * </ul>\n * @param params The named parameters\n * @param encoding The character encoding to use\n * @return The generator link\n */\n String link(@SuppressWarnings(\"rawtypes\") Map params, String encoding);\n\n /**\n * Obtains the context path from which this link generator is operating.\n *\n * @return The base context path\n */\n String getContextPath();\n\n /**\n * The base URL of the server used for creating absolute links.\n *\n * @return The base URL of the server\n */\n String getServerBaseURL();\n}", "public void testGetURI() {\n }", "public String getUrl();", "public String getUrl();", "public String getUrl();", "public String getUrl();", "String basePath();", "@Test\n public void getUrl() {\n Locale locale = new Locale(\"en\", \"US\");\n FinancialMarketsBalanceOfPaymentsClient client = new FinancialMarketsBalanceOfPaymentsClient(locale);\n\n assertEquals(URLEndpoint.getRootUrl(locale).append(\"FM/FM0001/\"), client.getUrl());\n }", "public interface URLs\r\n{\r\n String BASIC_URL = \"http://api.timetable.asia/\";\r\n\r\n String KEY = \"221b368d7f5f597867f525971f28ff75\";\r\n\r\n String COMPANY_URL = \"operator.json\";\r\n String LANGUAGE_URL = \"lang.json\";\r\n String VEHICLE_URL = \"fleet.json\";\r\n String ROUTE_URL = \"route.json\";\r\n String TRIP_URL = \"trip.json\";\r\n String COMMIT_URL = \"commit.json\";\r\n String CURRENT_STATIONS_URL = \"station.json\";\r\n public static final String LANGPACK_URL = \"langpack.json\";\r\n}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrl() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "abstract String getUri();", "private ServiceLocator() {\r\n\t\t\r\n\t}", "Uri mo1686a();", "String getRequestedUrl();", "Uri getUrl();", "public String getUrl() { return url; }", "private CloudEndpointBuilderHelper() {\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "@Override\n public boolean isContextPathInUrl() {\n return false;\n }", "java.lang.String getApiUrl();", "@Override\n\tpublic String getUrl()\n\t{\n\t\treturn url;\n\t}", "public MyPathDriver(/* add any constructor arguments here */) {\r\n\r\n // set all fields in your constructor here\r\n\r\n }", "@PostConstruct\n private void checkUrl() {\n if (weatherServiceUrl.endsWith(\"/\")) {\n weatherServiceUrl = weatherServiceUrl.substring(0, weatherServiceUrl.length() - 1);\n }\n }", "@Test\n\tpublic void testGetBaseUrl() {\n\t\tString result = helper.getBaseUrl(\"http://www.bobbylough.com/test/index.html\");\n\t\tassertEquals(\"http://www.bobbylough.com/test\", result);\n\t}", "DatabaseController(Context context){\n helper=new MyHelper(context);\n }", "public interface Endpoint {\n public static final String REDDIT_BASE_URL = \"http://www.reddit.com\";\n\n //public Object call(String subreddit);\n\n}", "@Test\n public void _1passwordUrlTest() {\n // TODO: test _1passwordUrl\n }", "private Helper() {\r\n // do nothing\r\n }" ]
[ "0.8330215", "0.8161543", "0.80742973", "0.683842", "0.6596164", "0.6581168", "0.6417462", "0.6339004", "0.62572825", "0.6039537", "0.6039463", "0.60335773", "0.6005628", "0.6005012", "0.59441847", "0.5937749", "0.59087455", "0.59029037", "0.5878362", "0.58370286", "0.5821664", "0.57816344", "0.5763712", "0.57569396", "0.56958187", "0.5677968", "0.5641466", "0.5624063", "0.561598", "0.5615691", "0.5606674", "0.5593478", "0.5580587", "0.5579055", "0.557736", "0.5561565", "0.55597955", "0.55533254", "0.55353045", "0.5528038", "0.5526675", "0.54952836", "0.54751295", "0.5450289", "0.5447478", "0.5445209", "0.5445101", "0.5434086", "0.54291713", "0.54201955", "0.5410699", "0.5402369", "0.5400695", "0.53930473", "0.5378107", "0.5366076", "0.5356498", "0.5354113", "0.5343095", "0.5339228", "0.53227943", "0.53227943", "0.53227943", "0.53227943", "0.53227943", "0.5316915", "0.531133", "0.52870643", "0.528117", "0.52724785", "0.52712286", "0.5266032", "0.5257812", "0.5249882", "0.5249882", "0.5249882", "0.5249882", "0.52392", "0.5237962", "0.5236575", "0.52335", "0.52335", "0.52335", "0.52289736", "0.5226495", "0.5218783", "0.5212783", "0.5207384", "0.5204599", "0.51949555", "0.51920784", "0.51920784", "0.5186539", "0.51843625", "0.5181781", "0.51666296", "0.5160679", "0.51585734", "0.5153635", "0.5149034", "0.51443654" ]
0.0
-1
Created by hujie on 2017/2/23.
public interface IUserInfoView extends BaseView { void showUserData(UserBean userBean); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void init() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void interr() {\n\t}", "public final void mo51373a() {\n }", "@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 public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@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\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private void init() {\n\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "private Rekenhulp()\n\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\r\n\tpublic void init() {}", "@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}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo4359a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \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 public void init() {\n }", "private UsineJoueur() {}", "public Pitonyak_09_02() {\r\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void initialize() {\n \n }" ]
[ "0.6212068", "0.608072", "0.5968371", "0.5947141", "0.592344", "0.592344", "0.58577657", "0.58274823", "0.581497", "0.58066446", "0.5768329", "0.57598937", "0.5741582", "0.5740211", "0.5724739", "0.57011044", "0.5695043", "0.5694335", "0.5691426", "0.56616944", "0.5660633", "0.56606287", "0.5649407", "0.56492233", "0.5644198", "0.56429887", "0.5631125", "0.5627437", "0.5627437", "0.56221956", "0.56155705", "0.56117874", "0.5604553", "0.5604553", "0.5604553", "0.5604553", "0.5604553", "0.55866003", "0.55705416", "0.55705416", "0.55705416", "0.55705416", "0.55705416", "0.55705416", "0.55688435", "0.5549283", "0.55461884", "0.55461884", "0.5538983", "0.55249685", "0.55249685", "0.55249685", "0.5524591", "0.5523093", "0.55193317", "0.5519308", "0.55107397", "0.5508953", "0.5501116", "0.5498552", "0.5498552", "0.5498552", "0.54946876", "0.5491922", "0.5491922", "0.5491922", "0.5462223", "0.5462223", "0.54592395", "0.54585564", "0.54551744", "0.54511315", "0.5432591", "0.5430749", "0.5427932", "0.5423919", "0.54207426", "0.5419991", "0.54175776", "0.5410666", "0.53974885", "0.5396474", "0.53647715", "0.53490746", "0.5344647", "0.5344647", "0.5344647", "0.5344647", "0.5344647", "0.5344647", "0.5344647", "0.5333844", "0.53297323", "0.5328589", "0.5319931", "0.5319617", "0.5319617", "0.5319617", "0.5318601", "0.5312494", "0.53112817" ]
0.0
-1
when character is clicked, it starts the display mode for that char
public void clickOnItem(TraceableItem li) { Intent intent = new Intent(); Bundle bun = new Bundle(); bun.putString("mode", "display"); bun.putLong("wordId", li.getId()); if (id != -1) { bun.putLong("collectionId", id); bun.putString("collectionName", collectionName); } intent.setClass(this, ViewWordActivity.class); intent.putExtras(bun); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handle_mode_display() {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString input = e.getActionCommand();\n\t\t\t\tif(start) {\n\t\t\t\t\tdisplay.setText(\"\");\n\t\t\t\t\tstart = false;\n\t\t\t\t}\n\t\t\t\tdisplay.setText(display.getText() + input);\n\t\t\t}", "public void displayCharacter() {\n System.out.println(\"**************************\");\n System.out.println(p.showDetails());\n System.out.println(\"**************************\"+\"\\n\");\n\n }", "private void txtDisplayActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "public void characterSelected(CharacterSelectionEvent e);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == c) {\r\n\t\t\t\t\ttext.setText(\"9\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n createMenu();\n StdDraw.enableDoubleBuffering();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char input = Character.toUpperCase(StdDraw.nextKeyTyped());\n if (input == 'v' || input == 'V') {\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n while (true) {\n if (StdDraw.hasNextKeyTyped()) {\n char next = StdDraw.nextKeyTyped();\n if (next == '#') {\n createMenu();\n break;\n } else {\n name += next;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a name: \" + name);\n StdDraw.text(WIDTH / 2, HEIGHT * 5 / 6, \"Press # to finish.\");\n StdDraw.show();\n }\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1);\n interactWithInputString(toInsert);\n ter.renderFrame(world);\n startCommands();\n }\n if (input == 'n' || input == 'N') {\n toInsert += 'n';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n while (true) {\n if (!StdDraw.hasNextKeyTyped()) {\n continue;\n }\n char c = StdDraw.nextKeyTyped();\n if (c == 's' || c == 'S') {\n toInsert += 's';\n StdDraw.enableDoubleBuffering();\n StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show(); interactWithInputString(toInsert);\n ter.renderFrame(world); mouseLocation(); startCommands();\n break;\n }\n if (c != 'n' || c != 'N') {\n toInsert += c;\n StdDraw.enableDoubleBuffering(); StdDraw.clear(Color.BLACK);\n StdDraw.text(WIDTH / 2, HEIGHT * 2 / 3, \"Enter a seed: \" + toInsert);\n StdDraw.show();\n }\n }\n }\n if (input == 'l' || input == 'L') {\n toInsert = loadWorld();\n if (toInsert.substring(0, 1).equals(\"k\")) {\n floorTile = Tileset.GRASS;\n }\n toInsert = toInsert.substring(1); interactWithInputString(toInsert);\n ter.renderFrame(world); startCommands();\n }\n }\n }\n }", "@Override\r\n public void keyPressed(KeyEvent e) {\n char c = e.getKeyChar();\r\n //seteo el caracter como texto del label\r\n lab.setText(Character.toString(c));\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput(input.getText().toString());\n\t\t\t\tshow.setText(output.toString());\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcd.show(jp, \"3\");\n\t\t\t}", "public boolean action(Event e, Object o){\r\n\tif (e.target == playButton){ \r\n\t screenName = \"CharSelect\";\r\n\t}\r\n\telse{\r\n\t screenName = \"Instruction\";\r\n\t}\r\n\treturn super.action(e,o);\r\n }", "public void L1Pressed() {\n\t\tSoundPlayer.playSound(SoundMap.MENU_SWITCH_CHARACTER);\n\t\tMainMenu.getMainMenu().initDeckPage(--characterIndex, activeDeck, currentDeck);\n\t}", "void start() {\n myGameOver = false;\n myDisplay.setCurrent(this);\n repaint();\n }", "@Override\n\tpublic void showKeyboard() {\n\t\t\n\t}", "private void charonSwitch() {\n resetUpdate();\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.setCharonSwitching(true);\n gameMessage.notify(gameMessage);\n }", "@Override\r\n public void keyPressed(KeyEvent e)\r\n {\r\n if (mode == 0){\r\n mode = 1; //starts the game\r\n }\r\n\r\n if(e.getKeyChar() == 'w')\r\n {\r\n buttons[0][0] = true;\r\n }\r\n if(e.getKeyChar() == 'a')\r\n {\r\n buttons[0][1] = true;\r\n }\r\n if(e.getKeyChar() == 's')\r\n {\r\n buttons[0][2] = true;\r\n }\r\n if(e.getKeyChar() == 'd')\r\n {\r\n buttons[0][3] = true;\r\n }\r\n if(e.getKeyChar() == 'f')\r\n {\r\n buttons[0][4] = true;\r\n }\r\n if(e.getKeyChar() == 'g')\r\n {\r\n buttons[0][5] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_UP)\r\n {\r\n buttons[1][0] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_LEFT)\r\n {\r\n buttons[1][1] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_DOWN)\r\n {\r\n buttons[1][2] = true;\r\n }\r\n if(e.getKeyCode() == KeyEvent.VK_RIGHT)\r\n {\r\n buttons[1][3] = true;\r\n }\r\n if(e.getKeyChar() == '.')\r\n {\r\n buttons[1][4] = true;\r\n }\r\n if(e.getKeyChar() == '/')\r\n {\r\n buttons[1][5] = true;\r\n }\r\n }", "public void program1Pressed() {\n // display\n TextLCD.print(PROGRAM1);\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON1)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isbegin==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isbegin=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\tConf.isbegin=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(e.getButton()==MouseEvent.BUTTON3)\n\t\t\t\t{\n\t\t\t\t\tif(Conf.isreplay==1)\t\n\t\t\t\t\t{\n\t\t\t\t\t\tConf.isreplay=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\tConf.isreplay=1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\n\t\t\t}", "void draw_char(int x, int y, char[][] _display, char c) {\n _display[x][y] = c;\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\ttoggleFullSceen();\n\t\t\t}", "private void updateDisplayChars() {\n\t\tmShuffleFrag.updateDisplayChars(mCharDisp);\n\t}", "private void setCharButton(int i, int xPos, int yPos, boolean clickable) {\r\n final JButton jLabel = new JButton(String.valueOf((char) i));\r\n jLabel.setFont(serif24);\r\n panel.add(jLabel);\r\n Dimension size = jLabel.getPreferredSize();\r\n jLabel.setBounds(xPos, yPos, size.width, size.height);\r\n\r\n if (clickable) {\r\n jLabel.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n guess(jLabel); //A guess of a character was made.\r\n }\r\n });\r\n }\r\n }", "public void selectPressed() {\n\t\tif (edit) {\n\t\t\tdisplayCardHelp = !displayCardHelp;\n\t\t} else {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t}", "public void setChar(Character c) {\n setText(String.valueOf(c));\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 0;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MAIN_SCREEN\");\r\n\t\t}", "public static void displayKeyboard(){\n\t\tfor(int i=0;i<16;i++)\n\t\t\tfor(int j=0;j<16;j++)\n\t\t\t\tif(i*16+j<36){\n\t\t\t\t\tdisplay[i][j].setIcon(keyboardIconArray[i*16+j]);\n\t\t\t\t\tdisplay[i][j].setSelectedIcon(keyboardSelectedArray[i*16+j]);\n\t\t\t\t}\t\n\t}", "private void gotoSTK(){\n\t short buf_length = (short) MyText.length;\n\t short i = buf_length;\n\t initDisplay(MyText, (short) 0, (short) buf_length, (byte) 0x81,(byte) 0x04);\n}", "public void display()\n\t{\n\t\tfor(Character characher : characterAdded)\n\t\t{\t\n\t\t\tif(!characher.getIsDragging())\n\t\t\t{ \n\t\t\t\t//when dragging, the mouse has the exclusive right of control\n\t\t\t\tcharacher.x = (float)(circleX + Math.cos(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t\tcharacher.y = (float)(circleY + Math.sin(Math.PI * 2 * characher.net_index/net_num) * radius);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint lineWeight = 0;\n\t\t//draw the line between the characters on the circle\n\t\tif(characterAdded.size() > 0)\n\t\t{\n\t\t\tfor(Character characher : characterAdded)\n\t\t\t{\n\t\t\t\tfor(Character ch : characher.getTargets())\n\t\t\t\t{\n\t\t\t\t\tif(ch.net_index != -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i = 0; i < links.size(); i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJSONObject tem = links.getJSONObject(i);\n\t\t\t\t\t\t\tif((tem.getInt(\"source\") == characher.index) && \n\t\t\t\t\t\t\t\t\t\t\t\t(tem.getInt(\"target\") == ch.index))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlineWeight = tem.getInt(\"value\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tparent.strokeWeight(lineWeight/4 + 1);\t\t\n\t\t\t\t\t\tparent.noFill();\n\t\t\t\t\t\tparent.stroke(0);\n\t\t\t\t\t\tparent.line(characher.x, characher.y, ch.x, ch.y);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void click() {\n this.lastActive = System.nanoTime();\n }", "public void keyPressed() {\n\t ackEvent();\n if (key == ' ') {\n pauseTic = !pauseTic;\n EventQueue.getInstance().togglePause();\n }\n if (key == '.') {\n EventQueue.getInstance().beginEvents();\n } else if (key == '\\n') {\n if (pauseTic) { //only let this run if the display is paused\n StringManager.getInstance().ticAllOneCycle();\n }\n }else KeyMap.getInstance().run(key);\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 4;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\t\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_SLIPS_SCREEN\");\r\n\t\t}", "@Override\n public void display() {\n display.display();\n }", "@Override\n public void clicked(InputEvent event, float x, float y) {\n selecionado.play();\n ((Game) Gdx.app.getApplicationListener()).setScreen(new PlayScreen(game, level));\n dispose();\n }", "public void keyReleased() {\r\n if (key == '1')\r\n drawMode = 1;\r\n if (key == '2')\r\n drawMode = 2;\r\n if (key == '3')\r\n drawMode = 3;\r\n if (key == '4')\r\n drawMode = 4;\r\n if (key == '5')\r\n drawMode = 5;\r\n }", "@Override\n public void onClick(View v) {\n text.setText(\"摇一摇\");\n num=0;\n }", "public void R1Pressed() {\n\t\tSoundPlayer.playSound(SoundMap.MENU_SWITCH_CHARACTER);\n\t\tMainMenu.getMainMenu().initDeckPage(++characterIndex, activeDeck, currentDeck);\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tplayerSelectNum++;\n\t\tfor (int i = 0; i<charButtons.size(); i++){\n\t\t\tif (e.getSource() == charButtons.get(i)){\n\t\t\t\tcharButtons.get(i).setEnabled(false);\n\t\t\t\tselection = new PlayerInfo(name, characters.get(i));\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\tif (playerSelectNum == 1){\n\t\t\tCLOGameClient c = new CLOGameClient(selection);\n\t\t\tdispose();\n\t\t}\n\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tif(estadoAdjuntar){\r\n\t\t\t\t\testadoAdjuntar = false;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\testadoAdjuntar = true;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t}", "private static void bind(int Character) {\n frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character,\n Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),\"console\"); \n }", "public void commandAction(Command c, Displayable s) {\n\t\tif (c == toggleCommand) {\n\t\t if (canvas.isPaused()) canvas.start();\n\t\t else canvas.pause();\n\t\t} \n\t\telse if (c == helpCommand) {\n\t\t canvas.pause();\n\t\t showHelp();\n\t\t} \n\t\telse if (c == exitCommand) {\n\t\t try {\n\t\t\t\tdestroyApp(false);\n\t\t\t\tnotifyDestroyed();\n\t\t\t} catch (MIDletStateChangeException ex) {\n\t\t }\n\t\t} \n\t\telse if (c == aboutCommand) {\n\t\t canvas.pause();\n\t\t showAbout();\n\t\t}\n }", "public void actionPerformed(ActionEvent e) {\r\n mode = InputMode.CHG_TEXT;\r\n instr.setText(\"Click one node to change the text on the node.\");\r\n }", "public void shortPress();", "private void typeKey(char keyChar) {\r\n if(keyChar == '1') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(1);\r\n }\r\n if(keyChar == '2') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(2);\r\n }\r\n if(keyChar == '3') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(3);\r\n }\r\n if(keyChar == '4') {\r\n gameMode.typed(true);\r\n gameMode.setGameMode(4);\r\n }\r\n if(keyChar == 's' || keyChar == 'S')\r\n restart.typed(true);\r\n if(keyChar == 'n' || keyChar == 'N')\r\n System.exit(0); // TODO: funciona estando en inselection y no deberia\r\n }", "public void beginPress();", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 2;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tcl.show(Menu.cardPanel, \"MATCH_RESULTS_SCREEN\");\r\n\t\t}", "public void program2Pressed() {\n // display\n TextLCD.print(PROGRAM2);\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\tmode = InputMode.ACCESS;\r\n\t\t\tinstr.setText(\"Click an element to access it. It will change to red.\");\r\n\t\t\tdefaultVar(canvas);\r\n\t\t}", "@Override\n public void interact() {\n System.out.print(\"Halo aku ikan di bawah laut dalam lho, aku punya lampu supaya aku\" \n + \"bisa tetap melihat di kegelapan\");\n }", "public void program4Pressed() {\n // display\n TextLCD.print(PROGRAM4);\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif (arg0.getSource() instanceof ChessPiece && status.getStatus().equals(GameStatus.GAME_STATUS_EDIT) && arg0.getButton() == MouseEvent.BUTTON3) {\r\n\t\t\tChessPiece p = (ChessPiece)arg0.getSource();\r\n\t\t\tif (p.chessPlayer.equals(\"black\") && p.position.charAt(1) != '1') {\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"white\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t} else if (p.chessPlayer.equals(\"white\") && p.position.charAt(1) != '8'){\r\n\t\t\t\tif (p.getText() == null) {\r\n\t\t\t\t\tp.setText(\"<html><font color=\\\"black\\\">K</font></html>\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tp.setText(null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void beginEnterText()\n\t{\n\t\tdisplayingCaret = true;\n\t\ttext.appendText(\"|\");\n\t\tcaretBlinkTime = 0;\n\t\tclearCharBuffer = true;\n\t}", "protected void doScreenClick() {\r\n\t\tbtnColonyInfo.visible = btnButtons.down;\r\n\t\tbtnPlanet.visible = btnButtons.down;\r\n\t\tbtnStarmap.visible = btnButtons.down;\r\n\t\tbtnBridge.visible = btnButtons.down;\r\n\t\trepaint();\r\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\tMyFrame.teampanel.showOne(name2.getText());\r\n\t\t}", "public void display(int uMove, int cMove, boolean hard)\r\n {\r\n animate.start(uMove, cMove, hard);\r\n }", "public void actionPerformed (ActionEvent event) {\n RainRunGUI.c1.show(RainRunGUI.cards, RainRunGUI.MENUPANEL);\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBeginNewText();\r\n\t\t\t}", "public void display() {\n\t\tapplet.image(applet.loadImage(\"/keypad.png\"), 22,410);\n\t\t// TODO Auto-generated method stub\n\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdisplayText.setText(displayText.getText() + \".\");\n\t\t\t}", "@Override\r\n public void show() {\r\n Gdx.input.setInputProcessor(combatController);\r\n }", "public void program3Pressed() {\n // display\n TextLCD.print(PROGRAM3);\n }", "public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == g) {\r\n\t\t\t\t\ttext.setText(\"6\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }", "public void actionPerformed(ActionEvent e) \n\t{ \n\t\tString s = e.getActionCommand(); \n\n\t\tif (s.equals(\"cut\")) { \n Cut(); \n\t\t} \n\t\telse if (s.equals(\"copy\")) { \n Copy();\n\t\t} \n\t\telse if (s.equals(\"paste\")) { \n Paste(); \n\t\t} \n\t\telse if (s.equals(\"Save\")) { \n Save();\n\t\t} \n\t\telse if (s.equals(\"Print\")) { \n Print();\n\t\t} \n\t\telse if (s.equals(\"Open\")) { \n Open();\n\t\t} \n\t\telse if (s.equals(\"New\")) { \n New();\n\t\t} \n\t\telse if (s.equals(\"close\")) { \n Close();\n\t\t}\n else if (s.equals(\"font\")) { \n font fs = new font();\n \n \n\t\t}\n\t}", "@Action(selectedProperty = LETTER_BOX_PAINTING)\r\n public void toggleLetters (ActionEvent e)\r\n {\r\n }", "private void showDisplay() {\n this.display.displayScreen();\n }", "protected final void putChar(char c)\n\t{\n\t\tif (showCaret)\n\t\t{\n\t\t\tif (displayingCaret)\n\t\t\t\ttext.setText(text.getText().substring(0, text.getText().length() - 1) + c + \"|\");\n\t\t\telse text.setText(text.getText().substring(0, text.getText().length() - 1) + c + \" \");\n\t\t}\n\t\telse text.setText(text.getText() + c);\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == d) {\r\n\t\t\t\t\ttext.setText(\" \");\r\n\t\t\t\t}\r\n\t\t\t}", "public void display() {\n startPreview();\n }", "private void choseLocal(java.awt.event.MouseEvent evt) { \n\t\tgameChoice = 'a';\n\t\twindowComplete = true;\n\t}", "public void onDisplay() {\n\n\t}", "public void mousePressed() {\n\t int ret = output.sendNoteOn(0, 3, 3);\n\t ret = output.sendSysex(new byte[] {(byte)0xF0, 1, 2, 3, 4, (byte)0xF7});\n\t}", "public static void start() {\n \t\tMainGame.display.disp(\"What type of monster do you want to fight?:\");\r\n \t\t//Display the buttons for the choice of monster\r\n \t\tMainGame.display.Enable(MainGame.display.warriorM, MainGame.display.fighterM);\r\n \t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tint x = e.x;\n\t\t\t\tint y = e.y;\n\t\t\t\t\n\t\t\t\tif(settingRect.contains(x,y)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(helpRect.contains(x,y)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(aboutRect.contains(x,y)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(exitRect.contains(x,y)) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\telse if(onButton(classicP,x,y)) {\n\t\t\t\t\tcanvas.dispose();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t\tClassicView view = new ClassicView(mainFrame);\n\t\t\t\t\tmainFrame.setView(view);\n\t\t\t\t\t\n\t\t\t\t\tgame = new ClassicGame(view);\n\t\t\t\t\tgameThread = new Thread(game);\n\t\t\t\t\tview.setGameThread(gameThread);\n\t\t\t\t\tview.setGame(game);\n\t\t\t\t\tgameThread.start();\n\t\t\t\t}\n\t\t\t\telse if(onButton(timeP,x,y)) {\n\t\t\t\t\tcanvas.dispose();\n\t\t\t\t\tchangeCursor(false);\n\t\t\t\t\tClassicView view = new TimeView(mainFrame);\n\t\t\t\t\tmainFrame.setView(view);\n\t\t\t\t\t\n\t\t\t\t\tgame = new TimeGame(view);\n\t\t\t\t\tgameThread = new Thread(game);\n\t\t\t\t\tview.setGameThread(gameThread);\n\t\t\t\t\tview.setGame(game);\n\t\t\t\t\tgameThread.start();\n\t\t\t\t}\n\t\t\t\telse if(onButton(levelP,x,y)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(onButton(onlineP,x,y)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == b) {\r\n\t\t\t\t\ttext.setText(\"8\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void keyPressed()\n{\n switch (key)\n {\n case ' ': //play and pause\n s =! s;\n if (s == false)\n {\n //pausets = millis()/4;\n controlP5.getController(\"play\").setLabel(\"Play\");\n } else if (s == true )\n {\n //origint = origint + millis()/4 - pausets;\n controlP5.getController(\"play\").setLabel(\"Pause\");\n }\n break; \n\n case TAB: //change of basemap\n if (mapwd == map1)\n {\n mapwd = map3;\n mapwk = map4; \n } else\n {\n mapwd = map1;\n mapwk = map2;\n }\n break; \n\n case ',': //backwards\n runtimes = runtimes - 300;\n break;\n\n case '<': //backwards\n runtimes = runtimes - 300;\n break; \n\n case '.': //forwards\n runtimes = runtimes + 300;\n break;\n\n case '>': //forwards\n runtimes = runtimes + 300;\n break;\n\n case 'z': //zoom to origin layer\n mapwk.zoomAndPanTo(BeijingLocation, 12);\n mapwd.zoomAndPanTo(BeijingLocation, 12);\n break;\n\n// case 'q': //switch mode\n// f.show();\n// break;\n }\n}", "public void actionPerformed(ActionEvent e){\r\n\t\tif(e.getActionCommand().equals(\"Start\")){\r\n\t\t\ttitleImage();\r\n\t\t}\r\n\t\tif(e.getActionCommand().equals(\"Hint\")){\r\n\t\t\t//guessed = false, the user did not guess all values\r\n\t\t\tguessed = false;\r\n\t\t\t//executed = true, the hint was used\r\n\t\t\texecuted = true;\r\n\t\t\trandom();\r\n\t\t\thint(a,b,c,d,f,g);\r\n\t\t}\r\n\t\tif (e.getSource() == numberField){\r\n\t\t\t//guessed = true, the user guessed all values\r\n\t\t\tguessed = true;\r\n\t\t\tcanvas.add(matrix);\r\n\t\t\tscanTicket();\r\n\t\t\tprintArray(a,b,c,d,f,g);\r\n\t\t\tcompareArray(chArray, randArray);\r\n\t\t\tpointsImage(points);\r\n\t\t\tnumberImage();\r\n\t\t\tstringImage(ch1,ch2,ch3,ch4,ch5,ch6);\r\n\t\t\t//executed = false, the hint was not used\r\n\t\t\texecuted = false;\r\n\t\t\tmatch1 = false;\r\n\t\t\tmatch2 = false;\r\n\t\t\tmatch3 = false;\r\n\t\t\tmatch4 = false;\r\n\t\t\tmatch5 = false;\r\n\t\t\tmatch6 = false;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void show()\n\t{\n\t\tGdx.input.setInputProcessor(this);\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\tMenu.currentCard = 1;\r\n\t\t\tCardLayout cl = (CardLayout)(Menu.cardPanel.getLayout());\r\n\t\t\tSystem.out.println( ((JButton)evt.getSource()).getText() );\r\n\t\t\tprintPairings();\r\n\t\t}", "public void playInstructions() {\r\n\t\tSystem.out.println(\"\\nYou are now ready to select areas.\");\r\n\t\tSystem.out.println(\"In normal mode, areas that you do not select will become still\");\r\n\t\tSystem.out.println(\"In black and white mode, areas you select will become black and white\");\r\n\t\tSystem.out.println(\"Press the left mouse button to select a point\");\r\n\t\tSystem.out.println(\"After 3 or more points, you may press \\\"p\\\"\"\r\n\t\t\t\t+ \"\\nAnd Delaunay Triangulation will be used to mark an area around points you have selected\");\r\n\t\tSystem.out.println(\"Pressing \\\"o\\\" will clear the points you have selected\");\r\n\t\tSystem.out.println(\"Press SPACE when you are done marking areas\");\r\n\t\tSystem.out.println(\"You may press ESCAPE to quit at any time\");\r\n\t}", "public void displayCode (Graphics g){\r\n\t\tfor (int i = 0 ; i < counter; i++){\r\n\t\t\tif (code.charAt(i) == '1'){\r\n\t\t\t\tdrawOne(g);\r\n\t\t\t\tdelay(500);\r\n\t\t\t}\r\n\t\t\telse if (code.charAt(i) == '2'){\r\n\t\t\t\tdrawTwo(g);\r\n\t\t\t\tdelay(500);\r\n\t\t\t}\r\n\t\t\telse if (code.charAt(i) == '3'){\r\n\t\t\t\tdrawThree(g);\r\n\t\t\t\tdelay(500);\r\n\t\t\t}\r\n\t\t\telse if (code.charAt(i) == '4'){\r\n\t\t\t\tdrawFour(g);\r\n\t\t\t\tdelay(500);\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tdisplay = false; //display is equal to false when displaying code has finished\r\n\t}", "private void setActive(String i) {\n\t\tactive = i;\n\n\t\tswitch(i) {\n\t\tcase \"character\": outputArea.setPromptText(\"Parameters: CharaNumber, CharaName\"); break;\n\t\tcase \"mood\": outputArea.setPromptText(\"Parameters: MoodNumber, MoodName\"); break;\n\t\tcase \"animation\": outputArea.setPromptText(\"Parameters: AnimNumber, AnimName, AnimArgument\\nAnimations: Enter(), \"\n\t\t\t\t+ \"MoveX(pos), MoveY(pos), Sway(), StopSine(), Close(), Retreat(), Leave(), Screen_Shake().\"); break;\n\t\tcase \"background\": outputArea.setPromptText(\"Parameters: BGName\"); break;\n\t\tcase \"effect\": outputArea.setPromptText(\"Parameters: EffectName \\nEffects: Trippy, Mud, Hide\"); break;\n\t\tcase \"music\": outputArea.setPromptText(\"Parameters: MusicName\"); break;\n\t\tcase \"display\": outputArea.setPromptText(\"Parameters: DisplayName \\nDisplays: Hide.\"); break;\n\t\tcase \"options\": outputArea.setPromptText(\"Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\"); break;\n\t\tcase \"void\": outputArea.setPromptText(\"Parameters: None.\"); break;\n\t\tcase \"end\": outputArea.setPromptText(\"Parameters: None.\"); break;\n\t\tcase \"title\": outputArea.setPromptText(\"Parameters: TitleName.\"); break;\n\t\tcase \"goto\": outputArea.setPromptText(\"Parameters: LayoutName.\"); break;\n\t\tcase \"extra\": outputArea.setPromptText(\"Parameters: ExtraName.\"); break;\n\n\t\t}\n\t}", "public void add(String character)\n { \n if(display.getText().equals(\"0\"))\n {\n display.setText(character);\n }\n \n else\n {\n display.setText(display.getText() + character);\n }\n }", "public void startClick() {\n if(!isRunning){\n startButton.setText(\"Pause\");\n isRunning = true;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.play();\n }else{\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.pause();\n }\n }", "@Override\n\t\tpublic void onShowPress(MotionEvent e) {\n\t\t\t\n\t\t}", "private void cs1() {\n\t\t\tctx.mouse.click(675,481,true);\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t((Breakout)SwingUtilities.getWindowAncestor(MenuBoard.this)).startGame();\r\n\t\t}", "@Override\n public void onClick(View v) {\n showKeyboard();\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tgameType = \"Quick Play\"; \n\t\t\t\t\t\n\t\t\t\t}", "public abstract void onLineMode ();", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "public void runDisplay()\n\t{\n\t\tscFrame = new SpellCheckFrame();\n\t\tscFrame.setVisible(true);\n\t}", "@Override\n\t\t\t\tpublic void onShowPress(MotionEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void show() {\n VisAQ.getInstance().userInput();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"newGame\"))\n\t\t{\n\t\t\tSystem.out.println(\"开始新的游戏\");\t\t\n\t\t\tinitKey();\n\t\t\t\n\t\t\t\n\t\t\t//创建新的游戏战场\n\t\t\tmgp=new MyGamePanel(\"newGame\");\n\t\t\t\n\t\t\t//启动游戏面板线程\n\t\t\tThread t=new Thread(mgp);\n\t\t\tt.start();\n\t\t\t\n\t\t\t//删除旧的面板\n\t\t\tthis.remove(msp);\n\t\t\tthis.add(mgp);\n\n\t\t\t//注册监听\n\t\t\tthis.addKeyListener(mgp);\n\t\t\t\n\t\t\tthis.setVisible(true);\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"exit\"))\n\t\t{\n\t\t\t//保存击毁敌人数量\n\t\t\tRecorder.keepRecording();\n\t\t\tSystem.out.println(\"退出游戏\");\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"saveExit\"))\n\t\t{\n\t\t\tRecorder rd=new Recorder();\n\t\t\n\t\t\trd.setEts(mgp.ets);\n\t\t\trd.setHeros(mgp.heros);\n\t\t\trd.keepRecAndEnemyTank();\n\t\t\tSystem.out.println(\"保存游戏\");\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"conGame\"))\n\t\t{\n\t\t\tinitKey();\n\t\t\tmgp=new MyGamePanel(\"con\");\n\t\t\t\n\t\t\tThread t=new Thread(mgp);\n\t\t\tt.start();\n\t\t\t\n\t\t\tthis.remove(msp);\n\t\t\tthis.add(mgp);\n\t\t\t\n\t\t\tthis.addKeyListener(mgp);\n\t\t\t\n\t\t\tthis.setVisible(true);\n\t\t\t\n\t\t\tSystem.out.println(\"接着玩游戏\");\n\t\t}else if(arg0.getActionCommand().equals(\"KeyInstall\"))\n\t\t{\n\t\t\tSystem.out.println(\"点击了用户设置按钮\");\n\t\t\tKeyInstall ki=new KeyInstall();\n\t\t\t\n\t\t}else if(arg0.getActionCommand().equals(\"LevelSetting\"))\n\t\t{\n\t\t\tSystem.out.println(\"用户点击了游戏难易设置\");\n\t\t\tLevelSetting ls=new LevelSetting();\n\t\t}else if(arg0.getActionCommand().equals(\"SavePoint\"))\n\t\t{\n\t\t\tSystem.out.println(\"用户点击了保存分数按钮\");\n\t\t\tMyGamePanel.isPause=!MyGamePanel.isPause;\n\t\t\tSavePoint sp=new SavePoint();\n\t\t\tString sumPoints=String.valueOf(MyGamePanel.sumPoint);\n\t\t\tsp.jf2.setText(sumPoints);\n\t\t\tsp.jf2.setEditable(false);\n\t\t}\n\t}", "@FXML\n\tpublic void handleModeScreenButton(){\n\t mainAnimation.stop();\n\t\tScreen cs = new Screen(this.getStage(), \"Select Mode to Play\", \"View/ModeScreen.fxml\");\n\t\tController controller = new ModeScreenController(this.getStage());\n\t\tcs.display(controller);\n\t}", "public void spacePressed()\n {\n System.out.println(\"spacePressed()\");\n while (current.translate(1, 0));\n display.showBlocks();\n }", "@Override\r\n\tpublic void handle(ActionEvent event) {\r\n\t\tString command = ((ToggleButton) event.getSource()).getText();\r\n\t\tthis.view.getPaintPanel().setMode(command);\r\n\t\t\r\n\t}", "public void actionPerformed (ActionEvent event){\r\n\t\tString eventName = event.getActionCommand();\r\n\t\tif (eventName.equals(\"Exit\")){\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\telse if (eventName.equals(\"New\")){\r\n\t\t\tscreen = 0;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\tif (eventName.equals(\"Original\")){\r\n\t\t\tscreen = 1;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\telse if (eventName.equals(\"Monochromatic\")){\r\n\t\t\tscreen = 2;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\telse if (eventName.equals(\"Tropical\")){\r\n\t\t\tscreen = 3;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public void display()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickKeyPad();\n\t\t\t}" ]
[ "0.69496465", "0.6766611", "0.64812994", "0.6276177", "0.6215001", "0.6171133", "0.6042331", "0.5987774", "0.59826666", "0.5977575", "0.59762734", "0.59685534", "0.59617186", "0.5948678", "0.59197146", "0.59195966", "0.591833", "0.5859471", "0.5849107", "0.58474416", "0.58445877", "0.58271414", "0.5820498", "0.58194715", "0.5812332", "0.5797867", "0.57965505", "0.57893807", "0.57786375", "0.5761172", "0.57497174", "0.57447696", "0.5742474", "0.5733172", "0.573025", "0.5724666", "0.57214046", "0.5713792", "0.57075155", "0.5705441", "0.570442", "0.5699687", "0.5698792", "0.5693051", "0.56877095", "0.5685465", "0.5682992", "0.5679968", "0.5679737", "0.5672994", "0.56652397", "0.56612194", "0.5661081", "0.5653735", "0.5653559", "0.56496996", "0.5646996", "0.5646244", "0.5643951", "0.56415886", "0.56401676", "0.5636886", "0.563635", "0.563253", "0.5617296", "0.56079984", "0.5606682", "0.55925727", "0.5586477", "0.5585139", "0.5576592", "0.5575645", "0.5574137", "0.5572128", "0.5568085", "0.5564729", "0.55616343", "0.5560163", "0.55577177", "0.5553271", "0.55528593", "0.55526686", "0.5549782", "0.5546855", "0.55463", "0.55462533", "0.55439323", "0.5542057", "0.55385476", "0.55375844", "0.55273026", "0.5526043", "0.552337", "0.55174917", "0.5517364", "0.55157226", "0.5509373", "0.55084956", "0.55077165", "0.5504138", "0.55038774" ]
0.0
-1
private static HASH h;
Login() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getHash();", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "public abstract int getHash();", "String getHash();", "String getHash();", "public HASH256 getHash1(){return hash1;}", "public String getHash()\n {\n return hash;\n }", "static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}", "public String getHash() {\n return hash;\n }", "public int getHash() {\n return hash_;\n }", "public int hashCode()\n {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public String getHash() {\n return hash;\n }", "public int getHash() {\n return hash_;\n }", "public HASH512 getHash2(){return hash2;}", "private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }", "public String getHash() {\n\t\treturn _hash;\n\t}", "@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }", "com.google.protobuf.ByteString getHash();", "com.google.protobuf.ByteString getHash();", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "public String getHash() {\n\t\treturn hash;\n\t}", "public HashTag() {}", "private void rehash()\n {\n int hTmp = 37;\n\n if ( isHR != null )\n {\n hTmp = hTmp * 17 + isHR.hashCode();\n }\n\n if ( id != null )\n {\n hTmp = hTmp * 17 + id.hashCode();\n }\n\n if ( attributeType != null )\n {\n hTmp = hTmp * 17 + attributeType.hashCode();\n }\n \n h = hTmp;\n }", "int _hash(int maximum);", "public int hashCode() {\n return hash.hashCode();\n }", "java.lang.String getHashData();", "public abstract long h();", "private int getHash(Object key) {\n return key.hashCode();\n }", "private HashNode() {\r\n key = null;\r\n value = null;\r\n }", "public FileInfo()\r\n {\r\n hash = new HashInfo();\r\n }", "String getHashControl();", "int\thashCode();", "@Override\n public void computeHash(Hasher hasher) {\n }", "public void setHash(String hash)\n {\n this.hash = hash;\n }", "QHT() {\r\n /*\r\n ***TO-DO***\r\n Default constructor\r\n should initialize the hash table with default capacity\r\n */\r\n initCap = 2;\r\n for (int i = 1; i < DEFAULT_EXP; i++) {\r\n initCap *= 2;\r\n }\r\n htable = new KVPair[initCap];\r\n }", "public int hashCode() {\n return 37 * 17;\n }", "public int hashcode();", "public byte[] getHash() {\n\t\treturn generatedHash;\n\t}", "Hashi newHashi(int dim);", "public void instantiateTable(){\n hashTable = new LLNodeHash[16];\n }", "public abstract int doHash(T t);", "public void setHash(String hash) {\n this.hash = hash;\n }", "static int getHash(Object obj) {\n return getHash(new HashSet<Class>(), obj, 0);\n }", "final int hash(E object)\n {\n // Spread bits to regularize both segment and index locations,\n // using variant of single-word Wang/Jenkins hash.\n int h = object.hashCode();\n h += (h << 15) ^ 0xffffcd7d;\n h ^= (h >>> 10);\n h += (h << 3);\n h ^= (h >>> 6);\n h += (h << 2) + (h << 14);\n h = h ^ (h >>> 16);\n return h;\n }", "public HashTableChained() {\r\n num_buckets = 101; //prime number close to 100\r\n hash_table = new DList[num_buckets]; \r\n }", "public byte[] getHash() {\n\t\treturn _hash.getDataID();\n\t}", "public String getHashValue() {\n return hashValue;\n }", "HashTable() {\n int trueTableSize = nextPrime(tableSize);\n HT = new FlightDetails[nextPrime(trueTableSize)];\n }", "public void testHashcode() {\n XYBlockRenderer r1 = new XYBlockRenderer();\n XYBlockRenderer r2 = new XYBlockRenderer();\n int h1 = r1.hashCode();\n int h2 = r2.hashCode();\n }", "private String hash(){\r\n return Utility.SHA512(this.simplify());\r\n }", "boolean hasHash();", "private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }", "public void setHash(String hash) {\n this.hash = hash;\n }", "public void setHash(String hash) {\n this.hash = hash;\n }", "public void setHash(String hash) {\n this.hash = hash;\n }", "protected abstract int hashOfObject(Object key);", "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hash(sigla);\n\t}", "public int\thashCode() { return value; }", "public String getHashname(){\n\t\treturn sHashname;\n\t}", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "public int getHashCode(){\n return hashCode();\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}", "public int hashCode()\r\n/* 448: */ {\r\n/* 449:610 */ return this.headers.hashCode();\r\n/* 450: */ }", "@Override \n int hashCode();", "public HashCode() {\n mVal = SEED;\n }", "@Override\n public int hashCode() {\n Object object = this.h;\n synchronized (object) {\n return this.a().hashCode();\n }\n }", "static int hash(Integer key) {\n int h;\n return (key == null) ? 0 : (h = key.hashCode()) ^ (h >>> 16);\n }", "public void setHash(String hash) {\n\t\tthis.hash = hash;\n\t}", "public int hashCode() {\n\treturn data.hashCode();\n }", "public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }", "public int getHashLength() {\n\t\treturn hashLength;\n\t}", "private int hash(T t) {\n int code = t.hashCode();\n return code % Table.size();\n }", "public int hashCode() {\r\n \treturn super.hashCode();\r\n }", "public int hashCode() {\n/* 76 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public HashGraph()\n {\n graph = new HashMap <>();\n }", "public static void main(String[] args) {\n CustomHashCode customHashCode=new CustomHashCode();\r\n Byte byte1=new Byte((byte) 12);\r\n String str=customHashCode.getHashCode(\"adfasdk\");\r\n System.out.println(str);\r\n List<Integer> list=new LinkedList<>();\r\n java.util.Collections.synchronizedList(list);\r\n \r\n \r\n\t}", "@Override\n public int hashCode(\n ) {\n \tint h = hash;\n \tif (h == 0 && size > 0) {\n \t\th = 31 * parent.hashCode() + base.hashCode();\n \t\tif(! isPlaceHolder()) {\n \t\t\thash = h;\n \t\t}\n \t}\t\n return h;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getHash() {\n return hash_;\n }", "public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }", "@Override\r\n public int hashCode() {\r\n int hash = 7;\r\n hash = 19 * hash + (int) (this.grauDeEquilibrio ^ (this.grauDeEquilibrio >>> 32));\r\n return hash;\r\n }", "@Override\r\n\t\tpublic int hashCode() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.hashCode();\r\n\t\t\t}\r\n\t\t}", "@Override\n public int hashCode() {\n return 1;\n }", "private int local_hashCode() {\n return _field != null ? _field.hashCode() : 0x31337;\n }", "String getHashAlgorithm();", "long hash(Block block, int position);", "public final void mHASH() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = HASH;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:432:5: ( '#' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:432:16: '#'\n\t\t\t{\n\t\t\tmatch('#'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}", "@Override\n public int hashCode()\n {\n return hashCode;\n }", "public void add2Hash( Hashtable h, String source ) {\n \n AstCursor c = new AstCursor();\n \n for ( c.FirstElement( this ); c.MoreElement(); c.NextElement() ) {\n Es es = ( Es ) c.node;\n es.add2Hash( h, source );\n }\n }", "HSet entrySet();", "int hashCode();", "int hashCode();", "int textHash()\n{\n return ticket_text.hashCode();\n}", "public int hashCode() {\n return 0;\n }", "public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }", "org.apache.xmlbeans.XmlString xgetHashData();", "@Override\n public int hashCode() {\n return hashcode;\n }" ]
[ "0.72733474", "0.71287996", "0.7121944", "0.7013494", "0.7013494", "0.6970181", "0.6902682", "0.68744856", "0.6808079", "0.6805583", "0.67242986", "0.6696311", "0.6696311", "0.6696311", "0.66288656", "0.66188055", "0.6594026", "0.6588168", "0.65683246", "0.6539983", "0.6539983", "0.65269375", "0.6513924", "0.6498478", "0.649786", "0.6414786", "0.64121014", "0.63540626", "0.6321967", "0.6313866", "0.6313177", "0.62476003", "0.6238697", "0.6231888", "0.6206338", "0.61844885", "0.6184449", "0.61725134", "0.6167748", "0.61542463", "0.6143904", "0.6141711", "0.61260533", "0.612363", "0.61061615", "0.61040026", "0.6101348", "0.6100715", "0.60854137", "0.6083786", "0.60763335", "0.6067155", "0.6064957", "0.60555965", "0.6055569", "0.6055569", "0.6055569", "0.6049616", "0.6035763", "0.60242486", "0.6023972", "0.601785", "0.60140157", "0.60132396", "0.60132396", "0.6010014", "0.6008412", "0.60019076", "0.59943676", "0.5994111", "0.59910184", "0.59895253", "0.5986031", "0.5978452", "0.59705544", "0.5961259", "0.5947115", "0.5937942", "0.5930257", "0.592097", "0.59205806", "0.59194314", "0.59194314", "0.59090465", "0.590679", "0.5906782", "0.59008956", "0.58976996", "0.589093", "0.5882336", "0.58794594", "0.58685946", "0.5859299", "0.5855744", "0.585493", "0.585493", "0.5843219", "0.5838528", "0.5828413", "0.58219516", "0.58146465" ]
0.0
-1
submit button on click
public void actionPerformed(ActionEvent e) { enter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "@Step\r\n\tpublic void clickSubmit() {\r\n\t\tLOGGER.info(\"Clicking submit\");\r\n\t\tspeedoSubmit.click();\r\n\t}", "public void onClick(ClickEvent event) {\r\n System.out.println(\"Submit Button geklickt\");\r\n handleEvent();\r\n }", "public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}", "public void submit_intsatpos(View button) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tSubmit();\n\t\t\t\tfinish(); \n\t\t\t}", "public void clickOnSubmitButton() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\twaitForVisibility(sbmnit);\n\t\tsbmnit.click();\n\t}", "public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}", "public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }", "private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}", "@When(\"^Click's on Submit Button$\")\n\tpublic void click_s_on_Submit_Button() throws Throwable {\n\t\treviewPageObjects.clickonsubmit();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Then(\"user clicks submit button\")\n\tpublic void user_clicks_submit_button(){\n\t\t driver.findElement(By.name(\"sub\")).click();\n\t\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t}", "public void buttonClick(ClickEvent event) {\n fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));\n \n // close popup window\n close();\n }", "public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}", "@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "private void btnSubmit_click(ActionEvent e) {\n\t\tString subjectName=txtSubjectName.getText();\n\t\tString STATUS=txtSTATUS.getText();\n\n\t\t//为空判断\n\t\tif(SysFun.isNullOrEmpty(subjectName)) {\n\t\t\tlblMsg.setText(\"提示:用户名不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\tif(STATUS==null || STATUS.isEmpty()) {\n\t\t\tlblMsg.setText(\"提示:教室号不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\tLong or=0L;\n//\t\tif(rdoNo.isSelected()) {\n//\t\t\tor=0L;\n//\t\t}else if(rdoYes.isSelected()) {\n//\t\t\tor=1L;\n//\t\t}\n\n\t\tSubject item=subjectService.loadByName(subjectName);\n\t\t\n\t\tif(item!=null) {\n\t\t\tlblMsg.setText(\"提示:该管理员账号已存在!\");\n\t\t\treturn;\n\t\t}\n\t\tSubject bean=new Subject();\n\t\tbean.setSubjectName(subjectName);\n\t\tbean.setSTATUS(STATUS);\n\t\t\n\t\tLong result=0L;\n\t\tString errMsg=null;\n\t\ttry {\n\t\tresult=subjectService.insert(bean);\n\t\t}catch(Exception ex) {\n\t\t\terrMsg=ex.getMessage();\n\t\t}\n\t\t\n\t\tif(result>0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加成功!\");\n\t\t\tif(subjectListFrm!=null) {\n\t\t\t\tsubjectListFrm.btnReset_click(null);\n\t\t\t\tsubjectListFrm.setVisible(true);\n\t\t\t}\n\t\t\tthis.dispose();\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加失败!\");\n\t\t}\n\n\t\t\n\t\tif(subjectListFrm!=null) {\n\t\t\tsubjectListFrm.btnReset_click(null); \n\t\t\tsubjectListFrm.setVisible(true);\n\t\t}\n\t\tthis.dispose();\n\t}", "@Override\n public void onClick(View view) {\n if ( checkValidation () )\n submitForm();\n \n }", "private void displaySubmitButton() {\n RegularButton submitButton = new RegularButton(\"SUBMIT\", 1000, 600);\n submitButton.setOnAction(e -> handleSubmit());\n\n sceneNodes.getChildren().add(submitButton);\n }", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "@Override\n public void Submit() {\n }", "public String submitText();", "public void buttonClick(ClickEvent event) {\n\t\t\t\tif (!isProcessing) {\n\t\t\t\t\tisProcessing = saveOperacion(oItem, operacionConfirmForm);\n\t\t\t\t}\n\t\t\t}", "public void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n\t\tcase R.id.regist_sure: // 确认\r\n\t\t\tsubmit();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.btnSubmit:{\n\t\t\tString zkzhStr = zkzh.getText().toString();\n\t\t\tString xmStr = name.getText().toString();\n\t\t\tif(xmStr.equals(\"znb\")){\n\t\t\t\txmStr=\"张能波\";\n\t\t\t}\n\t\t\t HttpEnglish a = new HttpEnglish(zkzhStr,xmStr,handler);\n\t\t\tclockThread = new Thread(a);\n\t\t\t clockThread.start(); /* 启动线程 */\t\n\t\t } \n\t\t} \n\t \n}", "public Submit_Button()\n\t\t\t{\n\t\t\t\tsuper(\"Submit\");\n\n\t\t\t\taddActionListener(new ActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tloadText();\n\n\t\t\t\t\t\t// pass ssn input into patient instance to lookup tuple\n\t\t\t\t\t\tPatient p = new Patient(ssn);\n \n String result = p.search(selected_record_type);\n \n String[] values = result.split(\"\\n\");\n \n\t\t\t\t\t\t// create new instance of output panel to display result\n\t\t\t\t\t\tdisplayNewRecordOutput(new Patient_Record_Output(values));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "public void ClickChecoutSubmitbutton(){\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:- Checkout Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btncheckoutregistrationsubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Checkout Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Checkout Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btncheckoutregistrationsubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "private void btnSubmit_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\texamService.update(exam);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void toggleSubmitButton(){\n switch (mSubmitButton.getText().toString()){\n case \"Submit\":\n mSubmitButton.setText(\"Next\");\n mSubmitButton.setOnClickListener(view -> recreate());\n break;\n case \"Next\":\n mSubmitButton.setText(\"Submit\");\n mSubmitButton.setOnClickListener(view -> mGameController.checkGuess());\n break;\n }\n }", "@Override\n public void onClick(View v) {\n String url = csp_server+\"/\"+userId+\"/answer/\"+questionId;\n AnswerQuestion ansq = new AnswerQuestion();\n String finalAns = \"No\";\n if(answer)\n finalAns = \"Yes\";\n ansq.execute(url, finalAns);\n Log.d(\"Notification-debug\", \"Submit button\");\n finish();\n\n }", "public void ClickMyAccountSubmitbutton(){\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:- My Account Registration submit button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\tclick(locator_split(\"btnMyAccountSubmit\"));\r\n\t\t\tSystem.out.println(\"Checkout Registration submit button is clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- My Account Registration submit button is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- My Account Registration submit button is not clicked\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnMyAccountSubmit\")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tpostData();\n\t\t\t\t\t}", "public void performSubmit(Action action) {\n performSubmit(action, true);\n }", "void btnGenReport_actionPerformed(ActionEvent e) {\n JButtonQueryButtonAction(e);\r\n }", "public WebElement SubmitBtn() {\n\t\treturn driver.findElement(Subbtn);\n\t}", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "public void buttonClicked();", "public void clickSubmitSearchButton(){\r\n\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:- Search Button should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"btnSearchSubmit\"));\r\n\t\t\tclick(locator_split(\"btnSearchSubmit\"));\r\n\t\t\twaitForPageToLoad(10);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Search Button is clicked\");\r\n\t\t\tSystem.out.println(\"Sarch icon is clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Search Button is not clicked \"+elementProperties.getProperty(\"btnSearchSubmit\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"btnSearchSubmit\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void Click_Done()\r\n\t{\r\n\t\tExplicitWait(Specialdone);\r\n\t\tif (Specialdone.isDisplayed()) \r\n\t\t{\r\n\t\t\tJavascriptexecutor(Specialdone);\r\n\t\t\tExplicitWait(Checkavailability);\r\n\t\t\t//System.out.println(\"Clicked on Special Rate plan done button \");\r\n\t\t\tlogger.info(\"Clicked on Special Rate plan done button\");\r\n\t\t\ttest.log(Status.INFO, \"Clicked on Special Rate plan done button\");\r\n\r\n\t\t} else {\r\n\t\t\t//System.out.println(\"Special Rate plan done button not found\");\r\n\t\t\tlogger.error(\"Special Rate plan done button not found\");\r\n\t\t\ttest.log(Status.FAIL, \"Special Rate plan done button not found\");\r\n\r\n\t\t}\r\n\t}", "@Override\n\t public void onClick(View v) {\n\t \t SendReqToPebble();\n\t }", "public void submitorder( ){\r\n\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:- submit order link is clicked entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"submitorder\"));\r\n\t\t\tclick(locator_split(\"submitorder\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"submit link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-submit link clicked \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- unable to click submit button\" );\r\n\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View view) {\n if (view.getId() == R.id.btnSubmit) {\n tableNum = String.valueOf(textInput.getText());\n Intent intent = new Intent(this, PizzeriaMainActivity.class);\n intent.putExtra(CLE_DONNEES, tableNum);\n startActivity(intent);\n }\n }", "@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(\"CliPantallaBusquedaExpedientes\");\t \n\t\t\t}", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.submitBtn:\n String merchant = retrieveMerchant();\n String description = retrieveDesc();\n String date = retrieveDate();\n String cost = retrieveCost();\n if (merchant.equals(\"\") || description.equals(\"\") || date.equals(\"\") || cost.equals(\"\")) {\n return;\n }\n Date d = Utils.convertToDate(Utils.getYearFromStr(date), Utils.getMonthFromStr(date), Utils.getDayFromStr(date));\n ContentValues values = Utils.insertEntries(merchant, description, date, d, cost);\n long newRowId = _db.insert(Inventory.InventoryEntry.TABLE_NAME, null, values);\n Intent i = new Intent(AddActivity.this, MainActivity.class);\n startActivity(i);\n }\n }", "private void submit_attendance() {\n }", "public void submit(View v) {\n switch (climb.getCheckedRadioButtonId()) {\n case R.id.climbNoAttempt:\n MainActivity.db.climb = 1;\n break;\n case R.id.climbSuccess:\n MainActivity.db.climb = 2;\n break;\n case R.id.climbFail:\n MainActivity.db.climb = 3;\n break;\n default:\n MainActivity.db.climb = 0;\n break;\n }\n MainActivity.db.comment = comments.getText().toString();\n MainActivity.db.catchTime = catchTimeValue;\n MainActivity.db.climbTime = climbTimeValue;\n Intent submit = new Intent(this, submit.class);\n startActivity(submit);\n }", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "@Then(\"user clicks on apply button\")\r\n\tpublic void user_clicks_on_apply_button() {\n\t WebElement element = Browser.session.findElement(By.xpath(\"//*[@type='submit']\"));\r\n\t try {\r\n\t\t\tThread.sleep(5000);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t element.click();\r\n\t}", "void okButtonClicked();", "@Override public void actionPerformed(java.awt.event.ActionEvent arg0) {\n\t\tJButton jb=new JButton();\n\t\t\n\t\tjb=(JButton) arg0.getSource();\n\t\t\n\t\t//TypeOfJob=jtxp1a.getText();\n\t\t\n\t\tif(jb==Submit)\n\t\t{\n\t\tTypeOfJob=(String) Kindofjobs.getSelectedItem();\n\t\tDescription=jtxp1b.getText();\n\t\t\n\t\tDatess=(String) Dates.getSelectedItem();\n\t\tMonthh=(String) Months.getSelectedItem();\n\t\t\n\t\n\t\tKindofjobs.setEnabled(false);\n\t\tjtxp1b.setEnabled(false);\n\t\tDates.setEnabled(false);\n\t\tMonths.setEnabled(false);\n\t\t\n\t\tAdd_Client(this);\n\n\n\t\tif(count==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tcm1.Make_managerp();\n\t\t}\t\n\t\n\n\t}\n\n\t}", "protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}", "@Then(\"^click on the Register button$\")\r\n\tpublic void click_on_the_Register_button() throws Throwable {\n\t register.submitRegistration();\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString rs=\"<button>Clik here this was POST request</button>\";\n\t\tresp.getWriter().write(rs);\n\t}", "@Override\n public void onClick(View v) {\n\n switch (v.getId()) {\n //Event click button 保存\n case R.id.btn_submit_edit_input:\n saveDataInputJanReturnMagazine();\n break;\n }\n\n }", "public abstract void executeBagButton();", "protected GuiTestObject button_registerNowsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"button_registerNowsubmit\"));\n\t}", "@Override\r\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()) {\r\n\t\t\tcase R.id.fscFm_submitBt:\r\n\t\t\t\tsubmitDel();\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.fscFm_cancelBt:\r\n\t\t\t\tcancelAll();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "public void clickOnUpdateButton() {\r\n\t\tsafeJavaScriptClick(updateButton);\r\n\t}", "@FXML\n\tprivate void submitForm()\n\t{\n \tSystem.out.println(\"submitted\");\n \tsubmit.setDisable(true);\n \tif ( file_path.getText().isEmpty() )\n \t{\n \t\tfinal DirectoryChooser fileChooser = new DirectoryChooser(); \n \t\tStage stage = new Stage();\n \t\tstage.setTitle(\"Choose Directory\");\n \t\t\n \t\tFile folder = fileChooser.showDialog(stage);\n \t\toutput.openFile(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t\tfile_path.setText(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"File Path: \" + file_path.getText());\n \t}\n \toutput.outputResults( mainApp.getPlayers(),\n \t\t\tmainApp.getHeros(), \n \t\t\tmainApp.getMap(), \n \t\t\tmainApp.getTimerList());\n \tsubmit.setDisable(false);\n\t}", "private void submitForm() {\n Toast.makeText(this, \"Registering...\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic void onClick(View v) {\n\t\tint id = v.getId();\r\n\t\tif (R.id.leave_date == id || R.id.back_date == id) {\r\n\t\t\tshowDatePicker(id);\r\n\t\t} else if (R.id.submit_btn == id) {\r\n\t\t\tsubmit();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_save)\n .setTitle(\"End Evidence Collection\")\n .setMessage(\"Are you sure you want to end collecting evidence?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n submit();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }", "@Override\n public void onClick(View view) {\n startPosting();\n\n }", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuploadButton.setLabel(\"Uploading...\");\n\t\t\t\tsubmitConfiguration();\n\t\t\t\tuploadButton.setLabel(\"Upload\");\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tlogger.info(\"click rootstage's submit button\");\n\n\t\t\t\tScreensContainer container = new ScreensContainer();\n\t\t\t\tcontainer.registerScreen(ID_SHOWPROBLEM, file_showproblem);\n\t\t\t\tcontainer.registerScreen(ID_SUBMITCODE, file_submitcode);\n\n\t\t\t\tStage dialogStage = new Stage();\n\t\t\t\tdialogStage.setTitle(\"在线提交\");\n\t\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\t\tdialogStage.initOwner(rootLayout.getScene().getWindow());\n\n\t\t\t\tScene scene = new Scene(container);\n\t\t\t\tdialogStage.setScene(scene);\n\t\t\t\tcontainer.setScreen(ID_SHOWPROBLEM);\n\n\t\t\t\tdialogStage.showAndWait();\n\n\t\t\t}", "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 }", "public abstract void executeRunButton();", "public void buttonClickSingleThread(View view) {\n count = 0;\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future<Integer> future = executorService.submit(mCallable);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tif(v == cancel){\n\t\t\tLog.i(\"Newpost\", \"cancel\");\n\t\t} else if(v == send){\n\t\t\tEditText status = (EditText) findViewById(R.id.lulus_id_edit_newlulu);\n\t\t\tzuluContent = status.getText().toString();\n\t\t\tUpdateStatus task = new UpdateStatus();\n\t\t\ttask.execute();\n \tIntent myIntent = new Intent(NewZuluActivity.this, MyZulusActivity.class);\n \tNewZuluActivity.this.startActivity(myIntent);\n\t\t} else if(v == expire){\n\t\t\tLog.i(\"Newpost\", \"expire\");\n\t\t}\n\t}", "@And(\"^I click on \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void i_click_On_Button(String actkey) throws Throwable {\n\t\tThread.sleep(5000);\r\n\t\t//loginPage.getDriver().findElement(By.xpath(\".//*[contains(@value,'Edit')]\")).click();\r\n\t\tenduser.Qos_screen_edit_and_save(actkey);\r\n\t\t\r\n\t}", "@Override\n public void onClick(View v) {\n if(checkEmptyFields()){\n //submit not successful\n }else {\n //add to database\n Toast.makeText(getApplicationContext(), \"Submit Successful\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n \tpublic void onClick (View v)\n \t{\n \t\tString status = editText.getText().toString();\n \t\tnew PostToTwitter().execute(status);\n \t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfetchButton.setLabel(\"Fetching...\");\n\t\t\t\tsubmitConfigSubmissionRequest();\n\t\t\t\tfetchButton.setLabel(\"Fetch\");\n\t\t\t}", "@Override\n public void onClick(View v) {\n doPostThatYeah();\n }", "@FXML\n private void _submitAnswer(ActionEvent _event) {\n Game currentGame = GameFactory.getCurrentGameInstance();\n currentGame.processAnswer(_answerInput.getText());\n Map<String, Object> data = currentGame.createMap();\n updateView(data);\n this._answerInput.setText(\"\");\n if (!currentGame.gameOver) {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(false);\n } else {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(true);\n }\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tTestHttpPost();\r\n\t\t\t}", "private void showSubmitBtn(){\n\t\tmainWindow.addLayer(submitBtn, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t}", "public void clickOnSuccessOkBtn() throws Exception {\r\n\t\r\n\t\t\tclickOnButton(btnOKSuccess);\r\n\t\t\tlog(\"clicked on OK button and object is:-\" + btnOKSuccess.toString());\r\n\t\t\tThread.sleep(1000);\r\n\t}", "public void clickButton(View v) {\n\n // Get the text we want to send.\n EditText et = (EditText) findViewById(R.id.editText);\n String msg = et.getText().toString();\n\n // Then, we start the call.\n PostMessageSpec myCallSpec = new PostMessageSpec();\n\n\n myCallSpec.url = SERVER_URL_PREFIX + \"post_msg.json\";\n myCallSpec.context = ChatActivity.this;\n // Let's add the parameters.\n HashMap<String,String> m = new HashMap<String,String>();\n m.put(\"app_id\", MY_APP_ID);\n m.put(\"msg\", msg);\n myCallSpec.setParams(m);\n\n startSpinner();\n\n // Actual server call.\n if (uploader != null) {\n // There was already an upload in progress.\n uploader.cancel(true);\n }\n uploader = new ServerCall();\n //startSpinner();\n uploader.execute(myCallSpec);\n }", "public void createnewusersubmitbutton( ){\r\n\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:- Create new user button clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"createnewuserbutton\"));\r\n\t\t\tclick(locator_split(\"createnewuserbutton\"));\r\n\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- create new user button clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- create new user button is not clicked \"+elementProperties.getProperty(\"createnewuserbutton\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"createnewuserbutton\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tResultPage resultPage = new ResultPage(Agent.agentResult);\n\t\t\t\tframe.setVisible(false);\n\t\t\t\tresultPage.setVisible(true);\n\t\t\t}", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tisButtonClick = true;\r\n\t\t\t\t\tpageSize = 0;\r\n\t\t\t\t\tcurrentPage = 1;\r\n\t\t\t\t\tgetQx();\r\n\t\t\t\t}", "public void buttonClicked() {\n mSanitizorGame.buttonClicked();\n }", "public void clickOnSaveChangesButton() {\r\n\t\tprint(\"Click on Save Changes Button\");\r\n\t\tlocator = Locator.MyTrader.Save_Changes_Button.value;\r\n\t\tclickOn(locator);\r\n\t}", "public static void clickNextBtn() {\t\n\t\ttry {\n\t\t\tdriver.findElement(By.id(\"nextquest\")).click();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Next button in Q&A submit doesnt work\");\n\t\t}\n\t}", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public void clickOnRegisterButton() {\n Reporter.addStepLog(\" Click on register button \" + _registerBtn.toString());\n clickOnElement(_registerBtn);\n log.info(\" Click on register button \" + _registerBtn.toString());\n }", "@When(\"User clicks on Find Details button\")\r\n\tpublic void user_clicks_on_find_details_button() \r\n\t{\n\t driver.findElement(By.xpath(\"//input[@type='submit']\")).click();\r\n\t}" ]
[ "0.7507205", "0.74874413", "0.7436808", "0.741131", "0.7366153", "0.7361461", "0.7346034", "0.7255447", "0.7167728", "0.7146669", "0.7065884", "0.7005316", "0.69084406", "0.69036084", "0.68580985", "0.6850976", "0.6826884", "0.674373", "0.6733216", "0.667659", "0.6662048", "0.65948516", "0.6592834", "0.657891", "0.6561082", "0.65521544", "0.6550083", "0.6491393", "0.6401797", "0.6394245", "0.6389689", "0.63853806", "0.63788974", "0.6370756", "0.6367967", "0.6345808", "0.63358194", "0.63311577", "0.63309455", "0.6321173", "0.62967896", "0.627641", "0.6263935", "0.6254205", "0.6247988", "0.62398475", "0.6226879", "0.6221255", "0.6220253", "0.6211132", "0.62099594", "0.62098", "0.6208365", "0.6166588", "0.61612856", "0.61410755", "0.6137096", "0.6135115", "0.61280406", "0.6106721", "0.60896575", "0.60877466", "0.60851157", "0.60795814", "0.60665166", "0.6056178", "0.60474056", "0.6046038", "0.6039015", "0.6038117", "0.6022363", "0.60050994", "0.5992293", "0.5980532", "0.59796196", "0.5977258", "0.59720075", "0.59718883", "0.5971536", "0.5965187", "0.59638774", "0.5956402", "0.5955424", "0.59506816", "0.5928576", "0.592795", "0.5923226", "0.59216523", "0.5912464", "0.59084785", "0.5905555", "0.59033066", "0.5889394", "0.58871925", "0.58860546", "0.5882355", "0.58773077", "0.5859862", "0.5859862", "0.5857297", "0.58563805" ]
0.0
-1
submit button with enter key
public void keyPressed(KeyEvent e) { if (e.getKeyCode()==KeyEvent.VK_ENTER){ enter(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length() - 1));\n\t\telse onSubmit(text.getText());\n\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tsbt_jbt.doClick();\n\t\t\t\t}\n\t\t\t}", "private void enterPressed(java.awt.event.KeyEvent evt){\n //Check if enter was pressed\n if(evt.getKeyCode()==java.awt.event.KeyEvent.VK_ENTER){\n //If the button is enabled\n if(this.jButtonSearch.isEnabled()){\n //Simulate a click on the button\n this.jButtonSearchActionPerformed(new java.awt.event.ActionEvent(new Object(),0,\"\"));\n }\n }\n }", "public static void pressEnterKey() {\n\t\tActions act = new Actions(Browser.Driver);\n\t\tact.sendKeys(Keys.ENTER).perform();\n\t}", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "public void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tsbt_jbt.doClick();\n\t\t\t\t}\n\t\t\t}", "public boolean pressEnter () {\n if (CareerEnvironment.isMobile) {\n getDriver ().switchTo ().activeElement ().sendKeys (\"\\r\");\n return true;\n } else if (CareerEnvironment.usingIE)\n return pressKey (Keys.ENTER);\n else\n return pressKey (Keys.RETURN);\n }", "void redirectToEnterKey();", "public void keyPressed(KeyEvent e) {\n if(e.getKeyCode()==KeyEvent.VK_ENTER){\n\n }\n }", "public String enterPressed();", "public void actionPerformed(ActionEvent e) { \n enter();\n }", "public static void pressEnter(WebElement wb) {\n\t\tActions act = new Actions(Browser.Driver);\n\t\tact.sendKeys(Keys.ENTER).perform();\n\t\t\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "public static void pressEnterToContinue() {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Press Enter to continue...\");\n\t\tinput.nextLine();\n\t}", "@Override\n\t\t\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\t\tif (e.getKeyChar() == KeyEvent.VK_ENTER) getActionNewParticipant().actionPerformed(null);\n\t\t\t\t\t}", "private void clickEnter(){\n\t\tString commandInput = textInput.getText();\n\t\tString feedback;\n\n\t\tif (commandIsClear(commandInput)) {\n\t\t\tusedCommands.addFirst(commandInput);\n\t\t\tclearLinkedDisplay();\n\n\t\t} else {\n\t\t\tif (commandInput.trim().isEmpty()) {\n\t\t\t\tfeedback = \"Empty command\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tusedCommands.addFirst(commandInput);\n\t\t\t\t\tParser parser = new Parser(commandInput);\n\t\t\t\t\tTask currentTask = parser.parseInput();\n\t\t\t\t\t\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.EXIT) {\n\t\t\t\t\t\tWindow frame = findWindow(widgetPanel);\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t\tframe.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.HELP) {\n\t\t\t\t\t\tfeedback = currentTask.getHelpMessage();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfeedback = GUIAbstract.getLogic().executeTask(currentTask);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tfeedback = e.getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlinkedDisplay.displayFeedback(feedback);\n\t\t\tfor (TasksWidget widget : linkedOptionalDisplays) {\n\t\t\t\twidget.doActionOnClick();\n\t\t\t}\n\t\t}\n\t\tclearTextInput();\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent ev) {\n\t\tString command = ev.getActionCommand();\n\t\tif (command.equals(\"Enter\")) {\n\t\t\tshowResult();\n\t\n\t\t} else if (command.equals(\"Reset\")) {\n\t\t\treset();\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n \t Robot r;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tr = new Robot();\r\n\t\t\t\t int keyCode = KeyEvent.VK_ENTER; // the A key\r\n\t\t\t\t r.keyPress(keyCode);\t\t\t\t \r\n\t\t\t\t} catch (AWTException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public void onClick(ClickEvent event) {\r\n System.out.println(\"Submit Button geklickt\");\r\n handleEvent();\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER && e.isControlDown())\r\n\t\t\t\t{\r\n\t\t\t\t\tSend();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}", "public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfPreco.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }", "public void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER){\n\t\t\t\t\tsend(txtMessage.getText());\n\t\t\t\t}\n\t\t\t}", "private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField1KeyPressed\r\n int key = evt.getKeyCode();\r\n if (key == KeyEvent.VK_ENTER) {\r\n sendMessage(jTextField1.getText());\r\n }\r\n }", "void urlFieldEnterKeyPressed();", "public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif(e == null || e.getKeyCode()==KeyEvent.VK_ENTER){\r\n\t\t\t//System.out.println(\"keypressed: Enter\");\r\n\t\t\tif (!input.getText().equals(\"\")) {\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tquote[1] = Long.toString(System.currentTimeMillis());\r\n\t\t\t\tquote[0]=input.getText();\r\n\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t\tquote[0] = quote[0].trim();\r\n\t\t\t\taddText(\"> \"+quote[0]+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tmDispatcher.newInput(quote);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void handle(KeyEvent event) {\n\t\t\t\tif(event.getCode().equals(KeyCode.ENTER)){\n\t\t\t\t\tPlatform.runLater(()->{dodaj.fire(); sifra.requestFocus();});\n\t\t\t\t}\n\t\t\t}", "@Override\n public void keyPressed(KeyEvent ke) {\n if (ke.getSource().equals(frmMain.getMessageBox()) && ke.getKeyCode() == KeyEvent.VK_ENTER) {\n sendContent();\n }\n }", "public void actionPerformed(ActionEvent event) {\n sendData(event.getActionCommand());\n enterField.setText(\"\");\n }", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfNota.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\n\tvoid inputPass(KeyEvent event) {\n\t\tif (event.getCode().equals(KeyCode.ENTER))\n\t\t\tbtnLogin.fire();\n\t}", "public static void enterPressesWhenFocused(JButton button)\r\n\t{\t\t\r\n\t button.registerKeyboardAction(\r\n\t button.getActionForKeyStroke(\r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, false)), \r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), \r\n\t JComponent.WHEN_FOCUSED);\r\n\t \r\n\t button.registerKeyboardAction(\r\n\t button.getActionForKeyStroke(\r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, true)), \r\n\t KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, true), \r\n\t JComponent.WHEN_FOCUSED);\r\n\t}", "private void txt_montoKeyReleased(java.awt.event.KeyEvent evt) {\n if (evt.getKeyCode()==KeyEvent.VK_ENTER){\n insertarRubro();\n } \n }", "public String submitText();", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\r\n\t\t\t\tif (arg0.getKeyCode()==arg0.VK_ENTER) {\r\n\t\t\t\t\ttxtFornecedor.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\n\tprivate void onKeyReleased(KeyEvent e) {\n\t\tif (e.getCode() == KeyCode.ENTER)\n\t\t\tanswerQuestion();\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tsendData(event.getActionCommand());//调用sendData方法,响应操作。\t将信息发送给客户\r\n\t\t\t\tenterField.setText(\"\"); //将输入区域置空\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n\r\n if (identifier.intValue() == KeyEvent.VK_F3 || identifier.intValue() == KeyEvent.VK_ENTER) {\r\n btnSearch.doClick();\r\n }\r\n else if (identifier.intValue() == KeyEvent.VK_F12 || identifier.intValue() == KeyEvent.VK_ESCAPE) {\r\n btnCancel.doClick();\r\n }\r\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tif (e.getKeyCode()==e.VK_ENTER) {\r\n\t\t\t\t\ttfCNPJ.requestFocus();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER)\n\t\t{\n\t\t\t\n\t\t\tString info=\"服务器 对 客户端说: \"+jtf.getText();\n\t\t\tif(jtf.getText().equals(\"\"))\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"对不起,发送的内容不能为空...\");\n\t\t\t}else\n\t\t\t{\n\t\t\t\tjta.append(info+\"\\r\\n\");\n\t\t\t\tjta.setCaretPosition(jta.getText().length());\n\t\t\t\tif(jtf.getText().equals(\"bye\"))\n\t\t\t\t{\n\t\t\t\t\tinfo=new String(\"bye\");\n\t\t\t\t}\n\t\t\t\tjtf.setText(\"\");\n\t\t\t\tif(info.equals(\"bye\"))\n\t\t\t\t{\n\t\t\t\t\tint response=JOptionPane.showConfirmDialog(this,\"您确定要强行关闭客户端和服务器吗?\");\n\t\t\t\t\tif(response==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tms.SendMessage(info);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tms.SendMessage(info);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}", "private void jTAMsjKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTAMsjKeyPressed\n\n /*Si la tecla presiona fue enter entonces presiona el botón de enviar*/ \n if(evt.getKeyCode() == KeyEvent.VK_ENTER) \n jBEnvi.doClick();\n /*Else llama a la función escalable*/\n else \n vKeyPreEsc(evt);\n \n }", "public boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\t if (keyCode == KeyEvent.KEYCODE_ENTER && \n\t\t\t (event.getAction() == KeyEvent.ACTION_DOWN) || event.getAction() == KeyEvent.ACTION_MULTIPLE) {\n\t\t\t // Perform action on key press \n\t\t\t \tonSubmit();\n\t\t\t \treturn true;\n\t\t\t }\n\t\t\t return false;\n\t\t\t }", "@FXML\r\n void enterPressed(KeyEvent event) {\r\n if(event.getCode() == KeyCode.ENTER){//sprawdzenie czy wcisinieto enter\r\n connectSerialPort();//wywolanie wyzej zdefiniowanej metody - nawiaza polaczenie + otworzenie okna glownego aplikacji\r\n }\r\n }", "private void displaySubmitButton() {\n RegularButton submitButton = new RegularButton(\"SUBMIT\", 1000, 600);\n submitButton.setOnAction(e -> handleSubmit());\n\n sceneNodes.getChildren().add(submitButton);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\r\n public void keyReleased(KeyEvent e) {\n if(e.getKeyCode()==10){ //enter key code is 10\r\n // System.out.println(\"you have pressed enter button\");\r\n String contentToSend=messageInput.getText(); //type kia hua msg nikalna\r\n messageArea.append(\"Me :\"+contentToSend+\"\\n\");\r\n out.println(contentToSend); //msg ko send krna\r\n out.flush();\r\n messageInput.setText(\"\"); //clear hoker isme text ho jayga\r\n messageInput.requestFocus();\r\n }\r\n \r\n }", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "public void keyReleased(KeyEvent e) {\r\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER)\r\n\t\t\tverBtn.doClick();\r\n\t\tif(e.getKeyCode() == KeyEvent.VK_ESCAPE)\r\n\t\t\tcancelarBtn.doClick();\r\n\t}", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "@Override\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER && !inputText.getText().isEmpty()) {\n\t\t\tmsgLabel[9].setForeground(myFontColor);\n\t\t\tcommunication(myName + \": \" + inputText.getText());\n\t\t\tC.send(\"Message\", inputText.getText());\n\t\t\tinputText.setText(\"\");\n\t\t}\n\t}", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "@Step\r\n\tpublic void clickSubmit() {\r\n\t\tLOGGER.info(\"Clicking submit\");\r\n\t\tspeedoSubmit.click();\r\n\t}", "void actionButton ( ) throws IOException {\n String textOfField = this.gui.wdgInputText.getText();\n this.gui.widgOutput.append(\"Button1 \" + (++this.ctKeyStroke1) + \" time, text=\" + textOfField + \"\\n\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tSubmit();\n\t\t\t\tfinish(); \n\t\t\t}", "public void buttonClick(ClickEvent event) {\n fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));\n \n // close popup window\n close();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tObject source = e.getSource();\r\n\t\tif(source==button) {\r\n\t\t\tlabel.setText(\"You clicked the button\");\r\n\t\t} else {\r\n\t\t\tlabel.setText(\"You pressed Enter\");\r\n\t\t}\r\n\t\t\r\n\t}", "public void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER){\n\t\t\t\t\te.consume();\n\t\t\t\t\t KeyboardFocusManager.getCurrentKeyboardFocusManager().focusNextComponent();\n\t\t\t\t}\n\t\t\t}", "public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif (getAceptarKeyLikeTabKey()) {\r\n\t\t\tint key = e.getKeyCode();\r\n\t\t\tif (key == KeyEvent.VK_ENTER) {\r\n\t\t\t\ttransferFocus();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addEnterOverride(JTextArea textArea) {\r\n\t\ttextArea.getInputMap().put(KeyStroke.getKeyStroke(\"ENTER\"), \"Text Submit\");\r\n\t\ttextArea.getInputMap().put(KeyStroke.getKeyStroke(\"shift ENTER\"), \"insert-break\");\r\n\t\ttextArea.getActionMap().put(\"Text Submit\", new AbstractAction() {\r\n \t\t\tprivate static final long\tserialVersionUID\t= 1L;\r\n \t\t\t@Override\r\n \t\t\tpublic void actionPerformed(ActionEvent e) {\r\n \t\t\t\tsubmitText();\r\n \t\t\t}\r\n \t\t} );\r\n \t}", "public void submit_intsatpos(View button) {\n }", "public static void enterToContinue()\r\n\t{\r\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Press enter to continue the game : \");\r\n\t\tkeyboard.nextLine();\r\n\t}", "public TeamListPage pressReturnButton() {\n controls.getReturnButton().click();\n return new TeamListPage();\n }", "@Override\n public void keyPressed(KeyEvent e) {\n int key;\n key = e.getKeyCode();\n if(key == KeyEvent.VK_ENTER){\n if(e.getSource().toString().contains(\"Return\")){\n try{\n // System.out.println(\"walal\");\n if(\"\".equals(issueReturnView.getIssueId())){\n JOptionPane.showMessageDialog(issueReturnView, \"Please Select the Issued Item to be Return\");\n return;\n }\n // System.out.println(\"walal\"); \n if(issueReturnView.getReturnQuantity().trim().isEmpty()){\n JOptionPane.showMessageDialog(issueReturnView, \"Return Quantity Can be Zero.\");\n return;\n }\n // System.out.println(issueReturnView.getReturnQuantity());\n // System.out.println(\"walal\");\n if(Float.parseFloat(issueReturnView.getReturnQuantity())> Float.parseFloat(issueReturnView.getIssueQuantity())){\n JOptionPane.showMessageDialog(issueReturnView, \"Return Quantity is greater than Issued Quantity\");\n return;\n }\n // System.out.println(\"walal\");\n int choice;\n choice = JOptionPane.showConfirmDialog(issueReturnView, \"Do You Want to Return the Item\",\"Return Item\", JOptionPane.YES_NO_OPTION);\n if(choice == JOptionPane.YES_OPTION){\n issueReturnModel.IssueReturn(issueReturnView.getIssueReturnInfo());\n issueReturnView.clearAll();\n issueReturnView.enableReturnBtn();\n }\n }\n \n catch(Exception ee){\n JOptionPane.showMessageDialog(issueReturnView, ee+\"form IssueReturnListener\");\n }\n \n }\n if(e.getSource().toString().contains(\"Cancel\")){\n issueReturnView.clearAll(); \n issueReturnView.disableReturnBtn();\n }\n if(e.getSource().toString().contains(\"Search\")){\n String strsearch;\n String[] SearchBox = new String[7];\n boolean flag = false;\n int col =1;\n try{\n strsearch = issueReturnView.getSearch();\n for(int row = 0;row<issueReturnView.tblReturnList.getModel().getRowCount();row++){\n if(strsearch.equalsIgnoreCase(issueReturnView.tblReturnList.getValueAt(row, col).toString())||strsearch.equalsIgnoreCase(issueReturnView.tblReturnList.getValueAt(row, col-1).toString())){\n for(int scol = 0;scol<issueReturnView.tblReturnList.getModel().getColumnCount();scol++){\n SearchBox[scol] = issueReturnView.tblReturnList.getValueAt(row, scol).toString();\n }\n //inorer to scrooll over the tbale\n issueReturnView.tblReturnList.scrollRectToVisible(issueReturnView.tblReturnList.getCellRect(row, 0, true));\n // for focus\n issueReturnView.tblReturnList.setRowSelectionInterval(row, row);\n// issueReturnView.setIssueReturnInfo(SearchBox);\n// issueReturnView.setFieldEditableFalse();\n// Float UnitRelativeQuantity = issueReturnModel.getUnitRelativeQuantity(issueReturnModel.getUnitIdByIssueId(issueReturnView.getIssueId()));\n// issueReturnView.setStockQuantity(String.valueOf(issueReturnModel.getStockQuantityfromResturantStore(issueReturnView.getIssueId())/UnitRelativeQuantity));\n// issueReturnView.enableReturnBtn();\n flag = true;\n break;\n \n }\n }\n \n if(flag == false){\n JOptionPane.showMessageDialog(issueReturnView, \"Item Not Found.\");\n }\n \n }\n catch(Exception sere){\n JOptionPane.showMessageDialog(issueReturnView, sere+\"from search\");\n }\n }\n }\n }", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER )\n\t\t\t\tthis.convert();\n\t\t}", "public void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER ||e.getKeyCode() == KeyEvent.VK_DOWN){\n\t\t\tbtnConfirmOrNext.doClick();\n\t\t} else if(e.getKeyCode() == KeyEvent.VK_UP){\n\t\t\tbtnListenAgain.doClick();\n\t\t}\n\t}", "public Submit_Button()\n\t\t\t{\n\t\t\t\tsuper(\"Submit\");\n\n\t\t\t\taddActionListener(new ActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tloadText();\n\n\t\t\t\t\t\t// pass ssn input into patient instance to lookup tuple\n\t\t\t\t\t\tPatient p = new Patient(ssn);\n \n String result = p.search(selected_record_type);\n \n String[] values = result.split(\"\\n\");\n \n\t\t\t\t\t\t// create new instance of output panel to display result\n\t\t\t\t\t\tdisplayNewRecordOutput(new Patient_Record_Output(values));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "@Override\n public void keyPressed(KeyEvent e) {\n if (e.getSource().equals(txtMensaje)\n && e.getKeyCode() == KeyEvent.VK_ENTER\n && !txtMensaje.getText().trim().isEmpty()) {\n hiloCliente.enviarMensajeChat(txtMensaje.getText().trim());\n txtMensaje.setText(\"\");\n }\n }", "private final static void pulsaEnter() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\nPulsa Enter para continuar...\");\n\t\tkb.nextLine();\n\t}", "@Override\n\t\t\t\tpublic void handle(KeyEvent event) {\n\t\t\t\t\tif(event.getCode().equals(KeyCode.ENTER))\n\t\t\t\t\t\tPlatform.runLater(()->{dugme.fire();});\n\t\t\t\t}", "public void clickOnSubmitButton() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\twaitForVisibility(sbmnit);\n\t\tsbmnit.click();\n\t}", "@When(\"^Click's on Submit Button$\")\n\tpublic void click_s_on_Submit_Button() throws Throwable {\n\t\treviewPageObjects.clickonsubmit();\n\t}", "@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }", "public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}", "@FXML private void pwdKeyEntered(KeyEvent keyEvent) {\n pwdClick();\n if(keyEvent.getCode() == KeyCode.ENTER)\n buttonLoginClick();\n }", "@Override\r\npublic void keyReleased(KeyEvent e) {\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(true);\r\n\t}\r\n\t\r\n}", "public IButton getReturnButton() {\n return controls.getReturnButton();\n }", "public void textBoxSubmit() throws InterruptedException {\n\t\tdriver.get(\"http://www.google.com\");\n\t\tWebElement input = driver.findElement(By.name(\"q\"));\n\t\tinput.sendKeys(\"React\");\n\t\tThread.sleep(1000);\n\t\tinput.clear();\n\t\tThread.sleep(1000);\n\t\tinput.sendKeys(\"Angular\");\n\t\tThread.sleep(1000);\n\t\tinput.submit();\n\t}", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if ((event.getAction() == KeyEvent.ACTION_DOWN) &&\n (keyCode == KeyEvent.KEYCODE_ENTER)) {\n irMapa();\n return true;\n }\n return false;\n }", "private JButton createReturnButton() {\r\n exit = new JButton();\r\n exit.setBounds(215, 260, 100, 25);\r\n\r\n add(new SComponent(exit,\r\n new String[] {\"Schließen\", \"Close\"},\r\n new String[] {\"Schließt das Fenster.\",\r\n \"Closes the window.\"}));\r\n\r\n exit.addActionListener(new ActionListener() {\r\n\r\n /** Schliesst den Dialog\r\n *\r\n * @param e ActionEvent\r\n */\r\n public void actionPerformed(final ActionEvent e) {\r\n close();\r\n }\r\n });\r\n\r\n return exit;\r\n }", "public void commandListener(KeyEvent event) {\n\t\tKeyCode code = event.getCode();\n\t\tif(code == KeyCode.ENTER) {\n\t\t\tinputBar.setText((\"entered:\" + inputBar.getText()));\n\t\t}\n\t}", "@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\t\tcriterio = combo_campos.getSelectedIndex();\r\n\t\t\tparametro = getTf_busqueda().getText().toString();\r\n\t\t\t\r\n\t\t\tconstruirTabla(\"bus\");\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t// Check if input fields are filled in\n\t\t\ttoggleSearchButton();\n\t\t}", "@Then(\"user clicks submit button\")\n\tpublic void user_clicks_submit_button(){\n\t\t driver.findElement(By.name(\"sub\")).click();\n\t\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t}", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (event.getAction() == KeyEvent.ACTION_DOWN)\n if (keyCode == KeyEvent.KEYCODE_ENTER)\n {\n\n calculate();\n dismiss();\n return true;\n }\n return false;\n }", "@Override\r\n\t\t\tpublic void keyReleased(KeyEvent arg0)\r\n\t\t\t{\n\t\t\t\tif(arg0.getKeyCode() == KeyEvent.VK_ENTER)\r\n\t\t\t\t{\r\n\t\t\t\t\tverify(input.getText());\r\n\t\t\t\t\tinput.setText(\"\");\r\n\t\t\t\t}\r\n\t\t\t}", "public ReturnButton(String text) {\n super(text);\n this.addActionListener(this);\n }", "public void submitResponse(KeyEvent keyEvent) {\n if(response.getText().compareToIgnoreCase(\"exit\")==0){\n System.exit(0);\n }\n if(numQuestions >= currentQuestion){\n if(keyEvent.getCode() == KeyCode.ENTER){\n try{\n if(Integer.parseInt(response.getText()) == gen.getAnswer()){\n numRight++;\n }\n updateProgress();\n }catch(Exception e){\n updateProgress();\n }\n currentQuestion++;\n if(currentQuestion > numQuestions){\n DecimalFormat df = new DecimalFormat(\"##.##\");\n Question.setText(\"PROBLEMS FINISHED\\n\"\n + \"Percent Correct: \"\n + df.format((100.0*numRight)/((double)numQuestions))\n + \"%\");\n incorrect.setText(\"Type Exit to Close\");\n incorrect.setVisible(true);\n }else{\n setQuestion();\n }\n response.setText(\"\");\n }\n }\n }", "public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tlogger.info(\"click rootstage's submit button\");\n\n\t\t\t\tScreensContainer container = new ScreensContainer();\n\t\t\t\tcontainer.registerScreen(ID_SHOWPROBLEM, file_showproblem);\n\t\t\t\tcontainer.registerScreen(ID_SUBMITCODE, file_submitcode);\n\n\t\t\t\tStage dialogStage = new Stage();\n\t\t\t\tdialogStage.setTitle(\"在线提交\");\n\t\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\t\tdialogStage.initOwner(rootLayout.getScene().getWindow());\n\n\t\t\t\tScene scene = new Scene(container);\n\t\t\t\tdialogStage.setScene(scene);\n\t\t\t\tcontainer.setScreen(ID_SHOWPROBLEM);\n\n\t\t\t\tdialogStage.showAndWait();\n\n\t\t\t}", "@Click(R.id.ivReturn)\n\tvoid toReturn() {\n\t\tfinish();\n\t}", "private void pressAnyKey() {\n Scanner myScanner = new Scanner(System.in);\n System.out.println(\"Press Enter key to continue...\");\n myScanner.nextLine();\n }", "public WebElement SubmitBtn() {\n\t\treturn driver.findElement(Subbtn);\n\t}", "public static void triggerEnter(Component c) {\n\t\t// text components will not perform built-in actions if they are not focused\n\t\ttriggerFocusGained(c);\n\t\ttriggerActionKey(c, 0, KeyEvent.VK_ENTER);\n\t\twaitForSwing();\n\t}", "@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if(keyCode==KeyEvent.KEYCODE_ENTER) {\n layout.requestFocus();\n }\n return false;\n }" ]
[ "0.75666296", "0.720012", "0.71931994", "0.70692074", "0.7034464", "0.6902397", "0.6725001", "0.6719167", "0.66960245", "0.6692586", "0.66872275", "0.6668724", "0.66431063", "0.6540511", "0.6539943", "0.6537688", "0.6528186", "0.65204865", "0.6503248", "0.6473062", "0.64712924", "0.64688724", "0.6467556", "0.6437638", "0.6432015", "0.6431689", "0.6431173", "0.6430754", "0.6382432", "0.63718617", "0.6357518", "0.6336456", "0.6334418", "0.6321677", "0.6309724", "0.62433344", "0.621529", "0.618262", "0.6178513", "0.61638266", "0.6159059", "0.6148662", "0.6146981", "0.61386615", "0.61369133", "0.61331844", "0.6099678", "0.6080615", "0.60688263", "0.60455173", "0.6021613", "0.59995747", "0.5984206", "0.59828955", "0.5977377", "0.5976283", "0.59697765", "0.59533024", "0.59506327", "0.5939439", "0.5919045", "0.5917497", "0.58795786", "0.5869589", "0.58480006", "0.5844444", "0.5838092", "0.58367014", "0.5833538", "0.58301526", "0.58281475", "0.5822547", "0.5814729", "0.5800341", "0.5798773", "0.5791071", "0.5770788", "0.57651585", "0.5759272", "0.5748683", "0.5737025", "0.571796", "0.57163745", "0.57046473", "0.5682879", "0.56752884", "0.56639487", "0.56639487", "0.56593317", "0.56573105", "0.5656069", "0.5645939", "0.5642728", "0.5640232", "0.5637355", "0.56231886", "0.56215626", "0.5615406", "0.5612203", "0.56103253" ]
0.69163144
5
statisfying abstract class, but do nothing
public void keyReleased(KeyEvent e) {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void noabstractone() {\n\t\tSystem.out.println(\"No Abstract\");\n\t}", "public abstract void abstractone();", "abstract void method();", "@Override\n protected void checkSubclass() {\n }", "@Override\n\tvoid methodAbstractAndSubclassIsAbstract() {\n\t\t\n\t}", "public boolean isAbstract()\n/* */ {\n/* 146 */ return false;\n/* */ }", "public void doNothing(){\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "protected MyAbstractClass(){\n}", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@SuppressWarnings(\"PMD.EmptyMethodInAbstractClassShouldBeAbstract\")\n protected void prepareForSetAnswer() {\n // Default implementation does nothing.\n }", "_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }", "abstract public T doSomething();", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "abstract int pregnancy();", "@Override\r\n\tpublic boolean isAbstract() throws NotesApiException {\n\t\treturn false;\r\n\t}", "@Override\n public void matiz() {\n System.out.println(\"New not Abstract method\");\n }", "private abstract void privateabstract();", "protected void checkSubclass() {\n }", "public void setupAbstract() {\n \r\n }", "public abstract void Do();", "@Override\n protected void prot() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "public abstract void Disabled();", "protected abstract void switchOnCustom();", "@Override\n public boolean shouldSkipClass(Class<?> arg0) {\n return false;\n }", "@Override\n\tpublic void doStuff() {\n\t\tSystem.out.println(\"Do stuff in Abstract Car\");\n\t}", "public static void doNothing(){\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public abstract void afvuren();", "public abstract void abstractMethodToImplement();", "@SuppressWarnings(\"unused\")\n\tprivate AbstractCommand() {\n\t\t//\n\t}", "default boolean isSpecial() { return false; }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public boolean isAbstract();", "protected abstract void work();", "public abstract void mo102899a();", "@Override\n public void perish() {\n \n }", "public abstract void doSomething() throws Exception;", "public abstract void mh();", "protected void doSomethingElse()\r\n {\r\n \r\n }", "public abstract void mo70713b();", "public abstract void mo30696a();", "public abstract void MussBeDefined();", "public void setAbstract() {\r\n\t\tthis.isAbstract = true;\r\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "abstract void sub();", "public abstract void makeEmpty();", "public abstract void test();", "public abstract void test();", "public abstract void mo957b();", "protected void execute() {\n \t// literally still do nothing\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void abstractMethod() {\n\t\tSystem.out.println(\"I'm from the abstract method\");\r\n\t}", "public abstract void alimentarse();", "public abstract void comes();", "@Override\n\tpublic void setClassMissing() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "abstract public void run() throws Exception;", "public abstract void mo27386d();", "abstract void run() throws Exception;", "@Override\n\tpublic void some() {\n\t\t\n\t}", "public abstract void mo35054b();", "public AbstractT153()\n {\n }" ]
[ "0.6956503", "0.6713159", "0.6699587", "0.6679031", "0.6662252", "0.6648032", "0.6591954", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6534211", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6526571", "0.6525751", "0.6523782", "0.6523782", "0.6523782", "0.65039885", "0.65039885", "0.65039885", "0.64517826", "0.6451291", "0.63815093", "0.63658386", "0.6362", "0.62911516", "0.6281571", "0.6279065", "0.626321", "0.6261866", "0.62360275", "0.6234726", "0.622473", "0.622473", "0.622473", "0.62031597", "0.6171988", "0.6123376", "0.61188054", "0.6117538", "0.61017084", "0.6096202", "0.6095765", "0.60851085", "0.6074783", "0.60734963", "0.60677415", "0.6063424", "0.6061537", "0.60512996", "0.6050463", "0.6044529", "0.6040196", "0.60368764", "0.60358876", "0.6034547", "0.602059", "0.6017364", "0.5985232", "0.598319", "0.596504", "0.596504", "0.5954117", "0.5952538", "0.5945716", "0.5937382", "0.59271747", "0.5920889", "0.5916834", "0.58867073", "0.58813536", "0.5874756", "0.5857829", "0.58575755", "0.58544946", "0.5850273" ]
0.0
-1
Forge only uses a single save handler so we need to always pass overworld's mapstorage here
@Inject(method = "getMapStorage", at = @At("HEAD"), cancellable = true) public void onGetMapStorage(CallbackInfoReturnable<MapStorage> cir) { if (!this.isRemote && (this.mapStorage == null || this.provider.getDimension() != 0)) { WorldServer overworld = DimensionManager.getWorld(0); if (overworld != null) { cir.setReturnValue(overworld.getMapStorage()); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void saveMap() {\n\r\n\t}", "public void saveMap(){\n dataBase.updateMap(level);\n }", "public static void save()\n\t{\n writeMap();\n\t}", "public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }", "public void saveMap() {\n this.scanMap();\n String userHome = System.getProperty(\"user.home\");\n BinaryExporter export = BinaryExporter.getInstance();\n File file = new File(userHome + \"world.j3o\");\n try {\n export.save(this.testNode, file); \n } catch (IOException ex) {\n Logger.getLogger(mapDevAppState_2.class.getName()).log(Level.SEVERE, \"File write error\");\n }\n }", "public interface WorldSaver {\n void save(final String worldUID, final List<AbstractEntity> entities);\n}", "private void saveMap() {\r\n new Thread(() -> {\r\n try {\r\n FileOutputStream f = new FileOutputStream(this.save_file);\r\n ObjectOutputStream S = new ObjectOutputStream(f);\r\n S.writeObject(this.music_map);\r\n S.close();\r\n f.close();\r\n if (!this.save_file.setLastModified(this.music_root.lastModified())) {\r\n throw new IllegalStateException(\"Impossibile aggiornare il file dizionario\");\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }).start();\r\n }", "private void saveWorld() {\n try {\n jsonWriter.open();\n jsonWriter.write(world);\n jsonWriter.close();\n System.out.println(\"Saved world to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }", "public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}", "@Override\n public void onSaveInstanceState( @NonNull Bundle outState ) {\n super.onSaveInstanceState( outState );\n mMap.onSaveInstanceState( outState );\n }", "@Override\n\tpublic <S extends Map<String, Object>> S save(S arg0) {\n\t\treturn null;\n\t}", "public void saveState() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFile savefile = new File(getServletContext().getRealPath(\"/WEB-INF/\"), SAVED_RECEPTOR_FILE_NAME);\n\t\t\tfos = new FileOutputStream(savefile);\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(pgtMap);\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"IO Exception saving proxyTicket cache\");\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception e) { //don't think this is possible, but I'm seeing some goofy behavior, so...\n\t\t\tSystem.err.println(\"Non-IO Exception saving proxyTicket cache\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static boolean save(Map map, Player player) {\n\t\tnew File(\"save/\" + map.getName() + \"/chunk\").mkdirs();\n\t\t// Chunk\n\t\tfor (Entry<Vector2i, Chunk> e : map.getChunks().entrySet())\n\t\t\tif (!saveChunk(map.getName(), e.getValue()))\n\t\t\t\treturn false;\n\t\t// Setting\n\t\ttry (DataOutputStream dos = new DataOutputStream(\n\t\t\t\tnew FileOutputStream(new File(\"save/\" + map.getName() + \"/map.settings\")))) {\n\t\t\t// Player\n\t\t\tdos.writeFloat(player.getCamera().getPosition().x);\n\t\t\tdos.writeFloat(player.getCamera().getPosition().y);\n\t\t\tdos.writeFloat(player.getCamera().getPosition().z);\n\t\t\t// Chunk\n\t\t\tdos.writeInt(Chunk.SIZE);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\tSystem.out.println(\"[Info] Map \" + map.getName() + \" saved\");\n\t\treturn true;\n\t}", "public Save(Player player, String worldname) {\n\t\tthis(player.game, \"/saves/\" + worldname + \"/\");\r\n\t\t\r\n\t\twriteGame(\"Game\");\n\t\t//writePrefs(\"KeyPrefs\");\r\n\t\twriteWorld(\"Level\");\r\n\t\twritePlayer(\"Player\", player);\r\n\t\twriteInventory(\"Inventory\", player);\r\n\t\twriteEntities(\"Entities\");\r\n\t\t\r\n\t\tGame.notifications.add(\"World Saved!\");\r\n\t\tplayer.game.asTick = 0;\r\n\t\tplayer.game.saving = false;\r\n\t}", "public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}", "@Override\n public void onSaveInstanceState(Bundle arg0) {\n super.onSaveInstanceState(arg0);\n mMapView.onSaveInstanceState(arg0);\n }", "@SuppressWarnings(\"unchecked\")\r\n private void newMap() throws IOException, ClassNotFoundException {\r\n this.music_map.clear();\r\n if (needNewMap()) {\r\n if (!save_file.exists()) {\r\n System.out.println(\"DIZIONARIO NON PRESENTE\");\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n\r\n this.setTarget();\r\n\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n } else {\r\n System.out.println(\"DIZIONARIO NON AGGIORNATO\");\r\n if (!UtilFunctions.newDictionaryRequest(this.save_file, this.music_root)) {\r\n System.out.println(\"AGGIORNAMENTO DIZIONARIO RIFIUTATO\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n } else {\r\n System.out.println(\"CREAZIONE NUOVO DIZIONARIO IN CORSO...\");\r\n this.setTarget();\r\n this.recoursiveMapCreation(this.music_root);\r\n this.saveMap();\r\n }\r\n }\r\n } else {\r\n System.out.println(\"DIZIONARIO GIA' PRESENTE\");\r\n FileInputStream f = new FileInputStream(this.save_file);\r\n ObjectInputStream o = new ObjectInputStream(f);\r\n this.music_map.putAll((Map<String, String[]>) o.readObject());\r\n current.set(ProgressDialog.TOTAL.get());\r\n }\r\n }", "@Override\n public void onSaveInstanceState(Bundle outState) {\n if (mMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, mMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, mLastKnownLocation);\n super.onSaveInstanceState(outState);\n }\n }", "private void saveObjects() {\n\t\tgo.setMeteors(meteors);\n\t\tgo.setExplosions(explosions);\n\t\tgo.setTargets(targets);\n\t\tgo.setRockets(rockets);\n\t\tgo.setCrosses(crosses);\n\t\tgo.setEarth(earth);\n\t}", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n if (mMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, mMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, mLastKnownLocation);\n super.onSaveInstanceState(outState);\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n if (mMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, mMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, mLastKnownLocation);\n super.onSaveInstanceState(outState);\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n if (mMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, mMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, mLastKnownLocation);\n super.onSaveInstanceState(outState);\n }\n }", "public void setMap()\n {\n gameManager.setMap( savedFilesFrame.getCurrent_index() );\n }", "public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n mapView.onSaveInstanceState(outState);\n super.onSaveInstanceState(outState);\n }", "public boolean saveMap()\n {\n // This should probably write all the data to a temporary file, then copy it over the old one at the end\n try {\n \n StringBuffer\t\tbuf = new StringBuffer();\n FileWriter\t\t\tmapWriter;\n \n if (!file.canWrite())\n {\n ErrorHandler.displayError(\"Could not write to map file. Maybe it's locked.\", ErrorHandler.ERR_SAVE_FAIL);\n return false;\n }\n \n file.createNewFile();\n mapWriter = new FileWriter(file);\n \n // Write the size in x, y\n buf.append(map.getSizeX());\n buf.append(\" \");\n buf.append(map.getSizeY());\n buf.append(\"\\n\");\n \n // Write all of the data\n for (int y = 0; y < map.getSizeY(); y++)\n {\n for (int x = 0; x < map.getSizeX(); x++)\n {\n buf.append(MUXHex.terrainForId(map.getHexTerrain(x, y)));\n buf.append(map.getHexAbsoluteElevation(x, y));\n }\n \n buf.append(\"\\n\");\n }\n \n // Now write it to the file\n mapWriter.write(buf.toString());\n mapWriter.close();\n \n // Musta been okay...\n map.setChanged(false);\n \n // Change our name\n setTitle(file.getName() + sizeString());\n \n return true;\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not write data to map file:\\n\" + e, ErrorHandler.ERR_SAVE_FAIL);\n return false;\n }\n }", "@Override\n\tpublic <S extends Map<String, Object>> Iterable<S> save(Iterable<S> arg0) {\n\t\treturn null;\n\t}", "private void saveGame(){\n\t\t\n\t}", "public interface WorldMap {\n /**\n * This constant is used to define that a specific tile is empty.\n */\n int NO_TILE = 0;\n\n /**\n * The amount of tiles that are stored on the world map texture in height.\n */\n int WORLD_MAP_HEIGHT = 1024;\n\n /**\n * The amount of tiles that are stored on the world map texture in width.\n */\n int WORLD_MAP_WIDTH = 1024;\n\n /**\n * Get the origin location of the world map.\n *\n * @return the origin location\n */\n @Nonnull\n Location getMapOrigin();\n\n /**\n * Get the last reported location of the player.\n *\n * @return the player location\n */\n @Nonnull\n Location getPlayerLocation();\n\n /**\n * Get the texture of the world map.\n *\n * @return the world map texture\n */\n @Nonnull\n Texture getWorldMap();\n\n /**\n * Mark a tile as changed. The world map is supposed to update this tile at some later point.\n *\n * @param location the location of the tile that was changed\n */\n void setTileChanged(@Nonnull Location location);\n\n /**\n * Mark the entire map as changed. Once this is done the entire map needs to be updated.\n */\n void setMapChanged();\n\n /**\n * Set the location of the player on the map. This is used in some backend to prioritise the areas updated on the\n * world map.\n *\n * @param location the new location of the map\n */\n void setPlayerLocation(@Nonnull Location location);\n\n /**\n * Set the origin location of the world map. The map will expand starting from this point a specific amount of\n * tiles defined by {@link #WORLD_MAP_HEIGHT} and {@link #WORLD_MAP_WIDTH}.\n * <p/>\n * Changing the origin location automatically clears the map.\n *\n * @param location the new origin location of the map\n */\n void setMapOrigin(@Nonnull Location location);\n\n /**\n * This function causes all map data to be thrown away. The map turned empty.\n */\n void clear();\n\n /**\n * Render the changes to the world map. This does not render anything to the screen and it will not render\n * anything at all mostly. It will update the texture of the world map in case there are updates pending that\n * need to be applied.\n * <p/>\n * This function needs to be called during the render loop.\n *\n * @param container the container of the game\n */\n void render(@Nonnull GameContainer container);\n}", "@Override\n public void saveGame() {\n\n }", "public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}", "private void saveLocation()\n {\n willLocationBeSaved = !willLocationBeSaved;\n }", "@Override\n\tprotected void onSaveInstanceState(Bundle outState) {\n\t\tsuper.onSaveInstanceState(outState);\n\t\tif (mMapView != null)\n\t\t\tmMapView.onSaveInstanceState(outState);\n\t}", "public final void onSaveInstanceState(android.os.Bundle param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onSaveInstanceState(param0)\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onSaveInstanceState(param0);\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onSaveInstanceState(param0)\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onSaveInstanceState(param0);\n }\n }", "@Override\r\n\tpublic void onSave(Bundle outState) {\n\t}", "@Override\n public void save(Game game) {\n }", "private void saveToStorage() {\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(\"GeoFences\", Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(currentList);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "void saveStorage(StorageEntity storage);", "public void updateWorld(Location loc)\n {\n worldData = getPersistence().get(loc.getWorld().getName(), WorldData.class);\n }", "public void actionPerformed(ActionEvent e)\n {\n MapArchitect.save();\n }", "void doSaveAs() {\r\n\t\tMapOpenSaveDialog dlg = new MapOpenSaveDialog(true, labels, saveSettings);\r\n\t\tdlg.setLocationRelativeTo(this);\r\n\t\tdlg.setVisible(true);\r\n\t\tif (dlg.saveSettings != null) {\r\n\t\t\tsaveSettings = dlg.saveSettings;\r\n\t\t\tfinal String fn = dlg.saveSettings.fileName.getPath();\r\n\t\t\taddRecentEntry(fn);\r\n\t\t\tdoSave();\r\n\t\t}\r\n\t}", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n if (googleMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, googleMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, mLastKnownLocation);\n super.onSaveInstanceState(outState);\n }\n }", "protected void saveProjectSite() {\r\n\t\tlog.debug(\"saveing project site\");\r\n\r\n\t\ttry {\r\n\r\n\t\t\tLocation curLocation = new Location(LocationServiceFactory.getLocationService().getLocation()), lastLocation = site.getLastLocation();\r\n\r\n\t\t\tif (lastLocation == null || (curLocation.getX() != lastLocation.getX() && curLocation.getY() != lastLocation.getY())) {\r\n\t\t\t\tsite.setLastLocation(curLocation);\r\n\r\n\t\t\t\tDao<Location, Integer> locDao = databaseHelper.getDao(Location.class);\r\n\r\n\t\t\t\tif (lastLocation != null) {\r\n\t\t\t\t\t// delete old location\r\n\t\t\t\t\tlocDao.delete(lastLocation);\r\n\t\t\t\t}\r\n\t\t\t\t// and create new one\r\n\t\t\t\tlocDao.create(curLocation);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tfor (MultiTouchDrawable d : map.getSubDrawables()) {\r\n\r\n\t\t\t\tif (d instanceof AccessPointDrawable) {\r\n\t\t\t\t\tAccessPoint ap = ((AccessPointDrawable) d).getAccessPoint();\r\n\t\t\t\t\t// id is not 0, so this location was never saved\r\n\t\t\t\t\tif (!ap.isCalculated() && ap.getLocation() != null) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tdatabaseHelper.getDao(Location.class).create(ap.getLocation());\r\n\t\t\t\t\t\t\tdatabaseHelper.getDao(AccessPoint.class).update(ap);\r\n\t\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t\tlog.error(\"could not save location data for an ap: \" + ap.toString(), e);\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\r\n\t\t\tint changed = projectSiteDao.update(site);\r\n\r\n\t\t\tif (changed > 0) {\r\n\t\t\t\tToast.makeText(this, R.string.project_site_saved, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\r\n\t\t\tprojectSiteDao.refresh(site);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"could not save or refresh project site\", e);\r\n\t\t\tToast.makeText(this, R.string.project_site_save_failed, Toast.LENGTH_LONG).show();\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "@Override\n\tpublic void saveSettings() {\n\n\t}", "private void saveFunction() {\n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "public void saveMapping() {\n String userHome = System.getProperty(\"user.home\");\n String filePath = userHome + \"/\"+ System.currentTimeMillis() +\"-mapping.xml\";\n XMLExporter exporter = XMLExporter.getInstance();\n File file = new File(filePath);\n try {\n exporter.save(mappings, file);\n Logger.getLogger(MappingAppState.class.getName()).log(Level.INFO, \"Mapping saved as {0}\", filePath);\n } catch (IOException ex) {\n Logger.getLogger(MappingAppState.class.getName()).log(Level.SEVERE, \"Failed to save node!\", ex);\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n if (mMap != null) {\n outState.putParcelable(KEY_CAMERA_POSITION, mMap.getCameraPosition());\n outState.putParcelable(KEY_LOCATION, currentLocation);\n String KEY_TAB_INDEX = \"tab_index\";\n outState.putInt(KEY_TAB_INDEX, tabLayout.getSelectedTabPosition());\n super.onSaveInstanceState(outState);\n }\n }", "@Override\n public void Save() {\n\t \n }", "@Override\n\tprotected void saveTo(Map<String, Object> map) {\n\t\tmap.put(\"rootElemId\", rootElemId);\n\t}", "private void writeMapToFile() {\r\n\t\ttry {\r\n\t\t\tString dm = gson.toJson(daoMap);// gson.toJson(entity);\r\n\t\t\tFileWriter fileWriter = new FileWriter(path);\r\n\t\t\t\r\n\t\t\tfileWriter.write(dm);\r\n\t\t\tfileWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public OverworldMapScreen(Game game, Storage storage, GameScreen screen) {\n\t\tthis.game = game;\n this.storage = storage;\n this.screen = screen;\n inputProcessor = new OverworldMapInput(screen, storage, this);\n }", "private void saveMarkerPrefs(){\n String latLngsList = new Gson().toJson(latLngs);\n String namesList = new Gson().toJson(locationNames);\n dataStorage.setLatLngList(latLngsList);\n dataStorage.setLocNameList(namesList);\n }", "@Override\n public void save() {\n \n }", "public void loadSave(){\n if((new File(\"data.MBM\")).exists()){\n isNew = false;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"data.MBM\"));\n String line = br.readLine();\n \n while (line != null) {\n \n if(line.contains(\"outDir\")){\n String[] result = line.split(\":\");\n outputDir = new File(result[1]);\n if(outputDir.exists() == false){\n isNew = true;\n }\n }\n else if(line.contains(\"MBMWORLD\")){\n String[] result = line.split(\":\");\n //1 = filename\n //2 = world name\n //3 = path\n //4 = date\n addWorld(new File(result[3]), result[2]);\n worlds.get(numWorlds()-1).setLastBackup(result[4]);\n }\n \n line = br.readLine();\n }\n \n br.close();\n \n } catch(IOException e){\n System.out.println(e);\n }\n }\n }", "@Override\n protected void onSaveInstanceState(Bundle b) {\n // Preserve what's at the center of the map\n //\n // Get the GeoPoint that is at the center of the map\n GeoPoint currentPoint = mapView.getMapCenter();\n int latitude = currentPoint.getLatitudeE6(); // Get the map center's latitude\n int longitude = currentPoint.getLongitudeE6(); // Get the map center's longitude\n b.putInt(\"latitude\", latitude); // Save the latitude\n b.putInt(\"longitude\", longitude); // Save the longitude\n\n // Preserve the current map style\n b.putBoolean(\"currentMapInSatelliteView\", mapView.isSatellite());\n // Preserve the current zoom level\n b.putInt(\"currentZoomLevel\", mapView.getZoomLevel());\n\n // Preserve the overlays that are applied to the map\n //\n // Overlay mapping in overlayList: eat, sleep, study, havefun, eat_study_havefun, sleep_study, study_havefun\n boolean overlayList[] = {false, false, false, false, false, false, false};\n\n // Keep track of which overlays for student activities are currently on\n if (mapOverlays.contains(eatOverlay)) {\n overlayList[0] = true;\n }\n if (mapOverlays.contains(sleepOverlay)) {\n overlayList[1] = true;\n }\n if (mapOverlays.contains(studyOverlay)) {\n overlayList[2] = true;\n }\n if (mapOverlays.contains(havefunOverlay)) {\n overlayList[3] = true;\n }\n if (mapOverlays.contains(eat_study_havefun_multiOverlay)) {\n overlayList[4] = true;\n }\n if (mapOverlays.contains(sleep_study_multiOverlay)) {\n overlayList[5] = true;\n }\n if (mapOverlays.contains(study_havefun_multiOverlay)) {\n overlayList[6] = true;\n }\n\n // Save the state of the student activity overlays\n b.putBooleanArray(\"overlayList\", overlayList);\n\n super.onSaveInstanceState(b); // Required call to superclass for app lifecycle management\n }", "public void saveCameraPosition() {\n \t\tCameraPosition camera = mMap.getCameraPosition();\n \t\tSharedPreferences settings = context.getSharedPreferences(\"MAP\", 0);\n \t\tSharedPreferences.Editor editor = settings.edit();\n \t\teditor.putFloat(\"lat\", (float) camera.target.latitude);\n \t\teditor.putFloat(\"lng\", (float) camera.target.longitude);\n \t\teditor.putFloat(\"bea\", camera.bearing);\n \t\teditor.putFloat(\"tilt\", camera.tilt);\n \t\teditor.putFloat(\"zoom\", camera.zoom);\n \t\teditor.commit();\n \t}", "@Override\r\n\tpublic GameState save() {\n\t\treturn null;\r\n\t}", "public void save() {\t\n\t\n\t\n\t}", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "@Test\n public void ensure_transient_persistent_of_user() {\n gameMapRepository.save( map );\n\n // THEN\n // map persisted?\n assertDomain( map );\n }", "private void saveData() {\n }", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\r\n\tpublic void save() {\n\r\n\t}", "@Override\n public void save()\n {\n \n }", "@Override\n public void save() {\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Storage.map = googleMap;\n if(checkPermissions()){\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission. ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n if (Storage.map != null) {\n Storage.map.setMyLocationEnabled(true);\n }\n }\n }\n\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n android.location.Location loc = locationManager.getLastKnownLocation(locationManager\n .getBestProvider(criteria, false));\n if(loc != null){\n LatLng actualLoc = new LatLng(loc.getLatitude(),loc.getLongitude());\n Storage.addToArray(actualLoc);\n }\n else{\n Storage.path();\n }\n /* Storage.addToArray(santaCruz);\n Storage.addToArray(new LatLng(40,-120));\n if(l!=null) {\n Log.e(\"Real\", \" found location\" );\n Storage.addToArray(new LatLng(l.getLatitude(), l.getLongitude()));\n\n }*/\n // Add a marker in Santa Cruz and move the camera\n LatLng santaCruz = new LatLng(36.997213, -122.056893);\n Storage.map.addMarker(new MarkerOptions().position(santaCruz).title(\"Marker in Santa Cruz\"));\n Storage.map.moveCamera(CameraUpdateFactory.newLatLngZoom(santaCruz, 14.5f));\n Graphics.startDraw(Storage.map);\n Storage.recursiveBackgroundCheck = new RecursiveBackgroundCheck(locationManager,this);\n if(loc != null) {\n Storage.recursiveBackgroundCheck.execute(locationManager);\n }\n }", "public void saveMap(String name){\n\t\tString path = new File (\".\").getAbsolutePath();\n\t\t//System.out.println(path);\n\t\tObjectOutputStream outputStream=null;\n\t\t\n\t\tString fileName=path.concat(\"//Maps//\"+name+\".txt\");\n\t\tFile file = new File(fileName);\n\t\t\n\t\n\t\t\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream =new FileOutputStream(file);\n\t\t\toutputStream = new ObjectOutputStream(fileOutputStream);\n\t\t\n\t\t\toutputStream.writeInt(getWidth());\n\t\t\toutputStream.writeInt(getHeight());\n\t\t\t\n\t\t\tfor (Path p : temp){\n\t\t\t\toutputStream.writeInt(p.getPos());\n\t\t\t}\n\t\t\toutputStream.writeInt(-1);\n\t\t\t\n\t\t\toutputStream.flush();\n\t\t\toutputStream.close();\n\t\t\tsaveMapName(name);\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Problem opening the file \"+name+\".txt\");\n\t\t\t//e.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Problem with output to file \"+name+\".txt\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t\n\n\n\t}", "@Override\r\n\tpublic void exportMap() {\n\r\n\t}", "public void run() {\n\t\t\tif (model.getNumberOfChangesSinceLastSave() == changeState)\n\t\t\t\treturn;\n\t\t\tchangeState = model.getNumberOfChangesSinceLastSave();\n\t\t\tif (changeState == 0) {\n\t\t\t\t/* map was recently saved. */\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tcancel();\n\t\t\t\tEventQueue.invokeAndWait(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t/* Now, it is dirty, we save it. */\n\t\t\t\t\t\tFile tempFile;\n\t\t\t\t\t\tif (tempFileStack.size() >= numberOfFiles)\n\t\t\t\t\t\t\ttempFile = (File) tempFileStack.remove(0); // pop\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttempFile = File.createTempFile(\n\t\t\t\t\t\t\t\t\t\t\"FM_\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ ((model.toString() == null) ? \"unnamed\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: model.toString()),\n\t\t\t\t\t\t\t\t\t\tfreemind.main.FreeMindCommon.FREEMIND_FILE_EXTENSION,\n\t\t\t\t\t\t\t\t\t\tpathToStore);\n\t\t\t\t\t\t\t\tif (filesShouldBeDeletedAfterShutdown)\n\t\t\t\t\t\t\t\t\ttempFile.deleteOnExit();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\tfreemind.main.Resources.getInstance()\n\t\t\t\t\t\t\t\t\t\t.logException(e);\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\ttry {\n\t\t\t\t\t\t\tmodel.saveInternal(tempFile, true /* =internal call */);\n\t\t\t\t\t\t\tmodel.getFrame()\n\t\t\t\t\t\t\t\t\t.out(Resources\n\t\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t\t.format(\"automatically_save_message\",\n\t\t\t\t\t\t\t\t\t\t\t\t\tnew Object[] { tempFile\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString() }));\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tSystem.err\n\t\t\t\t\t\t\t\t\t.println(\"Error in automatic MindMapMapModel.save(): \"\n\t\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\tfreemind.main.Resources.getInstance().logException(\n\t\t\t\t\t\t\t\t\te);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttempFileStack.add(tempFile); // add at the back.\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tfreemind.main.Resources.getInstance().logException(e);\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tfreemind.main.Resources.getInstance().logException(e);\n\t\t\t}\n\t\t}", "public void saveFeatureMetadata();", "void saveGameState(File saveName);", "@Override\n\tpublic void saveLocal(ArrayList<Brick> bmBricks, ArrayList<Ball> balls, ArrayList<PowerUp> powUps,\n\t\t\tArrayList<Alien> aliens, Player p, Paddle pad, String username) {\n\t\t\n\t}", "public boolean saveMapAs(File newFile)\n {\n this.file = newFile;\n \n return saveMap();\n }", "public void save() {\n RegionOwn.saveRegionOwner(this);\n }", "@Override\r\n\tpublic void innerSave() {\n\r\n\t}", "@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}", "void loadOriginalGameState(String saveName, int level) throws IOException;", "public void saveGame();", "public void loadMap() {\n\n try {\n new File(this.mapName).mkdir();\n FileUtils.copyDirectory(\n new File(this.plugin.getDataFolder() + \"/maps/\" + this.mapName), new File(this.mapName));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n WorldCreator wc = new WorldCreator(this.mapName);\n World world = wc.createWorld();\n world.setAutoSave(false);\n world.setPVP(false);\n world.setDifficulty(Difficulty.PEACEFUL);\n world.setGameRuleValue(\"doDaylightCycle\", \"false\");\n world.setGameRuleValue(\"mobGriefing\", \"false\");\n world.setGameRuleValue(\"doMobSpawning\", \"false\");\n world.setGameRuleValue(\"doFireTick\", \"false\");\n world.setGameRuleValue(\"keepInventory\", \"true\");\n world.setGameRuleValue(\"commandBlockOutput\", \"false\");\n world.setSpawnFlags(false, false);\n\n try {\n final JsonParser parser = new JsonParser();\n final FileReader reader =\n new FileReader(this.plugin.getDataFolder() + \"/maps/\" + this.mapName + \"/config.json\");\n final JsonElement element = parser.parse(reader);\n this.map = JumpyJumpMap.fromJson(element.getAsJsonObject());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }", "public static void saveMapEditor(MapEditor editor, String fileName) throws PersistenceException {\n try {\n\n // setup: create a save file and a JAXB Marshaller for the class\n File saveFile = new File(fileName);\n JAXBContext editorContext = JAXBContext.newInstance(MapEditor.class);\n Marshaller editorMarshaller = editorContext.createMarshaller();\n editorMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n // convert the java object to XML\n editorMarshaller.marshal(editor, saveFile);\n\n } catch (JAXBException e) {\n throw new PersistenceException(\"Failed to save the MapEditor file. \\n\", e);\n }\n }", "@Override\n public void saveValues() {\n \n }", "public void saveScores() {\n\t\tPersistenceMap values = new PersistenceMap();\n\t\tList<Map<String,Object>> entries = new ArrayList<Map<String,Object>>();\n\t\tfor (HighscoreEntry entry : scores) {\n\t\t\tentries.add(entry.dump().getMap());\n\t\t}\n\t\t\n\t\tvalues.put(KEY_SCORES, entries);\n\t\t\n\t\ttry {\n\t\t\tFile file = Hello.getPlugin().getServer().getWorldContainer();\n\t\t\tFile worldFolder = new File(file, worldName);\n\t\t\tFile path = new File(worldFolder, PERSISTANCE_FILE);\n\t\t\tWriter writer = Files.newWriter(path, Charset.defaultCharset());\n\t\t\t\n\t\t\tYaml yaml = new Yaml(YamlSerializable.YAML_OPTIONS);\n\t\t\tyaml.dump(values.getMap(), writer);\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Override\n public void saveState(Bundle outBundle) {\n }", "public void save_profile_map(String ontologyId , HashMap<String, HashMap<String,String>> map ) {\n\t\ttry {\n\t\t\t\n\t\t\tprofile_materialized_map.put(ontologyId, map);\n\t\t recMan.commit();\n\t\t \n\t\t /** close record manager */\n\t\t // recMan.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 save() { \n /*\n * Iterate over registry to pull box values\n * Creating new IOLoader for instance \n */\n for(UUID id : giftRegistry.keySet()) {\n GiftBox box = giftRegistry.get(id);\n\n String sId = id.toString();\n IOLoader<SecretSanta> config = new IOLoader<SecretSanta>(SecretSanta._this(), sId + \".yml\", \"Gifts\");\n\n FileConfiguration fCon = config.getCustomConfig();\n fCon.createSection(\"SecretSanta\");\n fCon.set(\"SecretSanta\", box.getConfig());\n\n try{\n fCon.save(config.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: \" + sId + \".yml\");\n continue;\n }\n }\n //SecretSanta._this().logDebug(\"[GiftManager] Gift Registry save successful.\");\n\n IOLoader<SecretSanta> pairedConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PairedRegistry.yml\", \"Data\");\n FileConfiguration fPaired = pairedConfig.getCustomConfig();\n fPaired.createSection(\"paired\");\n fPaired.set(\"paired\", savePairs());\n\n try{\n fPaired.save(pairedConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PairedRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PairedRegistry.yml\");\n }\n\n IOLoader<SecretSanta> playerConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"PlayerRegistry.yml\", \"Data\");\n FileConfiguration fPlayer = playerConfig.getCustomConfig();\n fPlayer.createSection(\"registered\");\n fPlayer.set(\"registered\", savePlayers());\n\n try{\n fPlayer.save(playerConfig.getFile());\n //SecretSanta._this().logDebug(\"[GiftManager] PlayerRegistry.yml save successful.\");\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: PlayerRegistry.yml\");\n }\n\n IOLoader<SecretSanta> givenConfig = new IOLoader<SecretSanta>(SecretSanta._this(), \"GivenEmptyRegistry.yml\", \"Data\");\n FileConfiguration fGiven = givenConfig.getCustomConfig();\n fGiven.createSection(\"given\");\n fGiven.set(\"given\", saveGivens());\n\n try{\n fGiven.save(givenConfig.getFile());\n } catch(IOException ex) {\n SecretSanta._this().logSevere(\"[GiftManager] Failed to save: GivenEmptyRegistry.yml\");\n }\n\n SecretSanta._this().logDebug(\"[GiftManager] Saving complete.\");\n }", "protected abstract void doSave();", "public void save(){\n try{\n Date date = new Date();\n \n PrintWriter writer = new PrintWriter(\"data.MBM\", \"UTF-8\");\n \n writer.println(\"version:\"+MBMDriver.version);\n writer.println(\"numworlds:\" + worlds.size());\n writer.println(\"lastclosed:\" + date.toString());\n writer.println(\"outDir:\"+outputDir.toPath());\n \n for(int i = 0; i < worlds.size(); i++){\n \n writer.println(\"MBMWORLD:\"+worlds.get(i).getWorldFile().getName()+\":\"+worlds.get(i).getName()+\":\"+worlds.get(i).getWorldFile().toPath()+\":\"+worlds.get(i).getLastBackupDate());\n }\n \n writer.close();\n }catch(FileNotFoundException e){\n System.out.println(\"ERROR: Failed to Find File\");\n }catch(UnsupportedEncodingException e){\n System.out.println(\"ERROR: Unsupported Encoding Exception\");\n }\n }", "public interface Map {\n\n public void createMap(World world);\n public void destroyMap(World world);\n}", "@Override\n public void save(Iterable<? extends SideDishEntity> entities) {\n\n }", "public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }", "private void save() {\n var boolGrid = editor.getBoolGrid();\n //Generate a track grid from the bool frid\n var grid = Track.createFromBoolGrid(boolGrid);\n var valid = Track.isValidTrack(grid);\n if (!valid) {\n //fire an error event\n MessageBus.fire(new ErrorEvent(\"Invalid track\", \"\", 2));\n } else {\n //Save the track and pop back\n var generator = new TrackFromGridGenerator(grid);\n var track = generator.generateTrack();\n (new TrackStorageManager()).saveTrack(track);\n menu.navigationPop();\n menu.showError(new ErrorEvent(\"Saved track!\", \"\", 2, Colour.GREEN));\n }\n }", "void saveMap(Escenario esc,File f) throws Exception {\n\t\tthis.itfPersistenciaMRS.escenarioToXML(esc, f);\n\t}", "public void save() {\n if (worldOreConfig == null) {\n return;\n }\n\n final WorldOreConfig worldOreConfig;\n\n if (!(this.worldOreConfig instanceof ConfigurationSerializable)) {\n worldOreConfig = new WorldOreConfigYamlImpl(this.worldOreConfig.getName(), this.worldOreConfig.getConfigType(), this.worldOreConfig.getOreSettings(), this.worldOreConfig.getBiomeOreSettings());\n } else {\n worldOreConfig = this.worldOreConfig;\n }\n\n final Config config = new Config(file);\n\n config.set(\"value\", worldOreConfig);\n\n try {\n config.options().header(\"This file is machine generated, please use the in game commands and gui to change values. \\nModifying this file per hand on your own risk.\").copyHeader(true);\n config.save(file);\n } catch (final IOException e) {\n throw new RuntimeException(\"Unexpected error while saving WorldOreConfig \" + worldOreConfig.getName() + \" to disk!\", e);\n }\n }", "@Override\n\tpublic void savePlayerData(OutputStream arg0) {\n\n\t}" ]
[ "0.7360972", "0.71536386", "0.70222825", "0.68756175", "0.6875015", "0.6694882", "0.66211164", "0.6508909", "0.62497723", "0.61551666", "0.61174226", "0.61070406", "0.60969925", "0.60962665", "0.606317", "0.60544646", "0.6045686", "0.6003954", "0.5972994", "0.5970256", "0.5970256", "0.5970256", "0.59557647", "0.5952992", "0.59400296", "0.5934459", "0.5916692", "0.58779305", "0.5871721", "0.5871011", "0.58703876", "0.58222383", "0.5812459", "0.5803733", "0.57677966", "0.575807", "0.5745836", "0.5737432", "0.57365644", "0.57365644", "0.5734755", "0.5721607", "0.5718425", "0.57115436", "0.5710462", "0.57074594", "0.5696568", "0.5693299", "0.5679498", "0.56550163", "0.56550163", "0.5645169", "0.56427854", "0.56351966", "0.5627967", "0.56197196", "0.56061584", "0.56060654", "0.55988616", "0.5579889", "0.5572878", "0.5568533", "0.55644953", "0.5563772", "0.5559727", "0.55538356", "0.55487335", "0.55477947", "0.55477947", "0.55465204", "0.5531007", "0.55228835", "0.55222654", "0.5499585", "0.54958147", "0.5489276", "0.54885876", "0.545233", "0.5441959", "0.5436573", "0.5435855", "0.5435066", "0.5430541", "0.5427743", "0.5426374", "0.5423239", "0.5395462", "0.539542", "0.53903335", "0.53749853", "0.5368904", "0.53685695", "0.53594947", "0.53464", "0.53409886", "0.533946", "0.53272253", "0.53255457", "0.53231645", "0.5322983" ]
0.59088814
27
TODO Autogenerated method stub
@Override public Boolean validate(CiMiniServerForm f) { return null; }
{ "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
Creates a new operation.
public Operation(int maxLocals, String name) { this.maxLocals = maxLocals; this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Operation createOperation();", "Operation createOperation();", "Operations createOperations();", "IOperationable create(String operationType);", "public Command createOperationCommand(int operator, Operand operand1, Operand operand2);", "public Operation() {\n super();\n }", "public Operation() {\n /* empty */\n }", "@SuppressWarnings(\"unchecked\")\n\t\tpublic Operation createOperation(String opName, String[] params, OperationCallback caller) {\n\t\t\tthrow new RuntimeException(\"Method 'createOperation' in class 'DummyNode' not yet implemented!\");\n\t\t\t//return null;\n\t\t}", "public Operation() {\n\t}", "@Override\n\tpublic Operation createOperate() {\n\t\treturn new OperationDiv();\n\t}", "public Operation(){\n\t}", "OpFunction createOpFunction();", "OperationCallExp createOperationCallExp();", "public Operation createOperation(String symbol) throws InstantiationException, IllegalAccessException {\n checkForNull(symbol);\n\n if (map.containsKey(symbol)) {\n return (Operation) map.get(symbol).newInstance();\n } else {\n return null;\n }\n }", "Operacion createOperacion();", "public org.xmlsoap.schemas.wsdl.http.OperationType addNewOperation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.http.OperationType target = null;\n target = (org.xmlsoap.schemas.wsdl.http.OperationType)get_store().add_element_user(OPERATION$0);\n return target;\n }\n }", "protected ModelNode createOperation(String address, String operation, String... params) {\n ModelNode op = new ModelNode();\n String[] pathSegments = address.split(\"/\");\n ModelNode list = op.get(\"address\").setEmptyList();\n for (String segment : pathSegments) {\n String[] elements = segment.split(\"=\");\n list.add(elements[0], elements[1]);\n }\n op.get(\"operation\").set(operation);\n for (String param : params) {\n String[] elements = param.split(\"=\");\n op.get(elements[0]).set(elements[1]);\n }\n return op;\n }", "public Operation(OperationType type) {\n this.type = type;\n }", "OpList createOpList();", "Instruction createInstruction();", "public OperationFactory() {\n initMap();\n }", "BOperation createBOperation();", "public Operation(OperationType code) {\n\t\tthis.code = code;\n\t\tthis.timestamp = System.currentTimeMillis();\n\t}", "public Action createOperation(int choose) {\n if (choose==0) {\n action = new Addition();\n } else if (choose==1) {\n action = new Subtracting();\n } else if (choose==2) {\n action = new Multiplication();\n } else if (choose==3) {\n action = new Dividing();\n } else {\n action = null;\n }\n return action;\n }", "Command createCommand();", "VoidOperation createVoidOperation();", "OpFunctionArg createOpFunctionArg();", "UOp createUOp();", "OperationContinuation createOperationContinuation();", "Operation getOperation();", "public APIOperation()\n {\n super();\n }", "public interface IFactory {\n Operation CreateOperation();\n\n}", "public String getOperation() {\n if(isConstructor()) {\n return \"new\";\n }\n return getName();\n }", "Operand createOperand();", "public OperationStFactory(String input, String oper) {\r\n\t\tthis.inputList = u.toInputList(input);\r\n\t\tthis.operator = u.toCharList(oper);\r\n\t}", "public static ObjectInstance getAddOperationObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"name\", StringMangler\n .EncodeForJmx(getAddOperationMBean().getName()));\n properties.put(\"jmxType\", new Operation().getJmxType());\n o = new ObjectName(_domain, properties);\n\n }\n catch (Exception e)\n {\n Assert.fail(\"'Add' Operation ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new Operation().getClass().getName());\n }", "public GraphNode addOperation(String op){\n\t\tGraphNode opVar = new GraphNode(addElement(op, 3), 3);\n\t\tauthGraph.addVertex(opVar);\n\t\treturn opVar;\n\t}", "public void setOperation(String op) {this.operation = op;}", "private void addOp(Class op){\n try {\n //Create a new instance and add it to the list\n Operation operation = (Operation)op.newInstance();\n operations.put(operation.getTextualRepresentation(), operation);\n } catch (InstantiationException | IllegalAccessException ex) {\n Logger.getLogger(RPC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "void createRequest(EnumOperationType opType, IParameter parameter);", "public JButton makeOperatorButton(String op)\r\n {\r\n JButton button = new JButton(op); \r\n ActionListener listener = new OperatorButtonListener(op);\r\n button.addActionListener(listener); \r\n return button; \r\n }", "Operands createOperands();", "OperationDTO createOperation(ItemType sourceType, long sourceId, long targetId, String userVcnId) throws LockFailedException;", "OpFunctionArgOperand createOpFunctionArgOperand();", "public OpDesc() {\n\n }", "public static ObjectInstance getMultiplyToAddOperationCallObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 4);\n properties.put(\"sourceEndpoint\", StringMangler\n .EncodeForJmx(getMultiplyEndpointMBean().getUrl()));\n properties.put(\"sourceOperation\", getMultiplyOperationMBean()\n .getName());\n properties.put(\"targetEndpoint\", StringMangler\n .EncodeForJmx(getAddEndpointMBean().getUrl()));\n properties.put(\"targetOperation\", getAddOperationMBean().getName());\n properties.put(\"jmxType\", new OperationCall().getJmxType());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'Divide-Subtract' OperationCall ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new OperationCall().getClass().getName());\n }", "public static RegistryOperations createInstance(Configuration conf) {\n return createInstance(\"RegistryOperations\", conf);\n }", "public AddOperationAction(Classifier classifier, Operation operation) {\n super(\"Add operation\");\n Helper.checkNotNull(classifier, \"classifier\");\n Helper.checkNotNull(operation, \"operation\");\n this.classifier = classifier;\n this.operation = operation;\n }", "StringOperation createStringOperation();", "public static OperationMBean getAddOperationMBean()\n {\n return new Operation(\"add\");\n }", "<C, O> OperationCallExp<C, O> createOperationCallExp();", "OperacionColeccion createOperacionColeccion();", "public static OperationResponse builder() {\n\t\treturn new OperationResponse();\n\t}", "@PostMapping(consumes = MediaType.APPLICATION_JSON_VALUE, produces = \"application/hal+json\")\n @ApiOperation(value = \"Retrieves an existing operator entity identified by its id if it's available for the requesting entity.\", produces = \"application/hal+json\")\n @ApiResponses({@ApiResponse(code = 200, message = \"Success!\"),\n @ApiResponse(code = 409, message = \"Operator already exists!\")})\n public ResponseEntity<EntityModel<Operator>> create(\n @RequestHeader(\"X-MBP-Access-Request\") String accessRequestHeader,\n @ApiParam(value = \"Page parameters\", required = true) Pageable pageable,\n @RequestBody OperatorRequestDTO requestDTO) throws EntityAlreadyExistsException, EntityNotFoundException {\n Operator operator = (Operator) new Operator()\n .setName(requestDTO.getName())\n .setDataModel(requestDTO.getDataModelId() == null ? null : userEntityService.getForId(dataModelRepository, requestDTO.getDataModelId()))\n .setDescription(requestDTO.getDescription())\n .setParameters(requestDTO.getParameters())\n .setRoutines(requestDTO.getRoutines())\n .setUnit(requestDTO.getUnit())\n .setAccessControlPolicyIds(requestDTO.getAccessControlPolicyIds());\n\n //Replace bad line breaks of plain text operator files\n operator.replaceLineBreaks();\n\n // Save operator in the database\n Operator createdOperator = userEntityService.create(operatorRepository, operator);\n return ResponseEntity.ok(userEntityService.entityToEntityModel(createdOperator));\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private ExtendedOperations(){}", "public void setOperation (String Operation);", "public ShadowOperation createEmptyShadowOperation() {\n\t\treturn new ShadowOperation();\n\t}", "public static BinaryOperation Create(IConstraintExpression operand1,\n\t\t\tIConstraintExpression operand2, BinaryOperator operator) {\n\t\tif (BoolBinaryOperators.contains(operator)) {\n\t\t\treturn new BinaryBoolOperation(operand1, operand2, operator);\n\t\t} else {\n\t\t\treturn new BinaryNumericOperation(operand1, operand2, operator);\n\t\t}\n\t}", "POperand createPOperand();", "public FlatsyWorker(FlatsyOperator operation) {\n this.operation = operation;\n }", "Action createAction();", "Action createAction();", "Action createAction();", "Command createCommand() throws ServiceException, AuthException;", "InOper createInOper();", "private OperatorToken(final CharSequence symbol, final Precedence precedence, final Associativity associativity,\n final Multiplicity multiplicity, final Function<BigDecimal[], BigDecimal> operation) {\n super(symbol, multiplicity, operation);\n this.precedence = precedence;\n this.associativity = associativity;\n }", "Command createCommandWith(CommandCreator creator);", "public static Instruction create(byte opcode)\n {\n Instruction instruction = create(opcode, false);\n\n instruction.opcode = opcode;\n\n return instruction;\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithSku,\n DefinitionStages.WithOsType,\n DefinitionStages.WithHyperVGeneration,\n DefinitionStages.WithCreationData,\n DefinitionStages.WithDiskSizeGB,\n DefinitionStages.WithEncryptionSettingsCollection,\n DefinitionStages.WithIncremental,\n DefinitionStages.WithEncryption {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Snapshot create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Snapshot create(Context context);\n }", "@Override\n public SymmetricOpDescription build() {\n return new SymmetricOpDescription(operatorType, dataCodecClass, tasks, redFuncClass);\n }", "public void setOperation (String operation) {\n this.operation = operation;\n }", "public void setOperation (String operation) {\n this.operation = operation;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "public Long getCreateOpId() {\n return createOpId;\n }", "public Operation getOperation();", "public void create(){}", "interface WithCreate\n extends DefinitionStages.WithRepoUrl,\n DefinitionStages.WithBranch,\n DefinitionStages.WithFolderPath,\n DefinitionStages.WithAutoSync,\n DefinitionStages.WithPublishRunbook,\n DefinitionStages.WithSourceType,\n DefinitionStages.WithSecurityToken,\n DefinitionStages.WithDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n SourceControl create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n SourceControl create(Context context);\n }", "@RequestMapping(value = \"/operations\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<OperationDTO> create(@Valid @RequestBody OperationDTO operationDTO) throws URISyntaxException {\n log.debug(\"REST request to save Operation : {}\", operationDTO);\n // if (operationDTO.getName() != null) {\n // return ResponseEntity.badRequest().header(\"Failure\", \"A new operation cannot already have an ID\").body(null);\n // }\n Operation operation = operationMapper.operationDtoToOperation(operationDTO);\n Operation result = operationRepository.save(operation);\n return ResponseEntity.created(new URI(\"/api/operations/\" + result.getName()))\n .headers(HeaderUtil.createEntityCreationAlert(\"operation\", result.getName().toString()))\n .body(operationMapper.operationToOperationDto(result));\n }", "private Operation creator(Scope scope, Vector queue)\r\n {\r\n Operation root = null;\r\n Type t = new Type();\r\n\r\n if ((t.type = basicType()) != Keyword.NONESY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n Token x = nextToken;\r\n\r\n t.ident = new Token(nextToken);\r\n t.ident.string = x.string = qualident();\r\n unresolved.add(x.string);\r\n\r\n if (nextSymbol == Keyword.LBRACKETSY)\r\n {\r\n root = arrayCreatorRest(t, scope, queue);\r\n }\r\n else\r\n {\r\n root = classCreatorRest(x, scope, queue);\r\n }\r\n }\r\n\r\n return root;\r\n }", "public static DynamoOperation createAndGetInstance(Context context, int myAddress, int nodeCount, int replicationCount, int readQuorum, int writeQuorum){\n\t\tdynamoOperation = new DynamoOperation(context, myAddress, nodeCount, replicationCount, readQuorum, writeQuorum);\n\t\treturn dynamoOperation;\n\t}", "public interface Operation {\n}", "protected GenTreeOperation() {}", "public Operations() {\n history = new LinkedList<>();\n future = new LinkedList<>();\n }", "public OperationInfo addOperation(String name, Method method)\n {\n if ((name == null) || (name.length() == 0))\n {\n throw new IllegalArgumentException(\"Invalid name [\" + name + \"]\");\n }\n if (nameToOperation.containsKey(name))\n {\n throw new IllegalArgumentException(\"An operation with name [\" + name + \"] already exists in this service\");\n }\n \n OperationInfo operation = new OperationInfo(name, method, this);\n addOperation(operation);\n return operation;\n }", "interface WithCreate\n extends DefinitionStages.WithLocation,\n DefinitionStages.WithTags,\n DefinitionStages.WithKind,\n DefinitionStages.WithSku,\n DefinitionStages.WithIdentity,\n DefinitionStages.WithProperties {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Account create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Account create(Context context);\n }", "Operations operations();", "public static RegistryOperations createInstance(String name, Configuration conf) {\n Preconditions.checkArgument(conf != null, \"Null configuration\");\n RegistryOperationsClient operations =\n new RegistryOperationsClient(name);\n operations.init(conf);\n return operations;\n }", "Expression createExpression();", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> create(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.CreateSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMethod(), getCallOptions()), request);\n }", "public void setOperation(String operation) {\n this.operation = operation;\n }", "public void setOperation(String operation) {\n this.operation = operation;\n }", "Request _request(String operation);", "Counter registerOperation(Class<? extends Operation> operationType);", "public ExperimentsPlatformOperations(DSLContext create, boolean cacheEnabled, ExperimentOperations experimentOperations) {\n super(create, cacheEnabled);\n this.experimentOperations = experimentOperations;\n }", "@PostMapping(\"/operations\")\n @Timed\n public ResponseEntity<OperationDTO> createOperation(@Valid @RequestBody OperationDTO operationDTO) throws URISyntaxException {\n log.debug(\"REST request to save Operation : {}\", operationDTO);\n if (operationDTO.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new operation cannot already have an ID\")).body(null);\n }\n OperationDTO result = operationService.save(operationDTO);\n return ResponseEntity.created(new URI(\"/api/operations/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "private OperatorToken(final CharSequence symbol, final Precedence precedence, final Associativity associativity,\n final Function<BigDecimal[], BigDecimal> operation) {\n super(symbol, BINARY, operation);\n this.precedence = precedence;\n this.associativity = associativity;\n }", "public Command create(Object... param);", "Operator.Type getOperation();" ]
[ "0.85955054", "0.85955054", "0.76373124", "0.738777", "0.72509366", "0.7229837", "0.7156169", "0.706473", "0.6929162", "0.6893504", "0.68782717", "0.6818752", "0.66704154", "0.6655891", "0.66124004", "0.6594447", "0.6475579", "0.64327145", "0.6324789", "0.62806004", "0.6250398", "0.6210555", "0.6124557", "0.6120218", "0.6112642", "0.60843635", "0.60820204", "0.6081265", "0.60770637", "0.6031147", "0.60166407", "0.59991825", "0.5986081", "0.5981368", "0.5934137", "0.5905768", "0.5904667", "0.59013164", "0.58977056", "0.5893254", "0.5870248", "0.5851205", "0.58394766", "0.5836208", "0.5831969", "0.5804114", "0.578942", "0.578527", "0.5780596", "0.57674885", "0.57475847", "0.57430625", "0.57401806", "0.5737037", "0.57087237", "0.57008094", "0.56731945", "0.5655776", "0.5647941", "0.5647156", "0.56453913", "0.56382143", "0.56382143", "0.56382143", "0.56299865", "0.56165993", "0.5604119", "0.5602219", "0.560214", "0.55975443", "0.5595125", "0.5592271", "0.5589292", "0.5589292", "0.5582396", "0.5582396", "0.5582396", "0.55727696", "0.55702335", "0.5567167", "0.5562123", "0.5561069", "0.5548418", "0.5544732", "0.554367", "0.5528193", "0.55156183", "0.5512332", "0.55003804", "0.5497528", "0.5491125", "0.5477887", "0.54760104", "0.54760104", "0.54716593", "0.54632914", "0.54619145", "0.5460019", "0.5452743", "0.5439987", "0.5425437" ]
0.0
-1
Returns the line at the specified number.
public String resolveLineNumber(int l) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLine(int lineNumber) {\n if (list.size()>lineNumber)\n return list.get(lineNumber);\n else\n return null; // Requested line number outside range\n }", "public int getLine() {\n return lineNum;\n }", "public abstract String getLine(int lineNumber);", "public String getLineNumber() \n\t{\n\t\treturn getNumber().substring(9,13);\n\t}", "int getLineNumber();", "public int getLineNum() {\n\t\treturn lineNum;\n\t}", "public int getLineNumber();", "private String getLineAt(int linenum) {\n\t\ttry {\n\t\t\tint start = mainTextArea.getLineStartOffset(linenum);\n\t\t\tint end = mainTextArea.getLineEndOffset(linenum);\n\t\t\treturn mainTextArea.getText(start, end - start);\n\t\t} catch (BadLocationException e) {\n\t\t\treturn (\"\");\n\t\t}\n\t}", "public int getLine() {\n\t\treturn line;\n\t}", "public int getLine() {\r\n\t\treturn line;\r\n\t}", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public int line_of(int index) throws Exception {\r\n\t\tif (index < 0 || index >= text.length()) {\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + index);\r\n\t\t} else {\r\n\t\t\t// binary-search\r\n\t\t\tint s = 0, e = line_index.size();\r\n\t\t\twhile (s < e) {\r\n\t\t\t\tint m = (s + e) / 2;\r\n\t\t\t\tint head = line_index.get(m);\r\n\t\t\t\tint tail;\r\n\t\t\t\ttail = line_index.get(m + 1);\r\n\r\n\t\t\t\tif (index >= tail)\r\n\t\t\t\t\ts = m + 1;\r\n\t\t\t\telse if (index < head)\r\n\t\t\t\t\te = m;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn m + 1;\r\n\t\t\t}\r\n\r\n\t\t\t// No target is found, this is impossible.\r\n\t\t\tthrow new RuntimeException(\"Internal error: no line is found for \" + index);\r\n\t\t}\r\n\t}", "public Number getLineNumber() {\n return (Number)getAttributeInternal(LINENUMBER);\n }", "public int getLine() {\n return line;\n }", "public String getSourceLine (int line);", "public int getLine() {\r\n return line;\r\n }", "public int getLine() {\n return line;\n }", "public int getLineNumber()\r\n {\r\n return lineNum;\r\n }", "public int getLineNo();", "public static int getLine() {\r\n\t\treturn rline;\r\n\t}", "private String getLine(final int index) {\n Element elem = TextUtils.getParagraphElement(document, index);\n if (elem == null) {\n return null;\n }\n int start = elem.getStartOffset();\n int length = elem.getEndOffset() - start;\n String result = null;\n try {\n result = document.getText(start, length);\n } catch (final BadLocationException e) {\n }\n return result;\n }", "public int lineNum() {\n return myLineNum;\n }", "public int getLineNr() {\n return this.lineNr;\n }", "String getLine (int line);", "public final int getLineNumber()\n {\n return _lineNumber + 1;\n }", "public int getLineNumber() {\n return line;\n }", "public int getLineNumber(){\n\t\treturn lineNumber;\n\t}", "public int getLineNum() {\n\t\treturn (parser == null) ? 0 : parser.getCurrentLocation().getLineNr();\n\t}", "public int getLineNumber() {\n return lineNumber; \n }", "public int getLineNumber() {\n return lineNumber;\n }", "public int getLineNumber(String key) {\n\t\t\treturn lineNumbers.get(key);\n\t\t}", "private int getLineNumber() {\n int line = 0;\n if (_locator != null)\n line = _locator.getLineNumber();\n return line;\n }", "public Integer getLineNumber() {\r\n return this.lineNumber;\r\n }", "public int getLineNumber() {\n return lineNumber;\n }", "public int getLineNumber() {\n return line;\n }", "public Integer getLineNumber() {\n return lineNumber;\n }", "public int getLineNumber() {\n return lineNumber;\n }", "public int getLineNo()\n\t{\n\t\treturn getIntColumn(OFF_LINE_NO, LEN_LINE_NO);\n\t}", "public int getRecordLineNumber();", "public int getLineOffset(int lineIndex) {\n if(lineIndex < 0) {\n throw new IllegalArgumentException(\"Negative line index\");\n }\n if(lineIndex > lines.length) {\n throw new IllegalArgumentException(String.format(\"Line index %s > number of lines %s\", lineIndex, lines.length));\n }\n return lines[lineIndex];\n }", "public int getLineNumber() {\n\t\treturn lineNumber;\n\t}", "public int getLineNumber() {\n\t\treturn lineNumber;\n\t}", "public int line() {\r\n return line;\r\n }", "public int getLine() {return _line;}", "@Nullable\n public Diff.Line getLineInHunk(int hunkIdx, int lineOfHunk) {\n AtomicLong out = new AtomicLong();\n int e = jniGetLineInHunk(out, getRawPointer(), hunkIdx, lineOfHunk);\n if (ENOTFOUND.getCode() == e) {\n return null;\n }\n Error.throwIfNeeded(e);\n return new Diff.Line(out.get());\n }", "public final int getLine() {\n/* 377 */ return this.bufline[this.bufpos];\n/* */ }", "public String getLine1Number() {\n String line1Number = \"\";\n try {\n line1Number = Settings.Secure.getString(mContext.getContentResolver(), \"Line1Number\");\n if (line1Number == null) {\n line1Number = \"\";\n }\n } catch (Exception e) {\n line1Number = \"\";\n System.out.println(\"in or out strean exception\");\n }\n return line1Number;\n }", "public int lineNum() {\n return myId.lineNum();\n }", "public Number getLineId() {\n return (Number) getAttributeInternal(LINEID);\n }", "public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }", "public Number getLineId() {\n return (Number)getAttributeInternal(LINEID);\n }", "public String getLineContent(int lineNumber) {\n return lines.get(lineNumber-1).getContent();\n }", "public String getLine(int line) {\n if (line > 14)\n return null;\n if (line < 0)\n return null;\n return getOrCreateTeam(line).getValue();\n }", "public int getLinePosition(int line) {\n\t\treturn linePositions.get(line);\n\t}", "int getLineOffset(int line) throws BadLocationException;", "int getStartLineNumber();", "public String readLine(int i) {\n\t\tString line = new String(\"\");\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\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (eof) {\n\t\t\t\t\tthrow new IllegalArgumentException(\"Line \" + i +\n\t\t\t\t\t\t\" is not found in the file \" +\n\t\t\t\t\t\tfile.getName() + \".\");\n\t\t\t\t}\n\t\t\t\tb.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\teof = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tline = b.readLine();\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\treturn line;\n\t}", "int getLineOfOffset(int offset) throws BadLocationException;", "int getAfterLineNumber();", "public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }", "private int findLineOffset(int line) {\n if (line == 1) {\n return 0;\n }\n if (line > 1 && line <= lineOffsets.size()) {\n return lineOffsets.get(line - 2);\n }\n return -1;\n }", "@Override\n public PurchaseOrderLine getOrderLine(int index) {\n return orderLines.get(index);\n }", "public int getLineNumber()\n {\n return parser.getLineNumber();\n }", "public int getLine();", "public int getLine();", "public int getLine();", "public int getLineID()\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(LINEID$2, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public int getSourceLine(int pos) {\n unpack();\n int l = 0, r = line_number_table_length - 1;\n if (// array is empty\n r < 0)\n return -1;\n int min_index = -1, min = -1;\n /* Do a binary search since the array is ordered.\n */\n do {\n int i = (l + r) / 2;\n int j = line_number_table[i].getStartPC();\n if (j == pos)\n return line_number_table[i].getLineNumber();\n else if (// else constrain search area\n pos < j)\n r = i - 1;\n else\n // pos > j\n l = i + 1;\n /* If exact match can't be found (which is the most common case)\n * return the line number that corresponds to the greatest index less\n * than pos.\n */\n if (j < pos && j > min) {\n min = j;\n min_index = i;\n }\n } while (l <= r);\n /* It's possible that we did not find any valid entry for the bytecode\n * offset we were looking for.\n */\n if (min_index < 0)\n return -1;\n return line_number_table[min_index].getLineNumber();\n }", "public void setLineNumber(Number value) {\n setAttributeInternal(LINENUMBER, value);\n }", "public int getLineNumber()\n {\n // LineNumberReader counts lines from 0. So add 1\n\n return lineNumberReader.getLineNumber() + 1;\n }", "private int getSelectedLine(HttpServletRequest request) {\n int selectedLine = -1;\n String parameterName = (String) request.getAttribute(KRADConstants.METHOD_TO_CALL_ATTRIBUTE);\n if (StringUtils.isNotBlank(parameterName)) {\n String lineNumber = StringUtils.substringBetween(parameterName, \".line\", \".\");\n selectedLine = Integer.parseInt(lineNumber);\n }\n\n return selectedLine;\n }", "public int getLine() { \n\t// * JFlex starts in zero\n\treturn yyline+1;\n}", "public void setLineNumber(Integer lineNumber) {\r\n this.lineNumber = lineNumber;\r\n }", "public void setLineNumber(int lineNumber) {\n this.lineNumber = lineNumber;\n }", "public int getCurrentLine() {\n return buffer.lineNumber();\n }", "public int getLinePosition() {\n return linePosition;\n }", "public void setLineNumber(Integer lineNumber) {\n this.lineNumber = lineNumber;\n }", "public Line getLine(String targetLine);", "public void setLineNo (int LineNo);", "public String getLine() {\n return this.line;\n }", "void setLineNumber(int lineNumber) {}", "org.tensorflow.proto.profiler.XLine getLines(int index);", "@Override\n public int getLine() {\n return mySourcePosition.getLineNumber() - 1;\n }", "public int index_of(int line) throws IndexOutOfBoundsException {\r\n\t\tif (line <= 0 || line >= line_index.size())\r\n\t\t\tthrow new IndexOutOfBoundsException(\r\n\t\t\t\t\t\"Invalid line: \" + line + \" (expected within \" + line_index.size() + \")\");\r\n\t\telse\r\n\t\t\treturn line_index.get(line - 1);\r\n\t}", "private int getLineIndexAtLocation(Point point) {\n final int maxLineIndex = splitLines.size() - 1;\n int lineIndex = (point.y - getInsets().top) / getLineHeight();\n if (lineIndex > maxLineIndex) {\n point.x = Integer.MAX_VALUE;\n }\n lineIndex = Math.max(0, Math.min(maxLineIndex, lineIndex));\n return lineIndex;\n }", "public static Integer getLine(String line){\n\t\ttry{\n\t\t\tScanner scanner = new Scanner(new File(ramProgram));\n\t\t\tInteger numberLine = 1;\n\t\t\twhile (scanner.hasNext()){\n\t\t\t\tif (scanner.nextLine().trim().equals(line)){\n\t\t\t\t\tscanner.close();\n\t\t\t\t\treturn numberLine;\n\t\t\t\t}\n\t\t\t\tnumberLine++;\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public int getLineNumber() {\n\t\treturn _parser.getLineNumber();\n\t}", "public int getDecoratedLine (Node node);", "public static int getLineNumber() {\n return Thread.currentThread().getStackTrace()[2].getLineNumber();\n }", "public String getLine ()\n {\n return line;\n }", "public Row getRow (int line) {\n return rowCache.get(line);\n }", "public String getLineText(int lineNumber) {\n getLock().getReadLock();\n try {\n int start = getLineStartOffset(lineNumber);\n int end = getLineEndOffsetBeforeTerminator(lineNumber);\n return (start == end) ? \"\" : getTextBuffer().subSequence(start, end).toString();\n } finally {\n getLock().relinquishReadLock();\n }\n }", "private static int findLineOffset(StyledDocument doc, int lineNumber) {\n int offset;\n try {\n offset = NbDocument.findLineOffset (doc, lineNumber - 1);\n int offset2 = NbDocument.findLineOffset (doc, lineNumber);\n try {\n String lineStr = doc.getText(offset, offset2 - offset);\n for (int i = 0; i < lineStr.length(); i++) {\n if (!Character.isWhitespace(lineStr.charAt(i))) {\n offset += i;\n break;\n }\n }\n } catch (BadLocationException ex) {\n // ignore\n }\n } catch (IndexOutOfBoundsException ioobex) {\n return -1;\n }\n return offset;\n }", "public int getLine() { return cl; }", "public String getLine() {\n\t\treturn line.toString();\n\t}", "public void setLineNum(int nLineNum){\n\t\tlineNumber = nLineNum;\n\t}", "private int getNextLine() {\n return peekToken().location.start.line;\n }", "public int getLineNumber() {\n\t\t\treturn startLineNumber;\n\t\t}", "public int getLineToStart() {\r\n\t\treturn this.lineToStart;\r\n\t}", "protected final int getLineNumber(HttpServletRequest request) {\n int lineNumber = 0;\n String lineStr = request.getParameter(LINE_NUMBER);\n if (lineStr == null) {\n lineNumber = getSelectedLine(request);\n } else {\n try {\n lineNumber = Integer.parseInt(lineStr);\n } catch (Exception ex) {\n // do nothing; 0 will be returned\n }\n }\n return lineNumber;\n }" ]
[ "0.7495594", "0.716491", "0.7016704", "0.69691926", "0.6846907", "0.68322235", "0.68286604", "0.68229806", "0.6748261", "0.67435277", "0.67210364", "0.6714573", "0.6683066", "0.6669633", "0.66651803", "0.6665062", "0.6659817", "0.66453934", "0.6628841", "0.65741086", "0.6564603", "0.6527416", "0.6524471", "0.6514526", "0.64905745", "0.64834553", "0.6482193", "0.6475307", "0.64714164", "0.6463955", "0.6441208", "0.64384294", "0.6413924", "0.6409059", "0.6397644", "0.63901067", "0.63633186", "0.6329131", "0.6320011", "0.6313332", "0.6286176", "0.6286176", "0.6285733", "0.62790716", "0.62686807", "0.622094", "0.6220001", "0.618618", "0.61848634", "0.6151791", "0.6151791", "0.61371195", "0.61262035", "0.61221826", "0.6110887", "0.61011875", "0.60829633", "0.60827893", "0.6071007", "0.605144", "0.60498494", "0.6044876", "0.60130763", "0.6002378", "0.6002378", "0.6002378", "0.59960604", "0.5996049", "0.5994406", "0.59883213", "0.5964964", "0.5963806", "0.5959561", "0.5943912", "0.5942068", "0.5939438", "0.5916568", "0.5902287", "0.5893693", "0.5881409", "0.5880092", "0.5870948", "0.5865805", "0.5832496", "0.5827603", "0.5819613", "0.58106184", "0.5801673", "0.5794191", "0.57937086", "0.57903385", "0.57830757", "0.5774112", "0.577394", "0.57493514", "0.57479906", "0.5741938", "0.5721346", "0.5701502", "0.5690345" ]
0.5738244
97
Resolves a variable name by its slot number and its index.
public String resolveVariableName(int slot, int l) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Variable getVariable(String name);", "Symbol resolve(String name);", "public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }", "Variable resolve(String name) {\n Scope scope = this;\n while (scope != null) {\n if (scope.variables.containsKey(name)) {\n return scope.variables.get(name);\n }\n scope = scope.parent;\n }\n throw new IllegalArgumentException(\"Unresolved variable: \" + name);\n }", "public Variable findVariable(String shortName) {\n if (shortName == null)\n return null;\n return memberHash.get(shortName);\n }", "String getVarName(String name);", "final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }", "public Variable addVar(String n) {\n\t\t//System.out.println(\"SymbolTable addVar \" + n);\n\t\tNameSSA ssa = name.get(n);\n\t\tif (ssa != null) {\n\t\t\tVariable lastRenaming = var.get(ssa.current());\n\t\t\tssa.next();\n\t\t\tVariable v;\n\t\t\tif (lastRenaming instanceof ArrayVariable)\n\t\t\t\tv= new ArrayVariable(ssa.current(), lastRenaming.type, ((ArrayVariable)lastRenaming).length(),lastRenaming.use);\n\t\t\telse\n\t\t\t\tv= new Variable(ssa.current(), lastRenaming.type, lastRenaming.use);\n\t\t\tv.setOld(lastRenaming.oldValue());\n\t\t\tvar.put(ssa.current(), v);\n\t\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\t\tSystem.out.println(\"SymbolTable.addVar: \" + v.name());\n\t\t\t}\n\t\t\treturn v;\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\t\t\n\t}", "public IVariable getVariable(int index) {\n return null;\n }", "public int indexVar(Node node) {\n Expr ee = getFilter().getExp();\n String name = node.getLabel();\n for (int i = 0; i < 2; i++) {\n if (ee.getExp(i).type() == ExprType.VARIABLE\n && ee.getExp(i).getLabel().equals(name)) {\n return i;\n }\n }\n return -1;\n }", "public LlvmValue visit(Formal n){\n\t\n\t\tSystem.out.format(\"formal**********\\n\");\n\t\t\n\t\tStringBuilder name = new StringBuilder();\n\t\t\n\t\tname.append(\"%\");\n\t\tname.append(n.name.s);\n\t\t\n\t\t//variable -> %name, com tipo n.type\n\t\tLlvmNamedValue variable = new LlvmNamedValue(name.toString(), (LlvmType)n.type.accept(this));\n\t\t\n\t\treturn variable;\t\t\n\t}", "private Integer varOffset( String defun, String varname ) {\n\treturn symbolTable.get( defun ).get( varname );\n }", "private Symbol.VariableSymbol varSymFromString(String name, String type) {\n Symbol.TypeSymbol typeSymbol = TypeUtils.typeFromStr(type);\n return new Symbol.VariableSymbol(name, typeSymbol);\n }", "public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }", "public String getAsSlot(int i);", "public Variable getVariableContaining(int offset);", "private static int isVariable(ArrayList<Variable> vars, String name) {\n\t\tfor (int i = 0; i < vars.size(); i++) {\n\t\t\tif (vars.get(i).name.equals(name)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "VarRef lookupField(String fieldUse);", "@Override\n\tpublic Symbol resolveMember(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// don't look in the enclosing scope for this one\n\t\t\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "private String[] parseVariableModName(String aName) {\n String[] lNameArray = new String[2];\n int lBeginIndex = aName.lastIndexOf('(');\n if (lBeginIndex > 0) {\n int lEndIndex = aName.lastIndexOf(')');\n lNameArray[0] = aName.substring(0, (lBeginIndex));\n lNameArray[1] = aName.substring(lBeginIndex + 1, lEndIndex);\n } else {\n lNameArray[0] = aName;\n lNameArray[1] = null;\n }\n return lNameArray;\n }", "public Variable get(String rootName, int ssaNum) {\n\t\treturn var.get(rootName + \"_\" + ssaNum);\n\t}", "public IntegerVariable getIntegerVariable(String name) {\n return integerVariableMap.get(name);\n }", "public static Variable variable( String name )\n {\n NullArgumentException.validateNotNull( \"Variable name\", name );\n return new Variable( name );\n }", "public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }", "public Integer lookupVariable(final String variableName) {\n if (isLocalVariable(variableName)) {\n return this.variables.get(variableName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupVariable(variableName);\n } else {\n throw new InterpreterException(\"Variable \" + variableName + \" is not defined.\");\n }\n }\n }", "public String getName(int idx) {\n\t\treturn (String) nvPairs.get(idx << 1);\n\t}", "@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}", "public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }", "public final Variable rename(InputSyntax.Variable var) {\n\tassert var != null;\n\n\tVariable result = _map.get(var);\n\n\tif (result == null) \n\t{\n\t // New variable, has not been mapped yet.\n\t result = _freshVariableBank.reserveVariable();\n\t _map.put(var,result);\n\t};\n\n\treturn result;\n }", "protected String getRequiredVariable(Node node, int idx, String argumentName)\n {\n String var = getRequiredLiteral(node, idx, argumentName);\n return var == null ? null : var.substring(1);\n }", "static int varno(String v) {\n int i=0;\n if (varlist==null) {System.out.println(\"Varlist null\");}\n while (i<varlist.size() && !v.equals( ((Variable)(varlist.get(i))).ident)) {i++;}\n if (i==varlist.size()) {i=-1;}\n return i;\n }", "public Variable getVariable(int i) {\r\n\t\treturn getVariables().get(i);\r\n\t}", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "String getVariable();", "private Token getNextVariableName() {\n StringBuilder sb = new StringBuilder();\n\n while (currentIndex < this.data.length) {\n char currChar = this.data[currentIndex];\n\n if (Character.isLetterOrDigit(currChar) || currChar == '_') {\n sb.append(currChar);\n currentIndex++;\n } else {\n break;\n }\n }\n\n return new Token(TokenType.VARIABLE, sb.toString());\n }", "private int findValue(String v, String[] names, int[] values, int dflt) {\n if (v == null) {\n return dflt;\n }\n v = v.toLowerCase();\n for (int fidx = 0; fidx < names.length; fidx++) {\n if (v.equals(names[fidx])) {\n return values[fidx];\n }\n }\n\n return dflt;\n\n }", "private static String resolveVariables(String nodeValue, Collection<String> variableChain) {\n\n String resolved = nodeValue;\n Matcher varNameMatcher = varNamePattern.matcher(nodeValue);\n\n Collection<String> variablesToResolve = new HashSet<String> ();\n\n while (varNameMatcher.find()) {\n String varName = varNameMatcher.group(1);\n if (variableChain != null && variableChain.contains(varName)) {\n // Found recursive reference when resolving variables. Log message and return null.\n log.debug(\"Found a recursive variable reference when resolving ${\" + varName + \"}\");\n return null;\n } else {\n variablesToResolve.add(varName);\n }\n }\n\n for (String nextVariable : variablesToResolve) {\n String value = getPropertyValue(nextVariable);\n\n if (value != null && !value.isEmpty()) {\n Collection<String> thisVariableChain = new HashSet<String> ();\n thisVariableChain.add(nextVariable);\n\n if (variableChain != null && !variableChain.isEmpty()) {\n thisVariableChain.addAll(variableChain);\n }\n\n String resolvedValue = resolveVariables(value, thisVariableChain);\n\n if (resolvedValue != null) {\n resolved = resolved.replaceAll(\"\\\\$\\\\{\" + nextVariable + \"\\\\}\", resolvedValue);\n } else {\n // Variable value could not be resolved. Log message and return null.\n log.debug(\"Could not resolve the value \" + value + \" for variable ${\" + nextVariable + \"}\");\n return null;\n }\n } else {\n // Variable could not be resolved. Log message and return null.\n log.debug(\"Variable \" + nextVariable + \" cannot be resolved.\");\n return null;\n }\n }\n\n return resolved;\n }", "private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }", "org.tribuo.protos.core.VariableInfoProto getInfo(int index);", "public IVariable getInternalVariable(String name) {\n return fInternalVariables.get(name);\n }", "String getVarName();", "String getVarName();", "String getVarName();", "public static Code renameVariables(Code e, int freeVariable) {\n\t\tHashSet<Integer> globals = new HashSet<Integer>();\n\t\tglobals.add(freeVariable-1);\n\t\treturn renameVariables(e, new HashMap<Integer, Integer>(),\n\t\t\t\tnew HashSet<Integer>(globals));\n\t}", "Index getIndex(String symbol);", "public Value( String inName, Variable inVar, int inIndex )\n {\n _var = inVar;\n _name = inName;\n _index = inIndex;\n }", "public E lookup(String var) throws IOException {\n E exp = get(var);\n if (exp != null) {\n return get(var);\n } else {\n throw new IOException(\"Exception ( VarID = \" + var + \") : Le VarId n'a pas été défini\");\n }\n }", "public String name(int pos) {\n if (0 <= pos && pos < parts.length) {\n return parts[pos];\n } else {\n return null;\n }\n }", "public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}", "R visitFreeVariable(Formula f, String name);", "public String getParameterName(int index) {\n List<? extends VariableElement> parameters = executable.getParameters();\n String name = parameters.get(index).getSimpleName().toString();\n return name;\n }", "public Object resolve(String var) throws ErrorException { \n\t\treturn null;\n\t}", "private String getVar(String s)\n {\n String var = null;\n Pattern pattern = Pattern.compile(\"[A-Z]+[a-z]*\");\n Matcher matcher = pattern.matcher(s);\n if(matcher.find())\n {\n var = matcher.group(0);\n }\n return var;\n }", "public String getVariable(String _name) {\r\n\t\treturn getVariable(_name, \",\");\r\n\t}", "public String getVariable();", "Aliasing getVariable();", "public void setName(int idx, String name) {\n\t\tnvPairs.set(idx << 1, name);\n\t}", "public IDecisionVariable getNestedVariable(String slotName) {\r\n IDecisionVariable result = null;\r\n if (parent instanceof CompoundVariable) {\r\n result = ((CompoundVariable) parent).getNestedVariable(slotName);\r\n } else {\r\n Value tmp = Configuration.dereference(conf, value);\r\n if (tmp instanceof CompoundValue) { // not available for Container\r\n CompoundValue cValue = (CompoundValue) tmp;\r\n Compound type = (Compound) cValue.getType();\r\n DecisionVariableDeclaration slotDecl = type.getElement(slotName);\r\n if (null != slotDecl) {\r\n Value slotValue = cValue.getNestedValue(slotName);\r\n if (!Reference.TYPE.isAssignableFrom(slotDecl.getType())) { // don't dereference references\r\n slotValue = Configuration.dereference(conf, slotValue);\r\n }\r\n LocalDecisionVariable var = new LocalDecisionVariable(slotDecl, conf, null);\r\n if (null != slotValue) {\r\n try {\r\n var.setValue(slotValue, AssignmentState.ASSIGNED);\r\n } catch (ConfigurationException e) {\r\n }\r\n }\r\n result = var;\r\n }\r\n } \r\n }\r\n return result;\r\n }", "public abstract int getBindingVariable();", "private static int getVar(int initInd, String var)throws Exception{\n int num;\n int perInd;\n char addMode;\n String[] inst;\n\n try{//tries to retrieve relative field\n num = Integer.parseInt(var);\n }catch(Exception e){//if not relative then seperates the address mode\n addMode = var.charAt(0);\n num = Integer.parseInt(var.substring(1, var.length()));\n perInd = (initInd + num) % coreSize; //this makes sure that the index wraps around without being a negative number\n inst = sepInst(core[perInd]); //this is used if addMode is indirect\n\n switch(addMode){\n\n case '*':\n num = num + getVar(perInd, inst[1]);\n break;\n\n case '@':\n if(inst[2] == null){\n num = num + getVar(perInd, inst[1]);\n }else{\n num = num + getVar(perInd, inst[2]);\n }//end ifelse\n break;\n\n default:\n break;\n }//end switch\n }//end try\n\n return num;\n }", "public static Expression var(String var) {\n if (var.equals(\"e\")) {\n throw new RuntimeException(\"Variable can't be named e.\");\n }\n\n return new Variable(var);\n }", "public static Slot getSlotByName(String inp_slot, ArrayList<Slot> slots) {\n\t\tfor (Slot s : slots){\n\t\t\tif (s.slotName.equalsIgnoreCase(inp_slot)){\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public CodeFragment visitBlockVarDec(AlangParser.BlockVarDecContext ctx) {\n String name = ctx.ID().getText();\n\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n int arity = ctx.index_to_array().size();\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n String reg = this.generateNewRegister(false);\n\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n v.setArity(arity);\n this.vars.get(this.scope).put(name, v);\n\n CodeFragment result = new CodeFragment();\n result.setRegister(reg);\n if (llvmvartype.equals(Types.LLVMZNAK))\n result.setCharRegister();\n\n if (arity > 0) {\n /* alloca n-dimensional array[a1]...[an] on stack with size a1*a2*...*an */\n v.setLocalArray();\n String prevreg = this.generateNewRegister(false);\n String newreg;\n result.addCode(String.format(\"%s = add i32 0, 1\\n\", prevreg));\n for (int i = 0; i < arity; i++) {\n CodeFragment exp = visit(ctx.index_to_array(i).expression());\n result.addCode(exp);\n v.addLevelReg(exp.getRegister());\n\n newreg = this.generateNewRegister(false);\n result.addCode(String.format(\"%s = mul i32 %s, %s\\n\", newreg, prevreg, exp.getRegister()));\n prevreg = newreg;\n }\n result.addCode(String.format(\"%s = alloca %s, i32 %s\\n\", reg, llvmvartype, prevreg));\n return result;\n }\n\n return this.generateNewDeclaration(reg, v.getLLVMDeclareType());\n }", "protected int indexFromName(String name) {\n for (int index = 0; index < values.length; index++) {\n if (getNames()[index] == name) {\n return index;\n }\n }\n return -1;\n }", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }", "public void testLocalVarDefResolve() throws Exception {\n BashVarDef varDef = assertIsValidVarDef();\n Assert.assertTrue(BashPsiUtils.findNextVarDefFunctionDefScope(varDef) != null);\n Assert.assertNull(varDef.getReference().resolve());\n }", "public final EObject ruleSlot() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n Token otherlv_1=null;\n\n\n \tenterRule();\n\n try {\n // InternalStl.g:1449:2: ( ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( ( ruleQualifiedName ) ) ) )\n // InternalStl.g:1450:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( ( ruleQualifiedName ) ) )\n {\n // InternalStl.g:1450:2: ( ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( ( ruleQualifiedName ) ) )\n // InternalStl.g:1451:3: ( (lv_name_0_0= RULE_ID ) ) otherlv_1= ':' ( ( ruleQualifiedName ) )\n {\n // InternalStl.g:1451:3: ( (lv_name_0_0= RULE_ID ) )\n // InternalStl.g:1452:4: (lv_name_0_0= RULE_ID )\n {\n // InternalStl.g:1452:4: (lv_name_0_0= RULE_ID )\n // InternalStl.g:1453:5: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_22); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewLeafNode(lv_name_0_0, grammarAccess.getSlotAccess().getNameIDTerminalRuleCall_0_0());\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getSlotRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n }\n\n }\n\n\n }\n\n otherlv_1=(Token)match(input,31,FOLLOW_3); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getSlotAccess().getColonKeyword_1());\n \t\t\n }\n // InternalStl.g:1473:3: ( ( ruleQualifiedName ) )\n // InternalStl.g:1474:4: ( ruleQualifiedName )\n {\n // InternalStl.g:1474:4: ( ruleQualifiedName )\n // InternalStl.g:1475:5: ruleQualifiedName\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getSlotRule());\n \t\t\t\t\t}\n \t\t\t\t\n }\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tnewCompositeNode(grammarAccess.getSlotAccess().getRequiredTypeItemTypeCrossReference_2_0());\n \t\t\t\t\n }\n pushFollow(FOLLOW_2);\n ruleQualifiedName();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}", "public Variable(String name){\n this.name = name;\n }", "public interface VariableExpander {\n /**\n * Return the input string with any variables replaced by their\n * corresponding value. If there are no variables in the string,\n * then the input parameter is returned unaltered.\n */\n public String expand(String param);\n }", "private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }", "public IExpressionValue getUserDefinedVariable(String key);", "DirectVariableResolver getVariableResolver();", "private Variable getVariable(String varName){\r\n\t\tif(contains(varName)){\r\n\t\t\treturn scopeVariables.get(varName);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private boolean isVariable(String refWord){\n\t\tif(refWord.charAt(0) == 'i' && Character.isDigit(refWord.charAt(1)))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public double getVariable(String nam) {\r\n Double val=variables.get(nam);\r\n\r\n return (val==null ? 0 : val.doubleValue());\r\n }", "@Override\n\tpublic IType resolve(MarkerList markers, IContext context, TypePosition position)\n\t{\n\t\tIType t = resolvePrimitive(this.name);\n\t\tif (t != null)\n\t\t{\n\t\t\treturn t;\n\t\t}\n\t\t\n\t\tIType type = IContext.resolveType(context, this.name);\n\t\tif (type == null)\n\t\t{\n\t\t\tmarkers.add(this.position, \"resolve.type\", this.toString());\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tif (type.typeTag() == TYPE_VAR_TYPE)\n\t\t{\n\t\t\tswitch (position)\n\t\t\t{\n\t\t\tcase CLASS:\n\t\t\tcase TYPE:\n\t\t\t\tmarkers.add(this.position, \"type.class.typevar\");\n\t\t\t\tbreak;\n\t\t\tcase SUPER_TYPE:\n\t\t\t\tmarkers.add(this.position, \"type.super.typevar\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn type;\n\t}", "public final V inferVar(final V state, final int idx, final I v, final IRNode src) {\n return newPair(state.first(), lattice2.inferVar(state.second(), idx, v, src));\n }", "public void assign (String name, int value){\n Closure exist = find_var(name);\n exist.getValues().put(name, new IntegerValue(value));\n }", "public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }", "private Variable findParamByName(String paramName) {\n for (Variable var : this.variablesToUse) {\n if (paramName.equals(var.getName())) {\n return var;\n }\n }\n return null;\n }", "public int integerVarAt(int index) {\n\t\treturn storage[index];\n\t}", "Node getVariable();", "public VariableItem SearchVariable(String variableName) {\n\t\tfor(VariableItem variable : variableItem)\n\t\t{\n\t\t\tif(variable.name==variableName)\n\t\t\t\treturn variable;\n\t\t}\n\t\treturn null;\n\t}", "public VariableNode(String name) {\n\t\tthis.name = name;\n\t}", "public int getVariable(String variable) {\n switch(variable) {\n case \"_HP\" : return (getAiOwner().getGameStats().getHp().getIntValue() * 100) / getAiOwner().getGameStats().getHp().getIntMaxValue();\n case \"_MyBodyHeight\": return getAiOwner().getTemplate().getBodyHeight();\n case \"CharIDValue\" : return getAiOwner().getTemplate().getCreatureId();\n }\n return _variables.get(variable);\n }", "public final EObject ruleIterationVariable() throws RecognitionException {\n EObject current = null;\n\n Token lv_name_0_0=null;\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5497:6: ( ( (lv_name_0_0= RULE_ID ) ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5498:1: ( (lv_name_0_0= RULE_ID ) )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5498:1: ( (lv_name_0_0= RULE_ID ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5499:1: (lv_name_0_0= RULE_ID )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5499:1: (lv_name_0_0= RULE_ID )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:5500:3: lv_name_0_0= RULE_ID\n {\n lv_name_0_0=(Token)input.LT(1);\n match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleIterationVariable9594); \n\n \t\t\tcreateLeafNode(grammarAccess.getIterationVariableAccess().getNameIDTerminalRuleCall_0(), \"name\"); \n \t\t\n\n \t if (current==null) {\n \t current = factory.create(grammarAccess.getIterationVariableRule().getType().getClassifier());\n \t associateNodeWithAstElement(currentNode, current);\n \t }\n \t try {\n \t \t\tset(\n \t \t\t\tcurrent, \n \t \t\t\t\"name\",\n \t \t\tlv_name_0_0, \n \t \t\t\"ID\", \n \t \t\tlastConsumedNode);\n \t } catch (ValueConverterException vce) {\n \t\t\t\thandleValueConverterException(vce);\n \t }\n \t \n\n }\n\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "private String resolveLabel(String aLabel){\n\t\t// Pre-condition\n\t\tif(aLabel == null) return aLabel;\n\t\t// Main code\n\t\tif (aLabel == \"univ\") return null;\n\t\tString actualName = aLabel.contains(\"this/\")?aLabel.substring(\"this/\".length()):aLabel;\n\t\treturn actualName;\n\t}", "public static Code renameVariables(Code e) {\n\t\treturn renameVariables(e, new HashMap<Integer, Integer>(),\n\t\t\t\tnew HashSet<Integer>());\n\t}", "private ELOperandToken readVarToken() {\r\n \t\tfState = STATE_VAR;\r\n \t\tint endOfToken = index;\r\n \t\tint ch;\r\n \t\tint type = ELOperandToken.EL_PROPERTY_NAME_TOKEN;\r\n \t\twhile((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isJavaIdentifierPart(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t\t\t}\r\n \t\t}\r\n \t\treleaseChar();\r\n \t\treturn (endOfToken - index > 0 ? new ELOperandToken(index, endOfToken - index, getCharSequence(index, endOfToken - index), type) : ELOperandToken.EOF);\r\n \t}", "Resolvable<String> getKey(int index);", "public ResultVariableNameRenamer(String oldVariableName, String newVariableName) {\n\t\t\tsuper();\n\t\t\tthis.oldVariableName = oldVariableName;\n\t\t\tthis.newVariableName = newVariableName;\n\t\t}", "public StructuredQName getVariableQName();", "public void onParaNameChangeByVar(int i) {\n }", "private CompletionItem populateVariableDefCompletionItem(SymbolInfo symbolInfo) {\n CompletionItem completionItem = new CompletionItem();\n completionItem.setLabel(symbolInfo.getSymbolName());\n String[] delimiterSeparatedTokens = (symbolInfo.getSymbolName()).split(\"\\\\.\");\n completionItem.setInsertText(delimiterSeparatedTokens[delimiterSeparatedTokens.length - 1]);\n String typeName = symbolInfo.getScopeEntry().symbol.type.toString();\n completionItem.setDetail((typeName.equals(\"\")) ? ItemResolverConstants.NONE : typeName);\n\n completionItem.setSortText(Priority.PRIORITY7.name());\n completionItem.setKind(CompletionItemKind.Unit);\n\n return completionItem;\n }", "IIndexFragmentBinding findBinding(IASTName astName) throws CoreException;", "String getIdentifierName(String name, String type);", "@Override\n public SymbolicName getSymbolicName() {\n return new SymbolicName(StandardNames.XSL_VARIABLE, variableQName);\n }", "public static int vars(int varCount, Node n) {\n for (int i = 0; i < n.tokens.size(); i++) {\n if (n.tokens.get(i).tokenID == Token.TokenID.IDENT_tk) {\n if (varCount > 0) {\n int k = find(n.tokens.get(i).instanc);\n if (k == -1) {\n //do nothing\n } else {\n support.error(\"This variable has already been defined: \" + n.tokens.get(i).instanc);\n }\n }\n push(n.tokens.get(i));\n varCount++;\n }\n\n }\n if (n.child1 != null) {\n varCount = +vars(varCount, n.child1);\n }\n\n return varCount;\n }" ]
[ "0.6456083", "0.64372575", "0.6225728", "0.61061627", "0.59931165", "0.5978255", "0.59638447", "0.574638", "0.56211615", "0.5614652", "0.5608587", "0.55949014", "0.5578441", "0.5569954", "0.55681455", "0.5538755", "0.5534204", "0.5513483", "0.5499342", "0.549473", "0.5480161", "0.5456024", "0.54407066", "0.5431554", "0.5417606", "0.5378965", "0.5366591", "0.53623325", "0.5358028", "0.5334199", "0.53203136", "0.5238435", "0.52258354", "0.5224464", "0.5221603", "0.52070737", "0.5194216", "0.5183471", "0.51778483", "0.5169566", "0.5163232", "0.5163232", "0.5163232", "0.51560473", "0.51404005", "0.5136701", "0.51357484", "0.5134493", "0.51342416", "0.512342", "0.50872463", "0.5077972", "0.504318", "0.5037876", "0.50292486", "0.5015668", "0.50096107", "0.5007294", "0.5001762", "0.4989562", "0.4987704", "0.49861002", "0.49845874", "0.49586636", "0.49491727", "0.49475014", "0.49391693", "0.49225706", "0.4916971", "0.49051952", "0.4903091", "0.4896067", "0.48927245", "0.48920527", "0.4889827", "0.48866406", "0.4884428", "0.48742932", "0.48713765", "0.48694992", "0.48666248", "0.4860039", "0.48590475", "0.48318315", "0.48296812", "0.48164955", "0.48148414", "0.48147765", "0.4814427", "0.4814388", "0.4798313", "0.47916675", "0.47909695", "0.47891986", "0.4788354", "0.4785264", "0.4770351", "0.47661898", "0.47637898", "0.47585335" ]
0.7226413
0
TODO Autogenerated method stub
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); }
{ "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
This should be unique and internal, so .... not sure why it would ever need to be set.
public void setKey(String nkey) { setAttribute("id", nkey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "public String getUniqueID ( ) { return _uniqueID; }", "public void setInternalId()\n {\n // generate a unique id that will be used for the internal id:\n UUID uuid = UUID.randomUUID();\n this.internalId = uuid.toString();\n }", "private UniqueIdentifier(){\n\t\t\n\t}", "public int getUniqueID() { \n return -1;\n }", "@Override\n public int hashCode() {\n return 1;\n }", "protected UniqueID() {\n UUID newID = UUID.randomUUID();\n this.mostSigBits = newID.getMostSignificantBits();\n this.leastSigBits = newID.getLeastSignificantBits();\n }", "public int getUID() {\n return 0;\n }", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void uniqueUpdate() {\n\r\n\t}", "@Override\n\tpublic int getID() {\n\t\treturn 1;\n\t}", "protected abstract Set method_1559();", "@Override\n public int hashCode() {\n return System.identityHashCode(this);\n }", "public String getInternalId()\n {\n return internalId;\n }", "public String getUniqueID()\r\n {\r\n return (m_uniqueID);\r\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n public int getID() {\n return 7;\n }", "public String getPublicId()\n {\n return null; // FIXME track public IDs too\n }", "@Override\n public int hashCode() {\n return 0;\n }", "public int getUniqueReference ()\n\t{\n\t\treturn uniqueReference;\n\t}", "@Override\n public int value() {\n return 0;\n }", "protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn 0;\n\t}", "protected boolean func_70814_o() { return true; }", "public String getUniqueID() {\n return this.uniqueID;\n }", "public void method_2244() {\r\n this.field_1858 = 0;\r\n }", "public boolean supportsUnique() {\n \t\treturn true;\n \t}", "public Object generalPK() {\n\t\treturn null;\r\n\t}", "private IdentifiableComparator() {\n\t\t// This class is not intended to create own objects from it.\n\t}", "public String getUid() { return null; }", "@Override\n public int hashCode() {\n return -63 * super.hashCode();\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }", "protected WumpusMap() {\n\t\t\n\t}", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "@Override\n\tpublic Object objId() {\n\t\treturn null;\n\t}", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "public Long getUid() {\n\t\treturn null;\n\t}", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "@Override\r\n\tpublic int id() {\n\t\treturn 4;\r\n\t}", "private Set<C17883a<E>> m58972d() {\n return new C17718a();\n }", "@Override\n\tpublic UID getUid() {\n\t\treturn null;\n\t}", "@Override\r\n public int identifier() {\r\n return 100;\r\n }", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "@Override\r\n\tpublic int jID() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "public String getInternalId() {\n\n return this.internalId;\n }", "@Override\n\tpublic String getUuid() {\n\t\treturn null;\n\t}", "protected Item func_146068_u() { return Item.func_150899_d(0); }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "public int uid() { return uid; }", "public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }", "public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }", "@Override\n\tpublic int getID() {\n\t\treturn 41;\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public String getUniqueId() {\n return _uniqueId;\n }", "@Override\n\tpublic int getID() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic String getKey() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getKey() {\n\t\treturn null;\r\n\t}", "public String uniqueId() {\n return this.uniqueId;\n }", "@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }", "private void assignment() {\n\n\t\t\t}", "@Override\n public String getIsNew() {\n return \"0\";\n }", "@java.lang.Override\n public long getGeneration() {\n return generation_;\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic int getIntersert() {\n\t\treturn (8);\n\t}", "@Override\n public int getId() {\n return 0;\n }", "public String getSystemID()\n/* */ {\n/* 1299 */ return this.systemID;\n/* */ }", "@Override\n\t\tpublic Integer getLocationID() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\t\tpublic int implementHashCode() {\n\t\t\treturn 0;\r\n\t\t}", "protected void setUniqueID(int newUniqueID) {\n\t\tuniqueID = newUniqueID;\n\t}", "@Override\n public int loadAutoID() {\n return 0;\n }" ]
[ "0.62025416", "0.6177366", "0.61066383", "0.59774506", "0.59725213", "0.5960342", "0.5883741", "0.58481723", "0.57786465", "0.5757787", "0.5751933", "0.573561", "0.57127076", "0.57096183", "0.5705842", "0.56964576", "0.56876457", "0.56827235", "0.56692547", "0.5639915", "0.56245464", "0.55995625", "0.55859274", "0.5564127", "0.55622905", "0.55577403", "0.5557272", "0.55539584", "0.55539584", "0.55508035", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.5547364", "0.55202985", "0.55167484", "0.5511872", "0.5510727", "0.55089897", "0.55031025", "0.55013967", "0.5500388", "0.5498872", "0.5496257", "0.54889446", "0.54721254", "0.54585046", "0.5456239", "0.54559666", "0.5451609", "0.54505986", "0.5444715", "0.54400915", "0.54388124", "0.5436543", "0.5434706", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.54327023", "0.5431733", "0.5431733", "0.5431733", "0.543045", "0.5427934", "0.5427614", "0.542453", "0.54242975", "0.54240865", "0.54229444", "0.5417758", "0.54139125", "0.540838", "0.54051995", "0.5404658", "0.5402011", "0.5402011", "0.5401919", "0.53996605", "0.53965783", "0.5387511", "0.53806216", "0.53782403", "0.5377878", "0.5377398", "0.5372958", "0.53720284", "0.53694695", "0.5365696", "0.53557867" ]
0.0
-1
The key is a unique identifier on this server for a particular user. Never forget that this is NOT a global identifier that is useful on any other server. The email address, and open id, are global identifiers that can be transferred across servers, but the KEY is a key only on this server.
public String getKey() { return getAttribute("id"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getUserKey()\r\n {\r\n return getAttribute(\"userkey\");\r\n }", "java.lang.String getClientKey();", "public interface Key {\n\n String SHARE_KEY = \"userIndo\";//用户信息\n String SHARE_USER_ID = \"userId\";//用户账号\n\n}", "public int getUserKey() {\r\n\t\tif(email!=null&&password!=null) {\r\n\t\t\treturn (email.hashCode()+password.hashCode())/2;\r\n\t\t}else if(email!=null||password!=null) {\r\n\t\t\tif(email!=null) {\r\n\t\t\t\treturn email.hashCode();\r\n\t\t\t}else {\r\n\t\t\t\treturn password.hashCode();\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "public String key() {\n return key;\n }", "public String key() {\n return key;\n }", "Object getAuthInfoKey();", "public String keyIdentifier() {\n return this.keyIdentifier;\n }", "public String keyIdentifier() {\n return this.keyIdentifier;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public String key() {\n return this.key;\n }", "public String getKey(){\n\t\treturn key;\n\t}", "public static String getKey(){\n\t\treturn key;\n\t}", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\r\n return key;\r\n }", "public String getKey() {\n\treturn key;\n }", "public String getKey()\n\t{\n\t\treturn key;\n\t}", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\r\n\t\treturn key;\r\n\t}", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public String getKey() {\n return key;\n }", "public final String getKey() {\n return key;\n }", "public String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn key;\n\t}", "public long getKeyID()\n {\n return keyID;\n }", "public int keyId() {\n return keyId;\n }", "public String getItskey() {\n return itskey;\n }", "public String getKey() {\n return key;\n }", "@Override\n\tpublic String getKey() {\n\t\treturn key;\n\t}", "public Key getKey()\r\n { \r\n return key; \r\n }", "public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}", "public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}", "@Override\n\tpublic String getDocumentKey() {\n\t\treturn uid.toString();\n\t}", "java.lang.String getPublicEciesKey();", "protected String getKey() {\n\t\treturn makeKey(host, port, transport);\n\t}", "public String createCacheKey() {\n return \"organization.\" + userEmail;\n }", "public String getKey() {\n return this.key;\n }", "public String getLoginKey() {\n\t\treturn this.loginKey;\n\t}", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "public String getKey() {\n return this.key;\n }", "@Override\n public String getKey() {\n return key;\n }", "public java.lang.String getKey(){\n return localKey;\n }", "public String getKey() {\n\n return this.key;\n }", "public String getKey_() {\n return key_;\n }", "public String getKey()\n\t{\n\t\treturn this.key;\n\t}", "public Key getID () {\n\t\treturn id;\n\t}", "private String getKey() {\r\n if (key == null) {\r\n key = getURI();\r\n }\r\n return key;\r\n }", "public String getKey() {\n\t\treturn id + \"\";\n\t}", "public Object getKey() {\r\n return key;\r\n }", "void setAuthInfoKey(Object key);", "public java.lang.String getIdentifierKey() {\r\n return localIdentifierKey;\r\n }", "public String getUserPart(String key);", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public Key getKey() {\n\t\treturn key;\n\t}", "private static String generateServerKey(Poi poi) {\n LonLat viewPoint = poi.getViewPosition();\n int lon = viewPoint.getLonInt();\n int lat = viewPoint.getLatInt();\n int alt = viewPoint.getAltInt();\n return generateServerKey(poi.getName(), poi.getAddress(), lon, lat, alt);\n }", "public Object getKey()\n {\n return key;\n }", "com.google.protobuf.ByteString\n getClientKeyBytes();", "public void setPrimaryKey(ObjectKey key) throws TorqueException\n {\n SimpleKey[] keys = (SimpleKey[]) key.getValue();\n SimpleKey tmpKey = null;\n setMailId(((NumberKey)keys[0]).intValue());\n setReceiverId(((NumberKey)keys[1]).intValue());\n }", "java.lang.String getSubjectKeyID();", "java.lang.String getSubjectKeyID();", "public CryptoKey getMyKey() {\n return myKey;\n }", "public byte[] getKey() {\n return this.key;\n }", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "public IdKey getKey() {\n return idKey;\n }", "String key();", "public Object getKey() {\n return key;\n }", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public static synchronized String getKeyBYUserID(int user_ID){\n\t\t\n\t\t\tString key = \"\";\n\t\t\tConnection connection;\n\t\t \tPreparedStatement statement = null;\n\t\t\tString preparedSQL = \"Select RegKey From credential Where User_ID = ?\";\n\t\t\t\n\t\t try{\n\t\t \tconnection = DBConnector.getConnection();\n\t\t \tstatement = connection.prepareStatement(preparedSQL);\n\t\t \tstatement.setInt(1, user_ID);\n\t\t\t\tResultSet rs = statement.executeQuery();\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tkey = rs.getString(1);\n\t\t\t\t}\t\n\t\t\t\trs.close();\t\t\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t\t\n\t\t\t}\n\t\t catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn key;\n\t\t\t\n\t}", "public String resource_key () throws BaseException {\n return username;\n }", "public String getAppKey() {\n return appKey;\n }", "public MessageKey getKey() {\n\treturn key;\n }", "public void setPrimaryKey(String key) \n {\n setNewsletterId(Integer.parseInt(key));\n }", "public void setKey( Long key ) {\n this.key = key ;\n }" ]
[ "0.7066592", "0.69811165", "0.6702109", "0.66432667", "0.650402", "0.6471361", "0.6471361", "0.646759", "0.6442484", "0.6442484", "0.64055103", "0.64055103", "0.64055103", "0.64055103", "0.6353955", "0.6351593", "0.6294877", "0.6294877", "0.62747705", "0.62747705", "0.62747705", "0.62745214", "0.6271499", "0.6262962", "0.6253968", "0.6253968", "0.6253968", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6235556", "0.6231829", "0.6224255", "0.6224255", "0.6224255", "0.62240034", "0.6223252", "0.62225807", "0.62058055", "0.61945295", "0.61867213", "0.6183047", "0.6136813", "0.6134744", "0.6103084", "0.60985863", "0.60660523", "0.60635406", "0.6039753", "0.60384667", "0.60256684", "0.6021917", "0.6021917", "0.6021917", "0.6021917", "0.6021917", "0.6021917", "0.6010883", "0.60074395", "0.59936726", "0.5987557", "0.59591484", "0.5955602", "0.5945041", "0.59365344", "0.5932889", "0.5932847", "0.5927523", "0.5925303", "0.5904292", "0.5904292", "0.5904292", "0.59024394", "0.5901901", "0.5888651", "0.58841234", "0.5878756", "0.5877479", "0.5877479", "0.58754975", "0.5866036", "0.58656317", "0.58642745", "0.5862513", "0.58416593", "0.5837169", "0.5837169", "0.5837169", "0.5836501", "0.58292806", "0.5823357", "0.58081716", "0.5808104", "0.58078134" ]
0.5906215
75
Gives this user the specified ID (either email or OpenId). Note: only do this when the ID have been verified as belonging to this user! This method will search for other users with that ID, and remove that id from those other users.
public void addId(String newId) throws Exception { DOMFace newIdRec = this.createChild("idrec", DOMFace.class); newIdRec.setAttribute("loginid", newId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeUser(Long id);", "@Override\n\tpublic User getUserById(int id) {\n\t\treturn null;\n\t}", "@ApiMethod(name = \"removeUser\")\n\tpublic void removeUser(@Named(\"id\") Long id) {\n\t\tEntityManager mgr = getEntityManager();\n\t\ttry {\n\t\t\tUser user = mgr.find(User.class, id);\n\t\t\tmgr.remove(user);\n\t\t} finally {\n\t\t\tmgr.close();\n\t\t}\n\t}", "@Override\n\tpublic PrpUser getUserById(Integer id) {\n\t\treturn null;\n\t}", "public void removeUser(long id) {\n\troomMembers.remove(id);\n }", "@Override\n\tpublic void removeUser(int id) {\n\t\t\n\t}", "@Override\n public void removeUserById(long id) {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n User user = (User) session.get(User.class, id);\n session.delete(user);\n tx.commit();\n session.close();\n }", "@Override\r\n public IUser getUserByUserId(String id)\r\n {\r\n EntityManager em = getEntityManager();\r\n\r\n try\r\n {\r\n return em.find(User.class, id);\r\n }\r\n finally\r\n {\r\n em.close();\r\n }\r\n }", "@Override\r\n\tpublic void deleteByIdUser(int id) {\n\t\tuserReposotory.deleteById(id);\r\n\t}", "@Override\r\n\tpublic User searchUser(Integer id) {\n\t\treturn userReposotory.getById(id);\r\n\t}", "public User getUserById(String id){\n\t\tUser e;\n\t\tfor (int i = 0 ; i < users.size() ; i++){\n\t\t\te = users.get(i);\n\t\t\tif (e.getId().equals(id))\n\t\t\t\treturn e;\n\t\t}\n\t\treturn null;\n\t}", "public UserId id(final String id) {\n Objects.requireNonNull(id, \"The UserId id field can not be set null.\");\n this.id = id;\n return this;\n }", "@Override\r\n\tpublic User getUserById(int id) {\n\t\treturn userMapper.selById(id);\r\n\t}", "@Override\r\n\tpublic UserTO getUser(String id) {\n\t\treturn null;\r\n\t}", "void deleteUserById(Long id);", "@Override\n\tpublic User getByid(String id) {\n\t\treturn null;\n\t}", "public User getUser(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void deleteUser(int id) {\n\t\tuserMapper.deleteUser(id);\n\t}", "@Override\r\n\tpublic User getUserByID(int id) {\n\t\treturn userMapper.getUserByID(id);\r\n\t}", "public void deleteUser(Integer id) {\n UserModel userModel;\n try {\n userModel = userRepository.findById(id).orElseThrow(IOException::new);\n }\n catch (IOException e) {\n System.out.println(\"User not found\");\n userModel = null;\n }\n userRepository.delete(userModel);\n }", "public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }", "@Override\r\n\tpublic User user(int id) {\r\n\t\tMap<String,String> map = getOne(SELECT_USERS+ WHERE_ID, id);\r\n\t\tif(map!= null){\r\n\t\t\treturn IMappable.fromMap(User.class, map);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic User getUserById(int id) {\n\t\treturn userDao.getUserById(id);\n\t}", "public User getUser(String id) {\n\t\treturn null;\r\n\t}", "public Person findUserById(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic User findUserById(int id) {\n\t\treturn userDao.findUserById(id);\n\t}", "public User getUser(Integer id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic int delUser(Integer id)throws Exception {\n\t\treturn userMapper.delUser(id);\n\t}", "@Override\n\tpublic ERS_USERS queryById(int id) {\n\t\treturn null;\n\t}", "Integer removeUserByUserId(Integer user_id);", "public void deleteUser(Long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\t\t\trepository.deleteById(id);\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\t}", "public void deleteUserById(int id){\n userListCtrl.deleteUser(id);\n }", "@Override\r\n\tpublic User findByIdUser(Integer id) {\n\t\treturn userReposotory.findById(id).get();\r\n\t}", "void setUserId(int newId) {\r\n\t\t\tuserId = newId;\r\n\t\t}", "@Override\r\n\tpublic User delete(String id) {\n\t\treturn null;\r\n\t}", "public User deleteUser(String userid) {\n User existingUser = users.stream()\n .filter(user -> user.getUserid().equals(userid))\n .findFirst().get();\n\n if (existingUser != null) {\n users = users.stream()\n .filter(user -> !user.getUserid().equals(userid))\n .collect(Collectors.toList());\n return existingUser;\n } else {\n throw new IllegalArgumentException(userid + \" user id does not exist\");\n }\n }", "@Override\r\n\tpublic User getById(Integer id) {\n\t\treturn null;\r\n\t}", "public void deleteUser(Integer id) throws BadRequestException;", "public User findByUserID(Integer ID) throws Exception {\n\n\t\tEntityManager em = OpenJPAUtils.openEntityManager();\n\n\t\tUser result = em.find(User.class, ID);\n\n\t\tHashSet<Contact> contacts = (HashSet<Contact>) getAllContactByUserID(result\n\t\t\t\t.getId());\n\n\t\tif (contacts != null) {\n\n\t\t\tresult.setContacts(contacts);\n\n\t\t} else {\n\n\t\t\tresult.setContacts(new HashSet<Contact>());\n\n\t\t}\n\n\t\tOpenJPAUtils.closeEntityManager(em);\n\n\t\treturn result;\n\n\t}", "@Override\n\tpublic ApplicationResponse deleteUser(String id) {\n\t\tOptional<UserEntity> userEntity = repository.findById(id);\n\t\tif (userEntity.isPresent()) {\n\t\t\trepository.deleteById(id);\n\t\t\treturn new ApplicationResponse(true, \"Success\", null);\n\t\t} else {\n\t\t\tthrow new UserNotFoundException(\"User not found\");\n\t\t}\n\t}", "public AlarmUser getUser(String ID) {\n\t\tListIterator<AlarmUser> userList = users.listIterator();\n\t\t\n\t\tlogger.log(\"Looking for User by ID \" + ID, Level.TRACE);\n\t\t\n\t\twhile(userList.hasNext()) {\n\t\t\tAlarmUser theUser = userList.next();\n\t\t\tif(theUser.getID().equals(ID)) {\n\t\t\t\tlogger.log(\"Found User \" + ID, Level.TRACE);\n\t\t\t\treturn theUser;\n\t\t\t}\n\t\t}\n\t\t\n\t\tlogger.log(\"User \" + ID + \" not found! Adding new user of ID: \" + ID, Level.TRACE);\n\t\treturn addUser(ID);\n\t\t\n\t}", "public void deleteUser(long id){\n userRepository.deleteById(id);\n }", "@Override\n public void removeUser(int id) {\n Session session = this.sessionFactory.getCurrentSession();\n User u = (User) session.load(User.class, new Integer(id));\n if(null != u){\n session.delete(u);\n }\n logger.info(\"User deleted successfully, User details=\"+u);\n }", "public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static User findUser(int id) {\r\n return null;\r\n }", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "@Override\n\tpublic User findUserByUserId(long id) {\n\t\treturn userDao.getUserByUserId(id);\n\t}", "void deleteUserById(Integer id);", "void deleteUser(int id);", "public User getById(String id){\n List<User> users = userRepo.findAll();\n for (User user : users){\n if(user.getGoogleId().equals(id)){\n return user;\n }\n }\n throw new UserNotFoundException(\"\");\n }", "@Override\n\tpublic User getUser(int id) {\n\t\treturn userRepository.findById(id);\n\t}", "@Override\r\n\tpublic User deleteRcord(int id) {\n\t\treturn null;\r\n\t}", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "@Override\n\tpublic void deleteUserById(Integer id) {\n\n\t}", "@Override\r\n\tpublic TbUser findUserById(Long id) {\n\t\tTbUser tbUser = tbUserMapper.selectByPrimaryKey(id);\r\n\t\treturn tbUser;\r\n\t}", "@Override\r\n\tpublic SpUser findById(String id) {\n\t\treturn null;\r\n\t}", "User getUser(Long id);", "public User getUser(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.idEq(id);\n Criteria cr = session.createCriteria(User.class);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }", "public void deleteUser(int id) {\n\t\tet.begin();\n\t\tem.remove(em.find(User.class, id));\n\t\tet.commit();\n\t}", "@Override\n\tvoid setId(final UserId userId);", "User getUserById(int id);", "public void deleteUser(int id) {\r\n userRepo.deleteById(id);\r\n }", "User getUserById(Long id);", "User getUserById(Long id);", "@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete RfpUser : {}\", id);\n rfpUserRepository.deleteById(id);\n }", "@Override\n\tpublic User findByUserid(Serializable id) {\n\t\treturn this.userDao.findById(id);\n\t}", "public static void deleteUser(String id){\n\t\tWSResponse response = null;\n\t\ttry{\n\t\tPromise<WSResponse> result = WS.url(Utils.getApiUrl()+Urls.DELETE_USER_URL+id)\n\t\t\t\t\t\t\t\t\t\t.delete();\n\t\tresponse = result.get(10000);\n\t\tif(response.getStatus() == StatusCodes.OK){\n\t\t\tUser user = new Gson().fromJson(response.getBody(), User.class);\n\t\t\tController.flash().put(Messages.SUCCESS, Messages.SUCCESS_DELETED + user.firstName + \" \" + user.lastName);\n\t\t} else{\n\t\t\tController.flash().put(Messages.ERROR, Messages.ERROR_DELETE);\n\t\t}\n\t\t} catch(Exception exception){\n\t\t\tController.flash(Messages.ERROR, Messages.CANT_LOAD_USERS + exception);\n\t\t}\n\t}", "public void deleteUser(String id) {\n\t\tSystem.out.println(\"deleteUser\");\n\t\t personDAO.deleteUser(id);\n\t}", "@Override\n\tpublic User delete(Integer id) {\n\t\treturn null;\n\t}", "public User getUserById(String id) {\n // return userRepo.findById(id);\n\n return null;\n }", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder clearUserID() {\n userID = null;\n fieldSetFlags()[2] = false;\n return this;\n }", "@Override\n\tpublic AppUser getUserById(int id) {\n\t\tAppUser user = store.get(id);\n return user;\n\t\t\n\t}", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000001);\n userID_ = 0;\n onChanged();\n return this;\n }", "public void deleteUser(int id) {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(db.DB.connectionString, db.DB.user, db.DB.password);\n Statement stmt = conn.createStatement();\n stmt.executeUpdate(\"delete from users where id_user = \" + id);\n int idx = 0;\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n idx = i;\n }\n }\n allUsers.remove(idx);\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"User deleted\", null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n } catch (SQLException ex) {\n Logger.getLogger(UserController.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n clear();\n try {\n conn.close();\n } catch (Exception e) {\n /* ignored */ }\n }\n }", "public void delete(Long id) {\n log.debug(\"Request to delete ExtraUser : {}\", id);\n extraUserRepository.delete(id);\n }", "public void removeuserById(Long id) throws SQLException{\n String SQL = \"DELETE FROM user WHERE id = ? \";\n PreparedStatement ps = connection.prepareStatement(SQL);\n ps.setLong(1, id);\n int result = ps.executeUpdate();\n if(result > 0) System.out.println(\"remoção do usuário concluída com sucesso!\");\n else System.out.println(\"ID não encontrado, verifique novamente...\");\n ps.close();\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n userID_ = 0;\n onChanged();\n return this;\n }", "public Builder clearUserID() {\n bitField0_ = (bitField0_ & ~0x00000004);\n userID_ = 0;\n onChanged();\n return this;\n }", "public void setUserId(String id) {\n\t\t_userLoginId = id;\n\t}", "@Override\n\tpublic User findById(String id) {\n\t\treturn null;\n\t}", "RecordUser getUser(long id) throws PrismsRecordException;", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "@Override\r\n\tpublic User findById(int id) {\n\t\treturn null;\r\n\t}", "public void deleteUser(final Long id) {\n userRepository.deleteById(id);\n }" ]
[ "0.6784391", "0.65666324", "0.6563484", "0.6540719", "0.6527479", "0.65085715", "0.64001244", "0.63559365", "0.6313622", "0.62821656", "0.6246606", "0.62337476", "0.6227316", "0.62227917", "0.6196575", "0.6172461", "0.61646706", "0.61571884", "0.6134202", "0.61330384", "0.6118773", "0.6114474", "0.61119235", "0.61110544", "0.6108383", "0.61075544", "0.60961634", "0.608027", "0.60718435", "0.6053048", "0.6051326", "0.6051233", "0.60475194", "0.60437524", "0.60427314", "0.60360676", "0.6034918", "0.60228676", "0.60189855", "0.60182005", "0.60117847", "0.60080695", "0.60062045", "0.6003411", "0.5997635", "0.5995489", "0.59915423", "0.59854776", "0.5984213", "0.59720844", "0.5971247", "0.59696627", "0.5965905", "0.5965231", "0.5962758", "0.59514666", "0.5950477", "0.59487295", "0.5946597", "0.59392416", "0.59364086", "0.5927955", "0.5920388", "0.5920388", "0.5919907", "0.5915874", "0.5914538", "0.5911361", "0.59051687", "0.58969015", "0.5896526", "0.58827156", "0.5879249", "0.58776134", "0.58776134", "0.58776134", "0.58776134", "0.58776134", "0.58776134", "0.58776134", "0.58767736", "0.58767736", "0.58767736", "0.587646", "0.587646", "0.587646", "0.58667356", "0.58631575", "0.58625466", "0.58583575", "0.58583575", "0.58583575", "0.58583575", "0.58581555", "0.584548", "0.5845185", "0.58395773", "0.58395773", "0.58395773", "0.5835241", "0.58255446" ]
0.0
-1
The license token is a randomly generated value that controls API access to the user's information. It is, so to speak, a password for use in the API. The user should be able to reset this token on demand, which then requires all userlicensed links to be refreshed. If you generate a new token, don't forget to save user profiles
public void setLicenseToken(String newLicTok) { setScalar("licensetoken", newLicTok); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T generateLicense();", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "String generateUserRenewalToken(String username);", "public void setLicenseNumber( int license ) {\n\n licenseNumber = license;\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "License createLicense();", "public StringBuilder createToken() throws IOException {\n /**\n * we need the url where we want to make an API call\n */\n URL url = new URL(\"https://api.scribital.com/v1/access/login\");\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n /**\n * set the required type, in this case it's a POST request\n */\n connection.setRequestMethod(\"POST\");\n\n /**\n * set the type of content, here we use a JSON type\n */\n connection.setRequestProperty(\"Content-Type\", \"application/json; utf-8\");\n connection.setDoOutput(true);\n\n /**\n * set the Timeout, will disconnect if the connection did not work, avoid infinite waiting\n */\n connection.setConnectTimeout(6000);\n connection.setReadTimeout(6000);\n\n /**\n * create the request body\n * here we need only the username and the api-key to make a POST request and to receive a valid token for the Skribble API\n */\n String jsonInputString = \"{\\\"username\\\": \\\"\" + username +\"\\\", \\\"api-key\\\":\\\"\" + api_key + \"\\\"}\";\n try(OutputStream os = connection.getOutputStream()){\n byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);\n os.write(input,0, input.length);\n }\n\n /**\n * read the response from the Skriblle API which is a token in this case\n */\n try(BufferedReader br = new BufferedReader(\n new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8))) {\n StringBuilder response = new StringBuilder();\n String responseLine = null;\n while ((responseLine = br.readLine()) != null) {\n response.append(responseLine.trim());\n Token = response;\n }\n }\n return Token;\n }", "@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }", "public void generateToken(String uri) {\n this.token = \"sandbox\";\n }", "void setAccessToken(String accessToken);", "String createToken(User user);", "public String getLicenseUrl() {\n\t\treturn licenseUrl;\n\t}", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "String getLicenseKey() {\n return null;\n }", "public int getLicenseNumber() {\n\n return licenseNumber;\n }", "public String getLicense() {\n\t\treturn license;\n\t}", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }", "License getLicense() throws TimeoutException, InterruptedException;", "public String getLicenseId() {\n\t\treturn licenseId;\n\t}", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "public String userToken() {\n return userToken;\n }", "public String getLicenseNumber() {\n\t\treturn licenseNumber;\n\t}", "public String getLicense();", "public TokenResponse(String accessToken) {\n this.accessToken = accessToken;\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "String getAccessToken();", "String getAccessToken();", "void expireComponentAccessToken();", "public java.lang.String getLicenseNumber() {\n return licenseNumber;\n }", "OAuth2Token getToken();", "public boolean initializeLicenseInfo(String apiToken)\n {\n licenseInfo = new LicenseInfo(apiToken);\n return licenseInfo.initialize();\n }", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "public static String getTeacherToken() {\n\n RestAssured.baseURI = \"https://cybertek-reservation-api-qa.herokuapp.com\";\n\n Response response = given().log().all().\n param(\"email\", \"[email protected]\").\n param(\"password\", \"maxpayne\").\n get(\"/sign\");\n response.then().log().all().\n assertThat().statusCode(200);\n\n return response.jsonPath().get(\"accessToken\");\n\n }", "public static void setAccessToken(String accessToken) {\n }", "public String getAccessToken();", "public Token() {\n mTokenReceivedDate = new Date();\n }", "License update(License license);", "public void setLicenseModel(String licenseModel) {\n this.licenseModel = licenseModel;\n }", "public void setLicenseModel(String licenseModel) {\n this.licenseModel = licenseModel;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public String getAccessToken() {\n return accessToken;\n }", "public void setLicense(String license) {\n\t\tthis.license = license;\n\t}", "@Override\r\n\tpublic String accessToken() throws OAuthSystemException {\n\t\treturn null;\r\n\t}", "@Value.Default\n public String getLicense() {\n\treturn \"\";\n }", "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}", "boolean hasExpiredTrialLicense() {\n return false;\n }", "String getSecret();", "private String getPaymentToken() {\r\n\t\tString paymentToken = \"\";\r\n\t\tUserItem currentUserItem = getSimpleWorksUserSessionConfiguration().getCurrentUser();\r\n\t\tOrderItem orderItem = getSimpleWorksUserSessionConfiguration().getOrderItem();\r\n\t\tif (orderItem != null) {\r\n\t\t\tpaymentToken = \"\" + orderItem.getOrderId();\r\n\t\t\t if (currentUserItem != null){\r\n\t\t\t\t paymentToken += \"#\" + currentUserItem.getUserId();\r\n\t\t\t }\r\n\t\t}\r\n\t\treturn paymentToken;\r\n\t}", "GetToken.Req getGetTokenReq();", "private String generateToken(Map<String, Object> claims) {\n return Jwts.builder()\n .setClaims(claims)\n .setExpiration(new Date(System.currentTimeMillis() + 700000000))\n .signWith(SignatureAlgorithm.HS512, SECRET)\n .compact();\n }", "public static String getAccessToken() {\n return \"\";\n }", "public static String getRandomLicense() {\n String license = \"Copyright 2014 \";\n String owner = names[RandomNumberGenerator.getRandomInt(0, names.length - 1)];\n license = license + owner;\n return license.trim();\n }", "String generateUnitRenewalToken(Unit unit, Instant expiration);", "@VisibleForTesting\n protected EzSecurityToken getSecurityToken() {\n if (new EzProperties(getConfigurationProperties(), true).getBoolean(\"ezbake.security.fake.token\", false)) {\n return ThriftTestUtils.generateTestSecurityToken(applicationSecurityId, applicationSecurityId, Lists.newArrayList(\"U\"));\n } else {\n try {\n return securityClient.fetchAppToken();\n } catch (Exception ex) {\n logger.error(\"Failed to get security token for INS\", ex);\n throw new RuntimeException(ex);\n }\n }\n }", "public LicenseInfo getLicenseInfo()\n {\n if(licenseInfo == null)\n {\n System.out.println(\"You need to initialize the account info before getting the details.\");\n return null;\n }\n return licenseInfo;\n }", "@Override\n public Object getCredentials() {\n return token;\n }", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public RefreshToken generateRefreshToken(){\n RefreshToken refreshToken = new RefreshToken();\n //Creates a 128bit random UUID. This serves as our refresh token\n refreshToken.setToken(UUID.randomUUID().toString());\n //Set creation timestampt\n refreshToken.setCreatedDate(Instant.now());\n\n return refreshTokenRepository.save(refreshToken);\n }", "public void setToken(){\n token=null;\n try {\n OkHttpClient client = new OkHttpClient();\n RequestBody reqbody = RequestBody.create(null, new byte[0]); \n Request request = new Request.Builder()\n .url(\"https://api.mercadolibre.com/oauth/token?grant_type=client_credentials&client_id=\"+clienteID +\"&client_secret=\"+secretKey)\n .post(reqbody)\n .addHeader(\"content-type\", \"application/json\")\n .addHeader(\"cache-control\", \"no-cache\")\n .addHeader(\"postman-token\", \"67053bf3-5397-e19a-89ad-dfb1903d50c4\")\n .build();\n \n Response response = client.newCall(request).execute();\n String respuesta=response.body().string();\n token=respuesta.substring(respuesta.indexOf(\"APP\"),respuesta.indexOf(\",\")-1);\n System.out.println(token);\n } catch (IOException ex) {\n Logger.getLogger(MercadoLibreAPI.class.getName()).log(Level.SEVERE, null, ex);\n token=null;\n }\n }", "public String getAccessToken() {\n return accessToken;\n }", "public void setLicenseUrl(String licenseUrl) {\n\t\tthis.licenseUrl = licenseUrl;\n\t}", "public void requestToken(View pView){\n mAttestation.fetchApproovToken();\n }", "public void setAccessToken(String accessToken) {\n\t\tthis.accessToken = accessToken;\n\t}", "public void setAccessToken(String accessToken) {\n\t\tthis.accessToken = accessToken;\n\t}", "public void setLicenseKey(String licenseKey)\n \tthrows LicenseException\n {\n\t// do not catch exception here, all integer string must be\n\t// parseable to a number\n\tString tokens[] = licenseKey.split(\"#\");\n\tif(tokens.length != 5)\n\t\tthrow new LicenseException(\"License is not valid\");\n\tsetCustomerName(tokens[0]);\n\tsetEdition(tokens[1]);\t\n\tsetNamedUsers(Integer.parseInt(tokens[2]));\n\tsetLicenseSerial(tokens[3]);\n//\tsetConcurentUser(Integer.parseInt(tokens[4]));\n//\tsetCustomerEmail(tokens[5]);\n\tsetFeatureSet(tokens[4]);\n }", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "private byte[] getTokenKey() throws InternalSkiException {\n return sysKey(TOKEN_KEY);\n }", "public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }", "public void setAccessToken (AccessToken accessToken)\n\t{\n\t\tthis.accessToken = accessToken;\n\t}", "private String prepareSecurityToken() {\r\n\t\tint time = ((int) System.currentTimeMillis() % SECURITY_TOKEN_TIMESTAMP_RANGE);\r\n\t\treturn String.valueOf(time + (new Random().nextLong() - SECURITY_TOKEN_TIMESTAMP_RANGE));\r\n\t}", "java.lang.String getSecret();", "public void setSecureIdentityToken(String token) {\n setRuntimeProperty(PROPERTY_SECURE_IDENTITY_TOKEN, token);\n }", "private String generateVerificationToken(User user) {\n String token = UUID.randomUUID().toString();\n VerificationToken verificationToken = new VerificationToken();\n verificationToken.setToken(token);\n verificationToken.setUser(user);// after that we save it to repository\n verificationTokenRepository.save(verificationToken);\n return token;\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "private String issueRefreshToken(UUID user, String deviceName) {\n String token = UUID.randomUUID().toString();\n String hash = BCrypt.hashpw(token, BCrypt.gensalt());\n\n dao.updateToken(user, deviceName, hash);\n\n return token;\n }", "@Transient\n\tpublic String getAccessToken() {\n\t\treturn accessToken;\n\t}", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "String setRememberToken(HttpServletRequest request, HttpServletResponse response, String password, int maxAge, String domain, String path);", "public String getAccessToken () {\n\t\treturn this.accessToken;\n\t}", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public String generateTokenForUser(String userName) {\n\t\tSession session = new Session();\n\t\tString token = session.getToken();\n\t\tsessionMap.put(userName, session);\n\t\t\n\t\treturn Base64.getEncoder().encodeToString(token.getBytes());\n\t}", "public static String getAccessToken() {\n return accessToken;\n }", "public void setLicence(Long licence) {\r\n this.licence = licence;\r\n }", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "User setTokenForUser(String username, String token) throws DatabaseException;", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "void onGetTokenSuccess(AccessTokenData token);", "@Override\n\tpublic java.lang.String getLicense() {\n\t\treturn _scienceApp.getLicense();\n\t}", "@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }", "public String generateAccessToken(User user, String tenant)\n\t{\n\t\tClaims claims = Jwts.claims().setSubject(user.getId().toString());\n\t\tclaims.put(\"password\", user.getPassword());\n\t\tclaims.put(\"tenant\", tenant);\n\t\treturn buildToken(claims, Integer.MAX_VALUE);\n\t}", "public static String urlSafeRandomToken() {\n SecureRandom random = new SecureRandom();\n byte bytes[] = new byte[20];\n random.nextBytes(bytes);\n Base64.Encoder encoder = Base64.getUrlEncoder().withoutPadding();\n String token = encoder.encodeToString(bytes);\n return token;\n }", "public String getAccess_token() {\r\n\t\treturn access_token;\r\n\t}", "public Token toScribeToken() {\n return new Token(oauthToken, oauthTokenSecret);\n }", "protected AccessToken getAccessToken() \n\t{\n\t\treturn accessToken;\n\t}", "public TokenTO generateToken(UserTO user) {\n TokenTO res;\n\n res = mgrToken.createToken(Crypto.generateToken() + Crypto.generateToken());\n mgrToken.save(res);\n user.setToken(res);\n getDao().update(user);\n\n return res;\n }", "private void sendRegistrationToServer(String token) {\n }" ]
[ "0.5961474", "0.57628584", "0.5681143", "0.5649634", "0.5643916", "0.557444", "0.5573481", "0.5553363", "0.55470943", "0.55349", "0.5521401", "0.54966694", "0.54750437", "0.5451839", "0.5449293", "0.54455113", "0.5440989", "0.5440219", "0.5436016", "0.54261076", "0.54226583", "0.5406237", "0.53795093", "0.53684336", "0.53359586", "0.5321722", "0.5306702", "0.5306702", "0.5299355", "0.52670413", "0.52564716", "0.5249064", "0.52417344", "0.5237831", "0.52369076", "0.523246", "0.52110565", "0.5202552", "0.51879346", "0.51879346", "0.5186965", "0.51862335", "0.5177217", "0.5175833", "0.5175124", "0.516362", "0.51591736", "0.51568425", "0.5151183", "0.5148766", "0.514482", "0.51414466", "0.51373285", "0.51350504", "0.51328224", "0.5126813", "0.5106077", "0.51051265", "0.51051265", "0.5094332", "0.50901103", "0.50857145", "0.5084736", "0.5083719", "0.50700897", "0.50700897", "0.50666195", "0.5052894", "0.50514036", "0.5037823", "0.50375915", "0.5032776", "0.5031922", "0.5027993", "0.5027249", "0.5024341", "0.50216776", "0.50216687", "0.50094485", "0.50094485", "0.50094485", "0.5007078", "0.50017476", "0.49994484", "0.49976808", "0.4992575", "0.4984054", "0.49826917", "0.49760365", "0.4975275", "0.4974731", "0.4970312", "0.4965102", "0.49588662", "0.49571446", "0.4950862", "0.49500668", "0.49490574", "0.49482906", "0.4944618" ]
0.60049415
0
Returns a vector of WatchRecord objects. Do not modify this vector externally, just read only.
public List<WatchRecord> getWatchList() throws Exception { List<WatchRecord> watchList = new Vector<WatchRecord>(); List<WatchRecordXML> chilluns = this.getChildren("watch", WatchRecordXML.class); for (WatchRecordXML wr : chilluns) { watchList.add(new WatchRecord(wr.getPageKey(), wr.getLastSeen())); } return watchList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final Record[] getRecords() {\n Record[] myRecords = new Record[records.size()];\n\n Iterator iterator = records.iterator();\n for (int i = 0; i < records.size(); i++) {\n myRecords[i] = (Record) iterator.next();\n }\n\n return myRecords;\n }", "public VirtualZone[] getWatchers() {\n/* 3094 */ if (this.watchers != null) {\n/* 3095 */ return this.watchers.<VirtualZone>toArray(new VirtualZone[this.watchers.size()]);\n/* */ }\n/* 3097 */ return emptyWatchers;\n/* */ }", "public Set<Record> getRecords() {\n /*\n returns newly allocated Set\n to prevent sort of violations,\n like adding something to the returned value\n */\n return Collections.unmodifiableSet(records);\n }", "public List<DBObject> WhichWatch();", "public List<String> getRecordings(){\n findRecordings();\n return _records;\n }", "public ArrayList<Recording> getAll() {\r\n synchronized (lastUpdate) {\r\n if (System.currentTimeMillis() - lastUpdate > 60000) {\r\n update();\r\n }\r\n }\r\n return recordings;\r\n }", "public ArrayList<Record> getRecords() {\r\n\t\treturn records;\r\n\t}", "public List<Record> getAllCallRecords() {\n return new ArrayList<>(mCallRecords);\n }", "public static List<Stopwatch> getStopwatches() {\n synchronized (lock) {\n final List<Stopwatch> stopwatchList = new ArrayList<Stopwatch>(stopwatchMap.values());\n return stopwatchList;\n }\n }", "public static ArrayList<WatchHistory> getWatchHistory() {\n File file = new File(\"./data/customer_ratings.csv\");\n Scanner scan;\n try {\n scan = new Scanner(file);\n\n } catch (IOException e) {\n throw new Error(\"Could not open customer ratings file\");\n }\n scan.nextLine();\n\n // Read File to get Watch Histories\n ArrayList<WatchHistory> watchHistories = new ArrayList<WatchHistory>();\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n double rating = Double.parseDouble(ratingParts[2]);\n WatchHistory wh = new WatchHistory(ratingParts[1], ratingParts[4], rating, ratingParts[3]);\n watchHistories.add(wh);\n }\n\n // Close Scanner\n scan.close();\n\n // Return Watch Histories\n return watchHistories;\n }", "public List<AbsRecord> getRecords()\n\t{\n\t\treturn getRecordBy(null, new HBRecordRowMapper());\n\t}", "@Override\r\n\tpublic List<T> getRecords() {\n\t\treturn null;\r\n\t}", "public String[] getRecordIDs() throws RemoteException\n\t{\n\t\treturn StaffRecords.getRecordIDs();\n\t}", "public List<AbsRecord> getRecords()\n\t{\n\t\treturn getRecordBy(null, new GAZRecordRowMapper());\n\t}", "public List<Recordings> getRecordings() {\r\n\r\n\t\tList<Recordings> recordingsList = new ArrayList<Recordings>();\r\n\r\n\t\tList<Map<String, Object>> rows = jdbcTemplate.queryForList(\"Select * from RECORDINGS\");\r\n\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tRecordings recordings = new Recordings();\r\n\t\t\trecordings.setFileName((String)row.get(\"FILENAME\"));\r\n\t\t\trecordings.setSourceURL((String)row.get(\"SOURCEURL\"));\r\n\t\t\trecordings.setId(((BigDecimal)row.get(\"ID\")).longValue());\r\n\t\t\trecordingsList.add(recordings);\r\n\t\t}\r\n\t\treturn recordingsList;\r\n\t}", "public List<Record> listAllRecords();", "public com.sybase.collections.GenericList<com.sybase.persistence.LogRecord> getLogRecords()\n {\n return ru.terralink.mvideo.sap.LogRecordImpl.findByEntity(\"Orders\", keyToString());\n }", "public List<Record>getRecords(){\n List<Record>recordList=new ArrayList<>();\n RecordCursorWrapper currsorWrapper=queryRecords(null,null);\n try{\n currsorWrapper.moveToFirst();\n while(!currsorWrapper.isAfterLast()){\n recordList.add(currsorWrapper.getRecord());\n currsorWrapper.moveToNext();\n }\n }finally {\n currsorWrapper.close();\n }\n return recordList;\n }", "public static List<RawRecord> getDirtyRecords(DBManager db) {\n\n \tList<RawRecord> dirtyTimes = new ArrayList<RawRecord>() ;\n /*\n * get dirty records from db\n */\n \tList<TimeRecord> trlist = db.query();\n \tfor(TimeRecord tr: trlist) {\n \t\tLog.d(TAG, \"time record: \"+myLog(tr));\n \t //check the dirty and deleted flag\n \t final boolean isDeleted = (1 == tr.deleted);\n \t final boolean isDirty = (1 == tr.dirty);\n if (isDeleted) {\n Log.i(TAG, \"Contact is marked for deletion\");\n RawRecord rawContact = RawRecord.createDeletedRecord(tr._id,\n tr.server_id);\n dirtyTimes.add(rawContact);\n } else if (isDirty) {\n RawRecord rawContact = getRawRecord(db, tr._id);\n Log.i(TAG, \"Contact Name: \" + rawContact.getUserName());\n dirtyTimes.add(rawContact);\n }\n \t}\n \t \t\n \treturn dirtyTimes;\n }", "protected abstract List<ScheduledRecording> getRecordingsWithState(int... states);", "private List<IntWatcher> getWatchers(String name) {\n List<IntWatcher> ws = watchers.get(name);\n if (ws == null) {\n ws = new ArrayList<>();\n watchers.put(name, ws);\n }\n return ws;\n }", "public org.landxml.schema.landXML11.TimingDocument.Timing[] getTimingArray()\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(TIMING$2, targetList);\r\n org.landxml.schema.landXML11.TimingDocument.Timing[] result = new org.landxml.schema.landXML11.TimingDocument.Timing[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "@JsonProperty(\"Records\") abstract List<?> getRecords();", "public final void testFilterRecordingList() throws Exception\n {\n Vector vect = new Vector();\n\n // JAS parametize this so that I can select different configurations.\n long sdArr[][] = { { 0, 10 }, { 0, 12 }, { 0, 8 }, { -5, 20 }, { -5, 13 }, { -5, 15 }, { -5, -7 }, { 2, 10 },\n { 2, 8 }, { 2, 2 }, { 12, 14 }, { -5, 5 }, { 10, 2 } };\n\n patchArray(sdArr, 100);\n for (int i = 0; i < sdArr.length; i++)\n {\n vect.addElement(new RecordingImplMock(new Date(sdArr[i][0]), sdArr[i][1]));\n }\n RecordingList recordingList = new RecordingListImpl(vect);\n\n // list should contains sdArr.length elements\n RecordingList filtered = recordingList.filterRecordingList(null);\n assertNotNull(\"Shouldn't be null\", filtered);\n assertEquals(\"Recording list element count wrong \", sdArr.length, filtered.size());\n }", "public List<Map> getWatchListBasedOnUserName(String userName);", "public List<String> recordedDateList();", "@Override\n\tpublic List<Watch> getWatchByUser(String userId) throws Exception {\n\t\treturn null;\n\t}", "public List<T> values() {\n return values(System.currentTimeMillis());\n }", "@Override\r\n\tpublic List<RegistryRecordContainer> getRecordContainers(RegistryRecord stub) {\r\n\t\treturn recordContainerDao.findRecordContainers(stub.getId());\r\n\t}", "private StudentRecord[] getList() {\r\n\t\treturn this.list;\r\n\t}", "public ArrayList<Record> getAllSavedRecords() {\n ArrayList<Record> resultList = new ArrayList<>();\n\n File baseFolder = getBaseFolder();\n if (baseFolder != null) {\n String[] allRecords = baseFolder.list();\n if (allRecords == null || allRecords.length == 0) {\n return resultList;\n }\n\n for (String eachRecord : allRecords) {\n Record record = loadRecordFromFolderName(eachRecord);\n if (record == null) {\n continue;\n }\n updateRecordCurrentSize(record);\n updateRecordCurrentImageCount(record);\n resultList.add(record);\n }\n }\n\n if (resultList.size() > 0) {\n sortRecordList(resultList);\n }\n return resultList;\n }", "public String getWatchedFields() {\n return watchedFields;\n }", "List<TrackerPayload> getBuffer();", "ImmutableList<SchemaOrgType> getRecordedAtList();", "Collection<RecordType> getRecordTypes() throws TypeException, InterruptedException;", "public List<T> getAll() {\n return Arrays.asList(buffer);\n }", "public List<List<Float>>getWingRecords(){\n List<List<Float>> tempList = new ArrayList<>();\n tempList.add(this.getRightMainWingInclinationLog());\n tempList.add(this.getAngleOfAttackRightMainWingLog());\n tempList.add(this.getLeftMainWingInclinationLog());\n tempList.add(this.getAngleOfAttackLeftMainWingLog());\n tempList.add(this.getHorStabWingInclinationLog());\n tempList.add(this.getAngleOfAttackHorStabWingLog());\n tempList.add(this.getVerStabWingInclinationLog());\n tempList.add(this.getAngleOfAttackVerStabWingLog());\n\n return tempList;\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}", "public List<String> getRunLogAsList();", "static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }", "noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord[] getTaskmonitorrecordArray();", "public List<LocalDateTime> getAllTimes() {\n\t\tList<LocalDateTime> allTimes = new ArrayList<LocalDateTime>();\n\t\tallTimes.add(shiftStartTime);\n\t\tallTimes.add(bedtime);\n\t\tallTimes.add(shiftEndTime);\n\t\treturn allTimes;\n\t}", "public ListProxy watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }", "public final void testCreateRecordingListIterator_1() throws Exception\n {\n Vector vect = new Vector();\n long sdArr[][] = { { 0, 10 }, { 0, 12 }, { 0, 8 }, { -5, 20 }, { -5, 13 }, { -5, 15 }, { -5, -7 }, { 2, 10 },\n { 2, 8 }, { 2, 2 }, { 12, 14 }, { -5, 5 }, { 10, 2 } };\n\n // patch all numbers up by 100 to keep the order but to rid the negative\n // numbers\n patchArray(sdArr, 100);\n\n for (int i = 0; i < sdArr.length; i++)\n {\n vect.addElement(new RecordingImplMock(new Date(sdArr[i][0]), sdArr[i][1]));\n }\n RecordingList recordingList = new RecordingListImpl(vect);\n RecordingListIterator rli = recordingList.createRecordingListIterator();\n\n assertNotNull(\"recordingList returned null\", rli);\n assertTrue(\"Object not an instance of RecordingListIterator\", rli instanceof RecordingListIterator);\n }", "public Iterable<MedicalRecord> list() {\n return medicalRecordList;\n }", "noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord getTaskmonitorrecordArray(int i);", "public native Record[] findAll(Map properties) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(@com.smartgwt.client.util.JSOHelper::convertMapToJavascriptObject(Ljava/util/Map;)(properties));\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "public Vector toVector()\n\t{\n\t\tVector listeners = new Vector();\n\t\tlisteners.addElement(this);\n\n\t\treturn listeners;\n\t}", "public native Record[] findAll(String propertyName, Date value) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(propertyName, @com.smartgwt.client.util.JSOHelper::convertToJavaScriptDate(Ljava/util/Date;)(value));\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "private List<Map<Species, Integer>> getObservedSpeciesMaps() {\n List<Map<Species, Integer>> observedSpeciesMap = new ArrayList<>(observedSpecies.size());\n for (WatchList watchList : observedSpecies.values()) {\n observedSpeciesMap.add(watchList.getObservedSpeciesMap());\n }\n return observedSpeciesMap;\n }", "@NonNull\n public List<Swatch> getSwatches() {\n return Collections.unmodifiableList(mSwatches);\n }", "public Set<AngularClientVariableWatcher> getAngularWatchers()\n\t{\n\t\tif (angularWatchers == null)\n\t\t{\n\t\t\tangularWatchers = new LinkedHashSet<>();\n\t\t}\n\t\treturn angularWatchers;\n\t}", "public WFJFilterMap[] asArray() {\n synchronized (lock) {\n return array;\n }\n }", "public native Record[] findAll(String propertyName, String value) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(propertyName, value);\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "public Object[] toArray() {\r\n\t\treturn this.records.toArray();\r\n\t}", "public AllRecords getAllRecords() {\n\t\treturn fileService.withFile(FILE_NAME, new AllRecords(), file -> {\n\t\t\tvar records = fileService.readFile(file, AllRecords.class);\n\t\t\trecords.easy = sort(records.easy);\n\t\t\trecords.medium = sort(records.medium);\n\t\t\trecords.hard = sort(records.hard);\n\t\t\treturn records;\n\t\t});\n\t}", "public List<BillingRecord> list() {\n\t\tList<BillingRecord> billingRecords = new ArrayList<BillingRecord>();\n\t\tbillingRecords = billingRecordRepo.findAll();\n\t\treturn billingRecords;\n\t}", "public List<Observer> getList() {\n return list;\n }", "ListRecordHistoryResult listRecordHistory(ListRecordHistoryRequest listRecordHistoryRequest);", "public CallLog[] getCallLogs();", "public java.util.List<org.landxml.schema.landXML11.TimingDocument.Timing> getTimingList()\r\n {\r\n final class TimingList extends java.util.AbstractList<org.landxml.schema.landXML11.TimingDocument.Timing>\r\n {\r\n public org.landxml.schema.landXML11.TimingDocument.Timing get(int i)\r\n { return IntersectionImpl.this.getTimingArray(i); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing set(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.setTimingArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.TimingDocument.Timing o)\r\n { IntersectionImpl.this.insertNewTiming(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.TimingDocument.Timing remove(int i)\r\n {\r\n org.landxml.schema.landXML11.TimingDocument.Timing old = IntersectionImpl.this.getTimingArray(i);\r\n IntersectionImpl.this.removeTiming(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfTimingArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new TimingList();\r\n }\r\n }", "public RecordsList listRecords(ResumptionToken resumptionToken) throws OAIException {\n try {\n \tString query = builder.buildListRecordsQuery(resumptionToken);\n \tDocument document = reader.read(query);\n return new RecordsList(document);\n } catch (ErrorResponseException e) {\n \tthrow e;\n } catch (Exception e) {\n throw new OAIException(e);\n }\n }", "@Override\n @Transactional(readOnly = true)\n public List<RecordDTO> findAll() {\n log.debug(\"Request to get all Records\");\n return recordRepository.findAll().stream()\n .map(recordMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public static List<Record> getRecords(String tableName, String rowKey)\n\t\t\tthrows IOException {\n\t\tHTable table = connectTable(tableName);\n\t\tScan s = new Scan(rowKey.getBytes());\n\n\t\tResultScanner ss = table.getScanner(s);\n\t\tRecord rec;\n\t\tList<Record> list = new ArrayList<Record>();\n\t\tfor (Result r : ss) {\n\t\t\tfor (KeyValue kv : r.raw()) {\n\t\t\t\trec = new Record();\n\t\t\t\trec.setTable(tableName);\n\t\t\t\trec.setRowKey(new String(kv.getRow()));\n\t\t\t\trec.setFamily(new String(kv.getFamily()));\n\t\t\t\trec.setQualifier(new String(kv.getQualifier()));\n\t\t\t\trec.setTimestamp(kv.getTimestamp());\n\t\t\t\trec.setValue(new String(kv.getValue()));\n\t\t\t\tlist.add(rec);\n\t\t\t}\n\t\t}\n\t\treleaseTable(table);\n\t\treturn list;\n\t}", "public List<T> getSavedObjects() {\n // Lazily generate the object, in case it's not needed.\n if (objects == null) {\n if (dbObjects.length > 0) {\n if (dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Saved object retrieval not supported when using stream serialization\");\n }\n }\n objects = jacksonDBCollection.convertFromDbObjects(dbObjects);\n }\n return objects;\n }", "@Override\n public ASTRecordComponentList getRecordComponents() {\n return getFirstChildOfType(ASTRecordComponentList.class);\n }", "private Changelist[] getChanges() {\n String depot = parent.getDepot();\n String counterName = parent.getCounter();\n Client client = Client.getClient();\n\n // Obtain the most recent changelist available on the client\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Obtain the lower boundary for the changelist results\n Counter counter = Counter.getCounter(counterName);\n int counterVal = 0;\n if (counter != null) {\n counterVal = counter.getValue();\n } else {\n counterVal = toChange.getNumber();\n }\n\n return Changelist.getChanges(depot, counterVal, toChange.getNumber());\n }", "public static double[][] getRecords() throws RemoteException \n\t{\n\t\tfor(int x= 0; x <= 100; x++)\n\t {\n\t\t \n\t\t info[x][1] = (int) records[x][1].m_leaderPrice; \n\t\t info[x][2] = (int) records[x][2].m_followerPrice; \n\t\t \n\t\t}\n\t\t\n\t\treturn info;\n\t}", "public ListNamespacedSubscription watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }", "@Override\n\tpublic List<TfLoss> queryTempList(TfLoss record) {\n\t\treturn tfLossMapper.queryTempList(record);\n\t}", "public final static ArrayList<BasicKeyedField> getRecordTypes() {\n \tArrayList<BasicKeyedField> ret = new ArrayList<BasicKeyedField>();\n \tBasicKeyedField fld;\n\n \tfor (int i = 0; i < names.length && ! \"\".equals(names[i]); i++) {\n \t\t\tfld = new BasicKeyedField();\n\t\t\tfld.key = keys[i];\n\t\t\tfld.name = names[i];\n\t\t\tret.add(fld);\n \t}\n\n \treturn ret;\n }", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}", "public OpenERPRecordSet() {\r\n\t\trecords = new Vector<OpenERPRecord>();\r\n\t}", "public List<Test> getAllRecord() {\n\t\tList<Test> lis=(List<Test>)testRepository.findAll();\n\t\treturn lis;\n\t}", "private List<DataRecord> loadRefTableChanges() {\n \n final DataSource changesDataSource =\n ProjectUpdateWizardUtilities\n .createDataSourceForTable(ProjectUpdateWizardConstants.AFM_FLDS_TRANS);\n changesDataSource.addRestriction(Restrictions.in(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHANGE_TYPE, DifferenceMessage.NEW.name()\n + \",\" + DifferenceMessage.REF_TABLE.name()));\n changesDataSource.addRestriction(Restrictions.eq(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHOSEN_ACTION,\n Actions.APPLY_CHANGE.getMessage()));\n\n return changesDataSource.getRecords();\n }", "INexusFilterDescriptor[] getFilterDescriptorHistory();", "public native Record[] findAll(String propertyName, boolean value) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(propertyName, value);\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "private List<Record> readRecords(JsonReader reader) throws Exception {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n List<Record> result = new ArrayList<>();\n reader.beginArray();\n while (reader.hasNext()) {\n String dateStr = null;\n String reasonStr = null;\n reader.beginObject();\n while (reader.hasNext()) {\n String name = reader.nextName();\n if (name.equals(\"date\")) {\n dateStr = reader.nextString();\n } else if (name.equals(\"reason\")) {\n reasonStr = reader.nextString();\n } else {reader.skipValue();}\n }\n reader.endObject();\n Date date = df.parse(dateStr);\n Reason reason = Reason.valueOf(reasonStr);\n result.add(new Record(date, reason));\n }\n reader.endArray();\n return result;\n }", "@RequestMapping(\"/api/oneTimeRecords\")\n\tpublic List<OneTimeCustomerRecord> oneTimeRecords() {\n\n\t\tLOGGER.info(\"Method entry {}\", oneTimeRecordsMethod);\n\n\t\tList<OneTimeCustomerRecord> customerRecordsList = null;\n\n\t\ttry {\n\n\t\t\t// Invoke onetimerecordservice method\n\t\t\tcustomerRecordsList = oneTimeRecordService.findAll();\n\n\t\t} catch (ServiceException e) {\n\t\t\tLOGGER.error(\"Exception occurred while fetching the data.\", e);\n\t\t}\n\n\t\tLOGGER.info(\"Method exit {}\", oneTimeRecordsMethod);\n\n\t\treturn customerRecordsList;\n\n\t}", "public ElevatorServiceStatus getRecords() {\n return new ElevatorServiceStatus(totalWaitTime, totalTravelTime, \n totalTravelDistance.toBigInteger(), passengersServed);\n }", "public ListConsole watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }", "public List<LogEvent> getEvents() {\n return publicEvents;\n }", "public ArrayList<Object> readTrendBuffer(){\n try {\n ReadRangeAck ack = DeviceService.localDevice.send(bacnetDevice, new ReadRangeRequest(getObjectIdentifier(),\n PropertyIdentifier.logBuffer, null,\n new ReadRangeRequest.ByPosition(0,1000))).get();\n return new ArrayList<>(ack.getItemData().getValues());\n } catch (BACnetException e) {\n LOG.warn(\"Can't read {} of: {}\",PropertyIdentifier.logBuffer.toString(),getObjectName());\n }\n return null;\n }", "public final String[] toStrings() {\n String[] txtRecords = new String[records.size() + 1];\n String headers = \"\";\n boolean debut = true;\n\n /*\n * If the line is the first line, print headers (name of attributes\n * printed).\n */\n for (int i = 0; i < attributes.length; i++) {\n if (debut) {\n debut = false;\n } else {\n headers += \";\";\n }\n headers += attributes[i];\n }\n txtRecords[0] = headers;\n\n /*\n * Get an iterator from the Vector (note that hashmap sets also support\n * iterators), and iterate over the set.\n */\n Iterator iterator = records.iterator();\n for (int i = 1; i < records.size() + 1; i++) {\n Record tmpRecord = (Record) iterator.next();\n txtRecords[i] = \"\";\n debut = true;\n\n /*\n * For each record, extract all attributes in the order they have\n * been entered in the report.\n */\n for (int j = 0; j < attributes.length; j++) {\n if (debut) {\n debut = false;\n } else {\n txtRecords[i] += \";\";\n }\n txtRecords[i] += tmpRecord.getAttribute(attributes[j]);\n }\n }\n return txtRecords;\n }", "public Flight[] getFlights() {\n return flights.toArray(new Flight[0]).clone();\n }", "public native Record[] findAll(String propertyName, int value) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.findAll(propertyName, value);\r\n return recordsJS == null || recordsJS === undefined ? null : @com.smartgwt.client.data.Record::convertToRecordArray(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "public double[] getObservations()\n {\n return Arrays.copyOf(observations, observations.length);\n }", "private List<String> readRecord(JsonObject workItem) throws AutomicException {\n List<String> record = new ArrayList<String>(resultFields.size());\n for (String field : resultFields) {\n JsonElement jeObj = workItem.get(field);\n String value = null;\n if (jeObj != null && jeObj.isJsonPrimitive()) {\n value = jeObj.getAsString();\n } else if (jeObj != null && jeObj.isJsonObject()) {\n JsonObject jObj = (JsonObject) jeObj;\n if (jObj.has(\"_refObjectName\")) {\n value = jObj.get(\"_refObjectName\").getAsString();\n }\n }\n record.add(value);\n }\n return record;\n }", "public RebateChanges[] getRebateChanges() {\n return this.rebateChanges;\n }", "public static ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllRecordingDate_asNode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_asNode(model, instanceResource, RECORDINGDATE);\r\n\t}", "protected Vector collectFields() {\n Vector fields = new Vector(1);\n fields.addElement(this.getField());\n return fields;\n }", "public List getFieldValues()\n {\n return (List) m_values.clone();\n }", "public native RecordList getRangeAsRecordList(int start, int end) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.getRange(start, end);\r\n return (recordsJS == null || recordsJS === undefined) ? null :\r\n @com.smartgwt.client.data.RecordList::new(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "@Override\r\n\tpublic List<Logbook> viewRecords() {\n\t\treturn user.viewRecords();\r\n\t}", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Row> \n getRowList();", "public static void listRecords() {\r\n\t\t/*\r\n\t\t * the loop syntax below is short for for (Iterator i = td.iterator();\r\n\t\t * i.hasNext();) { TelephoneRecord tr = (TelephoneRecord) i.next(); Look\r\n\t\t * at the API docs for java.util.Iterator to see how iterators work.\r\n\t\t */\r\n\t\tfor (Object o : td) {\r\n\t\t\tTelephoneRecord tr = (TelephoneRecord) o;\r\n\t\t\tSystem.out.println(tr);\r\n\t\t}\r\n\t}", "List<Stop> getStops();", "private List<E> snapshot() {\n\t\tList<E> list = Lists.newArrayListWithExpectedSize(size());\n\t\tfor (Multiset.Entry<E> entry : entrySet()) {\n\t\t\tE element = entry.getElement();\n\t\t\tfor (int i = entry.getCount(); i > 0; i--) {\n\t\t\t\tlist.add(element);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "public Collection<String> getSupportedRecordTypes() {\n\t\tif (this.supportedRecordTypes == null){ this.supportedRecordTypes=new ArrayList<>();}\n\t\treturn supportedRecordTypes;\n\t}", "public float[] getByteHistory() {\n return byteMonitor.getHistory();\n }" ]
[ "0.64948785", "0.64625335", "0.6203842", "0.6125305", "0.5937461", "0.5912316", "0.5864522", "0.583666", "0.5764396", "0.57268226", "0.5688524", "0.56432104", "0.55716866", "0.5567748", "0.5384129", "0.5364308", "0.5357275", "0.5356088", "0.53132373", "0.52708054", "0.5264081", "0.52595454", "0.52586806", "0.5228315", "0.5218326", "0.51905817", "0.5183559", "0.517125", "0.51552206", "0.5149586", "0.51271045", "0.5103375", "0.5052467", "0.5012315", "0.50078213", "0.49555758", "0.49408174", "0.49169898", "0.49109918", "0.4903368", "0.49005443", "0.48996618", "0.48992854", "0.48939508", "0.48932245", "0.48858982", "0.48838595", "0.48551515", "0.48441854", "0.4837513", "0.48262152", "0.48249915", "0.48107654", "0.48077506", "0.47985753", "0.47618532", "0.47577757", "0.47566432", "0.47540247", "0.47523203", "0.47474733", "0.4747167", "0.4742254", "0.47409615", "0.47230652", "0.47216955", "0.47065172", "0.47046885", "0.4702321", "0.46979856", "0.46940765", "0.46886814", "0.46840477", "0.46818262", "0.4671122", "0.46670547", "0.466691", "0.46558693", "0.46533635", "0.46503872", "0.4647314", "0.46372977", "0.4635564", "0.46348417", "0.46344638", "0.46310687", "0.46257508", "0.46191356", "0.46188906", "0.46153316", "0.46137768", "0.46053448", "0.46020085", "0.45999944", "0.45996237", "0.45880967", "0.45862246", "0.45767", "0.45764187", "0.45747563" ]
0.77059823
0
Create or update a watch on a page. the page key specifies the page. The long value is the time of "last seen" which will be used to determine if the page has changed since that time.
public void addWatch(String pageKey, long seenTime) throws Exception { DOMFace newSR = createChildWithID("watch", DOMFace.class, "pagekey", pageKey); newSR.setAttributeLong("lastseen",seenTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void updateLockedMetadata(String key, long value);", "private void addDoc(String path, SnapshotVersion readTime, String field, int value) {\n MutableDocument doc = doc(path, 10, map(field, value));\n remoteDocumentCache.add(doc, readTime);\n }", "public native static int ULTRALIGHT_LockPage(long hr ,long ht,byte pageType);", "@Override\n public WikiPageInfo updateWikiPage(WikiPageInfo page) \n {\n if (page.getNodeRef() == null)\n {\n throw new IllegalArgumentException(\"Can't update a page that was never persisted, call create instead\");\n }\n \n NodeRef nodeRef = page.getNodeRef();\n String nodeName = buildName(page.getTitle());\n \n // Handle the rename case\n boolean renamed = false;\n if (! nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE).equals(page.getTitle()))\n {\n try\n {\n fileFolderService.rename(nodeRef, nodeName);\n renamed = true;\n }\n catch (FileNotFoundException e)\n {\n throw new AlfrescoRuntimeException(\"Invalid node state - wiki page no longer found\");\n }\n nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, nodeName);\n nodeService.setProperty(nodeRef, ContentModel.PROP_TITLE, page.getTitle());\n }\n \n // Change the content\n ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);\n writer.setMimetype(MimetypeMap.MIMETYPE_HTML);\n writer.setEncoding(\"UTF-8\");\n writer.putContent(page.getContents());\n \n // Now do the tags\n taggingService.setTags(nodeRef, page.getTags());\n \n // If we re-named, re-create the object\n if (renamed)\n {\n page = buildPage(nodeRef, page.getContainerNodeRef(), nodeName, page.getContents());\n }\n \n // All done\n return page;\n }", "private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }", "void setLastWriteTime(String path, long newTime) throws IOException;", "public static void addPageHit(long time) {\r\n _count++;\r\n _time += time;\r\n if (_serverStarted == -1)\r\n _serverStarted = System.currentTimeMillis();\r\n }", "@Test\n public void updateIncreasesTimer() {\n BotMemoryRecord record = new BotMemoryRecord();\n record.store(Point.pt(5, 5));\n\n record.update(100);\n\n assertThat(record.getTimeSinceLastSeen(), is(100L));\n }", "public void entryTouched(OldOldCache.Entry entry);", "void updateLastAccessed(int id);", "private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }", "ValueType put(long key, ValueType entry);", "void setLastAccessTime(String path, long newTime) throws IOException;", "long getUpdated();", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid= page.getId();\n HeapPageId hpid= (HeapPageId)pid;\n\n RandomAccessFile rAf=new RandomAccessFile(f,\"rw\");\n int offset = pid.pageNumber()*BufferPool.PAGE_SIZE;\n byte[] b=new byte[BufferPool.PAGE_SIZE];\n b=page.getPageData();\n rAf.seek(offset);\n rAf.write(b, 0, BufferPool.PAGE_SIZE);\n rAf.close(); \n page.markDirty(false,null); \n }catch (IOException e){\n e.printStackTrace();\n }\n\n }", "void setLastUpdatedTime();", "@NoProxy\n public void updateStag(final Timestamp val) {\n DateTime dt = new DateTime(val);\n// dt.setUtc(true);\n\n setStag(new LastModified(dt).getValue() + \"-\" +\n hex4FromNanos(val.getNanos()));\n }", "public int updateEntry(String cid, Date eventTime, String key, String type, Map<String,String> map){\r\n\t\t//modify previous entry first to a site_visit\r\n\t\tCustomer cust = treeData.get(cid);\r\n\t\tif (cust == null){\r\n\t\t//\tif (type.equalsIgnoreCase(sConstants.CUSTOMER))\r\n\t\t//\t\treturn sConstants.NOT_EXIST;\r\n\t\t\tcust = new MyCustomer(cid, eventTime, null); \r\n\t\t}\r\n\t\tcust.update(eventTime, key, type, map);\r\n\t if (eventTime.before(first))\r\n\t \tfirst = eventTime;\r\n\t if (eventTime.after(last))\r\n\t \tlast = eventTime;\r\n\r\n\t\treturn sConstants.SUCCESS;\r\n\t}", "synchronized public static void putLong(Context context, String key, long value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putLong(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "void setLong(String key, long val);", "private void writePref() {\n SharedPreferences.Editor editor = sp.edit();\n long currentTime = System.currentTimeMillis();\n editor.putLong(UPDATE, currentTime);\n editor.commit();\n System.out.println(\"Time of current update: \" + getDateFromLong(currentTime));\n }", "public void update(T gaugeKey, long nextExecTime) {\n getGauge(gaugeKey).update(nextExecTime);\n }", "private WatchKey register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tkeys.put(key, dir);\n\t\treturn key;\n\t}", "private void register(Path dir) throws IOException {\n\t\tWatchKey key = dir.register(watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);\n\t\tif (trace) {\n\t\t\tPath prev = keys.get(key);\n\t\t\tif (prev == null) {\n\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\tlogger.debug(String.format(\"register: %s\\n\", dir));\n\t\t\t} else {\n\t\t\t\tif (!dir.equals(prev)) {\n\t\t\t\t\tif (logger.isDebugEnabled())\n\t\t\t\t\t\tlogger.debug(String.format(\"update: %s -> %s\\n\", prev, dir));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkeys.put(key, dir);\n\t}", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "public int addPageLock(AccessDetailVO requestPage){\r\n \t\r\n \t//Check is Page is already locked\r\n \tsynchronized(pageAccess){\t// Synchronised to avoid race conditions \t\r\n \t\t if(!isPageLocked(requestPage)){ \r\n \t\t\tpageAccess.put(requestPage.getPage(), requestPage);\r\n \t\t\tlogger.info(\"Adding Lock Page: \" + requestPage.toString());\r\n \t\t\treturn 0;\r\n \t\t }else{\r\n \t\t\t return -1;\r\n \t\t }\r\n \t }\r\n }", "public void put(String key, long value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}", "public interface VersionedPageInfo extends PageInfo {\n\n // Magic revisions. Prefer isFoo() methods.\n long UNCOMMITTED = -2;\n long DELETED = -3;\n long RENAMED = -4;\n\n long getRevision();\n String getRevisionName();\n\n long getLastChangedRevision();\n String getLastChangedUser();\n Date getLastChangedDate();\n\n String getLockedBy();\n String getLockToken();\n boolean isLocked();\n boolean isNewOrLockedByUser(String user);\n Date getLockedSince();\n\n boolean isNewPage();\n boolean isDeleted();\n boolean isRenamed();\n boolean isRenamedInThisWiki();\n String getRenamedPageName();\n String getRenamedUrl(LinkResolutionContext linkResolutionContext) throws UnknownWikiException, URISyntaxException;\n\n VersionedPageInfo withoutLockToken();\n\n @Override\n VersionedPageInfo withAlternativeContent(String content);\n\n @Override\n VersionedPageInfo withAlternativeAttributes(Map<String, String> attributes);\n\n}", "private static void AddFileMonitor(MemoryCacheMetaInfo meta) throws IOException {\n // if(meta.CacheType == MemoryCacheType.File)\n // {\n // Path myDir = Paths.get(meta.FilePath);\n // WatchService watcher = myDir.getFileSystem().newWatchService();\n // while (true)\n // {\n // try {\n // WatchKey watchKey = myDir.register(watcher,StandardWatchEventKinds.ENTRY_MODIFY) ;\n // for (WatchEvent<?> event : watchKey.pollEvents()) {\n // WatchEvent<Path> watchEvent = (WatchEvent<Path>) event;\n // WatchEvent.Kind<Path> kind = watchEvent.kind();\n //\n // System.out.println(watchEvent.context() + \", count: \" +\n // watchEvent.count() + \", event: \" + watchEvent.kind());\n // // prints (loop on the while twice)\n // // servers.cfg, count: 1, event: ENTRY_MODIFY\n // // servers.cfg, count: 1, event: ENTRY_MODIFY\n //\n // switch (kind.name()) {\n // case \"ENTRY_MODIFY\":\n // //handleModify(watchEvent.context()); // reload configuration class\n // break;\n // case \"ENTRY_DELETE\":\n // //handleDelete(watchEvent.context()); // do something else\n // break;\n // default:\n // System.out.println(\"Event not expected \" + event.kind().name());\n // }\n // }\n // }\n // catch (IOException e) {\n // e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n // }\n // }\n // }\n }", "public void setUpdated(java.lang.Long value) {\n this.updated = value;\n }", "boolean put(PageId pageId, byte[] page);", "int updateByPrimaryKey(PageFunc record);", "public Builder setPublishTime(long value) {\n \n publishTime_ = value;\n onChanged();\n return this;\n }", "public void addPage(int newPage) {\r\n\t\tpage.addAtTail(newPage);\r\n\t}", "public void recordChange(int page_number) throws PageNotLoadedException{\n\t\tint index = getPageIndexInArrayList(page_number); \n\t\tif (index == -1)\n\t\t\tthrow new PageNotLoadedException();\n//\t\tBoolean newVal = pages_loaded_is_changed.get(index); \n//\t\tnewVal= new Boolean(true);\n\t\tpages_loaded_is_changed.set(index,new Boolean(true));\n\t}", "void setLastWriteTimeUtc(String path, long newTime) throws IOException;", "void update(String page, Collection<String> paths, Collection<String> refreshPaths);", "public interface Watcher<T> {\n /**\n * Notify watcher, that property under {@code key} has changed, and has value {@code value}\n * @param key key of property changed\n * @param value new value of property\n */\n void update(String key, T value);\n}", "void updatePage(String name, String park);", "void doWatch(boolean read, boolean write) throws PlayerDebugException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (read)\n\t\t\t{\n\t\t\t\terr(\"Only break-on-write watchpoints are supported.\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\t/* pull the rest of the line */\n\t\t\tString s = restOfLine();\n\n\t\t\tint flags = 3;\n\t\t\tif(read && write) flags = WatchKind.READWRITE;\n\t\t\telse if(read) flags = WatchKind.READ;\n\t\t\telse if(write) flags = WatchKind.WRITE;\n\n\t\t\t// snapshot of our existing list\n\t\t\tWatch[] list = m_session.getWatchList();\n\n\t\t\t// We need to separate the front part the 'a.b' in 'a.b.c' \n\t\t\t// of the expression to resolve it into a variable \n\t\t\t// We usually get back a VariableFacade which contains\n\t\t\t// the context id (i.e the variable id) and the member name.\n\t\t\tValueExp expr = parseExpression(s);\n\t\t\tVariableFacade result = (VariableFacade)(evalExpression(expr).value);\n\n\t\t\t// extract the 2 pieces and get the raw variable.\n\t\t\tint varId = result.getContext(); // TODO fix this??? -mike\n\t\t\tString memberName = result.getName();\n\t\t\tValue v = m_session.getValue(varId);\n\n\t\t\t// attempt to set.\n\t\t\tWatch w = m_session.setWatch(v, memberName, flags);\n\t\t\tif (w == null)\n\t\t\t{\n\t\t\t\t// failed\n\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\terr(getLocalizationManager().getLocalizedTextString(\"watchpointCouldNotBeSet\", args)); //$NON-NLS-1$\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// if modified then lists are same length\n\t\t\t\t// otherwise 1 will be added\n\t\t\t\tWatch[] newList = m_session.getWatchList();\n\t\t\t\tif (newList.length == list.length)\n\t\t\t\t{\n\t\t\t\t\t// modified, lets locate the one that changed\n\t\t\t\t\t// and reset it\n\t\t\t\t\tint at = missingWatchpointIndexOf(newList);\n\t\t\t\t\tWatchAction a = null;\n\t\t\t\t\ttry\t\n\t\t\t\t\t{ \n\t\t\t\t\t\ta = watchpointAt(at); \n\t\t\t\t\t} \n\t\t\t\t\tcatch(ArrayIndexOutOfBoundsException aio)\n\t\t\t\t\t{\n\t\t\t\t\t\t// this is pretty bad it means the player thinks we have a watchpoint\n\t\t\t\t\t\t// but we don't have a record of it. So let's create a new one\n\t\t\t\t\t\t// and hope that we are now in sync with the player.\n\t\t\t\t\t\ta = new WatchAction(w);\n\t\t\t\t\t}\n\n\t\t\t\t\t// modify our view of the watchpoint\n\t\t\t\t\tint id = a.getId();\n\t\t\t\t\ta.resetWatch(w);\n\n\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\targs.put(\"watchpointNumber\", Integer.toString(id)); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"watchpointMode\", getWatchpointModeString(a.getKind())); //$NON-NLS-1$\n\t\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"changedWatchpointMode\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// newly added\n\t\t\t\t\tWatchAction a = new WatchAction(w);\n\t\t\t\t\twatchpointAdd(a);\n\n\t\t\t\t\tint which = a.getId();\n\t\t\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\t\t\targs.put(\"watchpointNumber\", Integer.toString(which)); //$NON-NLS-1$\n\t\t\t\t\targs.put(\"expression\", s); //$NON-NLS-1$\n\t\t\t\t\tsb.append(getLocalizationManager().getLocalizedTextString(\"createdWatchpoint\", args)); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\tout(sb.toString());\n\t\t\t}\n\t\t}\n\t\tcatch(ArrayIndexOutOfBoundsException aio)\n\t\t{\n\t\t\t// We should really do some cleanup after this exception\n\t\t\t// since it most likely means we can't find the watchpoint\n\t\t\t// that was just modified, therefore our watchlists are\n\t\t\t// out of sync with those of the API.\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"badWatchpointNumber\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(ClassCastException cce)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotResolveExpression\")); //$NON-NLS-1$\n\t\t}\n\t}", "void set(long newValue);", "public void setPage(Page page) {this.page = page;}", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid = page.getId();\n HeapPageId hpid = (HeapPageId) pid;\n\n RandomAccessFile accessor = new RandomAccessFile(f, \"rw\");\n int offset = pid.pageNumber() * BufferPool.PAGE_SIZE;\n byte[] data = new byte[BufferPool.PAGE_SIZE];\n data = page.getPageData();\n\n accessor.seek(offset);\n accessor.write(data, 0, BufferPool.PAGE_SIZE);\n accessor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "List<Update> getUpdates(String page, long minTime);", "public void refer(int page){\n\n if(!hashSet.contains(page)){\n\n if(deque.size() == Cache_Size){\n int last = deque.removeLast();\n hashSet.remove(last);\n }\n }\n else{\n /* The found page may not be always the last element, even if it's an\n intermediate element that needs to be removed and added to the start\n of the Queue */\n deque.remove(page);\n }\n deque.push(page);\n hashSet.add(page);\n }", "public ListOAuth watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }", "public void notifyPage(Webpage page, Weblink link);", "public static void give() {\r\n\t\t\r\n\t\tif (ths.page == 6) {\r\n\t\t\tths.page++;\r\n\t\t\tths.updates1 = updates;\r\n\t\t}\r\n\t}", "public static void updateSavedPage(BlockPos pos, String page) {\n MantleNetwork.INSTANCE.network.sendToServer(new UpdateLecternPagePacket(pos, page));\n }", "public void update(Page currentPage) throws RQLException ;", "public Builder setCreateTime(long value) {\n\n createTime_ = value;\n onChanged();\n return this;\n }", "public void watchDir(Path path) throws IOException, InterruptedException { \n try (WatchService watchService = FileSystems.getDefault().newWatchService()) {\n \n //2. Registering Objects with the Watch Service.\n path.register(watchService, StandardWatchEventKinds.ENTRY_CREATE,\n StandardWatchEventKinds.ENTRY_MODIFY, StandardWatchEventKinds.ENTRY_DELETE);\n /*\n * 3. Waiting for the Incoming Events.\n * start an infinite loop\n */\n while (true) {\n\n /*\n * 4.Getting a Watch Key.\n * retrieve and remove the next watch key\n */\n final WatchKey key = watchService.take();\n\n /*\n * 5. Retrieving Pending Events for a Key.\n * get list of pending events for the watch key * \n */\n for (WatchEvent<?> watchEvent : key.pollEvents()) {\n \n /*\n * 6. Retrieving the Event Type and Count.\n * get the kind of event (create, modify, delete) * \n */\n final Kind<?> kind = watchEvent.kind();\n\n //handle OVERFLOW event\n if (kind == StandardWatchEventKinds.OVERFLOW) {\n continue;\n }\n\n /*\n * 7. Retrieving the File Name Associated with an Event.\n * get the filename for the event * \n */\n final WatchEvent<Path> watchEventPath = (WatchEvent<Path>) watchEvent;\n final Path filename = watchEventPath.context();\n\n //print it out\n out.println(kind + \" -> \" + filename);\n }\n \n /*\n * 8. Putting the Key Back in Ready State.\n * reset the key\n */ \n boolean valid = key.reset();\n\n //exit loop if the key is not valid (if the directory was deleted, for example)\n if (!valid) {\n break;\n }\n }\n }\n }", "TimelineMeta update(TimelineMeta meta);", "public void setPage(Page page)\r\n {\r\n this.pageId = page.getId();\r\n }", "void put(K key, V value, long expireMs);", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n \ttry {\n\t \tRandomAccessFile raf = new RandomAccessFile(m_f, \"rw\");\n\t \traf.seek(page.getId().pageNumber() * BufferPool.PAGE_SIZE);\n\t\t\traf.write(page.getPageData(), 0, BufferPool.PAGE_SIZE);\n\t\t\traf.close();\n \t} catch (IOException e){\n \t\te.printStackTrace();\n \t}\n \t\n }", "void updateLastLogin(@Param(\"key\") int key);", "int updateByPrimaryKey(Crawl record);", "void lease(String page, String uid, String path, String userId) throws UserNotFoundException, RejectedException;", "@Override\r\n\tpublic void update(ReportingUrlCreation transientInstance){\n\t\ttry {\r\n\t\t\tgetSession().update(transientInstance);\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tre.printStackTrace();\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t}", "private void updatePage(List<HashMap<String, Object>> cheeseCounts)\n\t{\n populateUserView();\n\t\trefreshFriendsListview(cheeseCounts, true, null);\n\t\tpopulateHistoryListView();\n\t}", "public void notifyMonitorOnUpdate(int index)\r\n {\r\n int selectedIndex = WatchListTableModule.this.tabPane.getSelectedIndex();\r\n GregorianCalendar t1 = new GregorianCalendar();\r\n if (index == selectedIndex)\r\n {\r\n this.lastUpdate = t1;\r\n }\r\n debug(\r\n \"WatchListMonitorTask::notifyMonitorOnUpdate() - Table \"\r\n + index\r\n + \" - Time is \"\r\n + ParseData.format(t1.getTime(), \"hh:mm:ss\"));\r\n WatchListTableModule.this.setStatusBar(\r\n \"WatchList [\"\r\n + WatchListTableModule.this.tabPane.getTitleAt(index)\r\n + \"] - Last Update \"\r\n + ParseData.format(t1.getTime(), \"hh:mm:ss\"));\r\n }", "public void updateRecentChange(String s){\n\t\trecentChange = s;\n\t}", "public void update(final long key) {\n update(key, 1);\n }", "public static void setLongValue(final String prefFile, final String key, final long value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putLong(key, value);\n editor.apply();\n }", "public void setWebstoreLastUpdated(Timestamp webstoreLastUpdated) {\n this.webstoreLastUpdated = webstoreLastUpdated;\n }", "void setUserUpdated(final Long userUpdated);", "public void setPage(org.biocatalogue.x2009.xml.rest.PageParameter page)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.PageParameter target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().find_element_user(PAGE$2, 0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.PageParameter)get_store().add_element_user(PAGE$2);\r\n }\r\n target.set(page);\r\n }\r\n }", "public void setCreated(java.lang.Long value) {\n this.created = value;\n }", "public void put(@PAGE int page, CharSequence info) {\n mPageSummary.put(page, info);\n }", "long getLastChanged();", "void setCreationTime(String path, long newTime) throws IOException;", "int updateByPrimaryKey(EvaluationRecent record);", "public void updateLastSeenTime() {\n\t\tsetLastSeenDate(new Date());\n\t}", "public void mo23021d() {\n this.f26122b.edit().putLong(\"last.refresh.otherapp\", System.currentTimeMillis()).apply();\n }", "public synchronized void update(long entry, String type, String path)\n throws IOException {\n if (type == null)\n throw new IllegalArgumentException(\"Type cannot be null\");\n if (path == null)\n throw new IllegalArgumentException(\"Path cannot be null\");\n \n // Check if the new path fits the current index\n int typeLengthInBytes = type.getBytes().length;\n int pathLengthInBytes = path.getBytes().length;\n \n // Make sure there is still room left for an additional entry. One entry\n // consists of the uuid, the path and a closing '\\n'\n if (typeLengthInBytes >= bytesPerType || pathLengthInBytes >= bytesPerPath) {\n \n // Make sure the type field is long enough\n int newBytesPerType = bytesPerType;\n if (typeLengthInBytes >= bytesPerType) {\n logger.info(\"Type doesn't fit, triggering index resize\");\n while (newBytesPerType < typeLengthInBytes)\n newBytesPerType *= 2;\n }\n \n // Make sure the path field is long enough\n int newBytesPerPath = bytesPerPath;\n if (pathLengthInBytes >= bytesPerPath) {\n logger.info(\"Path doesn't fit, triggering index resize\");\n while (newBytesPerPath < pathLengthInBytes)\n newBytesPerPath *= 2;\n }\n \n bytesPerSlot = resize(bytesPerId, newBytesPerType, newBytesPerPath);\n }\n \n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n \n // Write the path to the index\n idx.seek(startOfEntry);\n idx.skipBytes(bytesPerId);\n idx.write(type.getBytes());\n idx.write(new byte[bytesPerType - type.getBytes().length]);\n idx.write(path.getBytes());\n idx.writeChar('\\n');\n idx.write(new byte[bytesPerPath - pathLengthInBytes - 2]);\n \n logger.debug(\"Updated uri at address '{}' to {}\", entry, path);\n }", "public static void updateLastViewed(String caller, Context context) {\n Map<String, String> map = Utility.getRegistrationEntry(context);\n Log.d(MainActivity.APP_TAG, caller + \" Time: \" + (new Date()));\n if (map != null && map.size() > 0) {\n Utility.updateRegistrationEntry(context);\n } else {\n Utility.addRegistrationEntry(context);\n }\n }", "public static void updateSavedPage(@Nullable Player player, InteractionHand hand, String page) {\n if (player != null) {\n ItemStack item = player.getItemInHand(hand);\n if (!item.isEmpty()) {\n BookHelper.writeSavedPageToBook(item, page);\n MantleNetwork.INSTANCE.network.sendToServer(new UpdateHeldPagePacket(hand, page));\n }\n }\n }", "public static boolean putCounter(UltraSearchSessions.Session session, HugeType type, long num){\n JSONObject obj = new JSONObject();\n //obj.put(\"put\", docID);\n\n JSONObject fields = new JSONObject();\n fields.put(\"ID\", num);\n fields.put(\"SCHEMA_TYPE\", type.name());\n\n obj.put(\"fields\", fields);\n //session.add(docID, obj.toString());\n session.postDoc(TABLE, type.name(), obj.toString());\n\n return true;\n }", "void setLastAccessTimeUtc(String path, long newTime) throws IOException;", "public final int update(final Page page) throws DAOException {\n String query = \"UPDATE pages SET name=? description=?, json=? WHERE id=?\";\n\n int result = 0;\n Connection con = null;\n PreparedStatement pstmt = null;\n\n try {\n con = JDBCDAOFactory.getConnection();\n con.setAutoCommit(false);\n pstmt = con.prepareStatement(query);\n if (page.getName() != null) {\n pstmt.setString(1, page.getName());\n } else {\n pstmt.setNull(1, Types.VARCHAR);\n }\n if (page.getDescription() != null) {\n pstmt.setString(2, page.getDescription());\n } else {\n pstmt.setNull(2, Types.VARCHAR);\n }\n if (page.getDescription() != null) {\n pstmt.setString(3, page.getJson());\n } else {\n pstmt.setNull(3, Types.VARCHAR);\n }\n pstmt.setInt(4, page.getId());\n result = pstmt.executeUpdate();\n con.commit();\n } catch (SQLException ex) {\n throw new DAOException(ex);\n } finally {\n DBUtils.closeStatement(pstmt);\n DBUtils.closeConnection(con);\n }\n return result;\n }", "private void markUnusedPagesDirty(long nextPageId) throws IgniteCheckedException {\n while (nextPageId != 0L) {\n long pageId = nextPageId;\n\n long page = acquirePage(pageId, IoStatisticsHolderNoOp.INSTANCE);\n try {\n long pageAddr = writeLock(pageId, page);\n\n try {\n PagesListMetaIO io = PagesListMetaIO.VERSIONS.forPage(pageAddr);\n\n io.resetCount(pageAddr);\n\n if (needWalDeltaRecord(pageId, page, null))\n wal.log(new PageListMetaResetCountRecord(grpId, pageId));\n\n nextPageId = io.getNextMetaPageId(pageAddr);\n }\n finally {\n writeUnlock(pageId, page, pageAddr, true);\n }\n }\n finally {\n releasePage(pageId, page);\n }\n }\n }", "public void setWatcher(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localWatcherTracker = true;\r\n } else {\r\n localWatcherTracker = false;\r\n \r\n }\r\n \r\n this.localWatcher=param;\r\n \r\n\r\n }", "private boolean checkTimeStamp(File file) {\n // uses sharedpreferences\n return (lastUpdate < file.getModifiedDate().getValue());\n }", "long getTsUpdate();", "public long getUpdate();", "void setRetrievedTime(long retrievedTime);", "public void setPage(Page page) {\n this.page=page;\n }", "public void setPage(Page page) {\n this.page=page;\n }", "public void setRefreshValue(String pageName, int newValue) {\n setPageProperty(pageName, \"console.refresh\", newValue);\n }", "void doLogicalPutIfAbsentVersioned(Object key, Object value, long version);", "private void watchDir(Path path) {\n if (watcher_service != null && watcher_thread != null) {\n watcher_service.registerAll(path);\n } else {\n try {\n watcher_service = new WatchService(path, true);\n watcher_thread = new Thread(watcher_service);\n watcher_thread.setName(\"WatchService\");\n watcher_thread.start();\n } catch (IOException e) {\n logger.severe(\"Watch service malfunction, failed to start the service, no changes will be recorded.\");\n }\n }\n }", "Snapshot.Update update();", "public void update( long timestamp, Number value );", "public static void setPreference(String key, long value) {\n editor = sharedPreferences.edit();\n\n editor.putLong(key, value);\n editor.apply();\n }", "long getLastUpdatedTime();", "public void writePage(Page page) throws IOException {\n \tHeapPage heapPage = (HeapPage)page;\n \tbyte[] byteArray = heapPage.getPageData();\n \t\n \tint pageNumber = heapPage.getId().pageno();\n \tint offSet = (pageNumber)*BufferPool.PAGE_SIZE;\n \t\n \tRandomAccessFile oStream = null;\n \t\n \toStream = new RandomAccessFile(file,\"rw\");\n \toStream.skipBytes(offSet);\n \toStream.write(byteArray);\n }", "public Builder setLastAccessAt(long value) {\n\n lastAccessAt_ = value;\n bitField0_ |= 0x00000008;\n onChanged();\n return this;\n }", "public ListBuild watch(Boolean watch) {\n put(\"watch\", watch);\n return this;\n }", "public void counter(MetricCounter<Long> metric, long value);" ]
[ "0.5128029", "0.49349114", "0.48655352", "0.48344487", "0.48057038", "0.47748587", "0.4676396", "0.46011296", "0.45766792", "0.4575946", "0.45755938", "0.45582852", "0.45508447", "0.454611", "0.4499775", "0.44921806", "0.44866943", "0.4468093", "0.4462702", "0.4461278", "0.4444832", "0.44263643", "0.44225445", "0.44198525", "0.4414057", "0.44138312", "0.4411699", "0.44086513", "0.4404692", "0.4377034", "0.4357167", "0.4356765", "0.43509206", "0.43440172", "0.43402758", "0.4334384", "0.43315893", "0.43227315", "0.43091986", "0.4308998", "0.4294831", "0.42919615", "0.42828545", "0.42757347", "0.42533845", "0.4251718", "0.42508754", "0.4239325", "0.4238531", "0.42347947", "0.4219468", "0.42183205", "0.42095837", "0.41927212", "0.4178033", "0.41718927", "0.41680837", "0.41644776", "0.4164066", "0.41613793", "0.4160654", "0.41551584", "0.41538727", "0.415276", "0.4147364", "0.4144373", "0.41414055", "0.41411915", "0.41334468", "0.41249838", "0.41218656", "0.41159293", "0.41153267", "0.4114086", "0.4112434", "0.41068134", "0.41018546", "0.40825674", "0.40814388", "0.40776858", "0.4052568", "0.405232", "0.40362838", "0.4031575", "0.4031365", "0.40303063", "0.40283772", "0.40276098", "0.40276098", "0.40196708", "0.40167734", "0.4016734", "0.4015204", "0.40144363", "0.40018186", "0.40011233", "0.3999392", "0.39991894", "0.39971986", "0.39866593" ]
0.6841078
0
Returns a vector of keys of pages in the notify list Do not modify this vector externally, just read only.
public List<String> getNotificationList() throws Exception { ArrayList<String> cache = new ArrayList<String>(); for (DOMFace nr : getChildren("notification", DOMFace.class)) { cache.add(nr.getAttribute("pagekey")); } return cache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<String> getKeys();", "public List<String> getKeys(){\n return Collections.unmodifiableList(keys);\n }", "public List<String> keys()\n {\n return new ArrayList<String>(keys);\n }", "public Vector keys() {\n Vector<K> temp = new Vector<>(3);\n for (int i=0;i<this.count;i++) {\n DictionaryPair p = list.get(i);//(DictionaryPair) data.get(i);\n temp.addLast(p.getKey());\n }\n return temp;\n }", "public List<String> getKeys()\n\t{\n\t\treturn new ArrayList<>(pairs.keySet());\n\t}", "public List<K> keys();", "public String[] getKeys() {\n\t\treturn _keys;\n\t}", "public abstract List<String> getAllKeys();", "java.util.List<com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key> getKeyList();", "StringList keys();", "public String getKeys() {\r\n return keys;\r\n }", "public List<K> keys()\r\n\t{\r\n\t\tList<K> keys = new ArrayList<K>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tkeys.add(element.key);\r\n\t\t}\r\n\t\t\r\n\t\t//keys.sort(new keyComparator()); //not necessarily needed since I know my BST iterator\r\n\t\t\t\t\t\t\t\t\t\t //iterates through in an inOrder fashion.\r\n\t\t\r\n\t\treturn keys;\r\n\t}", "public ArrayList getKeys() {\r\n return this.keys;\r\n }", "@Override\n List<String> keys();", "public String[] getKeys(){\n int paddingCount = 1;\n List<String> result = new ArrayList<String>();\n String lastKey = null;\n for (Property x : this.getProperties()) {\n String newKey = new String(x.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.add(newKey);\n lastKey = newKey;\n }\n return result.toArray(new String[]{});\n }", "Integer[] getKeys();", "private List<String> putKeysInList() {\n List<String> stringList = new LinkedList<>();\n for (String node : registeredNodes.keySet()) {\n stringList.add(node);\n }\n return stringList;\n }", "Set<String> getKeys();", "public ArrayList<Integer> getKeys() {\r\n return keys;\r\n }", "@Override\n\tpublic Collection<Key> keys() {\n\t\tCollection<Key> c = new ArrayList<Key>();\n\t\tif (!isEmpty()) {\n\t\t\tFork<Key, Value> f = (Fork<Key,Value>) bst;\n\t\t\tEntry<Key, Value> e = new Entry<>(f.getKey().get(), f.getValue().get());\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tEntry<Key, Value>[] a = (Entry<Key, Value>[]) Array.newInstance(e.getClass(), size());\n\t\t\tbst.saveInOrder(a);\n\t\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\t\tc.add(a[i].getKey());\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}", "public List<NeonKey> getKeys();", "public UnsortedList<Integer> listOfKeys() {\n\t\tUnsortedList<Integer> list \n\t\t= new UnsortedList<Integer>(new IntegerComparator());\n\t\treturn listOfKeys(list);\n\t}", "private Set<String> getKeys() {\n return bookDB.keySet();\n }", "public KeyPeg[] getKeys() {\n return this.keys;\n }", "@Override\n public List<K> keys() {\n List<K> keys = new AList<>();\n for(int i =0; i < capacity; i++){\n Entry n = (Entry) table[i];\n if(n != null && !n.isRemoved())\n keys.add(n.getKey());\n }\n assert keys.size() == size;\n return keys;\n }", "String[] getPropertyKeys();", "public K[] keys(){\n\t\tK[] output = (K[]) new Object[howMany];\n\t\tint j = 0;\n\t\tfor (int i = 0; keys.length > i; i++)\n\t\t\tif (keys[i] != null){\n\t\t\t\toutput[j] = keys[i];\n\t\t\t\tj = j + 1;\n\t\t\t}\n\t\treturn output;\n\t}", "public final Enumeration getKeys() {\n/* 130 */ return getBundle().getKeys();\n/* */ }", "public IIterator getKeys()\r\n {\r\n return new VectorIterator(m_keys);\r\n }", "public Iterable<String> keys()\r\n { return keysWithPrefix(\"\"); }", "public ListVS<T> getKeys() {\n return this.keys.getElements();\n }", "public Iterator<Key> keys() ;", "public static List<String> getPageProcessDefKeys2(ASPManager mgr ,String url) {\n\t\tList<String> ls_processKeys = new ArrayList<String>();\n\t\tASPTransactionBuffer trans = mgr.newASPTransactionBuffer();\n\t\tString sql = \"SELECT T.PROCESS_KEY PROCESS_KEY FROM HZ_BIZ_WF_CONFIG T WHERE T.PAGE_PATH = '\" + url + \"'\";\n\t\ttrans.addQuery(\"BPROCESSNAMES\", sql);\n\t\t\n\t\ttrans = mgr.perform(trans);\n\t\t\n\t\tASPBuffer buffer = trans.getBuffer(\"BPROCESSNAMES\");\n\t\t\n\t\tint count = buffer.countItems();\n\t\t\n\t\tfor (int i = 0; i < count; i++)\n\t\t{\n\t\t\tif(\"DATA\".equals(buffer.getNameAt(i)))\n\t\t\t{\n\t\t\t\tls_processKeys.add(buffer.getBufferAt(i).getValue(\"PROCESS_KEY\"));\n\t\t\t}\n\t\t}\n\t\treturn ls_processKeys;\n\t}", "public K[] getKeys() {\n return keys.clone();\n }", "public KeySet getKeys();", "public Iterable<Key> Keys()\n\t{\n\t\tQueue<Key> q=new Queue<>();\n\t\tInorder(root,q);\n\t\treturn q;\n\t}", "public Long[] allKeys() {\n\t\tLong[] result = new Long[super.getSize()];\n int ctr = 0;\n for(Entry<C> each : sequence) {\n result[ctr] = each.getKey();\n ctr++;\n }\n insertionSort(result);\n return result;\n }", "public final HashMap<Integer, Integer> getPtnKeys() {\n return ptnKeys;\n }", "public Enumeration getKeys() throws AspException\n {\n return Contents.getKeys();\n }", "public Enumeration getKeys() throws AspException\n {\n return Contents.getKeys();\n }", "public Enumeration<Object> keys ();", "public PublicKey[] getPostVisibleTo (String sig) {\n Logger.write(\"VERBOSE\", \"DB\", \"getVisibleTo(...)\");\n Vector<PublicKey> keyList = new Vector<PublicKey>();\n \n try {\n ResultSet keyRows = query(DBStrings.getVisibleTo.replace(\"__SIG__\", sig));\n while(keyRows.next())\n keyList.add(Crypto.decodeKey(keyRows.getString(\"key\")));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n \n return keyList.toArray(new PublicKey[0]);\n }", "public int getKeys() {\n return keys;\n }", "public Enumeration getKeys() throws AspException\n {\n return Contents.keys();\n }", "@VisibleForTesting\n List<Object> getKeysForTest() {\n return keys;\n }", "public Iterable<Key> keys();", "public Iterable<Key> keys();", "public JsonArray pagedKeys(Url url);", "java.util.List<com.message.MailProto.MailInboxMsg> \n getInboxPageListList();", "public List getEntityKeys() {\n return resultKeys;\n }", "public List<Object[]> getPartitionKeys();", "@Override\n public synchronized Enumeration keys() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keys();\n }", "Set<K> keys();", "public Iterable<String> keys() { return keysWithPrefix(\"\"); }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t\t\t\t@Override\n\t\t\t\tpublic List getSortKeys() {\n\t\t\t\t\treturn sortKeys.stream().filter(x -> x.getSortOrder() != SortOrder.UNSORTED)\n\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t}", "public String[] getKeys() {\n Set keySet;\n if( defaultValues != null ) {\n keySet = defaultValues.keySet();\n } else {\n keySet = values.keySet();\n }\n return ( String[] )keySet.toArray( new String[ keySet.size() ] );\n }", "public Collection<TapKey> findAllKeys();", "public List<String> keysAsString() {\n\t\treturn iter.getItems().stream().map(e -> new String(e)).collect(toList());\n\t}", "@Override\n\t\t\tpublic Set<String> getKeys() {\n\t\t\t\treturn null;\n\t\t\t}", "public Iterator<K> keys();", "public Iterator<K> keys();", "public Enumeration getKeys() {\r\n PropertiesHolder propertiesHolder = this.getMergedProperties(Locale.getDefault());\r\n return propertiesHolder.getProperties().keys();\r\n }", "public Set<String> getKeys() {\n\t\t\treturn properties.keySet();\n\t\t}", "public PublicKey[] getPeopleInConvo (String sig) {\n Logger.write(\"VERBOSE\", \"DB\", \"getPeopleInConvo(...)\");\n Vector<PublicKey> keys = new Vector<PublicKey>();\n \n try {\n ResultSet keySet = query(DBStrings.getConversationMembers.replace(\"__SIG__\", sig));\n while (keySet.next())\n keys.add(Crypto.decodeKey(keySet.getString(\"key\")));\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n }\n \n return keys.toArray(new PublicKey[0]);\n }", "public Collection getKeys() throws CacheException {\n return cache.getKeys();\n }", "public Collection<String> getNotifyList() {\n Set<String> result;\n String list = getDbProperties().getProperty(Constants.NOTIFY_LIST);\n if (list != null) {\n result = Arrays.stream(list.split(\"[, ]+\"))\n .map(String::trim)\n .collect(Collectors.toSet());\n } else {\n result = new HashSet<>();\n }\n return result;\n }", "@Override public IndexKey[] getNodeKeys() {\n return listOfKeys.toArray(new IndexKey[listOfKeys.size()]);\n }", "public Iterable<String> getPropertyKeys();", "public List<KeyInner> keys() {\n return this.keys;\n }", "public Set<String> getKeyList() throws IOException {\n if (dataCollector.getCollectorType().equals(DataCollector.COLLECTOR_TYPE_LIST)) {\n return dataCollector.getResult().getComparatorList().keySet();\n } else {\n throw new IOException(\"only allowed for \" + DataCollector.COLLECTOR_TYPE_LIST);\n }\n }", "public Set<String> getKeys() {\n return Collections.unmodifiableSet(data.keySet());\n }", "public Enumeration getKeys() throws AspException\n {\n return cookieValues.keys();\n }", "java.util.List<String>\n getPartitionKeyList();", "public String[] getEntityKeys() {\r\n\t\tif (null == entityKeys) {\r\n\t\t\tentityKeys = EngineTools.getInstanceKeys(entityURI);\r\n\t\t}\r\n\t\treturn entityKeys;\r\n\t}", "Listof<K> sortedKeys();", "public Enumeration getKeys() throws AspException\n {\n throw new AspNotImplementedException(\"getKeys\");\n }", "public Enumeration getKeys() throws AspException\n {\n return cookieValues.keys();\n }", "public String[] fetchAllKeys();", "public Set<String> keySet()\r\n/* 421: */ {\r\n/* 422:584 */ return this.headers.keySet();\r\n/* 423: */ }", "public Set<String> keySet() {\r\n return keys.keySet();\r\n }", "public Iterable<K> keys();", "ApiKeys listKeys();", "public List<Symbol> keys() {\n\t\tList<Table.Entry<Symbol, List<Entry<T>>>> entries = table.toList();\n\t\tCollections.sort(entries, new Comparator<Table.Entry<Symbol, List<Entry<T>>>>() {\n\t\t\tpublic int compare(Table.Entry<Symbol, List<Entry<T>>> o1, Table.Entry<Symbol, List<Entry<T>>> o2) {\n\t\t\t\tEntry<T> max1 = Collections.max(o1.value, new EntryComparator());\n\t\t\t\tEntry<T> max2 = Collections.max(o2.value, new EntryComparator());\n\t\t\t\treturn max1.index - max2.index;\n\t\t\t}\n\t\t});\n\t\t\n\t\tList<Symbol> ret = new ArrayList<Symbol>(entries.size());\n\t\tfor (Table.Entry<Symbol, List<Entry<T>>> entry : entries) {\n\t\t\tret.add(entry.key);\n\t\t}\n\t\treturn ret;\n\t}", "@Override\r\n\t\t\t\t\t\tpublic Enumeration<String> getKeys() {\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}", "private String[] getKeys() {\n\t\tSharedPreferences prefs = EReaderApplication.getAppContext()\n\t\t\t\t.getSharedPreferences(ACCOUNT_PREFS_NAME, 0);\n\t\tString key = prefs.getString(ACCESS_KEY_NAME, null);\n\t\tString secret = prefs.getString(ACCESS_SECRET_NAME, null);\n\t\tif (key != null && secret != null) {\n\t\t\tString[] ret = new String[2];\n\t\t\tret[0] = key;\n\t\t\tret[1] = secret;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public List<KeyEvent> getKeyEvents() {\n synchronized (this) {\n int len = keyEvents.size();\n for (int i = 0; i < len; i++) {\n keyEventPool.free(keyEvents.get(i));\n }\n keyEvents.clear();\n keyEvents.addAll(keyEventsBuffer);\n keyEventsBuffer.clear();\n return keyEvents;\n }\n }", "public List keys() {\n // assign the attributes to the Collection back to the parent\n ArrayList keys = new ArrayList();\n\n keys.add(leagueId);\n\n return (keys);\n }", "public synchronized Enumeration<Short> keys() {\n return new Enumerator(KEYS);\n }", "public abstract Enumeration keys();", "public Iterable<K> keys() {\n Queue<K> q = new Queue<>();\n inOrder(root, q);\n return q;\n }", "public Listof<K> sortedKeys() {\n return this.bst.toSortedList().map(i -> i.left);\n }", "public com.google.protobuf.ProtocolStringList\n getPartitionKeyList() {\n return partitionKey_.getUnmodifiableView();\n }", "public Collection< VKeyT > vertexKeys();", "static List<Integer> getTestKeys() {\n var list = Arrays.asList(3, 8, 1, 9, 2, 4, 0, 5);\n\n return list;\n }", "public static Enumeration<String> getKeys() {\n\t\tif (rb == null) {\n\t\t\treinit();\n\t\t}\n\n\t\treturn rb.getKeys();\n\t}", "public native IterableIterator<K> keys();", "public ABLKeys Keys() {\r\n\t\treturn new ABLKeys(BrickFinder.getDefault().getKeys());\r\n\t}", "public Set<Integer> getVertexKeys() {\n\t\treturn vertices.keySet();\n\t}", "List<QueryKey> listQueryKeys();", "public Set<String> keysOfMap() {\n Map<String, String> tempMap = createSimpleMap(\"Elevensies\",\"Grapes\");\n\t\tSet<String> keys = hashMap.keySet();\n\t\treturn tempMap.keySet();\n\t}" ]
[ "0.6525697", "0.63017446", "0.62888473", "0.62180245", "0.6145953", "0.61090165", "0.6106539", "0.60984206", "0.6009142", "0.5998317", "0.59941036", "0.59565276", "0.5935757", "0.5910767", "0.5888081", "0.5870258", "0.58532983", "0.5831808", "0.5789658", "0.5787123", "0.5772558", "0.57688534", "0.5767136", "0.576053", "0.5740379", "0.57356524", "0.5719551", "0.57053286", "0.5699825", "0.5698538", "0.56950814", "0.56906104", "0.5689774", "0.56662136", "0.5647968", "0.5640082", "0.5632835", "0.5617304", "0.5609807", "0.5609807", "0.56037945", "0.5582935", "0.55820286", "0.55717933", "0.5546507", "0.5530248", "0.5530248", "0.5510793", "0.55106026", "0.5508393", "0.5506199", "0.5502314", "0.54876214", "0.5484992", "0.5481554", "0.54562545", "0.54548794", "0.54505396", "0.54487884", "0.5438865", "0.5438865", "0.5436665", "0.54344094", "0.5432678", "0.5429055", "0.541445", "0.54022646", "0.54021597", "0.53894895", "0.5381287", "0.5379807", "0.5377887", "0.5373821", "0.5367371", "0.5365362", "0.53600186", "0.5359992", "0.5358468", "0.5352026", "0.5347286", "0.53407466", "0.5336076", "0.5333507", "0.5318702", "0.5304843", "0.52962375", "0.5294442", "0.5292056", "0.5290122", "0.52855", "0.52739525", "0.52714163", "0.5269911", "0.52634734", "0.52589405", "0.5257949", "0.5252748", "0.52463317", "0.5243319", "0.52335525" ]
0.70439357
0
Create or update a notification on a page. the page key specifies the page. The long value is the time of "last seen" which will be used to determine if the page has changed since that time.
public void addNotification(String pageKey) throws Exception { createChildWithID("notification", DOMFace.class, "pagekey", pageKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyPage(Webpage page, Weblink link);", "void updateLockedMetadata(String key, long value);", "@Override\n\tpublic Integer pubNotice(String id, String staticPage) {\n\t\tStringBuffer uptSql = new StringBuffer(\"update notice set status = 1,static_page = '\").append(staticPage)\n\t\t\t\t.append(\"'\").append(\" where noticeid = \").append(id);\n\t\treturn jdbcTemplate.update(uptSql.toString());\n\t}", "public void addWatch(String pageKey, long seenTime) throws Exception {\r\n DOMFace newSR = createChildWithID(\"watch\", DOMFace.class, \"pagekey\", pageKey);\r\n newSR.setAttributeLong(\"lastseen\",seenTime);\r\n }", "@Override\n public void saveNotification(Notification n) {\n try {\n notificationIntegerDao.createOrUpdate(n);\n } catch (SQLException e) {\n logSQLError(e);\n }\n }", "private void note(Notification n){\r\n\t\tusers.get(n.userID).addNotification(n);\r\n\t\tif (loggedInUsers.contains(n.userID))\r\n\t\t\tcomms.sendMessage(n);\r\n\t}", "public boolean seenNotification(int notificationId) throws SQLException{\n try{\n ps = connection.prepareStatement(\"UPDATE notification SET seen=1 WHERE id=?\");\n ps.setInt(1,notificationId);\n rs = ps.executeQuery();\n int result = ps.executeUpdate();\n return result==1;\n }\n finally{\n Db.close(rs);\n Db.close(ps);\n// Db.close(connection);\n }\n }", "void updateNotSeen( Long userId, Long newsId );", "public Notification(String message, Long date) {\n this.message = message;\n this.date = date;\n }", "public void notifyUpdate(String publicID) {\n }", "public interface NotificationStore {\n\n /**\n * Loads the date when the notifications was updated from the server the last time.\n *\n * @return The last update date.\n */\n Date getLastServerUpdate();\n\n /**\n * Saves the date when the notifications was updated from the server the last time.\n *\n * @param date The last update date.\n */\n void saveLastServerUpdate(Date date);\n\n /**\n * Loads all saved {@link PersistentNotification}s.\n *\n * @return The saved {@link PersistentNotification}s\n */\n Set<PersistentNotification> getPersistentNotifications();\n\n /**\n * Updates the {@link PersistentNotification} in the {@link NotificationStore} with the given\n * <code>updatePersistentNotifications</code>. The notifications to update are identified by their hashCode/equals\n * methods.\n *\n * @param updatePersistentNotifications The {@link PersistentNotification} to update.\n */\n void updatePersistentNotification(Set<PersistentNotification> updatePersistentNotifications);\n\n /**\n * Replaces the currently stored {@link PersistentNotification}s by the passed ones.\n *\n * @param persistentNotifications The {@link PersistentNotification}s to store.\n */\n void replacePersistentNotifications(Set<PersistentNotification> persistentNotifications);\n\n /**\n * Removes all notifications from the store.\n */\n void clearPersistentNotifications();\n}", "@Override\n public WikiPageInfo updateWikiPage(WikiPageInfo page) \n {\n if (page.getNodeRef() == null)\n {\n throw new IllegalArgumentException(\"Can't update a page that was never persisted, call create instead\");\n }\n \n NodeRef nodeRef = page.getNodeRef();\n String nodeName = buildName(page.getTitle());\n \n // Handle the rename case\n boolean renamed = false;\n if (! nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE).equals(page.getTitle()))\n {\n try\n {\n fileFolderService.rename(nodeRef, nodeName);\n renamed = true;\n }\n catch (FileNotFoundException e)\n {\n throw new AlfrescoRuntimeException(\"Invalid node state - wiki page no longer found\");\n }\n nodeService.setProperty(nodeRef, ContentModel.PROP_NAME, nodeName);\n nodeService.setProperty(nodeRef, ContentModel.PROP_TITLE, page.getTitle());\n }\n \n // Change the content\n ContentWriter writer = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);\n writer.setMimetype(MimetypeMap.MIMETYPE_HTML);\n writer.setEncoding(\"UTF-8\");\n writer.putContent(page.getContents());\n \n // Now do the tags\n taggingService.setTags(nodeRef, page.getTags());\n \n // If we re-named, re-create the object\n if (renamed)\n {\n page = buildPage(nodeRef, page.getContainerNodeRef(), nodeName, page.getContents());\n }\n \n // All done\n return page;\n }", "@Override\n public void doUpdate(NotificationMessage notification) {\n \n }", "public void updateNotification(){\n Bitmap androidImage=BitmapFactory.decodeResource(getResources(),R.drawable.mascot_1);\n NotificationCompat.Builder notifyBuilder=getNotificationBuilder();\n notifyBuilder.setStyle(new NotificationCompat.BigPictureStyle().bigPicture(androidImage).setBigContentTitle(\"Notificacion actualizada!\"));\n mNotifyManager.notify(NOTIFICATION_ID,notifyBuilder.build());\n setNotificationButtonState(false, false, true);\n\n }", "public void setNotifyTime(long notifyTime) {\n Date date = new Date(notifyTime);\n DateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n String dateFormatted = formatter.format(date);\n Log.d(Logger.TAG, \"Notify Time = \" + dateFormatted);\n editSharedPrefs().putLong(SHARED_PREFS_NOTIFY_TIME, notifyTime).apply();\n }", "public void notifyNew(String publicID) {\n }", "long getPublishTime();", "public Builder setPublishTime(long value) {\n \n publishTime_ = value;\n onChanged();\n return this;\n }", "public void recordChange(int page_number) throws PageNotLoadedException{\n\t\tint index = getPageIndexInArrayList(page_number); \n\t\tif (index == -1)\n\t\t\tthrow new PageNotLoadedException();\n//\t\tBoolean newVal = pages_loaded_is_changed.get(index); \n//\t\tnewVal= new Boolean(true);\n\t\tpages_loaded_is_changed.set(index,new Boolean(true));\n\t}", "public void addNotification(DefaultNotification n)\n {\n this.notifications.add(n);\n this.setUpdated();\n }", "Notification createNewAppointmentNotification(Appointment appointment);", "@Override\n\tpublic void saveNotifications() {\n\t}", "private void addNotification2DB(String medium, String response,\n\t\t\tString toAddress, String msgText, String lang, String appName,\n\t\t\tString appRef, String refKey, String comments, String msgSubject)\n\t{\n\t\tAppNotificationDto dto = new AppNotificationDto();\n\t\tdto.setMedium(medium);\n\t\tdto.setResponse(response);\n\t\tdto.setToAddress(toAddress);\n\t\tdto.setMsg_text(msgText);\n\t\tdto.setLang(lang);\n\t\tdto.setAppName(appName);\n\t\tdto.setAppRef(appRef);\n\t\tdto.setRefKey(refKey);\n\t\tdto.setComments(comments);\n\t\tdto.setMsg_subject(msgSubject);\n\t\t\n\t\tdao.insert(dto);\n\t}", "boolean put(PageId pageId, byte[] page);", "int updateByPrimaryKey(Notifiction record);", "@Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n // Get My CPlatform post->pendingRequestCount\n //-----------------------------------------------------------------------//\n pendingRequestcount[0] = (Long)documentSnapshot.get(\"pendingRequestCount\");\n Log.d(\"Test\", Long.toString(pendingRequestcount[0]));\n pendingRequestcount[0]-=1;\n Log.d(\"Test\", Long.toString(pendingRequestcount[0]));\n HashMap<String, Object> result_requestCount = new HashMap<>();\n result_requestCount.put(\"pendingRequestCount\", pendingRequestcount[0]);\n\n dataReference_CPlatform.document(post.getCplatformPost_ID()).update(result_requestCount)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //--------------------------------------------------------------------------------//\n // Notify database\n //--------------------------------------------------------------------------------//\n //-- Get current Timestamp\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n simpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"Asia/Singapore\"));\n final String timestampPost = simpleDateFormat.format(new Date());\n\n // Send to rejected user, you have been rejected\n String notify_id1 = dataReference_Notification.document().getId();\n Notification_Model notification1 = new Notification_Model(timestampPost, post.getRequester_UID(), \"You have been rejected to collaborate with \" + myStoreName[0] + \".\", notify_id1);\n dataReference_Notification.document(notify_id1).set(notification1);\n\n // Send to myself, i reject someone\n String notify_id2 = dataReference_Notification.document().getId();\n Notification_Model notification2 = new Notification_Model(timestampPost, fUser.getUid(), \"You have rejected a collaboration with \" + requesterStoreName[0] + \".\", notify_id2);\n dataReference_Notification.document(notify_id2).set(notification2);\n\n //--------------------------------------------------------------------------------//\n // Update UI\n //--------------------------------------------------------------------------------//\n requestList.remove(post);\n pd.dismiss();\n notifyDataSetChanged();\n }\n });\n }", "private void updateChatDetails(){\n Map<String,Object> chatAddMap = new HashMap<>();\n chatAddMap.put(\"seen\",false);\n chatAddMap.put(\"timestamp\", ServerValue.TIMESTAMP);\n\n DatabaseReference chatRef = rootRef.child(\"Chat\").child(current_user.getUid()).child(chatUserId).getRef();\n //Add to Chat\n chatRef.updateChildren(chatAddMap).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"Checkkkkk\",\"ssss\");\n }\n });\n }", "public static void updateSavedPage(BlockPos pos, String page) {\n MantleNetwork.INSTANCE.network.sendToServer(new UpdateLecternPagePacket(pos, page));\n }", "public PCEPNotification createNotificationMessage(ComputingResponse resp,long timer ){\n\t\tlog.info(\"Timer \"+timer);\n\t\tPCEPNotification notificationMsg = new PCEPNotification();\n\t\tNotify notify=new Notify();\n\t\tNotification notif=new Notification();\n\t\tnotif.setNotificationType(ObjectParameters.PCEP_NOTIFICATION_TYPE_PRERESERVE);\n\t\tLinkedList<Notification> notificationList=new LinkedList<Notification>();\n\t\tPathReservationTLV pathReservationTLV=new PathReservationTLV();\t\t\t\n\t\tpathReservationTLV.setERO(resp.getResponseList().getFirst().getPathList().getFirst().geteRO());\t\t\t\t\t\n\t\tboolean bidirect = resp.getResponseList().getFirst().getRequestParameters().isBidirect();\t\t\n\t\tpathReservationTLV.setTime(timer);\n\t\tpathReservationTLV.setBidirectional(bidirect);\n\t\tnotif.setNotificationTLV(pathReservationTLV);\n\t\tnotificationList.add(notif);\n\t\tnotify.setNotificationList(notificationList);\n\t\tnotificationMsg.addNotify(notify);\n\t\treturn notificationMsg;\t\n\t}", "@Override\r\n\tpublic void update(ReportingUrlCreation transientInstance){\n\t\ttry {\r\n\t\t\tgetSession().update(transientInstance);\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tre.printStackTrace();\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t}", "@Override\n public void notifyAppointmentUpdated( int nIdAppointment )\n {\n }", "int updateByPrimaryKey(WxNews record);", "public void addNotification(String zipCode, Notification n){\n\r\n User u = n.getCreator();\r\n\r\n notificationRef.child(n.getUuid()).setValue(n);\r\n notificationRef.child(n.getUuid()).child(NOTIFICATIONS_UUID).setValue(n.getUuid());\r\n\r\n DatabaseReference zipNotificationRef = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATIONS_REFERENCE_LIST);\r\n zipNotificationRef.child(n.getUuid()).setValue(n.getUuid());\r\n\r\n userRef.child(u.getUuid()).child(n.getUuid());\r\n if ((u.getNotificationIds() == null) || !(u.getNotificationIds().contains(n.getUuid()))) {\r\n u.addNotificationIds(n);\r\n }\r\n userRef.child(u.getUuid()).setValue(u);\r\n }", "public int updateEntry(String cid, Date eventTime, String key, String type, Map<String,String> map){\r\n\t\t//modify previous entry first to a site_visit\r\n\t\tCustomer cust = treeData.get(cid);\r\n\t\tif (cust == null){\r\n\t\t//\tif (type.equalsIgnoreCase(sConstants.CUSTOMER))\r\n\t\t//\t\treturn sConstants.NOT_EXIST;\r\n\t\t\tcust = new MyCustomer(cid, eventTime, null); \r\n\t\t}\r\n\t\tcust.update(eventTime, key, type, map);\r\n\t if (eventTime.before(first))\r\n\t \tfirst = eventTime;\r\n\t if (eventTime.after(last))\r\n\t \tlast = eventTime;\r\n\r\n\t\treturn sConstants.SUCCESS;\r\n\t}", "void notify(PushMessage m);", "long getUpdated();", "void mo54412a(int i, Notification notification);", "void updateLastAccessed(int id);", "int updateByPrimaryKey(BpmInstanciaHistorica record);", "@Override\n public void onClick(View view) {\n firebaseDatabase.child(\"Notifications\").child(firebaseUser.getUid())\n .child(notification.getNotificationId()).child(\"seen\").setValue(true);\n\n // The user will be redirected to the view post page\n Intent intent = new Intent(context, ViewNotifiedPostActivity.class);\n // To send the post information to the view post page\n intent.putExtra(\"postId\",notification.getPostId());\n context.startActivity(intent);\n }", "@Override\n public void createNotification(Notification notification) {\n Player p = Bukkit.getPlayer(notification.getPlayer()); //TODO uuid\n if (p != null && p.isOnline()) {\n showNotification(notification, false);\n }\n try {\n notificationIntegerDao.createIfNotExists(notification);\n } catch (SQLException e) {\n logSQLError(e);\n }\n }", "void setUserCreated(final Long userCreated);", "int updateByPrimaryKey(SysNotice record);", "@Override\n public boolean update(EmailNotification entity) {\n return false;\n }", "ValueType put(long key, ValueType entry);", "@Override\n public void setNotification() {\n if (getTense() == Tense.FUTURE) {\n //Context ctx = SHiTApplication.getContext();\n //SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(ctx);\n\n int leadTimeEventMinutes = SHiTApplication.getPreferenceInt(Constants.Setting.ALERT_LEAD_TIME_EVENT, LEAD_TIME_MISSING);\n\n if (leadTimeEventMinutes != LEAD_TIME_MISSING) {\n if (travelTime > 0) {\n leadTimeEventMinutes += travelTime;\n }\n\n setNotification(Constants.Setting.ALERT_LEAD_TIME_EVENT\n , leadTimeEventMinutes\n , R.string.alert_msg_event\n , getNotificationClickAction()\n , null);\n }\n }\n }", "public void addNotifications(String header, String message, String actionPath, String type, String imageUrl, String notifDate) throws ClirNetAppException {\n SQLiteDatabase db = this.getWritableDatabase();\n try {\n ContentValues contentValue = new ContentValues();\n\n contentValue.put(MESSAGE, message);\n contentValue.put(HEADER, header);\n contentValue.put(ACTION_PATH, actionPath);\n contentValue.put(TYPE, type);\n contentValue.put(IMAGE_URL, imageUrl);\n contentValue.put(ADDED_ON, notifDate);\n contentValue.put(FLAG, \"0\");\n\n db.insert(TABLE_NOTIFICATIONS, null, contentValue);\n //Log.e(\"notification\",\"notification added\");\n\n } catch (Exception e) {\n throw new ClirNetAppException(\"Error inserting Notifications data\");\n } finally {\n if (db != null) {\n db.close(); // Closing database connection\n }\n }\n\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n notificationID = notifications.get(notifications.size()-1).getID();\n feachNotificationsFromApi(notificationID);\n }", "@Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n long lastMessageTime = sharedPref.getLong(\"last_announcement\", System.currentTimeMillis());\n\n /*get announcementItem from database*/\n AnnouncementItem announcementItem = dataSnapshot.getValue(AnnouncementItem.class);\n\n /*compare time of last read announcementItem and announcementItem from database*/\n if (announcementItem.getTime() > lastMessageTime) {\n /*builder for push notification*/\n Notification.Builder builder = new Notification.Builder(AnnouncementService.this)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(\"Announcement\")\n .setContentText(\"There is a new announcement\");\n\n /*intent for push notification*/\n Intent resultIntent = new Intent(AnnouncementService.this, AnnouncementsActivity.class);\n\n /*build stack for intent calls*/\n TaskStackBuilder stackBuilder = TaskStackBuilder.create(AnnouncementService.this);\n stackBuilder.addParentStack(Sahaya.class);\n stackBuilder.addNextIntent(resultIntent);\n PendingIntent resultPendingIntent =\n stackBuilder.getPendingIntent(\n 0,\n PendingIntent.FLAG_UPDATE_CURRENT\n );\n\n /*add resultPendingIndent to builder*/\n builder.setContentIntent(resultPendingIntent);\n\n /*build push notification*/\n Notification notification = builder.build();\n notification.defaults |= Notification.DEFAULT_SOUND;\n notification.defaults |= Notification.DEFAULT_VIBRATE;\n\n /*get notification manager*/\n NotificationManager notificationManager = (NotificationManager) getSystemService(Service.NOTIFICATION_SERVICE);\n\n /*show notification*/\n notificationManager.notify(0, notification);\n }\n\n /*set last read message time as current time*/\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putLong(\"last_announcement\", System.currentTimeMillis());\n editor.apply();\n\n }", "int updateByPrimaryKey(EvaluationRecent record);", "@Test\n public void updateIncreasesTimer() {\n BotMemoryRecord record = new BotMemoryRecord();\n record.store(Point.pt(5, 5));\n\n record.update(100);\n\n assertThat(record.getTimeSinceLastSeen(), is(100L));\n }", "private void markPendingRequestAsSeen(String reqID) throws JSONException{\n\t JSONObject jo = BAPreferences.ConfigPreference().getPendingRequestAsJsonObject(reqID);//new JSONObject(req);\n\t jo.put(\"seen\", true);\n\t BAPreferences.ConfigPreference().setPendingRequest(reqID, jo);\n\t //editor.putString(jo.getString(\"RequestID\"), jo.toString());\n\t //editor.commit();\n\t \n\t //\n\t this.singletonEvents.onSetPendingGCMRequestToSeen.Raise(this, null);\n\t}", "public void notifyWikiInfoRetrieved(String wikiText, String wikiURL, long id);", "public interface NotificationService {\n\t\n /**\n * Save a notification.\n *\n * @param notificationDTO the entity to save\n * @return the persisted entity\n */\n NotificationDTO save(NotificationDTO notificationDTO);\n\n /**\n * Get all the notifications.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<NotificationDTO> findAll(Pageable pageable);\n\n\n /**\n * Get the \"id\" notification.\n *\n * @param id the id of the entity\n * @return the entity\n */\n Optional<NotificationDTO> findOne(Long id);\n\n /**\n * Delete the \"id\" notification.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n\tPage<NotificationDTO> findAllDateAsc(Pageable pageable);\n\n\t/**\n\t * Get all notifications received by a user after with a timestamp...\n\t * equal or greater than @param startTime\n\t * \n\t * @param pageable the pagination information\n\t * @param userId the user ID to get notifications for\n\t * @param startTime the time to get notifications after\n\t * \n\t */\n\tPage<NotificationDTO> findUserNotificationsAfterTime(Pageable pageable, Long userId, Instant startTime );\n\n}", "void setUserUpdated(final Long userUpdated);", "public static native void updateNotifierAlarm(int notifierHandle, long triggerTime);", "private void sendNotification(Map<String, String> data) {\n int num = ++NOTIFICATION_ID;\n Bundle msg = new Bundle();\n for (String key : data.keySet()) {\n Log.e(key, data.get(key));\n msg.putString(key, data.get(key));\n }\n\n\n pref = getSharedPreferences(\"UPDATE_INSTANCE\", MODE_PRIVATE);\n edit = pref.edit();\n Intent backIntent;\n Intent intent = null;\n PendingIntent pendingIntent = null;\n backIntent = new Intent(getApplicationContext(), LoginActivity.class);\n backIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n SharedPreferences sp;\n SharedPreferences.Editor editor;\n\n\n if (!is_noty) {\n mNotificationManager = (NotificationManager) this\n .getSystemService(Context.NOTIFICATION_SERVICE);\n NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(\n this);\n\n mBuilder.setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(msg.getString(\"title\"))\n .setStyle(\n new NotificationCompat.BigTextStyle().bigText(msg\n .getString(\"msg\").toString()))\n .setAutoCancel(true)\n .setContentText(msg.getString(\"msg\"));\n\n if (Integer.parseInt(msg.getString(\"type\")) != 1) {\n mBuilder.setContentIntent(pendingIntent);\n }\n\n mBuilder.setDefaults(Notification.DEFAULT_ALL);\n\n mNotificationManager.notify(++NOTIFICATION_ID, mBuilder.build());\n }\n }", "private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }", "void notificationReceived(Notification notification);", "int updateContentPublish(@Param(\"contentUid\") long contentUid);", "public static String createUpdateMessage(){\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(\"NOTIFY * HTTP/1.1\").append(\"\\n\");\n\t\tsb.append(\"HOST: 239.255.255.250:1900\").append(\"\\n\");\n\t\tsb.append(\"NT: urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"NTS: ssdp:update\").append(\"\\n\");\n\t\tsb.append(\"LOCATION: http://142.225.35.55:5001/description/fetch\").append(\"\\n\");\n\t\tsb.append(\"USN: uuid:9dcf6222-fc4b-33eb-bf49-e54643b4f416::urn:schemas-upnp-org:service:ContentDirectory:1\").append(\"\\n\");\n\t\tsb.append(\"CACHE-CONTROL: max-age=1800\").append(\"\\n\");\n\t\tsb.append(\"SERVER: Windows_XP-x86-5.1, UPnP/1.0, PMS/1.11\").append(\"\\n\");\n\t\t\n\t\treturn sb.toString();\n\t}", "@Override\n public void publishAndUpdate(MessageEntity msg) {\n if (mapper.updateIsPublished(msg.getMessageId(), MessageIsPublished.NO.val, MessageIsPublished.YES.val) == 1) {\n messagingService.send(MessagingParam.builder()\n .payload(msg.getPayload())\n .exchange(msg.getExchange())\n .routingKey(msg.getRoutingKey())\n .deliveryMode(MessageDeliveryMode.NON_PERSISTENT)\n .messagePostProcessor(new HeaderMessagePostProcessor(msg))\n .build());\n }\n }", "public interface NotificationPresenter {\r\n\r\n void getNotification(String page);\r\n}", "private void addNote(){\n DatabaseReference noteRef = mDB.getReference(\"Notes\");\n\n Long time = System.currentTimeMillis();\n\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"notesDetail\", notes.getText().toString());\n bundleNote.putString(\"notesTime\", time.toString());\n\n Note note = new Note(bundleNote);\n String currNoteKey;\n currNoteKey = noteRef.push().getKey();\n noteRef.child(LoginActivity.currUserID).child(currNoteKey).setValue(note);\n\n }", "public void setCreated(java.lang.Long value) {\n this.created = value;\n }", "void scno(String type, Object data) {\r\n\t\tnotifications.put(type, data);\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(type);\r\n\t\t\r\n\t}", "private void updateStatus(MsgEvent event) {\n//\t\t | Operation | Body? | SIP-If-Match? | Expires Value |\r\n//\t\t +-----------+-------+---------------+---------------+\r\n//\t\t | Initial | yes | no | > 0 |\r\n//\t\t | Refresh | no | yes | > 0 |\r\n//\t\t | Modify | yes | yes | > 0 |\r\n//\t\t | Remove | no | yes | 0 |\r\n//\t\t +-----------+-------+---------------+---------------+\r\n\t\tif (event instanceof SIPMsg) {\r\n\t\t\tRequest req = ((SIPMsg)event).getRequest();\r\n\t\t\tif (req != null) {\r\n\t\t\t\tString publish = req.toString();\r\n\t\t\t\t// Get the SIP-If-Match information\r\n\t\t\t\tString entityTag = sipLocator.getSIPParameter(\"SIP-If-Match\", \r\n\t\t\t\t\t\t\"entity-tag\", MsgQueue.FIRST, publish);\r\n\t\t\t\t// Get the Expires value\r\n\t\t\t\tString expires = sipLocator.getSIPParameter(\"Expires\", \r\n\t\t\t\t\t\t\"value\", MsgQueue.FIRST, publish);\r\n\t\t\t\t// Get the Content-Length\tvalue\r\n\t\t\t\tString length = sipLocator.getSIPParameter(\"Content-Length\", \r\n\t\t\t\t\t\t\"value\", MsgQueue.FIRST, publish);\r\n\t\t\t\tint exp = -1;\r\n\t\t\t\tboolean hasBody = false;\r\n\t\t\t\tint contentLen = -1;\r\n\t\t\t\tif (length != null) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tcontentLen = Integer.parseInt(length);\r\n\t\t\t\t\t\tif (expires != null) {\r\n\t\t\t\t\t\t\texp = Integer.parseInt(expires);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (contentLen > 0)\r\n\t\t\t\t\t\t\thasBody = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (NumberFormatException nfe) {\r\n\t\t\t\t\t\tlogger.warn(PC2LogCategory.Model, subCat,\r\n\t\t\t\t\t\t\t\t\"PresenceSever retrieved a value from the Content-Length header that doesn't appear to be an integer.\");\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// Initial condition\r\n\t\t\t\tif (entityTag == null) {\r\n\t\t\t\t\tProperties p = SystemSettings.getPropertiesByValue(SettingConstants.IP, event.getSrcIP());\r\n\t\t\t\t\tif (p != null) {\r\n\t\t\t\t\t\tString ne = p.getProperty(SettingConstants.NE);\r\n\t\t\t\t\t\tPresenceData pd = new PresenceData(ne, PresenceStatus.OPEN, System.currentTimeMillis());\r\n\t\t\t\t\t\tneTable.put(pd.getLabel(), pd);\r\n\t\t\t\t\t\tentityTable.put(pd.getEntity(), pd);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (entityTag != null) {\r\n\t\t\t\t\t// Remove condition\r\n\t\t\t\t\tif (contentLen == 0 && exp == 0) {\r\n\t\t\t\t\t\tPresenceData pd = entityTable.get(entityTag);\r\n\t\t\t\t\t\tif (pd != null)\r\n\t\t\t\t\t\t\tnotifyWatchers.add(pd);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (exp > 0) {\r\n\t\t\t\t\t\t// This indicates that the device is only updating its existing\r\n\t\t\t\t\t\t// status.\r\n\t\t\t\t\t\tPresenceData pd = entityTable.remove(entityTag);\r\n\t\t\t\t\t\tif (pd != null) {\r\n\t\t\t\t\t\t\tpd.updateEntity(System.currentTimeMillis());\r\n\t\t\t\t\t\t\tentityTable.put(pd.getEntity(), pd);\r\n\t\t\t\t\t\t\tif (hasBody) {\r\n\t\t\t\t\t\t\t\t// This indicates that the device is modifying its information\r\n\t\t\t\t\t\t\t\tnotifyWatchers.add(pd);\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\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}", "public Notifications(Integer postID, Integer requesterID, Integer providerID,\n String locationOfRequester, String type){\n //PostID, requesterID, providerID,locationOfRequester need to create variable?\n this.postID = postID;\n this.requesterID = requesterID;\n this.userId = providerID;\n\n this.type = type;\n this.setActiveStatus(true);\n //idk if we want to add this or not\n this.beginTime = \"N/A\";\n this.endTime = \"N/A\";\n this.category = null;\n this.tags = null;\n this.location = locationOfRequester;\n\n\n }", "public static void addPageHit(long time) {\r\n _count++;\r\n _time += time;\r\n if (_serverStarted == -1)\r\n _serverStarted = System.currentTimeMillis();\r\n }", "public void put(@PAGE int page, CharSequence info) {\n mPageSummary.put(page, info);\n }", "Builder addDatePublished(String value);", "public void update(Page currentPage) throws RQLException ;", "int updateByPrimaryKey(NewsInfo record);", "public static int insert(Notification n) {\n\t\tint status=0;\n\t\ttry {\n\t\t\tConnection connection=MyDBconnectionUtil.getDBconnection();\n\t\t\tPreparedStatement ps=connection.prepareStatement(\n\t\t\t\t\t\"insert into notifications (type,specialMsg) values(?,?)\");\n\t\t\t\t\tps.setInt(1, n.getType());\n\t\t\t\t\tps.setString(2, n.getSpecialMsg());\n\t\t\t\t\tstatus=ps.executeUpdate();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn status;\n\t}", "private void m45629a(long j, Context context) {\n boolean[] c = m45633c();\n SharedPreferences sharedPreferences = context.getSharedPreferences(SettingsManager.INSTABUG_SHARED_PREF_NAME, 0);\n c[61] = true;\n sharedPreferences.edit().putLong(\"LAST_FETCHED_AT\", j).apply();\n c[62] = true;\n }", "public interface VersionedPageInfo extends PageInfo {\n\n // Magic revisions. Prefer isFoo() methods.\n long UNCOMMITTED = -2;\n long DELETED = -3;\n long RENAMED = -4;\n\n long getRevision();\n String getRevisionName();\n\n long getLastChangedRevision();\n String getLastChangedUser();\n Date getLastChangedDate();\n\n String getLockedBy();\n String getLockToken();\n boolean isLocked();\n boolean isNewOrLockedByUser(String user);\n Date getLockedSince();\n\n boolean isNewPage();\n boolean isDeleted();\n boolean isRenamed();\n boolean isRenamedInThisWiki();\n String getRenamedPageName();\n String getRenamedUrl(LinkResolutionContext linkResolutionContext) throws UnknownWikiException, URISyntaxException;\n\n VersionedPageInfo withoutLockToken();\n\n @Override\n VersionedPageInfo withAlternativeContent(String content);\n\n @Override\n VersionedPageInfo withAlternativeAttributes(Map<String, String> attributes);\n\n}", "public Notifications(Integer postID, Integer receiversID,\n Integer providerID, String type){\n //PostID, requesterID, providerID need to create variable?\n this.type = type;\n this.postID = postID;\n this.requesterID = receiversID;\n this.providerID = providerID;\n this.setProvider(providerID);\n }", "void setRetrievedTime(long retrievedTime);", "public void setPinValueForNotification(int pinValue, long eventTime, boolean isSensorTime, boolean notify);", "public void update( long timestamp, Number value );", "@Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n // Get My CPlatform post->pendingRequestCount\n //-----------------------------------------------------------------------//\n pendingRequestcount[0] = (Long)documentSnapshot.get(\"pendingRequestCount\");\n pendingRequestcount[0]-=1;\n HashMap<String, Object> result_requestCount = new HashMap<>();\n result_requestCount.put(\"pendingRequestCount\", pendingRequestcount[0]);\n\n dataReference_CPlatform.document(post.getCplatformPost_ID()).update(result_requestCount)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //--------------------------------------------------------------------------------//\n // Notify database\n //--------------------------------------------------------------------------------//\n //-- Get current Timestamp\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n simpleDateFormat.setTimeZone(TimeZone.getTimeZone(\"Asia/Singapore\"));\n final String timestampPost = simpleDateFormat.format(new Date());\n\n // Send to accepted user, you have been accpted\n String notify_id1 = dataReference_Notification.document().getId();\n Notification_Model notification1 = new Notification_Model(timestampPost, post.getRequester_UID(), \"You have been accepted to collaborate with \" + myStoreName[0] + \".\", notify_id1);\n dataReference_Notification.document(notify_id1).set(notification1);\n\n // Send to myself, i accpted someone\n String notify_id2 = dataReference_Notification.document().getId();\n Notification_Model notification2 = new Notification_Model(timestampPost, fUser.getUid(), \"You have accepted a collaboration with \" + requesterStoreName[0] + \".\", notify_id2);\n dataReference_Notification.document(notify_id2).set(notification2);\n\n\n\n\n // Send to DB, friendList\n //(String friendPost_uid, String requester_uid, String owner_uid, String cpost_uid)\n String id = dataReference_FriendList.document().getId();\n FriendList_Model friendModel = new FriendList_Model(id, post.getRequester_UID(), postData.getPosterUid(), postData.getCPost_uid());\n dataReference_FriendList.document(id).set(friendModel);\n\n //--------------------------------------------------------------------------------//\n // Update UI\n //--------------------------------------------------------------------------------//\n //requestList.remove(post);\n pd.dismiss();\n //notifyDataSetChanged();\n }\n });\n }", "Long getUserUpdated();", "public interface INotifyRecordService {\n /**\n *\n * @param entity\n * @return\n */\n NotifyRecord save(NotifyRecord entity);\n\n PageBean<NotifyRecord> findListPage(NotifyRecordVO info);\n\n /**\n *\n * @param nid\n */\n void sendMessage(int nid);\n\n NotifyRecord update(NotifyRecord entity);\n\n /**\n *\n * @param id\n * @return\n */\n NotifyRecord findOne(Integer id);\n}", "private Notifications createNotifications(JsonNode node) {\n Notifications n = new Notifications();\n for (Iterator<Map.Entry<String, JsonNode>> it = node.fields(); it.hasNext(); ) {\n Map.Entry<String, JsonNode> entry = it.next();\n n.addAll(this.createNotifications(entry.getKey(), entry.getValue()));\n }\n return n;\n }", "int updateByPrimaryKey(Notice record);", "public void publishStatusMessage(String message,\n Object menuItem,\n boolean saveIfNewMessage)\n {\n new PublishStatusMessageThread(message, menuItem, saveIfNewMessage)\n .start();\n }", "public void updateLastSeenTime() {\n\t\tsetLastSeenDate(new Date());\n\t}", "public long updateMap(long oldTime) throws IOException {\n\n\t\trecentMailMap.clear();\n\t\trecentMailMap = ContentExtract(getNewEmails(oldTime));\n\t\tlong ret = oldTime;\n\t\tfor (String threadId : recentMailMap.keySet()) {\n\t\t\tret = recentMailMap.get(threadId).internalDate();\n\t\t\tbreak;\n\t\t}\n\t\treturn ret;\n\t}", "private void pageCacheChanged() {\n // Ok to have a race here, see the field javadoc.\n if (!pageCacheChanged)\n pageCacheChanged = true;\n }", "int updateByPrimaryKey(mailIdentify record);", "int updateByPrimaryKey(PageFunc record);", "@Override //插入通知\n\tpublic void insertPoInfo(PageData pd) throws Exception {\n\t\tdao.save(\"PoInfoMapper.insertPoInfo\", pd);\n\t}", "public void setNotify(long notify) {\n\t\tthis.notify = notify;\n\t}", "int updateByPrimaryKeySelective(BpmInstanciaHistorica record);", "int displayNotification(Message message);", "void save(JournalPage page);", "public void writeChanges(com.sun.mail.pop3.POP3Folder f) throws IOException, MessagingException {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n try {\n if (cacheFile.exists()) {\n Message[] msgs = f.getMessages();\n BufferedReader in = new BufferedReader(new FileReader(cacheFile));\n String nextLine = in.readLine();\n while (nextLine != null) {\n if (nextLine.equalsIgnoreCase(EXPUNGE_MSG)) try {\n ((Folder) f).expunge();\n } catch (MessagingException me) {\n } else if (nextLine.length() > 0) {\n boolean value;\n Flags newFlags = new Flags();\n String uid = nextLine;\n nextLine = in.readLine();\n while (nextLine != null && !nextLine.equals(DONE_MSG)) {\n if (nextLine.equalsIgnoreCase(\"Deleted\")) {\n newFlags.add(Flags.Flag.DELETED);\n } else if (nextLine.equalsIgnoreCase(\"Answered\")) newFlags.add(Flags.Flag.ANSWERED); else if (nextLine.equalsIgnoreCase(\"Draft\")) newFlags.add(Flags.Flag.DRAFT); else if (nextLine.equalsIgnoreCase(\"Flagged\")) newFlags.add(Flags.Flag.FLAGGED); else if (nextLine.equalsIgnoreCase(\"Recent\")) newFlags.add(Flags.Flag.RECENT); else if (nextLine.equalsIgnoreCase(\"SEEN\")) newFlags.add(Flags.Flag.SEEN); else newFlags.add(new Flags(nextLine));\n nextLine = in.readLine();\n }\n nextLine = in.readLine();\n if (nextLine.equalsIgnoreCase(\"true\")) {\n value = true;\n } else value = false;\n try {\n Message m = getMessageByPopUID(uid, f, msgs);\n if (m != null) {\n m.setFlags(newFlags, value);\n }\n nextLine = in.readLine();\n } catch (MessagingException me) {\n }\n }\n nextLine = in.readLine();\n }\n in.close();\n cacheFile.delete();\n }\n } finally {\n lock = false;\n }\n }", "public static void updateLastViewed(String caller, Context context) {\n Map<String, String> map = Utility.getRegistrationEntry(context);\n Log.d(MainActivity.APP_TAG, caller + \" Time: \" + (new Date()));\n if (map != null && map.size() > 0) {\n Utility.updateRegistrationEntry(context);\n } else {\n Utility.addRegistrationEntry(context);\n }\n }", "int updateByPrimaryKeySelective(WxNews record);", "boolean addNotification(EventNotificationDTO notification);" ]
[ "0.56146187", "0.5476548", "0.5320117", "0.5267711", "0.5109473", "0.5027144", "0.4913948", "0.48971534", "0.4852689", "0.48365223", "0.4776816", "0.47619525", "0.4740787", "0.4734493", "0.4721393", "0.4713439", "0.47032115", "0.46460387", "0.4625423", "0.46201572", "0.46125028", "0.46068862", "0.46047536", "0.46030766", "0.45955163", "0.45831794", "0.45780975", "0.45780417", "0.45693144", "0.45685026", "0.45662576", "0.45622078", "0.45577642", "0.45505413", "0.4544361", "0.45342046", "0.45333198", "0.45147052", "0.4508291", "0.45045713", "0.45024318", "0.45020175", "0.45004922", "0.44953492", "0.44807857", "0.4478318", "0.44763255", "0.44678274", "0.44662", "0.44658276", "0.44611758", "0.44608763", "0.4459355", "0.44575962", "0.44558284", "0.44526955", "0.44503325", "0.44473383", "0.44384897", "0.4435526", "0.4420809", "0.44098935", "0.44084963", "0.44081602", "0.4406061", "0.43951374", "0.43820003", "0.43755737", "0.43726638", "0.43697652", "0.4368659", "0.43683556", "0.43682626", "0.43642756", "0.43587157", "0.435779", "0.43546385", "0.43540496", "0.43522167", "0.43518192", "0.43514925", "0.43476543", "0.43475622", "0.43450868", "0.43370762", "0.43349522", "0.43327707", "0.43324995", "0.43273205", "0.43244326", "0.43187833", "0.4317753", "0.43174487", "0.4314181", "0.43054178", "0.43042958", "0.43020394", "0.43014178", "0.42969006", "0.42953503" ]
0.6319167
0
TODO convert to binary scan.
public int getLabel(int stateNum) { for (int i = 0; i < nodeOffsets.length; i++) { if (stateNum < nodeOffsets[i]) return i - 1; } return nodeOffsets.length - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\r\n\r\n\t\tint n=439;\r\n\r\n\t\tint count = 1;\r\n\t\tint binary[] = new int[32];\r\n\t\tint i = 0;\r\n\t\twhile (n > 0) {\r\n\t\t\tbinary[i] = n % 2;\r\n\t\t\tn = n / 2;\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\tfor (int j = i - 1; j >= 0; j--) {\r\n\r\n\t\t\tString str = String.valueOf(i);\r\n\t\t\t\r\n\t\tString ar[]=str.split(\"0\");\r\n\t\t\t\r\n\t\tif(ar.length>1)\r\n\t\t{\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t/*\t\r\n\t\t\tif (binary[j] == 1 && binary[j + 1] == 1) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.print(binary[j]);\r\n*/\r\n\t\t}\r\n\t\tSystem.out.print(count);\r\n\t\t/*scanner.close();*/\r\n\t}", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "private int calculateBinSize(int r15) throws java.io.IOException {\n /*\n r14 = this;\n r1 = 0\n java.io.InputStream r2 = r14.in\n int r12 = r2.available()\n r2.mark(r12)\n r4 = 0\n int r0 = r2.read() // Catch:{ all -> 0x0052 }\n L_0x000f:\n r14.checkComma(r0) // Catch:{ all -> 0x0052 }\n int r5 = r14.readByte(r2) // Catch:{ all -> 0x0052 }\n int r8 = r14.readAddress(r2) // Catch:{ all -> 0x0052 }\n int r9 = r14.readByte(r2) // Catch:{ all -> 0x0052 }\n switch(r9) {\n case 0: goto L_0x0072;\n case 1: goto L_0x0036;\n case 2: goto L_0x0057;\n case 3: goto L_0x0021;\n case 4: goto L_0x003a;\n default: goto L_0x0021;\n } // Catch:{ all -> 0x0052 }\n L_0x0021:\n int r12 = r5 * 2\n int r12 = r12 + 2\n long r10 = (long) r12 // Catch:{ all -> 0x0052 }\n r14.skip(r2, r10) // Catch:{ all -> 0x0052 }\n L_0x0029:\n int r0 = r2.read() // Catch:{ all -> 0x0052 }\n r12 = 10\n if (r0 == r12) goto L_0x0029\n r12 = 13\n if (r0 == r12) goto L_0x0029\n goto L_0x000f\n L_0x0036:\n r2.reset()\n L_0x0039:\n return r1\n L_0x003a:\n int r7 = r14.readAddress(r2) // Catch:{ all -> 0x0052 }\n if (r1 <= 0) goto L_0x004a\n int r12 = r4 >> 16\n int r12 = r12 + 1\n if (r7 == r12) goto L_0x004a\n r2.reset()\n goto L_0x0039\n L_0x004a:\n int r4 = r7 << 16\n r12 = 2\n r14.skip(r2, r12) // Catch:{ all -> 0x0052 }\n goto L_0x0029\n L_0x0052:\n r12 = move-exception\n r2.reset()\n throw r12\n L_0x0057:\n int r12 = r14.readAddress(r2) // Catch:{ all -> 0x0052 }\n int r6 = r12 << 4\n if (r1 <= 0) goto L_0x006b\n int r12 = r6 >> 16\n int r13 = r4 >> 16\n int r13 = r13 + 1\n if (r12 == r13) goto L_0x006b\n r2.reset()\n goto L_0x0039\n L_0x006b:\n r4 = r6\n r12 = 2\n r14.skip(r2, r12) // Catch:{ all -> 0x0052 }\n goto L_0x0029\n L_0x0072:\n int r3 = r4 + r8\n if (r3 < r15) goto L_0x0021\n int r1 = r1 + r5\n goto L_0x0021\n */\n throw new UnsupportedOperationException(\"Method not decompiled: no.nordicsemi.android.dfu.internal.HexInputStream.calculateBinSize(int):int\");\n }", "ScanResult<String> scan(String cursor, String pattern, long count);", "@Override\n\tpublic void scan(Transaction tx) {\n\n\t}", "private static int batoi(byte[] inp) {\n int len = inp.length>4?4:inp.length;\n int total = 0;\n for (int i = 0; i < len; i++) {\n total += (inp[i]<0?256+inp[i]:(int)inp[i]) << (((len - 1) - i) * 8);\n }\n return total;\n }", "protected int filterBytes()\n throws IOException {\n\n if (headerPending) {\n parseHeader();\n }\n\n //System.out.println(\"nEncoded: \" + nEncoded);\n //System.out.println(\"Current: \" + current);\n \n if (nEncoded <= current) {\n int br = readEncodedBytes();\n System.out.println(\"reb: \" + br);\n if (br < 0) {\n return -1;\n }\n }\n\n // bytes decoding loop\n int inserted = 0;\n while (current < nEncoded) {\n \t\n if (current < firstQuantum) {\n if (decode(current) == 0) {\n // this is the end of the encoded data\n parseTrailer();\n return inserted;\n }\n\n // store the expected number of raw bytes encoded in the line\n remaining = decode(current);\n current = firstQuantum;\n\n }\n\n if (encoded[current] == '\\n' && encoded[current + 1] != '\\n') {\n \t \n \t \n \t System.out.println(\"Cur rEad\");\n \t \n \t \n if (remaining != 0) {\n throw new IOException(\"encoded length inconsistent with encoded data\");\n }\n\n //System.out.println(\"Remaning: \" + remaining);\n \n // update state for next line\n firstQuantum = current + 2;\n\n } else if (encoded[current] == '\\n') {\n \t System.out.println(\"CurrEad\");\n \t current = current + 1;\n } else {\n // this is an encoded data byte\n int fByte;\n \n // combine the various 6-bits bytes to produce 8-bits bytes\n switch ((current - firstQuantum) % 4) {\n case 0:\n // nothing to do\n break;\n case 1:\n fByte = ((decode(current - 1) & 0x3F) << 2)\n | ((decode(current) & 0x30) >> 4);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n case 2:\n fByte = ((decode(current - 1) & 0x0F) << 4)\n | ((decode(current) & 0x3C) >> 2);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n break;\n default:\n fByte = ((decode(current - 1) & 0x03) << 6)\n | (decode(current) & 0x3F);\n if (remaining > 0) {\n putFilteredByte(fByte);\n ++inserted;\n --remaining;\n } else if (fByte != 0) {\n throw new IOException(\"unexpected non null bytes after encoded line\");\n }\n \n }\n }\n\n ++current;\n\n }\n \n //System.out.println(inserted);\n\n // preserve current quantum for next round\n int start = current - ((current - firstQuantum) % 4);\n \n //System.out.println(\"FQ: \" + firstQuantum + \"S: \" + (char)encoded[current - 1]);\n \n //System.out.println(\"start: \" + start + \" nEenc-stsrt: \" + (nEncoded - start));\n \n if (firstQuantum < start) {\n System.arraycopy(encoded, start, encoded, 0, nEncoded - start);\n nEncoded -= start;\n current -= start;\n firstQuantum -= start;\n } else {\n \tnEncoded = 0;\n \tcurrent = 0;\n \tfirstQuantum = 0;\n }\n \n //System.out.println(\"out!\");\n //System.out.println (\"inserted == \" + inserted);\n \n return inserted;\n \n }", "private int BinaryReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n {\n //Initialize the file object\n File LocalInputFile = new File(filename + \".ndx\");\n\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(LocalInputFile);\n\n //Get the files lines number\n int mMaxFileLines = 0;\n while(indexFileFileScanner.hasNext())\n {\n //Read every line in the file\n indexFileFileScanner.nextLine();\n mMaxFileLines++;\n }\n\n //Index to the bottom part of the search area of the file\n int bottomFilePageIndex = 0;\n \n //Index to the top part of the search area of the file\n int topFilePageIndex = mMaxFileLines;\n\n //Index to the middle data page of the search area of the file\n int middleFilePageIndex;\n \n //Counter for the data page accesses\n int dataPageAccessesCounter = 0;\n \n //Status of the search process\n int searchStatus;\n\n //Search while there are data pages to access, if topFilePageIndex is greater than bottomFilePageIndex, the search fails automatically\n while (bottomFilePageIndex <= topFilePageIndex)\n {\n //Reinitialize the FileScanner object\n indexFileFileScanner = new Scanner(LocalInputFile);\n \n //Find the middle data page index\n middleFilePageIndex = (bottomFilePageIndex + topFilePageIndex)/2;\n\n //Skip the lines until the middle point\n SkipLines(indexFileFileScanner, middleFilePageIndex);\n\n //Fetch the data page from the file\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Execute the binary search in the page\n searchStatus = BinarySearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions, filename, middleFilePageIndex);\n\n //Count the data page access\n dataPageAccessesCounter++;\n\n //If the word's to be searched length is invalid or the word is found in the page, but is neither the first or the last word in the page\n if (searchStatus == -2 || searchStatus == -1)\n {\n //Complete the binary search\n break;\n }\n else if (searchStatus == -3)\n {\n //If the search must be continued in the top part of the search area of the file\n bottomFilePageIndex = middleFilePageIndex + 1;\n }\n else if (searchStatus == -4)\n {\n //If the search must be continued in the bottom part of the search area of the file\n topFilePageIndex = middleFilePageIndex - 1;\n }\n else\n {\n //Add the new data page accesses\n dataPageAccessesCounter += searchStatus;\n\n //Complete the binary search\n break;\n }\n }\n //Close the FileScanner object\n indexFileFileScanner.close();\n\n //Return the number of the data page file accesses\n return dataPageAccessesCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return s.next_token(); \n }", "public static void decode() {\n int first = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int n = t.length();\n int[] count = new int[256 + 1];\n int[] next = new int[n];\n int i = 0;\n while (i < n) {\n count[t.charAt(i) + 1]++;\n i++;\n }\n i = 1;\n while (i < 256 + 1) {\n count[i] += count[i - 1];\n i++;\n }\n i = 0;\n while (i < n) {\n next[count[t.charAt(i)]++] = i;\n i++;\n }\n i = next[first];\n int c = 0;\n while (c < n){\n BinaryStdOut.write(t.charAt(i));\n i = next[i];\n c++;\n }\n BinaryStdOut.close();\n }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return new Symbol (sym.EOF); \n }", "public static void main(String[] args) {\n DGIM[] dgim = new DGIM[5];\n //从0到4分别代表2^4到2^0的位\n for (int i = 0; i < 5; i++) {\n dgim[i] = new DGIM(1000);\n }\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(\"cmsc5741_stream_data2.txt\")));) {\n while (true) {\n boolean isEnd = false;\n StringBuilder builder = new StringBuilder();\n int c1 = reader.read();\n builder.append((char) c1);\n while (true) {\n int c2 = reader.read();\n if ((char) c2 == ' ') {\n break;\n }\n if (c2 == -1) {\n isEnd = true;\n break;\n }\n builder.append((char) c2);\n }\n if (isEnd) {\n break;\n }\n char[] binary = Integer.toBinaryString(Integer.parseInt(builder.toString())).toCharArray();\n //寻找开始的位\n int start = 5 - binary.length;\n DGIM.number++;\n for (int i = 0; i < binary.length; i++) {\n if (binary[i] == '1') {\n dgim[start].add();\n }\n start++;\n }\n }\n Iterator<Bucket> iterator_16 = dgim[0].getQueue().iterator();\n Iterator<Bucket> iterator_8 = dgim[1].getQueue().iterator();\n Iterator<Bucket> iterator_4 = dgim[2].getQueue().iterator();\n Iterator<Bucket> iterator_2 = dgim[3].getQueue().iterator();\n Iterator<Bucket> iterator_1 = dgim[4].getQueue().iterator();\n\n\n while(iterator_16.hasNext()){\n System.out.println(\"Buckets for 16 :\"+iterator_16.next());\n }\n System.out.println(\"There are \"+dgim[0].getContent()+\" count of 16\");\n while(iterator_8.hasNext()){\n System.out.println(\"Buckets for 8 :\"+iterator_8.next());\n }\n System.out.println(\"There are \"+dgim[1].getContent()+\" count of 8\");\n while(iterator_4.hasNext()){\n System.out.println(\"Buckets for 4 :\"+iterator_4.next());\n }\n System.out.println(\"There are \"+dgim[2].getContent()+\" count of 4\");\n while(iterator_2.hasNext()){\n System.out.println(\"Buckets for 2 :\"+iterator_2.next());\n }\n System.out.println(\"There are \"+dgim[3].getContent()+\" count 2\");\n\n while(iterator_1.hasNext()){\n System.out.println(\"Buckets for 1 :\"+iterator_1.next());\n }\n System.out.println(\"There are \"+dgim[4].getContent()+\" times 1\");\n\n int result = (dgim[0].getContent()*16 + dgim[1].getContent()*8\n + dgim[2].getContent()*4 + dgim[3].getContent()*2 + dgim[4].getContent())/1000;\n System.out.println(\"The average price: \"+result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public Scan(byte[] buffer) throws IOException, ClassNotFoundException\n\t{\n\t\t_type = TYPE;\n\t\tdeserialize(buffer);\n\t}", "private int[] findPointer() {\n \n int initialAux = 4095;\n int header = 0;\n \n \n for (int i = 0; i < 4096; i++) {\n String initialBinary = Integer.toBinaryString(0xFF & serialize[i * 4]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 1]);\n short initial = Short.parseShort(initialBinary, 2);\n String sizeBinary = Integer.toBinaryString(0xFF & serialize[i * 4 + 2]) + Integer.toBinaryString(0xFF & serialize[i * 4 + 3]);\n short sizeData = Short.parseShort(sizeBinary, 2);\n \n if (initial == 0 && sizeData == 0) {\n header = i*4;\n break;\n }\n //get the higher initial \n if (initialAux > initial){\n initialAux = initial;\n }\n \n }\n\n int[] toReturn = new int[2];\n \n toReturn[0] = header;\n toReturn[1] = initialAux-1;\n \n return toReturn;\n }", "public int cscan () throws IOException {\n\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\tnumChars = stream.read (buf);\n\n\t\t\t\t//if (numChars <= 0) return -1;\n\t\t\t}\n\n\t\t\treturn buf[curChar++];\n\t\t}", "static int beautifulBinaryString(String b) {\n int index = b.indexOf(\"010\", 0) ;\n int change = 0;\n while (index != -1) {\n change++;\n index = b.indexOf(\"010\", index + 3) ;\n }\n return change;\n }", "public search()\n\t { b = new char[INC];\n\t i = 0;\n\t i_end = 0;\n\t }", "@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 }", "public Ch12Ex1to9( String str )\n {\n scan = new Scanner( str );\n }", "@Test\n public void test2(){\n\n String s =\"1000000000000001\";\n //s = BinaryCalculate.BinaryArithmeticalRightShift(s,1);\n s = BinaryCalculate.BinaryLogicRightShift(s,1);\n int a = BitConversion.fromBinaryStringToInt(s);\n System.out.println(a);\n }", "public abstract int match(ReaderBuffer buffer) throws IOException;", "int search(ICard toFind);", "public abstract void startSingleScan();", "public static int forwardScanBit(long map, int start)\n {\n if ( start < 64 )\n {\n start = Math.max(start, 0);\n long bit = 1L << start;\n\n for (int i = start; i <= 63; i++, bit <<= 1)\n {\n if ((map & bit) != 0) return i;\n }\n }\n return 64;\n }", "public abstract int parse(byte bc[], int index);", "static void readBlock(Scanner s) throws Exception {\n for (int i = 0; i < 16; i++) {\n int n = s.nextInt();\n for (int j = 0; j < 8; j++) {\n block[8 * i + j] = (n >> (7 - j)) & 1;\n }\n }\n }", "@Test\n\tpublic void test() throws IOException, IllegalArgumentException, IllegalAccessException {\n\t\tList<SAMRecord> samarrl= new ArrayList<SAMRecord>();\n\t\tBedRecord bed = new BedRecord();\n\t\tbed.setChrom(\"chr9\");\n\t\tbed.setStart(122669886);\n\t\tbed.setEnd(122672448);\n\t\tbed.setStrand(\"+\");\n\t\tSAMRecordIterator samit = null;\n\t\tFile samfile = new File(\"C:/Users/Fengchao/Desktop/IASearch/mtr42_sorted_F_2.bam\");\n\t\tSAMFileReader samfilereader = new SAMFileReader(samfile);\n\n\t\tsamarrl = QuerySAMUtil.querySam(bed, samfilereader, 0, 0, true, true);\n\n\t\tSystem.out.println(samarrl.size());\n\n\t}", "static void findI1s(final int length, int[] B) {\r\n\t final long max = 1 << length;\r\n\t for (long i = 0; i < max; i++) {\r\n\t long currentNumber = i;\r\n\t final int[] buffer = new int[length];\r\n\t boolean[] I1 = new boolean[length]; // I1 to be passed to next method\r\n\t int bufferPosition = buffer.length;\r\n\t while (bufferPosition > 0) {\r\n\t buffer[--bufferPosition] = (int) (currentNumber & 1);\r\n\t currentNumber >>>= 1;\r\n\t }\r\n\t for(int x = 0; x < buffer.length; x++) {\r\n\t \tif(buffer[x] == 1) {\r\n\t \t\tI1[x] = true;\r\n\t \t}\r\n\t \telse {\r\n\t \t\tI1[x] = false;\r\n\t \t}\r\n\t \tSystem.out.print(buffer[x]);\r\n\t }\r\n\t\t System.out.println();\r\n\t }\r\n\t}", "private static int zzaz(java.lang.String r5) {\n /*\n int r0 = r5.hashCode()\n r1 = 0\n r2 = 3\n r3 = 2\n r4 = 1\n switch(r0) {\n case -1095064472: goto L_0x002a;\n case 187078296: goto L_0x0020;\n case 1504578661: goto L_0x0016;\n case 1505942594: goto L_0x000c;\n default: goto L_0x000b;\n }\n L_0x000b:\n goto L_0x0034\n L_0x000c:\n java.lang.String r0 = \"audio/vnd.dts.hd\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 3\n goto L_0x0035\n L_0x0016:\n java.lang.String r0 = \"audio/eac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 1\n goto L_0x0035\n L_0x0020:\n java.lang.String r0 = \"audio/ac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 0\n goto L_0x0035\n L_0x002a:\n java.lang.String r0 = \"audio/vnd.dts\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 2\n goto L_0x0035\n L_0x0034:\n r5 = -1\n L_0x0035:\n if (r5 == 0) goto L_0x0045\n if (r5 == r4) goto L_0x0043\n if (r5 == r3) goto L_0x0041\n if (r5 == r2) goto L_0x003e\n return r1\n L_0x003e:\n r5 = 8\n return r5\n L_0x0041:\n r5 = 7\n return r5\n L_0x0043:\n r5 = 6\n return r5\n L_0x0045:\n r5 = 5\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zzaz(java.lang.String):int\");\n }", "private static int findNextStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1576 */ int j = 0xFF00 | paramInt3;\n/* */ \n/* 1578 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* */ \n/* */ \n/* 1581 */ while (paramInt1 != paramInt2)\n/* */ {\n/* */ \n/* 1584 */ char c1 = paramArrayOfChar[paramInt1];\n/* 1585 */ if (c1 < paramChar) {\n/* */ break;\n/* */ }\n/* */ \n/* 1589 */ long l = getNorm32(c1);\n/* 1590 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ char c2;\n/* 1594 */ if (isNorm32LeadSurrogate(l))\n/* */ {\n/* 1596 */ if ((paramInt1 + 1 == paramInt2) || \n/* 1597 */ (!UTF16.isTrailSurrogate(c2 = paramArrayOfChar[(paramInt1 + 1)]))) {\n/* */ break;\n/* */ }\n/* */ \n/* 1601 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ \n/* 1603 */ if ((l & j) == 0L) {\n/* */ break;\n/* */ }\n/* */ } else {\n/* 1607 */ c2 = '\\000';\n/* */ }\n/* */ \n/* */ \n/* 1611 */ if ((l & paramInt4) != 0L)\n/* */ {\n/* */ \n/* 1614 */ int i = decompose(l, paramInt4, localDecomposeArgs);\n/* */ \n/* */ \n/* */ \n/* 1618 */ if ((localDecomposeArgs.cc == 0) && ((getNorm32(extraData, i, paramInt3) & paramInt3) == 0L)) {\n/* */ break;\n/* */ }\n/* */ }\n/* */ \n/* 1623 */ paramInt1 += (c2 == 0 ? 1 : 2);\n/* */ }\n/* */ \n/* 1626 */ return paramInt1;\n/* */ }", "public java_cup.runtime.Symbol scan()\n throws java.lang.Exception\n {\n return getScanner().next_token(); \n }", "private static int[] internal16Readin(String name) {\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(FileUtils.getResourceInputStream(\"/luts/\" + name)));\n String strLine;\n\n int[] intArray = new int[65536];\n int counter = 0;\n while ((strLine = br.readLine()) != null) {\n\n String[] array = strLine.split(\" \");\n\n for (int i = 0; i < array.length; i++) {\n if (array[i].equals(\" \") || array[i].equals(\"\")) {\n\n } else {\n intArray[counter] = Integer.parseInt(array[i]);\n counter++;\n }\n }\n }\n br.close();\n return intArray;\n } catch (Exception e) {// Catch exception if any\n System.err.println(\"Error open internal color table \" + name);\n e.printStackTrace();\n return null;\n }\n }", "void mo8445a(int i, String str, int i2, byte[] bArr);", "void startIndexing();", "private void searchCode() {\n }", "@Override\n\tpublic void consume(Scan scan) {\n\n\t}", "static String Scan(){\n boolean flag = false;\n for(int i=0; i<ROWS; i++) {\n for(int j=0; j<COLS; j++) {\n if(sField[i][j].equals(\"X\")){\n //horizontal scan\n if(j<=5)ScanX(i,j);\n //vertical scan\n if(i<=5)ScanY(i,j);\n //diagonal scan\n ScanD(i, j);\n }\n }\n }\n return result;\n }", "@Test\n public void testScan() {\n // Choose, among the available ones, a random key as starting point for the scan transaction.\n int startScanKeyNumber = new Random().nextInt(((RiakKVClientTest.recordsToInsert) - (RiakKVClientTest.recordsToScan)));\n // Prepare a HashMap vector to store the scan transaction results.\n Vector<HashMap<String, ByteIterator>> scannedValues = new Vector<>();\n // Check whether the scan transaction is correctly performed or not.\n Assert.assertEquals(\"Scan transaction FAILED.\", OK, RiakKVClientTest.riakClient.scan(RiakKVClientTest.bucket, ((RiakKVClientTest.keyPrefix) + (Integer.toString(startScanKeyNumber))), RiakKVClientTest.recordsToScan, null, scannedValues));\n // After the scan transaction completes, compare the obtained results with the expected ones.\n for (int i = 0; i < (RiakKVClientTest.recordsToScan); i++) {\n Assert.assertEquals(\"Scan test FAILED: the current scanned key is NOT MATCHING the expected one.\", RiakKVClientTest.createExpectedHashMap((startScanKeyNumber + i)).toString(), scannedValues.get(i).toString());\n }\n }", "public static void main(String[] args) throws IOException {\n\n int n = Integer.parseInt(scanner.nextLine());\n // scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n String s = scanner.nextLine();\n\n long result = substrCount(n, s);\nSystem.out.println(result);\n // bufferedWriter.write(String.valueOf(result));\n // bufferedWriter.newLine();\n\n // bufferedWriter.close();\n\n scanner.close();\n }", "public int importOnlyFnaBitSequences(String filename, int start, int end) {\n int currentKID = 0;\n int result = 0;\n// String currName = null;\n boolean store = false;\n SuperString seq = new SuperString();\n try (BufferedReader br = new BufferedReader(new FileReader(filename))) {\n\n for (String line; (line = br.readLine()) != null; ) {\n if (line.charAt(0) == '>'){\n if (currentKID >= start) {\n if (seq.length() > 0) {\n// System.err.print(\"KID\\t\"+currentKID+\"\\thas length\\t\"+seq.length());\n storeOnlyBitSequence(currentKID, seq);\n } else {\n sequenceLength.add(0);\n exceptionsArr.add(new HashMap<Integer,Character>());\n }\n result++;\n seq = new SuperString();\n// currName = line.trim().substring(1);\n store = true;\n }\n currentKID++;\n } else if (store) {\n seq.addAndTrim(line);\n }\n if (currentKID >= end) break;\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return result;\n }", "public static void main(String[] args) {\n\t\tint[] binary=new int[16];\r\n\t\t// 0,1만 저장\r\n\t\t// 사용자가 요청한 정수 \r\n\t\tint user=0;\r\n\t\tint index=15; // 저장을 뒤에서부터 하겠음 -> 16 뒤부터라 index가 15 // 배열제어\r\n\t\t\r\n\t\tScanner scan=new Scanner(System.in);\r\n\t\tSystem.out.print(\"정수 입력(0~32767):\");\r\n\t\tuser=scan.nextInt();\r\n\t\tSystem.out.println(\"======= Lib이용 ======\");\r\n\t\tSystem.out.println(Integer.toBinaryString(user));\r\n\t\t// 라이브러리 만들어서 처리 \r\n\t\t\r\n\t\twhile(true) // 종료시점 => break 없으면 무한루프 돌아감\r\n\t\t{\r\n\t\t\tbinary[index]=user%2; // 2로나누고 \r\n\t\t\tuser=user/2; // 1/2=0 이런식으로 다시 저장하는게 2진법 구하는방법\r\n\t\t\tif(user==0)break; // 0이되면 끝낸다\r\n\t\t\tindex--;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// 결과 출력\r\n\t\tfor(int i=0;i<16;i++) {\r\n\t\t\tif(i%4==0 && i!=0) // i%4==0 && i!=0 이런 조건주는 연습을 해라 ★★\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tSystem.out.print(binary[i]);\t\t\t\r\n\t\t\t// 4개 출력하고 공백으로 띄어라 (0%4=0)\r\n\t\t}\r\n\t\r\n\t}", "@Test\n public void testScanRange() 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 CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst) {\n byte[] srcArray = src.array();\n int srcPosition = src.arrayOffset() + src.position();\n int srcLength = src.arrayOffset() + src.limit();\n\n char[] destArray = dst.array();\n int destPosition = dst.arrayOffset() + dst.position();\n int destLength = dst.arrayOffset() + dst.limit();\n int destLengthASCII = destPosition + Math.min(srcLength - srcPosition, destLength - destPosition);\n\n // ASCII only loop\n while (destPosition < destLengthASCII && srcArray[srcPosition] >= 0) {\n destArray[destPosition++] = (char) srcArray[srcPosition++];\n }\n\n while (srcPosition < srcLength) {\n int b1 = srcArray[srcPosition];\n if (b1 >= 0) {\n // 1 byte, 7 bits: 0xxxxxxx\n if (destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 1);\n }\n destArray[destPosition++] = (char) b1;\n srcPosition++;\n } else if ((b1 >> 5) == -2) {\n // 2 bytes, 11 bits: 110xxxxx 10xxxxxx\n if (srcLength - srcPosition < 2 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 2);\n }\n int b2 = srcArray[srcPosition + 1];\n if (isMalformed2(b1, b2)) {\n return malformed(src, srcPosition, dst, destPosition, 2);\n }\n destArray[destPosition++] = (char) (((b1 << 6) ^ b2) ^ 0x0f80);\n srcPosition += 2;\n } else if ((b1 >> 4) == -2) {\n // 3 bytes, 16 bits: 1110xxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 3 || destPosition >= destLength) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 3);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n if (isMalformed3(b1, b2, b3)) {\n return malformed(src, srcPosition, dst, destPosition, 3);\n }\n destArray[destPosition++] = (char) (((b1 << 12) ^ (b2 << 6) ^ b3) ^ 0x1f80);\n srcPosition += 3;\n } else if ((b1 >> 3) == -2) {\n // 4 bytes, 21 bits: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (srcLength - srcPosition < 4 || destLength - destPosition < 2) {\n return xflow(src, srcPosition, srcLength, dst, destPosition, 4);\n }\n int b2 = srcArray[srcPosition + 1];\n int b3 = srcArray[srcPosition + 2];\n int b4 = srcArray[srcPosition + 3];\n int uc = ((b1 & 0x07) << 18) | ((b2 & 0x3f) << 12) | ((b3 & 0x3f) << 06) | (b4 & 0x3f);\n if (isMalformed4(b2, b3, b4) || !((uc >= 0x10000) && (uc <= 1114111))) {\n return malformed(src, srcPosition, dst, destPosition, 4);\n }\n destArray[destPosition++] = (char) (0xd800 | (((uc - 0x10000) >> 10) & 0x3ff));\n destArray[destPosition++] = (char) (0xdc00 | ((uc - 0x10000) & 0x3ff));\n srcPosition += 4;\n } else {\n return malformed(src, srcPosition, dst, destPosition, 1);\n }\n }\n return xflow(src, srcPosition, srcLength, dst, destPosition, 0);\n }", "void mo30633b(int i, String str, byte[] bArr);", "private static int readBits(byte[] bytes, int pos, int len) {\n int value = 0;\n int ind = pos / 8;\n for (int i = 0; i < len && ind < bytes.length; i++) {\n int bi = (i + pos) % 8;\n if ((bytes[ind] & (1 << (7 - bi))) != 0) {\n value |= 1 << (len - 1 - i);\n }\n if (bi == 7) {\n ind++;\n }\n }\n return value;\n }", "public static void main(String[] args) throws IOException {\n FastReader sc = new FastReader();\n int tc = sc.nextInt();\n while (tc-- > 0) {\n int n = sc.nextInt();\n StringBuilder s = new StringBuilder(sc.next());\n int numberofzeros = 0;\n boolean flag = false;\n for (int i = 0; i < s.length(); i++) {\n if(s.charAt(i) == '1'){\n flag = true;\n }\n if(s.charAt(i) == '0' && flag){\n numberofzeros++;\n }\n }\n //System.out.println(numberofzeros);\n for (int i = 0; i < s.length()-1; ) {\n if(s.charAt(i) == '1' && s.charAt(i+1) == '0'){\n if(numberofzeros != 1){\n s.deleteCharAt(i+1);\n numberofzeros--;\n continue;\n }\n else {\n s.deleteCharAt(i);\n // System.out.println(\"In else block\"+s);\n if(i >= 1){\n i--;\n }\n else\n i=0;\n continue;\n }\n }\n //System.out.println(s);\n //System.out.println(s.length());\n i++;\n }\n System.out.println(s);\n }\n }", "private static void spacesToBinary() {\n\t\tString stringBinary = \"\"; \n\t\tfor(int i = 0; i < spaces.length; i++) {\n\t\t\tif(spaces[i].length() % 2 == 0) { stringBinary += \"1\"; }\n\t\t\telse if(spaces[i].length() % 2 == 1) { stringBinary += \"0\"; }\n\n\t\t\tif(i != 0 && (i+1) % 5 == 0) {\n\t\t\t\tbinary.add(stringBinary);\n\t\t\t\tstringBinary = \"\";\n\t\t\t} \n\t\t\telse if(i+1 == spaces.length) {\n\t\t\t\tfor(int k = (i+1)%5; k < 5; k++) {\n\t\t\t\t\tstringBinary += \"0\";\n\t\t\t\t}\n\t\t\t\tbinary.add(stringBinary);\n\t\t\t\tstringBinary = \"\";\n\t\t\t}\n\t\t}\n\t}", "BitStream bitStream(int startIndex);", "public static void scan(String text)\r\n\t{\r\n\t\tchar[] buf = text.toCharArray();\r\n\t\tfor (int i = 0; i < buf.length; i++)\r\n\t\t\tscan(buf[i]);\r\n\t}", "public static void main(String[] args) {\n\t\tString[] search=new String[]{\"zero\",\"one\",\"two\",\"three\",\"four\",\"five\",\"six\",\"seven\",\"eight\",\"nine\"};\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString target = scanner.next();\n\t\tscanner.close();\n\t\tint sum=0;\n\t\tfor (char ch : target.toCharArray()) {\n\t\t\tsum+=ch-'0';\n\t\t}\n\t\tString val=String.valueOf(sum);\n\t\tSystem.out.print(search[val.charAt(0)-'0']);\n\t\tfor (int i = 1; i < val.length(); i++) {\n\t\t\tSystem.out.print(\" \"+search[val.charAt(i)-'0']);\n\t\t}\n\t}", "private int BinarySearchBytePage(String wordToBeSearched, byte[] bytePage, ArrayList<Integer> matchingPositions, String filename, int middleLine)\n {\n //If the wordToBeSearched's length is less than MinWordSize or greater than MaxWordSize, then the search fails automatically\n if(wordToBeSearched.length() > SizeConstants.getMaxWordSize() || wordToBeSearched.length() < SizeConstants.getMinWordSize())\n {\n return -1;\n }\n\n //Get the index entry size in ASCII characters\n int indexEntrySize = (SizeConstants.getMaxWordSize() + 4);\n\n //Record per data page\n int entriesPerPage = bytePage.length / indexEntrySize;\n\n //Initialize the String representation of the word in the data page entry\n String dataPageEntryWord = \"\";\n\n //Initialize the String representation of the last non blank(space filled) word in the page\n String lastNonBlankWord = \"\";\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtFirstEntry = false;\n\n //Flag, true if the word to be searched is matched to the first entry of the data page\n boolean foundAtLastEntry = false;\n\n //Search for every entry in the byte page\n for(int index = 0; index < entriesPerPage; index++)\n {\n int entryStartingPosition = index * indexEntrySize;\n //Get only the word from the data page and convert the bytes to ASCII characters\n dataPageEntryWord = new String(Arrays.copyOfRange(bytePage, entryStartingPosition, entryStartingPosition + SizeConstants.getMaxWordSize())).replaceAll(\"\\\\s+\",\"\");\n\n //Compare the index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Get the line number from the index entry and add it to the ArrayList\n matchingPositions.add(ByteBuffer.wrap(Arrays.copyOfRange(bytePage, entryStartingPosition + SizeConstants.getMaxWordSize(), entryStartingPosition + indexEntrySize)).getInt());\n if(index == 0)\n {\n //Mark that the word to be searched is matched to the first entry of the data page\n foundAtFirstEntry = true;\n }\n }\n\n //Check if the word in the data page entry is not blank\n if(!dataPageEntryWord.trim().isBlank())\n {\n //Store the last non blank data page entry word\n lastNonBlankWord = dataPageEntryWord;\n }\n }\n\n //Compare the last index entry word and the word to be searched\n if(dataPageEntryWord.equals(wordToBeSearched))\n {\n //Mark that the word to be searched is matched to the last entry of the data page\n foundAtLastEntry = true;\n }\n\n //If the ArrayList is empty, the word to be searched wasn't found in the data page\n if(matchingPositions.isEmpty())\n {\n //Check if the word to be searched is alphabetically before or after the last non blank word\n if(wordToBeSearched.compareTo(lastNonBlankWord) < 0)\n {\n //Search the bottom part of the search area\n return -4;\n }\n else if(wordToBeSearched.compareTo(lastNonBlankWord) > 0)\n {\n //Search the top part of the search area\n return -3;\n }\n }\n else\n {\n //Count the new data page accesses\n int dataPageAccesses = 0;\n\n //Search for other occurrences of the word to be searched in the bottom part\n if(foundAtFirstEntry)\n {\n //Search the bottom part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, true);\n }\n\n //Search for other occurrences of the word to be searched, in the top part\n if(foundAtLastEntry)\n {\n //Search the top part of the search area\n dataPageAccesses += LinearSearchAfterBinary(filename, matchingPositions, wordToBeSearched, middleLine, false);\n }\n return dataPageAccesses;\n }\n //Continue the binary search normally\n return -2;\n }", "String getIndexBits();", "public void radixSorting() {\n\t\t\n\t}", "private byte[] m1034b(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 2\n r4 = 6\n r2 = 0\n java.lang.String r0 = \":\"\n java.lang.String[] r0 = r8.split(r0)\n byte[] r1 = new byte[r4]\n if (r0 == 0) goto L_0x0010\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 == r4) goto L_0x001e\n L_0x0010:\n r0 = 6\n java.lang.String[] r0 = new java.lang.String[r0] // Catch:{ Throwable -> 0x0043 }\n r3 = r2\n L_0x0014:\n int r4 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 >= r4) goto L_0x001e\n java.lang.String r4 = \"0\"\n r0[r3] = r4 // Catch:{ Throwable -> 0x0043 }\n int r3 = r3 + 1\n goto L_0x0014\n L_0x001e:\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r2 >= r3) goto L_0x0041\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n int r3 = r3.length() // Catch:{ Throwable -> 0x0043 }\n if (r3 <= r6) goto L_0x0033\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 0\n r5 = 2\n java.lang.String r3 = r3.substring(r4, r5) // Catch:{ Throwable -> 0x0043 }\n r0[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n L_0x0033:\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 16\n int r3 = java.lang.Integer.parseInt(r3, r4) // Catch:{ Throwable -> 0x0043 }\n byte r3 = (byte) r3 // Catch:{ Throwable -> 0x0043 }\n r1[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n int r2 = r2 + 1\n goto L_0x001e\n L_0x0041:\n r0 = r1\n L_0x0042:\n return r0\n L_0x0043:\n r0 = move-exception\n java.lang.String r1 = \"Req\"\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"getMacBa \"\n java.lang.StringBuilder r2 = r2.append(r3)\n java.lang.StringBuilder r2 = r2.append(r8)\n java.lang.String r2 = r2.toString()\n com.amap.loc.C0310c.m956a(r0, r1, r2)\n java.lang.String r0 = \"00:00:00:00:00:00\"\n byte[] r0 = r7.m1034b(r0)\n goto L_0x0042\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.loc.C0321cj.m1034b(java.lang.String):byte[]\");\n }", "static void cmp_with_reg(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1);\n\t\tint ones=0;\n\t\tfor(int i=0;i<b.length();i++)\n\t\t\tif(b.charAt(i)=='1')\n\t\t\t\tones++;\n\t\tZ = ones==0?true:false;\n\t\tP = ones%2==0?true:false;\n\t}", "private byte[] fromHex(String hex)\n {\n byte[] binary = new byte[hex.length() / 2];\n for(int i = 0; i < binary.length; i++)\n {\n binary[i] = (byte)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);\n }\n return binary;\n }", "static void xri_with_acc(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(passed.substring(4));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}", "protected int findBytes(ByteChunk bc, byte[] b) {\n\n byte first = b[0];\n byte[] buff = bc.getBuffer();\n int start = bc.getStart();\n int end = bc.getEnd();\n\n // Look for first char \n int srcEnd = b.length;\n\n for (int i = start; i <= (end - srcEnd); i++) {\n if (Ascii.toLower(buff[i]) != first) continue;\n // found first char, now look for a match\n int myPos = i+1;\n for (int srcPos = 1; srcPos < srcEnd; ) {\n if (Ascii.toLower(buff[myPos++]) != b[srcPos++])\n break;\n if (srcPos == srcEnd) return i - start; // found it\n }\n }\n return -1;\n }", "private void scan(String filename){\n\t\tverifyAutomatons();\n\t\tsymbolTable = new SymbolTable();\n\t\tprogramInternalForm = new ProgramInternalForm();\n\n\t\tString[] tokensVal = getProgramFromFile(filename);\n\n\t\tint i = 0;\n\t\twhile (i < tokensVal.length) {\n\t\t\tverifySingleTokens(tokensVal[i]);\n\t\t\ti++;\n\t\t}\n\t}", "private static void part1() {\n List<String> instructions = FileUtils.readFile(INPUT_TXT);\n int instructionPointer = 0;\n int accumulator = 0;\n Set<Integer> executedLines = new HashSet<>();\n\n // Run the instructions until a duplicate is found\n String instruction;\n do {\n instruction = instructions.get(instructionPointer);\n switch (instruction.substring(0, 3)) {\n case \"acc\":\n accumulator += Integer.parseInt(instruction.substring(4));\n case \"nop\":\n instructionPointer++;\n break;\n case \"jmp\":\n instructionPointer += Integer.parseInt(instruction.substring(4));\n break;\n }\n } while (instructionPointer < instructions.size() && executedLines.add(instructionPointer));\n\n System.out.println(\"The accumulator = \" + accumulator);\n }", "public static void decode()\n {\n \n \n int a = BinaryStdIn.readInt();\n String t = BinaryStdIn.readString();\n int len = t.length();\n \n //variables for generating next[] array\n int[] next = new int[len];\n char[] original = t.toCharArray();\n char[] temp = t.toCharArray();\n boolean[] flag = new boolean[len];\n for(int i = 0 ; i < len; i++)\n {\n flag[i] = true;\n }\n \n //sort the encoded string\n decodeSort(temp);\n \n //generating next[] array\n for(int i = 0 ; i < len; i++)\n {\n for(int j = 0 ; j < len; j++)\n {\n if(flag[j])\n { \n if(original[j]==temp[i])\n {\n next[i] = j;\n flag[j]=false;\n break;\n }\n }\n }\n \n }\n \n // decode procedure\n int key = a;\n for (int count = 0; count < len; count++) {\n key = next[key];\n BinaryStdOut.write(t.charAt(key));\n }\n BinaryStdOut.close();\n }", "public void binarycon()\n \t {\n\n\t int i,j,k,t;\n \t int temp[]=new int[10];\n\t int m=0;\n for(i=0;i<600000;i++)\n binary[i]=0;\n int b[]=new int[32];\n int dum;\n dum=max;\n i=0;\n while(dum!=0)\n {\n b[i]=dum%2;\n i=i+1;\n dum/=2;\n }\n j=24-i;\n for(k=j,t=i-1;k<(i+j);k++,t--)\n binary[k]=b[t];\n dum=73;\n i=0;\n while(dum!=0)\n {\n b[i]=dum%2;\n i=i+1;\n dum/=2;\n }\n j=32-i;\n for(k=j,t=i-1;k<32;k++,t--)\n binary[k]= b[t];\n m=32;\n for( i=0 ; i < max ; i++)\n \t {\n j=0;\n while( bytes[i]!= 0 )\n {\n temp[j++]=bytes[i]%2;\n bytes[i]=bytes[i]/2;\n\n\n\n }\n for( k=0;k<8-j ; k++)\n binary[m++]=0;\n for(k=j-1; k >=0 ; k--)\n binary[m++]=temp[k];\n }\n \t maxbinary=m;\n }", "public static void decode() {\r\n int[] index = new int[R + 1];\r\n char[] charAtIndex = new char[R + 1];\r\n for (int i = 0; i < R + 1; i++) { \r\n index[i] = i; \r\n charAtIndex[i] = (char) i;\r\n }\r\n while (!BinaryStdIn.isEmpty()) {\r\n int c = BinaryStdIn.readChar();\r\n char t = charAtIndex[c];\r\n BinaryStdOut.write(t);\r\n for (int i = c - 1; i >= 0; i--) {\r\n char temp = charAtIndex[i];\r\n int tempIndex = ++index[temp];\r\n charAtIndex[tempIndex] = temp;\r\n }\r\n charAtIndex[0] = t;\r\n index[t] = 0;\r\n }\r\n BinaryStdOut.close(); \r\n }", "private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }", "static int getNumPatterns() { return 64; }", "static void inputBin(int [] binToInt)\n {\n InputStreamReader instr = new InputStreamReader(System.in);\n BufferedReader stdin = new BufferedReader(instr);\n StringTokenizer stok;\n int num;\n String value;\n try\n {\n System.out.println(\"Input a 32 digit binary code. \");\n System.out.println();\n value = stdin.readLine();\n System.out.println();\n stok = new StringTokenizer(value);\n while (stok.hasMoreTokens())\n {\n for(int i = 0; i < 32; i++)\n {\n num = Integer.parseInt(stok.nextToken());\n int z = num;\n if (z == 0 || z == 1)\n {\n binToInt[i] = z;\n if(z == 1)\n {\n if(i == 0 || i == 8 || i == 16 || i == 24)\n {\n binToInt[i] = 128;\n }\n if(i == 1 || i == 9 || i == 17 || i == 25)\n {\n binToInt[i] = 64;\n }\n if(i == 2 || i == 10 || i == 18 || i == 26)\n {\n binToInt[i] = 32;\n }\n if(i == 3 || i == 11 || i == 19 || i == 27)\n {\n binToInt[i] = 16;\n }\n if(i == 4 || i == 12 || i == 20 || i == 28)\n {\n binToInt[i] = 8;\n }\n if(i == 5 || i == 13 || i == 21 || i == 29)\n {\n binToInt[i] = 4;\n }\n if(i == 6 || i == 14 || i == 22 || i == 30)\n {\n binToInt[i] = 2;\n }\n if(i == 7 || i == 15 || i == 23 || i == 31)\n {\n binToInt[i] = 1;\n }\n }\n if(z == 0)\n {\n binToInt[i] = 0;\n }\n }\n if(z > 1)\n {\n System.out.println(\"*Error only input 1's and 0's* Restart Program.\");\n }\n }\n } \n }catch (IOException ioe)\n {\n System.exit(-1);\n }\n }", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(UFTest.class.getResource(\"/\").getPath()+\"1.5/largeUF.txt\"));\n String str = bufferedReader.readLine();\n UFLJWQU uf = new UFLJWQU(Integer.parseInt(str));\n long beginTime =System.currentTimeMillis();\n while ((str = bufferedReader.readLine())!=null){\n String[] array = str.split(\" \");\n int p = Integer.parseInt(array[0]);\n int q = Integer.parseInt(array[1]);\n if(uf.connected(p,q)) continue;\n uf.union(p,q);\n// System.out.println(p+\" -- \"+q);\n }\n System.out.println(uf.count());\n System.out.println(\"cost time :\"+(System.currentTimeMillis() - beginTime));\n }", "private int LinearSearchAfterBinary(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched, int linesToSkip, boolean reverseFile)\n {\n try\n {\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(new File(filename + \".ndx\"));\n\n //Counter for the data page accesses\n int dataPageCounter = 0;\n\n //Flag for the search process status\n boolean searchStatus = true;\n\n //Counter of the word matching\n int wordOccurrences = matchingPositions.size();\n\n //Check whether to search the top or the bottom part of the file\n if(reverseFile)\n {\n //Create an ArrayList object to store the part of the file to continue the search\n ArrayList<String> fileLines = new ArrayList<>();\n\n //Get the necessary lines from the file\n for(int index = 0; index < linesToSkip; index++)\n {\n fileLines.add(indexFileFileScanner.nextLine());\n }\n\n //If the word to be searched length is valid, scan every data page in the ArrayList, in reverse order\n while(fileLines.size() != dataPageCounter && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(fileLines.get(fileLines.size() - dataPageCounter - 1), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n else\n {\n //Skip lines of the file\n SkipLines(indexFileFileScanner, linesToSkip);\n\n //If the word to be searched length is valid, scan every data page in the file\n while(indexFileFileScanner.hasNext() && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n\n //Close the FileScanner\n indexFileFileScanner.close();\n\n //Return the number of data page accesses\n return dataPageCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }", "@Test(timeout = 4000)\n public void test017() throws Throwable {\n byte[] byteArray0 = new byte[9];\n byteArray0[0] = (byte)120;\n byteArray0[1] = (byte) (-68);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(74, token0.kind);\n }", "static int findBinaryStringBrutForce(int[] arr){\n int numOfZeros;\n int numOfOnes;\n int maxLength = 0;\n for(int i=0; i<arr.length; i++) {\n numOfZeros=0;\n numOfOnes=0;\n for(int j=i; j<arr.length; j++) {\n if(arr[j] == 0)\n numOfZeros++;\n else\n numOfOnes++;\n if( numOfZeros == numOfOnes )\n maxLength = Math.max(maxLength, numOfZeros*2 );\n }\n }\n return maxLength;\n }", "private static void scan() {\n\t\tt = la;\n\t\tla = Scanner.next();\n\t\tla.toString();\n\t\tsym = la.kind;\n\t}", "public static int binary( String[] arr,String x)\n{\n\t int l = 0, r = arr.length - 1;\n\t int re=0;\n while (l <= r)\n { \n int m = l + (r - l) / 2;\n int res = x.compareTo(arr[m]); \n if (res == 0)\n {\n re=m;\n break;\n }\n else if(res > 0) \n {\n l = m + 1;\n }\n else\n r = m - 1; \n } \n return re; \n}", "private List<ImageInfo> scanForImageInfo(CharSequence source) {\n return null; \n }", "public static void main(String[] args) {\r\n\r\n\t\tint N = 15;\r\n\t\tint reminder;\r\n\t\tint temp = 0;\r\n\t\tStringBuilder binaryValue = new StringBuilder();\r\n\t\tfor (int i = 0; N != 1; i++) {\r\n\t\t\treminder = N % 2;\r\n\r\n\t\t\tN = N / 2;\r\n\t\t\tbinaryValue = binaryValue.append(reminder);\r\n\t\t}\r\n\t\tif (N == 1) {\r\n\t\t\tbinaryValue.append(1);\r\n\t\t}\r\n\r\n\t\tbinaryValue = binaryValue.reverse();\r\n\t\t\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < binaryValue.length(); i++) {\r\n\r\n\t\t\tif (binaryValue.charAt(i)=='1') {\r\n\t\t\t\tif (counter > temp) {\r\n\t\t\t\t\ttemp = counter;\r\n\t\t\t\t}\r\n\t\t\t\tcounter = 0;\r\n\t\t\t} else {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t if(temp==0) {\r\n\t\t\t System.out.println(\"No Binary space\");\r\n\t\t }else {\r\n\t\t\t System.out.println(\"Binary space of given number is \" + temp); \r\n\t\t }\r\n\t\t\r\n\t}", "private void findMatch()\n {\n if (this.matchLen > 0) \n {\n this.matchLen += ((this.matchLen - MAX_LENGTH) >>> 31);\n this.matchPos++;\n } \n else \n {\n // Retrieve match position\n this.matchPos = this.hashes[this.hash];\n\n // Detect match\n if ((this.matchPos != 0) && (this.pos - this.matchPos <= MASK2))\n {\n int r = this.matchLen + 1;\n\n while ((r <= MAX_LENGTH) && (this.buffer[(this.pos-r) & MASK2] == this.buffer[(this.matchPos-r) & MASK2])) \n r++;\n\n this.matchLen = r - 1;\n }\n } \n }", "static int size_of_xra(String passed){\n\t\treturn 1;\n\t}", "private byte[] decode(Node root) {\n BitSet dataInBits = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, buffer.capacity()));\n int bitIndex = 0;\n\n ByteBuffer result = ByteBuffer.allocate(inputFileSize);\n\n for (int i = 0; i < inputFileSize; i++) {\n Node node = root;\n while (!node.hasValue() && i < inputFileSize) {\n boolean bit = dataInBits.get(bitIndex);\n bitIndex += 1;\n if (bit) node = node.getRightChild();\n else node = node.getLeftChild();\n }\n if (node.hasValue()) {\n result.put(node.getValue());\n }\n }\n\n // preparing byte buffer for converting to byte array\n int pos = result.position();\n result.flip();\n byte[] resultArray = new byte[pos];\n result.get(resultArray);\n return resultArray;\n }", "private static void grep(File f) throws IOException {\r\n\r\n\t\t// Open the file and then get a channel from the stream\r\n\t\tFileInputStream fis = new FileInputStream(f);\r\n\t\tFileChannel fc = fis.getChannel();\r\n\r\n\t\t// Get the file's size and then map it into memory\r\n\t\tint sz = (int) fc.size();\r\n\t\tMappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, sz);\r\n\r\n\t\t// Decode the file into a char buffer\r\n\t\tCharBuffer cb = decoder.decode(bb);\r\n\r\n\t\t// Perform the search\r\n\t\tgrep(f, cb);\r\n\r\n\t\t// Close the channel and the stream\r\n\t\tfc.close();\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n opsMap.put('+', 'A');\n opsMap.put('-', 'S');\n opsMap.put('*', 'M');\n opsMap.put( '/', 'D');\n opsMap.put('@', 'N');\n\n Scanner sc = new Scanner(System.in); boolean pula = true;\n\n while (sc.hasNext()) {\n if (pula) {\n pula = false;\n } else {\n System.out.println();\n }\n\n String line = sc.nextLine();\n\n boolean registerEmpty = true;\n int firstUnusedMemPos = 0;\n\n for (int k = 0; k < line.length(); k++) {\n char curr = line.charAt(k);\n if (!binaryOps.contains(curr + \"\") && !unaryOps.contains(curr + \"\")) {\n // expression\n if (registerEmpty) {\n registerEmpty = false;\n System.out.println(\"L \" + curr);\n } else {\n if ((k < line.length() - 1) && binaryOps.contains(\"\" + line.charAt(k+1))) {\n // TODO fix unary op\n // doing op\n System.out.println(opsMap.get(line.charAt(k+1)) + \" \" + curr);\n k++; // We store on next loop, if needed at all\n } else {\n // adding new primitives\n System.out.println(\"ST $\" + firstUnusedMemPos); firstUnusedMemPos++;\n System.out.println(\"L \" + curr);\n }\n }\n } else if (unaryOps.contains(\"\" + curr)) {\n System.out.println(\"N\");\n } else {\n // if we get here we need to execute op with register\n firstUnusedMemPos--;\n if (curr != '+' && curr != '*') {\n // then we need to flip the order.\n if (curr != '-') {\n System.out.println(\"ST $\"+ (firstUnusedMemPos + 1));\n System.out.println(\"L $\" + firstUnusedMemPos);\n System.out.println(opsMap.get(curr) + \" $\"+ (firstUnusedMemPos + 1));\n } else {\n System.out.println(\"N\");\n System.out.println(\"A $\"+ (firstUnusedMemPos));\n }\n } else System.out.println(opsMap.get(curr) + \" $\"+ firstUnusedMemPos);\n }\n\n }\n }\n }", "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s[] = br.readLine().split(\" \");\n // So s[0] contains i and s[1] contains j.\n // Parse s[0] and s[1] and proceed with your logic\n System.out.println(findSum(new BigInteger(s[0]), new BigInteger(s[1])));\n\n\n }", "public static void main(String[] args) {\n\t\tint x = ~0;\r\n\t\tSystem.out.println(Integer.toBinaryString(x));\r\n\t\tint y = x>>>8;\r\n\t\tSystem.out.println(Integer.toBinaryString(y));\r\n\t\tSystem.out.println(x+\" \"+y);\r\n\t\t\r\n\t\tint N = 1<<31;\r\n\t\tint M = 0b11;\r\n\t\tint j=2;\r\n\t\tint i=1;\r\n\t\tSystem.out.println(Integer.toBinaryString(N));\r\n\t\tSystem.out.println(Integer.toBinaryString(M));\r\n\t\tSystem.out.println(Integer.toBinaryString(insertMIntoNFromJtoI(M, N, j, i)));\r\n\t\t\r\n\t}", "static int findBinaryStringUsingHMap(int[] arr){\n Map<Integer, Integer> map = new HashMap<>();\n int count =0, maxLength =0;\n //need a default value in map (0,-1) i.e count is zero at index -1 because when we start travelling\n // (after +- counter and encounter zero at very first time (means 0==1) means from index 0 --> current 0=1\n // to calculate the length we need 0,-1\n //e.g 0 1 --> count will be like -1 --> 0 at 1 = 1 ( how to calculate i-(-1) => 2\n map.put(0, -1);\n for(int i=0; i<arr.length; i++){\n count = count + (arr[i]==1 ? 1 : -1);\n if(map.containsKey(count)){\n maxLength = Math.max(maxLength, i - map.get(count));\n }else{\n map.put(count, i);\n }\n }\n return maxLength;\n }", "public static void main(String[] arrr){\n\t\tlong mod = 10000000011L;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tarr[i]=sc.nextInt();\n\t\t}\n\t\tlong total=0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotal = (total+((long)Math.pow((countBit(arr[i])),(i+1))%mod))%mod;\n\t\t}\n\t\tSystem.out.println(total);\n\t}", "static int size_of_ori(String passed){\n\t\treturn 2;\n\t}", "private boolean readBin(String filePath) throws FileNotFoundException, IOException {\n try {\n BufferedReader dataIn = new BufferedReader(new FileReader(filePath + \".bin\"));\n\n String next = dataIn.readLine();\n int length = Integer.parseInt(next);\n next = dataIn.readLine();\n start = Integer.parseInt(next);\n for (int i = 0; i < memory.length; i++) {\n next = dataIn.readLine();\n if (next == null) {\n break;\n }\n memory[i] = Integer.parseInt(next);\n }\n dataIn.close();\n } catch (IOException ex) {\n print(\"File error: \" + ex.toString());\n return true;\n }\n return false;\n\n }", "static void resta(){\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Ingrese el primer numero binario: \");\n String bin1 = scanner.nextLine();\n\n System.out.print(\"Ingrese el segundo numero binario: \");\n String bin2 = scanner.nextLine();\n\n int A = Integer.parseInt(bin1,2);\n int B = Integer.parseInt(bin2,2);\n\n Long suma = (long) A + (~B + 1);\n\n System.out.println(\"\\nLa resta es: \" + Long.toBinaryString(suma)); \n \n scanner.close();\n }", "private void start(Substring sub) {\n\t\tint i=0,j=0,k=0,l=0,m=0,n=0,sum=sub.n;\n\t\tfor(i=1;i<sub.n;i++)\n\t\t{\n\t\t\tfor(j=0,l=i;l<sub.n;j++,l++)\n\t\t\t{\n\t\t\t\t//HashMap<Integer,Integer> map=new HashMap<Integer,Integer>();\n\t\t\t\tint[]count=new int[10000];\n\t\t\t\t\t\tfor(m=j;m<=l;m++) {\n\t\t\t\t\t\t\tcount[sub.arr[m]]++;\n\t\t\t\t\t\t\tif(count[sub.arr[m]]<=1) {continue;}\n\t\t\t\t\t\t\telse break;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tif(m==l+1)sum=sum+i+1;\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "public static void main(String[] args) throws IOException {\n\n int t = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int tItr = 0; tItr < t; tItr++) {\n int n = scanner.nextInt();\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n int[] arr = new int[n];\n\n String[] arrItems = scanner.nextLine().split(\" \");\n scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n for (int i = 0; i < n; i++) {\n int arrItem = Integer.parseInt(arrItems[i]);\n arr[i] = arrItem;\n }\n\n long result = countInversions(arr);\n cnt = 0;\n System.out.println(result);\n //bufferedWriter.write(String.valueOf(result));\n //bufferedWriter.newLine();\n }\n\n //bufferedWriter.close();\n\n scanner.close();\n }", "public Ch12Ex1to9()\n {\n scan = new Scanner( System.in );\n }", "private int readObjectDataValues(final PdfObject pdfObject, int i, final byte[] raw, final int length) {\n \n int level=0;\n //allow for no << at start\n if(isInlineImage) {\n level = 1;\n }\n \n while(true){\n \n if(i<length && raw[i]==37) //allow for comment and ignore\n {\n i = stripComment(length, i, raw);\n }\n \n /**\n * exit conditions\n */\n if ((i>=length ||\n (endPt !=-1 && i>= endPt))||\n (raw[i] == 101 && raw[i + 1] == 110 && raw[i + 2] == 100 && raw[i + 3] == 111)||\n (raw[i]=='s' && raw[i+1]=='t' && raw[i+2]=='r' && raw[i+3]=='e' && raw[i+4]=='a' && raw[i+5]=='m')) {\n break;\n }\n \n /**\n * process value\n */\n if(raw[i]==60 && raw[i+1]==60){\n i++;\n level++;\n }else if(raw[i]==62 && i+1!=length && raw[i+1]==62 && raw[i-1]!=62){\n i++;\n level--;\n \n if(level==0) {\n break;\n }\n }else if (raw[i] == 47 && (raw[i+1] == 47 || raw[i+1]==32)) { //allow for oddity of //DeviceGray and / /DeviceGray in colorspace\n i++;\n }else if (raw[i] == 47) { //everything from /\n \n i++; //skip /\n \n final int keyStart=i;\n final int keyLength= Dictionary.findDictionaryEnd(i, raw, length);\n i += keyLength;\n \n if(i==length) {\n break;\n }\n \n //if BDC see if string\n boolean isStringPair=false;\n if(pdfObject.getID()== PdfDictionary.BDC) {\n isStringPair = Dictionary.isStringPair(i, raw, isStringPair);\n }\n \n final int type=pdfObject.getObjectType();\n \n if(debugFastCode) {\n System.out.println(\"type=\" + type + ' ' + ' ' + pdfObject.getID() + \" chars=\" + (char) raw[i - 1] + (char) raw[i] + (char) raw[i + 1] + ' ' + pdfObject + \" i=\" + i + ' ' + isStringPair);\n }\n \n //see if map of objects\n final boolean isMap = isMapObject(pdfObject, i, raw, length, keyStart, keyLength, isStringPair, type);\n \n if(raw[i]==47 || raw[i]==40 || (raw[i] == 91 && raw[i+1]!=']')) //move back cursor\n {\n i--;\n }\n \n //check for unknown value and ignore\n if(pdfKeyType==-1) {\n i = ObjectUtils.handleUnknownType(i, raw, length);\n }\n \n /**\n * now read value\n */\n if(PDFkeyInt==-1 || pdfKeyType==-1){\n if(debugFastCode) {\n System.out.println(padding + pdfObject.getObjectRefAsString() + \" =================Not implemented=\" + PDFkey + \" pdfKeyType=\" + pdfKeyType);\n }\n }else{\n i = setValue(pdfObject, i, raw, length, isMap);\n }\n \n //special case if Dest defined as names object and indirect\n }else if(raw[i]=='[' && level==0 && pdfObject.getObjectType()==PdfDictionary.Outlines){\n \n final Array objDecoder=new Array(objectReader,i, raw.length, PdfDictionary.VALUE_IS_MIXED_ARRAY,null, PdfDictionary.Names);\n objDecoder.readArray(false, raw, pdfObject, PdfDictionary.Dest);\n \n }\n \n i++;\n \n }\n \n return i;\n }", "public void setScan(ByteArrayInputStream inStream){\t\t\n\t\tthis.programIn= (ByteArrayInputStream) inStream;\t\t\n\t\tthis.scan = new Scanner (programIn);\t\t\n\t}", "public java_cup.runtime.Symbol scan()\r\n throws java.lang.Exception\r\n {\r\n\r\n\tSymbol s = this.getScanner().next_token();\r\n\tif (s != null && s.value != null) \r\n\t\tlog.info(s.toString() + \" \" + s.value.toString());\r\n\treturn s;\r\n\r\n }", "private static int[] rmi(BufferedReader br) throws IOException {\n String[] arr = br.readLine().split(SPLIT_CHAR);\n int[] vals = new int[arr.length];\n\n for (int i = 0; i < arr.length; i++) {\n vals[i] = i(arr[i]);\n }\n\n return vals;\n }", "public static void main(String...args){\n\t\tint[] whitelist = new int[10];\n\t\tfor(int i=0; i<10; i++){\n\t\t\twhitelist[i] = new Random().nextInt(1000);\t\t\t\n\t\t}\n\t\t\n\t\t//sort the list\n\t\tArrays.sort(whitelist);\n\t\tfor(int i=0; i<10; i++){\n\t\t\tSystem.out.print(whitelist[i]+\", \");\n\t\t}\n\t\t\n\t\tint key = new Random().nextInt(1000);\n\t\tint res = binarySearch(key, whitelist);\n\t\tSystem.out.println(\"\\n二分搜索数字\" + key + \",得:\" + res);\n\t}", "public static void main(String[] args) {\n\t\tint howMany = 0; //��ū�� ���� ���� ����\n\t\tString output = \"\"; //��ȯ String ����\n\t\tString[] temp = new String[10]; //output�� ��������� �ӽ÷� ����ϴ� �迭\n\n\t\tSystem.out.println(\"검색어 입력 : \");\n\t\tinput = sc.nextLine(); // ���ڿ� �Է�\n\t\tcheckSearchingOperator(input); // ���ڿ� Ȯ��\n\t\t\n\t\t\n\t\t//�������� ������ ���� �˻�� �ڸ���, temp��� �迭�� �� ��ū���� �����Ѵ�.\n\t\tif (hasAnd) { // \"+\" ��ȣ�� ���� ���\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \"+\");\n\t\t\tfor (int i = 0; tokens.hasMoreElements(); i++) {\n\t\t\t\ttemp[i] = new String(tokens.nextToken());\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t} else if (hasOr) {\n\t\t\tStringTokenizer tokens = new StringTokenizer(input, \"|\");\n\t\t\tfor (int i = 0; tokens.hasMoreElements(); i++) {\n\t\t\t\ttemp[i] = new String(tokens.nextToken());\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t\t// �� ������ ������ �迭�� + Ȥ�� |�� �������� �߸� �������� ����ִ�.\n\t\t} else { //������ ���°��\n\t\t\ttemp[0] = new String(input);\n\t\t\thowMany++;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// �˻����ʵ� �ȳ������ defalut �� bi �ʵ带 �־��ش�.\n\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\tif (!(temp[i].contains(\":\"))) {\n\t\t\t\ttemp[i] = \"bi:\" + temp[i]; \n\t\t\t}\n\t\t}\n\t\t// �� ������ ������ �� ��ū�� ��� : �� �����ϰ� �ȴ�.\n\t\t\n\t\t\n\t\t//�� ��ū�� ���鼭 �˻��� �ʵ尡 �ȵ� ��ū�� ã�Ƽ� ����Ʈ���� bi: �� �־��ָ鼭 ���� ������ش�.\n\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\tStringTokenizer tokens = new StringTokenizer(temp[i], \":\");\n\t\t\tString tmp1 = tokens.nextToken();\n\t\t\tif ((!Field.isMember(tmp1))) {\n\t\t\t\ttemp[i] = \"bi:(\" + tokens.nextToken().trim() + \")\";\n\t\t\t} // Field�� �޴��� �ִ��� Ȯ���ϰ� ������ ��bƮ���� bi ����\n\t\t\telse {\n\t\t\t\ttemp[i] = tmp1 + \":(\" + tokens.nextToken().trim() + \")\";\n\t\t\t}\n\t\t}\n\t\t// ������� �ϸ� temp�� �ϼ��� token���� �� ���ִ�.\n\t\t\n\t\tString query = \"\";\n\t\tif (hasAnd) { //And�� ���\n\t\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\tquery = query.concat(\" and \"); // �� ó���� and ������ �ȵȴ�.\n\t\t\t\t}\n\t\t\t\tquery = query.concat(temp[i]);\n\t\t\t}\n\t\t} else if (hasOr) { //or�� ���\n\t\t\tfor (int i = 0; i < howMany; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\tquery = query.concat(\" or \"); // �� ó���� and ������ �ȵȴ�.\n\t\t\t\t}\n\t\t\t\tquery = query.concat(temp[i]);\n\t\t\t}\n\t\t} else { //������ ���� ���\n\t\t\tquery = query.concat(temp[0]);\n\t\t}\n\t\n\t\t\n\n\t\t\n\t\t\n\t\ttry {\n\t\t\tquery= URLEncoder.encode(query, \"UTF-8\");\n\t\t\t// encoding�ؼ� query�� ����\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t//output file�� urlhead �����ϰ�\n\t\toutput = new String(url_head);\n\t\t\n\t\toutput = output.concat(query);\n\t\toutput = output.concat(url_tail);\n\t\t\n\t\t\t\n\t\toutput = output.replaceAll(\" \", \" \");\n\t\t//������ �ι����ٸ� �ٿ��ش�.\n\t\t\n\t\t\n\t\t\n\n\t\tNTISDataParser parser = new NTISDataParser();\n\t\tList<ResultModel> list = parser.getNtisData(output);\n\t\t\n\t\tfor(ResultModel m : list) {\n\t\t\tSystem.out.println(m.getManager());\n\t\t}\n\t\t\n\t}", "private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }", "@Test\n public void testSearchNastyCases() {\n RpkiObjectCoder coder = new RpkiObjectCoder();\n AtomicInteger brokenCounter = new AtomicInteger(0);\n lmdb.readTx0(tx -> {\n lmdbRpkiObject.forEach(tx, (k, bb) -> {\n byte[] bytes = Bytes.toBytes(bb);\n try {\n RpkiObject rpkiObject = coder.fromBytes(bytes);\n assertEquals(rpkiObject.key(), k);\n assertArrayEquals(Sha256.hash(rpkiObject.getEncoded()), rpkiObject.getSha256());\n } catch (Exception e) {\n brokenCounter.incrementAndGet();\n e.printStackTrace();\n }\n });\n });\n assertEquals(0, brokenCounter.get());\n }", "private static void searchMemo() {\n\t\t\n\t}", "static void cmp_with_mem(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1);\n\t\tint ones=0;\n\t\tfor(int i=0;i<b.length();i++)\n\t\t\tif(b.charAt(i)=='1')\n\t\t\t\tones++;\n\t\tZ = ones==0?true:false;\n\t\tP = ones%2==0?true:false;\n\t}" ]
[ "0.59265625", "0.58974487", "0.56708896", "0.5660639", "0.556692", "0.55176014", "0.5477915", "0.54662836", "0.54404134", "0.5388503", "0.53772867", "0.5371514", "0.53681827", "0.5338855", "0.53199875", "0.5315117", "0.53148043", "0.5241171", "0.5238381", "0.5233316", "0.5218877", "0.52057195", "0.520258", "0.51886004", "0.51840967", "0.5180486", "0.5168527", "0.5129898", "0.5116599", "0.5114491", "0.5112528", "0.5095954", "0.5088496", "0.5082667", "0.5080654", "0.5062842", "0.5055476", "0.5051813", "0.50486803", "0.5048672", "0.50437325", "0.5039201", "0.5022027", "0.50218016", "0.501779", "0.50042963", "0.5003949", "0.5002852", "0.4997927", "0.49975055", "0.4990055", "0.49842846", "0.49839023", "0.49738693", "0.4965291", "0.49637607", "0.49636337", "0.49618706", "0.4957345", "0.4955774", "0.4948805", "0.49440297", "0.4943818", "0.4941908", "0.49398318", "0.49162918", "0.4902817", "0.4900029", "0.4893734", "0.48921892", "0.48872343", "0.48855338", "0.48854282", "0.4883901", "0.488174", "0.48800948", "0.48796448", "0.4877588", "0.48715684", "0.4866674", "0.4865882", "0.48638958", "0.48611018", "0.486053", "0.48599055", "0.48564786", "0.48553613", "0.48500654", "0.4848934", "0.48488045", "0.48464757", "0.48432183", "0.4838299", "0.48367646", "0.48359367", "0.48333663", "0.48257264", "0.4824784", "0.4821611", "0.48174745", "0.48170596" ]
0.0
-1
TODO convert this to binary search
public boolean isEndState(int i) { for (int k = 0; k < endStates.length; k++) if (endStates[k] == i) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int binSearch(int []arr,int key) {\n\t\tint start=0;\n\t\tint end=arr.length-1;\n\t\tdo {\n\t\t\tint pc=(start+end)/2;\n\t\t\tif(arr[pc]==key) {\n\t\t\t\treturn pc;\n\t\t\t}else if(arr[pc]<key) {\n\t\t\t\tstart=pc+1;\n\t\t\t}else\n\t\t\t\tend=pc-1;\n\t\t}while(start<=end);\n\t\t\n\t\treturn -1;\n\t}", "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 2));\n\t\tassertEquals(3, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 3));\n\t\t\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 99));\n\t\t\n\t\tint[] arr1 = {0, 43, 209, 388, 401, 599};\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 209));\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 45));\n\t}", "public static int binarySearch(java.util.List arg0, java.lang.Object arg1)\n { return 0; }", "static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "private int search(int key,int start,int end)\n\t{\n\t\tint position=start+(end-start)/2;\n\t\t\n\t\t// if element is not present in the list\n\t\tif(start >= end)\n\t\t{\n\t\t\tif ((start == end) && (data[start] == key))\n\t\t\t\treturn start;\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\t\t\n\t\tif(key==data[position])\n\t\t\treturn position;\n\t\t\n\t\telse if(key < data[position])\n\t\t\treturn search(key,start,position-1);\n\t\t\n\t\telse if(key > data[position])\n\t\t\treturn search(key,position+1,end);\n\t\t\n\t\treturn -1;\n\t\t\n\t}", "public int binarySearch(String searchKey) {\r\n\t\tint low = 0;\r\n\t\tint high = size -1;\r\n\t\tint middle;\r\n\t\t\r\n\t\twhile (low <= high) {\r\n\t\t\tmiddle = (high + low)/2;\r\n\t\t\tif (searchKey.equalsIgnoreCase(list[middle].getStudentName())) {\r\n\t\t\t\treturn middle; // Element was found\r\n\t\t\t}\r\n\t\t\telse if (searchKey.compareToIgnoreCase(list[middle].getStudentName())<0) {\r\n\t\t\t\thigh = middle -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlow = middle +1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1; // Element was not found\r\n\t}", "public static void main(String args[])\n {\n BinarySerach ob = new BinarySerach();\n int arr[] = { 2, 5, 3, 1, 7, 4 };\n\n\n // Arrays.binarySearch(arr,5);\nArrays.sort(arr);\n System.out.println(Arrays.binarySearch(arr,5));\n Arrays.sort(arr);\n int n = arr.length;\n int x = 5;\n int result = ob.binarySearch(arr, x);\n if (result == -1)\n System.out.println(\"Element not present\");\n else\n System.out.println(\"Element found at \"\n + \"index \" + result);\n }", "private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n }\n return -1;\n }", "public boolean find(int key){\r\n int BB = 0,BA = nElemen-1;\r\n boolean search = true;\r\n while(search){\r\n int mid = (BA+BB)/2;\r\n if(arr[mid]==key){\r\n search = false;\r\n return true;\r\n }else if (BB>BA){\r\n break;\r\n }else{\r\n if(arr[mid]<key){\r\n BB = mid + 1;\r\n }else{\r\n BA = mid - 1;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "static int binarySearchHelp(int[] array, int searched) {\n\t\tint mid = array.length / 2;\r\n\t\tint first = 0;\r\n\t\tint last = array.length - 1;\r\n\r\n\t\twhile (array[mid] != searched && first <= last) {\r\n\t\t\tmid = (first + last) / 2;\r\n\t\t\tif (searched == array[mid]) {\r\n\t\t\t\treturn mid;\r\n\t\t\t}\r\n\t\t\tif (searched < array[mid]) {\r\n\t\t\t\tlast = mid - 1;\r\n\r\n\t\t\t}\r\n\t\t\tif (searched > array[mid]) {\r\n\t\t\t\tfirst = mid + 1;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "abstract int binSearch(int[] array, int num, int left, int right);", "private static int search(int[] arr, int findMe, int left, int right) {\n\t\tif (left > right) {\n\t\t\treturn FAILURE;\n\t\t}\n\t\tint mid = (left + right) / 2;\n\t\tif (findMe == arr[mid]) {\n\t\t\treturn mid;\n\t\t}\n\t\telse if (findMe < arr[mid]) {\n\t\t\treturn search(arr, findMe, left, mid - 1);\n\t\t}\n\t\telse {\n\t\t\treturn search(arr, findMe, mid + 1, right);\n\t\t}\n\t}", "public int search(String searchElem) {\n int hi = next-1;\n int lo = 0;\n int mid = 0;\n while (lo <= hi) {\n mid = (lo + hi) / 2;\n if (data[mid].field.equals(searchElem)) break;\n if (data[mid].field.compareTo(searchElem) < 0)\n lo = mid + 1;\n else\n hi = mid - 1;\n }\n if (mid == 0) return -1;\n else if (data[mid].field.equals(searchElem)) return mid;\n else return -1;\n }", "public static void useBinarySearch1() {\n int[] numbers = {-3, 2, 8, 12, 17, 29, 44, 58, 79};\n int index = Arrays.binarySearch(numbers, 29);\n System.out.println(\"29 is found at index \" + index);\n }", "static int binarySearch(@NotNull int[] search, int find) {\n int start, end, midPt;\n start = 0;\n end = search.length - 1;\n\n while (start <= end) {\n midPt = (start + end) / 2;\n if (search[midPt] == find) {\n return midPt;\n } else if (search[midPt] < find) {\n start = midPt + 1;\n } else {\n end = midPt - 1;\n }\n }\n\n return -1;\n }", "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _01_BinarySearch.binarySearch(numbers, 0, numbers.length - 1, 4);\n\t\tassertEquals(4, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 7, 9, 14};\n\t\tint r2 = _01_BinarySearch.binarySearch(numbers2, 0, numbers2.length - 1, 8);\n\t\tassertEquals(-1, r2);\n\t\t\n\t\tint[] numbers3 = {3, 5, 10, 16, 25};\n\t\tint r3 = _01_BinarySearch.binarySearch(numbers3, 0, numbers3.length - 1, 25);\n\t\tassertEquals(4, r3);\n\t\t\n\t}", "@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }", "void compareSearch();", "public static int binarySearchRec(int[] arr, int from, int to, int key) {\n\t\t\n\t\tif (from<=to) {\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) \t\treturn binarySearchRec(arr, ++mid, to, key);//upper\t\n\t\t\telse if (arr[mid]>key) \treturn binarySearchRec(arr, from, --mid, key); //lower\n\t\t\telse \t\t\t\t\treturn mid;//found\n\t\t}\n\t\telse {//not found\n\t\t\tint shouldBeIndex=from;\n\t\t\treturn -shouldBeIndex-1;\n\t\t}\n\t}", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }", "static int binarySearch(long[] paramArrayOflong, int paramInt, long paramLong) {\n }", "private static int binary_search(int[] array, int num, int low, int high) {\n\t\t\n\t\treturn -1;\n\t}", "public static int binSearch(int[] a, int first, int last, int key)\n\t{\t\n\t\tif(first <= last)\n\t\t{\n\t\t\tint mid = (first + last) / 2; //Divides the beginning of the array and the length of the array into 2\n\t\t\t\n\t\t\tif (a[mid] == key)\n\t\t\t{\n\t\t\t\treturn mid; \n\t\t\t}\n\t\t\t\n\t\t\telse if (a[mid] > key) //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS GREATER THAN THE KEY\n\t\t\t{\n\t\t\t\treturn last = mid - 1; //RETURNS THE LENGTH OF THE ARRAY WHICH IS THE DECREMENTED MID\n\t\t\t}\n\t\t\t\n\t\t\telse //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS LESS THAN THE KEY\n\t\t\t{\n\t\t\t\treturn first = mid + 1; //RETURNS THE FIRST = INCREMENTED MID\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\t\n\t}", "private int recFind(int searchKey, int lowerbound, int upperbound) {\n\t\tint curIn = (lowerbound + upperbound) / 2;\n\t\tif (arr[curIn] == searchKey)\n\t\t\treturn curIn;\n\t\telse if (lowerbound > upperbound)\n\t\t\treturn n;\n\t\telse {\n\t\t\tif (arr[curIn] < searchKey)\n\t\t\t\treturn recFind(searchKey, curIn + 1, upperbound);\n\t\t\telse\n\t\t\t\treturn recFind(searchKey, lowerbound, curIn - 1);\n\t\t}\n\t}", "private int binarySearchQ7(int first, int last, K key)\n {\n int index;\n \n if (first > last)\n index = first; \n else \n {\n int mid = first + (last - first) / 2;\n K midKey = dictionary[mid].getKey(); \n if (key.equals(midKey))\n index = mid; \n else if (key.compareTo(midKey) < 0)\n index = binarySearchQ7(first, mid - 1, key);\n else\n index = binarySearchQ7(mid + 1, last, key);\n } \n return index;\n }", "public static int binaryFind(int []A, int s, int e, int key) {\n\tif(s>e) return -1;\n\tint mid = (s+e)/2;\n\tif(A[mid] == key) return mid;\n if(A[mid] < key) return binaryFind(A, mid+1, e, key);\n else return binaryFind(A, s, mid-1, key); //(A[mid] > key)\n }", "static int search(int[] in, int j, int start, int end) {\n\t\tint k=start;\n\t\twhile(k<end) {\n\t\t\tif(in[k]== j) {\n\t\t\t\treturn k;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\treturn 0;\n\t}", "protected int binarySearch(int x) {\n if (arr.length == 0) {\n return -1;\n }\n\n int left = 0;\n int right = count - 1;\n\n while (left <= right) {\n int mid = (right + left) >>> 1;\n int val = arr[mid];\n\n if (val < x) {\n left = mid + 1;\n } else if (val > x) {\n right = mid - 1;\n }\n else {\n return mid;\n }\n }\n\n return -1;\n }", "public int nameBinarySearch (String name) {\n\t\t//sorting records by first name alphabetical order\n\t\tthis.nameQuickSort(this.getList(), 0, getSize()-1);\n\t\tint low = 0;\n\t\tint high = this.size-1;\n\t\tint middle;\n\n\t\twhile (low<=high) { \n\t\t\tmiddle = (low+high)/2;\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) == 0) { //check if name found\n\t\t\t\treturn middle; //return index\n\t\t\t}\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) <0) { //check if name to find is in the lower half\n\t\t\t\thigh = middle-1; //move the high to one lower than the middle\n\t\t\t}\n\t\t\telse { //if it is in higher part of the list\n\t\t\t\tlow = middle+1; //move the low to one higher than the middle\n\t\t\t}\n\t\t}\n\t\t//not found\n\t\treturn -1;\n\t}", "static int binarySearch(int[] array, int start, int end, int value) {\r\n\t\tif(end>=start) {\r\n\t\t\tint mid = (start+end)/2;\r\n\t\t\tif(array[mid]==value)\r\n\t\t\t\treturn mid;\r\n if(array[mid]>value)\r\n \treturn binarySearch(array, start, mid-1, value);\r\n return binarySearch(array, mid+1, end, value);\r\n\t\t}\r\n return -1;\r\n\t}", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n private int findIndexOf(Comparable<E> item) {\n if (count == 0) { //this is where the binary search happens that reduces the time and computational power it takes to search the collection\n return count; // if count == 0 it returns the count variable to break the loop and show that the collection is empty\n }\n int low = 0; //Sets up three variables to keep track of the start and end values of index and the middle of the collection, this helps\n int high = count - 1; //the search algorithm becase the array always knows where the middle is and so the collection can contnually half using the three\n int mid; //variables to find a single value, while the low is less or equal to the high variable,\n while (low <= high) {\n\n mid = (low + high) / 2;\n\n int compareValue = item.compareTo(data[mid]); // the value we are trying to find\n if (compareValue == 0) return mid; //returns the middle value,\n if (compareValue > 0) low = mid + 1; //if greater than it changes low value to equal the middle, plus one(as mid is already checked)\n else high = mid - 1; //else it changes to the lower half of the collecton to search there.\n }\n return low; //Hopefully if found it will then return low,\n }", "public static Boolean binarySearch(int[] arr, int n){\r\n if(arr.length == 0) return false;\r\n if(arr.length == 1 && arr[0] != n) return false; \r\n if(arr.length == 1 && arr[0] == n) return true; \r\n int start = 0;\r\n int mid = arr.length/2;\r\n int end = arr.length;\r\n int pos = mid;\r\n while(arr[pos] != n){\r\n if(n > arr[pos]){\r\n start = mid;\r\n mid = (end-start)/2+start;\r\n } else if(n < arr[pos]){\r\n end = mid;\r\n mid = (end-start)/2+start;\r\n System.out.println(\"here \" + start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n }\r\n pos = mid;\r\n if(arr[pos] == n) return true;\r\n if(start+1 == end){\r\n System.out.println(start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "int binarySearch(int arr[], int x)\n {\n int l = 0, r = arr.length - 1;\n while (l <= r) {\n int m = l + (r - l) / 2;\n\n // Check if x is present at mid\n if (arr[m] == x)\n return m;\n\n // If x greater, ignore left half\n if (arr[m] < x)\n l = m + 1;\n\n // If x is smaller, ignore right half\n else\n r = m - 1;\n }\n\n // if we reach here, then element was\n // not present\n return -1;\n }", "private int binarySearch(List<Span> spans, int line) {\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).getLine();\n if(row == line) {\n return mid;\n }else if(row < line){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n return Math.max(0,Math.min(left,max));\n }", "int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter number of elements\");\n int i = sc.nextInt();\n int[] array = new int[i];\n\n\n System.out.println(\"Enter \" + i + \" integers\");\n\n for (int c = 0; c < i; c++) {\n array[c] = sc.nextInt();\n }\n\n System.out.println(\"Enter value to find\");\n int search = sc.nextInt();\n\n MyBinarySearch mbs = new MyBinarySearch();\n Arrays.sort(array);\n System.out.println(search + \" was found at index \" + mbs.binarySearch(array, search) + \" in array \" + Arrays.toString(array));\n\n\n// MyBinarySearch mbs = new MyBinarySearch();\n// int[] arr = {2, 4, 6, 8, 10, 12, 14, 16};\n// System.out.println(\"Key 14's position: \"+mbs.binarySearch(arr, 14));\n// int[] arr1 = {6,34,78,123,432,900};\n// System.out.println(\"Key 432's position: \"+mbs.binarySearch(arr1, 432));\n }", "public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}", "private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }", "static int findPos(int []arr, int key)\n\t{\n\t\tint low=0, high =1;\n\t\tint val =arr[0];\n\t\t\n\t\twhile(val<key)\n\t\t{\n\t\t\tlow= high; //// store previous high check that 2*h doesn't exceeds array length to prevent ArrayOutOfBoundException\n\t\t\tif (2*high < arr.length -1)\n\t\t\t\thigh =2*high;\n\t\t\telse\n\t\t\t\thigh =arr.length -1;\n\t\t\t\n\t\t\tval = arr[high];\n\t\t}\n\t\treturn binarySearch(arr,low,high,key);\n\t}", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "private static boolean binarySearch(int[] arr, int num, int start, int end) {\n\t\tif(arr==null || arr.length==0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint mid;\r\n\t\t\r\n\t\twhile(start<=end){\r\n\t\t\t\r\n\t\t\tmid= start+ (end-start)/2;\r\n\t\t\t\r\n\t\t\tif(arr[mid]==num){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(num < arr[mid]){\r\n\t\t\t\tend=mid-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static int binarySearch(int[] list, int key) {\n int low = 0;\n int high = list.length - 1;\n \n while (high >= low) {\n int mid = (low + high) / 2;\n if (key < list[mid])\n high = mid - 1;\n else if (key == list[mid])\n return mid;\n else\n low = mid + 1;\n }\n return -1 - 1; // now high < low, key not found\n }", "static void binarySearch(int mat[][], int i, int j_low, int j_high, int x){\n\t\t\n\t\twhile(j_low < j_high){\n\t\t\t\n\t\t}\n\t}", "public int BinarySearch(Object[] a, int size, Object key) {\n int start = 0;\n int end = size - 1;\n while (start < end) {\n int mid = (start + size) / 2;\n if (key.equals(a[mid])) {\n return mid;\n } else if (((Comparable) key).compareTo(a[mid]) > 0) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n return -1;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public int Search(int key)\n {\n for(int i=0; i<n; i++)\n {\n if(a[i]==key)\n return 1;\n }\n return 0;\n }", "private int searchUtil(int key, int strt, int end) {\n\t\tint mid;\n\t\twhile(strt <= end) {\n\t\t\tmid = strt + (end-strt)/2;\n\t\t\tif(arr[mid] == key) \n\t\t\t\treturn mid;\n\t\t\telse if(arr[strt] < arr[mid]){ //left half is sorted\n\t\t\t\tif(arr[strt]<= key && key < arr[mid])\n\t\t\t\t\tend = mid-1;\n\t\t\t\telse\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\n\t\t\t} else { //right half is sorted\n\t\t\t\tif(arr[mid]<=key && key < arr[end])\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int binarySearch(int x) {\n\n int l = 0, h = length - 1, mid;\n while (l <= h) {\n mid = l + (h-l)/2;\n if (arr[mid] == x) return mid;\n else if (x < arr[mid]) h = mid - 1;\n else if (x > arr[mid]) l = mid + 1;\n }\n return -1;\n }", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "public Integer binSearch(Integer target, Integer[] data, Integer left, Integer right) {\n if (right - left == 1) {\n if (data[left] == target) return left;\n if (data[right] == target) return right;\n }\n if (right - left == 0) {\n if (data[left] == target) return left;\n }\n Integer midpt = (right + left) / 2 ;\n if (target == data[midpt]) return midpt ;\n if (target > data[midpt] ) return binSearch(target, data, midpt, right) ;\n if (target < data[midpt] ) return binSearch(target, data, left, midpt) ;\n\n return -1;\n }", "public int binarySearchString(String[] s,int start,int end,String search){\r\n\t\tstart=0;\r\n\t\tend=s.length;\r\n\t\twhile(start<end){\r\n\t\t\tint mid=(start+end)/2;\r\n\t\t\tif(search.compareTo(s[mid])<0){\r\n\t\t\t\tend=mid;\r\n\t\t\t}else if(search.compareTo(s[mid])>0){\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}else{\r\n\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "public int binarySearch(int[] numbers, int numToSearch){\n\n QuickSort quickSort = new QuickSort();\n quickSort.sort(numbers);\n\n //Above code is tightly coupled with either of the algo to be used, we can not manage using sort algo dynamically.\n\n\n // Login to search\n\n //Return the number found\n\n return 5; //returning any hypothetical number\n }", "private int binarySearch(int[] nums, int target, int low, int high) {\n while (low <= high) {\n int mid = low + (high - low) / 2; // find mid\n\n if (nums[mid] == target) { // if number found\n if (mid == low || nums[mid] > nums[mid - 1]) // check if it is the first occurence\n return mid; // if it is return mid\n else\n high = mid - 1; // decrease high to reach the index\n } else if (nums[mid] > target) // if the value in num is greater\n high = mid - 1; // decrease high\n else\n low = mid + 1; // else increase low\n\n }\n\n return -1; // number not found\n }", "@Test\n public void testBinarySearch() {\n int actualResult = binarySearch.BinarySearch(new int[]{2,4,5}, 5);\n // check if the value is correct\n assertEquals(5, actualResult);\n }", "public int binarySearchLoop(int key) {\n int first = 0;\n int last = length - 1;\n int mid = length / 2;\n //only on sorted array\n //first , mid = half(floor), last;\n //is mid the key\n //is mid < or > from the key\n //if key is bigger, then we go right, the new first is mid+1, new mid is (mid+last)/2, and last is the same until the end of the GOING searching right\n //if key is smaller then we go left, the new last is mid-1, new mid is (first + mid)/2, and first is the same until the end of GOING searching left\n\n while (first <= last) {\n if (key == arr[mid]) return mid;\n\n else if (key < arr[mid]) {\n last = mid - 1;\n mid = (first + mid) / 2;\n } else {\n first = mid + 1;\n mid = (first + last) / 2;\n }\n }\n return -1;\n }", "private static int binarySearchRecursively(int[] sortedArray, int input, int first, int last) {\n int mid = (first + last) / 2;\n\n if (last < first) {\n return -1;\n }\n if (input == sortedArray[mid]) {\n return mid;\n } else if (input < sortedArray[mid]) {\n return binarySearchRecursively(sortedArray, input, last, mid - 1);\n } else {\n return binarySearchRecursively(sortedArray, input, mid + 1, last);\n }\n }", "public static int binarySearch(java.util.List arg0, java.lang.Object arg1, java.util.Comparator arg2)\n { return 0; }", "private static int search(long[] numbers, int start, int end, long value) {\n if (start > end){\n return -1;\n }\n\n int middle = (start + end) / 2;\n\n if (numbers[middle] == value) {\n return middle;\n }\n\n if (numbers[middle] > value) {\n return search(numbers, start, middle - 1, value);\n }\n\n return search(numbers, middle + 1, end, value);\n }", "public static int binSearch(int[] a, int x) {\r\n int l = 0;\r\n int r = a.length;\r\n while (l != r) {\r\n // inv: l <= res <= r\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n r = m;\r\n }\r\n else {\r\n l = m + 1;\r\n }\r\n }\r\n return r;\r\n }", "private int binarySearchReference(String searchForThisWord2, String[] x)\n\t{\n\t\tint wordCounter = Arrays.binarySearch(x, searchForThisWord2);\t//creates an int called wordCounter that will look throu\n\t\twordCounter = wordCounter > 0 ? wordCounter : 1;\t//Gives properties to wordCounter. The first element (a) will be represented as 1\n\t\tSystem.out.println(\"The word \" + searchForThisWord2 + \"'s position in the English Dictionary is \" + wordCounter);\t//print statement\n\t\treturn wordCounter;\t//return the method\n\t}", "private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int BinarySearch(int[] arr,int data){\n int si = 0, ei = arr.length - 1;\n while(si <= ei){\n int mid = (si + ei) / 2;\n if(arr[mid] == data)\n return mid;\n else if(data < arr[mid]){\n ei = mid - 1;\n }else si = mid + 1;\n }\n\n return -1;\n }", "public static void binarySearchFromFile() throws IOException\n\t{\n\t\tint elementFound=0;\n\t\tFile file = new File(\"/home/bridgeit/Desktop/program.txt\");\n\t\t\n\t\tif (file.createNewFile()){\n System.out.println(\"File is created!\");\n }else{\n System.out.println(\"File already exists.\");\n }\n\t\t\n\t\t//Write Content\n FileWriter writer = new FileWriter(file);\n writer.write(\"THIS,IS,MY,FIRST,FILE\");\n writer.close();\n int length = (int) file.length();\n \n //read the contents\n FileReader fr = new FileReader(\"/home/bridgeit/Desktop/program.txt\");\n BufferedReader br = new BufferedReader(fr);\n \n //splitting the contents\n String string = null;\n String[] splitted = new String[length];\n while ((string = br.readLine()) != null) \n {\n splitted = string.split(\",\");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n }\n System.out.println();\n \n \n //sorting of elements\n Arrays.sort(splitted);\n System.out.println(\"sorted elements are \");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n System.out.println();\n \n \n //to search the element using binary search\n System.out.println(\"enter a word to search\");\n String search = scanner.next();\n \n int min = 0;\n\t\tint max = splitted.length - 1;\n\t\tint mid = (min + max) /2;\n\t\t\n\t\tif((search.compareTo(splitted[max])<=0) && (search.compareTo(splitted[min])>=0))\n\t\t{\n\t\t\twhile(elementFound != 1)\n\t\t\t{\n\t\t\t\tif(search.compareTo(splitted[mid])==0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"element found at \"+mid);\n\t\t\t\t\telementFound = 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(search.compareTo(splitted[mid]) < 0)\n\t\t\t\t{\n\t\t\t\t\tmax = mid-1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmin = mid +1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\tSystem.out.println(search + \" is not present in the list.\\n\");\n\t\t}\n\t}", "public int binarySearch(RandomAccessFile Din, String id) throws IOException \n {\n int Low = 0;\n int NUM_RECORDS = Integer.parseInt(getNumberOfRecords(\"normal\"));;\n int High = NUM_RECORDS-1;\n int Middle = 0;\n String MiddleId;\n String record = \"\";\n boolean Found = false;\n\n \n while (!Found && (High >= Low)) \n {\n Middle = (High+Low) / 2;\n record = getRecord(\"normal\", Din, Middle+1);\n MiddleId = record.substring(5,45);\n MiddleId = MiddleId.trim();\n int result = MiddleId.compareTo(id);\n\n if (result == 0) {\n // ids match\n return Middle;\n } \n else if (result < 0) {\n Low = Middle + 1;\n }\n else {\n High = Middle - 1;\n }\n }\n\n if (Low > High) {\n record = getRecord(\"normal\", Din, Middle);\n // if (record != \"\") {\n MiddleId = record.substring(5, 45).trim().toUpperCase();\n if (MiddleId.compareTo(id) == 0) {\n return Middle;\n }\n // }\n }\n\n return -1;\n }", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}", "public static void main(String[] args) {\n\n List<Integer> integers = new ArrayList<>();\n for (int i = 0; i < 49; i++) {\n integers.add(i);\n }\n int i = Collections.binarySearch(integers, 20);\n System.out.println(i);\n System.out.println(integers.get(i));\n\n }", "static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }", "public static int binSearch(int[] a, int x, int l, int r) {\r\n if (l == r) {\r\n return r;\r\n }\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n return binSearch(a, x, l, m);\r\n }\r\n else {\r\n return binSearch(a, x, m + 1, r);\r\n }\r\n }", "private int binarySearch(int[] r6, int r7, boolean r8) {\n /*\n r5 = this;\n int r0 = r6.length\n int r0 = r0 + -1\n r1 = 0\n r2 = r0\n r0 = 0\n L_0x0006:\n if (r0 > r2) goto L_0x001d\n int r3 = r0 + r2\n int r3 = r3 / 2\n r4 = r6[r3]\n if (r7 != r4) goto L_0x0011\n return r3\n L_0x0011:\n r4 = r6[r3]\n if (r7 >= r4) goto L_0x0019\n int r3 = r3 + -1\n r2 = r3\n goto L_0x0006\n L_0x0019:\n int r3 = r3 + 1\n r0 = r3\n goto L_0x0006\n L_0x001d:\n if (r2 >= 0) goto L_0x0020\n return r1\n L_0x0020:\n if (r8 == 0) goto L_0x002a\n int r7 = r2 + 1\n int r6 = r6.length\n int r6 = r6 + -1\n if (r7 > r6) goto L_0x002a\n goto L_0x002b\n L_0x002a:\n r7 = r2\n L_0x002b:\n return r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.tao.util.TaobaoImageUrlStrategy.binarySearch(int[], int, boolean):int\");\n }", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public static boolean binarySearch(ArrayList<String> arr, String key) {\n int first = 0;\n int last = arr.size() - 1;\n int mid = (first + last) / 2;\n if (last == -1)\n return false;\n while (first <= last) {\n if (arr.get(mid).compareTo(key) < 0) {\n first = mid + 1;\n } else if (arr.get(mid).equals(key)) {\n return true;\n } else {\n last = mid - 1;\n }\n mid = (first + last) / 2;\n }\n return false;\n }", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "static boolean binarySearch(int[] a, int x)\n {\n //TODO: implement this method\n \tboolean contained = false;\n \tint lo = 0;\n \tint hi = a.length - 1;\n \t\n \twhile (lo <= hi && !contained)\n \t{\n \t\tint mid = lo + (hi - lo)/2;\n \t\tif (a[mid] > x)\n \t\thi = mid - 1;\n \telse if (a[mid] < x)\n \t\tlo = mid + 1;\n \telse contained = true;\n \t}\n \t\n \treturn contained;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }" ]
[ "0.7063641", "0.7027464", "0.70169866", "0.6989076", "0.6986333", "0.69823456", "0.6949036", "0.6947478", "0.692512", "0.69234174", "0.68952775", "0.68869627", "0.687566", "0.6843876", "0.6842733", "0.68244743", "0.6820225", "0.68176717", "0.6797093", "0.67940784", "0.6780319", "0.67789763", "0.6764937", "0.6755202", "0.6747537", "0.6744946", "0.6742976", "0.6740101", "0.6736982", "0.672848", "0.6701681", "0.66782737", "0.66693854", "0.6662274", "0.665797", "0.66503555", "0.6648267", "0.66422427", "0.66416377", "0.66271013", "0.66248345", "0.66037184", "0.6602566", "0.65884805", "0.6586066", "0.65856576", "0.6575108", "0.65675825", "0.65535843", "0.65505934", "0.65496784", "0.6548021", "0.65312624", "0.652332", "0.65230864", "0.65120476", "0.650808", "0.6502205", "0.64912724", "0.648456", "0.6480231", "0.64671147", "0.64628595", "0.64611834", "0.64558285", "0.6454349", "0.64523244", "0.6450189", "0.64392436", "0.6435418", "0.64345247", "0.6430068", "0.64232165", "0.6422531", "0.6417088", "0.64110446", "0.6385572", "0.6382308", "0.6373421", "0.63733566", "0.63684964", "0.6368245", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347" ]
0.0
-1
TODO convert this to binary search
public boolean isStartState(int i) { for (int k = 0; k < startStates.length; k++) if (startStates[k] == i) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int binSearch(int []arr,int key) {\n\t\tint start=0;\n\t\tint end=arr.length-1;\n\t\tdo {\n\t\t\tint pc=(start+end)/2;\n\t\t\tif(arr[pc]==key) {\n\t\t\t\treturn pc;\n\t\t\t}else if(arr[pc]<key) {\n\t\t\t\tstart=pc+1;\n\t\t\t}else\n\t\t\t\tend=pc-1;\n\t\t}while(start<=end);\n\t\t\n\t\treturn -1;\n\t}", "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] arr0 = {0, 1, 2, 3, 4, 5};\n\t\tassertEquals(0, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 0));\n\t\tassertEquals(1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 1));\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 2));\n\t\tassertEquals(3, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 3));\n\t\t\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr0, 0, arr0.length - 1, 99));\n\t\t\n\t\tint[] arr1 = {0, 43, 209, 388, 401, 599};\n\t\tassertEquals(2, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 209));\n\t\tassertEquals(-1, _01_BinarySearch.binarySearch(arr1, 0, arr0.length - 1, 45));\n\t}", "public static int binarySearch(java.util.List arg0, java.lang.Object arg1)\n { return 0; }", "static int binarySearch(int[] paramArrayOfint, int paramInt1, int paramInt2) {\n }", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "private int search(int key,int start,int end)\n\t{\n\t\tint position=start+(end-start)/2;\n\t\t\n\t\t// if element is not present in the list\n\t\tif(start >= end)\n\t\t{\n\t\t\tif ((start == end) && (data[start] == key))\n\t\t\t\treturn start;\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\t\t\n\t\tif(key==data[position])\n\t\t\treturn position;\n\t\t\n\t\telse if(key < data[position])\n\t\t\treturn search(key,start,position-1);\n\t\t\n\t\telse if(key > data[position])\n\t\t\treturn search(key,position+1,end);\n\t\t\n\t\treturn -1;\n\t\t\n\t}", "public int binarySearch(String searchKey) {\r\n\t\tint low = 0;\r\n\t\tint high = size -1;\r\n\t\tint middle;\r\n\t\t\r\n\t\twhile (low <= high) {\r\n\t\t\tmiddle = (high + low)/2;\r\n\t\t\tif (searchKey.equalsIgnoreCase(list[middle].getStudentName())) {\r\n\t\t\t\treturn middle; // Element was found\r\n\t\t\t}\r\n\t\t\telse if (searchKey.compareToIgnoreCase(list[middle].getStudentName())<0) {\r\n\t\t\t\thigh = middle -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tlow = middle +1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1; // Element was not found\r\n\t}", "public static void main(String args[])\n {\n BinarySerach ob = new BinarySerach();\n int arr[] = { 2, 5, 3, 1, 7, 4 };\n\n\n // Arrays.binarySearch(arr,5);\nArrays.sort(arr);\n System.out.println(Arrays.binarySearch(arr,5));\n Arrays.sort(arr);\n int n = arr.length;\n int x = 5;\n int result = ob.binarySearch(arr, x);\n if (result == -1)\n System.out.println(\"Element not present\");\n else\n System.out.println(\"Element found at \"\n + \"index \" + result);\n }", "private static int bSearch(int[] elements, int key) {\n int left = 0, right = elements.length - 1, mid = 0;\n while (left <= right) {\n mid = (left + right) / 2;\n\n if (key < elements[mid]) {\n right = mid - 1;\n } else if (key == elements[mid]) {\n return mid;\n } else {\n left = mid + 1;\n }\n }\n return -1;\n }", "private int binarySearch(T element) {\n int start = 0, end = sortedArray.size(), mid = 0;\n while (start < end) {\n mid = (end + start) / 2;\n int cmp = sortedArray.get(mid).compareTo(element);\n if (cmp == 0) {\n start = end = mid;\n }\n else if (cmp < 0) {\n start = mid + 1;\n }\n else {\n end = mid;\n }\n }\n return start;\n }", "int binarySearch(int[] arr, int low, int high, int key){\n while(low <= high){\n int mid = (low + high) / 2;\n if (key < arr[mid])\n high = mid - 1;\n else if (key > arr[mid])\n low = mid + 1;\n else\n return mid;\n }\n return -1;\n }", "public boolean find(int key){\r\n int BB = 0,BA = nElemen-1;\r\n boolean search = true;\r\n while(search){\r\n int mid = (BA+BB)/2;\r\n if(arr[mid]==key){\r\n search = false;\r\n return true;\r\n }else if (BB>BA){\r\n break;\r\n }else{\r\n if(arr[mid]<key){\r\n BB = mid + 1;\r\n }else{\r\n BA = mid - 1;\r\n }\r\n }\r\n }\r\n return false;\r\n }", "static int binarySearchHelp(int[] array, int searched) {\n\t\tint mid = array.length / 2;\r\n\t\tint first = 0;\r\n\t\tint last = array.length - 1;\r\n\r\n\t\twhile (array[mid] != searched && first <= last) {\r\n\t\t\tmid = (first + last) / 2;\r\n\t\t\tif (searched == array[mid]) {\r\n\t\t\t\treturn mid;\r\n\t\t\t}\r\n\t\t\tif (searched < array[mid]) {\r\n\t\t\t\tlast = mid - 1;\r\n\r\n\t\t\t}\r\n\t\t\tif (searched > array[mid]) {\r\n\t\t\t\tfirst = mid + 1;\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "abstract int binSearch(int[] array, int num, int left, int right);", "private static int search(int[] arr, int findMe, int left, int right) {\n\t\tif (left > right) {\n\t\t\treturn FAILURE;\n\t\t}\n\t\tint mid = (left + right) / 2;\n\t\tif (findMe == arr[mid]) {\n\t\t\treturn mid;\n\t\t}\n\t\telse if (findMe < arr[mid]) {\n\t\t\treturn search(arr, findMe, left, mid - 1);\n\t\t}\n\t\telse {\n\t\t\treturn search(arr, findMe, mid + 1, right);\n\t\t}\n\t}", "public int search(String searchElem) {\n int hi = next-1;\n int lo = 0;\n int mid = 0;\n while (lo <= hi) {\n mid = (lo + hi) / 2;\n if (data[mid].field.equals(searchElem)) break;\n if (data[mid].field.compareTo(searchElem) < 0)\n lo = mid + 1;\n else\n hi = mid - 1;\n }\n if (mid == 0) return -1;\n else if (data[mid].field.equals(searchElem)) return mid;\n else return -1;\n }", "public static void useBinarySearch1() {\n int[] numbers = {-3, 2, 8, 12, 17, 29, 44, 58, 79};\n int index = Arrays.binarySearch(numbers, 29);\n System.out.println(\"29 is found at index \" + index);\n }", "static int binarySearch(@NotNull int[] search, int find) {\n int start, end, midPt;\n start = 0;\n end = search.length - 1;\n\n while (start <= end) {\n midPt = (start + end) / 2;\n if (search[midPt] == find) {\n return midPt;\n } else if (search[midPt] < find) {\n start = midPt + 1;\n } else {\n end = midPt - 1;\n }\n }\n\n return -1;\n }", "@Test\n\tpublic void testBinarySearch() {\n\t\tint[] numbers = {0, 1, 2, 3, 4, 5, 6};\n\t\tint r1 = _01_BinarySearch.binarySearch(numbers, 0, numbers.length - 1, 4);\n\t\tassertEquals(4, r1);\n\t\t\n\t\tint[] numbers2 = {2, 4, 7, 9, 14};\n\t\tint r2 = _01_BinarySearch.binarySearch(numbers2, 0, numbers2.length - 1, 8);\n\t\tassertEquals(-1, r2);\n\t\t\n\t\tint[] numbers3 = {3, 5, 10, 16, 25};\n\t\tint r3 = _01_BinarySearch.binarySearch(numbers3, 0, numbers3.length - 1, 25);\n\t\tassertEquals(4, r3);\n\t\t\n\t}", "@Test\n public void testBinarySearch() {\n System.out.println(\"binarySearch\");\n int[] index = {10, 11, 12, 13, 14};\n int key = 12;\n int begin = 0;\n int end = 5;\n int expResult = 2;\n int result = Utils.binarySearch(index, key, begin, end);\n assertEquals(expResult, result);\n }", "void compareSearch();", "public static int binarySearchRec(int[] arr, int from, int to, int key) {\n\t\t\n\t\tif (from<=to) {\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) \t\treturn binarySearchRec(arr, ++mid, to, key);//upper\t\n\t\t\telse if (arr[mid]>key) \treturn binarySearchRec(arr, from, --mid, key); //lower\n\t\t\telse \t\t\t\t\treturn mid;//found\n\t\t}\n\t\telse {//not found\n\t\t\tint shouldBeIndex=from;\n\t\t\treturn -shouldBeIndex-1;\n\t\t}\n\t}", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "static int binarySearch(int arr[], int l, int r, int x) {\n if (r >= l) { \r\n int mid = l + (r - l) / 2; \r\n if (arr[mid] == x) \r\n return mid; \r\n \r\n if (arr[mid] > x) \r\n return binarySearch(arr, l, mid - 1, x); \r\n \r\n \r\n return binarySearch(arr, mid + 1, r, x); \r\n } \r\n \r\n \r\n return -1; \r\n }", "static int binarySearch(long[] paramArrayOflong, int paramInt, long paramLong) {\n }", "private static int binary_search(int[] array, int num, int low, int high) {\n\t\t\n\t\treturn -1;\n\t}", "public static int binSearch(int[] a, int first, int last, int key)\n\t{\t\n\t\tif(first <= last)\n\t\t{\n\t\t\tint mid = (first + last) / 2; //Divides the beginning of the array and the length of the array into 2\n\t\t\t\n\t\t\tif (a[mid] == key)\n\t\t\t{\n\t\t\t\treturn mid; \n\t\t\t}\n\t\t\t\n\t\t\telse if (a[mid] > key) //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS GREATER THAN THE KEY\n\t\t\t{\n\t\t\t\treturn last = mid - 1; //RETURNS THE LENGTH OF THE ARRAY WHICH IS THE DECREMENTED MID\n\t\t\t}\n\t\t\t\n\t\t\telse //IF THE INDEX(WHICH IS THE MID) OF ARRAY A IS LESS THAN THE KEY\n\t\t\t{\n\t\t\t\treturn first = mid + 1; //RETURNS THE FIRST = INCREMENTED MID\t\t\n\t\t\t}\n\t\t}\n\t\treturn -1;\t\n\t}", "private int recFind(int searchKey, int lowerbound, int upperbound) {\n\t\tint curIn = (lowerbound + upperbound) / 2;\n\t\tif (arr[curIn] == searchKey)\n\t\t\treturn curIn;\n\t\telse if (lowerbound > upperbound)\n\t\t\treturn n;\n\t\telse {\n\t\t\tif (arr[curIn] < searchKey)\n\t\t\t\treturn recFind(searchKey, curIn + 1, upperbound);\n\t\t\telse\n\t\t\t\treturn recFind(searchKey, lowerbound, curIn - 1);\n\t\t}\n\t}", "private int binarySearchQ7(int first, int last, K key)\n {\n int index;\n \n if (first > last)\n index = first; \n else \n {\n int mid = first + (last - first) / 2;\n K midKey = dictionary[mid].getKey(); \n if (key.equals(midKey))\n index = mid; \n else if (key.compareTo(midKey) < 0)\n index = binarySearchQ7(first, mid - 1, key);\n else\n index = binarySearchQ7(mid + 1, last, key);\n } \n return index;\n }", "public static int binaryFind(int []A, int s, int e, int key) {\n\tif(s>e) return -1;\n\tint mid = (s+e)/2;\n\tif(A[mid] == key) return mid;\n if(A[mid] < key) return binaryFind(A, mid+1, e, key);\n else return binaryFind(A, s, mid-1, key); //(A[mid] > key)\n }", "static int search(int[] in, int j, int start, int end) {\n\t\tint k=start;\n\t\twhile(k<end) {\n\t\t\tif(in[k]== j) {\n\t\t\t\treturn k;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\treturn 0;\n\t}", "protected int binarySearch(int x) {\n if (arr.length == 0) {\n return -1;\n }\n\n int left = 0;\n int right = count - 1;\n\n while (left <= right) {\n int mid = (right + left) >>> 1;\n int val = arr[mid];\n\n if (val < x) {\n left = mid + 1;\n } else if (val > x) {\n right = mid - 1;\n }\n else {\n return mid;\n }\n }\n\n return -1;\n }", "public int nameBinarySearch (String name) {\n\t\t//sorting records by first name alphabetical order\n\t\tthis.nameQuickSort(this.getList(), 0, getSize()-1);\n\t\tint low = 0;\n\t\tint high = this.size-1;\n\t\tint middle;\n\n\t\twhile (low<=high) { \n\t\t\tmiddle = (low+high)/2;\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) == 0) { //check if name found\n\t\t\t\treturn middle; //return index\n\t\t\t}\n\t\t\tif (name.compareToIgnoreCase(list[middle].getName()) <0) { //check if name to find is in the lower half\n\t\t\t\thigh = middle-1; //move the high to one lower than the middle\n\t\t\t}\n\t\t\telse { //if it is in higher part of the list\n\t\t\t\tlow = middle+1; //move the low to one higher than the middle\n\t\t\t}\n\t\t}\n\t\t//not found\n\t\treturn -1;\n\t}", "static int binarySearch(int[] array, int start, int end, int value) {\r\n\t\tif(end>=start) {\r\n\t\t\tint mid = (start+end)/2;\r\n\t\t\tif(array[mid]==value)\r\n\t\t\t\treturn mid;\r\n if(array[mid]>value)\r\n \treturn binarySearch(array, start, mid-1, value);\r\n return binarySearch(array, mid+1, end, value);\r\n\t\t}\r\n return -1;\r\n\t}", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n private int findIndexOf(Comparable<E> item) {\n if (count == 0) { //this is where the binary search happens that reduces the time and computational power it takes to search the collection\n return count; // if count == 0 it returns the count variable to break the loop and show that the collection is empty\n }\n int low = 0; //Sets up three variables to keep track of the start and end values of index and the middle of the collection, this helps\n int high = count - 1; //the search algorithm becase the array always knows where the middle is and so the collection can contnually half using the three\n int mid; //variables to find a single value, while the low is less or equal to the high variable,\n while (low <= high) {\n\n mid = (low + high) / 2;\n\n int compareValue = item.compareTo(data[mid]); // the value we are trying to find\n if (compareValue == 0) return mid; //returns the middle value,\n if (compareValue > 0) low = mid + 1; //if greater than it changes low value to equal the middle, plus one(as mid is already checked)\n else high = mid - 1; //else it changes to the lower half of the collecton to search there.\n }\n return low; //Hopefully if found it will then return low,\n }", "public static Boolean binarySearch(int[] arr, int n){\r\n if(arr.length == 0) return false;\r\n if(arr.length == 1 && arr[0] != n) return false; \r\n if(arr.length == 1 && arr[0] == n) return true; \r\n int start = 0;\r\n int mid = arr.length/2;\r\n int end = arr.length;\r\n int pos = mid;\r\n while(arr[pos] != n){\r\n if(n > arr[pos]){\r\n start = mid;\r\n mid = (end-start)/2+start;\r\n } else if(n < arr[pos]){\r\n end = mid;\r\n mid = (end-start)/2+start;\r\n System.out.println(\"here \" + start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n }\r\n pos = mid;\r\n if(arr[pos] == n) return true;\r\n if(start+1 == end){\r\n System.out.println(start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "int binarySearch(int arr[], int x)\n {\n int l = 0, r = arr.length - 1;\n while (l <= r) {\n int m = l + (r - l) / 2;\n\n // Check if x is present at mid\n if (arr[m] == x)\n return m;\n\n // If x greater, ignore left half\n if (arr[m] < x)\n l = m + 1;\n\n // If x is smaller, ignore right half\n else\n r = m - 1;\n }\n\n // if we reach here, then element was\n // not present\n return -1;\n }", "private int binarySearch(List<Span> spans, int line) {\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).getLine();\n if(row == line) {\n return mid;\n }else if(row < line){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n return Math.max(0,Math.min(left,max));\n }", "int binarySearchWithRecursion(int[] arr, int low, int high, int key){\n if (high < low)\n return -1;\n int mid = (low + high) / 2;\n if (key == arr[mid])\n return mid;\n if (key > arr[mid])\n return binarySearchWithRecursion(arr,(mid + 1), high, key);\n return binarySearchWithRecursion(arr, low, (mid - 1), key);\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Enter number of elements\");\n int i = sc.nextInt();\n int[] array = new int[i];\n\n\n System.out.println(\"Enter \" + i + \" integers\");\n\n for (int c = 0; c < i; c++) {\n array[c] = sc.nextInt();\n }\n\n System.out.println(\"Enter value to find\");\n int search = sc.nextInt();\n\n MyBinarySearch mbs = new MyBinarySearch();\n Arrays.sort(array);\n System.out.println(search + \" was found at index \" + mbs.binarySearch(array, search) + \" in array \" + Arrays.toString(array));\n\n\n// MyBinarySearch mbs = new MyBinarySearch();\n// int[] arr = {2, 4, 6, 8, 10, 12, 14, 16};\n// System.out.println(\"Key 14's position: \"+mbs.binarySearch(arr, 14));\n// int[] arr1 = {6,34,78,123,432,900};\n// System.out.println(\"Key 432's position: \"+mbs.binarySearch(arr1, 432));\n }", "public static int binarySearchIter(int[] arr, int from, int to, int key) {\n\t\t\n\t\tint shouldBeIndex;\n\t\twhile (from<=to){\n\t\t\tint mid=from+(to-from)/2;\n\t\t\tif (arr[mid]<key) from=mid+1;//upper\n\t\t\telse if (arr[mid]>key) to=mid-1;//lower\n\t\t\telse return mid;//found\n\t\t}\n\t\t//not found\n\t\tshouldBeIndex=from;\n\t\treturn -shouldBeIndex-1;\n\t}", "private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }", "static int findPos(int []arr, int key)\n\t{\n\t\tint low=0, high =1;\n\t\tint val =arr[0];\n\t\t\n\t\twhile(val<key)\n\t\t{\n\t\t\tlow= high; //// store previous high check that 2*h doesn't exceeds array length to prevent ArrayOutOfBoundException\n\t\t\tif (2*high < arr.length -1)\n\t\t\t\thigh =2*high;\n\t\t\telse\n\t\t\t\thigh =arr.length -1;\n\t\t\t\n\t\t\tval = arr[high];\n\t\t}\n\t\treturn binarySearch(arr,low,high,key);\n\t}", "public int binarySearch(ArrayList<Integer> a, int val){\n int low = 0;\n int high = a.size() - 1;\n \n while(high - low > 3){\n int mid = (low + high)/2;\n if(a.get(mid) > val){\n high = mid - 1;\n }\n else{\n low = mid; \n }\n }\n int i;\n for(i=low; i<=high; ++i){\n if(a.get(i) > val)\n return i;\n }\n return i;\n }", "private static boolean binarySearch(int[] arr, int num, int start, int end) {\n\t\tif(arr==null || arr.length==0){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tint mid;\r\n\t\t\r\n\t\twhile(start<=end){\r\n\t\t\t\r\n\t\t\tmid= start+ (end-start)/2;\r\n\t\t\t\r\n\t\t\tif(arr[mid]==num){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if(num < arr[mid]){\r\n\t\t\t\tend=mid-1;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static int binarySearch(int[] list, int key) {\n int low = 0;\n int high = list.length - 1;\n \n while (high >= low) {\n int mid = (low + high) / 2;\n if (key < list[mid])\n high = mid - 1;\n else if (key == list[mid])\n return mid;\n else\n low = mid + 1;\n }\n return -1 - 1; // now high < low, key not found\n }", "static void binarySearch(int mat[][], int i, int j_low, int j_high, int x){\n\t\t\n\t\twhile(j_low < j_high){\n\t\t\t\n\t\t}\n\t}", "public int BinarySearch(Object[] a, int size, Object key) {\n int start = 0;\n int end = size - 1;\n while (start < end) {\n int mid = (start + size) / 2;\n if (key.equals(a[mid])) {\n return mid;\n } else if (((Comparable) key).compareTo(a[mid]) > 0) {\n start = mid + 1;\n } else {\n end = mid - 1;\n }\n }\n return -1;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public int Search(int key)\n {\n for(int i=0; i<n; i++)\n {\n if(a[i]==key)\n return 1;\n }\n return 0;\n }", "private int searchUtil(int key, int strt, int end) {\n\t\tint mid;\n\t\twhile(strt <= end) {\n\t\t\tmid = strt + (end-strt)/2;\n\t\t\tif(arr[mid] == key) \n\t\t\t\treturn mid;\n\t\t\telse if(arr[strt] < arr[mid]){ //left half is sorted\n\t\t\t\tif(arr[strt]<= key && key < arr[mid])\n\t\t\t\t\tend = mid-1;\n\t\t\t\telse\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\n\t\t\t} else { //right half is sorted\n\t\t\t\tif(arr[mid]<=key && key < arr[end])\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int binarySearch(int x) {\n\n int l = 0, h = length - 1, mid;\n while (l <= h) {\n mid = l + (h-l)/2;\n if (arr[mid] == x) return mid;\n else if (x < arr[mid]) h = mid - 1;\n else if (x > arr[mid]) l = mid + 1;\n }\n return -1;\n }", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "public Integer binSearch(Integer target, Integer[] data, Integer left, Integer right) {\n if (right - left == 1) {\n if (data[left] == target) return left;\n if (data[right] == target) return right;\n }\n if (right - left == 0) {\n if (data[left] == target) return left;\n }\n Integer midpt = (right + left) / 2 ;\n if (target == data[midpt]) return midpt ;\n if (target > data[midpt] ) return binSearch(target, data, midpt, right) ;\n if (target < data[midpt] ) return binSearch(target, data, left, midpt) ;\n\n return -1;\n }", "public int binarySearchString(String[] s,int start,int end,String search){\r\n\t\tstart=0;\r\n\t\tend=s.length;\r\n\t\twhile(start<end){\r\n\t\t\tint mid=(start+end)/2;\r\n\t\t\tif(search.compareTo(s[mid])<0){\r\n\t\t\t\tend=mid;\r\n\t\t\t}else if(search.compareTo(s[mid])>0){\r\n\t\t\t\tstart=mid+1;\r\n\t\t\t}else{\r\n\t\t\t\treturn mid;\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}", "public int binarySearch(int[] numbers, int numToSearch){\n\n QuickSort quickSort = new QuickSort();\n quickSort.sort(numbers);\n\n //Above code is tightly coupled with either of the algo to be used, we can not manage using sort algo dynamically.\n\n\n // Login to search\n\n //Return the number found\n\n return 5; //returning any hypothetical number\n }", "private int binarySearch(int[] nums, int target, int low, int high) {\n while (low <= high) {\n int mid = low + (high - low) / 2; // find mid\n\n if (nums[mid] == target) { // if number found\n if (mid == low || nums[mid] > nums[mid - 1]) // check if it is the first occurence\n return mid; // if it is return mid\n else\n high = mid - 1; // decrease high to reach the index\n } else if (nums[mid] > target) // if the value in num is greater\n high = mid - 1; // decrease high\n else\n low = mid + 1; // else increase low\n\n }\n\n return -1; // number not found\n }", "@Test\n public void testBinarySearch() {\n int actualResult = binarySearch.BinarySearch(new int[]{2,4,5}, 5);\n // check if the value is correct\n assertEquals(5, actualResult);\n }", "public int binarySearchLoop(int key) {\n int first = 0;\n int last = length - 1;\n int mid = length / 2;\n //only on sorted array\n //first , mid = half(floor), last;\n //is mid the key\n //is mid < or > from the key\n //if key is bigger, then we go right, the new first is mid+1, new mid is (mid+last)/2, and last is the same until the end of the GOING searching right\n //if key is smaller then we go left, the new last is mid-1, new mid is (first + mid)/2, and first is the same until the end of GOING searching left\n\n while (first <= last) {\n if (key == arr[mid]) return mid;\n\n else if (key < arr[mid]) {\n last = mid - 1;\n mid = (first + mid) / 2;\n } else {\n first = mid + 1;\n mid = (first + last) / 2;\n }\n }\n return -1;\n }", "private static int binarySearchRecursively(int[] sortedArray, int input, int first, int last) {\n int mid = (first + last) / 2;\n\n if (last < first) {\n return -1;\n }\n if (input == sortedArray[mid]) {\n return mid;\n } else if (input < sortedArray[mid]) {\n return binarySearchRecursively(sortedArray, input, last, mid - 1);\n } else {\n return binarySearchRecursively(sortedArray, input, mid + 1, last);\n }\n }", "public static int binarySearch(java.util.List arg0, java.lang.Object arg1, java.util.Comparator arg2)\n { return 0; }", "private static int search(long[] numbers, int start, int end, long value) {\n if (start > end){\n return -1;\n }\n\n int middle = (start + end) / 2;\n\n if (numbers[middle] == value) {\n return middle;\n }\n\n if (numbers[middle] > value) {\n return search(numbers, start, middle - 1, value);\n }\n\n return search(numbers, middle + 1, end, value);\n }", "public static int binSearch(int[] a, int x) {\r\n int l = 0;\r\n int r = a.length;\r\n while (l != r) {\r\n // inv: l <= res <= r\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n r = m;\r\n }\r\n else {\r\n l = m + 1;\r\n }\r\n }\r\n return r;\r\n }", "private int binarySearchReference(String searchForThisWord2, String[] x)\n\t{\n\t\tint wordCounter = Arrays.binarySearch(x, searchForThisWord2);\t//creates an int called wordCounter that will look throu\n\t\twordCounter = wordCounter > 0 ? wordCounter : 1;\t//Gives properties to wordCounter. The first element (a) will be represented as 1\n\t\tSystem.out.println(\"The word \" + searchForThisWord2 + \"'s position in the English Dictionary is \" + wordCounter);\t//print statement\n\t\treturn wordCounter;\t//return the method\n\t}", "private int binarySearch(int[] array, int left, int right, int target) {\n\t\tif (left > right) {\n\t\t\treturn -1;\n\t\t}\n\t\twhile (left <= right) {\n\t\t\tint mid = left + (right - left) / 2;\n\t\t\tif (array[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t} else if (array[mid] < target) {\n\t\t\t\tleft = mid + 1;\n\t\t\t} else {\n\t\t\t\tright = mid - 1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static int BinarySearch(int[] arr,int data){\n int si = 0, ei = arr.length - 1;\n while(si <= ei){\n int mid = (si + ei) / 2;\n if(arr[mid] == data)\n return mid;\n else if(data < arr[mid]){\n ei = mid - 1;\n }else si = mid + 1;\n }\n\n return -1;\n }", "public static void binarySearchFromFile() throws IOException\n\t{\n\t\tint elementFound=0;\n\t\tFile file = new File(\"/home/bridgeit/Desktop/program.txt\");\n\t\t\n\t\tif (file.createNewFile()){\n System.out.println(\"File is created!\");\n }else{\n System.out.println(\"File already exists.\");\n }\n\t\t\n\t\t//Write Content\n FileWriter writer = new FileWriter(file);\n writer.write(\"THIS,IS,MY,FIRST,FILE\");\n writer.close();\n int length = (int) file.length();\n \n //read the contents\n FileReader fr = new FileReader(\"/home/bridgeit/Desktop/program.txt\");\n BufferedReader br = new BufferedReader(fr);\n \n //splitting the contents\n String string = null;\n String[] splitted = new String[length];\n while ((string = br.readLine()) != null) \n {\n splitted = string.split(\",\");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n }\n System.out.println();\n \n \n //sorting of elements\n Arrays.sort(splitted);\n System.out.println(\"sorted elements are \");\n for(String display:splitted)\n {\n System.out.print(\" \"+display);\n }\n System.out.println();\n \n \n //to search the element using binary search\n System.out.println(\"enter a word to search\");\n String search = scanner.next();\n \n int min = 0;\n\t\tint max = splitted.length - 1;\n\t\tint mid = (min + max) /2;\n\t\t\n\t\tif((search.compareTo(splitted[max])<=0) && (search.compareTo(splitted[min])>=0))\n\t\t{\n\t\t\twhile(elementFound != 1)\n\t\t\t{\n\t\t\t\tif(search.compareTo(splitted[mid])==0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"element found at \"+mid);\n\t\t\t\t\telementFound = 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(search.compareTo(splitted[mid]) < 0)\n\t\t\t\t{\n\t\t\t\t\tmax = mid-1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmin = mid +1;\n\t\t\t\t\tmid = (min+max)/2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\tSystem.out.println(search + \" is not present in the list.\\n\");\n\t\t}\n\t}", "public int binarySearch(RandomAccessFile Din, String id) throws IOException \n {\n int Low = 0;\n int NUM_RECORDS = Integer.parseInt(getNumberOfRecords(\"normal\"));;\n int High = NUM_RECORDS-1;\n int Middle = 0;\n String MiddleId;\n String record = \"\";\n boolean Found = false;\n\n \n while (!Found && (High >= Low)) \n {\n Middle = (High+Low) / 2;\n record = getRecord(\"normal\", Din, Middle+1);\n MiddleId = record.substring(5,45);\n MiddleId = MiddleId.trim();\n int result = MiddleId.compareTo(id);\n\n if (result == 0) {\n // ids match\n return Middle;\n } \n else if (result < 0) {\n Low = Middle + 1;\n }\n else {\n High = Middle - 1;\n }\n }\n\n if (Low > High) {\n record = getRecord(\"normal\", Din, Middle);\n // if (record != \"\") {\n MiddleId = record.substring(5, 45).trim().toUpperCase();\n if (MiddleId.compareTo(id) == 0) {\n return Middle;\n }\n // }\n }\n\n return -1;\n }", "public static int binSearchRotatedIter(int src[], int lo, int hi, int target){\n\n while(lo<=hi){\n int mid = lo + (hi-lo)/2;\n if(src[mid]==target) return mid;\n //if bottom half is sorted\n if(src[lo]<=src[mid]){\n \n if(src[lo]<=target && target<src[mid]){\n hi=mid-1;\n }else{\n lo=mid+1;\n }\n }\n //if upper half is sorted\n else{\n if(src[mid]<target && target<=src[hi]){\n lo=mid+1;\n }else{\n hi=mid-1;\n }\n }\n }\n return -1;\n}", "public void binarySearchForValue(int value){\n int lowIndex = 0;\n int highIndex = arraySize -1;\n\n while(lowIndex <= highIndex){\n int middleIndex = (lowIndex + highIndex)/2;\n\n if(theArray[middleIndex] < value){\n lowIndex = middleIndex + 1;\n } else if(theArray[middleIndex] > value) {\n highIndex = middleIndex -1;\n } else {\n System.out.println(\"Found a match for \" + value + \" at Index \" + middleIndex);\n // Exit the while loop.\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "private static int binarySearch(int[] arr, int low, int high, int target) {\n\n\t\tif (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\n\t\t\tif (arr[mid] < target) {\n\t\t\t\treturn binarySearch(arr, mid + 1, high, target);\n\t\t\t} else {\n\t\t\t\treturn binarySearch(arr, low, mid - 1, target);\n\t\t\t}\n\n\t\t}\n\n\t\treturn -1;\n\t}", "public static void main(String[] args) {\n\n List<Integer> integers = new ArrayList<>();\n for (int i = 0; i < 49; i++) {\n integers.add(i);\n }\n int i = Collections.binarySearch(integers, 20);\n System.out.println(i);\n System.out.println(integers.get(i));\n\n }", "static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }", "public static int binSearch(int[] a, int x, int l, int r) {\r\n if (l == r) {\r\n return r;\r\n }\r\n int m = (l + r) / 2;\r\n if (a[m] >= x) {\r\n return binSearch(a, x, l, m);\r\n }\r\n else {\r\n return binSearch(a, x, m + 1, r);\r\n }\r\n }", "private int binarySearch(int[] r6, int r7, boolean r8) {\n /*\n r5 = this;\n int r0 = r6.length\n int r0 = r0 + -1\n r1 = 0\n r2 = r0\n r0 = 0\n L_0x0006:\n if (r0 > r2) goto L_0x001d\n int r3 = r0 + r2\n int r3 = r3 / 2\n r4 = r6[r3]\n if (r7 != r4) goto L_0x0011\n return r3\n L_0x0011:\n r4 = r6[r3]\n if (r7 >= r4) goto L_0x0019\n int r3 = r3 + -1\n r2 = r3\n goto L_0x0006\n L_0x0019:\n int r3 = r3 + 1\n r0 = r3\n goto L_0x0006\n L_0x001d:\n if (r2 >= 0) goto L_0x0020\n return r1\n L_0x0020:\n if (r8 == 0) goto L_0x002a\n int r7 = r2 + 1\n int r6 = r6.length\n int r6 = r6 + -1\n if (r7 > r6) goto L_0x002a\n goto L_0x002b\n L_0x002a:\n r7 = r2\n L_0x002b:\n return r7\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.taobao.tao.util.TaobaoImageUrlStrategy.binarySearch(int[], int, boolean):int\");\n }", "private static int binarySearchMine(int[] data, int target, int low, int high) {\n while (low <= high) {\n int median = (low + high) / 2;\n int current = data[median];\n if (current == target) {\n return median;\n } else if (target < current) {\n return binarySearchMine(data, target, low, median - 1);\n } else {\n return binarySearchMine(data, target, median + 1, high);\n }\n }\n return -1;\n }", "public static boolean binarySearch(ArrayList<String> arr, String key) {\n int first = 0;\n int last = arr.size() - 1;\n int mid = (first + last) / 2;\n if (last == -1)\n return false;\n while (first <= last) {\n if (arr.get(mid).compareTo(key) < 0) {\n first = mid + 1;\n } else if (arr.get(mid).equals(key)) {\n return true;\n } else {\n last = mid - 1;\n }\n mid = (first + last) / 2;\n }\n return false;\n }", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }", "public void binarySearchForValue(int value) {\n int lowIndex = 0;\n int highIndex = arraySize - 1;\n\n while (lowIndex <= highIndex) {\n int middleIndex = (highIndex + lowIndex) / 2;\n\n if (theArray[middleIndex] < value) {\n lowIndex = middleIndex + 1;\n } else if (theArray[middleIndex] > value) {\n highIndex = middleIndex - 1;\n } else {\n System.out.println(\"\\nFound a match for \" + value + \" at index \" + middleIndex);\n lowIndex = highIndex + 1;\n }\n\n printHorizontalArray(middleIndex, -1);\n }\n }", "static boolean binarySearch(int[] a, int x)\n {\n //TODO: implement this method\n \tboolean contained = false;\n \tint lo = 0;\n \tint hi = a.length - 1;\n \t\n \twhile (lo <= hi && !contained)\n \t{\n \t\tint mid = lo + (hi - lo)/2;\n \t\tif (a[mid] > x)\n \t\thi = mid - 1;\n \telse if (a[mid] < x)\n \t\tlo = mid + 1;\n \telse contained = true;\n \t}\n \t\n \treturn contained;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }", "public int Search(Element e){\n\tint int_ret_val ;\n\tList aux01 ;\n\tElement var_elem ;\n\tboolean var_end ;\n\tint nt ;\n\n\tint_ret_val = 0 ;\n\taux01 = this ;\n\tvar_end = end;\n\tvar_elem = elem ;\n\twhile (!var_end){\n\t if (e.Equal(var_elem)){\n\t\tint_ret_val = 1 ;\n\t }\n\t else nt = 0 ;\n\t aux01 = aux01.GetNext() ;\n\t var_end = aux01.GetEnd();\n\t var_elem = aux01.GetElem();\n\t}\n\treturn int_ret_val ;\n }" ]
[ "0.7063641", "0.7027464", "0.70169866", "0.6989076", "0.6986333", "0.69823456", "0.6949036", "0.6947478", "0.692512", "0.69234174", "0.68952775", "0.68869627", "0.687566", "0.6843876", "0.6842733", "0.68244743", "0.6820225", "0.68176717", "0.6797093", "0.67940784", "0.6780319", "0.67789763", "0.6764937", "0.6755202", "0.6747537", "0.6744946", "0.6742976", "0.6740101", "0.6736982", "0.672848", "0.6701681", "0.66782737", "0.66693854", "0.6662274", "0.665797", "0.66503555", "0.6648267", "0.66422427", "0.66416377", "0.66271013", "0.66248345", "0.66037184", "0.6602566", "0.65884805", "0.6586066", "0.65856576", "0.6575108", "0.65675825", "0.65535843", "0.65505934", "0.65496784", "0.6548021", "0.65312624", "0.652332", "0.65230864", "0.65120476", "0.650808", "0.6502205", "0.64912724", "0.648456", "0.6480231", "0.64671147", "0.64628595", "0.64611834", "0.64558285", "0.6454349", "0.64523244", "0.6450189", "0.64392436", "0.6435418", "0.64345247", "0.6430068", "0.64232165", "0.6422531", "0.6417088", "0.64110446", "0.6385572", "0.6382308", "0.6373421", "0.63733566", "0.63684964", "0.6368245", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347", "0.6365347" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79036397", "0.78051436", "0.77656627", "0.7726445", "0.7630767", "0.76211494", "0.75842685", "0.75296193", "0.74868536", "0.74574566", "0.74574566", "0.7437983", "0.7422003", "0.7402867", "0.7391276", "0.73864174", "0.7378494", "0.73696834", "0.736246", "0.7355139", "0.73449135", "0.7340738", "0.7329403", "0.7327573", "0.7325295", "0.7318255", "0.73159224", "0.7312879", "0.73033696", "0.73033696", "0.73008657", "0.7297531", "0.72929823", "0.7285663", "0.7282749", "0.72806233", "0.7277895", "0.72592133", "0.72592133", "0.72592133", "0.725875", "0.72585285", "0.7249446", "0.72242975", "0.72188604", "0.721602", "0.7203672", "0.720087", "0.71988416", "0.7192238", "0.7184499", "0.71768767", "0.71679133", "0.71665394", "0.7153183", "0.71526414", "0.71351266", "0.71341896", "0.71341896", "0.7128609", "0.7128064", "0.7123341", "0.7122453", "0.712232", "0.71210843", "0.7116595", "0.7116595", "0.7116595", "0.7116595", "0.7116421", "0.71161103", "0.71159387", "0.7114029", "0.71116006", "0.71088904", "0.71078885", "0.7104719", "0.70989364", "0.7097548", "0.7096198", "0.7092782", "0.7092782", "0.70853245", "0.7082456", "0.70802784", "0.70795983", "0.7073409", "0.70673656", "0.7060751", "0.70591253", "0.7058957", "0.7050524", "0.70371544", "0.70371544", "0.70350724", "0.70344317", "0.70344317", "0.7031844", "0.70303893", "0.70286727", "0.7017757" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onAccuracyChanged(Sensor arg0, int arg1) { }
{ "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
only updates when clicked need to consider time when constantly updating
@Override public void onSensorChanged(SensorEvent event) { if(runOrNot) { Sensor mySensor = event.sensor; if (mySensor.getType() == Sensor.TYPE_ACCELEROMETER) { long current = System.currentTimeMillis(); if((current - prevTime) > 100) { prevTime = current; x = event.values[0]; y = event.values[1]; z = event.values[2]; String text = "x: " + x + " y: " + y + " z: " + z; listOfPoints.append(new Coordinate(x,y,z)); box.setText(text + "\n" + box.getText().toString()); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void click() {\n this.lastActive = System.nanoTime();\n }", "@Override\r\n\t\tpublic void onClick(View arg0) {\n\t\t\tn++;\r\n\t\t\tmy_button.setText(\"receive:\"+String.valueOf(n));\r\n\t\t\t\r\n\r\n\t\t\tlong now_time = java.lang.System.currentTimeMillis();\r\n\t\t my_his_startTime = 10;\r\n\t\t // my_his_startTime = 3;\r\n\t\t\tmy_his_span = 60;\r\n\t\t\tmy_his_count = 20;\r\n\t\t\t\r\n\t\t\r\n\t\t\tm_bneedupdate = true;\r\n\t\t\t\r\n\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tupdate();\n\t\t\t}", "public void update() {\n\n// If the button is clicked, call the click method and play sound effect\n if (isClicked()) {\n clickSound.play(Main.sfxVolume / 10f);\n click();\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (game.gameStatus >= 0){\n\t\t\tp.update();\n\t\t\tupdateBackground();\n\t\t\trepaint();\n\t\t}\n\t\telse{\n\t\t\ttime.stop();\n\t\t\tPlayerData.coins += game.coinsCollected;\n\t\t\tif (game.score > PlayerData.highscore) PlayerData.highscore = game.score;\n\t\t\tPlayerData.saveData();\n\t\t\tMainMenu.jtp.setSelectedIndex(1);\n\t\t\tMainMenu.jtp.setSelectedIndex(0);\n\t\t}\n\t\t//System.out.println(this.p.ID);\n\t}", "public void update() {\n\t\tupdate(1);\n\t}", "public void update(){\r\n\t\tupdateTurnLabel();\r\n\t\tupdateCanvas();\r\n\t}", "public void update(){\n\t\tsetChanged();\n\t\trender();\n\t\tprintTimer();\n\t}", "private void refreshButtonClicked(ActionEvent event) {\n //--\n //-- WRITE YOUR CODE HERE!\n //--\n\n itemView.getItem().setPreviousPrice(itemView.getItem().getItemPrice());\n //itemView.getItem().setItemPrice(randPrice.getRandomPrice());\n itemView.getItem().setItemPrice(randPrice.getRandomPrice(itemView.getItem()));\n itemView.getItem().setItemChange();\n super.repaint();\n showMessage(\"Refresh clicked!\");\n }", "public void actionPerformed(ActionEvent e){\n\t\t\topenUpdate();\n\t\t}", "@Override\n\tpublic void update(Event e) {\n\t}", "public void update(){\r\n\t\t\r\n\t}", "private void refreshButtonClicked(ActionEvent event) {\n\n PriceFinder refreshedPrice = new PriceFinder(); // generates a new price to set as a temp item's new price\n\n itemView.testItem.setPrice(refreshedPrice.returnNewPrice());\n configureUI(); // essentially pushes the new item information to the panel\n\n showMessage(\"Item price updated! \");\n }", "@Override\n public void update() {\n this.blnDoUpdate.set(true);\n }", "private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thandler.post(updateThread);\r\n\t\t\t}", "public void update() {}", "private void follow_updates() {\n new Thread() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(1000);\n GUI.setUps(upd_count);\n upd_count = 0;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "public void buttonClickTiming() {\n //Prevention of button mushing by using threshold of 1000 ms between clicks\n if (SystemClock.elapsedRealtime() - lastClickTime < 1000) {\n return;\n }\n lastClickTime = SystemClock.elapsedRealtime();\n }", "@Override\r\n\tpublic void update() {\n\t\tthis.repaint();\r\n\t}", "@Override\n public void onClick(View v) {\n mSec = 0;\n mins = 0;\n seconds = 0;\n updateTime = 0L;\n timeBuff = 0L;\n startTime = 0L;\n mSecTime = 0L;\n\n timer.setText(\"00:00:00\");\n\n //this clears the list view\n TimeList.clear();\n\n //notifyDataSetChanged method notifies the adapter that the data\n // has been changed and it needs to do a refresh\n adapter.notifyDataSetChanged();\n }", "public void updateUI(){}", "public void update(){\r\n }", "private void updateUI() {\n if (mCurrentLocation != null) {\n mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n mLastUpdateTimeTextView.setText(mLastUpdateTime);\n\n localLatitude = Double.parseDouble(mLatitudeTextView.getText().toString());\n localLongtitude = Double.parseDouble(mLongitudeTextView.getText().toString());\n double newDistance = Math.round(gps2m(previousLatitude, previousLongitude, localLatitude, localLongtitude) * 100) / 100.0;\n\n /*\n if (!mStartUpdatesButton.isEnabled()) {\n mMoveTextView.setText(String.valueOf(newDistance) + \" m\");\n totalDistance += newDistance;\n\n mTotalDistanceTextView.setText(String.valueOf(totalDistance) + \"m\");\n }\n previousLatitude = localLatitude != 0 ? localLatitude : previousLongitude;\n previousLongitude = localLongtitude != 0 ? localLongtitude : previousLatitude;\n\n\n if (!mStartUpdatesButton.isEnabled()) {\n double speed = Double.parseDouble(timeToSpeed());\n\n timeslots.add(System.currentTimeMillis());\n userspeeds.add((float) speed);\n float randomspeed = (float)Math.random()*6;\n compspeeds.add(randomspeed);\n mSpeedTextView.setText(String.valueOf(speed) + \"km/h\");\n\n //TODO: change weight\n double calValue = calorieCalculator(weight, timeSingleValue / 3600, speed);\n calValue = Math.round(calValue * 100) / 100;\n calValue = calValue < 0 ? 0 : calValue;\n calValue = calValue > 100 ? 100 : calValue;\n calValue = calValue / 1000;\n mCalTextView.setText(String.valueOf(calValue));\n compDistance += 5*randomspeed/3600*1000;\n int predictedCalories = (int) Math.round((calValue / timeSingleValue)) * 3600;\n mCalPredictTextView.setText(String.valueOf(predictedCalories));\n\n\n if (compDistance > totalDistance) {\n if (status == 0 || status == 1) {\n MediaPlayer mediaPlayer1 = MediaPlayer.create(getApplicationContext(), R.raw.tooslow);\n mediaPlayer1.start();\n status = 2;\n }\n } else {\n if (status == 0 || status == 2) {\n MediaPlayer mediaPlayer2 = MediaPlayer.create(getApplicationContext(), R.raw.toofast);\n mediaPlayer2.start();\n status = 1;\n }\n }\n }\n */\n if (!mStartUpdatesButton.isEnabled()) {\n mMoveTextView.setText(String.valueOf(newDistance) + \" m\");\n totalDistance += newDistance;\n double totalDistanceOutput = Math.round(totalDistance * 100) / 100.0;\n totalDistanceOutput = totalDistanceOutput < 0 ? 0 : totalDistanceOutput;\n mTotalDistanceTextView.setText(String.valueOf(totalDistanceOutput) + \"m\");\n }\n previousLatitude = localLatitude != 0 ? localLatitude : previousLongitude;\n previousLongitude = localLongtitude != 0 ? localLongtitude : previousLatitude;\n if (!mStartUpdatesButton.isEnabled()) {\n double speed = Double.parseDouble(timeToSpeed());\n timeslots.add(System.currentTimeMillis());\n userspeeds.add((float) speed);\n float randomspeed = (float) Math.random() * 2;\n compspeeds.add(randomspeed);\n mSpeedTextView.setText(String.valueOf(speed) + \" km/h\");\n double calValue = calorieCalculator(weight, timeSingleValue / 3600, speed);\n calValue = calValue < 0 ? 0 : calValue;\n calValue = calValue > 100 ? 100 : calValue;\n calValue = calValue / 1000.0 * 60;\n calValue = Math.round(calValue * 100) / 100.0;\n mCalTextView.setText(String.valueOf(calValue) + \" kCal/m\");\n compDistance += 5 * randomspeed / 3600 * 1000;\n double predictedCalories = (calValue / timeSingleValue) * 60;\n predictedCalories = (predictedCalories < 0 || predictedCalories > 100000) ? 0 : predictedCalories;\n mCalPredictTextView.setText(\"~ \" + String.valueOf(predictedCalories) + \" kCal\");\n\n if (compDistance > totalDistance) {\n if (status == 0 || status == 1) {\n MediaPlayer mediaPlayer1 = MediaPlayer.create(getApplicationContext(), R.raw.tooslow);\n mediaPlayer1.start();\n status = 2;\n }\n } else {\n if (status == 0 || status == 2) {\n MediaPlayer mediaPlayer2 = MediaPlayer.create(getApplicationContext(), R.raw.toofast);\n mediaPlayer2.start();\n status = 1;\n }\n }\n }\n }\n }", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "public void act() \n {\n if(Greenfoot.mouseClicked(this)){\n storeMenu.getLastPressed(this,item,cost);\n changeImage();\n } \n }", "public void update() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "public void update() ;", "public void actionPerformed(ActionEvent actionEvent)\n {\n \t if(time<10.0)\n \t {\n \t\t time = time + 0.1;\n \t\t timeDisplay.setText(fmt.format(time)); \n \t }\n \t else\n \t {\n \t resetTime(); \n \t bulb.setOn(false);\n onButton.setEnabled(true);\n offButton.setEnabled(false);\n bulb.repaint();\n \t }\n }", "private void updateGUIStatus() {\r\n\r\n }", "@Override\n public void update() {\n \n }", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void update() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void update() {\r\n\r\n\t}", "@Override\n void individualUpdate() {\n timeToLive--;\n radius++;\n setColor();\n }", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void update() {\n\t\t\r\n\t}", "public void update() {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n updateInformation();\n\n }", "public void update(){}", "public void update(){}", "public void timeChanged();", "private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }", "public void run() {\n int x = m.getCurrentMouse().getX();\n int y = m.getCurrentMouse().getY();\n int scrollX = view.getScroll().getHorizontalScrollBar().getValue();\n int scrollY = view.getScroll().getVerticalScrollBar().getValue();\n\n int clickX = x + scrollX - 40;\n\n int clickY = y + scrollY - 30;\n\n int fromTheTop = clickY / 21;\n int fromTheLeft = clickX / 21;\n\n\n Note n = model.getHighestPitch();\n\n for (int i = 0; i < fromTheTop; i++) {\n n = Note.prevNote(n);\n }\n this.model.setNoteToBeAdded(new Note(n.getPitchLetter(), n.getOctave(),\n fromTheLeft, fromTheLeft));\n\n view.setAllNotes(model.getMusic());\n view.setLength(model.getDuration());\n view.setTone(model.getTone(model.getNotes()));\n view.setTempo(model.getTempo());\n\n\n }", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() {}", "@Override\n\tpublic void update() { }", "public void update(){\n }", "public void update() {\n\n\t\tdisplay();\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tgetRunningProgress();\r\n\t\t\t\tupdateMemInfo();\r\n\t\t\t\tmakeToast(\"已刷新\");\r\n\r\n\t\t\t}", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "public void update();", "@Override\n protected void doUpdate(long now) {\n eyeCandy.update();\n }", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void update() {\n\t}", "public void run(){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10L);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tupdateButtonBounds();\n\t\t\t\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\r\n\tpublic void update() {\n\t}", "@Override\n public void onClick(View view) {\n update(holder.getAdapterPosition());\n }", "public void handleUpdate(){\n increaseDecrease(\"i\");\n action=\"update\";\n buttonSave.setVisible(true);\n admission.setEditable(false);\n\n }", "public void requestUpdate(){\n shouldUpdate = true;\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tnewUpdate1(DeviceNum1);\r\n\r\n\t\t\t}", "@Override\n public void update() {\n }", "public void update() {\n }", "@Override\n public void update()\n {\n\n }", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "@Override\r\n public void update(MiniGame game){\r\n PathXDataModel data = (PathXDataModel) game.getDataModel();\r\n \r\n //Check if 10 seconds has past since activating steal\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.STEAL_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating Intangibility\r\n if (getSpecialState().equals(PathXSpriteState.INTANGIBLE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.INTANGIBILITY_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n \r\n //Check if 10 seconds has past since activating God Mode\r\n if (getSpecialState().equals(PathXSpriteState.GOD_MODE.toString())){\r\n GregorianCalendar newTime = new GregorianCalendar();\r\n long timePast = newTime.getTimeInMillis() - getSpecialTimer().getTimeInMillis();\r\n if ((timePast / 1000) >= 10){\r\n game.getGUIButtons().get(PathXConstants.GOD_MODE_BUTTON_TYPE).setState(PathXSpriteState.VISIBLE.toString());\r\n setSpecialState(\"\");\r\n setSpecialTimer(null);\r\n }\r\n \r\n }\r\n\r\n if (getSpecialState().equals(PathXSpriteState.STEALING.toString())) {\r\n ArrayList<Car> otherCars = new ArrayList();\r\n otherCars.addAll(data.getCops());\r\n otherCars.addAll(data.getBandits());\r\n otherCars.addAll(data.getZombies());\r\n\r\n for (Car car : otherCars) {\r\n if (aabbsOverlap(car)) {\r\n if (!car.isStolen()) {\r\n data.getRecord().balance += 20;\r\n car.setStolen(true);\r\n }\r\n }\r\n }\r\n }\r\n \r\n super.update(game);\r\n \r\n PathXDataModel dataModel = (PathXDataModel) game.getDataModel();\r\n PathXNode safeHouse = dataModel.getNodes().get(1);\r\n if (getIntersection() == safeHouse)\r\n dataModel.endGameAsWin();\r\n }", "public void button_time_ok(View view){\n int[] times = new int[4];\n times[0] = getTimeFromSpinner(R.id.spinner_termin1);\n times[1] = getTimeFromSpinner(R.id.spinner_termin2);\n times[2] = getTimeFromSpinner(R.id.spinner_termin3);\n times[3] = getTimeFromSpinner(R.id.spinner_termin4);\n // and update the user data\n _control.updateUserTimes(times);\n _control.saveUserData();\n // then change to main menu\n setContentView(R.layout.mainmenu);\n setButtonDisabled(R.id.goto_question_button, _control.wasLastQuestionAnswered());\n }", "public void clickEvent(int index){\n t.stop();\n Timer(15);\n if (cards.get(index).getTurned() == false) {\n if (wait == 1) {\n setTurned(c1, false);\n setTurned(c2, false);\n wait = 0;\n }\n setTurned(index, true);\n if (state == 2) {\n state = 1;\n c2 = index;\n if (cards.get(c1).getImgAnime().contains((cards.get(c2).getImgAnime()))) {\n if (activePlayer == 1) {\n if(cards.get(index).getNumber() == 1){\n p1Points += 3;\n }\n else {\n p1Points++;\n }\n points(activePlayer, p1Points);\n activePlayer = 1;\n changePlayer(activePlayer);\n } else {\n if(cards.get(index).getNumber() == 1){\n p2Points += 3;\n }\n else {\n p2Points++;\n }\n points(activePlayer, p2Points);\n activePlayer = 2;\n changePlayer(2);\n\n }\n checkFinished();\n } else {\n wait = 1;\n if (activePlayer == 1) {\n activePlayer = 2;\n changePlayer(activePlayer);\n } else {\n activePlayer = 1;\n changePlayer(activePlayer);\n }\n }\n } else {\n state = 2;\n c1 = index;\n }\n }\n }", "@Override\n public void update() {\n }", "boolean update();", "public void actionPerformed(ActionEvent evt) {\n\n timeElapsed = timeElapsed + 1;\n\n }", "@Override\r\n public void onUpdate() {\n super.onUpdate();\r\n }", "public void update() {\n\n if (!isSelected){\n goalManagement();\n }\n\n if (chair != null){ // si une chaise lui est désigné\n if (!hasAGoal && !isSelected){ // et qu'il n'a pas d'objectif\n setSit(true);\n position.setX(chair.getX());\n }\n\n if (isSit){\n chair.setChairState(Chair.ChairState.OCCUPIED);\n }else {\n chair.setChairState(Chair.ChairState.RESERVED);\n }\n }\n\n if (tired > 0 ){\n tired -= Constants.TIRED_LOSE;\n }\n\n if (isSit && comfort>0){\n comfort -= Constants.COMFORT_LOSE;\n }\n\n if (isSitOnSofa && comfort<100){\n comfort += Constants.COMFORT_WIN;\n }\n\n if (!hasAGoal && moveToCoffee && coffeeMachine!=null){\n moveToCoffee = false;\n tired=100;\n\n coffeeMachine.setCoffeeTimer(new GameTimer()) ;\n coffeeMachine.getCoffeeTimer().setTimeLimit(Constants.COFFEE_TIME_TO_AVAILABLE);\n coffeeMachine = null;\n backToSpawn();\n }\n\n if (!hasAGoal && moveToSofa){\n moveToSofa = false;\n isSitOnSofa = true;\n dir = 0 ;\n position.setY(position.getY()-Constants.TILE_SIZE);\n }\n\n if (isSelected){\n flashingColor ++;\n if (flashingColor > 2 * flashingSpeed){\n flashingColor = 0;\n }\n }\n\n }", "public void updateState() {\n\t\tfloat uptime = .05f;\t\t\t// Amount of Time the up animation is performed\n\t\tfloat downtime = .35f;\t\t\t// Amount of Time the down animation is performed\n\t\tColor colorUp = Color.YELLOW;\t// Color for when a value is increased\n\t\tColor colorDown = Color.RED;\t// Color for when a value is decreased\n\t\tColor color2 = Color.WHITE;\t\t// Color to return to (Default Color. Its White btw)\n\t\t\n\t\t// Check to see if the Time has changed and we are not initializing the label\n\t\tif(!time.getText().toString().equals(Integer.toString(screen.getState().getHour()) + \":00\") && !level.getText().toString().equals(\"\")) {\n\t\t\t// Set the time label and add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t\ttime.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(time.getText().toString().equals(\"\")) {\n\t\t\t// First time setting the label, dont add the animation\n\t\t\ttime.setText(Integer.toString(screen.getState().getHour()) + \":00\");\n\t\t}\n\t\t\n\t\t// Check to see if the Level has changed and we are not initializing the label\n\t\tif(!level.getText().toString().equals(screen.getState().getTitle()) && !level.getText().toString().equals(\"\")) {\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t\tlevel.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(level.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the level label\n\t\t\tlevel.setText(\"Level: \" + screen.getState().getTitle());\n\t\t}\n\t\t\n\t\t// Check to see if the XP has changed and we are not initializing the label\n\t\tif(!xp.getText().toString().equals(\"XP: \" + Integer.toString(screen.getState().getXp())) && !xp.getText().toString().equals(\"\")) {\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t\txp.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(xp.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the XP label\n\t\t\txp.setText(\"XP: \" + Integer.toString(screen.getState().getXp()));\n\t\t}\n\t\t\n\t\t// Check to see if the Money has changed and we are not initializing the label\n\t\tif(!money.getText().toString().equals(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\") && !money.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Check to see if the player's money went up. This is a mess but it works\n\t\t\t// Makes the change animation Yellow or Green depending on the change in money\n\t\t\tif(Double.parseDouble(money.getText().substring(1).toString()) <= screen.getState().getMoney())\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tmoney.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the label to the new money\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t\t\n\t\t} else if(money.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the Money Label\n\t\t\tmoney.setText(\"$\" + Double.toString(screen.getState().getMoney()) + \"0\");\n\t\t}\n\t\t\n\t\t// Check to see if the Energy has changed and we are not initializing the label\n\t\tif(!energy.getText().toString().equals(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\") && !energy.getText().toString().equals(\"\")) {\n\t\t\t\n\t\t\t// Changes the animation to Yellow or Red depending on the change in the energy value\n\t\t\tif(Integer.parseInt(energy.getText().substring(3).split(\"/\")[0].toString()) < screen.getState().getEnergy())\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\telse\n\t\t\t\tenergy.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorDown)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t\t\n\t\t\t// Set the energy label\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t} else if(energy.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the energy label if it isnt set\n\t\t\tenergy.setText(\"E: \" + Integer.toString(screen.getState().getEnergy()) + \"/100\");\n\t\t}\n\t\t\n\t\t// Get the current date.\n\t\tint[] curDate = screen.getState().getDate();\n\t\t\t\n\t\t// Check to see if the Date has changed and we are not initializing the label\n\t\tif(!date.getText().toString().equals(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]) && !date.getText().toString().equals(\"\")) {\n\t\t\t// Set the date label and add the change animation\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t\tdate.addAction(sequence(parallel(moveBy(0, 4f, uptime), color(colorUp)), parallel(moveBy(0, -4f, .5f), color(color2, downtime))));\n\t\t} else if(date.getText().toString().equals(\"\")) {\n\t\t\t// Initialize the date label\n\t\t\tdate.setText(\"\" + curDate[2] + \"/\" + curDate[1] + \"/\" + curDate[0]);\n\t\t}\n\t\t\n\t\t// Set the log text\n\t\tlogLabel.setText(screen.getState().getLog());\n\t\t\n\t\t// Update the stats\n\t\tState state = screen.getState();\n\t\tstatsLabel.setText(\"XP: \" + state.getXp() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Level: \" + state.getLevel() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Title: \" + state.getTitle() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Popularity: \" + state.getPopularity() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Year \" + state.getDate()[0] + \" Month \" + state.getDate()[1] + \" Day \" + state.getDate()[2] + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Hour: \" + state.getHour() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Energy: \" + state.getEnergy() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Current Funds: \" + state.getMoney() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Earned: \" + state.getEarned_money() + \"\\n\" + \"\\n\" +\n\t\t \t\t\"Money Spent: \" + state.getSpent_money());\n\t}", "protected void onUpdate() {\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n orderField = \"orderTime\";\n btn_single_time.setTextColor(getResources().getColor(R.color.colorff6c02));\n btn_array_time.setTextColor(getResources().getColor(R.color.color000000));\n submitInitOrRefreshOrSearch();\n }", "@Override\n\tpublic void update() {\n\t}" ]
[ "0.70009935", "0.6919732", "0.6707651", "0.6522215", "0.6420087", "0.6392586", "0.6381929", "0.6350702", "0.6347508", "0.6325536", "0.6325233", "0.6319864", "0.63062394", "0.6304069", "0.62900525", "0.6288583", "0.62694556", "0.626822", "0.6260395", "0.6241861", "0.62403595", "0.6237587", "0.62333494", "0.6223333", "0.6218188", "0.6207938", "0.6202288", "0.620135", "0.6188534", "0.61851037", "0.6152527", "0.6151368", "0.6144348", "0.6136002", "0.6136002", "0.61275965", "0.6126279", "0.61228776", "0.6114986", "0.6114986", "0.6114986", "0.6114986", "0.6114986", "0.61015964", "0.6099409", "0.6079916", "0.6079916", "0.60775876", "0.6065513", "0.60597366", "0.6059481", "0.6059481", "0.6047158", "0.6038426", "0.60345876", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60282296", "0.60201395", "0.6016066", "0.6016066", "0.6016066", "0.6016066", "0.6016066", "0.6016066", "0.6016066", "0.6014803", "0.601206", "0.601206", "0.601206", "0.601206", "0.6011225", "0.60094744", "0.60094744", "0.59997475", "0.5984082", "0.5981974", "0.59741044", "0.59726757", "0.59714097", "0.59557813", "0.5948089", "0.5939789", "0.59377736", "0.593613", "0.593186", "0.59311855", "0.59311044", "0.5930051", "0.5923778", "0.5922745", "0.5922315", "0.59205294", "0.59168655" ]
0.0
-1
Created by mikalai on 12.11.2016.
public interface def2 { default void go(){ System.out.println("def2"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\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\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void poetries() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\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}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n }", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "@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 public void memoria() {\n \n }", "@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\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 public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\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 public void init() {}", "@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}", "@Override\r\n\tpublic void init() {}", "public void gored() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void strin() {\n\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "private void init() {\n\n\n\n }", "@Override\n public void initialize() { \n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}" ]
[ "0.59908074", "0.5857464", "0.5756835", "0.57346874", "0.5712564", "0.5712564", "0.56786996", "0.5670774", "0.5640327", "0.5599274", "0.5572335", "0.55669653", "0.55524063", "0.5537711", "0.55250007", "0.552369", "0.5517314", "0.5514908", "0.5513823", "0.55072355", "0.5495526", "0.54919666", "0.54643977", "0.5460636", "0.5460636", "0.5460636", "0.5460636", "0.5460636", "0.5451601", "0.54510504", "0.5450463", "0.5449024", "0.5442492", "0.54344517", "0.5434114", "0.5430047", "0.5430047", "0.5430047", "0.5430047", "0.5430047", "0.5430047", "0.542957", "0.54229456", "0.54170215", "0.53964025", "0.53964025", "0.5392929", "0.53863835", "0.53863835", "0.53863835", "0.5383761", "0.5383761", "0.5377519", "0.5377519", "0.5377519", "0.53649837", "0.53649837", "0.5358978", "0.5349652", "0.53496116", "0.53406405", "0.5339135", "0.5339135", "0.5339135", "0.5339135", "0.5339135", "0.5339135", "0.5339135", "0.5335821", "0.532812", "0.532812", "0.532812", "0.5322239", "0.5310922", "0.53038836", "0.5302041", "0.52942336", "0.5280974", "0.52800983", "0.52784", "0.5275373", "0.5270192", "0.5257753", "0.5246581", "0.52430993", "0.5241485", "0.5238828", "0.52377796", "0.5237661", "0.5233306", "0.52205837", "0.52185506", "0.5205049", "0.5204981", "0.5202255", "0.5196849", "0.5194151", "0.5191449", "0.51904804", "0.51898086", "0.5187986" ]
0.0
-1
when creating a new stack
@Test public void isEmpty() { SimpleStack stack = new DefaultSimpleStack(); // then the stack is empty assertTrue(stack.isEmpty()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "MyStack(){\r\n\t\tsuper();\r\n\t}", "public MyStack() {\n\n }", "public MyStack() {\n\n }", "final boolean init_stacks()\r\n{\r\n stateptr = -1;\r\n val_init();\r\n return true;\r\n}", "public Stack() {}", "final boolean init_stacks()\n {\n stateptr = -1;\n val_init();\n return true;\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "final boolean init_stacks()\n{\n stateptr = -1;\n val_init();\n return true;\n}", "final boolean init_stacks()\n{\n stateptr = -1;\n val_init();\n return true;\n}", "final boolean init_stacks()\n{\n stateptr = -1;\n val_init();\n return true;\n}", "public MinStack1() {\r\n stack = new Stack<>();\r\n }", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\n\t}", "public MinStack() {\r\n\t\t}", "public MyStack() {\r\n stack = new LinkedList<>();\r\n }", "public MinStack() {\n st = new Stack<>();\n }", "public StackImpl() {\r\n\t\t\r\n\t}", "public Stacked(){\n count = 0;\n stackArray = (E[]) new Object[START_CAP];\n }", "public OpStack() {\n opStack = new Stack();\n }", "public void setStack(String stack);", "public MinStack() {\r\n stk = new Stack<>();\r\n stk1 = new Stack<>();\r\n }", "LevelStacks() {\n stacks = new ArrayList<>();\n }", "public MinStack() {\n\n }", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "public DSAStack()\n {\n stack = new DSALinkedList<E>();\n }", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "public Stack() {\n\t\t \n\t\ttop = null;\n\t}", "public String getStack();", "public Stack() {\n stack = new LinkedList();\n }", "public Stack() {\r\n\t\tthis.items = new ArrayList<>();\t\r\n\t}", "public MinStack() {\n\n }", "public MinStack() {\n\n }", "public MinStack() {\n }", "@Test\n public void pushOnStackTest_Correct(){\n assertEquals(stack.getTop().getData() , stack.getStack().returnFirst());\n }", "public MinStack() {\r\n list = new LinkedList();\r\n }", "public MinStack() {\n size = 0;\n }", "public CustomStack() {\n this.myCustomStack = new Object[10]; //array starts with 10 spaces, all empty\n numElements = 0; //stack starts with zero elements\n\n }", "public MyStack() {\n objects = new LinkedList<>();\n helper = new LinkedList<>();\n }", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public StackClass() {\n \tsize=0;\n\t}", "public MyDynamicStack() {\r\n items = new LinkedList<>();\r\n }", "public Solution_155() {\n stack = new Stack();\n minStack = new Stack();\n }", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}", "public Stack(Stack stk){\n this(stk.getStack());\n }", "public Stack()\n {\n first = null;\n }", "public GetMinStack() {\n stackData = new Stack<>();\n stackMin = new Stack<>();\n }", "public Stack() {\n stack = new Object[1];\n minStackSize = 1;\n top = -1;\n }", "public MyStack(){\n\ta = new String[10];\n\ttop = -1;\n }", "public MyStack() {\n queue = new LinkedList<>();\n }", "public MinStack2() {\n\n }", "public MinStack1() {\n\n }", "public MyStack() {\n this.queue=new LinkedList<Integer>();\n }", "public MyStack() {\n queue = new ArrayDeque<>();\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "public Stack() {\r\n first = null;\r\n N = 0;\r\n }", "Stack(int sizeYouWantYourDataStuctureToBe){\n stackArray = new int [sizeYouWantYourDataStuctureToBe];\n }", "public MyQueue1() {\n storeStack = new Stack<>();\n }", "public Lc232() {\r\n this.stack = new Stack<>();\r\n }", "public int getStackSize() {\n\t\treturn stackSize;\n\t}", "@Test\n\tpublic void testGetStack() {\n\t\tip = new ImagePlus();\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\n\t\t// if stack == null and not proc == null and no info string\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\t\tassertNull(st.getSliceLabel(1));\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\n\t\t// if stack == null and not proc == null and yes info string\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tip.setProperty(\"Info\",\"SnapDragon\");\n\t\tst = ip.getStack();\n\t\tassertEquals(1,ip.getStackSize());\n\t\tassertEquals(\"CareBearStation\\nSnapDragon\",st.getSliceLabel(1));\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\n\t\t// if not stack == null\n\t\t// do stuff and setRoi() if needed\n\t\tproc = new ByteProcessor(1,1,new byte[] {22}, null);\n\t\tip = new ImagePlus(\"CareBearStation\",proc);\n\t\tst = new ImageStack(1,1);\n\t\tst.addSlice(\"Fixed\", proc);\n\t\tst.addSlice(\"Crooked\", proc);\n\t\tip.setStack(\"Odds\",st);\n\t\tst = ip.getStack();\n\t\tassertEquals(2,ip.getStackSize());\n\t\tassertEquals(proc.getColorModel(),st.getColorModel());\n\t\tassertEquals(proc.getRoi(),st.getRoi());\n\t}", "void push(RtfCompoundObject state) {\r\n _top = new RtfCompoundObjectStackCell(_top, state);\r\n }", "public SolutionStack()\n {\n stack = new ArrayList<ILocation>(0);\n top = 0;\n }", "void setStack(JainTcapStack stack);", "private static Map pushOnStack(SessionState state)\n\t{\n\t\tMap current_stack_frame = null;\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\tif(operations_stack.size() < MAXIMUM_SUSPENDED_OPERATIONS_STACK_DEPTH)\n\t\t{\n\t\t\tcurrent_stack_frame = (Map) operations_stack.push(new Hashtable());\n\t\t}\n\t\tObject helper_mode = state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\tif(helper_mode != null)\n\t\t{\n\t\t\tcurrent_stack_frame.put(STATE_RESOURCES_HELPER_MODE, helper_mode);\n\t\t}\n\t\treturn current_stack_frame;\n\n\t}", "public MinStack() {\n data = new Stack();\n min = new Stack();\n }", "public Stack() { \ntop = null; \n//A constructor to initialize top \n//The answer to (iii)\n}", "public MyStack() {\n queue = new LinkedList<>();\n }", "public static final SubLObject setup_stacks_file() {\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_stack$.getGlobalValue(), Symbols.symbol_function($sym7$STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym8$STACK_STRUC_NUM, $sym9$_CSETF_STACK_STRUC_NUM);\n Structures.def_csetf($sym10$STACK_STRUC_ELEMENTS, $sym11$_CSETF_STACK_STRUC_ELEMENTS);\n Equality.identity($sym0$STACK);\n access_macros.register_macro_helper($sym24$DO_STACK_ELEMENTS_STACK_ELEMENTS, $sym25$DO_STACK_ELEMENTS);\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_locked_stack$.getGlobalValue(), Symbols.symbol_function($sym36$LOCKED_STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym37$LOCKED_STACK_STRUC_LOCK, $sym38$_CSETF_LOCKED_STACK_STRUC_LOCK);\n Structures.def_csetf($sym39$LOCKED_STACK_STRUC_STACK, $sym40$_CSETF_LOCKED_STACK_STRUC_STACK);\n Equality.identity($sym29$LOCKED_STACK);\n return NIL;\n }", "public MinStack2() {\r\n\t\t\tdata = new Stack<>();\r\n\t\t\thelper = new Stack<>();\r\n\t\t}", "public _30_min_stack() {\n data = new Stack<>();\n help = new Stack<>();\n }", "protected ItemStack createStackedBlock(int par1) {\n\t\treturn new ItemStack(this.blockID, 1, par1);\n\t}", "public NotationStack() {\r\n\t\tstack = new ArrayList<T>(1000);\r\n\t\tsize = 1000;\r\n\t}", "public MinStack() {\n dataStack=new Stack<>();\n minStack=new Stack<>();\n }", "public void toStackMode() {\n\t\t// TODO Write me!\n\n\t}", "@Test\n public void pushOnStackTest_InCorrect(){\n assertNotEquals(10 , stack.getStack().returnFirst());\n }", "public CarStackImpl() {\n carStack = new int[MAX_SIZE];\n top = -1;\n }", "public MinStack2() {\n stack1 = new Stack<>();\n stack2 = new Stack<>();\n }", "public MyStack() {\n root=new ListNode(0);\n p =root;\n }", "public MyStack() {\n\t q=new LinkedList<Integer>();\n\t }", "public StackInterface Stack() { return mStack; }", "public MyStack() {\n @SuppressWarnings(\"unchecked\")\n T[] newStack = (T[]) new Object[DEFAULT_STACK_SIZE];\n stackArray = newStack;\n stackSize = 0;\n }", "public MinStack2() {\n stack = new Stack<>();\n minStack = new Stack<>();\n }", "private void push( Card card ) {\r\n undoStack.add( card );\r\n }", "public MinStack() {\n stack = new Stack<IntMinPair>();\n }", "public Stack()\n\t{\n\t\tlist = new LinkedList<T>();\n\t}", "public StackMachineService(CustomStack customStack) {\n this.customStack = customStack;\n }", "public void start() {\n\t\tstack = new Stack<>();\t\t\n\t}", "public MinStack() {\r\n stack=new Stack<>();\r\n minstack=new Stack<>();\r\n map=new HashMap<>();\r\n }", "public MyStack2() {\n queue = new LinkedList<Integer>();\n }", "@Test\n public void testStackCodeExamples() {\n logger.info(\"Beginning testStackCodeExamples()...\");\n\n // Allocate an empty stack\n Stack<String> stack = new Stack<>();\n logger.info(\"Start with an empty stack: {}\", stack);\n\n // Push a rock onto it\n String rock = \"rock\";\n stack.pushElement(rock);\n assert stack.getTop().equals(rock);\n logger.info(\"Push a rock on it: {}\", stack);\n\n // Push paper onto it\n String paper = \"paper\";\n stack.pushElement(paper);\n assert stack.getTop().equals(paper);\n logger.info(\"Push paper on it: {}\", stack);\n\n // Push scissors onto it\n String scissors = \"scissors\";\n stack.pushElement(scissors);\n assert stack.getTop().equals(scissors);\n assert stack.getSize() == 3;\n logger.info(\"Push scissors on it: {}\", stack);\n\n // Pop off the scissors\n assert stack.popElement().equals(scissors);\n assert stack.getSize() == 2;\n logger.info(\"Pop scissors from it: {}\", stack);\n\n // Pop off the paper\n assert stack.popElement().equals(paper);\n assert stack.getSize() == 1;\n logger.info(\"Pop paper from it: {}\", stack);\n\n // Pop off the rock\n assert stack.popElement().equals(rock);\n assert stack.isEmpty();\n logger.info(\"Pop rock from it: {}\", stack);\n\n logger.info(\"Completed testStackCodeExamples().\\n\");\n }", "public LC155_MinStack2() {\n\t\tdata = new Stack<Long>();\n\t}", "public Stack getStack() {\r\n\t\treturn stack;\r\n\t}", "protected abstract StackManipulation preparation();", "public void setStack(int slot, Stack stack);", "public StackRestaurant()\n\t{\n\t\ttickets = new Stack<Ticket>();\n\t}", "public void setStack(int id){\n\t\tStackID = id;\n\t}", "public MinStack()\n\t{\n\t\tindex = -1;\n\t\tsize = 50;\n\t\tdata = new int[size];\n\t}", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }" ]
[ "0.71567136", "0.68895674", "0.68635714", "0.68168455", "0.67803025", "0.67119044", "0.6711034", "0.6666854", "0.6653689", "0.66431975", "0.66431975", "0.66431975", "0.6630327", "0.66201377", "0.6603903", "0.65696377", "0.65418637", "0.6538258", "0.64960605", "0.64587194", "0.64089394", "0.6370292", "0.6353477", "0.6352514", "0.63258743", "0.6318487", "0.6311301", "0.6290898", "0.6290012", "0.6282435", "0.6274326", "0.62705123", "0.6256883", "0.6256883", "0.62446296", "0.6244241", "0.6238991", "0.62213254", "0.6220654", "0.6220225", "0.6217686", "0.6215553", "0.62151253", "0.62137866", "0.6201598", "0.6200023", "0.6198547", "0.6196305", "0.6194654", "0.6192598", "0.6191142", "0.6160152", "0.6142046", "0.6131601", "0.6128275", "0.6111936", "0.61088806", "0.6108104", "0.61052966", "0.6103568", "0.6097472", "0.6095446", "0.60907644", "0.60832787", "0.60782176", "0.6074286", "0.60650736", "0.60624343", "0.6056509", "0.6051229", "0.60305834", "0.601889", "0.6016238", "0.60137445", "0.60122687", "0.601079", "0.6010214", "0.6007092", "0.6006569", "0.5996393", "0.599593", "0.5993286", "0.5992422", "0.5982745", "0.5979988", "0.59725684", "0.5952389", "0.59468234", "0.5944007", "0.5943556", "0.5942826", "0.59322053", "0.59289795", "0.5928907", "0.5928358", "0.592446", "0.59239113", "0.5922873", "0.5921565", "0.5920224", "0.59180224" ]
0.0
-1
Given an empty stack and an item
@Test public void push() { SimpleStack stack = new DefaultSimpleStack(); Item item = new Item(); // When the item is pushed in the stack stack.push(item); // Then… assertFalse("The stack must be not empty", stack.isEmpty()); assertEquals("The stack constains 1 item", 1, stack.getSize()); assertSame("The pushed item is on top of the stack", item, stack.peek()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(Item item){\n this.stack.add(item);\n\n }", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "public void push (E item){\n this.stack.add(item);\n }", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "public void push(int item) {\n\t\t// TODO Auto-generated method stub\n\t\tif(position >= stack.length-1){\n\t\t\tSystem.out.println(\"Stack is full!\");\n\t\t}else{\n\t\t\tstack[position] = item;\n\t\t\tposition++;\n\t\t}\n\t}", "public void push(char item) {\n StackNode stackNode = new StackNode(item);\n\n if (top == null) { //if list is empty\n top = stackNode;\n }\n else { //list is not empty\n stackNode.next = top;\n top = stackNode;\n }\n }", "@Test\n public void pop() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n Item item1 = new Item();\n stack.push(item);\n stack.push(item1);\n\n // When we pop the stack\n Item topItem = stack.pop();\n\n // Then…\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The first item is on top of the stack\", item, stack.peek());\n assertSame(item1, topItem);\n }", "public void push(Item item)\n {\n top = new Node<Item>(item, top);\n N++;\n }", "private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\n\t\t\t\t!itemStack.stackEmpty()){\r\n\t\t\t\theldStack.incrementStack();\r\n\t\t\t\titemStack.decrementStack(tileItems);\r\n\t\t\t\tif(itemStack.stackEmpty())\t//will this cause an error since the item is removed by the inventory?\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddItemStack(itemStack);\r\n\t\t}\r\n\t\telse\r\n\t\t\taddFullStack(itemStack);\r\n\t}", "@Override\n public E push(E item) {\n // do not allow nulls\n if (item == null) {\n return null;\n }\n\n // do not allow same item twice in a row\n if (size() > 0 && item.equals(peek())) {\n return null;\n }\n\n // okay to add item to stack\n super.push(item);\n\n // remove oldest item if stack is now larger than max size\n if (size() > maxSize) {\n remove(0);\n }\n contentsChanged();\n return item;\n }", "StackType getFirstItem();", "public E push(E item) {\n try {\n stackImpl.push(item);\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Array is full. Switching to unbound implementation\");\n StackImplementationIF<E> stackImplTemp = new ListStack<E>();\n for (Enumeration en = new ImplIterator<E>(this); en.hasMoreElements();) {\n E c = (E) en.nextElement();\n stackImplTemp.push(c);\n }\n stackImpl = stackImplTemp;\n stackImpl.push(item);\n }\n return item;\n }", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "@SubL(source = \"cycl/stacks.lisp\", position = 2117) \n public static final SubLObject stack_empty_p(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n return Types.sublisp_null(stack_struc_elements(stack));\n }", "void push(T item);", "void push(T item);", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "public Item pop() throws EmptyStackException{\n return (Item) stack.pop();\n\n }", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "void onStackEmpty();", "@Override\n\tpublic void push(Item item) \n\t{\n\t\ttopMostNode = new Node(item, topMostNode); // Creates the top MostNode\n\t\tN++;\n\t}", "@Override\r\n\tpublic void push(int item) {\n\t\tif(tos == stack.length-1)\r\n\t\t\tSystem.out.println(\"스택이 꽉참\");\r\n\t\telse\r\n\t\t\tstack[++tos] = item;//화살표 즉시 +1 한후 들어온 값 대입\r\n\t}", "public void push(int item) {\n if(isEmpty())\n top = new Node(item);\n else\n {\n Node newNode = new Node(item, top);\n top = newNode;\n }\n sz++;\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "public void push(E item);", "public void push(T item){\n Node<T> n;\n if(this.isEmpty()){\n n = new Node<>();\n n.setData(item);\n } else {\n n = new Node<>(item, this._top);\n }\n\n this._top = n;\n }", "public Stack() {\r\n\t\tthis.items = new ArrayList<>();\t\r\n\t}", "@Test\n public void testNonemptyStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n ps.push(2);\n ps.push(3);\n\n Assert.assertEquals(\"[1, 2, 3]\", ps.toString());\n }", "void push(Object item);", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "@Test\n public void isEmpty() {\n SimpleStack stack = new DefaultSimpleStack();\n\n // then the stack is empty\n assertTrue(stack.isEmpty());\n }", "public interface Stack<T> extends Iterable<T> {\n\n // -----------------------\n // Base Function\n // -----------------------\n\n /**\n * push object to stack\n * @param item object, the item could be null\n */\n void push(T item);\n\n T pop();\n\n int size();\n\n boolean isEmpty();\n\n /**\n * get the last element, but not pop it\n * @return the top element\n */\n T peek();\n\n // ---------------------\n // Extend Function\n // ---------------------\n default boolean isNotEmpty() {\n return !isEmpty();\n }\n\n}", "public Item peek() throws EmptyStackException{\n return (Item) stack.peek();\n\n }", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "public void pop() throws StackUnderflowException {\r\n if(!isEmpty()) items.remove(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n }", "E pop() throws EmptyStackException;", "public void push(T item);", "@Test\r\npublic void testTop()\r\n{\n\tassertEquals(null,myStack.top());\r\n\r\n\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\tassertEquals(27,myStack.top().getId());\r\n\tassertEquals(27,myStack.pop().getId());\r\n\tassertEquals(4,myStack.top().getId());\r\n\tassertEquals(4,myStack.pop().getId());\r\n\tassertEquals(2,myStack.pop().getId());\r\n\t\r\n\t// Stack leer\r\n\tassertEquals(null,myStack.top());\r\n\r\n}", "@Test\n public void pushOnStackTest_InCorrect(){\n assertNotEquals(10 , stack.getStack().returnFirst());\n }", "public static ItemStack consumeItem(ItemStack stack)\n\t{\n\t\treturn consumeItem(stack, 1);\n\t}", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "@Override\n\tpublic void push(T item) {\n\t\tNode<T> currentNode = new Node<T>(item);\n\t\tif(top == null) {\n\t\t\ttop = currentNode;\n\t\t}\n\t\telse {\n\t\t\tcurrentNode.setLink(top);\n\t\t\ttop = currentNode;\n\t\t}\n\t}", "@Test\n public void testPopEmptyStack(){\n ms = new MyStack();\n try {\n ms.pop();\n }catch(EmptyStackException e){\n System.out.println(\"Error, cannot pop an empty stack.\");\n }\n }", "public void enqueue(Item item) \n {\n stack1.push(item);\n }", "public boolean isEmpty() {return stackList.isEmpty();}", "public void push(Item item) {\n Node temp = first;\n first = new Node();\n first.item = item;\n first.next = temp;\n n++;\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "public interface IStack {\n\n /**\n * Adds the given item to the top of the stack.\n */\n void push(Object item);\n\n /**\n * Removes the top item from the stack and returns it.\n * @exception java.util.NoSuchElementException if the stack is empty.\n */\n Object pop();\n \n /**\n * Sees what is at the top of the stack.\n */\n Object peekABoo();\n \n /**\n * Returns whether the stack is empty or not.\n */\n boolean isEmpty();\n}", "@Override\n\tpublic void push(int item) {\n\n\t}", "@Test\n public void basicQueueOfStacksTest() {\n \n QueueOfStacks<String> tempQueue = new QueueOfStacks<String>();\n String tempCurrentElement;\n \n assertTrue(\"Element not in queue\", tempQueue.isEmpty());\n tempQueue.add(\"a\");\n assertTrue(\"Element not in queue\", !tempQueue.isEmpty());\n tempQueue.add(\"b\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.peek();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\"));\n\n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\") &&\n tempQueue.size() == 1);\n \n tempQueue.add(\"c\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"b\") &&\n tempQueue.size() == 1 &&\n !tempQueue.isEmpty());\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"c\") &&\n tempQueue.size() == 0 &&\n tempQueue.isEmpty());\n \n }", "public void push(int item) {\r\n\t\t\tif (this.top == null) {\r\n\t\t\t\tthis.top = new Node();\r\n\t\t\t\tthis.top.data = item;\r\n\t\t\t\tthis.size++;\r\n\t\t\t\tthis.middle = top;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tNode node = new Node();\r\n\t\t\tnode.data = item;\r\n\t\t\ttop.next = node;\r\n\t\t\tnode.prev = this.top;\r\n\t\t\ttop = top.next;\r\n\t\t\t++this.size;\r\n\r\n\t\t\tif (this.size % 2 == 1) {\r\n\t\t\t\tthis.middle = this.middle.next;\r\n\t\t\t}\r\n\r\n\t\t}", "public void push(E item) {\n addFirst(item);\n }", "public void push(E object) {stackList.insertAtFront(object);}", "public Object pop( )\n {\n Object item = null;\n\n try\n {\n if ( this.top == null)\n {\n throw new Exception( );\n }\n\n item = this.top.data;\n this.top = this.top.next;\n \n this.count--;\n }\n catch (Exception e)\n {\n System.out.println( \" Exception: attempt to pop an empty stack\" );\n }\n\n return item;\n }", "@Test(expected = EmptyStackException.class)\n public void testPopOnEmptyStack() throws EmptyStackException {\n SimpleStack stack = new DefaultSimpleStack();\n\n // When we « pop » the stack\n stack.pop(); // should throws an EmptyStackException.\n }", "public MyDynamicStack() {\r\n items = new LinkedList<>();\r\n }", "@Test\r\n public void testStackstack() {\r\n StackArrayList<Integer> stack = new StackArrayList<Integer>();\r\n\r\n stack.push(1);\r\n stack.push(2);\r\n stack.push(3);\r\n stack.push(4);\r\n stack.push(5);\r\n\r\n assertEquals(5, stack.peek());\r\n assertEquals(5, stack.pop());\r\n assertEquals(4, stack.size());\r\n }", "@Override\r\n\tpublic boolean push(T e) {\r\n\t\tif(!isFull()) {\r\n\t\t\tstack[topIndex + 1] = e;\r\n\t\t\ttopIndex++;\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Given(\"^a stack with (\\\\d+) items$\")\n\tpublic void a_stack_with_items(int arg1) throws Throwable {\n\t throw new PendingException();\n\t}", "@Test\n public void testPushPop(){\n ms=new MyStack();\n ms.push(2);\n ms.pop();\n assertTrue(ms.IsEmpty());\n }", "@Test\n public void pushOnStackTest_Correct(){\n assertEquals(stack.getTop().getData() , stack.getStack().returnFirst());\n }", "public void pop() {\n if (top==-1) {\n System.out.println(\"Stack is empty\");\n return;\n\n\n } else {\n System.out.println(\"item popde is:-\"+ stack[top]);\n top--;\n }\n }", "public void push(ILocation item)\n {\n stack.add(top, item);\n top++;\n }", "public static ItemStack consumeStack (ItemStack stack) {\n \n if (stack.getCount() == 1) {\n \n if (stack.getItem().hasContainerItem(stack))\n return stack.getItem().getContainerItem(stack);\n \n else\n return null;\n }\n \n else {\n \n stack.splitStack(1);\n return stack;\n }\n }", "public void push(Item item) {\r\n Node oldfirst = first;\r\n first = new Node();\r\n first.item = item;\r\n first.next = oldfirst;\r\n N++;\r\n }", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "public void testClear() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.clear();\n assertEquals(this.stack.size(), 0, 0.01);\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n }", "public E top() throws StackUnderflowException {\r\n E item = null;\r\n if(!isEmpty()) item = items.get(0);\r\n else throw new StackUnderflowException(\"Stack Empty\");\r\n \r\n return item;\r\n }", "public void push(T item){\n if (head == null) {\n head = new Node<T>(item, null);\n } else {\n Node<T> tempNode = head;\n Node<T> newHead = new Node<T>(item, tempNode);\n head = newHead;\n }\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "@Test\n public void testMassiveStackOfNothing() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 10000;\n int expectedSize = 0;\n \n String tempString = null;\n String expected = null;\n \n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = 0; i < sizeTest; i++) {\n instance.push(tempString);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, expectedSize);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "default ItemStack addStack(ItemStack stack) {\n for (IInventoryAdapter inv : this) {\n InventoryManipulator im = InventoryManipulator.get(inv);\n stack = im.addStack(stack);\n if (InvTools.isEmpty(stack))\n return InvTools.emptyStack();\n }\n return stack;\n }", "public void testPop() {\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.pop();\n assertEquals(this.stack.size(), 9, 0.01);\n assertEquals(this.stack.peek(), 8, 0.01);\n }", "@Override\r\n\tpublic T pop() throws StackEmptyException {\n\t\tif(isempty()) { throw new StackEmptyException(\"Pila vacia!!\");}\r\n\t\treturn pop(sentinel);\r\n\t\t\r\n\t}", "void push(T item) {\n contents.addAtHead(item);\n }", "public void pushLeft(Item item){\n if (isEmpty()){\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n last = first;\n n++;\n }else{\n Node<Item> oldFirst = first;\n first = new Node<>();\n first.item = item;\n first.next = oldFirst;\n n++;\n }\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "@Test\r\n\tpublic void testPop()\r\n\t{\n\t\tassertEquals(null,myStack.pop());\r\n\t\r\n\t\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\t\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\t\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\t\tassertEquals(27,myStack.top().getId());\r\n\t\tassertEquals(\"Chur\",myStack.pop().getName());\r\n\t\tassertEquals(4,myStack.pop().getId());\r\n\t\tassertEquals(2,myStack.pop().getId());\r\n\t\t\r\n\t\t// leerer Stack\r\n\t\tassertEquals(null,myStack.pop());\r\n\t\tassertEquals(null,myStack.top());\r\n\t}", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "@Test\n public void testIsEmpty(){\n ms = new MyStack();\n assertTrue(ms.IsEmpty());\n }", "@Test\n public void testIsEmpty() {\n System.out.println(\"isEmpty\");\n instance = new Stack();\n assertTrue(instance.isEmpty());\n instance.push(\"ab\");\n instance.push(\"cd\");\n assertFalse(instance.isEmpty());\n instance.pop();\n instance.pop();\n assertTrue(instance.isEmpty());\n }", "public void push(Item item){\n\t\tNode oldfirst=first;\r\n\t\tfirst=new Node();\r\n\t\tfirst.item=item;\r\n\t\tfirst.next=oldfirst;\r\n\t\tN++;\r\n\t}", "@Test(expected = EmptyStackException.class)\n public void testPeekOnEmptyStack() throws EmptyStackException {\n SimpleStack stack = new DefaultSimpleStack();\n\n // When we « pop » the stack\n stack.peek(); // should throws an EmptyStackException.\n }", "@Test\n public void testEmptyStack() {\n ProgramStack ps = new ProgramStack();\n\n Assert.assertEquals(\"[]\", ps.toString());\n }", "public void push(String item) throws StringStackException {\n\n try {\n if(item != null) {\n StringNode head = top;\n top = new StringNode(item);\n top.next = head;\n } else {\n throw new StringStackException(\"Method 'push': Parameter item is null\");\n }\n } catch(StringStackException ex) {\n throw ex;\n }\n }", "public Item pop(){\n\t\tif(isEmpty()){\r\n\t\t\tSystem.out.println(\"Stack is empty\");\r\n\t\t}\r\n\t\t\r\n\t\tItem item=first.item;\r\n\t\tfirst=first.next;\r\n\t\tN--;\r\n\t\treturn item;\r\n\t\r\n\r\n\t}", "@Test\r\n public void testPopShouldReturnObjectWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(49);\r\n stackInstance.push(57);\r\n stackInstance.push(2);\r\n Integer actualOutput=stackInstance.pop();\r\n Integer expectedOutput=2;\r\n assertEquals(expectedOutput,actualOutput);\r\n }", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "public interface Stack<E> {\r\n \r\n /** \r\n * Pre: Se ingresa el dato\r\n * @param data se ingresa un dato para agregar al Vector\r\n * Post: Se guarda el dato en Stack\r\n */\r\n public void push(E data);\r\n\r\n /** \r\n * Pre: Estan todos los datos en el Stack\r\n * @return E se regresa un item.\r\n * Post: Se regresa y elimina un dato del Stack\r\n */\r\n public E pop();\r\n\r\n /** \r\n * Pre: Se encuentra el Stack con sus datos\r\n * @return E se regresa cualquier tipo de dato\r\n * @throws EmptyStackException regresa un error\r\n * Post: Se regresa el dato sobre la lista\r\n */\r\n public E peek();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack\r\n * @return boolean se regresa un valor True o False\r\n * Post: Si el Stack se encuentra vacio este regresa True\r\n */\r\n public boolean empty();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack \r\n * @return int se regrea cualquier numero\r\n * Post: Se devuelve el numero de objetos que tiene el Stack\r\n */\r\n public int size();\r\n\r\n}", "@Test\n\tpublic void testUndoActionEmpty() {\n\t\tCell topStackCell = undoRedo_TestStack.undoAction(testGrid);\n\n\t\t// Verify that the undo stack is empty\n\t\tassertEquals(-1, topStackCell.getRow());\n\t\tassertEquals(\"-1\", topStackCell.getCol());\n\n\t}", "@Test /*Test 19 - implemented push() method to NumStack class.*/\n public void testPush() {\n numStackTest.push(5);\n assertFalse(\"NumStack object shouldn't be empty after pushing first entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(10);\n assertFalse(\"NumStack object shouldn't be empty after pushing second entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(15);\n assertFalse(\"NumStack object shouldn't be empty after pushing third entry onto it\", \n numStackTest.isEmpty());\n }", "public void pop() {\n if(!empty()){\n \tstack.pop();\n }\n }", "void push(int item) {\r\n\t\tif (tos == 9)\r\n\t\t\tSystem.out.println(\"Stos jest pełny\");\r\n\t\telse\r\n\t\t\tstck[++tos] = item;\r\n\t}", "@Test\r\n public void testIsEmptyShouldReturnFalseWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(90);\r\n stackInstance.push(5);\r\n boolean actualOutput=stackInstance.isEmpty();\r\n assertEquals(false,actualOutput);\r\n }" ]
[ "0.6832829", "0.68030715", "0.67341524", "0.6700746", "0.6696106", "0.66815394", "0.6648342", "0.65780085", "0.6545572", "0.6508638", "0.6478286", "0.64511573", "0.6414773", "0.6412284", "0.6378463", "0.6350666", "0.63239056", "0.63239056", "0.6323761", "0.6318002", "0.6307744", "0.6304861", "0.6303305", "0.6267454", "0.625659", "0.62482834", "0.6232329", "0.6231214", "0.62305754", "0.62271935", "0.6218698", "0.62169904", "0.618659", "0.61823404", "0.61753094", "0.61600924", "0.61517894", "0.6150888", "0.61416346", "0.61380357", "0.6136102", "0.61316943", "0.6125264", "0.6112111", "0.60660774", "0.6053166", "0.6050565", "0.6034407", "0.60314393", "0.6024523", "0.599913", "0.599296", "0.5991954", "0.59908974", "0.5990813", "0.59838927", "0.59818923", "0.598038", "0.59693795", "0.59634906", "0.5946448", "0.59454954", "0.59444714", "0.5941375", "0.59379333", "0.59189934", "0.5904237", "0.5903609", "0.58978057", "0.58847845", "0.5884332", "0.5882941", "0.58784866", "0.58755344", "0.58679634", "0.58669955", "0.585893", "0.58579624", "0.5851627", "0.58455116", "0.5842619", "0.58331156", "0.5830837", "0.58287364", "0.58265483", "0.58236617", "0.5817211", "0.58169657", "0.5810048", "0.5808849", "0.5803132", "0.5800085", "0.5789576", "0.57779026", "0.5775038", "0.57712376", "0.57635033", "0.5760504", "0.5746898", "0.57447904" ]
0.6825066
1
Given an empty stack
@Test(expected = EmptyStackException.class) public void testPopOnEmptyStack() throws EmptyStackException { SimpleStack stack = new DefaultSimpleStack(); // When we « pop » the stack stack.pop(); // should throws an EmptyStackException. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SubL(source = \"cycl/stacks.lisp\", position = 2117) \n public static final SubLObject stack_empty_p(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n return Types.sublisp_null(stack_struc_elements(stack));\n }", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "@Test\n public void testNonemptyStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n ps.push(2);\n ps.push(3);\n\n Assert.assertEquals(\"[1, 2, 3]\", ps.toString());\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "void onStackEmpty();", "@Test\n public void isEmpty() {\n SimpleStack stack = new DefaultSimpleStack();\n\n // then the stack is empty\n assertTrue(stack.isEmpty());\n }", "@Test\n public void testEmptyStack() {\n ProgramStack ps = new ProgramStack();\n\n Assert.assertEquals(\"[]\", ps.toString());\n }", "public void StackTest() {\n\tSystem.out.println( \"\\nQuestion (8) Stack Test\" );\n\tSystem.out.println( \"-----------------------\");\n\tStack s = new Stack(3);\n\tSystem.out.println( \"push 0\");\n\ts.push(0);\n\tSystem.out.println( \"push 1\");\n\ts.push(1);\n\tSystem.out.println( \"push 2\");\n\ts.push(2);\n\tSystem.out.println( \"try to push 3\");\n\ts.push(3); // error here pushing beyond stack depth, will print error messgae\n\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() ); \n\tSystem.out.println( \"try to pop \" ); // error here poping off empty stack\n\ts.pop();\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "public boolean isEmpty() {return stackList.isEmpty();}", "@Test\n public void testPopEmptyStack(){\n ms = new MyStack();\n try {\n ms.pop();\n }catch(EmptyStackException e){\n System.out.println(\"Error, cannot pop an empty stack.\");\n }\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "@Test\r\n public void testIsEmptyShouldReturnFalseWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(90);\r\n stackInstance.push(5);\r\n boolean actualOutput=stackInstance.isEmpty();\r\n assertEquals(false,actualOutput);\r\n }", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "public ArrayStack() {\n\t\ttop = 0;\t\t\t\t\t\t\t\t\t\t// points to the first element. Since empty, points 0\n\t\tstack = (T[]) (new Object[DEFAULT_CAPACITY]);\t// Casting to whatever is our desired element.\n\t}", "public EmptyStackException() {\n\t\tsuper(\"Stack is empty\");\n\t}", "@Test(expected = EmptyStackException.class)\n public void testPeekOnEmptyStack() throws EmptyStackException {\n SimpleStack stack = new DefaultSimpleStack();\n\n // When we « pop » the stack\n stack.peek(); // should throws an EmptyStackException.\n }", "@Test\n public void testIsEmpty(){\n ms = new MyStack();\n assertTrue(ms.IsEmpty());\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public static void main(String[] args) \r\n\t{\n\t \r\n Stack st=new Stack();\r\n st.push(6);\r\n st.push(5);\r\n st.push(3);\r\n st.push(2);\r\n st.push(1);\r\n \r\n System.out.println( st.peek());\r\n \r\n \r\n // System.out.println( st.isEmpty());\r\n\t}", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "@Test\n public void testIsEmpty() {\n System.out.println(\"isEmpty\");\n instance = new Stack();\n assertTrue(instance.isEmpty());\n instance.push(\"ab\");\n instance.push(\"cd\");\n assertFalse(instance.isEmpty());\n instance.pop();\n instance.pop();\n assertTrue(instance.isEmpty());\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "boolean isFull(Stack stack){\n\t\tif(stack.getStackSize() >= 100) return true;\r\n\t\telse return false;\t\r\n\t}", "@Test\n public void testStackCodeExamples() {\n logger.info(\"Beginning testStackCodeExamples()...\");\n\n // Allocate an empty stack\n Stack<String> stack = new Stack<>();\n logger.info(\"Start with an empty stack: {}\", stack);\n\n // Push a rock onto it\n String rock = \"rock\";\n stack.pushElement(rock);\n assert stack.getTop().equals(rock);\n logger.info(\"Push a rock on it: {}\", stack);\n\n // Push paper onto it\n String paper = \"paper\";\n stack.pushElement(paper);\n assert stack.getTop().equals(paper);\n logger.info(\"Push paper on it: {}\", stack);\n\n // Push scissors onto it\n String scissors = \"scissors\";\n stack.pushElement(scissors);\n assert stack.getTop().equals(scissors);\n assert stack.getSize() == 3;\n logger.info(\"Push scissors on it: {}\", stack);\n\n // Pop off the scissors\n assert stack.popElement().equals(scissors);\n assert stack.getSize() == 2;\n logger.info(\"Pop scissors from it: {}\", stack);\n\n // Pop off the paper\n assert stack.popElement().equals(paper);\n assert stack.getSize() == 1;\n logger.info(\"Pop paper from it: {}\", stack);\n\n // Pop off the rock\n assert stack.popElement().equals(rock);\n assert stack.isEmpty();\n logger.info(\"Pop rock from it: {}\", stack);\n\n logger.info(\"Completed testStackCodeExamples().\\n\");\n }", "public void testClear() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.clear();\n assertEquals(this.stack.size(), 0, 0.01);\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n }", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "@Test\n public void testMassiveStackOfNothing() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 10000;\n int expectedSize = 0;\n \n String tempString = null;\n String expected = null;\n \n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = 0; i < sizeTest; i++) {\n instance.push(tempString);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, expectedSize);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "E pop() throws EmptyStackException;", "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public static void main(String[] args) {\r\n\r\n\t\tArrayStack arrst = new ArrayStack(5);\r\n\t\tIntStream.range(0, 5).forEach(arrst::push);\r\n\t\tSystem.out.println(\"Response of peek \" + arrst.peek());\r\n\t\tSystem.out.println(\"Response of pop\" + arrst.pop());\r\n\t\tSystem.out.println(\"push one random number in the middle\");\r\n\t\tarrst.push(10);\r\n\t\tSystem.out.println(\"printing stack after first pop\");\r\n\t\tarrst.display();\r\n\r\n\t\tIntStream.range(0, arrst.size()).forEach(i -> arrst.pop());\r\n\r\n\t\tSystem.out.println(\"isEmpty after poping all the elements ???\" + arrst.isEmpty());\r\n\r\n\t\tarrst.display();\r\n\r\n\t}", "public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }", "@Test\n public void testPushPop(){\n ms=new MyStack();\n ms.push(2);\n ms.pop();\n assertTrue(ms.IsEmpty());\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "@Test\n public void pushOnStackTest_InCorrect(){\n assertNotEquals(10 , stack.getStack().returnFirst());\n }", "public static void main(String[] args) throws Exception {\n StackUsingArrays stack=new StackUsingArrays(5);\n \n for(int i=1;i<=5;i++) {\n \tstack.push(i*10);\n \tstack.display();\n }\n \n System.out.println(stack.size());\n \n //stack.push(60);\n System.out.println(stack.top());\n \n// while(!stack.isEmpty()) {\n// \tstack.display();\n// \tstack.pop();\n// \t\n// }\n// \n// stack.pop();\n\t}", "@Test\n public void isEmptyTest() {\n ResourceStack stack5 = new ResourceStack(1,0,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,1,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,1,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,0,1);\n assertFalse(stack5.isEmpty());\n\n stack5 = new ResourceStack(0,0,0,0);\n assertTrue(stack5.isEmpty());\n }", "@Test\r\n public void testStackstack() {\r\n StackArrayList<Integer> stack = new StackArrayList<Integer>();\r\n\r\n stack.push(1);\r\n stack.push(2);\r\n stack.push(3);\r\n stack.push(4);\r\n stack.push(5);\r\n\r\n assertEquals(5, stack.peek());\r\n assertEquals(5, stack.pop());\r\n assertEquals(4, stack.size());\r\n }", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "@Test /*Test 18 - implemented isEmpty() method to NumStack class. Refactored isEmpty() to now \n call the size() method of the Stack object in NumStack to determine if it is empty, rather than \n always returning true.*/\n public void testIsEmpty() {\n assertTrue(\"NumStack object should be empty after creation\", numStackTest.isEmpty());\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public MinStack1() {\r\n stack = new Stack<>();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.empty();\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 1928) \n public static final SubLObject clear_stack(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_num(stack, ZERO_INTEGER);\n _csetf_stack_struc_elements(stack, NIL);\n return stack;\n }", "public MinStack() {\n st = new Stack<>();\n }", "public Stack() {}", "public void traverseStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't traverse\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Printing stack...\");\n for(int i=0;i<=this.topOfStack;i++){\n System.out.print(this.arr[i]+\" \");\n }\n System.out.println();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public StackUnderflowException(){\n super(\"Can not pop from an empty stack\");\n }", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "public void printStack(){\n Stack<Integer> tempStack = new Stack<>();\n if (numStack.empty()==true){\n System.out.println(Integer.MIN_VALUE);\n }\n else{\n while (numStack.empty() == false){\n tempStack.push(numStack.peek());\n numStack.pop();\n }\n while (tempStack.empty() == false){\n int i = tempStack.peek();\n System.out.println(i);\n tempStack.pop();\n numStack.push(i);\n } \n }\n }", "public void peek(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(topOfStack==-1){\n System.out.println(\"Stack is empty, can't peek\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Top of the stack: \"+this.arr[this.topOfStack]);\n }", "private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}", "@Test /*Test 21 - the pop() method now throws the EmptyStackException if it is called when \n the stack size is currently 0.*/\n public void testPopEmptyStackException() throws EmptyStackException, BadTypeException {\n exception.expect(EmptyStackException.class);\n exception.expectMessage(\"The stack is empty. No element can be removed.\");\n numStackTest.pop();\n }", "public static void main(String[] args) {\n Stack<Integer> st = new Stack<Integer>();\n System.out.println(\"push\"+st.push(2));\n st.push((54));\n st.push(10);\n System.out.println(\"pop \"+st.pop());\n System.out.println(st.peek());\n System.out.println(st.isEmpty());\n \n System.out.println(\"----\");\n \n Queue<Integer> qu = new LinkedList<Integer>();\n System.out.println(qu.isEmpty());\n System.out.println(qu.add(5));\n System.out.println(qu.add(12));\n System.out.println(qu.size());\n qu.clear();\n System.out.println(qu.size());\n \n }", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "public void clearStack() {\n\n\t\tNode<T> current = getTopNode();\n\n\t\twhile (current != null) {\n\t\t\tpop();\n\t\t\tcurrent = current.nextNode;\n\t\t}\n\n\t\tSystem.out.println(\"\\n*****************\");\n\t\tSystem.out.println(\" STACK CLEARED!! \");\n\t\tSystem.out.println(\"*****************\");\n\t}", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "public MinStack() {\n size = 0;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "@Test\r\npublic void testTop()\r\n{\n\tassertEquals(null,myStack.top());\r\n\r\n\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\tassertEquals(27,myStack.top().getId());\r\n\tassertEquals(27,myStack.pop().getId());\r\n\tassertEquals(4,myStack.top().getId());\r\n\tassertEquals(4,myStack.pop().getId());\r\n\tassertEquals(2,myStack.pop().getId());\r\n\t\r\n\t// Stack leer\r\n\tassertEquals(null,myStack.top());\r\n\r\n}", "void clear() {\n stacks.clear();\n }", "public void testPop() {\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.pop();\n assertEquals(this.stack.size(), 9, 0.01);\n assertEquals(this.stack.peek(), 8, 0.01);\n }", "public static void main(String[] args) {\n\t\tStack stack = new Stack(3);\n\t\tSystem.out.println(\"Is stack empty ? - \" + isEmpty(stack));\n\t\tpush(stack, 10);\n\t\tpush(stack, 20);\n\t\tpush(stack, 30);\n\t\tpush(stack, 40);\n\t\tfor(int i = 0; i <= stack.top; i++){\n\t\t\tSystem.out.print(stack.list[i] + \" -\");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"No of element in stack - \"+(stack.top +1));\n\t\twhile(!isEmpty(stack)){\n\t\t\tSystem.out.println(\"Poping ...\"+ pop(stack));\n\t\t}\n\t}", "public boolean empty() {\n return stack1.empty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean empty() {\n return stack.isEmpty();\n }", "public Stack() {\r\n first = null;\r\n N = 0;\r\n }", "public SimpleStackOnLL() {\n\t\tthis.top = null;\n\t\tthis.size = 0;\n\t}", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public Stack() {\n stack = new Object[1];\n minStackSize = 1;\n top = -1;\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "@Test /*Test 19 - implemented push() method to NumStack class.*/\n public void testPush() {\n numStackTest.push(5);\n assertFalse(\"NumStack object shouldn't be empty after pushing first entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(10);\n assertFalse(\"NumStack object shouldn't be empty after pushing second entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(15);\n assertFalse(\"NumStack object shouldn't be empty after pushing third entry onto it\", \n numStackTest.isEmpty());\n }", "@Test\n public void testPushAndPopC() {\n\n System.out.println(\"pushB - All Nulls\");\n String elementOne = null;\n String elementTwo = null;\n String elementThree = null;\n String elementFour = null;\n\n //Stack<String> instance = new StackArrayImpl();\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n instance.push(elementOne);\n instance.push(elementTwo);\n instance.push(elementThree);\n instance.push(elementFour);\n\n int fourSize = instance.size();\n assertEquals(fourSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String resultFour = instance.pop();\n String resultThree = instance.pop();\n String resultTwo = instance.pop();\n String resultOne = instance.pop();\n\n assertEquals(elementOne, resultOne);\n assertEquals(elementTwo, resultTwo);\n assertEquals(elementThree, resultThree);\n assertEquals(elementFour, resultFour);\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "@Test\r\n public void testPopShouldReturnObjectWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(49);\r\n stackInstance.push(57);\r\n stackInstance.push(2);\r\n Integer actualOutput=stackInstance.pop();\r\n Integer expectedOutput=2;\r\n assertEquals(expectedOutput,actualOutput);\r\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public static void main(String[] args) {\n java.util.Stack<String> stack = new java.util.Stack<String>();\n stack.push(\"a\");\n stack.push(\"b\");\n stack.push(\"c\");\n stack.push(\"d\");\n System.out.println(stack.size()); //=> 4\n // bottom of stack at 0\n // top of stack at length-1\n System.out.println(stack.get(1)); //=> \"b\"\n }", "public Stack() {\n\t\t \n\t\ttop = null;\n\t}", "public void testMyStack() {\n\t\tMyStack<String> s = new MyStack<String>();\n\t\ts.push(\"1\");\n\t\ts.push(\"2\");\n\t\ts.push(\"3\");\n\t\ts.pop();\n\t\ts.push(\"4\");\n\t\ts.toString();\n\t\tSystem.out.println(\"MyStack size is: \" + s.size());\n\t}", "@Override\r\n\tpublic T pop() throws StackEmptyException {\n\t\tif(isempty()) { throw new StackEmptyException(\"Pila vacia!!\");}\r\n\t\treturn pop(sentinel);\r\n\t\t\r\n\t}", "private List<ThroughNode> popStackStackForward() {\n List<ThroughNode> popped = nodeStackStack.peek();\n nodeStackStack.push(C.tail(popped));\n return popped;\n }", "@Test\n\tpublic void testPush(){\n\t\tArrayIntStack stack = buildStack(4);\n\t\tassertEquals(4, stack.intCol.size());\n\t}", "@Test\n public void pushOnStackTest_Correct(){\n assertEquals(stack.getTop().getData() , stack.getStack().returnFirst());\n }", "public interface Stack<E> {\r\n \r\n /** \r\n * Pre: Se ingresa el dato\r\n * @param data se ingresa un dato para agregar al Vector\r\n * Post: Se guarda el dato en Stack\r\n */\r\n public void push(E data);\r\n\r\n /** \r\n * Pre: Estan todos los datos en el Stack\r\n * @return E se regresa un item.\r\n * Post: Se regresa y elimina un dato del Stack\r\n */\r\n public E pop();\r\n\r\n /** \r\n * Pre: Se encuentra el Stack con sus datos\r\n * @return E se regresa cualquier tipo de dato\r\n * @throws EmptyStackException regresa un error\r\n * Post: Se regresa el dato sobre la lista\r\n */\r\n public E peek();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack\r\n * @return boolean se regresa un valor True o False\r\n * Post: Si el Stack se encuentra vacio este regresa True\r\n */\r\n public boolean empty();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack \r\n * @return int se regrea cualquier numero\r\n * Post: Se devuelve el numero de objetos que tiene el Stack\r\n */\r\n public int size();\r\n\r\n}", "public GenericStack peek(){\n // checks if stack is empty\n if(top == null){\n System.out.println(\"Stack is empty.\");\n return null;\n //System.exit(0);\n }\n return top;\n }", "public interface Stack<T> extends Iterable<T> {\n\n // -----------------------\n // Base Function\n // -----------------------\n\n /**\n * push object to stack\n * @param item object, the item could be null\n */\n void push(T item);\n\n T pop();\n\n int size();\n\n boolean isEmpty();\n\n /**\n * get the last element, but not pop it\n * @return the top element\n */\n T peek();\n\n // ---------------------\n // Extend Function\n // ---------------------\n default boolean isNotEmpty() {\n return !isEmpty();\n }\n\n}", "public interface Stack<T> {\n boolean isEmpty();\n T pop();\n void push(T t);\n T getTop();\n void clear();\n int size();\n}", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}" ]
[ "0.792486", "0.75264376", "0.75205266", "0.74435675", "0.7302112", "0.7281336", "0.7220552", "0.70778334", "0.7071724", "0.7058417", "0.7047124", "0.7029159", "0.7010734", "0.69947946", "0.6985023", "0.69393593", "0.69120246", "0.6891075", "0.6882353", "0.68805367", "0.68728703", "0.686616", "0.6862508", "0.68613154", "0.6857986", "0.685549", "0.6833863", "0.6813662", "0.6811762", "0.6792719", "0.67903996", "0.6781545", "0.6780382", "0.67722636", "0.673909", "0.67355424", "0.6732832", "0.6727653", "0.67233163", "0.6708132", "0.6699284", "0.6696627", "0.6695034", "0.66713005", "0.66691923", "0.66689825", "0.6648256", "0.66425854", "0.66402715", "0.66387177", "0.66255486", "0.6621778", "0.6620108", "0.6614004", "0.66123044", "0.66076595", "0.660688", "0.66017604", "0.6601187", "0.6601103", "0.6597777", "0.659703", "0.6595876", "0.6588694", "0.6582343", "0.6581598", "0.658147", "0.6578726", "0.6573227", "0.6561864", "0.6549752", "0.6547302", "0.6534488", "0.6533385", "0.6529098", "0.6526724", "0.651858", "0.651858", "0.6515335", "0.6515214", "0.65148556", "0.650909", "0.64959735", "0.6479994", "0.64785635", "0.64752007", "0.64734924", "0.64664006", "0.64593315", "0.64578986", "0.6456014", "0.64553314", "0.6448795", "0.6445876", "0.64371175", "0.64363444", "0.64306575", "0.6419943", "0.64177996", "0.64174414" ]
0.70184773
12
Given a non empty stack with 2 items
@Test public void pop() { SimpleStack stack = new DefaultSimpleStack(); Item item = new Item(); Item item1 = new Item(); stack.push(item); stack.push(item1); // When we pop the stack Item topItem = stack.pop(); // Then… assertEquals("The stack constains 1 item", 1, stack.getSize()); assertSame("The first item is on top of the stack", item, stack.peek()); assertSame(item1, topItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public QueueUsingTwoStacks() \n {\n stack1 = new Stack<Item>();\n stack2 = new Stack<Item>();\n }", "void push2(int x) {\n --top2;\n if(top2 == size / 2) {\n System.out.println(\"Second stack is full\");\n return;\n }\n arr[top2] = x;\n }", "void push2(int x, TwoStack sq)\n {\n \n if(sq.top2>sq.size/2)\n {\n sq.top2--;\n sq.arr[sq.top2]=x;\n }\n \n }", "int pop2(TwoStack sq)\n {\n if(sq.top2<sq.size)\n {\n int yo2=sq.arr[sq.top2];\n sq.top2++;\n return yo2;\n }\n else\n {\n return -1;\n }\n \n }", "@Override\n public ItemStack decrStackSize(int par1, int par2) {\n if (this.stack[par1] != null)\n {\n ItemStack var3;\n\n if (this.stack[par1].stackSize <= par2)\n {\n var3 = this.stack[par1];\n this.stack[par1] = null;\n return var3;\n }\n else\n {\n var3 = this.stack[par1].splitStack(par2);\n\n if (this.stack[par1].stackSize == 0)\n {\n this.stack[par1] = null;\n }\n\n return var3;\n }\n }\n else\n {\n return null;\n }\n }", "void push2(int x, TwoStack sq) {\n if (sq.top1 < sq.top2 - 1) {\n sq.top2--;\n sq.arr[sq.top2] = x;\n }\n }", "@Test\r\n public void testStackstack() {\r\n StackArrayList<Integer> stack = new StackArrayList<Integer>();\r\n\r\n stack.push(1);\r\n stack.push(2);\r\n stack.push(3);\r\n stack.push(4);\r\n stack.push(5);\r\n\r\n assertEquals(5, stack.peek());\r\n assertEquals(5, stack.pop());\r\n assertEquals(4, stack.size());\r\n }", "int pop2()\n {\n if(top2 == size) {\n System.out.println(\"Second Stack is empty.\");\n return -1;\n }\n\n int popped = arr[top2];\n ++top2;\n return popped;\n }", "int pop2(TwoStack sq) {\n if (sq.top2 < sq.size) {\n int x = sq.arr[sq.top2];\n sq.top2++;\n return x;\n } else {\n return -1;\n }\n }", "@Test\n public void testThreePushPop(){\n ms = new MyStack();\n int pn1=3, pn2=4, pn3=5;\n ms.push(pn1);\n ms.push(pn2);\n ms.push(pn3);\n assertEquals(pn3,ms.pop());\n assertEquals(pn2,ms.pop());\n assertEquals(pn1,ms.pop());\n }", "@Test\n public void pushOnStackTest_Correct(){\n assertEquals(stack.getTop().getData() , stack.getStack().returnFirst());\n }", "void push1(int x, TwoStack sq)\n {\n \n if(sq.top1<sq.size/2)\n {\n sq.top1++;\n sq.arr[sq.top1]=x;\n }\n \n \n \n \n }", "StackType getFirstItem();", "public Item pop(Item item){\n\nif(isEmpty()) throw new NoSuchElementException(\"Stack undervflow\"); \n Item item =top.item;\n top = top.next;\n N--;\n return item;\n}", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public static ItemStack consumeStack (ItemStack stack) {\n \n if (stack.getCount() == 1) {\n \n if (stack.getItem().hasContainerItem(stack))\n return stack.getItem().getContainerItem(stack);\n \n else\n return null;\n }\n \n else {\n \n stack.splitStack(1);\n return stack;\n }\n }", "@Test\r\npublic void testTop()\r\n{\n\tassertEquals(null,myStack.top());\r\n\r\n\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\tassertEquals(27,myStack.top().getId());\r\n\tassertEquals(27,myStack.pop().getId());\r\n\tassertEquals(4,myStack.top().getId());\r\n\tassertEquals(4,myStack.pop().getId());\r\n\tassertEquals(2,myStack.pop().getId());\r\n\t\r\n\t// Stack leer\r\n\tassertEquals(null,myStack.top());\r\n\r\n}", "private void moveStack1ToStack2() \n {\n while (!stack1.isEmpty())\n stack2.push(stack1.pop());\n }", "@Then(\"^the stack contains two items$\")\n\tpublic void the_stack_contains_two_items() throws Throwable {\n\t throw new PendingException();\n\t}", "public MyStack2() {\n q1 = new ArrayDeque<>();\n q2 = new ArrayDeque<>();\n }", "public MinStack2() {\r\n\t\t\tdata = new Stack<>();\r\n\t\t\thelper = new Stack<>();\r\n\t\t}", "public int pop() { //第二个栈为空 , 就将第一个栈的数据往第二个里面加\n if(empty()){\n throw new UnsupportedOperationException(\"栈为空\");\n }\n if(temp2.empty()){\n while(!temp1.empty()){\n temp2.push(temp1.pop());\n }\n }\n return temp2.pop(); //不管是否为空,直接pop第二个栈\n }", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "@Test\n public void pushOnStackTest_InCorrect(){\n assertNotEquals(10 , stack.getStack().returnFirst());\n }", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "private Stack<String> pickLongerStack(Stack<String> first, Stack<String> second)\n {\n\treturn first.size() > second.size() ? first : second;\n }", "@Override\n\tpublic ItemStack decrStackSize(int p_70298_1_, int p_70298_2_) {\n\t\tif (field_145900_a[p_70298_1_] != null) {\n\t\t\tItemStack var3;\n\n\t\t\tif (field_145900_a[p_70298_1_].stackSize <= p_70298_2_) {\n\t\t\t\tvar3 = field_145900_a[p_70298_1_];\n\t\t\t\tfield_145900_a[p_70298_1_] = null;\n\t\t\t\treturn var3;\n\t\t\t} else {\n\t\t\t\tvar3 = field_145900_a[p_70298_1_].splitStack(p_70298_2_);\n\n\t\t\t\tif (field_145900_a[p_70298_1_].stackSize == 0) {\n\t\t\t\t\tfield_145900_a[p_70298_1_] = null;\n\t\t\t\t}\n\n\t\t\t\treturn var3;\n\t\t\t}\n\t\t} else\n\t\t\treturn null;\n\t}", "@Test\n void whenElementAddedToStackLastElementShouldTop() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n\n boolean result = myStack.head.equals(myFirstNode) && myStack.head.getNext().equals(mySecondNode)\n && myStack.tail.equals(myThirdNode);\n\n Assertions.assertTrue(result);\n }", "public MinStack2() {\n stack1 = new Stack<>();\n stack2 = new Stack<>();\n }", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "@Test\n public void basicQueueOfStacksTest() {\n \n QueueOfStacks<String> tempQueue = new QueueOfStacks<String>();\n String tempCurrentElement;\n \n assertTrue(\"Element not in queue\", tempQueue.isEmpty());\n tempQueue.add(\"a\");\n assertTrue(\"Element not in queue\", !tempQueue.isEmpty());\n tempQueue.add(\"b\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.peek();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\"));\n\n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"a\") &&\n tempQueue.size() == 1);\n \n tempQueue.add(\"c\");\n assertTrue(\"Number of elements not correct\", tempQueue.size() == 2);\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"b\") &&\n tempQueue.size() == 1 &&\n !tempQueue.isEmpty());\n \n tempCurrentElement = tempQueue.remove();\n assertTrue(\"Element not correct\", tempCurrentElement.equals(\"c\") &&\n tempQueue.size() == 0 &&\n tempQueue.isEmpty());\n \n }", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "@Test\n public void testPushAndPopC() {\n\n System.out.println(\"pushB - All Nulls\");\n String elementOne = null;\n String elementTwo = null;\n String elementThree = null;\n String elementFour = null;\n\n //Stack<String> instance = new StackArrayImpl();\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n instance.push(elementOne);\n instance.push(elementTwo);\n instance.push(elementThree);\n instance.push(elementFour);\n\n int fourSize = instance.size();\n assertEquals(fourSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String resultFour = instance.pop();\n String resultThree = instance.pop();\n String resultTwo = instance.pop();\n String resultOne = instance.pop();\n\n assertEquals(elementOne, resultOne);\n assertEquals(elementTwo, resultTwo);\n assertEquals(elementThree, resultThree);\n assertEquals(elementFour, resultFour);\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public interface Stack<T> extends Iterable<T> {\n\n // -----------------------\n // Base Function\n // -----------------------\n\n /**\n * push object to stack\n * @param item object, the item could be null\n */\n void push(T item);\n\n T pop();\n\n int size();\n\n boolean isEmpty();\n\n /**\n * get the last element, but not pop it\n * @return the top element\n */\n T peek();\n\n // ---------------------\n // Extend Function\n // ---------------------\n default boolean isNotEmpty() {\n return !isEmpty();\n }\n\n}", "@Test\n public void testStackCodeExamples() {\n logger.info(\"Beginning testStackCodeExamples()...\");\n\n // Allocate an empty stack\n Stack<String> stack = new Stack<>();\n logger.info(\"Start with an empty stack: {}\", stack);\n\n // Push a rock onto it\n String rock = \"rock\";\n stack.pushElement(rock);\n assert stack.getTop().equals(rock);\n logger.info(\"Push a rock on it: {}\", stack);\n\n // Push paper onto it\n String paper = \"paper\";\n stack.pushElement(paper);\n assert stack.getTop().equals(paper);\n logger.info(\"Push paper on it: {}\", stack);\n\n // Push scissors onto it\n String scissors = \"scissors\";\n stack.pushElement(scissors);\n assert stack.getTop().equals(scissors);\n assert stack.getSize() == 3;\n logger.info(\"Push scissors on it: {}\", stack);\n\n // Pop off the scissors\n assert stack.popElement().equals(scissors);\n assert stack.getSize() == 2;\n logger.info(\"Pop scissors from it: {}\", stack);\n\n // Pop off the paper\n assert stack.popElement().equals(paper);\n assert stack.getSize() == 1;\n logger.info(\"Pop paper from it: {}\", stack);\n\n // Pop off the rock\n assert stack.popElement().equals(rock);\n assert stack.isEmpty();\n logger.info(\"Pop rock from it: {}\", stack);\n\n logger.info(\"Completed testStackCodeExamples().\\n\");\n }", "@Test\r\n public void testPopShouldReturnObjectWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(49);\r\n stackInstance.push(57);\r\n stackInstance.push(2);\r\n Integer actualOutput=stackInstance.pop();\r\n Integer expectedOutput=2;\r\n assertEquals(expectedOutput,actualOutput);\r\n }", "void push1(int x, TwoStack sq) {\n if (sq.top1 < sq.top2 - 1) {\n sq.top1++;\n sq.arr[sq.top1] = x;\n }\n }", "public interface Stack<E> {\r\n \r\n /** \r\n * Pre: Se ingresa el dato\r\n * @param data se ingresa un dato para agregar al Vector\r\n * Post: Se guarda el dato en Stack\r\n */\r\n public void push(E data);\r\n\r\n /** \r\n * Pre: Estan todos los datos en el Stack\r\n * @return E se regresa un item.\r\n * Post: Se regresa y elimina un dato del Stack\r\n */\r\n public E pop();\r\n\r\n /** \r\n * Pre: Se encuentra el Stack con sus datos\r\n * @return E se regresa cualquier tipo de dato\r\n * @throws EmptyStackException regresa un error\r\n * Post: Se regresa el dato sobre la lista\r\n */\r\n public E peek();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack\r\n * @return boolean se regresa un valor True o False\r\n * Post: Si el Stack se encuentra vacio este regresa True\r\n */\r\n public boolean empty();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack \r\n * @return int se regrea cualquier numero\r\n * Post: Se devuelve el numero de objetos que tiene el Stack\r\n */\r\n public int size();\r\n\r\n}", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "@Test\n public void testPushTop(){\n ms = new MyStack();\n ms.push(2);\n assertEquals(2,ms.top());\n }", "E pop() throws EmptyStackException;", "public void visitPOP2(POP2 o){\n\t\tif (stack().peek().getSize() != 2){\n\t\t\tconstraintViolated(o, \"Stack top size should be 2 but stack top is '\"+stack().peek()+\"' of size '\"+stack().peek().getSize()+\"'.\");\n\t\t}\n\t}", "@Test\n\tpublic void testPush(){\n\t\tArrayIntStack stack = buildStack(4);\n\t\tassertEquals(4, stack.intCol.size());\n\t}", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "@Test\n public void testPushAndPopD() {\n System.out.println(\"popC - Out of Order\");\n\n String elementOne = \"Bill\";\n String elementTwo = \"Steve\";\n String elementThree = \"Tim\";\n String elementFour = \"Dave\";\n\n //Stack<String> instance = new StackArrayImpl();\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n instance.push(elementOne);\n instance.push(elementTwo);\n instance.push(elementThree);\n\n int fourSize = instance.size();\n assertEquals(fourSize, 3);\n assertEquals(instance.isEmpty(), false);\n\n String resultThree = instance.pop();\n String resultTwo = instance.pop();\n\n instance.push(elementFour);\n String resultFour = instance.pop();\n\n String resultOne = instance.pop();\n\n assertEquals(elementOne, resultOne);\n assertEquals(elementTwo, resultTwo);\n assertEquals(elementThree, resultThree);\n assertEquals(elementFour, resultFour);\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "@Test\n public void testPushPop(){\n ms=new MyStack();\n ms.push(2);\n ms.pop();\n assertTrue(ms.IsEmpty());\n }", "@Test\r\n\tpublic void testPop()\r\n\t{\n\t\tassertEquals(null,myStack.pop());\r\n\t\r\n\t\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\t\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\t\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\t\tassertEquals(27,myStack.top().getId());\r\n\t\tassertEquals(\"Chur\",myStack.pop().getName());\r\n\t\tassertEquals(4,myStack.pop().getId());\r\n\t\tassertEquals(2,myStack.pop().getId());\r\n\t\t\r\n\t\t// leerer Stack\r\n\t\tassertEquals(null,myStack.pop());\r\n\t\tassertEquals(null,myStack.top());\r\n\t}", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tArrayStack arrst = new ArrayStack(5);\r\n\t\tIntStream.range(0, 5).forEach(arrst::push);\r\n\t\tSystem.out.println(\"Response of peek \" + arrst.peek());\r\n\t\tSystem.out.println(\"Response of pop\" + arrst.pop());\r\n\t\tSystem.out.println(\"push one random number in the middle\");\r\n\t\tarrst.push(10);\r\n\t\tSystem.out.println(\"printing stack after first pop\");\r\n\t\tarrst.display();\r\n\r\n\t\tIntStream.range(0, arrst.size()).forEach(i -> arrst.pop());\r\n\r\n\t\tSystem.out.println(\"isEmpty after poping all the elements ???\" + arrst.isEmpty());\r\n\r\n\t\tarrst.display();\r\n\r\n\t}", "public GenericStack popStack(){\n if(isEmpty() == true)return null;\n GenericStack temp = top;\n // makes next item in list the tip\n top = top.next;\n return temp;\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "int pop1(TwoStack sq)\n {\n if(sq.top1>=0)\n {\n int yo=sq.arr[sq.top1];\n sq.top1--;\n return yo;\n }\n else\n {\n return -1;\n }\n \n }", "public static void main(String[] args) throws Exception {\n\t\t// TODO Auto-generated method stub\n\t\tLinkedListAsStack stack = new LinkedListAsStack();\n\t\tstack.push(10);\n\t\tstack.push(20);\n\t\tstack.push(30);\n\t\tstack.push(40);\n\t\tstack.display();// 40 30 20 10-> act as a stack\n\t\tSystem.out.println(stack.size());// 4\n\t\tSystem.out.println(stack.isEmpty());// false\n\t\tSystem.out.println(stack.pop());// 40\n\t\tSystem.out.println(stack.top());// 30\n\t\tstack.display();// 30 20 10\n\t\tSystem.out.println(stack.size());// 3\n\t}", "@Test\n public void testNonemptyStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n ps.push(2);\n ps.push(3);\n\n Assert.assertEquals(\"[1, 2, 3]\", ps.toString());\n }", "public ItemStack decrStackSize(int par1, int par2)\n {\n if (this.furnaceItemStacks[par1] != null)\n {\n ItemStack var3;\n\n if (this.furnaceItemStacks[par1].stackSize <= par2)\n {\n var3 = this.furnaceItemStacks[par1];\n this.furnaceItemStacks[par1] = null;\n return var3;\n }\n else\n {\n var3 = this.furnaceItemStacks[par1].splitStack(par2);\n\n if (this.furnaceItemStacks[par1].stackSize == 0)\n {\n this.furnaceItemStacks[par1] = null;\n }\n\n return var3;\n }\n }\n else\n {\n return null;\n }\n }", "public void pop() {\n s2.pop();\n temp = (Stack<Integer>) s2.clone();\n s1.clear();\n while (!temp.isEmpty()) {\n s1.push(temp.pop());\n }\n }", "public void pop() throws StackUnderflowException;", "public void pop() {\r\n \t Queue<Integer> temp=new LinkedList<Integer>();\r\n \t int counter=0;\r\n \t while(!stack.isEmpty()){\r\n \t temp.add((Integer) stack.poll());\r\n \t counter++;\r\n \t \r\n \t }\r\n \t while(counter>1)\r\n \t {\r\n \t \r\n \t stack.add(temp.poll());\r\n \t counter--;\r\n \t }\r\n }", "public static void main(String[] args) {\n\r\n\r\n\r\n\t\tPerson p1 = new Person(\"1\", \"Nishant\");\r\n\t\tPerson p2 = new Person(\"2\", \"Nikhil\");\r\n\t\t\r\n\t\tPersonStack ps = new PersonStack();\r\n\t\t\r\n\t\tps.push(p1);\r\n\t\tps.push(p2);\r\n\t\t\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\tSystem.out.println(ps.pop().toString());\r\n\t\t\r\n\r\n\t}", "public String getStack();", "public static void main(String[] args) {\r\n\t\tStack <Integer> s=new Stack<>();//Stack s=new Stack();\r\n\t\ts.push(12);\r\n\t\ts.push(32);\r\n\t\ts.push(62);\r\n\t\ts.push(72);\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\tSystem.out.println(s.pop());\r\n\t\t\r\n\t\tStack <String> s2=new Stack<>();\r\n\t\ts2.push(\"h\");\r\n\t\ts2.push(\"o\");\r\n\t\ts2.push(\"l\");\r\n\t\ts2.push(\"a\");\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\t\tSystem.out.println(s2.pop());\r\n\r\n\t\t\r\n\t}", "public static void QtoS(){\n while(!POOR.isEmpty()){\n stack.push(POOR.remove());\n }\n while(!FAIR.isEmpty()){\n stack.push(FAIR.remove());\n }\n while(!GOOD.isEmpty()){\n stack.push(GOOD.remove());\n }\n while(!VGOOD.isEmpty()){\n stack.push(VGOOD.remove());\n }\n while(!EXCELLENT.isEmpty()){\n stack.push(EXCELLENT.remove());\n }\n \n \n}", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "public void StackTest() {\n\tSystem.out.println( \"\\nQuestion (8) Stack Test\" );\n\tSystem.out.println( \"-----------------------\");\n\tStack s = new Stack(3);\n\tSystem.out.println( \"push 0\");\n\ts.push(0);\n\tSystem.out.println( \"push 1\");\n\ts.push(1);\n\tSystem.out.println( \"push 2\");\n\ts.push(2);\n\tSystem.out.println( \"try to push 3\");\n\ts.push(3); // error here pushing beyond stack depth, will print error messgae\n\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() ); \n\tSystem.out.println( \"try to pop \" ); // error here poping off empty stack\n\ts.pop();\n }", "public void pop() {\n// \tSystem.out.println(s2.empty());\n \tint l1 = s1.size();\n \tfor(int i=0;i<l1;i++){\n \ts2.push(s1.pop());\n }\n// \tSystem.out.println(s1.empty());\n// \tSystem.out.println(s2.pop());\n \tint l2 = s2.size();\n \tfor(int i=0;i<l2;i++){\n \ts1.push(s2.pop());\n }\n }", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "public Item pop(){\n\t\tif(isEmpty()){\r\n\t\t\tSystem.out.println(\"Stack is empty\");\r\n\t\t}\r\n\t\t\r\n\t\tItem item=first.item;\r\n\t\tfirst=first.next;\r\n\t\tN--;\r\n\t\treturn item;\r\n\t\r\n\r\n\t}", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "interface YoStack<E> {\n public boolean isEmpty();\n public E push(E e);\n public E pop() throws EmptyStackException;\n public E peek() throws EmptyStackException;\n}", "public ItemStack decrStackSize(int p_70298_1_, int p_70298_2_)\n {\n if (this.inventoryContents[p_70298_1_] != null)\n {\n ItemStack itemstack;\n\n if (this.inventoryContents[p_70298_1_].stackSize <= p_70298_2_)\n {\n itemstack = this.inventoryContents[p_70298_1_];\n this.inventoryContents[p_70298_1_] = null;\n this.markDirty();\n return itemstack;\n } else\n {\n itemstack = this.inventoryContents[p_70298_1_].splitStack(p_70298_2_);\n\n if (this.inventoryContents[p_70298_1_].stackSize == 0)\n {\n this.inventoryContents[p_70298_1_] = null;\n }\n\n this.markDirty();\n return itemstack;\n }\n } else\n {\n return null;\n }\n }", "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public MyStack() {\n One = new LinkedList<>();\n Two = new LinkedList<>();\n }", "public MyStack() {\n list = new LinkedList<>();\n list2 = new LinkedList<>();\n }", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public void push(int element) {\n while (!stack1.isEmpty()){\n stack2.push(stack1.pop());\n }\n stack1.push(element);\n while(!stack2.isEmpty()){\n stack1.push(stack2.pop());\n }\n }", "public T pop() {\r\n if ( top == null )\r\n throw new IllegalStateException(\"Can't pop from an empty stack.\");\r\n T topItem = top.item; // The item that is being popped.\r\n top = top.next; // The previous second item is now on top.\r\n return topItem;\r\n }", "@Test\n public void testPrintStack() {\n System.out.println(\"printStack\");\n Stack2 instance = new Stack2();\n instance.push(2);\n instance.push(4);\n instance.push(5);\n int temp = instance.pop();\n instance.printStack();\n }", "public static void main(String[] args) {\n\t\tStack stack = new Stack(3);\n\t\tSystem.out.println(\"Is stack empty ? - \" + isEmpty(stack));\n\t\tpush(stack, 10);\n\t\tpush(stack, 20);\n\t\tpush(stack, 30);\n\t\tpush(stack, 40);\n\t\tfor(int i = 0; i <= stack.top; i++){\n\t\t\tSystem.out.print(stack.list[i] + \" -\");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"No of element in stack - \"+(stack.top +1));\n\t\twhile(!isEmpty(stack)){\n\t\t\tSystem.out.println(\"Poping ...\"+ pop(stack));\n\t\t}\n\t}", "static void stack_pop(Stack<Integer> stack)\r\n\t{\r\n\t\t\r\n\t\tSystem.out.print(\"Pop : \");\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tInteger dataElement=(Integer)stack.pop();\r\n\t\t\tSystem.out.print(\" \"+ dataElement);\r\n\t\t\t\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public static void main(String[] args) throws Exception {\n StackUsingArrays stack=new StackUsingArrays(5);\n \n for(int i=1;i<=5;i++) {\n \tstack.push(i*10);\n \tstack.display();\n }\n \n System.out.println(stack.size());\n \n //stack.push(60);\n System.out.println(stack.top());\n \n// while(!stack.isEmpty()) {\n// \tstack.display();\n// \tstack.pop();\n// \t\n// }\n// \n// stack.pop();\n\t}", "public void testMyStack() {\n\t\tMyStack<String> s = new MyStack<String>();\n\t\ts.push(\"1\");\n\t\ts.push(\"2\");\n\t\ts.push(\"3\");\n\t\ts.pop();\n\t\ts.push(\"4\");\n\t\ts.toString();\n\t\tSystem.out.println(\"MyStack size is: \" + s.size());\n\t}", "private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\n\t\t\t\t!itemStack.stackEmpty()){\r\n\t\t\t\theldStack.incrementStack();\r\n\t\t\t\titemStack.decrementStack(tileItems);\r\n\t\t\t\tif(itemStack.stackEmpty())\t//will this cause an error since the item is removed by the inventory?\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\taddItemStack(itemStack);\r\n\t\t}\r\n\t\telse\r\n\t\t\taddFullStack(itemStack);\r\n\t}", "private void multiple() throws Exception{\n\t\tif(!(stackBiggerThanTwo())) throw new Exception(\"Stack hat zu wenig einträge mindestens 2 werden gebraucht!!\");\n\t\telse{\n\t\t\tvalue1=stack.pop();\n\t\t\tvalue2=stack.pop();\n\t\t\tstack.push(value1*value2);\n\t\t}\n\t}", "public static void main(String[] args) {\n java.util.Stack<String> stack = new java.util.Stack<String>();\n stack.push(\"a\");\n stack.push(\"b\");\n stack.push(\"c\");\n stack.push(\"d\");\n System.out.println(stack.size()); //=> 4\n // bottom of stack at 0\n // top of stack at length-1\n System.out.println(stack.get(1)); //=> \"b\"\n }", "public static void main(String[] args) {\n// System.out.println(\"as.getSize() == \" + as.getSize());\n// as.pop();\n// System.out.println(\"as.pop() == \" + as);\n// System.out.println(\"as.peek() == \" + as.peek());\n// as.push(\"17\");\n// System.out.println(as);\n\n LinkedListStack<Integer> stack = new LinkedListStack<>();\n\n for(int i = 0 ; i < 5 ; i ++){\n stack.push(i);\n System.out.println(stack);\n }\n\n stack.pop();\n System.out.println(stack);\n\n }", "@Test\n public void testStackInteger() {\n DatastructureTest.INTSTACK.push(3);\n DatastructureTest.INTSTACK.push(7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 7);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == 3);\n Assert.assertTrue(DatastructureTest.INTSTACK.peek() == -1);\n Assert.assertTrue(DatastructureTest.INTSTACK.pop() == -1);\n }", "public Stack getStack(int slot);", "public ItemStack splitStack(int count) {\n return count > 0 ? stack.split(count) : ItemStack.EMPTY;\n }", "private List<ThroughNode> popStackStackForward() {\n List<ThroughNode> popped = nodeStackStack.peek();\n nodeStackStack.push(C.tail(popped));\n return popped;\n }", "@Test\n public void testPopEmptyStack(){\n ms = new MyStack();\n try {\n ms.pop();\n }catch(EmptyStackException e){\n System.out.println(\"Error, cannot pop an empty stack.\");\n }\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 2117) \n public static final SubLObject stack_empty_p(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n return Types.sublisp_null(stack_struc_elements(stack));\n }", "public static void main(String[] args) {\n\t\tInteger[] iStore = new Integer[10];\n\t\tGenStack2<Integer> stk1 = new GenStack2<Integer>(iStore);\n\n\t\t// Create stack for array\n\t\tString[] name = { \"One\", \"Two\", \"Three\" };\n\t\tString[] strStore = new String[3];\n\t\tGenStack2<String> stk2 = new GenStack2<String>(strStore, name);\n\n\t\tString str;\n\t\tint n;\n\n\t\ttry {\n\t\t\tfor (int i = 0; i < iStore.length; i++) {\n\t\t\t\tstk1.push(i);\n\t\t\t}\n\t\t} catch (StackFullExeption exc) {\n\t\t\tSystem.out.println(exc);\n\t\t}\n\n\t\t// One stack from another\n\t\tString[] strStore2 = new String[3];\n\t\tGenStack2<String> stk3 = new GenStack2<String>(strStore2, stk2);\n\n\t\t// Display all stacks\n\t\ttry {\n\t\t\tSystem.out.print(\"stk1: \");\n\t\t\tfor (int i = 0; i < iStore.length; i++) {\n\t\t\t\tn = stk1.get();\n\t\t\t\tSystem.out.print(n + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\n\");\n\n\t\t\tSystem.out.print(\"stk2: \");\n\t\t\tfor (int i = 0; i < strStore2.length; i++) {\n\t\t\t\tstr = stk2.get();\n\t\t\t\tSystem.out.print(str + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\n\");\n\n\t\t\tSystem.out.print(\"stk3: \");\n\t\t\tfor (int i = 0; i < strStore2.length; i++) {\n\t\t\t\tstr = stk3.get();\n\t\t\t\tSystem.out.print(str + \" \");\n\t\t\t}\n\n\t\t} catch (StackEmptyExeption exc) {\n\t\t\tSystem.out.println(exc);\n\t\t}\n\n\t\tSystem.out.println();\n\t}", "public int peek() { //使用栈的peek\n if(empty()){\n throw new UnsupportedOperationException(\"栈为空\");\n }\n if(temp2.empty()){\n while(!temp1.empty()){\n temp2.push(temp1.pop());\n }\n }\n int data = temp2.peek() ;\n return data; \n }", "public TwoStaImpQue() {\n this.stack1 = new Stack<>();\n this.stack2 = new Stack<>();\n }", "@Override\r\n public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int p_82846_2_)\r\n {\r\n ItemStack itemstack = null;\r\n Slot slot = (Slot)this.inventorySlots.get(p_82846_2_);\r\n\r\n if (slot != null && slot.getHasStack())\r\n {\r\n ItemStack itemstack1 = slot.getStack();\r\n itemstack = itemstack1.copy();\r\n\r\n if (p_82846_2_ == 2 ||p_82846_2_ == 3 )\r\n {\r\n if (!this.mergeItemStack(itemstack1, 4, 40, true))\r\n {\r\n return null;\r\n }\r\n\r\n slot.onSlotChange(itemstack1, itemstack);\r\n }\r\n else if (p_82846_2_ != 1 && p_82846_2_ != 0)\r\n {\r\n \r\n if (p_82846_2_ >= 4 && p_82846_2_ < 31)\r\n {\r\n if (!this.mergeItemStack(itemstack1, 31, 40, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (p_82846_2_ >= 31 && p_82846_2_ < 40 && !this.mergeItemStack(itemstack1, 4, 31, false))\r\n {\r\n return null;\r\n }\r\n }\r\n else if (!this.mergeItemStack(itemstack1, 4, 40, false))\r\n {\r\n return null;\r\n }\r\n\r\n if (itemstack1.stackSize == 0)\r\n {\r\n slot.putStack((ItemStack)null);\r\n }\r\n else\r\n {\r\n slot.onSlotChanged();\r\n }\r\n\r\n if (itemstack1.stackSize == itemstack.stackSize)\r\n {\r\n return null;\r\n }\r\n\r\n slot.onPickupFromSlot(p_82846_1_, itemstack1);\r\n }\r\n\r\n return itemstack;\r\n }", "int pop1(TwoStack sq) {\n if (sq.top1 >= 0) {\n int x = sq.arr[sq.top1];\n sq.top1--;\n return x;\n } else {\n return -1;\n }\n }", "public void pop() {\n if (top==-1) {\n System.out.println(\"Stack is empty\");\n return;\n\n\n } else {\n System.out.println(\"item popde is:-\"+ stack[top]);\n top--;\n }\n }", "public static void main(String[] args) {\n \n QueuetoStack a=new QueuetoStack();\n a.add(1);\n a.add(2);\n a.add(3);\n a.add(4);\n a.remove();\n a.remove();\n a.remove();\n a.remove();\n }" ]
[ "0.6757758", "0.6604134", "0.654522", "0.6527256", "0.6524469", "0.64036095", "0.638059", "0.63602906", "0.63439375", "0.63195586", "0.62813014", "0.62648267", "0.62352073", "0.6231378", "0.6206743", "0.61950386", "0.6178924", "0.6178499", "0.6166535", "0.61487097", "0.61486983", "0.6145266", "0.6140599", "0.6089287", "0.60609853", "0.6058532", "0.60582346", "0.603527", "0.60138446", "0.59962505", "0.5988403", "0.5982496", "0.59575146", "0.5954375", "0.5947959", "0.5944877", "0.5912346", "0.5899543", "0.5897557", "0.58860976", "0.5879595", "0.58706725", "0.58582777", "0.5853794", "0.58515936", "0.5846519", "0.58288217", "0.58262825", "0.58198005", "0.5818991", "0.58176816", "0.58160436", "0.5815144", "0.5807527", "0.5806723", "0.5803519", "0.58011854", "0.57996595", "0.5790456", "0.57847923", "0.5775394", "0.5771257", "0.5769703", "0.57688457", "0.57618535", "0.57592106", "0.5752065", "0.5746986", "0.574545", "0.5740884", "0.5738861", "0.57304245", "0.5729072", "0.57280946", "0.57216173", "0.57152545", "0.5713251", "0.5709058", "0.5708757", "0.57026166", "0.5699946", "0.5695938", "0.5694948", "0.56929326", "0.5690894", "0.5682462", "0.5682332", "0.5671584", "0.56711423", "0.56679296", "0.5650087", "0.56453145", "0.5641393", "0.5637044", "0.5633256", "0.5631334", "0.5620873", "0.56153685", "0.5607342", "0.56067884" ]
0.62936515
10
Given an empty stack
@Test(expected = EmptyStackException.class) public void testPeekOnEmptyStack() throws EmptyStackException { SimpleStack stack = new DefaultSimpleStack(); // When we « pop » the stack stack.peek(); // should throws an EmptyStackException. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SubL(source = \"cycl/stacks.lisp\", position = 2117) \n public static final SubLObject stack_empty_p(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n return Types.sublisp_null(stack_struc_elements(stack));\n }", "protected void stackEmptyButton() {\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tstack.pop();\n \t\tif (stack.empty()) {\n \t\t\tenter();\n \t}\n \t}\n }", "@Test\n public void testNonemptyStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n ps.push(2);\n ps.push(3);\n\n Assert.assertEquals(\"[1, 2, 3]\", ps.toString());\n }", "public boolean stackEmpty() {\r\n\t\treturn (top == -1) ? true : false;\r\n\t }", "void onStackEmpty();", "@Test\n public void isEmpty() {\n SimpleStack stack = new DefaultSimpleStack();\n\n // then the stack is empty\n assertTrue(stack.isEmpty());\n }", "@Test\n public void testEmptyStack() {\n ProgramStack ps = new ProgramStack();\n\n Assert.assertEquals(\"[]\", ps.toString());\n }", "public void StackTest() {\n\tSystem.out.println( \"\\nQuestion (8) Stack Test\" );\n\tSystem.out.println( \"-----------------------\");\n\tStack s = new Stack(3);\n\tSystem.out.println( \"push 0\");\n\ts.push(0);\n\tSystem.out.println( \"push 1\");\n\ts.push(1);\n\tSystem.out.println( \"push 2\");\n\ts.push(2);\n\tSystem.out.println( \"try to push 3\");\n\ts.push(3); // error here pushing beyond stack depth, will print error messgae\n\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() );\n\tSystem.out.println( \"pop \" + s.pop() ); \n\tSystem.out.println( \"try to pop \" ); // error here poping off empty stack\n\ts.pop();\n }", "@Test\r\n public void isEmptyTest1(){\r\n stack.pop();\r\n stack.pop();\r\n stack.pop();\r\n assertThat(stack.isEmpty(), is(true));\r\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't pop from stack\");\n return;\n }\n // if stack is not empty\n this.arr[this.topOfStack]=Integer.MIN_VALUE;\n this.topOfStack--;\n }", "@Test\n void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() {\n\n MyNode<Integer> myFirstNode = new MyNode<>(70);\n MyNode<Integer> mySecondNode = new MyNode<>(30);\n MyNode<Integer> myThirdNode = new MyNode<>(56);\n MyStack myStack = new MyStack();\n myStack.push(myFirstNode);\n myStack.push(mySecondNode);\n myStack.push(myThirdNode);\n boolean isEmpty = myStack.popTillEmpty();\n\n System.out.println(isEmpty);\n boolean result = myStack.head == null && myStack.tail == null;\n }", "public boolean isEmpty() {return stackList.isEmpty();}", "@Test(expected = EmptyStackException.class)\n public void testPopOnEmptyStack() throws EmptyStackException {\n SimpleStack stack = new DefaultSimpleStack();\n\n // When we « pop » the stack\n stack.pop(); // should throws an EmptyStackException.\n }", "@Test\n public void testPopEmptyStack(){\n ms = new MyStack();\n try {\n ms.pop();\n }catch(EmptyStackException e){\n System.out.println(\"Error, cannot pop an empty stack.\");\n }\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn stack.isEmpty();\r\n\t}", "@Test\r\n public void testIsEmptyShouldReturnFalseWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(90);\r\n stackInstance.push(5);\r\n boolean actualOutput=stackInstance.isEmpty();\r\n assertEquals(false,actualOutput);\r\n }", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "public ArrayStack() {\n\t\ttop = 0;\t\t\t\t\t\t\t\t\t\t// points to the first element. Since empty, points 0\n\t\tstack = (T[]) (new Object[DEFAULT_CAPACITY]);\t// Casting to whatever is our desired element.\n\t}", "public EmptyStackException() {\n\t\tsuper(\"Stack is empty\");\n\t}", "@Test\n public void testIsEmpty(){\n ms = new MyStack();\n assertTrue(ms.IsEmpty());\n }", "public boolean isEmpty() {\n \treturn stack.size() == 0;\n }", "public static void main(String[] args) \r\n\t{\n\t \r\n Stack st=new Stack();\r\n st.push(6);\r\n st.push(5);\r\n st.push(3);\r\n st.push(2);\r\n st.push(1);\r\n \r\n System.out.println( st.peek());\r\n \r\n \r\n // System.out.println( st.isEmpty());\r\n\t}", "public boolean isEmpty(){\n return this.stack.isEmpty();\n\n }", "@Test\n public void testIsEmpty() {\n System.out.println(\"isEmpty\");\n instance = new Stack();\n assertTrue(instance.isEmpty());\n instance.push(\"ab\");\n instance.push(\"cd\");\n assertFalse(instance.isEmpty());\n instance.pop();\n instance.pop();\n assertTrue(instance.isEmpty());\n }", "public boolean isEmpty(){\r\n \treturn stack1.isEmpty();\r\n }", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "boolean isFull(Stack stack){\n\t\tif(stack.getStackSize() >= 100) return true;\r\n\t\telse return false;\t\r\n\t}", "@Test\n public void testStackCodeExamples() {\n logger.info(\"Beginning testStackCodeExamples()...\");\n\n // Allocate an empty stack\n Stack<String> stack = new Stack<>();\n logger.info(\"Start with an empty stack: {}\", stack);\n\n // Push a rock onto it\n String rock = \"rock\";\n stack.pushElement(rock);\n assert stack.getTop().equals(rock);\n logger.info(\"Push a rock on it: {}\", stack);\n\n // Push paper onto it\n String paper = \"paper\";\n stack.pushElement(paper);\n assert stack.getTop().equals(paper);\n logger.info(\"Push paper on it: {}\", stack);\n\n // Push scissors onto it\n String scissors = \"scissors\";\n stack.pushElement(scissors);\n assert stack.getTop().equals(scissors);\n assert stack.getSize() == 3;\n logger.info(\"Push scissors on it: {}\", stack);\n\n // Pop off the scissors\n assert stack.popElement().equals(scissors);\n assert stack.getSize() == 2;\n logger.info(\"Pop scissors from it: {}\", stack);\n\n // Pop off the paper\n assert stack.popElement().equals(paper);\n assert stack.getSize() == 1;\n logger.info(\"Pop paper from it: {}\", stack);\n\n // Pop off the rock\n assert stack.popElement().equals(rock);\n assert stack.isEmpty();\n logger.info(\"Pop rock from it: {}\", stack);\n\n logger.info(\"Completed testStackCodeExamples().\\n\");\n }", "public void testClear() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.clear();\n assertEquals(this.stack.size(), 0, 0.01);\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n }", "@Test\n public void testStack() {\n DatastructureTest.STACK.push(3);\n DatastructureTest.STACK.push(7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 7);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == 3);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.peek()) == -1);\n Assert.assertTrue(((Integer) DatastructureTest.STACK.pop()) == -1);\n }", "public void testIsEmpty() {\n assertTrue(this.empty.isEmpty());\n assertFalse(this.stack.isEmpty());\n }", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "@Test\n public void testMassiveStackOfNothing() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 10000;\n int expectedSize = 0;\n \n String tempString = null;\n String expected = null;\n \n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = 0; i < sizeTest; i++) {\n instance.push(tempString);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, expectedSize);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public boolean emptyStack() {\n return (expStack.size() == 0);\n }", "E pop() throws EmptyStackException;", "public void popAllStacks(){\n // if top is lost then all elements are lost.\n top = null;\n }", "public static void main(String[] args) {\r\n\r\n\t\tArrayStack arrst = new ArrayStack(5);\r\n\t\tIntStream.range(0, 5).forEach(arrst::push);\r\n\t\tSystem.out.println(\"Response of peek \" + arrst.peek());\r\n\t\tSystem.out.println(\"Response of pop\" + arrst.pop());\r\n\t\tSystem.out.println(\"push one random number in the middle\");\r\n\t\tarrst.push(10);\r\n\t\tSystem.out.println(\"printing stack after first pop\");\r\n\t\tarrst.display();\r\n\r\n\t\tIntStream.range(0, arrst.size()).forEach(i -> arrst.pop());\r\n\r\n\t\tSystem.out.println(\"isEmpty after poping all the elements ???\" + arrst.isEmpty());\r\n\r\n\t\tarrst.display();\r\n\r\n\t}", "public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }", "@Test\n public void testPushPop(){\n ms=new MyStack();\n ms.push(2);\n ms.pop();\n assertTrue(ms.IsEmpty());\n }", "public boolean isEmpty()\n {\n return stack.size() == 0;\n }", "@Test\n public void pushOnStackTest_InCorrect(){\n assertNotEquals(10 , stack.getStack().returnFirst());\n }", "public static void main(String[] args) throws Exception {\n StackUsingArrays stack=new StackUsingArrays(5);\n \n for(int i=1;i<=5;i++) {\n \tstack.push(i*10);\n \tstack.display();\n }\n \n System.out.println(stack.size());\n \n //stack.push(60);\n System.out.println(stack.top());\n \n// while(!stack.isEmpty()) {\n// \tstack.display();\n// \tstack.pop();\n// \t\n// }\n// \n// stack.pop();\n\t}", "@Test\n public void isEmptyTest() {\n ResourceStack stack5 = new ResourceStack(1,0,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,1,0,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,1,0);\n assertFalse(stack5.isEmpty());\n stack5 = new ResourceStack(0,0,0,1);\n assertFalse(stack5.isEmpty());\n\n stack5 = new ResourceStack(0,0,0,0);\n assertTrue(stack5.isEmpty());\n }", "@Test\r\n public void testStackstack() {\r\n StackArrayList<Integer> stack = new StackArrayList<Integer>();\r\n\r\n stack.push(1);\r\n stack.push(2);\r\n stack.push(3);\r\n stack.push(4);\r\n stack.push(5);\r\n\r\n assertEquals(5, stack.peek());\r\n assertEquals(5, stack.pop());\r\n assertEquals(4, stack.size());\r\n }", "private static boolean isStackEmpty(SessionState state)\n\t{\n\t\tStack operations_stack = (Stack) state.getAttribute(STATE_SUSPENDED_OPERATIONS_STACK);\n\t\tif(operations_stack == null)\n\t\t{\n\t\t\toperations_stack = new Stack();\n\t\t\tstate.setAttribute(STATE_SUSPENDED_OPERATIONS_STACK, operations_stack);\n\t\t}\n\t\treturn operations_stack.isEmpty();\n\t}", "@Test /*Test 18 - implemented isEmpty() method to NumStack class. Refactored isEmpty() to now \n call the size() method of the Stack object in NumStack to determine if it is empty, rather than \n always returning true.*/\n public void testIsEmpty() {\n assertTrue(\"NumStack object should be empty after creation\", numStackTest.isEmpty());\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public MinStack1() {\r\n stack = new Stack<>();\r\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() {\n return stack.empty();\n }", "@SubL(source = \"cycl/stacks.lisp\", position = 1928) \n public static final SubLObject clear_stack(SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_num(stack, ZERO_INTEGER);\n _csetf_stack_struc_elements(stack, NIL);\n return stack;\n }", "public MinStack() {\n st = new Stack<>();\n }", "public Stack() {}", "public void traverseStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(this.topOfStack==-1){\n System.out.println(\"Stack is empty, can't traverse\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Printing stack...\");\n for(int i=0;i<=this.topOfStack;i++){\n System.out.print(this.arr[i]+\" \");\n }\n System.out.println();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public StackUnderflowException(){\n super(\"Can not pop from an empty stack\");\n }", "public void pop(){\n \n if(top==null) System.out.println(\"stack is empty\");\n else top=top.next;\n \t\n }", "public void printStack(){\n Stack<Integer> tempStack = new Stack<>();\n if (numStack.empty()==true){\n System.out.println(Integer.MIN_VALUE);\n }\n else{\n while (numStack.empty() == false){\n tempStack.push(numStack.peek());\n numStack.pop();\n }\n while (tempStack.empty() == false){\n int i = tempStack.peek();\n System.out.println(i);\n tempStack.pop();\n numStack.push(i);\n } \n }\n }", "public void peek(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // check if stack is empty\n if(topOfStack==-1){\n System.out.println(\"Stack is empty, can't peek\");\n return;\n }\n // if stack is not empty\n System.out.println(\"Top of the stack: \"+this.arr[this.topOfStack]);\n }", "private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}", "@Test /*Test 21 - the pop() method now throws the EmptyStackException if it is called when \n the stack size is currently 0.*/\n public void testPopEmptyStackException() throws EmptyStackException, BadTypeException {\n exception.expect(EmptyStackException.class);\n exception.expectMessage(\"The stack is empty. No element can be removed.\");\n numStackTest.pop();\n }", "public static void main(String[] args) {\n Stack<Integer> st = new Stack<Integer>();\n System.out.println(\"push\"+st.push(2));\n st.push((54));\n st.push(10);\n System.out.println(\"pop \"+st.pop());\n System.out.println(st.peek());\n System.out.println(st.isEmpty());\n \n System.out.println(\"----\");\n \n Queue<Integer> qu = new LinkedList<Integer>();\n System.out.println(qu.isEmpty());\n System.out.println(qu.add(5));\n System.out.println(qu.add(12));\n System.out.println(qu.size());\n qu.clear();\n System.out.println(qu.size());\n \n }", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "public void clearStack() {\n\n\t\tNode<T> current = getTopNode();\n\n\t\twhile (current != null) {\n\t\t\tpop();\n\t\t\tcurrent = current.nextNode;\n\t\t}\n\n\t\tSystem.out.println(\"\\n*****************\");\n\t\tSystem.out.println(\" STACK CLEARED!! \");\n\t\tSystem.out.println(\"*****************\");\n\t}", "@Test\n public void testSingleStack() {\n ProgramStack ps = new ProgramStack();\n\n ps.push(1);\n\n Assert.assertEquals(\"[1]\", ps.toString());\n }", "public MinStack() {\n size = 0;\n }", "public boolean isCarStackEmpty() {\n boolean carStackEmpty = false;\n if(top < 0) {\n carStackEmpty = true;\n }\n return carStackEmpty;\n }", "@Test\r\npublic void testTop()\r\n{\n\tassertEquals(null,myStack.top());\r\n\r\n\tassertEquals(true, myStack.push(new Element(2,\"Basel\")));\t\r\n\tassertEquals(true, myStack.push(new Element(4,\"Wil\")));\t\r\n\tassertEquals(true, myStack.push(new Element(27,\"Chur\")));\r\n\tassertEquals(27,myStack.top().getId());\r\n\tassertEquals(27,myStack.pop().getId());\r\n\tassertEquals(4,myStack.top().getId());\r\n\tassertEquals(4,myStack.pop().getId());\r\n\tassertEquals(2,myStack.pop().getId());\r\n\t\r\n\t// Stack leer\r\n\tassertEquals(null,myStack.top());\r\n\r\n}", "void clear() {\n stacks.clear();\n }", "public void testPop() {\n Exception exception = null;\n try {\n this.empty.pop();\n }\n catch (Exception e) {\n exception = e;\n }\n assertNotNull(exception);\n assertTrue(exception instanceof EmptyStackException);\n\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.pop();\n assertEquals(this.stack.size(), 9, 0.01);\n assertEquals(this.stack.peek(), 8, 0.01);\n }", "public static void main(String[] args) {\n\t\tStack stack = new Stack(3);\n\t\tSystem.out.println(\"Is stack empty ? - \" + isEmpty(stack));\n\t\tpush(stack, 10);\n\t\tpush(stack, 20);\n\t\tpush(stack, 30);\n\t\tpush(stack, 40);\n\t\tfor(int i = 0; i <= stack.top; i++){\n\t\t\tSystem.out.print(stack.list[i] + \" -\");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"No of element in stack - \"+(stack.top +1));\n\t\twhile(!isEmpty(stack)){\n\t\t\tSystem.out.println(\"Poping ...\"+ pop(stack));\n\t\t}\n\t}", "public boolean empty() {\n return stack1.empty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\tif(topIndex == stack.length -1) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean empty() {\n return stack.isEmpty();\n }", "public Stack() {\r\n first = null;\r\n N = 0;\r\n }", "public SimpleStackOnLL() {\n\t\tthis.top = null;\n\t\tthis.size = 0;\n\t}", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public Stack() {\n stack = new Object[1];\n minStackSize = 1;\n top = -1;\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\t\treturn stack.size() == size;\r\n\t}", "@Test /*Test 19 - implemented push() method to NumStack class.*/\n public void testPush() {\n numStackTest.push(5);\n assertFalse(\"NumStack object shouldn't be empty after pushing first entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(10);\n assertFalse(\"NumStack object shouldn't be empty after pushing second entry onto it\", \n numStackTest.isEmpty());\n numStackTest.push(15);\n assertFalse(\"NumStack object shouldn't be empty after pushing third entry onto it\", \n numStackTest.isEmpty());\n }", "@Test\n public void testPushAndPopC() {\n\n System.out.println(\"pushB - All Nulls\");\n String elementOne = null;\n String elementTwo = null;\n String elementThree = null;\n String elementFour = null;\n\n //Stack<String> instance = new StackArrayImpl();\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n instance.push(elementOne);\n instance.push(elementTwo);\n instance.push(elementThree);\n instance.push(elementFour);\n\n int fourSize = instance.size();\n assertEquals(fourSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String resultFour = instance.pop();\n String resultThree = instance.pop();\n String resultTwo = instance.pop();\n String resultOne = instance.pop();\n\n assertEquals(elementOne, resultOne);\n assertEquals(elementTwo, resultTwo);\n assertEquals(elementThree, resultThree);\n assertEquals(elementFour, resultFour);\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "public boolean empty() {\n\t\tif(stackTmp.isEmpty() && stack.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "@Test\r\n public void testPopShouldReturnObjectWhenStackNotEmpty() {\r\n stackInstance=new StackUsingLinkedList<Integer>();\r\n stackInstance.push(49);\r\n stackInstance.push(57);\r\n stackInstance.push(2);\r\n Integer actualOutput=stackInstance.pop();\r\n Integer expectedOutput=2;\r\n assertEquals(expectedOutput,actualOutput);\r\n }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public static void main(String[] args) {\n java.util.Stack<String> stack = new java.util.Stack<String>();\n stack.push(\"a\");\n stack.push(\"b\");\n stack.push(\"c\");\n stack.push(\"d\");\n System.out.println(stack.size()); //=> 4\n // bottom of stack at 0\n // top of stack at length-1\n System.out.println(stack.get(1)); //=> \"b\"\n }", "public Stack() {\n\t\t \n\t\ttop = null;\n\t}", "public void testMyStack() {\n\t\tMyStack<String> s = new MyStack<String>();\n\t\ts.push(\"1\");\n\t\ts.push(\"2\");\n\t\ts.push(\"3\");\n\t\ts.pop();\n\t\ts.push(\"4\");\n\t\ts.toString();\n\t\tSystem.out.println(\"MyStack size is: \" + s.size());\n\t}", "@Override\r\n\tpublic T pop() throws StackEmptyException {\n\t\tif(isempty()) { throw new StackEmptyException(\"Pila vacia!!\");}\r\n\t\treturn pop(sentinel);\r\n\t\t\r\n\t}", "private List<ThroughNode> popStackStackForward() {\n List<ThroughNode> popped = nodeStackStack.peek();\n nodeStackStack.push(C.tail(popped));\n return popped;\n }", "@Test\n\tpublic void testPush(){\n\t\tArrayIntStack stack = buildStack(4);\n\t\tassertEquals(4, stack.intCol.size());\n\t}", "@Test\n public void pushOnStackTest_Correct(){\n assertEquals(stack.getTop().getData() , stack.getStack().returnFirst());\n }", "public interface Stack<E> {\r\n \r\n /** \r\n * Pre: Se ingresa el dato\r\n * @param data se ingresa un dato para agregar al Vector\r\n * Post: Se guarda el dato en Stack\r\n */\r\n public void push(E data);\r\n\r\n /** \r\n * Pre: Estan todos los datos en el Stack\r\n * @return E se regresa un item.\r\n * Post: Se regresa y elimina un dato del Stack\r\n */\r\n public E pop();\r\n\r\n /** \r\n * Pre: Se encuentra el Stack con sus datos\r\n * @return E se regresa cualquier tipo de dato\r\n * @throws EmptyStackException regresa un error\r\n * Post: Se regresa el dato sobre la lista\r\n */\r\n public E peek();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack\r\n * @return boolean se regresa un valor True o False\r\n * Post: Si el Stack se encuentra vacio este regresa True\r\n */\r\n public boolean empty();\r\n\r\n /** \r\n * Pre:Se encuentra el Stack \r\n * @return int se regrea cualquier numero\r\n * Post: Se devuelve el numero de objetos que tiene el Stack\r\n */\r\n public int size();\r\n\r\n}", "public GenericStack peek(){\n // checks if stack is empty\n if(top == null){\n System.out.println(\"Stack is empty.\");\n return null;\n //System.exit(0);\n }\n return top;\n }", "public interface Stack<T> extends Iterable<T> {\n\n // -----------------------\n // Base Function\n // -----------------------\n\n /**\n * push object to stack\n * @param item object, the item could be null\n */\n void push(T item);\n\n T pop();\n\n int size();\n\n boolean isEmpty();\n\n /**\n * get the last element, but not pop it\n * @return the top element\n */\n T peek();\n\n // ---------------------\n // Extend Function\n // ---------------------\n default boolean isNotEmpty() {\n return !isEmpty();\n }\n\n}", "public interface Stack<T> {\n boolean isEmpty();\n T pop();\n void push(T t);\n T getTop();\n void clear();\n int size();\n}", "public boolean empty() {\n return this.stack2.size() == 0 && this.stack1.size() == 0;\n }", "public ArrayStack(){\r\n\t\tstack= new Object[DEFAULT_SIZE];\r\n\t\t}" ]
[ "0.792486", "0.75264376", "0.75205266", "0.74435675", "0.7302112", "0.7281336", "0.7220552", "0.70778334", "0.7071724", "0.7058417", "0.7047124", "0.7029159", "0.70184773", "0.7010734", "0.69947946", "0.6985023", "0.69393593", "0.69120246", "0.6891075", "0.68805367", "0.68728703", "0.686616", "0.6862508", "0.68613154", "0.6857986", "0.685549", "0.6833863", "0.6813662", "0.6811762", "0.6792719", "0.67903996", "0.6781545", "0.6780382", "0.67722636", "0.673909", "0.67355424", "0.6732832", "0.6727653", "0.67233163", "0.6708132", "0.6699284", "0.6696627", "0.6695034", "0.66713005", "0.66691923", "0.66689825", "0.6648256", "0.66425854", "0.66402715", "0.66387177", "0.66255486", "0.6621778", "0.6620108", "0.6614004", "0.66123044", "0.66076595", "0.660688", "0.66017604", "0.6601187", "0.6601103", "0.6597777", "0.659703", "0.6595876", "0.6588694", "0.6582343", "0.6581598", "0.658147", "0.6578726", "0.6573227", "0.6561864", "0.6549752", "0.6547302", "0.6534488", "0.6533385", "0.6529098", "0.6526724", "0.651858", "0.651858", "0.6515335", "0.6515214", "0.65148556", "0.650909", "0.64959735", "0.6479994", "0.64785635", "0.64752007", "0.64734924", "0.64664006", "0.64593315", "0.64578986", "0.6456014", "0.64553314", "0.6448795", "0.6445876", "0.64371175", "0.64363444", "0.64306575", "0.6419943", "0.64177996", "0.64174414" ]
0.6882353
19
return car without Dealer and mark
private Car extractCar(Node carNode) throws DataProviderException { String pageId = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PAGE_ID); String model = StringEscapeUtils.unescapeHtml4(getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL)); if (model == null || model.isEmpty()) { model = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MODEL_PROMOTED); } String mileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE); if (mileage == null || mileage.isEmpty()) { mileage = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.MILEAGE_PROMOTED); } String year = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR); if (year == null || year.isEmpty()) { year = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.YEAR_PROMOTED); } String price = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE); if (price == null || price.isEmpty()) { price = getXpathEvaluator().evaluateXpathString(carNode, CarXpath.PRICE_PROMOTED); } Car result = new Car(); result.setPageId(pageId); result.setModel(model); result.setMileage(mileage); result.setYear(year); try { String[] priceSplitted = price.split(" "); result.setPrice(priceSplitted[0]); result.setPriceCurrency(priceSplitted[1]); } catch (Exception e) { result.setPrice(price); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public tT CAR()\r\n\t{\r\n\t\treturn car;\r\n\t}", "public abstract java.lang.String getNovedad();", "public String getCarCode()\r\n {\r\n return carCode;\r\n }", "public String getCarNo() {\n return carNo;\n }", "public boolean hasCar() {\n return dataBodyCase_ == 4;\n }", "public long getCar() {\r\n return car;\r\n }", "public boolean hasCar() {\n return dataBodyCase_ == 4;\n }", "@Override\r\n\tpublic String detailDeal() {\n\t\treturn null;\r\n\t}", "@Override public String getCarne(){\n return \"salchicha y jamón \";\n }", "public Car(String description)\r\n {\r\n this.description = description;\r\n customersName = \"\";\r\n }", "public com.zzsong.netty.protobuff.two.ProtoData.Car getCar() {\n if (carBuilder_ == null) {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n } else {\n if (dataBodyCase_ == 4) {\n return carBuilder_.getMessage();\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }\n }", "@Override\n public List<ICrosser> getCrossersOnLeftBank() {\n return null;\n }", "public void wash (Car car) {\r\n // stub\r\n }", "public Carro getCarro() {\n return carro;\n }", "public String getCarorigin() {\n return carorigin;\n }", "public static String getCarDetails(Car car) {\n\n if (car.getMake() == null || car.getModel() == null || car.getYear() == null || car.getColor() == null) {\n return \"Not able to provide details\";\n }\n\n return String.format(\"%s %s %s %s\", car.getColor(), car.getYear(), car.getMake(), car.getModel());\n\n }", "public com.zzsong.netty.protobuff.two.ProtoData.Car getCar() {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }", "public List<Car> getCars() {\n List<Car> cars = new ArrayList<>();\n\n for (Car car : DatabaseManager.getCars()) {\n if (!car.isReserved()) {\n cars.add(car);\n }\n }\n\n return cars;\n }", "@Override\n public List<ICrosser> getCrossersOnRightBank() {\n return null;\n }", "public ArrayList<Chambre> chambresNonVides() {\n\t\tArrayList<Chambre> chambreRes = new ArrayList<Chambre>();\n\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\tif(chambre.isReserve()) {\n\t\t\t\tchambreRes.add(chambre);\n\t\t\t}\n\t\t}\n\t\treturn chambreRes;\n\t}", "public String getCarmake()\n {\n return carmake;\n }", "teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCaz();", "teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCaz();", "public String getCarteName() {\n return carteName;\n }", "public String getCarmodel()\n {\n return carmodel;\n }", "public Car() {\n\t\t\tmake = \"GM\";\n\t\t\tyear = 1900;\n\t\t\tmileage= 0;\n\t\t\tcarCost = 0;\n\t\t}", "public Builder clearCar() {\n if (carBuilder_ == null) {\n if (dataBodyCase_ == 4) {\n dataBodyCase_ = 0;\n dataBody_ = null;\n onChanged();\n }\n } else {\n if (dataBodyCase_ == 4) {\n dataBodyCase_ = 0;\n dataBody_ = null;\n }\n carBuilder_.clear();\n }\n return this;\n }", "private CarRental() {\r\n\t\tcompanyCars = new ArrayList<InterfaceAbstractCar>();\r\n\t\trentDetails = new HashMap<DriversLicense, InterfaceAbstractCar>();\r\n\t}", "public String getCarteDescribe() {\n return carteDescribe;\n }", "public String getCarNo() {\n\t\treturn carNo;\n\t}", "@Override\n\tpublic String getExtrCode() {\n\t\treturn null;\n\t}", "public void removeCar(Car usedCar) {\n boolean wasRemoved = cars.remove(usedCar);\n // subtracts usedCar value to adjust totalValue if car removed\n if (wasRemoved) {\n totalValue -= usedCar.getPrice();\n }\n else {\n System.out.println(\"Car was not in lot.\");\n }\n }", "@Override\r\n\tpublic Reservation rechercherUneDemandeAnnulation(Voyage v, Client c) {\n\t\treturn null;\r\n\t}", "@Override\n public Manufacturer getManufacturer() {\n return null;\n }", "@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}", "public Pricing checkoutVehicle(Card card) {\n return null;\n }", "@Override\n public Car removeCar() {\n Car car = null;\n if (inDock) {\n car = transporter.removeCar(true, this);\n }\n return car;\n }", "public com.trg.fms.api.Trip.Builder clearCarId() {\n carId = null;\n fieldSetFlags()[2] = false;\n return this;\n }", "static void cmc_with_car(String passed){\n\t\tCS = !CS;\n\t}", "Car readCar(String plateNo) throws CarNotFoundException;", "public CarrierEntity getCarrier();", "public DevCard giveDevCard(){\n \n return null;\n }", "public abstract void receberCarro(Carro carro);", "public String getDealMan() {\n return dealMan;\n }", "public Car()\n {\n \tsuper();\n bodyType = null;\n noOfDoors = 0;\n noOfSeats = 0;\n }", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "public Collection<String> getIncludedCarriers();", "@Override\r\n\tpublic String getdesc() {\n\t\treturn b1.getdesc() + \", Milk\";\r\n\t}", "public void carDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic List<String> findCarModel() {\n\t\tList<String> carModelInfoList = chargeCarMapper.selectCarModelInfo();\n\t\treturn carModelInfoList;\n\t}", "public InterfaceAbstractCar getDriversCar(DriversLicense dl) {\r\n\t\tif (!rentDetails.containsKey(dl))\r\n\t\t\treturn null;\r\n\t\treturn rentDetails.get(dl);\r\n\t}", "CleanPrice getCleanPrice();", "@Override\n public Set PatientsWithCaughingAndFever() {\n Set<Patient> patients = new HashSet<>();\n patientRepository.findAll().forEach(patients::add);\n Set<Patient>coughingAndFever = new HashSet<>();\n if(patients != null)\n {\n patients.forEach((patient) ->\n {\n if(patient.getPatientMedicalRecord().getSymptoms().equals(\"Coughing\") || patient.getPatientMedicalRecord().getSymptoms().equals(\"Fever\")){\n coughingAndFever.add(patient);\n }else {\n System.out.println(\"No older patients with symptoms such as caughing and fever\");\n }\n });\n }\n\n return coughingAndFever;\n }", "public Car getHead(){\n\t\treturn this.cars.get(0);\n\t}", "public String getCarid() {\n return carid;\n }", "public Vehicle getVehicle() {\n\t\treturn new Vehicle(\"越野车\",\"LSW12333\",\"通用凯迪拉克\");\r\n\t}", "public T caseCylinder(Cylinder object) {\r\n\t\treturn null;\r\n\t}", "public Vehicle getCar() {\n\t\t\treturn car;\n\t\t}", "@Override\r\n\tpublic String getDetails() {\r\n\t\tString result = \"\";\r\n\t\tresult += \"Vehicle ID: \t\t\t\" + getID() + \"\\n\" + \"Year:\t\t\t\t\" + getYear() + \"\\n\"\r\n\t\t\t\t+ \"Make:\t\t\t\t\" + getMake() + \"\\n\" + \"Model:\t\t\t\t\" + getModel() + \"\\n\"\r\n\t\t\t\t+ \"Number of seats:\t\t\" + getNumOfSeats() + \"\\n\" + \"Status:\t\t\t\t\" + getStatus() + \"\\n\"\r\n\t\t\t\t+ \"RENTAL RECORD:\t\t\" + \"\\n\";\r\n\r\n\t\tList<RentalRecord> carRecorder = databaseHandle.getAllRecordsByVehicleID(ID);\r\n\t\tfor (int i = 0; i < carRecorder.size() && i < 10; i++) {\r\n\t\t\tif (i == 0 && status == Status.RENTED) {\r\n\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t\t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tresult += \"------------------------------------\" + \"\\n\";\r\n\t\t\t\tRentalRecord temp = carRecorder.get(carRecorder.size() - 1 - i);\r\n\t\t\t\tresult += \"Record ID: \t\t\t \" + temp.getId() + \"\\n\" + \"Rent date:\t \t\t \" + temp.getRentDate()\r\n\t\t\t\t\t\t+ \"\\n\" + \"Estimated Return Date: \" + temp.getEstimatedReturnDate() + \"\\n\"\r\n\t\t\t\t\t\t+ \"Actual Return Date: \" + temp.getActualReturnDate() + \"\\n\" + \"Rental Fee: \t\t\t \"\r\n\t\t\t\t\t\t+ temp.getRentalFee() + \"\\n\" + \"Late Fee: \" + temp.getLateFee() + \"\\n\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tresult += \"====================================\" + \"\\n\";\r\n\t\treturn result;\r\n\t}", "void tocar();", "public static void main(String[] args) {\n\n Car car2=new Car(\"bmw\" ,2020,250876,\"yellow\");\n\n System.out.println(car2.brand);\n System.out.println(car2.year);\n System.out.println(car2.price);\n System.out.println(car2.color);\n\n Car car3=new Car(\"toyoto\",2010,35876,\"black\");\n System.out.println(car3);//tostring\n\n Library.stars();\n car3.getCarBrandYear();\n Library.stars();\n car2.getCarBrandYear();\n\n Car car4=new Car(\"audi\",2010);\n System.out.println(car4);\n\n }", "public Object clone(){\n\t\tVehicle car;\n\t\ttry{\n\t\t\tcar = (Vehicle) super.clone();\n\t\t} catch(CloneNotSupportedException e){\n\t\t\treturn null;\n\t\t}\n\t\t\treturn car;\n\t\t}", "public com.zzsong.netty.protobuff.two.ProtoData.CarOrBuilder getCarOrBuilder() {\n if ((dataBodyCase_ == 4) && (carBuilder_ != null)) {\n return carBuilder_.getMessageOrBuilder();\n } else {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }\n }", "public Car(String licensePlate, double fuelEconomy){\n this.licensePlate = licensePlate;\n this.fuelEconomy = fuelEconomy;\n}", "public Marble getExtraMarket(){\n return market.getExtra();\n }", "@Override\n\tpublic Money costToCompany() {\n\t\treturn null;\n\t}", "java.lang.String getSeller();", "@Override\n public String toString() {\n System.out.print(\"the Reserve id:\"+getId()+\"\\t\\t\\t\");\n System.out.print(\"the Reserve Date :\"+getReservrDate()+\"\\t\\t\");\n System.out.print(\"the Reserve Price:\"+getPrice()+\"\\t\\t\\n\\n\");\n System.out.println(\"*******************************NEW RESERVATION*********************************\\n\");\n return null;\n // return \"\" + patintInfo + \", doctorInfo=\" + doctorInfo + \", id=\" + id + \", reserveDate=\" + reserveDate + \", price=\" + price + '}';\n }", "public void setCarNo(String carNo) {\n this.carNo = carNo;\n }", "private Disc() {\n super(\"\");\n barcode = \"\";\n director = \"\";\n fsk = 0;\n }", "@Override\n public String getInfo() {\n return \"Car:\\n\" + \"\\tBrand: \" + getBrand() + \"\\n\" + \"\\tModel: \" + getModel() + \"\\n\"\n + \"\\tRegistration Number: \" + getRegistrationNumber() + \"\\n\"\n + \"\\tNumber of Doors: \" + getNumberOfDoors() + \"\\n\"\n + \"\\tBelongs to \" + owner.getName() + \" - \" + owner.getAddress();\n }", "public Collection<InterfaceAbstractCar> getRentedCars() {\r\n\t\treturn rentDetails.values();\r\n\t}", "@Override\n public String getDeskripsi() {\n return deskripsi;\n }", "@Override\n public String getDeskripsi() {\n return deskripsi;\n }", "@Override\n\tpublic double getDiscount(double price) {\n\t\treturn 0;\n\t}", "public com.zzsong.netty.protobuff.two.ProtoData.CarOrBuilder getCarOrBuilder() {\n if (dataBodyCase_ == 4) {\n return (com.zzsong.netty.protobuff.two.ProtoData.Car) dataBody_;\n }\n return com.zzsong.netty.protobuff.two.ProtoData.Car.getDefaultInstance();\n }", "public String nameOfBestCustomer()\n {\n return y;\n }", "public CarReply() {\n super();\n this.nrCars = 0;\n this.carwashID = \"\";\n }", "public String getDealingInf()\n/* */ {\n/* 231 */ return this.dealingInf;\n/* */ }", "@Override\r\n\tdouble getBonificacao() {\n\t\treturn 0;\r\n\t}", "@Override\n protected ArrayList<String> generateExclusions()\n {\n ArrayList<String> retVal = new ArrayList<>();\n switch (monsterList.get(monsterList.size() - 1))\n {\n case \"Spheric Guardian\":\n retVal.add(\"Sentry and Sphere\");\n break;\n case \"3 Byrds\":\n retVal.add(\"Chosen and Byrds\");\n break;\n case \"Chosen\":\n retVal.add(\"Chosen and Byrds\");\n retVal.add(\"Cultist and Chosen\");\n break;\n }\n return retVal;\n }", "@Override\r\n\tpublic String obtenerDescripcion() {\n\t\treturn this.combo.obtenerDescripcion() + \"+ Porcion de Carne\";\r\n\t}", "@Test\r\n public void testCreateNoSpaceReceipt_givenACar_thenGiveANoSpaceReceipt() {\r\n Car mockCar = mock(Car.class);\r\n ParkingLot mockParkingLot = mock(ParkingLot.class);\r\n InOrderParkingStrategy inOrderParkingStrategy = new InOrderParkingStrategy();\r\n when(mockParkingLot.isFull()).thenReturn(true);\r\n when(mockCar.getName()).thenReturn(\"A888888\");\r\n Receipt receipt = inOrderParkingStrategy.park(Collections.singletonList(mockParkingLot),mockCar);\r\n Assert.assertEquals(ParkingStrategy.NO_PARKING_LOT,receipt.getParkingLotName());\r\n Assert.assertEquals(\"A888888\",receipt.getCarName());\r\n }", "private ICarModel ICarModel(Car car) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}", "public ContratOffreDTO getCdd(){\n\t\tcdd = null;\n\t\tList<ContratOffreDTO> l = getNomenclatureDomainService().getContrats();\n\t\tfor(ContratOffreDTO c : l){\n\t\t\tif(c.getCodeCtrl().equalsIgnoreCase(DonneesStatic.CONTRAT_OFFRE_CODE_CTRL_CDD)){\n\t\t\t\tcdd=c;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn cdd;\n\t}", "public String getBestSeller ()\n {\n return (bestSeller);\n }", "@Override\n\tpublic DealVO getDealInfo(int dNo) throws Exception {\n\t\treturn null;\n\t}", "java.lang.String getFlightCarrier();", "public String getCarriedBy() {\n return (String) getAttributeInternal(CARRIEDBY);\n }", "protected HashSet getNoDesc(){\n return tester.noDesc;\n }", "public UsedCarLot2()\n {\n cars = new ArrayList<>();\n totalValue = 0;\n }", "public ProductModel getBag(String setName) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Pricer getPricer() {\n\t\treturn null;\r\n\t}", "public String getDetailsForVehicle() throws VehicleException {\r\n\t\tif (weight == 0) {\r\n\t\t\tString thirdLine = \",\" + CLEARANCE_HEIGHT;\r\n\t\t\treturn super.getDetailsForVehicle() + thirdLine;\r\n\t\t}\r\n\t\tString tenthLine = \",\" + CLEARANCE_HEIGHT + \",\" + weight + \",\" + \",\" + category;\r\n\t\treturn super.getDetailsForVehicle() + tenthLine;\r\n\t}", "public String toString() {\r\n return \"Car with registration number: \" + super.toString();\r\n }", "RestaurantFullInfo getFullRestaurant();", "public String MuestraSoloDNI() {\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {\nMuestra=clienteDo.getDni();\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {\nMuestra=clienteAd.getDni();\n}\nreturn Muestra;\n}", "public String drive() {\n return \"Car ride\";\n }", "public void showCar(){\n for (int i=0; i<car.size(); i++){\n System.out.println((i+1) + \". \" + car.get(i).formatForBuy());\n }\n }", "@Override\n public T leaveThePlace(T carInGarage) {\n T car = null;\n boolean isCarExist = false;\n for (T eachCar : carsInGarage) {\n if (eachCar == carInGarage) {\n car = carInGarage;\n isCarExist = true;\n break;\n }\n }\n if (!isCarExist) {\n return null;\n }\n carsInGarage.remove(car);\n return (T) car;\n }" ]
[ "0.57652825", "0.5526533", "0.54816496", "0.5461447", "0.54614353", "0.5454352", "0.5447743", "0.53928894", "0.53699917", "0.53018886", "0.5293259", "0.5256674", "0.5242215", "0.52281016", "0.5215748", "0.51902956", "0.5189354", "0.5188294", "0.5177308", "0.5163128", "0.5141547", "0.51388115", "0.51388115", "0.5136627", "0.5135408", "0.51295805", "0.5101709", "0.5092867", "0.5087498", "0.50795543", "0.5072626", "0.505975", "0.5050379", "0.50466496", "0.50461304", "0.5038879", "0.5038111", "0.503229", "0.50264907", "0.5026093", "0.5021968", "0.5021656", "0.5020724", "0.5014771", "0.5003644", "0.50026995", "0.50016654", "0.49855942", "0.4981833", "0.49719", "0.49702233", "0.49686286", "0.49630028", "0.4961077", "0.49528173", "0.49504405", "0.4949479", "0.49361917", "0.4926186", "0.49124783", "0.49088198", "0.49054694", "0.4903857", "0.489209", "0.48880023", "0.48825005", "0.48805544", "0.4879423", "0.487389", "0.48722017", "0.486481", "0.48631784", "0.48631123", "0.48631123", "0.48617545", "0.48617533", "0.48476768", "0.48460612", "0.48432565", "0.4837801", "0.48352587", "0.4824545", "0.48245063", "0.48221737", "0.4815641", "0.48154512", "0.48141098", "0.48130336", "0.48116705", "0.48100647", "0.480228", "0.479647", "0.47934425", "0.4792893", "0.47888607", "0.47861475", "0.4782866", "0.47804192", "0.4780379", "0.47786874" ]
0.49415562
57
Returns the amount of outstanding async tasks to wait for.
public int asyncTaskCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getExecutorCompletedTaskCount();", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public long getPendingTasks()\n {\n return getTaskCount() - getCompletedTaskCount();\n }", "public static int getPendingRequests() {\n\t\treturn writeQueue.size() + requestsBeingSending.intValue();\n\t}", "long getExecutorTaskCount();", "long getExcutorTasksInWorkQueueCount();", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "int getNumBufferedBytes() {\n ChannelBuffer buf;\n int IOQueued;\n for (IOQueued = 0, buf = inQueueHead;\n buf != null; buf = buf.next) {\n IOQueued += buf.nextAdded - buf.nextRemoved;\n }\n return IOQueued;\n }", "public int getNumTasks() {\n return tasks.size();\n }", "int getEnqueuedBlockRequestsNumber() {\n int count = 0;\n for (StdPeerMessage pm : sendQueue) {\n if (pm.type == StdPeerMessage.REQUEST) {\n count++;\n }\n }\n return count;\n }", "public int numberOfRequestsEnqueued() {\n int totalRequests = 0;\n for (ElevatorController controller : elevatorControllers.values()) {\n totalRequests += controller.getRequestsQueue().size();\n }\n return totalRequests;\n }", "public int getRunnableCount() {\n return queue.size();\n }", "public int getTotalWait() {\n return totalWait;\n }", "public int getTasksSize() {\n return tasks.size();\n }", "public int getSize() {\n return tasks.size();\n }", "static public int getMaxAsyncPollingRetries() {\n return maxAsyncPollingRetries;\n }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "int getNumBarriers() {\n return queue.size();\n }", "public int getCachedTasksSize() {\n return cachedTasks.size();\n }", "public int getCount() {\n return sync.getCount();\n }", "int getProgressCount();", "int getProgressCount();", "int getProgressCount();", "public int size()\n {\n return tasks.size();\n }", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "long getRequestsCount();", "int getRequestsCount();", "int getRequestsCount();", "public int queueSize() {\n return executor.getQueue().size();\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "public int countList() {\n return tasks.size();\n }", "public int getSize() {\n return this.tasks.size();\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "public long getTotalUpdates() {\n return executor.getTotalUpdates();\n }", "public int waitForMessages() throws InterruptedException {\n return waitForMessages(40, null);\n }", "int getNumEvents() {\n int cnt = eventCount;\n for (Entry entry : queue) {\n cnt += entry.eventCount;\n }\n return cnt;\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 }", "@Nonnegative\n @CheckReturnValue\n public abstract int getRemainingRequests();", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "static public int getMaxMigrationAsyncPollingRetries() {\n return maxMigrationAsyncPollingRetries;\n }", "public long getPendingMessageCount() {\n return (long) this.incUpdateQueue.size();\n }", "public int getRequestsCount() {\n if (requestsBuilder_ == null) {\n return requests_.size();\n } else {\n return requestsBuilder_.getCount();\n }\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 final int getPendingCount()\n/* */ {\n/* 508 */ return this.pending;\n/* */ }", "@Override\n public int getNumIdle() {\n return _pool.size();\n }", "public int size() {\n processQueue();\n return weakCache.size();\n }", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "int getNumberOfTasksOnCriticalPath();", "public int CompletedCount() {\n \t\treturn jobcomplete.size();\n \t}", "public int getCount() {\n return queue.size();\n }", "public static int getOnGoingSends() {\n return onGoingSends.get() + sendQueue.size();\n }", "public int getWaitlistSize(){\n\t\treturn waitlistSize;\n\t}", "int getNumberOfTileDownloadThreads();", "public int getRetryWaitingCount() {\r\n return root.getRetryWaitingCount();\r\n }", "public int getNumberOfCompletedFiles() {\n return numberOfCompletedFiles;\n }", "int getExecutorActiveCount();", "public long getTaskCount() {\r\n\t\treturn taskCount;\r\n\t}", "Long getRunningCount();", "public int size() {\n return this.queue.size();\n }", "protected int numberRemainingTickets()\n\t{\n\t\treturn tickets.size();\n\t}", "public int size()\n\t{\n\t\treturn requestQueue != null ? requestQueue.size() : 0;\n\t}", "public String percentCompleteCountQATasks() {\n\t\tint fixed = closedQATasks().count();\n\t\tint total = qaTasks().count();\n\t\t\n return percentCompleteStringFromDouble(((double)fixed/(double)total) * 100);\n\t}", "public final int getDeferredRequests() {\n return deferredRequests;\n }", "public int size() {\n return _queue.size();\n }", "public int numVehiclesInQueue() {\r\n\t\treturn vehiclesInQueue.size();\r\n\t}", "@SimpleFunction(description = \"Gets number of pending\"\n + \"background uploads. Advanced feature.\")\n public int GetNumberPendingUploads() {\n return numPending; \n }", "public int sizeOfList(){\n return tasks.size();\n }", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "int getActiveBlockRequestsNumber() {\n return blockRequests.size();\n }", "final int getEstimatedSurplusTaskCount() {\n // The halving approximates weighting idle vs non-idle threads\n return (sp - base) - (pool.getIdleThreadCount() >>> 1);\n }", "public java.lang.Integer getTaskCount() {\n return taskCount;\n }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "int getNumberOfTasksDeterminingBuildDuration();", "int getTaskIdCount();", "int numOfRemainingBlocks() {\n return blocks.size();\n }", "public int UnassignedCount() {\n \t\treturn jobqueue.size();\n \t}", "public int getCount() {\n return this.tasks.size();\n }", "public int getTotalNumberOfSubtasks() {\n\t\treturn totalNumberOfSubtasks;\n\t}", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "int getReqCount();", "int numberOfWorkers();", "public int size() {\n return queue.size();\n }", "int numberOfWorkingWorkers();", "long getSpinCount();", "protected abstract int getTaskLength();", "public int queueSize() {\n\t\treturn queue.size();\t\n\t}", "static final long getTotalStartedCount()\n {\n synchronized (threadStartLock)\n {\n return totalStartedCnt;\n }\n }", "DurationTracker timeSpentTaskWait();", "public int getRequests()\n\t{\n\t\tint requests=0;\n\t\tString query=\"select count(*) from requests where status=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"Confirm\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\trequests=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn requests;\n\t}", "int getQueueSize();", "public int getTaskIdCount() {\n return taskId_.size();\n }", "Integer totalRetryAttempts();", "public int size() {\n\t\treturn queue.size();\n\t}", "public int getTotalWaitTime() {\n return totalWaitTime;\n }", "public synchronized int size() {\n return count;\n }" ]
[ "0.7301245", "0.7245701", "0.7152635", "0.69943583", "0.6806761", "0.6747815", "0.6714269", "0.66677094", "0.65712273", "0.65673417", "0.65220135", "0.64999753", "0.6462698", "0.64202625", "0.64104146", "0.63707215", "0.6349368", "0.63465136", "0.6308308", "0.6290452", "0.6280794", "0.6280794", "0.6280794", "0.6251604", "0.62313175", "0.6199558", "0.6196607", "0.6196607", "0.61364496", "0.60988194", "0.6085083", "0.60549104", "0.6045272", "0.6045136", "0.60331124", "0.60154504", "0.59846425", "0.59846425", "0.59846425", "0.5945951", "0.59283227", "0.5927199", "0.5926063", "0.591479", "0.5901194", "0.5901194", "0.5901194", "0.5900804", "0.5890392", "0.58608526", "0.58553964", "0.5843213", "0.583703", "0.5833622", "0.5820227", "0.5792304", "0.5792107", "0.5787426", "0.57819134", "0.5781388", "0.577764", "0.5759373", "0.5758983", "0.57491606", "0.57317215", "0.5725643", "0.5713761", "0.57118833", "0.57009596", "0.5700898", "0.5692571", "0.56798524", "0.5676181", "0.5654161", "0.56486344", "0.56422883", "0.563784", "0.5615683", "0.56108296", "0.56037027", "0.55977803", "0.5593562", "0.5591688", "0.5583745", "0.5582954", "0.5578022", "0.5564571", "0.5564016", "0.5562936", "0.5549807", "0.5543142", "0.55368394", "0.55346024", "0.5529345", "0.55161035", "0.5515025", "0.55014193", "0.5500851", "0.54913783", "0.54889154" ]
0.7571994
0
Unlocks one of the locked locks.
public void notifyAsyncTaskDone();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unlock() {\n setLock.unlock(this);\n }", "public void unlock(){\n logger.log(Level. INFO,\"unlock() \"+lockState+\".\");\n this.lock.lock();\n logger.log(Level. INFO,\"unlock taking mutex :\"+lockState+\".\");\n switch(this.lockState){\n \t\t\tcase RLT:\n \t\t\tlockState = State.RLC;\n \t\t\tbreak;\n \t\t\tcase WLT:\n \t\t\tlockState = State.WLC;\n \t\t\tcase RLT_WLC:\n \t\t\tlockState = State.WLC;\t\n break;\n default:\n logger.log(Level.WARNING,\"Unlock with : \"+lockState+\".\");\n break;\n \t\t}\n this.available.signal();\t\n logger.log(Level.WARNING,\"SIGNAL\");\n this.lock.unlock();\n \t}", "public void writerUnlock() throws Exception {\n\t\t// TODO\n\t\tif(holders.get() instanceof ReaderList){\n\t\t\tthrow new Exception(\"Lock was held by a reader, one should use readerUnlock()\");\n\t\t}else if(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock was not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif(((Writer)holders.get()).thread.equals(current)){\n\t\t\tholders.compareAndSet(holders.get(), null);\n\t\t}else{\n\t\t\tthrow new Exception(\"Lock was not held by this thread \");\n\t\t}\n\t}", "public void readerUnlock() throws Exception, ClassCastException {\n\t\t// TODO\n\t\tif(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock is not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tReaderList newList;\n\t\tHolders readerLock;\n\t\tdo {\n\t\t\treaderLock = holders.get(); //return the value - not the instance holders\n\t\t\tif (readerLock instanceof Writer) {\n\t\t\t\tthrow new Exception(\"Lock is not held by any reader\");\n\t\t\t}\n\t\t\tif(!((ReaderList) readerLock).contains(current)){\n\t\t\t\tthrow new Exception(\"Lock not acquired\");\n\t\t\t}\n\t\t\tnewList = ((ReaderList) readerLock).remove(current);\n\t\t} while (!holders.compareAndSet(readerLock, newList));\n\t}", "public void unlock() {\n int id = ThreadID.get();\n \n this.levels[id].set(0);\n\n }", "void unlock(Object obj, Object owner, boolean releaseMultiLocked)\r\n throws LockNotReleasedException, ClassCastException, ChannelException, LockMultiLockedException;", "public void unlock() {\n if(semaphore != null && semaphore.availablePermits() == 0) {\n semaphore.release();\n }\n }", "protected void unlock() {\n synchronized ( lock )\n {\n lock.notify();\n }\n }", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "@Override\n public void unlock() {\n Preconditions.checkState(connection != null);\n checkThread();\n unlockLatency.record(() -> {\n if (locked) {\n try {\n Transaction tnx = session.beginTransaction();\n try {\n DbLockRecord record = fetch(session, false, true);\n if (record == null) {\n throw new LockException(\n String.format(\"[%s][%s][%s] Lock record not found.\",\n id().getNamespace(), id().getName(), threadId()));\n }\n if (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0) {\n record.setLocked(false);\n record.setInstanceId(null);\n record.setTimestamp(-1);\n\n session.save(record);\n } else {\n long delta = System.currentTimeMillis() - lockedTime;\n if (delta > lockExpiryTimeout()) {\n throw new LockException(\n String.format(\"[%s][%s] Lock expired. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n locked = false;\n tnx.commit();\n } catch (Throwable t) {\n tnx.rollback();\n throw new LockException(t);\n } finally {\n locked = false;\n lockedTime = 0;\n session.clear();\n super.unlock();\n }\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n } else {\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n });\n }", "@Override\n public void unlock() {\n }", "public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }", "public void unlockExclusiveAndTakeWriteLock()\n {\n long s = initiateExclusiveLockRelease();\n long n = nextSeq( s ) - EXL_MASK + CNT_UNIT;\n unconditionallySetState( n );\n }", "public abstract void unlock();", "void lockReleased(String lock);", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "void unlock(String name) {\n executeLockFree(connection -> doUnlock(name, connection));\n }", "public abstract boolean unlock(String oid, String lockKey) throws OIDDoesNotExistException, InvalidLockException;", "protected final void unlock(boolean writeLock) {\n Lock lock = writeLock ? m_lock.writeLock() : m_lock.readLock();\n lock.unlock();\n }", "void releaseLock(QName lockQName, String lockToken);", "@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\treaders--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\n\t\t}", "public void unlock() {\n islandLocked = false;\n }", "public void unlock(int key);", "public void unlockSkill() {\n int i = 0;\n while (skills.get(i).isUnlocked()) {\n i = i + 1;\n }\n skills.get(i).unlock();\n }", "public void releaseLocks() {\n releaseLocksTo(null);\n }", "void unlock(Object obj, Object owner)\r\n throws LockNotReleasedException, ClassCastException, ChannelException;", "public void unlock() {\n try {\n if (lock != null)\n lock.release();\n if (channel != null)\n channel.close();\n }\n catch (Exception e) {\n throw new ReviewedStingException(\"An error occurred while unlocking file\", e);\n }\n }", "protected final void unlockWrite() {\n m_lock.writeLock().unlock();\n }", "public void unlock(CacheLock lock) throws LockFailedException {\n try {\n lock.unlock();\n\n } catch (Exception e) {\n throw new LockFailedException(String.format(\"Lock release for lock[%s] failed! Reason:[%s]\", lock, e.getMessage()), e);\n }\n }", "public void closeLock(){\n /*Code to send the locking signal to the physical device Gate*/\n }", "void unlockLastInode();", "void unlockWrite(long stamp);", "public void releaseLocksTo(Lock to) {\n while (nlocks > 0) {\n if (locks[nlocks - 1] == to)\n return;\n locks[--nlocks].unlock();\n }\n }", "@Override\n public void unlock(int myId) {\n Y = -1; \n flag[myId] = false;\n \n }", "private static void j_unlock() {\r\n\t\tFileChannel channel = globalFileChannel;\r\n\t\tFileLock lock = globalFileLock;\r\n\t\tglobalFileChannel = null;\r\n\t\tglobalFileLock = null;\r\n\t\ttry {\r\n\t\t\tlock.release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tchannel.close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t}", "void unlock(String resourceName) throws InterruptedException;", "public void unlock(String stateName) throws ProcessManagerException {\r\n try {\r\n State state = processModel.getState(stateName);\r\n ((UpdatableProcessInstanceManager) Workflow.getProcessInstanceManager())\r\n .unlock(currentProcessInstance, state, currentUser);\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_LOCK_FAILED\", e);\r\n }\r\n }", "@Override\r\n\tpublic boolean unlockIt() {\n\t\treturn false;\r\n\t}", "public void unlockFlush()\n {\n long s, n;\n do\n {\n s = getState();\n if ( (s & FLS_MASK) != FLS_MASK )\n {\n throwUnmatchedUnlockFlush( s );\n }\n // We don't increment the sequence with nextSeq here, because flush locks don't invalidate readers\n n = s - FLS_MASK;\n }\n while ( !compareAndSetState( s, n ) );\n }", "public long unlockExclusive()\n {\n long s = initiateExclusiveLockRelease();\n long n = nextSeq( s ) - EXL_MASK;\n // Exclusive locks prevent any state modifications from write locks\n unconditionallySetState( n );\n return n;\n }", "@Override\n\tpublic boolean unlockIt() {\n\t\treturn false;\n\t}", "public void unlock(String x)\n {\n if(x.equals(((DataStore1)ds).temp_p))\n {\n \t\tm.Unlock();\n \t\tif(((DataStore1)ds).balance > 500)\n \t\t\tm.AboveMinBalance();\n \t\telse\n \t\t\tm.BelowMinBalance();\n }\n else\n \t\tm.IncorrectUnlock();\n }", "@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twriters--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\t\t}", "public static void releaseLock(String id) {\r\n\t\t// ID normalization.\r\n\t\tString nid = normalizeID(id);\r\n\t\t// Locks JUnique.\r\n\t\tj_lock();\r\n\t\ttry {\r\n\t\t\t// Searches for the Lock instance.\r\n\t\t\tLock lock = (Lock) locks.remove(nid);\r\n\t\t\t// Is it ok?\r\n\t\t\tif (lock != null) {\r\n\t\t\t\treleaseLock(lock);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\t// Unlocks JUnique.\r\n\t\t\tj_unlock();\r\n\t\t}\r\n\t}", "private void unlock(UserInputDto inputDto) {\n // Deserialize treadmill status from token\n TreadmillStatus treadmillStatus = deserializeByToken(inputDto.getToken());\n\n // Treadmill is unlocked already\n if (TreadmillStatusEnum.UNLOCKED.getValue().equals(treadmillStatus.getLockStatus())) {\n throw new BizException(\"error.unlocked.already\", \"该跑步机已解锁\");\n }\n\n // Update treadmill status\n treadmillStatus.setAuthType(CommonConstants.DEFAULT_AUTH_TYPE);\n treadmillStatus.setLockStatus(TreadmillStatusEnum.UNLOCKED.getValue());\n treadmillStatus.setCurrentUsrId(CommonConstants.DEFAULT_USERID);\n // Unlock time\n treadmillStatus.setStartTime(new Date());\n treadmillStatus.setDuration(CommonConstants.DEFAULT_DURATION);\n\n // Update redis cache todo Not completed\n redisDbDao.setexBySerialize(TOKEN_PREFIX + inputDto.getToken(), CommonConstants.DEFAULT_DURATION, treadmillStatus);\n }", "public void unlockThreadForClient()\n {\n masterThread.unlockThreadForClient();\n }", "void unlockRead(long stamp);", "public void unlockDoor(nodePositions side) {\n lockedDoors[side.getNumVal()] = false;\n }", "protected final void unlockRead() {\n m_lock.readLock().unlock();\n }", "void m2() {\n\n boolean locked = false;\n try {\n locked = lock.tryLock(4, TimeUnit.SECONDS);\n\n //可以设置lock为可打断的\n //可以在主线程中调用interrupt方法打断,然后当做异常处理\n// lock.lockInterruptibly();\n\n System.out.println(locked);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n if (locked) lock.unlock();\n }\n }", "@Override\n\tprotected void unLockNbr() {\n\t\t\n\t}", "private void releaseGlobalLock( ConcurrentMap<Long, ForsetiLockManager.Lock> lockMap, long resourceId )\n {\n ForsetiLockManager.Lock lock = lockMap.get( resourceId );\n if( lock instanceof ExclusiveLock )\n {\n lockMap.remove( resourceId );\n }\n else if( lock instanceof SharedLock && ((SharedLock)lock).release(this) )\n {\n // We were the last to hold this lock, it is now dead and we should remove it.\n lockMap.remove( resourceId );\n }\n }", "public Locks release() {\n\t\tif( DB.getConf().getBoolean(\"locks.disabled\")) return this;\n\t\tproxy.tell( new ReleaseLock(lockId), ActorRef.noSender());\n\t\treturn this;\n\t}", "void unlockWriteInOMRequest();", "void releaseReadLock(E key);", "public void releaseLock() throws LockException {\n\t\tlong[] err = new long[1];\n\t\tDpsHelper dps = null;\n\t\t\n\t\ttry {\n\t\t\tdps = DpsHelperHolder.getDpsHelper();\n\t\t\tdps.dlReleaseLock(id, err);\n\t\t} catch(Exception e) {\n\t\t\t// Either dps cannot be initialized or releaseLock went wrong.\n\t\t\t// An error code of 65534 indicates that this error occurred inside\n\t\t\t// the dps JNI glue layer and not inside the actual lock functions.\n\t\t\tthrow new LockException(65534, e.getMessage());\n\t\t}\n\t\t\n\t\tif (err[0] != 0) {\n\t\t\tthrow new LockException(dps.dlGetLastDistributedLockErrorCode(), \n\t\t\t\t\tdps.dlGetLastDistributedLockErrorString());\n\t\t}\n\t\t\n\t\treturn;\t\n\t}", "public final void removeLock(FileLock lock)\n\t\tthrows NotLockedException {\n\t\t\t\n\t\t//\tCheck if the lock list has been allocated\n\t\t\n\t\tif ( m_lockList == null)\n\t\t\tthrow new NotLockedException();\n\t\t\t\n\t\t//\tRemove the lock from the active list\n\t\t\n\t\tsynchronized ( m_lockList) {\n\t\t\t\n\t\t\t//\tRemove the lock, check if we found the matching lock\n\t\t\t\n\t\t\tif ( m_lockList.removeLock(lock) == null)\n\t\t\t\tthrow new NotLockedException();\n\t\t}\n\t}", "private static void releaseLock(Lock lock) {\r\n\t\t// Shuts down the lock server.\r\n\t\tlock.getServer().stop();\r\n\t\t// Releases the locked resources.\r\n\t\ttry {\r\n\t\t\tlock.getLockFileLock().release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlock.getLockFileChannel().close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\t// Deletes the port file.\r\n\t\tlock.getPortFile().delete();\r\n\t\t// Deletes the lock file.\r\n\t\tlock.getLockFile().delete();\r\n\t}", "void releaseReadLock();", "void downgradeToReadLocks();", "@Override\n\t\tpublic void onUnblock(User arg0, User arg1) {\n\t\t\t\n\t\t}", "public void releaseLock() throws JedisException {\n if (fetch == true) {\n redisTemplate.delete(lockKey);\n LOGGER.info(\"release redis distribution_lock [{}] suceess \", lockKey);\n }\n }", "@Override\n\tpublic void unlock(Lock lock) {\n\t\tBluetoothLock bluetoothLock=(BluetoothLock)lock;\n\t\t\n\t\tString out=String.format(\"%s%s蓝牙开锁,搜索MAC为%s,pwd:%ssecretKey:%s\", \n\t\t\t\tbluetoothLock.getCompany(),bluetoothLock.getSysCode(),\n\t\t\t\tbluetoothLock.getMac(),bluetoothLock.getPwd(),bluetoothLock.getSecretKey());\n\t\t\n\t\tSystem.out.println(out);\n\t}", "public final void unlockObjects(ArrayList<String> ids) {\n lockedActorIDs.removeAll(ids);\n }", "private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "@Override\n\tpublic void unlock() {\n\t\tSystem.out.println(\"Card in ATM1 is unlocked !\");\n\t}", "public void releaseLock(LockedDocument lockedDoc) {\n try {\n \tservice.releaseLock(lockedDoc);\n \tmObjects.addStatusList(\"Document lock released.\");\n } catch (InvalidRequest e) {\n \tmObjects.addStatusList(\"Error saving document: \" + e.getMessage());\n \tToast.makeText(this, \"Error releasing document due to invalid request\", \n Toast.LENGTH_LONG).show();\n } catch (LockExpired e) {\n \tmObjects.addStatusList(\"Lock had already expired; release failed.\");\n \tToast.makeText(this, \"Lock expired\", Toast.LENGTH_LONG).show();\n }\n }", "void unlock(Portal portal);", "private void basicReleaseLock() {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[DLockToken.basicReleaseLock] releasing ownership: {}\",\n this);\n }\n\n leaseId = -1;\n lesseeThread = null;\n leaseExpireTime = -1;\n thread = null;\n recursion = 0;\n ignoreForRecovery = false;\n\n decUsage();\n }", "public void releaseDeferredLock() {\r\n return;\r\n }", "public void wifiLockUnlock(Context context, boolean unlock)\n {\n\n WifiManager.WifiLock wifiLock = ((WifiManager) context.getSystemService(Context.WIFI_SERVICE))\n .createWifiLock(WifiManager.WIFI_MODE_FULL, \"radioLock\");\n\n if (unlock) {\n if (wifiLock.isHeld()) {\n wifiLock.release();\n }\n } else {\n wifiLock.acquire();\n }\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "public void unlockBack()\n {\n m_bBackLock = false;\n }", "Lock getLock(String lockName);", "void disposeLocked() {\n ArrayList<UpdateRecord> records = mRecordsByProvider.get(this.mProvider);\n records.remove(this);\n }", "public void unlockGarage()\n {\n m_bGarageLock = false;\n }", "private void pollAllUnlockedDoorsOnThisTile() {\n/* 1234 */ if (this.unlockedDoors != null && this.unlockedDoors.size() > 0)\n/* */ {\n/* 1236 */ for (Iterator<Door> it = this.unlockedDoors.iterator(); it.hasNext();) {\n/* */ \n/* 1238 */ if (((Door)it.next()).pollUnlocked()) {\n/* 1239 */ it.remove();\n/* */ }\n/* */ } \n/* */ }\n/* 1243 */ if (this.unlockedDoors != null && this.unlockedDoors.isEmpty()) {\n/* 1244 */ this.unlockedDoors = null;\n/* */ }\n/* */ }", "void lockExpired(String lock);", "void lock();", "public void removeLock(DedupFileLock lock) {\n\t\tif (SDFSLogger.isDebug())\n\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\"removelock \" + df.getMetaFile().getPath());\n\t\tlock.release();\n\t\tdf.removeLock(lock);\n\t}", "public interface LockManager {\r\n \r\n /**\r\n * Obtain lock on <code>obj</code> for specified <code>owner</code>.\r\n * Implementation should try to obtain lock few times within the\r\n * specified timeout.\r\n *\r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n * @param timeout maximum time that we grant to obtain a lock.\r\n *\r\n * @throws LockNotGrantedException if lock is not granted within\r\n * specified period.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n */\r\n void lock(Object obj, Object owner, int timeout)\r\n throws LockNotGrantedException, ClassCastException, ChannelException;\r\n\r\n /**\r\n * Release lock on <code>obj</code> owned by specified <code>owner</code>.\r\n *\r\n * since 2.2.9 this method is only a wrapper for \r\n * unlock(Object lockId, Object owner, boolean releaseMultiLocked).\r\n * Use that with releaseMultiLocked set to true if you want to be able to\r\n * release multiple locked locks (for example after a merge)\r\n * \r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n *\r\n * @throws LockOwnerMismatchException if lock is owned by another object.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n */\r\n void unlock(Object obj, Object owner)\r\n throws LockNotReleasedException, ClassCastException, ChannelException;\r\n\r\n /**\r\n * Release lock on <code>obj</code> owned by specified <code>owner</code>.\r\n *\r\n * @param obj obj to lock, usually not full object but object's ID.\r\n * @param owner object identifying entity that will own the lock.\r\n * @param releaseMultiLocked force unlocking of the lock if the local\r\n * lockManager owns the lock even if another lockManager owns the same lock\r\n *\r\n * @throws LockOwnerMismatchException if lock is owned by another object.\r\n *\r\n * @throws ClassCastException if <code>obj</code> and/or\r\n * <code>owner</code> is not of type that implementation expects to get\r\n * (for example, when distributed lock manager obtains non-serializable\r\n * <code>obj</code> or <code>owner</code>).\r\n * \r\n * @throws ChannelException if something bad happened to communication\r\n * channel.\r\n * \r\n * @throws LockMultiLockedException if the lock was unlocked, but another\r\n * node already held the lock\r\n */\r\n void unlock(Object obj, Object owner, boolean releaseMultiLocked)\r\n throws LockNotReleasedException, ClassCastException, ChannelException, LockMultiLockedException;\r\n\r\n \r\n}", "public void releaseReadLock() {\r\n return;\r\n }", "void downgradeDatasetLockToExclusiveModify(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;", "private boolean releaseLocalLock( Locks.ResourceType type, long resourceId, PrimitiveLongIntMap localLocks )\n {\n int lockCount = localLocks.remove( resourceId );\n if(lockCount == -1)\n {\n throw new IllegalStateException( this + \" cannot release lock that it does not hold: \" +\n type + \"[\" + resourceId + \"].\" );\n }\n\n if(lockCount > 1)\n {\n localLocks.put( resourceId, lockCount-1 );\n return true;\n }\n return false;\n }", "void clearSoftLock(SoftLock softLock);", "public Lock getLock();", "private PluginResult releaseWakeLock() {\n PluginResult result = null;\n\n if( this.wakeLock != null ) {\n this.wakeLock.release();\n this.wakeLock = null;\n\n result = new PluginResult(PluginResult.Status.OK, \"OK\");\n }\n else {\n result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, \"No WakeLock active - acquire first\");\n }\n\n return result;\n }", "public void service(HttpServletRequest request,\r\n HttpServletResponse response, DavisSession davisSession)\r\n throws ServletException, IOException {\r\n LockManager lockManager = getLockManager();\r\n if (lockManager == null) {\r\n response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED,\r\n DavisUtilities.getResource(DefaultUnlockHandler.class,\r\n \"noLockManager\", null, request.getLocale()));\r\n return;\r\n }\r\n IRODSFile file = getIRODSFile(request, davisSession);\r\n Log.log(Log.DEBUG, \"UNLOCK Request for resource \\\"{0}\\\".\", file);\r\n int result = checkLockOwnership(request, file);\r\n if (result != HttpServletResponse.SC_OK) {\r\n response.sendError(result);\r\n return;\r\n }\r\n result = checkConditionalRequest(request, davisSession, file);\r\n if (result != HttpServletResponse.SC_OK) {\r\n response.setStatus(result);\r\n response.flushBuffer();\r\n return;\r\n }\r\n String lockToken = request.getHeader(\"Lock-Token\");\r\n if (lockToken == null || !((lockToken = lockToken.trim()).startsWith(\r\n \"<\") && lockToken.endsWith(\">\"))) {\r\n Log.log(Log.INFORMATION,\r\n \"Invalid lock token presented to UNLOCK: {0}\", lockToken);\r\n response.setStatus(HttpServletResponse.SC_BAD_REQUEST);\r\n response.flushBuffer();\r\n return;\r\n }\r\n lockToken = lockToken.substring(1, lockToken.length() - 1);\r\n try {\r\n lockManager.unlock(file, getPrincipal(request), lockToken);\r\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\r\n } catch (LockException ex) {\r\n response.setStatus(ex.getStatus());\r\n }\r\n response.flushBuffer();\r\n }", "void lockGranted(LockHandle lockHandle);", "public void onUnblock();", "@Override\n public void onUnlock(Myo myo, long timestamp) {\n //mLockStateView.setText(R.string.unlocked);\n }", "@Override\n public void releaseAll()\n {\n for ( int i = 0; i < exclusiveLockCounts.length; i++ )\n {\n PrimitiveLongIntMap exclusiveLocks = exclusiveLockCounts[i];\n PrimitiveLongIntMap sharedLocks = sharedLockCounts[i];\n\n // Begin releasing exclusive locks, as we may hold both exclusive and shared locks on the same resource,\n // and so releasing exclusive locks means we can \"throw away\" our shared lock (which would normally have been\n // re-instated after releasing the exclusive lock).\n if(exclusiveLocks != null)\n {\n int size = exclusiveLocks.size();\n exclusiveLocks.visitKeys( releaseExclusiveAndClearSharedVisitor.initialize( sharedLocks, lockMaps[i] ));\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n exclusiveLocks.clear();\n }\n else\n {\n exclusiveLockCounts[i] = Primitive.longIntMap();\n }\n }\n\n // Then release all remaining shared locks\n if(sharedLocks != null)\n {\n int size = sharedLocks.size();\n sharedLocks.visitKeys( releaseSharedDontCheckExclusiveVisitor.initialize( lockMaps[i] ) );\n if(size <= 32)\n {\n // If the map is small, its fast and nice to GC to clear it. However, if its large, it is\n // 1) Faster to simply allocate a new one and\n // 2) Safer, because we guard against clients getting giant maps over time\n sharedLocks.clear();\n }\n else\n {\n sharedLockCounts[i] = Primitive.longIntMap();\n }\n }\n }\n }", "public void openLock(){\n /*Code to send an unlocking signal to the physical device Gate*/\n }", "public abstract void Unlock(long offset, long len)\n\t\tthrows IOException, SMBException;", "@Override\r\n\tpublic void onLock(boolean lock) {\n\t\tthis.lock = lock;\r\n\t}", "synchronized public void wrlock() {\n long tid = Thread.currentThread().getId();\n\n // Place myself on queue\n writersQueue.enq(tid);\n\n // While its not my turn, wait\n while (writersQueue.getFirstItem() != tid\n \t\t|| activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n }\n\n // Its my turn, remove myself from queue\n writersQueue.deq();\n\n // DEBUG\n if (activeWriter == true\n \t\t|| activeReaders > 0\n \t\t|| (bias == 'R' && readersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN WRITER\");\n }\n\n // I am now an active writer!\n activeWriter = true;\n\t}", "public final void release() {\n explicitlyLocked = false;\n byteBase.unlock();\n }", "private static void grant( String lockId ) {\n\t\tSemaphore s = threadPark.get( lockId );\n\t\tif( s != null ) {\n\t\t\ts.release();\n\t\t} else {\n\t\t\tlog.warn( \"Got a lock that nobody wanted ... \");\n\t\t\t// need to release it\n\t\t\tproxy.tell( new ReleaseLock(lockId), ActorRef.noSender());\n\t\t}\n\t}", "private void unlock(APDU apdu) {\r\n\t\tcheckState(STATE_PIN_LOCKED);\r\n\t\tapdu.setIncomingAndReceive();\r\n\t\t// must be secured\r\n\t\tif (!apdu.isSecureMessagingCLA())\r\n\t\t\tISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);\r\n\t\t// Secured\r\n\t\tprocessSecureMessage(apdu);\r\n\t\t// updating PIN. mPIN transitions to ACTIVE state\r\n\t\tmPIN.update(apdu.getBuffer(), apdu.getOffsetCdata(),\r\n\t\t\t\t(byte) apdu.getIncomingLength());\r\n\t\t// Applet transitions to PERSONALIZED state\r\n\t\tstate = STATE_PERSONALIZED;\r\n\t}", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "@KeepForSdk\n public void release() {\n if (this.zzm.decrementAndGet() < 0) {\n Log.e(\"WakeLock\", String.valueOf(this.zze).concat(\" release without a matched acquire!\"));\n }\n String zza = zza(null);\n synchronized (this.zza) {\n if (this.zzi) {\n int i;\n Integer[] numArr = (Integer[]) this.zzj.get(zza);\n if (numArr != null) {\n if (numArr[0].intValue() == 1) {\n this.zzj.remove(zza);\n i = 1;\n } else {\n numArr[0] = Integer.valueOf(numArr[0].intValue() - 1);\n }\n }\n i = 0;\n }\n if (!this.zzi) {\n }\n }\n zza(0);\n }" ]
[ "0.76241434", "0.7173186", "0.7050791", "0.681688", "0.6783576", "0.6776072", "0.676939", "0.6747699", "0.6694396", "0.6680841", "0.66747296", "0.660895", "0.6571408", "0.6565056", "0.6560789", "0.6546235", "0.6537519", "0.65253884", "0.65036154", "0.6390999", "0.63176435", "0.6298401", "0.62610537", "0.6258264", "0.6109383", "0.61031884", "0.6095482", "0.6039515", "0.5989204", "0.5984963", "0.59752375", "0.59669954", "0.5965033", "0.5945985", "0.58905053", "0.5825335", "0.58182126", "0.58143514", "0.58082247", "0.579754", "0.5759073", "0.57515734", "0.5745926", "0.5742641", "0.5700859", "0.56775844", "0.5672844", "0.5655115", "0.5654144", "0.5631191", "0.5629243", "0.56278914", "0.5620718", "0.56028056", "0.55991185", "0.5571278", "0.55622077", "0.55328256", "0.55268914", "0.5522309", "0.55210257", "0.5492715", "0.5481495", "0.5471491", "0.5463276", "0.5460392", "0.5450591", "0.5449659", "0.5436945", "0.5424605", "0.5411298", "0.5408428", "0.53947544", "0.53824556", "0.53554994", "0.5352868", "0.5351184", "0.5347412", "0.5344634", "0.53435475", "0.53399724", "0.53387564", "0.5334798", "0.53336513", "0.5333647", "0.53055894", "0.5290518", "0.5285665", "0.5268352", "0.5254823", "0.52445203", "0.52353036", "0.5234665", "0.5216972", "0.5212183", "0.52119666", "0.52054", "0.5198265", "0.51912564", "0.51885897", "0.5165723" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
public void setUploading() { jPanel4.setVisible(false); th.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\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.createParallelGroup(\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\tAlignment.LEADING)\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.addComponent(label22,\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\tGroupLayout.PREFERRED_SIZE,\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\tGroupLayout.DEFAULT_SIZE,\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\tGroupLayout.PREFERRED_SIZE)\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.addGroup(\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\tlayout.createSequentialGroup()\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.addGap(3)\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.addComponent(\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\t\tlabel23,\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\t\tGroupLayout.PREFERRED_SIZE,\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\t\tGroupLayout.DEFAULT_SIZE,\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\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.7318655", "0.7289971", "0.7289971", "0.7289971", "0.72860885", "0.7247684", "0.7213551", "0.72080934", "0.7195069", "0.7189731", "0.7183451", "0.71579945", "0.7147311", "0.7092687", "0.70798934", "0.7055229", "0.69868284", "0.6976656", "0.6954658", "0.6952896", "0.69449455", "0.6941766", "0.6935132", "0.6930653", "0.6926533", "0.6924141", "0.6924061", "0.691111", "0.69099087", "0.6892076", "0.68916506", "0.68900466", "0.6889725", "0.68877757", "0.68822116", "0.6881593", "0.688101", "0.68768275", "0.687494", "0.68733007", "0.6870892", "0.6859287", "0.6855569", "0.68548936", "0.6854684", "0.6854257", "0.68525183", "0.6851817", "0.6851817", "0.6842853", "0.68366945", "0.68358713", "0.68282205", "0.6827655", "0.68258286", "0.68239987", "0.68230146", "0.6816489", "0.68163615", "0.68090576", "0.6808936", "0.68077636", "0.6806842", "0.6806332", "0.68016505", "0.67948395", "0.67940617", "0.67914915", "0.6789197", "0.6788211", "0.6787595", "0.67870516", "0.678107", "0.6765869", "0.67651415", "0.6764227", "0.675663", "0.67545617", "0.67512757", "0.6750906", "0.6742937", "0.6738739", "0.67365867", "0.67357975", "0.673252", "0.6726489", "0.67264307", "0.67190623", "0.6715255", "0.6713752", "0.67136234", "0.6707712", "0.67064816", "0.6703903", "0.6700871", "0.6698895", "0.6698197", "0.66973954", "0.66938066", "0.66912496", "0.66892624" ]
0.0
-1
GENFIRST:event_jButton1ActionPerformed TODO add your handling code here:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { try {int roll; String d_ob; roll = Integer.parseInt(jTextField1.getText()); d_ob = jTextField2.getText(); connect obj1 =new connect(); res = obj1.st.executeQuery("select * from studresult where RollNo = "+roll+""); res.last(); int rows = res.getRow(); if(rows>0) { res.beforeFirst(); setUploading(); jPanel4.setVisible(true); } else { jLabel16.setVisible(true); } } catch(Exception e) { JOptionPane.showMessageDialog(null,e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jButton4MouseClicked(java.awt.event.MouseEvent evt) {\n }", "public void actionPerformed(java.awt.event.ActionEvent evt) {\n if (evt.getSource() == jButton1) {\n Form1.this.jButton1ActionPerformed(evt);\n }\n }", "private void button1ActionPerformed(ActionEvent e) {\n }", "private void jfanoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField11ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton3MouseClicked(java.awt.event.MouseEvent evt) {\n }", "private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jCAreaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField6ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField12ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void t1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n }", "private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField19ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void t1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField8ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField10ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jNumHabitacionActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void splPerActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void textField1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void Button_RecipricalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_RecipricalActionPerformed\n // TODO add your handling code here:\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void txtidDemActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jMenu7ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void BanalisisActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnInventarioActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void botao_atirarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnAceptarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void uocsoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void phantichActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed\n // TODO add your handling code here:\n dispose();\n }", "private void ControlsActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void u_interestActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void funcionActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jTextField13ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jtxtIDActionPerformed(java.awt.event.ActionEvent evt) {\n \n }", "private void songuyentoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jIdFilmeActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "private void jTextFieldIDActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void cnpjFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {\n}", "private void Button_CEActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_CEActionPerformed\n // TODO add your handling code here:\n \n }", "private void jTextFieldProductNameActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void nombretxtActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jComboBox4ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void numeroDaFarmaciaEntradaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\n\t\t\t}", "private void txtNomenclaturaActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void button1MouseClicked(MouseEvent e) {\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) \n\t\t{\n\t\t\t\n\t\t}", "private void jComboBox3ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t}", "void buttonGo_actionPerformed(ActionEvent e) {\n\n\n }", "@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}" ]
[ "0.8749886", "0.8749886", "0.8749886", "0.85377127", "0.84710234", "0.84535646", "0.83879864", "0.83648056", "0.8345885", "0.8335142", "0.8258478", "0.82279325", "0.8218835", "0.81790894", "0.8130204", "0.81123257", "0.8012243", "0.8012243", "0.8012243", "0.7930663", "0.7930663", "0.7930663", "0.7930663", "0.7887432", "0.7887432", "0.7868606", "0.7859117", "0.78487813", "0.7841983", "0.7841983", "0.7839002", "0.7839002", "0.7839002", "0.7828265", "0.7828265", "0.7828265", "0.78241867", "0.781451", "0.7810363", "0.7781176", "0.77737874", "0.77737874", "0.77703965", "0.77703965", "0.7709645", "0.7650549", "0.76469564", "0.7645698", "0.7634099", "0.7612961", "0.7601835", "0.7584531", "0.75574285", "0.7550701", "0.7540904", "0.7506168", "0.75020003", "0.75020003", "0.74534565", "0.7445749", "0.74304456", "0.742942", "0.7428166", "0.74281496", "0.7423883", "0.7422475", "0.7418039", "0.7412831", "0.7399627", "0.7397865", "0.73779595", "0.73770416", "0.736079", "0.73426276", "0.73425364", "0.73425364", "0.73425364", "0.73425364", "0.73425364", "0.7296787", "0.7294615", "0.7282197", "0.7281684", "0.7279178", "0.7269027", "0.72676516", "0.7265552", "0.7254482", "0.7244421", "0.7239168", "0.72205794", "0.72203594", "0.7218203", "0.72136074", "0.7205847", "0.7191723", "0.7186264", "0.71835434", "0.71835434", "0.71835434", "0.71835434" ]
0.0
-1
Reference type in java which is similar to class it will contains abstract methods. A class will be implemented an interface interface person public void subject(); public void studentName();
public static void main(String[] args) { Javainterface e = new Javainterface(); e.studentName(); e.subject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getReferenceType();", "public interface Student {\n}", "public interface Generic extends Reference\n{\n}", "PSObject getTypeReference();", "interface people{\n void walk();\n }", "@Override\n public final boolean isReferenceType() {\n return true;\n }", "interface School\r\n{\r\n\tString sname=\"abc\";\t\r\n\r\n\tvoid display();\r\n\r\n}", "public IDatatype getReference() { \n\t\treturn myReference;\n\t}", "public abstract T ref(ID id);", "abstract public void getStudent();", "public static void main(String[] args) {\n Student student1 = new Student(10000, 20000, \"Sang\", \"Shin\", \"Good School\");\r\n \r\n // You can assign the object instance to\r\n // StudentInterface type.\r\n StudentInterface studentinterface1 = student1;\r\n \r\n // Display data from student1 and studentinterface1.\r\n // Observe that they refer to the same object instance.\r\n System.out.println(\"student1.getName() = \" + student1.getName() + \",\" +\r\n \" student1.computeTotalWealth() = \" + student1.computeTotalWealth()+ \",\" +\r\n \" student1.findSchool() = \" + student1.findSchool());\r\n \r\n System.out.println(\"studentinterface1.getName() = \" + studentinterface1.getName() + \",\" +\r\n \" studentinterface1.computeTotalWealth() = \" + studentinterface1.computeTotalWealth()+ \",\" +\r\n \" studentinterface1.findSchool() = \" + studentinterface1.findSchool());\r\n \r\n // Check of object instance that is referred by student1 and\r\n // studentinterface1 is the same object instance.\r\n boolean b1 = (student1 == studentinterface1);\r\n System.out.println(\"Do student1 and studentinterface1 point to the same object instance? \" + b1);\r\n \r\n }", "public interface Iperson {\n public void say(String str);\n}", "public interface Text {\n \n /**\n * Method find name of class which object are instance\n * @return \n */\n String getStringClass();\n\n @Override\n public String toString();\n \n \n \n}", "interface InterfaceDemo {\n int age =0; //接口中变量都是公开静态常量\n String name =null;\n abstract void aa();\n\n public abstract void display(); //接口中方法都是抽象的\n}", "public abstract byte getReferenceKind();", "interface Bank<T>{\t\t\t// here Singapore is considered as Type<T>: Bank<T>.\n\tvoid bankInfo(T ref);\t// ref is local variable of Singapore Type\n}", "public interface Type {\n\n}", "public interface Type {\n}", "public interface Shape {\n\n public void print();\n\n}", "public interface IStudent {\r\n\t\r\n\tpublic String getId();\r\n\t\r\n\tpublic void setId(String i);\r\n\t\r\n\tpublic List<Integer> generateAnswers(List<String> options, boolean multi);\r\n}", "public interface Ave {\n\n public void voar();\n\n}", "public static void main(String[] args)\r\n{\n\tInterfaceDemo obj=new InterfaceDemo();\r\n\t//3. Reference variable can be created\r\n\tInterfaceDemo obj1=new Demo();\r\n}", "interface EmployeeInfo{\n void details();\n}", "public interface ClassifierClass extends javax.jmi.reflect.RefClass {\n}", "public interface Subject {\n\n public void doSomething();\n}", "public void ref() {\n\n\t}", "public interface ReferenceHolder {\n\n /**\n * Sets the text.\n *\n * @param text the new text\n */\n void setText(String text);\n\n /**\n * Gets the current text.\n *\n * @return Returns the text.\n */\n String getText();\n\n /**\n * Gets the current {@link Diagram}.\n *\n * @return Returns the diagram.\n */\n Diagram getDiagram();\n\n /**\n * Sets the reference {@link Diagram}.\n *\n * @param reference the new reference\n */\n void setReference(Diagram reference);\n\n /**\n * Gets the reference {@link Diagram}.\n *\n * @return Returns the reference.\n */\n Diagram getReference();\n\n /**\n * Adds a {@link PropertyChangeListener}.\n *\n * @param listener the listener to add\n */\n void addPropertyChangeListener(PropertyChangeListener listener);\n\n}", "public interface borrowable {\n\n\tpublic void borrowbook();\n\n}", "public interface Expert {\n}", "public interface Animal {\n\npublic String voice();\n\n}", "public interface Person {\n\n void findLove();\n}", "public interface Subject {\n void sayHello();\n void save();\n}", "public interface Person {\n void findLove();\n}", "public interface ClassNode\n{\n}", "public abstract Object mo26777y();", "public interface simpleClassFacade\n extends org.andromda.metafacades.uml.ClassifierFacade\n{\n\n /**\n * Indicates the metafacade type (used for metafacade mappings).\n *\n * @return always <code>true</code>\n */\n public boolean issimpleClassFacadeMetaType();\n\n /**\n * \n */\n public java.util.Collection attrToPy();\n\n /**\n * \n */\n public java.util.Collection operToPy();\n\n}", "public interface RTTIClass {\n\n /**\n * Get the value of baseClass\n *\n * @return the value of baseClass\n */\n public Class getBaseClass();\n\n /**\n * Set the value of baseClass\n *\n * @param baseClass new value of baseClass\n */\n //public void setBaseClass(Class baseClass);\n\n\n /**\n * Return true if class implements interface\n */\n public boolean isInstanceOf(Class c);\n\n\n public RTTIClass getRTTIClassRoot();\n\n\n public Annotation getAnnotation(Class baseClass) throws Throwable;\n public Collection<Annotation> getAnnotations() throws Throwable;\n\n public Field getField(String name) throws Throwable;\n public Collection<Field> getFields() throws Throwable;\n\n public Method getMethod(String name, Class[] types) throws Throwable;\n public Collection<Method> getMethods() throws Throwable;\n\n\n /*\n * Info\n */\n public Collection<String> getBeanFields() throws Throwable;\n //public Collection<Method> getBeanFieldMethods() throws Throwable;\n\n\n /*\n * Select\n */\n public RTTIClass select(ClassFilter filter);\n\n \n}", "public interface AbstractC61422t9 {\n void AJZ(C61072sS v);\n}", "public abstract R createReference(T type, Object value);", "public interface Allele {\n}", "public interface Classroom {\n String getName();\n}", "public interface Subject {\n void visit();\n}", "public interface Shape {\n float getArea();\n float getPerimeter();\n void printMe();\n}", "interface Surgeon extends Doctor {\n\t\n}", "public interface Representation // C# has public abstract class\n{\n /// <summary>\n /// Creates a new type object of this representation, and\n /// associates it with the given HOW. Also sets up a new\n /// representation instance if needed.\n /// </summary>\n /// <param name=\"HOW\"></param>\n /// <returns></returns>\n RakudoObject type_object_for(ThreadContext tc, RakudoObject how);\n\n /// <summary>\n /// Creates a new instance based on the type object.\n /// </summary>\n /// <param name=\"WHAT\"></param>\n /// <returns></returns>\n RakudoObject instance_of(ThreadContext tc, RakudoObject what);\n\n /// <summary>\n /// Checks if a given object is defined.\n /// </summary>\n /// <param name=\"Obj\"></param>\n /// <returns></returns>\n boolean defined(ThreadContext tc, RakudoObject obj);\n\n /// <summary>\n /// Gets the current value for an attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n RakudoObject get_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Gets the current value for an attribute, obtained using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <returns></returns>\n RakudoObject get_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint);\n\n /// <summary>\n /// Binds the given value to the specified attribute.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, RakudoObject value);\n\n /// <summary>\n /// Binds the given value to the specified attribute, using the\n /// given hint.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <param name=\"Hint\"></param>\n /// <param name=\"Value\"></param>\n void bind_attribute_with_hint(ThreadContext tc, RakudoObject object, RakudoObject classHandle, String name, int hint, RakudoObject Value);\n\n /// <summary>\n /// Gets the hint for the given attribute ID.\n /// </summary>\n /// <param name=\"ClassHandle\"></param>\n /// <param name=\"Name\"></param>\n /// <returns></returns>\n int hint_for(ThreadContext tc, RakudoObject classHandle, String name);\n\n /// <summary>\n /// Used with boxing. Sets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_int(ThreadContext tc, RakudoObject classHandle, int Value);\n\n /// <summary>\n /// Used with boxing. Gets an integer value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n int get_int(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_num(ThreadContext tc, RakudoObject classHandle, double Value);\n\n /// <summary>\n /// Used with boxing. Gets a floating point value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n double get_num(ThreadContext tc, RakudoObject classHandle);\n\n /// <summary>\n /// Used with boxing. Sets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n void set_str(ThreadContext tc, RakudoObject classHandle, String Value);\n\n /// <summary>\n /// Used with boxing. Gets a string value, for representations that\n /// can hold one.\n /// </summary>\n /// <param name=\"Object\"></param>\n /// <param name=\"Value\"></param>\n String get_str(ThreadContext tc, RakudoObject classHandle);\n}", "public interface AbstractC00591m {\n void A9X(C0495Jm jm);\n\n void AAI(List<RG> list);\n}", "public interface RelationalClassifier extends Classifier {\r\n}", "public interface user_interface {\n public Double getCredit();\n\n\n public void setCredit(Double credit);\n\n\n public String getName();\n\n public String getType();\n\n public void setFirstName(String name);\n\n public String getSurename();\n\n public void setSurename(String surename);\n\n public String getTypeOfCar();\n\n public String getCarID();\n\n public void setTypeOfCar(String typeOfCar);\n}", "interface Employee {\n\tpublic void showEmployeeDetails();\n}", "public interface Structure {\n\n // Interface: \n // Methods are \"public abstract\"\n // Variables are \"public static final\"\n // e.e, public static final int x = 123;\n\n public abstract double totalWeight();\n boolean isBalanced();\n\n}", "public interface Phone {\n\t\n\tpublic abstract void interfaceInfo();\n\t\t//System.out.println(\"interface is a class - can't be implemented/declared only\");\n\t\n\tpublic abstract void call();\n\tpublic abstract void message();\n\tpublic abstract void camera();\n\t//we can implement these abstract methods by writing in a concrete class- or Iphone1 (see the codes in Iphone1 class)\n\t\n\tpublic default void battery() {\n\t\tSystem.out.println(\"battery is a default method from Java 1.8\");\n\t}\n\tpublic static void wireless() {\n\t\tSystem.out.println(\"wireless is a static method from Java 1.8\");\n\t}\n\t\n\t\n\t\n\t//We can only apply extends keyword but NOT implements for inheritance in interface. \n\t//Interface can inherit multiple interfaces using extends keyword.\n\t\n\t\n\t\n\n}", "public abstract String getStudentType();", "public interface AbstractC1953c50 {\n}", "interface Shape{\r\n\tvoid draw();\r\n}", "public interface Protocol {\n\n <T> void export(String interfaceName, Class<T> clazz) throws Exception;\n\n <T> Invoker<T> refer(Class<T> type, URL url) throws Exception;\n\n}", "public static void main(String[] args) {\n\t\tA a=new A();\r\n\t\ta.display();\r\n\t\ta.a_display(); // non interface method.\r\n\t\t\r\n\t\t//output : ====A display====\r\n/* Exp: In the above code we defined referance variable \"a\" as A class type,\r\n \t\tin order to call display() method which A class implemented.*/\r\n\t\t\r\n\t//case 2: Now if we want to use display method in B class we will do following code\r\n\t\t\r\n\t\tB b=new B();\r\n\t\tb.display();\r\n\t\t\r\n\t\t//output : \t\t====B display====\r\n/* Exp: In the above code we defined referance variable \"b\" as B class type,\r\n \t\tin order to call display() method which B class implemented. */\r\n\t\t\r\n\t\tInn i=new A(); //new B() to access B class display()\r\n\t\ti.display();\r\n\t\t/*i.a_display(); this gives an error, since interface referance cannot\r\n\t\tpoint to non interface methods*/\r\n\t\t\r\n\t\t//output : ====A display====\r\n\t\t\r\n/*\t\tExp: The above code states that object of \"A\" class was stored in \"i\" variable\r\n\t\t\t which is of \"Inn\" interface type. Since A implements Inn, so Inn type varables\r\n\t\t\t can call all methods in that Interface. \r\n\t\t\t \r\n\t\t\t So display() which belongs to Inn and implemented by A class can be accesed \r\n\t\t\t by \"i\" varable. \r\n\t\t\t this results i.display() to give output \"====A display====\".\r\n\t\tin case2:\r\n\t\t\t Now if I want to access display() in B implementation we simple need\r\n\t\t\t TO CHANGE ONLY ONE LINE \" ie OBJECT CREATION\"\r\n\t\t\t Inn i= new B();\r\n\t\t\t\ti.display();\r\n\t\t\r\n\t\t//output : ====B display====\r\n\t\t\t */\r\n \t\t\r\n\t/*Now we can state that \"Inn\" Interface reference \"i\" is going point any\r\n\tclass object \"A\" or \"B\"\tthat implements \"Inn\"\r\n\t\tNOTE: AN INTERFANCE REFERENCE CANNOT POINT TO NON INTERFACE MENTHODS IN A CLASS \r\n\t\t*/\r\n\t}", "public interface C13719g {\n}", "public interface Subject {\n void doSomething(String str);\n}", "TypeReference getTypeReference();", "interface Interviewer {\n public void askQuestions();\n}", "public interface Behaviour {\n/**abstract method of the Behaviour interface*/\n\tvoid sad();\n}", "ReferenceKind getKind();", "public String getReference();", "public String getReference();", "public interface Actions extends EObject\n{\n}", "public interface Chassis{\n\n// A public constant string named chassis with a value of “Chassis”.\n public final String chassis = \"Chassis\";\n\n// The definition of a public getChassisType method that returns an instance of Chassis.\n public Chassis getChassisType();\n\n// The definition of a public setChassisType that accepts a string named vehicleChassis and returns a void\n public void setChassisType(String vehicleChassis);\n\n}", "public interface Shape {\n\t \n\tvoid draw();\n}", "public interface C22379d {\n}", "public interface Shape {\n public String draw();\n}", "public interface C22486a {\n void bGQ();\n\n void cMy();\n }", "abstract public Type type();", "public interface Shape \r\n{\r\n void draw();\r\n}", "public interface Igual extends ComplexInstruction\n{\n}", "public interface Shape {\n\n void draw();\n\n}", "public interface C3803p {\n void mo4312a(C3922o c3922o);\n}", "public interface MDataType extends MClassifier\r\n{\r\n}", "public interface onlineEducation {\n\n\n\n}", "public abstract Object mo1771a();", "public interface IStudent {\n public List<StudentDo> GetStudents();\n public int InsertStudent(StudentDo studentDo);\n}", "public interface Tweetable {\n /*\n Typically in an interface you put lists of methods with no code in them. They don't\n usually have constructors. How they work: like saying \"I promise to have these methods\". If\n I want to implement this interface I must have these methods. Like a checklist that\n classes need to check off. How to use: like a super class. Instead of 'extends' we use\n 'implements'\n */\n public String getText();\n public Date getDate();\n\n}", "int getReferenceKind();", "TypeRef getType();", "public interface Displayer {\n \n /**\n * This is displayShape method.\n * \n * @param shape - object's shape type\n */\n void displayShape(Shape shape);\n}", "public interface Person {\n\n public void service();\n\n public void setAnimal(Animal animal);\n\n public void allService();\n}", "public interface Shape {\r\n void draw();\r\n}", "public abstract BoundType a();", "public interface Shape {\n\n void draw(); //Tells what kind of shape is drawn\n}", "public interface Animal {\n\n void print();\n}", "public void testSelfReferencesSimple()\n {\n TypeResolver typeResolver = new TypeResolver();\n MemberResolver memberResolver = new MemberResolver(typeResolver);\n ResolvedType type = typeResolver.resolve(MyComparable.class);\n ResolvedMethod[] resolvedMethods = memberResolver.resolve(type, null, null).getMemberMethods();\n\n assertEquals(1, resolvedMethods.length);\n assertEquals(Comparable.class, resolvedMethods[0].getReturnType().getErasedType());\n }", "public interface Subject {\n String sendFlower();\n void sendDolls();\n void sendChocolate();\n}", "public interface Citizen {\n public abstract void sayHello();\n}", "protected abstract String getRefName();", "public interface Shape {\n\n String getDescription();\n}", "public interface Employees {\n public Employees work();\n}", "@Override\n public ResolvedReferenceType asReferenceType() {\n return this;\n }", "public interface Ast {\n /**\n * Method for generating abstract syntactic structure for the source code\n * written in a programming language(Java or Python for example)\n */\n void genAst();\n\n}", "public interface Identifiable {\n\n\t/**\n\t * Generate a String that uniquely identifies this object. This String can\n\t * be created from class data/state, and will be used to determine compare\n\t * with other objects of the same type to determine equivalence.\n\t * \n\t * @return the String identifying the state of the object to compare\n\t */\n\tpublic String id();\n}", "public interface Shape {\n public void draw();\n}", "public interface C11922a {\n void bvR();\n }", "public interface DerivedType extends EObject {\r\n}", "public interface FunctionSynonym extends ConceptOrSynonym\n{\n}" ]
[ "0.6756022", "0.66703826", "0.64421207", "0.61882824", "0.6145525", "0.61431104", "0.6077689", "0.60434747", "0.60140747", "0.6000402", "0.5912537", "0.59023196", "0.58231634", "0.57975125", "0.5794867", "0.5763702", "0.5744801", "0.57359535", "0.5728989", "0.57286024", "0.57071793", "0.5694268", "0.5686094", "0.5637909", "0.56329507", "0.5627777", "0.5624168", "0.5601665", "0.5597948", "0.55848676", "0.558375", "0.5566399", "0.55637527", "0.5559667", "0.5545615", "0.55426955", "0.55358326", "0.5534807", "0.55338097", "0.55308306", "0.55198413", "0.5507647", "0.5501712", "0.54968935", "0.5496494", "0.5495606", "0.5475545", "0.5475391", "0.54704833", "0.5468359", "0.5452712", "0.5451283", "0.54504794", "0.5447428", "0.54451674", "0.54403484", "0.5435332", "0.54290944", "0.5417579", "0.5417369", "0.5417076", "0.54124075", "0.54067516", "0.54067516", "0.54012346", "0.53977484", "0.53920865", "0.53883266", "0.5385247", "0.53782505", "0.5375066", "0.5371797", "0.5365435", "0.5360678", "0.5360236", "0.5357607", "0.53544444", "0.53543633", "0.5347346", "0.5344205", "0.534354", "0.5341755", "0.53369474", "0.53368795", "0.53295726", "0.5324169", "0.53222585", "0.5319272", "0.53185946", "0.5317333", "0.53172755", "0.53121185", "0.53105503", "0.5307838", "0.5307654", "0.5303006", "0.53011906", "0.5299961", "0.52991813", "0.52953553", "0.52924263" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { String input1="AAA/abb/CCC"; ArrayList<String> l=new ArrayList<String>(); StringTokenizer t=new StringTokenizer(input1,"/"); while(t.hasMoreTokens()){ StringBuffer sb=new StringBuffer(t.nextToken().toLowerCase()); l.add(sb.reverse().toString()); } String op[]=new String[l.size()]; for(int i=0;i<op.length;i++) op[i]=l.get(i); for(String s:op) System.out.println(s); }
{ "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 load in local data
@EventHandler public void onFail(PlayerFallOnCourseEvent e) { PlayerTracker pt = PlayerTracker.getPlayerTracker(e.getPlayer().getName()); if(pt != null) { pt.removeLives(1); if(pt.hasLivesRemaining()) { e.getPlayer().teleport(pt.getLastCheckpoint().getLocation()); e.getPlayer().sendMessage(ChatColor.GREEN + "You have " + ChatColor.GRAY + "" + ChatColor.UNDERLINE + "" + pt.getLives() + "" + ChatColor.RESET + "" + ChatColor.GREEN + " lives left!"); } else { e.getPlayer().sendMessage(ChatColor.RED + "You have ran out of lives!"); Bukkit.getPluginManager().callEvent(new PlayerFinishCourseEvent(e.getPlayer(), e.getMap(), null, false)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void loadData()\n {\n }", "void loadData();", "void loadData();", "protected abstract void loadData();", "public abstract void loadData();", "public abstract void loadData();", "public void load() ;", "private void loadData() {\n\t\tOptional<ServerData> loaded_data = dataSaver.load();\n\t\tif (loaded_data.isPresent()) {\n\t\t\tdata = loaded_data.get();\n\t\t} else {\n\t\t\tdata = new ServerData();\n\t\t}\n\t}", "private static void load(){\n }", "void massiveModeLoading( File dataPath );", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n void load(String data) {\n }", "public void load() {\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "@Override\r\n\tprotected void load() {\n\t\t\r\n\t}", "public void load();", "public void load();", "void load();", "void load();", "public void loadFromLocalStorage() {\n\t\t\n\t}", "public void load() {\n }", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "@Override\n\tprotected void load() {\n\t\t\n\t}", "protected boolean initLocalData() {\n return true;\n }", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tprotected void load() {\n\n\t}", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "@Override\n public void load() {\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}", "public abstract void load();", "@Override\r\n\tpublic void load() {\n\t}", "public static void load() {\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "@Override\r\n\tpublic void load() {\n\r\n\t}", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "@Override\n public void load() {\n }", "void populateData();", "private void initData() {\n\t}", "public static void populateData() {\n\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public void loadAllUserData(){\n\n }", "private void initData() {\n\n }", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "private void parseData() {\n\t\t\r\n\t}", "public void getData() {\n\t\tfileIO.importRewards();\n\t\tfileIO.getPrefs();\n\t}", "private Data readFromFileData() {//Context context) {\n try {\n FileInputStream fileInputStream = openFileInput(fileNameData);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n Data.userData = (Data) objectInputStream.readObject();\n objectInputStream.close();\n fileInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return Data.userData;\n }", "private void InitData() {\n\t}", "private void initData() {\n }", "private void initDataLoader() {\n\t}", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "@Override\r\n\tprotected void initLoad() {\n\r\n\t}", "private void initialData() {\n\n }", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void loadData() {\n\t\tlogger.trace(\"loadData() is called\");\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"server-info.dat\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tjokeFile = (String ) in.readObject();\n\t\t\tkkServerPort = (int) in.readObject();\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tjokeFile = \"kk-jokes.txt\";\n\t\t\tkkServerPort = 5555;\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.err.println(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t\tlogger.info(\"server-info.dat file is likely missing but it should be created automatically when this app is closed.\");\n\t\t}\t\n\t}", "private void loadUserData() {\n\t\tuserData = new UserData();\n }", "@Override\n\tpublic void loadData(Bundle bundle) {\n\t}", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "Object getCurrentData();", "void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "private void initData(){\n\n }", "DataStore getDataStore ();", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void makeData() {\n\t\tFile file = null;\r\n try {\r\n if (!m.getDataFolder().exists()) { //Check if the directory of the plugin exists...\r\n \tm.getDataFolder().mkdirs(); //If not making one.\r\n }\r\n file = new File(m.getDataFolder(), \"data.yml\"); // Defining file to data.yml NOTE: This file has to be also in your Project, even if it's empty.\r\n if (!file.exists()) { //Check if it exists\r\n \tm.getLogger().info(\"data.yml not found, creating!\"); //Log that it is creating\r\n \tm.saveResource(\"data.yml\", true); //Saving the resource, This is all by Java done no Spigot noeeded. \r\n } else {\r\n \tm.getLogger().info(\"data.yml found, loading!\"); //If it is already there, load it.\r\n \t//TODO: Loading...\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();//If something returned a NPE or something it will print a stacktrace...\r\n }\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}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "protected Properties loadData() {\n/* 362 */ Properties mapData = new Properties();\n/* */ try {\n/* 364 */ mapData.load(WorldMapView.class.getResourceAsStream(\"worldmap-small.properties\"));\n/* 365 */ } catch (IOException e) {\n/* 366 */ e.printStackTrace();\n/* */ } \n/* */ \n/* 369 */ return mapData;\n/* */ }", "protected abstract void retrievedata();", "public void readFromFile() {\n\n\t}", "@Test\n\tpublic void testReadDataFromFiles2(){\n\t\tassertEquals((Integer)1 , DataLoader.data.get(\"http\"));\n\t\tassertEquals((Integer)1, DataLoader.data.get(\"search\"));\n\t}", "private void load(Object o) {\n \n }", "public List<String> load();", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void reloadData() {\n if (DataFile == null)\n DataFile = new File(dataFolder, DATAFILENAME);\n Data = YamlConfiguration.loadConfiguration(DataFile);\n }", "void loadData() throws SerializerException;", "public abstract void loaded();", "public abstract void load() throws IOException;", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "private void loadXtreemFSData() {\n IndexedContainer xtreemFSData = createFields();\n\n // Die IDs werden zum Verschieben von Dateien gebraucht.\n VaadinXtreemFSSession.setDirectoryIds(new ArrayList<Object>());\n\n if (getVolume() != null) {\n try {\n int i = 1;\n\n // Alle Elemente einfügen\n String currentDir = getCurrentDir();\n for (DirectoryEntry e : listEntries(currentDir)) {\n // .. im Home-Dir ausblenden\n if (getHomeDir() == null\n || getHomeDir() != null\n && (currentDir != null && !currentDir.equals(mergePaths(getHomeDir(), \"\")))\n || !e.getName().equals(\"..\")) {\n createItems(xtreemFSData, e.getName(), XtreemFSConnect.isDirectory(e), e.getStbuf(), i++);\n }\n }\n\n } catch (IOException e) {\n if (e.getMessage().contains(\"access denied\")) {\n showNotification(\"Error\", \"You don't have the rights to access '\"+getCurrentDir()+\"'.\", Notification.TYPE_ERROR_MESSAGE, e);\n }\n else {\n showNotification(\"Error\", e.toString(), Notification.TYPE_ERROR_MESSAGE, e);\n }\n }\n }\n\n this.table.setContainerDataSource(xtreemFSData);\n this.autocompleteFilter.setContainerDataSource(xtreemFSData);\n }", "boolean canLoadData();", "abstract void initializeNeededData();", "@Override\n protected File getDataFile(String relFilePath) {\n return new File(getDataDir(), relFilePath);\n }", "private void loadUser() {\n File dataFile = new File(getFilesDir().getPath() + \"/\" + DATA_FILE);\n\n if(dataFile.exists()) {\n loadData();\n } else { // First time CigCount is launched\n user = new User();\n }\n }", "private void loadDataFromMemory(String filename){\n shoppingList.clear();\n new ReadFromMemoryAsync(filename, getCurrentContext(), new ReadFromMemoryAsync.AsyncResponse(){\n\n @Override\n public void processFinish(List<ShoppingItem> output) {\n shoppingList.addAll(output);\n sortItems();\n }\n }).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n// for (ShoppingItem item: items) {\n// shoppingList.add(item);\n// }\n// sortItems();\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "protected void importDefaultData()\n {\n LOG.info(\"Importing Data\");\n Session session = HibernateUtil.currentSession();\n Transaction tx = session.beginTransaction();\n Session dom4jSession = session.getSession(EntityMode.DOM4J);\n\n SAXReader saxReader = new SAXReader();\n try\n {\n Document document = saxReader.read(Setup.class.getResource(\"/DefaultData.xml\"));\n \n for (Object obj : document.selectNodes(\"//name\"))\n {\n Node node = (Node)obj;\n node.setText(node.getText().trim());\n }\n \n List<?> nodes = document.selectNodes(\"/Data/*/*\");\n \n for (Object obj : nodes)\n {\n Node node = (Node)obj;\n \n Class<?> clazz = Class.forName(\"at.easydiet.model.\" + node.getName());\n LOG.info(\"Importing \" + clazz.getName());\n dom4jSession.save(clazz.getName(), node);\n }\n \n session.flush();\n tx.commit();\n HibernateUtil.closeSession();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n tx.rollback();\n }\n LOG.info(\"Importing ended\");\n }", "private void Initialized_Data() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}" ]
[ "0.7221316", "0.71329236", "0.71329236", "0.7079811", "0.6922708", "0.6922708", "0.6777903", "0.6668397", "0.6628822", "0.66226304", "0.65979916", "0.6570344", "0.65463465", "0.65434766", "0.65187824", "0.64719164", "0.64719164", "0.646788", "0.646788", "0.64604986", "0.64591706", "0.64516723", "0.64516723", "0.64516723", "0.64143896", "0.63868153", "0.63868153", "0.63760793", "0.637424", "0.63160735", "0.6299919", "0.62935716", "0.6277977", "0.6254356", "0.6234703", "0.62187386", "0.62079114", "0.62063146", "0.6183618", "0.6146109", "0.6120664", "0.6116702", "0.6098882", "0.60956293", "0.6089784", "0.6089614", "0.6080314", "0.60527635", "0.60427684", "0.60426366", "0.60278046", "0.59908366", "0.5971824", "0.59645754", "0.59610176", "0.5958676", "0.59527963", "0.59511036", "0.59509873", "0.5947084", "0.59168744", "0.5909484", "0.5900398", "0.58989537", "0.58978975", "0.5889719", "0.5869121", "0.58668274", "0.58668274", "0.58668274", "0.58668274", "0.58668274", "0.58668274", "0.5864571", "0.58504725", "0.58061874", "0.5804472", "0.5804187", "0.5800297", "0.57931465", "0.57920164", "0.5786162", "0.57761574", "0.5765921", "0.57634085", "0.57634085", "0.5763035", "0.5762084", "0.5761938", "0.57606256", "0.57421166", "0.5739923", "0.5739642", "0.57396024", "0.57378614", "0.5737415", "0.57309353", "0.57153827", "0.57132125", "0.57132125", "0.57120097" ]
0.0
-1
int prange = Integer.parseInt(args[0]);
public static void main(String[] args) { int[] range = new int[100]; for (int i = 0; i<range.length; i++) { range[i]=i+2; } /* for (int i = 1; i <prange; i++) { System.out.println(numbers[i]); } primearray obj = new primearray(numbers); for (int i = 1; i <prange; i++) { System.out.println(obj.range[i]); }*/ primearray obj = new primearray(range); obj.perform(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void inRange(String[] arguments) {\n\t\ttry { \n\t int IDLow = Integer.parseInt(arguments[1]);\n\t int IDHigh = Integer.parseInt(arguments[2]);\n\t totalInRangeCount = 0;\n\t countInRange(root, IDLow, IDHigh);\n\t System.out.printf(\"%d\\n\",totalInRangeCount);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint start;\r\n\t\tint end;\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"enter the start number & end numner\");\r\n\t\tstart = scan.nextInt();\r\n\t\tend = scan.nextInt();\r\n\tpri(start,end);\t\r\n\r\n\t}", "int getRange();", "public static void main(String[] args) {\n\t\tString a=\"770\";\n\t\tint b=Integer.parseInt(a);\n\t\tSystem.out.println(b);\n\n\t}", "@Override\r\n public void init(ArrayList<String> args) {\r\n n = Integer.parseInt(args.get(0));\r\n }", "public static int getStartingMonkeyNum(String[] args) {\n\n int start = 0;\n\n if (args.length != 1) {\n errorAndExit();\n }\n\n try {\n start = Integer.parseInt(args[0]);\n } catch (NumberFormatException ex) {\n errorAndExit();\n }\n\n if (start < 1) {\n errorAndExit();\n }\n\n return start;\n\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t//int start = Integer.parseInt(args[0]);//larger number\r\n\t\t\t//int end = Integer.parseInt(args[1]);\r\n\t\t\tint start=20,end=10;\r\n\t\t\t\tfor(int j=start;j>=end;j--) {\r\n\t\t\t\t\tSystem.out.println(j+\" \");\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"enter end\");\n\t\tint n = scn.nextInt();\n\t\tSystem.out.println(numpath(0, n));\n\t}", "public static int processCliArgs(String[] args) {\n int port = DEFAULTPORT;\n if (args.length > 1) {\n System.out.println(\"usage: ./xtcp positive-integer\");\n System.exit(1);\n }\n if (args.length == 1) {\n try {\n port = Integer.parseInt(args[0]);\n if (port <= 0) {\n throw new IllegalArgumentException(\"number cannot be negative\");\n }\n }\n catch (Exception e) {\n // number passed in was not an integer\n System.out.println(\"usage: ./xtcp positive-integer\");\n System.exit(1);\n }\n }\n return port;\n }", "public static void main(String[] args) {\n\t\tString str = \"-12\";\n\t\tSystem.out.println(atoi(str));\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tn = Integer.parseInt(br.readLine().trim());\n\t\tfind();\n\t}", "public static void main(String[] args)\r\n {\n BST<Integer> tree = new BST<Integer>();\r\n\r\n int L = Integer.parseInt(args[0]);\r\n int R = Integer.parseInt(args[1]);\r\n for(int i=2; i < args.length; i++)\r\n {\r\n tree.insert(Integer.parseInt(args[i]));\r\n\r\n }\r\n\r\n //tree.delete(Integer.parseInt(args[3]));\r\n System.out.println(tree.find(Integer.parseInt(args[4])));\r\n tree.print();\r\n \r\n System.out.println(\"Sum of Range: \" + tree.rangeSum(L, R));\r\n }", "public static void main(String[] args) {\n System.out.println(\"Random Number is :\"+ Range());\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(N_8_String_to_Integer.myAtoi(\"-2147483649\"));\r\n\t\t//System.out.println(Integer.valueOf(\"-2147483649\"));\r\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String s1 = scan.nextLine();\n int begin = scan.nextInt();\n int end = scan.nextInt();\n System.out.println(s1.substring(begin,end + 1));\n }", "public static void main(String[] args) {\n\t\tScanner scnr = new Scanner(System.in);\n\t\tint firstNum;\n\t\tint secondNum;\n\t\tint thirdNum;\n\t\tint lowEnd;\n\t\tint highEnd;\n\t\t\n\t\tSystem.out.println(\"Enter a number: \");\n\t\tfirstNum = scnr.nextInt();\n\t\t\n\t\tSystem.out.println(\"Enter another number: \");\n\t\tsecondNum = scnr.nextInt();\n\t\tif (firstNum < secondNum) {\n\t\t\tlowEnd = firstNum;\n\t\t\thighEnd = secondNum;\n\t\t} else {\n\t\t\tlowEnd = secondNum;\n\t\t\thighEnd = firstNum;\n\t\t}\n\t\tSystem.out.println(\"Your range is \" + lowEnd + \"-\" + highEnd + \".\");\n\t\tSystem.out.println(\"Enter a number for verification: \");\n\t\tthirdNum = scnr.nextInt();\n\t\t\n\t\tif (thirdNum >= lowEnd && thirdNum <= highEnd) {\n\t\t\tSystem.out.println(thirdNum + \" is in the range.\");\n\t\t} else {\n\t\t\tSystem.out.println(thirdNum + \" is outside the range.\");\n\t\t}\n\t\t\n\t\tscnr.close();\n\t}", "public static void main(String[] args) {\n\t\tString[] split = fr.nextLine().split(\",\");\n\t\tint budget = fr.nextInt();\n\t\tint p = fr.nextInt();\n\t\tint psize = fr.nextInt();\n\t\tCandidateCode mp = new CandidateCode(split[0], split[1], p, budget);\n\t\tSystem.out.println(mp.start());\n\t}", "public static void main(String[] args) {\n int val = determineSequence(7);\n System.out.println(val);\n }", "public static void main(String[] args){\n int number = scn.nextInt();\n \n \n int a = num(number);\n System.out.println(a);\n \n \n }", "public static void main(String[] args) {\n\t\t// Scanner object to scan input\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// Asking user for the range and taking inputs\n\t\tlong left, right;\n\t\tSystem.out.println(\"Enter the range (low limit and high limit): \");\n\t\tleft = sc.nextLong();\n\t\tright = sc.nextLong();\n\n\t\t// Calling the method to calculated segmented sieve\n\t\tList<Long> segSieve = segmentedSieve(left, right);\n\n\t\t// Printing the segmented sieve\n\t\tSystem.out.println(\"Primes between \" + left + \" and \" + right + \" :\");\n\t\tSystem.out.println(segSieve);\n\n\t\t// Closing the scanner object\n\t\tsc.close();\n\t}", "public static void main(String[] args) throws Exception {\n // Prompt the user to input a number (in a given range)\n System.out.print(\"Numéro du scenario (1 à \" + maxScenarioNumber + \") : \");\n\n // Parse the given value to a scenario index\n int scenarioNumber = Character.getNumericValue(System.in.read()) - 1;\n\n try {\n // Retrieve and run the scenario\n getScenario(scenarioNumber);\n }\n catch (IndexOutOfBoundsException exc) {\n System.err.println(\"Numéro de scénario inconnu.\");\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(myAtoi(\" -11919730356x\"));\n\t\t// System.out.println(Integer.parseInt(\"-123\"));\n\n\t}", "public static void main(String[] args) {\n\t\tint index = 0 ;\n\t\tint sum =0;\n\t\twhile (index< args.length) {\n\t\t\tsum+=Integer.parseInt(args[index]);\n\t\t\tindex+=1;\n\t\t}\n\t\n\t\tSystem.out.println(sum);\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(findMin(new int[]{-4,-1,1,3}));\n\t}", "public static void main(String[] args) {\n\t\tint min1 = getMin3(3,1,1);\n\t\tSystem.out.println(min1);\n\t\t\n\t}", "public static void main(String[] args) throws IOException\r\n {\r\n main(Integer.parseInt(args[0]));\r\n }", "public static void main(String[] args) throws Numberexceeds{\n String s=\"htderabad\";\r\n Scanner sc=new Scanner(System.in);\r\n System.out.println(\"enter index\");\r\n try {\r\n int index=sc.nextInt();\r\n \r\n char []ch=s.toCharArray();\r\n if(index<0||index>ch.length)\r\n \t throw new Numberexceeds(\"pls enter range number\");\r\n System.out.println(ch[index]);\r\n }\r\n catch(Exception e) {System.out.println(e);}\r\n\t}", "public static void main(String[] args) {\n\t\tint result = 0;\r\n\t\tif (args[0].equals(\"/?\")) {\r\n\t\t\tSystem.out.println(\"도움말 출력\");\r\n\t\t} else if (args[0].equals(\"+\")) {\r\n\t\t\tresult = Integer.parseInt(args[1])\r\n\t\t\t\t\t+ Integer.parseInt(args[2]);\r\n\t\t\tSystem.out.println(result);\r\n\t\t} else if (args[0].equals(\"+\")) {\r\n\t\t\tresult = Integer.parseInt(args[1])\r\n\t\t\t\t\t- Integer.parseInt(args[2]);\r\n\t\t\tSystem.out.println(result);\r\n\t\t}\r\n\t\t\r\n\t\t//String[] args = {\"+\" , \"10\" , \"20\"}\r\n\t\tString [] str = {\"이숭무\" , \"이상범\" , \"이장범\"};\r\n\t\tSystem.out.println(str[0]);\r\n\t\r\n\r\n\t}", "public static void main(String[] args) {\n int sum=0;\n for(int i=0;i< args.length;i++)\n {\n sum+=Integer.parseInt(args[i]);\n System.out.println(sum);\n }\n\n }", "private Query getIntRange(final String fieldName, String[] range) {\n int lower = Integer.parseInt(range[0]);\n int upper = Integer.parseInt(range[1]);\n return IntPoint.newRangeQuery(fieldName, lower, upper);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(minimumNumber(3,\"9#A\"));\n\t}", "public static void main(String[] args) {\n System.out.println(randomInteger(-100, 100));\n }", "public static void main(String[] args) {\n\n\t\tint number=123;\n\t}", "public static void main(String[] args) {\n\t\tcheckNumber(-1);\n\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tScanner inputStream = null;\n\t\ttry {\n\t\t\tinputStream = new Scanner( new FileInputStream(\"/Users/mr.a/Desktop/eclipse/Codechef/src/stuff.txt\"));\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File stuff .txt was not found\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t\tint t = inputStream.nextInt();\n\t\tinputStream.nextLine();\n\t\tfor(int i =0 ; i<t;i++) \n\t\t{\n\t\t\tString g = inputStream.nextLine();\n\t\t\tString number[] = g.split(\" \");\n\t\t\tint arr[] = new int[number.length];\n\t\t\tfor(int j =0 ; j < number.length ; j++ )\n\t\t\t{\n\t\t\t\tarr[j] = Integer.parseInt(number[j]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(MaxValue(arr));\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args)\r\n\t{\n\t\tString tStr = \"1111.001\";\r\n\t\tString tLimit;\r\n\t\ttLimit = PubFun.getInt(tStr);\r\n\t\t// tStr=PubFun1.CreateMaxNo(\"ProposalNo\",tLimit) ;\r\n\t\tSystem.out.println(tLimit);\r\n\t\tSystem.out.println(PubFun.calInterval(\"2008-3-1\", \"2008-3-30\", \"D\"));\r\n\t}", "@Override\r\n\tpublic int getInt(int[] args) {\n\t\treturn 0;\r\n\t}", "public static void main(String[] args) {\n\t\tTest();\n\t\tScanner scan = new Scanner(System.in);\n\t\tString str;\n\t\tString id;\n\t\tSystem.out.println(\"SubString\\nPlease enter String: \");\n\t\tstr = scan.nextLine();\n\t\tSystem.out.println(\"Please enter range\");\n\t\tid = scan.nextLine();\n\t\tint idx;\n\t\ttry\n\t\t{\n\t\t\tidx = Integer.parseInt(id);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Enter enter valid number, Default will be set to string length\");\n\t\t\tidx = str.length();\n\t\t}\n\t\tif(idx > str.length()) {\n\t\t\tSystem.out.println(\"This is byond the max length, will set to max: \"+ str.length());\n\t\t\tidx = str.length();\n\t\t}\n\t\tSystem.out.println(\"Output: \" + sub(str,idx));\n\t}", "public static void main(String[] args) {\n\t\t\t\t\t\t\tInteger firstNumber=new Integer(args[0]);\r\n\t\t\t\t\t\t\t//here it takes the value which we passed in the index arguments \r\n\t\t\t\t\t\t\tInteger secondNumber=Integer.parseInt(args[3]); \r\n\t\t\t\t\t\t\t//here in two ways we can read integer value\r\n\t\t\t\t\t\t\tSystem.out.println(\"given arguments are :11 37 21 12 \");\r\n\r\n\t\t\t\t\t\t\tSystem.out.println(\"the output is :\");\r\n\r\n\t\t\t\t\t\t\tSystem.out.println(firstNumber+\" \"+secondNumber);// here it prints the values of index of size zero and of index size three\r\n\r\n\t\t\t\t\t\t\tSystem.out.println( firstNumber + secondNumber );// here it adds the two values of the given arguments\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t \t\t // Integer.parseInt(firstNumber) + Integer.parseInt(secondNumber)\r\n\r\n\t\t\t\t\t \t\t // = Integer.parseInt(\"11\") + Integer.parseInt(\"12\")\r\n\r\n\t\t\t\t\t \t\t // = 11 + 12 = 23\r\n\r\n\t\t\t\t\t \t\t // Because + = ADD when used on integers\r\n\r\n\t\t\t\t\t\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint a=Integer.parseInt(args[0]);\r\n\t\tint b=Integer.parseInt(args[1]);\r\n\t\tSystem.out.println(larger(a,b));\r\n\t}", "Integer getPortRangeStart();", "public static void main (String []argv)\n\t{\n\t int integer = 0;\n\t int []inArr = new int [argv.length];\n\t \n\t for (int i = 0; i< argv.length; i++)\n\t {\n\t \n\t inArr [i] = Integer.parseInt (argv[i]);\n\t \n\t }\n\t \n\t \n\t integer = getN();\n\n\t System.out.println (\"The LAST occurrence of \" + integer + \" is: \" + findVal (inArr, integer));\n\t}", "public static void main(String[] args) {\n\t\tint num1 = 10;\n\t\t\t\t\n\t\tSystem.out.println(\"A variável int é \" + num1);\n\t\t\n\t}", "public static void main(String[] args) {\n System.out.println(\"El numero pi es \" + Matematicas.generarNumeroPi(Integer.parseInt(args[0])));\n\n }", "public static void main(String[] args) {\n\t\tint [] listArr = {1,2,3,34,56,0};\n\t\tmin(listArr);\n\t\tmax(listArr);\n\t}", "public static void main(String args[]) {\n\n int start = Integer.parseInt(args[0]);\n int end = Integer.parseInt(args[1]);\n\n System.out.println(\"\\nArmstrong numbers within the range \" + start + \" - \" + end + \" are as follows: \");\n\n for(int number = start; number <= end; number++) {\n\n int sum = 0;\n int original = 0;\n int digits = 0;\n\n original = number;\n\n while(original > 0) {\n digits++;\n original = original / 10;\n }\n\n original = number;\n\n while(original > 0) {\n int remainder = original % 10;\n sum = sum + (int) Math.pow((double)remainder, (double)digits);\n original = original / 10;\n }\n\n if(number == sum) {\n System.out.print(number + \" \");\n }\n }\n\n System.out.println(\"\\n\");\n\n }", "public static void main(String[] args){\n\t\tSystem.out.println(atoi(\"-0\"));\n\t\tSystem.out.println(atoi(\"13434ag\"));\n\t\tSystem.out.println(atoi(\"-2343\"));\n\t\tSystem.out.println(atoi(\"-03435\"));\n\t\tSystem.out.println(atoi(\"-003435\"));//number starts with 0 is fine.\n\t\t\n\t}", "int getIntArgument() throws Exception {\n return Integer.parseInt(this.readLine().split(\"\\\\s+\", 2)[1]);\n }", "public static void main(String[] args) {\n\n System.out.println(sumInBetween(-4, 4));\n\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String stroka1 = scanner.nextLine();\n Integer number1 = scanner.nextInt();\n Integer number2 = scanner.nextInt();\n\n System.out.println(stroka1.substring(number1, number2 + 1));\n\n }", "public static void main(String[] args) {\n\t\n\t\tint sum=0;\n\t\t\n\t\tfor (int i=0;i<args.length;i++) {\n\t\t\tint a=Integer.parseInt(args[i]);\n\t\t\tsum+=a;\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.nextLine();\n\t\tint hour = in.nextInt();\n\t\tString []num = s.split(\" \");\n\t\tint [] array = new int[num.length];\n\t\tfor(int i=0;i<num.length;i++)\n\t\t{\n\t\t\tarray[i]=Integer.parseInt(num[i]);\n\t\t}\n\t\t\n\t\tSystem.out.print(getMinSpeed(array,hour));\n\t}", "public static void main(String[] args) {\n\t\tString s = \"9999\"; int k =2 ;\n\t\tSystem.out.println(findMaxSegment(s, k));\n\n\t}", "public static int getInt (String ask, int min, int max)\r\n {\r\n int value = 0;\r\n do {\r\n value = getInt(ask + \" (\" + min + \" - \" + max + \")\");\r\n } while (value < min || value > max);\r\n return value;\r\n }", "public static void main(String[] args) {\n\t\tprintRange('q', 'r');\n\t}", "public static void main(String[] args) {\n int[] arr = {2, 3, -1, 4, 0};\n\n Max_MinNumber(arr);\n\n }", "public static void main(String[] args) {\n\t\tint start = 100;\r\n\t\tint end = 1;\r\n\t\t//int add = 1;\r\n\t\twhile (start>=end) {\r\n\t\t\tSystem.out.println(start);\r\n\t\t\t//start = start - add;\r\n\t\t\tstart--;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint somme=0;\n\t\tSystem.out.println(\"veuillez saisir une valeur\");\n\t\tScanner scanner = new Scanner(System.in) ;\n\n\t\t\tint nb = scanner.nextInt() ;\n\t\t\t\n\t\t\tfor (int i = 1; i <=nb; i++) {\n\t\t\t\tsomme=somme+i;\n\t\t\t}\n\t\t\tSystem.out.println(somme);\n\t}", "public static void main(String[] args) {\n\t\tint sum=0;\n\t\tfor(String num:args)\n\t\t{\n\t\t\tsum+=Integer.parseInt(num);\n\t\t}\n\t\t\tSystem.out.println(\"sum is \"+sum);\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(findMinStep(\"WRRBBW\", \"RB\"));\n\t\tSystem.out.println(findMinStep(\"WWRRBBWW\", \"WRBRW\"));\n\t\tSystem.out.println(findMinStep(\"G\", \"GGGGG\"));\n\t\tSystem.out.println(findMinStep(\"RBYYBBRRB\", \"YRBGB\"));\n\t}", "public static void main(String[] args) {\n\t\tint x=100;\n\t\t\n\t\tString y=Integer.toString(x);\n\t\t\n\t\t\n\t\tInteger b=new Integer(y);\n\t\t\n\t\t\n\t\tint z=b.intValue();\n\t\t\n\t\tInteger c=new Integer(z);\n\t\t\n\t\tString d=c.toString();\n\t\t\n\t\t\n\t\tint e=Integer.parseInt(d);\n\n\t}", "public static void main(String[] args) {\n\r\n\t\ttry {\r\n\t\t\tString str = \"ajmal\";\r\n\t\t\tint a=Integer.parseInt(str);\r\n\t\t\tSystem.out.println(a);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tSystem.out.println(e+\" String is not converted to intger\");\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tint []nums = {-2,0,3,-5,2,-1};\n\t\tNumArray obj = new NumArray(nums);\n\t\tSystem.out.println(obj.sumRange(0, 2));\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"----------\");\n\t\tSystem.out.println(\"구구단\");\n\t\tSystem.out.println(\"----------\");\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"시작단을 입력하시오\");\n\t\tint start = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"끝단을 입력하시오\");\n\t\tint end = sc.nextInt();\n\t\t\n\t\tGugu(start,end);\n\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tDivideRepeatNumbr.divide(229, 990);\n\t\tSystem.out.println(DivideRepeatNumbr.perfectSubstring(\"1\", 1));\n\t}", "public static void main(String[] args) {\n\t\t\n int len = Integer.parseInt(args[0]);\n\t\tint [] arr = new int[len];\n\t\t\n\t\tSystem.out.println(\"Enter the element in array:\");\n\t\t\n\t\tint sum=0;\n\t\t\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tarr[i]=scn.nextInt();\n\t\t\tsum+=arr[i];\n\t\t}\n\t\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t\tint min = MinElement(arr);\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n int n = 0, m = 0;\n int result = -1;\n try (Scanner scanner = new Scanner(new File(args[0]))) {\n String[] numberTokens = scanner.nextLine().split(\",\");\n n = Integer.parseInt(numberTokens[0]);\n m = Integer.parseInt(numberTokens[1]);\n /* YOUR CODE HERE */\n \n if(checkIfNoIsFib(n) && checkIfNoIsFib(m)){\n int diff = n - m;\n int min = Math.min(n, m);\n if(diff > min ){\n result = 0;\n } else {\n result =1;\n }\n } else {\n result =0;\n }\n System.out.println(result);\n }\n catch (FileNotFoundException ex) {\n throw new RuntimeException(ex);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\t\tint lo = 1;\n\t\tint hi = 1;\n\t\tString mark;\n\t\tint be = Integer.parseInt(args[0]);\n\t\tint en = Integer.parseInt(args[1]);\n\t\t//System.out.println(be);\n\t\t//System.out.println(en);\n\t\tif(be<0){\n\t\t\tSystem.out.println(\"First command line input must be positive\");\n\t\t\treturn;\n\t\t}\n\t\tif(en<0){\n\t\t\tSystem.out.println(\"Second command line input must be positive\");\n\t\t\treturn;\n\t\t}\n\t\tif(be>en){\n\t\t\tSystem.out.println(\"First command line input must less than second command line input\");\n\t\t\treturn;\n\t\t}\n\t\tif(be==1){\n\t\t\tSystem.out.println(\"1: \" + lo);\n\t\t}\n\t\tif(en >= 2){\n\t\t\tfor (int i = 2; i <= en; i++) {\n\t\t\t\tif (hi % 2 == 0)\n\t\t\t\t\tmark = \" *\";\n\t\t\t\telse\n\t\t\t\t\tmark = \"\";\n\t\t\tif(i >= be){\n\t\t\t\tSystem.out.println(i + \": \" + hi + mark);\n\t\t\t}\n\t\t\thi = lo + hi;\n\t\t\tlo = hi - lo;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String args [])\n\t{\n\t\t/* Stampo il numero 9 */\n\t\tSystem.out.println(9);\n\t}", "public static void main(String[] args) {\n int[] nums = {5,7,7,8,8,10};\n int target = 5;\n\n int[] output = searchRange(nums, target);\n System.out.println(Arrays.toString(output));\n }", "public static void main(String[] args) {\n\t\tint a[]= {3,64,24,15,20};\r\n\t\tint max=a[0],min=a[0];\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tif(max<a[i])\r\n\t\t\t{\r\n\t\t\t\tmax=a[i];\r\n\t\t\t}\r\n\t\t\tif(min>a[i])\r\n\t\t\t{\r\n\t\t\t\tmin=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Minimum is:\"+min);\r\n\t\tSystem.out.println(\"Maximum is:\"+max);\r\n\r\n\t}", "public static void main(String[] args) {\n int[] test1 = {1};\n int[] test2 = {0, 10};\n int[] test3 = {1,3,6};\n SolutionSmallestRange1 solutionSmallestRange1 = new SolutionSmallestRange1();\n System.out.println(solutionSmallestRange1.smallestRangeI(test1, 0));\n System.out.println(solutionSmallestRange1.smallestRangeI(test2, 2));\n System.out.println(solutionSmallestRange1.smallestRangeI(test3, 3));\n \n\t}", "public static void main(String[] args) {\n\t\tint limit = 101;\n\t\t\n\t\tif (args.length == 1) {\n\t\t\ttry {\n\t\t\t\tlimit = Integer.parseInt(args[0]);\n\t\t\t} catch(NumberFormatException nfe) {\n\t\t\t\t// keep default limit\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Integer> primes = getPrimesLessThan(limit);\n\n\t\tSystem.out.println(\"Prime numbers less than or equal to \" + limit + \":\");\n\t\tfor (Integer prime : primes) {\n\t\t\tSystem.out.print(prime + \" \");\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int start = sc.nextInt();\n int end = sc.nextInt();\n long res = 1;\n for (; start < end; start++) {\n res *= start;\n }\n System.out.println(res);\n }", "public static void main(String[] args) {\n System.out.println(sumBetween(1, 0)); // testing sumBetween\n System.out.println(sumBetween(0, 0));\n System.out.println(sumBetween(26, 31));\n System.out.println(sumBetween(-16, 1));\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int a[] = new int[n];\n for (int i = 0; i < a.length; i++) {\n\t\ta[i]= scanner.nextInt();\n\t}\n int maxP = Integer.MIN_VALUE;\n int minB = Integer.MAX_VALUE;\n for (int i = 0; i < a.length; i++) {\n \t minB=Math.min(minB, a[i]);\n\t\tmaxP= Math.max(maxP, a[i]-minB);\n\t}\n System.out.println(maxP);\n\t}", "public static void main(String[] args) {\n\t\tint [] numeros = {0,1,2,3,4,5,6,7,8,9};\n\t\tScanner valor = new Scanner(System.in);\n\t\tSystem.out.println(\"Introduce un numero\");\n\t\tint posicion = valor.nextInt();\n\t\t//deberiamos hacer una expresion regular para controlar que es un int\n\t\tif(posicion >=numeros.length || posicion < 0 ){\n\t\t\t//situacion de excepcion\n\t\t\tSystem.out.println(\"Intentando acceder a una posicion inexistente\");\n\t\t\t//salimos con un codigo de error 1\n\t\t\tvalor.close();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t//desarrollo normal del programa\n\t\tSystem.out.println(\"La posicion es \"+numeros[posicion]);\n\t\tvalor.close();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString productCode=\"55\";\n\t\t\n\t\tint prodCode = Integer.parseInt(productCode);\n\t\t\n\t\tSystem.out.println(\"\\n Product Code: \"+ prodCode);\n\t}", "public static void main(String[] args)\r\n\t\t\t{\n\t\t\t\tprintLowerAndUpperBound();\r\n\t\t\t}", "public int getRow(){ return (Integer)args[0]; }", "public static void main(String[] args) {\n for (String str: args) {\n pl(commafyR(Integer.parseInt(str)));\n }\n }", "public static void main(String[] args) {\n int index = 1; //starting with 2 already done.\r\n int targetIndex = 10001; //we're looking for the 10 001st prime number\r\n int value = 2;\r\n while (index < targetIndex) {\r\n value++;\r\n if (isPrime(value)) {\r\n index++;\r\n }\r\n }\r\n System.out.println(value);\r\n\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(findSubset(30, new int[]{2,3,7,8,10}));\n\n\t}", "@Override\n public int ask(String question, ArrayList<Integer> range) {\n int value = 0;\n try {\n value = super.ask(question, range);\n } catch (MenuOutException moe) {\n System.out.println(moe.getMessage());\n } catch (NumberFormatException nfe) {\n System.out.println(\"Введите корректные данные\");\n }\n return value;\n }", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tString input = scanner.nextLine();\r\n\t\tint num = Integer.parseInt(input);\r\n\t\r\n\t\tfor(int i =1;i<=num;i++) {\r\n\t\t\tSystem.out.print(i);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n System.out.println(findNthPrime(6));\n System.out.println(findNthPrime(10001));\n\n }", "public static void main(String[] args) {\n\t\tString str;\n\t\tint introdnum;\n\t\tint suma=0;\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tstr=JOptionPane.showInputDialog(\"Introduce el numero \"+(i+1));\n\t\t\tintrodnum=Integer.parseInt(str);\n\t\t\tif(introdnum>=10) {\n\t\t\t\tsuma=suma+introdnum;\n\t\t\t}\n\t\t}\n\t\tJOptionPane.showMessageDialog(null, \"La suma es: \"+suma);\n\t}", "int getArgIndex();", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint num = scan.nextInt();\n\t\tresult(num);\n\t}", "String getPortRange();", "private int parseInt(char[] source, int start, int end) {\n int result = Character.digit(source[start++], 10);\n if (result == -1)\n throw new NumberFormatException(new String(source));\n\n for (int index = start; index < end; index++) {\n int nextVal = Character.digit(source[index], 10);\n if (nextVal == -1)\n throw new NumberFormatException(new String(source));\n result = 10*result + nextVal;\n }\n\n return result;\n }", "int range(){\n return fuelcap*mpg;\n }", "public static void main(String[] args){\n String test = \" +3 21\";\n int value = atoi(test);\n System.out.println(\"Conversion result is: \" + value);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tF = sc.nextInt(); // 최고높이\n\t\tint S = sc.nextInt(); // 현재\n\t\tint G = sc.nextInt(); // 목적지\n\t\tU = sc.nextInt(); // 올라가는 \n\t\tD = sc.nextInt(); // 내려가는\n\t\t\n\t\tupdown(G, S);\n\t\t// 찾지 못했을 경우.\n\t\tif(min==1000001){\n\t\t\tSystem.out.println(\"use the stairs\");\n\t\t}\n\t\telse{\n\t\tSystem.out.println(min);\n\t\t}\n\t}", "public static void main(String[] args, String value) {\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n\t\t\n\t\tint[] arr = Arrays.stream(br.readLine().split(\" \")).mapToInt(Integer::parseInt).toArray();\n\t\t\n\t\tArrays.sort(arr);\n\t\t\n\t\tint start = 0;\n\t\tint end = n-1;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint sIdx = 0, eIdx = n-1;\n\t\t\n\t\twhile(true) {\n\t\t\tif(start == end)\n\t\t\t\tbreak;\n\t\t\tint tmp = arr[start] + arr[end];\n\n\t\t\tif(min > Math.abs(tmp)) {\n\t\t\t\tmin = Math.abs(tmp);\n\t\t\t\tsIdx = start;\n\t\t\t\teIdx = end;\n\t\t\t}\n\n\t\t\tif(tmp < 0)\n\t\t\t\tstart++;\n\t\t\telse\n\t\t\t\tend--;\n\t\t}\n\t\t\n\t\tSystem.out.println(arr[sIdx] +\" \"+arr[eIdx]);\n\t}", "public static void parseArgs(String[] args) {\n int argc = args.length,\n i = 0;\n\n for (; i < argc; i++) {\n if (args[i].equals(\"-d\")) {\n debug = true;\n } \n else if(args[i].equals(\"-m\")) {\n try {\n maxRandInt = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Maximum random value must be a valid integer!\"\n );\n usage();\n }\n } else if(args[i].equals(\"-n\")) {\n try {\n iterations = Integer.parseInt(args[++i]);\n } catch(NumberFormatException e) {\n System.out.println(\n \"Iteration value must be a valid integer!\"\n );\n usage();\n }\n } else {\n filename = args[i];\n }\n }\n\n if (filename.equals(\"\")) {\n System.out.println(\"Must supply a filename!\\n\");\n usage();\n }\n \n }", "public static void main(String[] args) {\n\t\tString s = \"10000\";\r\n\t\tSystem.out.println(maxScoreSplit(s));\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tint result = 0;\n\t\tint number = scanner.nextInt();\n\t\t\n\t\tif(number <= 99) {\n\t\t\tSystem.out.print(number);\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tif(number == 1000){\n\t\t\t\tnumber = 999;\n\t\t\t}\n\t\t\t\n\t\t\tresult = 99 + getResult(number);\n\t\t\t\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "public static void main(String[] args) {\n\t\tint [] numbers = new int[100];\n\t\t\n\t\t// Fill the array with random values\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tnumbers[i] = (int) (Math.random() * 100) + 1;\n\t\t}\n\t\t\n\t\t// Find the Average\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tsum = sum + numbers[i];\n\t\t}\n\t\tSystem.out.println(\"Average = \" + ((double)sum / numbers.length));\n\t\t\n\t\t// Find the Max\n\t\tint max = -1;\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tif (numbers[i] > max) {\n\t\t\t\tmax = numbers[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"max = \" + max);\n\t\n\t\t// Find the Min\n\t\tint min = 101;\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tif (numbers[i] < min) {\n\t\t\t\tmin = numbers[i];\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"min = \" + min);\n\t\t\n\t\t// Find the range\n\t\tint range = max - min;\n\t\tSystem.out.println(\"range = \" + range);\n\t\t\n\t\t/*\n\t\t// Display the array\n\t\tfor (int i = 0; i < numbers.length; i++) {\n\t\t\tSystem.out.println(\"numbers[\" + i + \"] = \" + numbers[i]);\n\t\t}\n\t\t*/\n\n\t}" ]
[ "0.6384244", "0.6233277", "0.5990945", "0.59875023", "0.59294444", "0.5888159", "0.58272856", "0.5826732", "0.5760381", "0.575184", "0.5740837", "0.57306725", "0.5679029", "0.56581265", "0.5647806", "0.56392074", "0.563203", "0.56303644", "0.56216013", "0.56202394", "0.5611232", "0.5601357", "0.5595041", "0.5593245", "0.5579083", "0.5574799", "0.55476093", "0.5541903", "0.55051327", "0.5496582", "0.54929143", "0.54801905", "0.54796976", "0.5475752", "0.5472221", "0.54710454", "0.54528177", "0.5451431", "0.5450256", "0.54482365", "0.5428783", "0.54089427", "0.5407994", "0.53810906", "0.53784937", "0.533621", "0.5335881", "0.5332759", "0.5324501", "0.5323687", "0.5323319", "0.5320906", "0.53192174", "0.53062236", "0.52885264", "0.5278877", "0.5278228", "0.5272792", "0.52713567", "0.52696663", "0.5268637", "0.52660716", "0.5256791", "0.52555144", "0.5246672", "0.5237533", "0.52361023", "0.5206085", "0.5199088", "0.5194208", "0.5191603", "0.51900905", "0.51891613", "0.51694953", "0.5167475", "0.51528937", "0.51526153", "0.51507115", "0.5142387", "0.5140691", "0.51360023", "0.51336366", "0.51261556", "0.5125531", "0.5123566", "0.5105019", "0.5101588", "0.5101541", "0.50981104", "0.5094018", "0.50923693", "0.50914043", "0.5090774", "0.5090738", "0.5074237", "0.50728714", "0.506972", "0.5069626", "0.50615424", "0.5059461", "0.5059074" ]
0.0
-1
Se visualizan todas las piezas
public static void visualizarTodasLasPiezas(Monton todas){ System.out.println("\nVisualizando todas las piezas: "); System.out.println(todas.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPieModel() {\n pieModel = new PieChartModel();\n for (GraficoEsCarrera items : listagraficada) {//recorre la lista de datos de alumnos segun la carrera\n pieModel.set(items.getCarrera(), items.getCantidad());\n }\n pieModel.setTitle(\"ESTUDIANTES RESGITRADOS POR CARRERA\");\n pieModel.setLegendPosition(\"e\");\n pieModel.setFill(false);\n pieModel.setShowDataLabels(true);\n pieModel.setDiameter(150);\n }", "void setPiechart() {\r\n\t\tOrderA oa = new OrderA();\r\n\r\n\t\tMap<String, Integer> data = oa.getOrders();\r\n\t\tPieChart pieChart = new PieChart();\r\n\r\n\t\tlbltotalorder.setText(\"\" + oa.totalord);\r\n\r\n\t\tPieChart.Data slice1 = new PieChart.Data(\"Pending\", data.get(\"pen\"));\r\n\t\tPieChart.Data slice2 = new PieChart.Data(\"Recieved\", data.get(\"rec\"));\r\n\t\tPieChart.Data slice3 = new PieChart.Data(\"Running\", data.get(\"run\"));\r\n\t\tPieChart.Data slice4 = new PieChart.Data(\"Completed\", data.get(\"com\"));\r\n\r\n\t\tpieChart.getData().add(slice1);\r\n\t\tpieChart.getData().add(slice2);\r\n\t\tpieChart.getData().add(slice3);\r\n\t\tpieChart.getData().add(slice4);\r\n\r\n\t\tpieChart.setPrefSize(400, 250);\r\n\r\n\t\tpieChart.setLegendSide(Side.LEFT);\r\n\t\tpieChart.setStartAngle(30);\r\n\r\n\t\tpierect.getChildren().addAll(pieChart);\r\n\r\n\t}", "private void initPieChart() {\n\t\tPieChart chartLinguagens = new PieChart();\n\t\tchartLinguagens.setTitle(\"Ranking de Linguagens de Programação Mar/2013\");\n\t\tObservableList<PieChart.Data> datas = FXCollections.observableArrayList(\n\t\t\t\tnew PieChart.Data(\"Java\", 18.156),\n\t\t\t\tnew PieChart.Data(\"C\", 17.141), \n\t\t\t\tnew PieChart.Data(\"Objective-C\", 10.230),\n\t\t\t\tnew PieChart.Data(\"C++\", 9.115), \n\t\t\t\tnew PieChart.Data(\"C#\", 6.597), \n\t\t\t\tnew PieChart.Data(\"Outros\", 38.761));\n\t\tchartLinguagens.setData(datas);\n\t\tpane.getChildren().add(chartLinguagens);\n\t}", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "private void setDataPieChart() {\n\t\t\n\t\tchartPie.setTitle(\"Dépense par catégorie\");\n\t\tObservableList<PieChart.Data> pieChartData = FXCollections\n\t\t\t\t.observableArrayList();\n\t\t\n\t\tfor (CategoryLogic cl : ClientLogic.getInstance().getCategories()) {\n\t\t\tint outgo = 0;\n\t\t\tif (IOTransactionLogic.getTransactionsByCategory()\n\t\t\t\t\t.containsKey(cl)) {\n\t\t\t\tfor (IOTransactionLogic tr : IOTransactionLogic\n\t\t\t\t\t\t.getTransactionsByCategory().get(cl)) {\n\t\t\t\t\tif (!tr.isIncome()) {\n\t\t\t\t\t\toutgo += tr.getAmount() * (-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpieChartData.add(new PieChart.Data(cl.getName(), outgo));\n\t\t\t}\n\t\t}\n\t\t\n\t\tpieChartData.forEach(data -> data.nameProperty().bind(Bindings\n\t\t\t\t.concat(data.getName(), \" \", data.pieValueProperty(), \" CHF\")));\n\t\t\n\t\tchartPie.setData(pieChartData);\n\t\tchartPie.setLegendVisible(false);\n\t\t\n\t}", "@FXML private void affichePieChart() throws ClassNotFoundException, SQLException{\n piechart.getData().clear();\n ObservableList<Data> data = FXCollections.observableArrayList();\n LocalDate dt = LocalDate.now();\n int annee = Integer.parseInt(dt.format(DateTimeFormatter.ofPattern(\"yyyy\")))-10;\n XYChart.Series<String, Number> series = new XYChart.Series<>();\n for(int i=1 ; i<=10 ; i++){\n data.add(new PieChart.Data(String.valueOf(annee+i), daoreglements.findSomme(String.valueOf(annee+i))));\n }\n piechart.setData(data);\n }", "public void chart() {\r\n setLayout(new FlowLayout());\r\n String[] testNumbers = {\"LINEAR SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"};\r\n Object[][] testResult = {{\"500\", lin[0][0], lin[0][1], lin[0][2], lin[0][3], lin[0][4], lin[0][5], lin[0][6], lin[0][7], lin[0][8], lin[0][0], linAvAndDev[0][0], linAvAndDev[0][1]},\r\n {\"10,000\", lin[1][0], lin[1][1], lin[1][2], lin[1][3], lin[1][4], lin[1][5], lin[1][6], lin[1][7], lin[1][8], lin[1][9], linAvAndDev[1][0], linAvAndDev[1][1]},\r\n {\"100,000\", lin[2][0], lin[2][1], lin[2][2], lin[2][3], lin[2][4], lin[2][5], lin[2][6], lin[2][7], lin[2][8], lin[2][9], linAvAndDev[2][0], linAvAndDev[2][1]},\r\n {\"1,000,000\", lin[3][0], lin[3][1], lin[3][2], lin[3][3], lin[3][4], lin[3][5], lin[3][6], lin[3][7], lin[3][8], lin[3][9], linAvAndDev[3][0], linAvAndDev[3][1]},\r\n {\"5,000,000\", lin[4][0], lin[4][1], lin[4][2], lin[4][3], lin[4][4], lin[4][5], lin[4][6], lin[4][7], lin[4][8], lin[4][9], linAvAndDev[4][0], linAvAndDev[4][1]},\r\n {\"7,000,000\", lin[5][0], lin[5][1], lin[5][2], lin[5][3], lin[5][4], lin[5][5], lin[5][6], lin[5][7], lin[5][8], lin[5][9], linAvAndDev[5][0], linAvAndDev[5][1]},\r\n {\"10,000,000\", lin[6][0], lin[6][1], lin[6][2], lin[6][3], lin[6][4], lin[6][5], lin[6][6], lin[6][7], lin[6][8], lin[6][9], linAvAndDev[6][0], linAvAndDev[6][1]},\r\n {\"BINARY SEARCH\", \"TEST 1\", \"TEST 2\", \"TEST 3\", \"TEST 4\", \"TEST 5\", \"TEST 6\", \"TEST 7\", \"TEST 8\", \"TEST 9\", \"TEST 10\", \"AVERAGE\", \"STANDARD DEV.\"},\r\n {\"500\", bin[0][0], bin[0][1], bin[0][2], bin[0][3], bin[0][4], bin[0][5], bin[0][6], bin[0][7], bin[0][8], bin[0][9], linAvAndDev[7][0], linAvAndDev[7][1]},\r\n {\"10,000\", bin[1][0], bin[1][1], bin[1][2], bin[1][3], bin[1][4], bin[1][5], bin[1][6], bin[1][7], bin[1][8], bin[1][9], linAvAndDev[8][0], linAvAndDev[8][1]},\r\n {\"100,000\", bin[2][0], bin[2][1], bin[2][2], bin[2][3], bin[2][4], bin[2][5], bin[2][6], bin[2][7], bin[2][8], bin[2][9], linAvAndDev[9][0], linAvAndDev[9][1]},\r\n {\"1,000,000\", bin[3][0], bin[3][1], bin[3][2], bin[3][3], bin[3][4], bin[3][5], bin[3][6], bin[3][7], bin[3][8], bin[3][9], linAvAndDev[10][0], linAvAndDev[10][1]},\r\n {\"5,000,000\", bin[4][0], bin[4][1], bin[4][2], bin[4][3], bin[4][4], bin[4][5], bin[4][6], bin[4][7], bin[4][8], bin[4][9], linAvAndDev[11][0], linAvAndDev[11][1]},\r\n {\"7,000,000\", bin[5][0], bin[5][1], bin[5][2], bin[5][3], bin[5][4], bin[5][5], bin[5][6], bin[5][7], bin[5][8], bin[5][9], linAvAndDev[12][0], linAvAndDev[12][1]},\r\n {\"10,000,000\", bin[6][0], bin[6][1], bin[6][2], bin[6][3], bin[6][4], bin[6][5], bin[6][6], bin[6][7], bin[6][8], bin[6][9], linAvAndDev[13][0], linAvAndDev[13][1]}};\r\n chart = new JTable(testResult, testNumbers);\r\n chart.setPreferredScrollableViewportSize(new Dimension(1500, 500)); // SETS SIZE OF CHART.\r\n chart.setFillsViewportHeight(true);\r\n JScrollPane scrollPane = new JScrollPane(chart);\r\n add(scrollPane);\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 void grafica(int[][] entradas) throws Exception {\n \n jPanelGrafica.setLayout(new java.awt.BorderLayout());\n DefaultCategoryDataset line_chart_dataset = new DefaultCategoryDataset();\n\n ciclo: {\n for (int i = 0; i < entradas.length; i++) {\n if (entradas[i][1] != 0) {\n Producto producto = buscarProducto(entradas[i][0]);\n line_chart_dataset.addValue(entradas[i][1], \"cantidad\", producto.getNombre());\n } else {\n break ciclo;\n }\n } \n }\n JFreeChart chart = ChartFactory.createLineChart(\"Relación precio/cantidad\",\n \"Cantidad\",\"Precio\",line_chart_dataset,PlotOrientation.VERTICAL,\n true,true,false);\n \n ChartPanel panel = new ChartPanel(chart);\n jPanelGrafica.add(panel,BorderLayout.CENTER);\n jPanelGrafica.validate();\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n \r\n //Stage stage = new Stage();\r\n //Scene scene = new Scene();\r\n /*stage.setTitle(\"Résultat sondage\");\r\n stage.setWidth(500);\r\n stage.setHeight(500);*/\r\n \r\n \r\n \r\n GestionStatistiques gs = new GestionStatistiques();\r\n int nbrTotalReponses = gs.countReponsesSondage(SondageController.sondage.getId());\r\n //System.out.println(nbrTotalReponses);\r\n GestionReponsesPossibles grp=new GestionReponsesPossibles();\r\n ArrayList<Integer> lrp=new ArrayList<>();\r\n for(ReponsesPossibles rp :grp.ListReponsesPossibles(SondageController.sondage.getId())){\r\n lrp.add(rp.getId_reponse());\r\n \r\n }\r\n \r\n \r\n \r\n ObservableList<PieChart.Data> pieChartData =\r\n FXCollections.observableArrayList(\r\n new PieChart.Data(\"★\", gs.countStat(SondageController.sondage.getId(), lrp.get(0))),\r\n new PieChart.Data(\"★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(1))),\r\n new PieChart.Data(\"★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(2))),\r\n new PieChart.Data(\"★★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(3))),\r\n new PieChart.Data(\"★★★★★\", gs.countStat(SondageController.sondage.getId(), lrp.get(4))));\r\n final PieChart chart = new PieChart(pieChartData);\r\n chart.setTitle(SondageController.sondage.getNom()+\"\\n\"+\"Nombre total des réponses : \"+nbrTotalReponses);\r\n \r\n \r\n \r\n /**/\r\n Label caption = new Label(\"\");\r\n caption.setTextFill(Color.BLACK);\r\n caption.setStyle(\"-fx-font: 24 roboto;\");\r\n \r\n\r\n for (PieChart.Data data : chart.getData()) {\r\n data.getNode().addEventHandler(MouseEvent.MOUSE_CLICKED,\r\n new EventHandler<MouseEvent>() {\r\n @Override public void handle(MouseEvent e) {\r\n \r\n caption.setTranslateX(e.getSceneX()-240);\r\n caption.setTranslateY(e.getSceneY()-110);\r\n caption.setText(String.format(\"%.1f\",(data.getPieValue())/nbrTotalReponses*100) + \"%\");\r\n }\r\n });\r\n}\r\n \r\n \r\n \r\n \r\n /**/\r\n \r\n \r\n \r\n \r\n chart.setPrefWidth(600);\r\n chart.setPrefHeight(484);\r\n paneID.getChildren().add(chart);\r\n paneID.getChildren().add(caption);\r\n \r\n \r\n //scene.getRoot().getChildren().add(chart);\r\n /*stage.setScene(scene);\r\n stage.show();*/\r\n }", "public void MakePie() {\n\t\tPieButton = new JButton(\n\t\t\t\t new ImageIcon(getClass().getResource(GetPieChartImage())));\n\t\tPieButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tGetHost().instructionText.setVisible(false);\n\t\t\t\tGetHost().ExportEnabled();\n\t\t\t\tJPanel piecharts = new JPanel();\n\t\t\t\tpiecharts.setLayout(new WrapLayout());\n\t\t\t\tpiecharts.setSize(new Dimension(600,400));\n\t\t\t\tpiecharts.setBackground(Color.WHITE);\n\t\t\t\t\n\t\t\t\tif(GetHost().GetColumns().length == 1){\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\tpiecharts.add(new PieChart(GetHost().GetGraphData(), \n\t\t\t\t\t\t\"Pie Chart\", \n\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), 0));\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tif(GetHost().GetTitle() == UNSET) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int i = 1; i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\tGetHost().GetGraphData(), \"Pie Chart\", \n\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else {\n\t\t\t\t\t\t\tfor(int i=1;i<GetHost().GetColumns().length; i++){\n\t\t\t\t\t\t\t\tSetIncrement(i);\n\t\t\t\t\t\t\t\tpiecharts.add(new PieChart(\n\t\t\t\t\t\t\t\tGetHost().GetGraphData(), \n\t\t\t\t\t\t\t\tGetHost().GetTitle(), \n\t\t\t\t\t\t\t\tGetHost().GetColourScheme(), GetHost(), i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\tHolder = new JScrollPane();\n\t\t\tHolder.setPreferredSize(new Dimension(800,450));\n\t\t\tHolder.setViewportView(piecharts);\n\t\t\tHolder.setVisible(true);\n\t\t\t\t\n\t\t\tGetHost().LeftPanelContent(Holder);\n\t\t\t}\n\t\t});\n\t\t\n\t\tChartTypeInterface.add(PieButton);\t\n\t}", "private void showBars() {\n graph.removeAllSeries();\n Log.d(\"ShowGraph \", \"started\");\n Log.d(\"Tuples length \", tuples.size() + \"\");\n ArrayList<Double> vkupno = new ArrayList<Double>();\n //vo vkupno, sekoj element, e vkupnata vrednost za nutrientot pod toj broj\n int brNutrienti = values.size();\n Log.d(\"Values length\", brNutrienti + \"\");\n for (int i = 0; i < brNutrienti; i++) {\n vkupno.add(i, 0.0);\n }\n Iterator<String> it = values.iterator();\n String currentNutrient = null;\n double dodadi = 0;\n for (int j = 0; j < brNutrienti; j++) {\n currentNutrient = it.next();\n for (int i = 0; i < tuples.size(); i++) {\n Tuple currentTuple = tuples.get(i);\n if (currentNutrient.equals(\"Protein\")) {\n dodadi = (currentTuple.getProtein()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Total lipid (fat)\")) {\n dodadi = (currentTuple.getLipid()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Carbohydrate\")) {\n dodadi = (currentTuple.getCarbohydrate()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Glucose\")) {\n dodadi = (currentTuple.getGlucose()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Calcium\")) {\n dodadi = (currentTuple.getCalcium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Iron\")) {\n dodadi = (currentTuple.getIron()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Magnesium\")) {\n dodadi = (currentTuple.getMagnesium()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Zinc\")) {\n dodadi = (currentTuple.getZinc()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin C\")) {\n dodadi = (currentTuple.getVitaminC()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Thiamin\")) {\n dodadi = (currentTuple.getThiamin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Riboflavin\")) {\n dodadi = (currentTuple.getRibofavin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Niacin\")) {\n dodadi = (currentTuple.getNiacin()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B6\")) {\n dodadi = (currentTuple.getVitaminB6()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin B12\")) {\n dodadi = (currentTuple.getVitaminB12()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"VitaminA\")) {\n dodadi = (currentTuple.getVitaminA()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin D\")) {\n dodadi = (currentTuple.getVitaminD()) * currentTuple.getQuantity() / 100;\n } else if (currentNutrient.equals(\"Vitamin E\")) {\n dodadi = (currentTuple.getVitaminE()) * currentTuple.getQuantity() / 100;\n }\n dodadi = dodadi + vkupno.get(j);\n vkupno.set(j, dodadi);\n dodadi = 0;\n }\n }\n Log.d(\"Posle polenje na vkupno\", \"sfsfsdf\");\n //posle ova vo vkupno se sodrzhat y vrednostite za grafikot\n DataPoint[] dpArray = new DataPoint[vkupno.size()];\n for (int i = 0; i < vkupno.size(); i++) {\n dpArray[i] = new DataPoint(i + 1, vkupno.get(i));\n intake.add(vkupno.get(i));\n Log.d(\"y(\" + i + \")=\", vkupno.get(i) + \"\");\n }\n BarGraphSeries<DataPoint> series = new BarGraphSeries<DataPoint>(dpArray);\n graph.addSeries(series);\n // styling\n series.setValueDependentColor(new ValueDependentColor<DataPoint>() {\n @Override\n public int get(DataPoint data) {\n return Color.rgb((int) data.getX() * 255 / 4, (int) Math.abs(data.getY() * 255 / 6), 100);\n }\n });\n series.setSpacing(1);\n series.setDataWidth(0.2);\n // draw values on top\n series.setDrawValuesOnTop(true);\n series.setValuesOnTopColor(Color.BLACK);\n /* StaticLabelsFormatter staticLabelsFormatter = new StaticLabelsFormatter(graph);\n staticLabelsFormatter.setHorizontalLabels(new String[] {\"CH\", \"F\", \"Pr\",\"Mi\"});\n graph.getGridLabelRenderer().setLabelFormatter(staticLabelsFormatter);\n */\n //graph.getLegendRenderer().setVisible(true);\n graph.getLegendRenderer().setAlign(LegendRenderer.LegendAlign.TOP);\n }", "public void fillPieChart(){\n pieChartData = FXCollections.observableArrayList();\n for (Map.Entry<String, Integer> entry : nameToWins.entrySet()) {\n double percentage = (entry.getValue() * 100) / Integer.valueOf(totalGames).doubleValue();\n String strPercentage = formatDec(percentage);\n pieChartData.add(new PieChart.Data(entry.getKey() + \" (\" + strPercentage + \"%)\", entry.getValue()));\n }\n if (gamesWithoutWinner > 0) {\n pieChartData.add(new PieChart.Data(\"No winner\", gamesWithoutWinner));\n }\n chart.setData(pieChartData);\n chart.setTitle(\"Winners by percentage\");\n\n\n lblCaption.setTextFill(Color.web(\"#404040\", 1.0));\n lblCaption.setStyle(\"-fx-font: 24 arial;\");\n\n // set percentages\n for (PieChart.Data data : chart.getData()) {\n data.getNode().addEventHandler(MouseEvent.MOUSE_PRESSED,\n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent e) {\n lblCaption.setTranslateX(e.getSceneX());\n lblCaption.setTranslateY(e.getSceneY());\n double percentage = (data.getPieValue() * 100) / Integer.valueOf(totalGames).doubleValue();\n String strPercentage = formatDec(percentage);\n lblCaption.setText(String.valueOf(strPercentage + \"%\"));\n }\n });\n }\n // add pieChart and caption\n if (!diagramBox.getChildren().contains(chart))\n diagramBox.getChildren().add(chart);\n if (!root.getChildren().contains(lblCaption))\n root.getChildren().add(lblCaption);\n }", "public static void main(String[] args) throws SQLException {\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n try {\n int nilaiKiloan = 0;\n int nilaiSatuan = 0;\n\n pieChart frame = new pieChart();\n frame.setVisible(true);\n String queryKiloan = \"SELECT COUNT(*) FROM laundry WHERE jenis_layanan='Laundry Kiloan'\";\n String querySatuan = \"SELECT COUNT(*) FROM laundry WHERE jenis_layanan='Laundry Satuan'\";\n ConnectionDB.InstanceDB.openConnection();\n ResultSet rs = ConnectionDB.InstanceDB.RunSelectQuery(queryKiloan);\n while (rs.next()) {\n nilaiKiloan = rs.getInt(1);\n }\n System.out.println(nilaiKiloan);\n\n ResultSet rs1 = ConnectionDB.InstanceDB.RunSelectQuery(querySatuan);\n while (rs1.next()) {\n nilaiSatuan = rs1.getInt(1);\n }\n System.out.println(nilaiSatuan);\n DefaultPieDataset pieDataset = new DefaultPieDataset();\n pieDataset.setValue(\"Laundry Kiloan\", nilaiKiloan);\n pieDataset.setValue(\"Laundry Satuan\", nilaiSatuan);\n \n JFreeChart chart=ChartFactory.createPieChart3D(\n \"Perbandingan Pengguna Layanan Laundry\", \n pieDataset, \n true, \n true, \n false);\n ChartPanel cPanel = new ChartPanel(chart);\n frame.setContentPane(cPanel);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }", "public void View()\n\t{\n\t\tDefaultPieDataset pieDataset = new DefaultPieDataset();\n\t\t\n\t\tfor(String key : result.keySet())\n\t\t{\n\t\t\tpieDataset.setValue(key, Double.parseDouble(result.get(key).toString()));\n\t\t}\n\t\t\n\t\tJFreeChart chart = ChartFactory.createPieChart(title, pieDataset, true, true, true);\n\t\t\n\t\tChartFrame frame = new ChartFrame(\"Pie Chart\", chart);\n\t\t\n\t\tframe.setVisible(true);\n\t\tframe.setSize(450,500);\n\t}", "public void createPieChart(HashMap<String,Integer> mapValues) {\n\t PieDataset dataset = createDataset(mapValues);\n\t JFreeChart chart = ChartFactory.createPieChart(\n\t \"Quality of Detection Pie Chart\",\n\t dataset,\n\t true, \n\t true,\n\t false);\n\t PieSectionLabelGenerator labelGenerator = new StandardPieSectionLabelGenerator(\n\t \"Quality {0} : ({2})\", new DecimalFormat(\"0\"), new DecimalFormat(\"0%\"));\n\t ((PiePlot) chart.getPlot()).setLabelGenerator(labelGenerator);\n\t ChartPanel panel = new ChartPanel(chart); \n\t JFrame jframe = new JFrame();\n\t jframe.add(panel);\n\t jframe.setVisible(true);\n\t jframe.pack();\n\t jframe.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t }", "public void dibujarPieza(Canvas canvas, Pieza[] pieza){\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[0].x][this.pieza[0].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[1].x][this.pieza[1].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[2].x][this.pieza[2].y], canvas);\r\n tablero.pintarCelda(tablero.getTipoPieza()[this.pieza[3].x][this.pieza[3].y], canvas);\r\n }", "private void initPieChart(){\n }", "public ShannonsPieChart(ShannonsController ctl){\n\t\t controller = ctl;\n\t\tinitGUI();\n\t}", "private PieData generateDataPie() {\n\n ArrayList<PieEntry> entries = new ArrayList<>();\n String year = year_txt.getText().toString();\n String month1 =Utilities.getMonth(months,month_txt.getText().toString());\n TransactionBeans transactionBeans = transactionDB.getTransactionRecordsYear(month1,year);\n if(transactionBeans!=null) {\n float income = 0;\n float expense = 0;\n try{\n income = (float) (Double.parseDouble(transactionBeans.getIncome()));\n }catch(Exception e){\n income = 0;\n }\n try{\n expense = (float) (Double.parseDouble(transactionBeans.getExpense()));\n }catch(Exception e){\n expense = 0;\n }\n entries.add(new PieEntry(income, \"Income \"));\n entries.add(new PieEntry(expense, \"Expense \"));\n }\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n return new PieData(d);\n }", "private void setPieChartData(Poll aPoll) {\n \tObservableList<Poll> pieChartPoll;\n \tint numberofParties = Factory.getInstance().getPartyNames().length; //number of parties\n \tPieChart.Data[] data = new PieChart.Data[numberofParties];\n \tPieChart.Data[] dataVotes = new PieChart.Data[numberofParties];\n \tParty[] sortedBySeats = aPoll.getPartiesSortedBySeats();\n \tParty[] sortedByVotes = aPoll.getPartiesSortedByVotes();\n \t// make this a loop instead. Based on the size of sortedSeats\n \tint i = 0;\n \tfor (i = 0; i < data.length; i++) {\n \t\tdata[i] = new PieChart.Data(sortedBySeats[i].getName(), sortedBySeats[i].getProjectedNumberOfSeats());\n \t\tdataVotes[i] = new PieChart.Data(sortedByVotes[i].getName(), sortedByVotes[i].getProjectedPercentageOfVotes());\n \t}\n \tseatsPieChart.setData(FXCollections.observableArrayList(data)); \n \tprecentVotesPieChart.setData(FXCollections.observableArrayList(dataVotes));\n }", "private PieDataset createDataset() {\n JOptionPane.showMessageDialog(null, \"teste\"+dados.getEntrada());\r\n \r\n DefaultPieDataset result = new DefaultPieDataset();\r\n result.setValue(\"Entrada\", dados.getEntrada());\r\n result.setValue(\"Saida\", dados.getSaida());\r\n result.setValue(\"Saldo do Periodo\", dados.getSaldo());\r\n return result;\r\n\r\n }", "public JPanel graficarMem (){\r\n\t\tJPanel panel = new JPanel(){\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\t// dibujo la memoria\r\n\t\t\t\tint xpoints[] = { 20, 20, 140, 140};\r\n\t\t\t\tint ypoints[] = { 0, 15 * tamaņo,15 * tamaņo, 0 };\r\n\t\t\t\tint npoints = 4;\r\n\t\t\t\tg.drawPolygon(xpoints, ypoints, npoints);\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las lineas de separacion de los espacios de la memoria\r\n\t\t\t\tint altura = 0;\r\n\t\t\t\tint sumaEspacios = 0;\r\n\t\t\t\tg.drawString(sumaEspacios + \"\", 0, 15);\r\n\t\t\t\tfor(int i = 0; i < numEspacios; i++){\r\n\t\t\t\t\taltura += espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tsumaEspacios += espacios[i].getTamaņo();\r\n\t\t\t\t\tg.drawString(sumaEspacios + \"\", 0, altura);\r\n\t\t\t\t\tg.drawString(espacios[i].getTamaņo() + \"\", 140, altura - (espacios[i].getTamaņo() * 15) / 2);\r\n\t\t\t\t\tg.drawLine(20, altura, 140, altura);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las variables de los espacios\r\n\t\t\t\tint altura1 = 0;\r\n\t\t\t\tBasicStroke Bs = new BasicStroke(2f);\r\n\t\t\t\tGraphics2D g2D = (Graphics2D) g;\r\n\t\t\t\tg2D.setStroke(Bs);\r\n\t\t\t\tfor (int i = 0; i < numEspacios; i++) {\r\n\t\t\t\t\tint tamV = 0;\r\n\t\t\t\t\tint tamE = espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tint alturaV = altura1; \r\n\t\t\t\t\tfor (int j = 0; j < espacios[i].getVarEnMem().size(); j++) {\r\n\t\t\t\t\t\ttamV = espacios[i].getVarEnMem().get(j).getTamaņo() * 15;\r\n\t\t\t\t\t\tint puntosY[] = { alturaV, alturaV + tamV, alturaV + tamV, alturaV};\r\n\t\t\t\t\t\tg2D.setColor(espacios[i].getVarEnMem().get(j).getColor());\r\n\t\t\t\t\t\tif (espacios[i].getVarEnMem().get(j).getTamaņo() > 1) {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + (tamV / 2));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + tamV);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg2D.drawPolygon(xpoints, puntosY, npoints);\r\n\t\t\t\t\t\talturaV += tamV; \r\n\t\t\t\t\t}\r\n\t\t\t\t\taltura1 += tamE;\r\n\t\t\t\t}\r\n\t\t\t\tg2D.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tpanel.setPreferredSize(new Dimension(160, 15*this.getTamaņo() + 10));\r\n\t\t\r\n\t\treturn panel;\r\n\t}", "private void plotDato() {\n List<Entry> entriesMedidas = new ArrayList<Entry>();\n entriesMedidas.add(new Entry((float) dato.getYears(), (float) dato.getMeasures()[mag]));\n LineDataSet lineaMedidas = new LineDataSet(entriesMedidas, \"Medida\");\n lineaMedidas.setAxisDependency(YAxis.AxisDependency.LEFT);\n lineaMedidas.setColor(ColorTemplate.rgb(\"0A0A0A\"));\n lineaMedidas.setCircleColor(ColorTemplate.rgb(\"0A0A0A\"));\n todasMedidas.add(lineaMedidas);\n }", "private PanelTester()\n {\n /**/\n //f.add(new CardSelector(0, 0, width, height, \"TEST\"));\n\n // 73 Total\n// Slice[] slices2 = { new Slice(5, Color.BLACK,\"BLACK\"),\n// new Slice(33, Color.GREEN,\"GREEN\"),\n// new Slice(20, Color.YELLOW,\"YELLOW\"), new Slice(15, Color.RED,\"RED\") };\n//\n// Slice[] slices = { new Slice(0.64, Color.GREEN, \"Organic\"),\n// new Slice(52.6590008, Color.BLUE, \"Conventional\" ),\n// new Slice(46.7009992, Color.RED, \"GMO\" ) };\n//\n// ArrayList<Slice> sliceArray = new ArrayList<>();\n// for( int i = 0; i < slices.length ; i++)\n// {\n// sliceArray.add( slices[i] );\n// }\n// f.add(new PieChart( f.getBounds(), sliceArray ) );\n// Rectangle temp = new Rectangle(0,0,100,100);\n //f.add(new ChartKey(temp, sliceArray ));\n /**/\n\n\n\n f.add(new AvailableCropsBar(\"test\", new Color(134,255, 109,255),100,60,20,300,50));\n\n\n\n\n\n //f.pack();\n }", "private PieData generateDataPie(int cnt) {\n\n ArrayList<PieEntry> entries = new ArrayList<PieEntry>();\n\n for (int i = 0; i < 4; i++) {\n entries.add(new PieEntry((float) ((Math.random() * 70) + 30), \"Quarter \" + (i+1)));\n }\n\n PieDataSet d = new PieDataSet(entries, \"\");\n\n // space between slices\n d.setSliceSpace(2f);\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n\n PieData cd = new PieData(d);\n return cd;\n }", "@Test\n public void test63() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) null);\n boolean boolean0 = combinedDomainCategoryPlot0.isRangeZoomable();\n boolean boolean1 = combinedDomainCategoryPlot0.isRangeGridlinesVisible();\n boolean boolean2 = combinedDomainCategoryPlot0.getDrawSharedDomainAxis();\n Layer layer0 = Layer.BACKGROUND;\n DeviationRenderer deviationRenderer0 = new DeviationRenderer(true, true);\n DrawingSupplier drawingSupplier0 = deviationRenderer0.getDrawingSupplier();\n combinedDomainCategoryPlot0.setDrawingSupplier((DrawingSupplier) null);\n Collection collection0 = combinedDomainCategoryPlot0.getRangeMarkers(2526, layer0);\n CategoryAxis categoryAxis0 = combinedDomainCategoryPlot0.getDomainAxis(2526);\n combinedDomainCategoryPlot0.configureDomainAxes();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo();\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo(chartRenderingInfo0);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n StandardEntityCollection standardEntityCollection0 = (StandardEntityCollection)categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo1 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo1.getPlotInfo();\n Number[][] numberArray0 = new Number[8][4];\n Number[] numberArray1 = new Number[1];\n float float0 = Component.BOTTOM_ALIGNMENT;\n numberArray1[0] = (Number) 1.0F;\n numberArray0[0] = numberArray1;\n Number[] numberArray2 = new Number[7];\n double double0 = PiePlot.DEFAULT_START_ANGLE;\n numberArray2[0] = (Number) 90.0;\n int int0 = ColorSpace.TYPE_BCLR;\n numberArray2[1] = (Number) 21;\n int int1 = Calendar.OCTOBER;\n numberArray2[2] = (Number) 9;\n int int2 = AffineTransform.TYPE_GENERAL_ROTATION;\n numberArray2[3] = (Number) 16;\n int int3 = PageFormat.LANDSCAPE;\n numberArray2[4] = (Number) 0;\n int int4 = ObjectStreamConstants.PROTOCOL_VERSION_2;\n numberArray2[5] = (Number) 2;\n int int5 = ColorSpace.TYPE_8CLR;\n numberArray2[6] = (Number) 18;\n numberArray0[1] = numberArray2;\n Number[] numberArray3 = new Number[1];\n int int6 = ColorSpace.CS_LINEAR_RGB;\n numberArray3[0] = (Number) 1004;\n numberArray0[2] = numberArray3;\n Number[] numberArray4 = new Number[0];\n numberArray0[3] = numberArray4;\n Number[] numberArray5 = new Number[2];\n int int7 = ColorSpace.TYPE_RGB;\n numberArray5[0] = (Number) 5;\n Integer integer0 = JLayeredPane.DRAG_LAYER;\n numberArray5[1] = (Number) integer0;\n numberArray0[4] = numberArray5;\n Number[] numberArray6 = new Number[6];\n numberArray6[0] = (Number) integer0;\n numberArray6[1] = (Number) integer0;\n numberArray6[2] = (Number) integer0;\n numberArray6[3] = (Number) integer0;\n numberArray6[4] = (Number) integer0;\n numberArray6[5] = (Number) integer0;\n numberArray0[5] = numberArray6;\n Number[] numberArray7 = new Number[0];\n numberArray0[6] = numberArray7;\n Number[] numberArray8 = new Number[2];\n numberArray8[0] = (Number) integer0;\n numberArray8[1] = (Number) integer0;\n numberArray0[7] = numberArray8;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(numberArray0, numberArray0);\n TableOrder tableOrder0 = TableOrder.BY_COLUMN;\n SpiderWebPlot spiderWebPlot0 = new SpiderWebPlot((CategoryDataset) defaultIntervalCategoryDataset0, tableOrder0);\n ThermometerPlot thermometerPlot0 = new ThermometerPlot((ValueDataset) null);\n RectangleInsets rectangleInsets0 = thermometerPlot0.getPadding();\n Rectangle2D.Float rectangle2D_Float0 = new Rectangle2D.Float((float) 21, 0.95F, 0.6F, (-170.0F));\n Rectangle2D.Double rectangle2D_Double0 = (Rectangle2D.Double)rectangleInsets0.createOutsetRectangle((Rectangle2D) rectangle2D_Float0);\n Point2D.Double point2D_Double0 = (Point2D.Double)spiderWebPlot0.getWebPoint(rectangle2D_Double0, 21.0F, 3215.444465);\n combinedDomainCategoryPlot0.zoomRangeAxes((double) 2526, plotRenderingInfo1, (Point2D) point2D_Double0);\n }", "@Override\r\n public void run() {\n chart = new PieChart();\r\n chart.setWidth(\"100px\");\r\n chart.setHeight(\"100px\");\r\n fp.add(chart);\r\n draw();\r\n }", "private void initGUI(){\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tDefaultPieDataset dataset = new DefaultPieDataset();// use to set value of pie chart\n\t\tdataset.setValue(\"Bandwidth\",0);//set initial result of the Bandwidth\n\t\tdataset.setValue(\"Signal To Noise\",0);//set initial result of the Signal To Noise\n\t\tdataset.setValue(\"Max Data Rate\",0);//set initial result of the max data rate\n\t\tsetMaxDataRateLBL(dataset); //Set the content of initial result of max data rate \n\t\tJFreeChart pieChart = ChartFactory.createPieChart(\"Shannons Theorem\", dataset, true,true,false);\n\t\t//pie plot use to multiply the pattern and display of pie chart\n\t\tPiePlot plot = (PiePlot)pieChart.getPlot();\n\t\tplot.setLabelFont(new Font(\"SansSerif\", Font.PLAIN, 12));\n //show the message if there is no data available\n\t\tplot.setNoDataMessage(\"No data available\");\n \n // make the result show the numbers on the pie chart\n plot.setLabelGenerator(new StandardPieSectionLabelGenerator(\"{0}: {1} ({2})\", new DecimalFormat(\"0\"), new DecimalFormat(\"0%\")));\n plot.setCircular(false);\n plot.setLabelGap(0.02);\n\t\tChartPanel cp = new ChartPanel(pieChart); //use to put pie chart into JPanel \n\t\tadd(cp);\n\t\tadd(createResult());\n\t}", "public void seleccionarPieza(java.awt.event.MouseEvent evt) {\n // Se pasa como parametro el evento\n CuadroPieza t = ((CuadroPieza) evt.getComponent());//Averiguo en que cuadro sucedio el evento\n if (t.getPieza() != null) {//Veo si el cuadro no esta vacio.\n if (t.getPieza().getColor() == getTurno()) {//Veo si es del mismo color del turno que actualmente le toca.\n cuadroSeleccionado = t;\n /*\n * Con esto hago que se resalten los posibles movimientos en todo el tablero.\n */\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].opacarPieza();//Si hay piezas seleccionadas, las opaco\n if (isSeleccionarAlternativas()) {//Resalto los posibles movimientos.\n if (cuadroSeleccionado.getPieza().validarMovimiento(tablero[x][y], this)) {\n tablero[x][y].resaltarPieza(tablero[x][y].getPieza() != null ? getAlerta() : null);\n }\n }\n }\n }\n /*\n * Resalto el cuadro que ha sido seleccionado para que el usuario sepa que cuadro selecciono\n */\n cuadroSeleccionado.resaltarPieza(getSeleccionado());\n /*\n * Establesco la imagen de la pieza que ha sido seleccionada al label.\n */\n tmp.setIcon(cuadroSeleccionado.getPieza().getImagenPieza());\n /*\n * borro la imagen de la pieza del cuadro.\n */\n cuadroSeleccionado.lbl.setIcon(null);\n /*\n * Establesco la nueva posicion del label, que tiene la imagen de la pieza.\n */\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }\n }\n }", "public void generateChart(){\n String[][] contents = retrieveFields();\n\n// String msg = \"test - \";\n// printCells(contents);\n\n String[] houseDisplay = new String[12];\n houseDisplay = new String[]{\"6\",\"4\",\"2\",\"1\",\"4\",\"6\",\"3\",\"5\",\"7/8\",\"\",\"5\",\"3\"};\n display(houseDisplay);\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "@Test\n public void test02() throws Throwable {\n Rectangle2D.Double rectangle2D_Double0 = new Rectangle2D.Double(0.0, (-317.2908), (-2943.525478), 2896.89);\n TaskSeriesCollection taskSeriesCollection0 = new TaskSeriesCollection();\n CategoryAxis categoryAxis0 = new CategoryAxis();\n MultiplePiePlot multiplePiePlot0 = new MultiplePiePlot((CategoryDataset) taskSeriesCollection0);\n JFreeChart jFreeChart0 = multiplePiePlot0.getPieChart();\n ChartPanel chartPanel0 = new ChartPanel(jFreeChart0, 3, 3, (-283), (-283), 125, (-283), true, true, false, true, false, true);\n BasicTreeUI basicTreeUI0 = new BasicTreeUI();\n BasicTreeUI.NodeDimensionsHandler basicTreeUI_NodeDimensionsHandler0 = basicTreeUI0.new NodeDimensionsHandler();\n SystemColor systemColor0 = SystemColor.activeCaption;\n LineBorder lineBorder0 = new LineBorder((Color) systemColor0);\n Rectangle rectangle0 = AbstractBorder.getInteriorRectangle((Component) chartPanel0, (Border) lineBorder0, 3, 0, 44, 70);\n Rectangle rectangle1 = basicTreeUI_NodeDimensionsHandler0.getNodeDimensions(taskSeriesCollection0, 0, 1999, true, rectangle0);\n Rectangle rectangle2 = chartPanel0.getBounds((Rectangle) null);\n boolean boolean0 = rectangle2D_Double0.contains((Rectangle2D) rectangle2);\n NumberAxis numberAxis0 = new NumberAxis();\n CategoryPlot categoryPlot0 = new CategoryPlot((CategoryDataset) taskSeriesCollection0, categoryAxis0, (ValueAxis) numberAxis0, (CategoryItemRenderer) null);\n PlotRenderingInfo plotRenderingInfo0 = new PlotRenderingInfo((ChartRenderingInfo) null);\n CategoryItemRendererState categoryItemRendererState0 = new CategoryItemRendererState(plotRenderingInfo0);\n EntityCollection entityCollection0 = categoryItemRendererState0.getEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) null);\n PlotRenderingInfo plotRenderingInfo1 = chartRenderingInfo0.getPlotInfo();\n MultiListUI multiListUI0 = new MultiListUI();\n StatisticalLineAndShapeRenderer[] statisticalLineAndShapeRendererArray0 = new StatisticalLineAndShapeRenderer[0];\n boolean boolean1 = plotRenderingInfo0.equals((Object) null);\n JList<StatisticalLineAndShapeRenderer> jList0 = new JList<StatisticalLineAndShapeRenderer>(statisticalLineAndShapeRendererArray0);\n // Undeclared exception!\n try { \n multiListUI0.indexToLocation(jList0, 671);\n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0 >= 0\n //\n assertThrownBy(\"java.util.Vector\", e);\n }\n }", "public void pulisci() {\n Cella c;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n c = getElementAt(griglia, i, j);\n c.cerchio.setVisible(false);\n }\n }\n }", "private void createchart() {\n int successcount = 0;\n int failedcount = 0;\n \n DefaultPieDataset barchartdata = new DefaultPieDataset();\n \n if(system == null && enterprise == null){\n for(Enterprise ent: network.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n else if(network == null && enterprise == null){\n for(Network net: system.getNetworkList()){\n for(Enterprise ent: net.getEnterpriseDirectory().getEnterpriseList()){\n for(WorkRequest request: ent.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n }\n }\n else{\n for(WorkRequest request: enterprise.getWorkQueue().getWorkQueue()){\n if(request.getStatus() == WorkRequest.Status.ENTERPRISE2ADMINAPPROVED || request.getStatus() == WorkRequest.Status.ORGANIZATION3ADMINAPPROVED)\n successcount++;\n else if(request.getStatus() == WorkRequest.Status.TESTFAILED)\n failedcount++;\n }\n }\n \n barchartdata.setValue( \"Successful Trials\",new Double(successcount));\n barchartdata.setValue(\"Failed trials\",new Double(failedcount));\n\n JFreeChart pieChart = ChartFactory.createPieChart(\"Successful versus failed trials\",barchartdata, false, true, false);\n final PiePlot plot=(PiePlot) pieChart.getPlot();\n ChartPanel barPanel = new ChartPanel(pieChart);\n\n dashboardpanel.removeAll();\n dashboardpanel.setLayout(new java.awt.BorderLayout());\n dashboardpanel.add(barPanel, BorderLayout.CENTER);\n dashboardpanel.validate();\n \n }", "public Graficar(final String title,String [][] valores) {\n super(title);\n this.valores=valores;\n final BoxAndWhiskerCategoryDataset dataset = createSampleDataset();\n final CategoryAxis xAxis = new CategoryAxis(\"Clases\");\n final NumberAxis yAxis = new NumberAxis(\"Numero de Instancias\");\n yAxis.setAutoRangeIncludesZero(false);\n final BoxAndWhiskerRenderer renderer = new BoxAndWhiskerRenderer();\n renderer.setFillBox(false);\n renderer.setToolTipGenerator(new BoxAndWhiskerToolTipGenerator());\n final CategoryPlot plot = new CategoryPlot(dataset, xAxis, yAxis, renderer);\n final JFreeChart chart = new JFreeChart(\n \"Gráfica de Caja\",\n new Font(\"SansSerif\", Font.BOLD, 16),\n plot,\n true\n );\n final ChartPanel chartPanel = new ChartPanel(chart);\n chartPanel.setPreferredSize(new java.awt.Dimension(400, 270));\n setContentPane(chartPanel);\n }", "public void afficherLru() {\n\t\tint nbrCols = listEtape.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Processus> list: listEtape) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\n\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtape.size();i++) {\n\t\t\tArrayList<Processus> list = listEtape.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\tProcessus p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + p.getValue());\n\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}", "public JPanel getRepresentacionGrafica();", "private void resetPieChart() {\n diagramBox.getChildren().clear();\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 void llenarCuadrosTablero() {\n tmp = new JLabel();\n tmp.setBounds(-100, -100, 56, 56);\n add(tmp);\n tablero = new CuadroPieza[8][8];\n setLayout(null);\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y] = new CuadroPieza(x, y);\n add(tablero[x][y]);// para agregar los elementos\n }\n }\n rePintarTablero();\n }", "private void addDataSet() {\n Log.d(TAG, \"addDataSet started\");\n ArrayList<PieEntry> yEntrys = new ArrayList<>();\n ArrayList<String> xEntrys = new ArrayList<>();\n\n for(int i = 0; i < yData.length; i++){\n yEntrys.add(new PieEntry(yData[i] , i));\n }\n\n for(int i = 1; i < xData.length; i++){\n xEntrys.add(xData[i]);\n }\n\n //Create the data set\n PieDataSet pieDataSet = new PieDataSet(yEntrys, \"Popularity stat\");\n pieDataSet.setSliceSpace(2);\n pieDataSet.setValueTextSize(12);\n pieDataSet.setValueTextColor(Color.WHITE);\n\n\n\n //Add colors to dataset\n ArrayList<Integer> colors = new ArrayList<>();\n colors.add(Color.BLUE);\n colors.add(Color.RED);\n colors.add(Color.GREEN);\n colors.add(Color.CYAN);\n colors.add(Color.YELLOW);\n colors.add(Color.MAGENTA);\n\n pieDataSet.setColors(colors);\n\n //Add legend to chart\n Legend legend = pieChart.getLegend();\n legend.setForm(Legend.LegendForm.DEFAULT);\n legend.setPosition(Legend.LegendPosition.ABOVE_CHART_CENTER);\n\n //Create pie data object\n PieData pieData = new PieData(pieDataSet);\n pieChart.setData(pieData);\n pieChart.invalidate();\n }", "public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }", "private void dibujarCasillas() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y] = new CoordPanel();\r\n panelTablero[x][y].addMouseListener(this);\r\n panelTablero[x][y].setCoordenadas(x, y);\r\n pnlMain.add(panelTablero[x][y]);\r\n }\r\n }\r\n }", "private void visualizaPersonajes() {\r\n\r\n\t\t// Recogemos nuestro personaje y comprobamos su personaje para mostrar una\r\n\t\t// imagen u\r\n\t\t// otra.\r\n\t\tthis.personaje = DatabaseOperaciones.getPersonaje();\r\n\r\n\t\tString clase = (personaje == null) ? null : personaje.getClass().toString().substring(24);\r\n\r\n\t\tif (clase != null) {\r\n\r\n\t\t\tthis.character1.setStyle(\"visibility: visible;\" + \"-fx-background-image: url('\"\r\n\t\t\t\t\t+ this.personaje.getAspecto() + \"'); \" + \"-fx-background-size: cover;\");\r\n\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tthis.character1.setStyle(\"visibility: hidden;\");\r\n\t\t}\r\n\r\n\t\tcompruebaPersonajes();\r\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g); // Wipes the screen\n\n\n if (array != null) {\n if (btnCircles.isSelected()) {\n // Circle\n\n float angle = (float) (2.0f * Math.PI / array.get_array_length());\n for (int i = 0; i < array.get_array_length(); i++) {\n // Change color via hue\n Color c = Color.getHSBColor(1.0f * array.get_value(i) / array.get_max_int(), 1.0f, 0.7f);\n g.setColor(c);\n\n // tRiGoNoMeTrY iS uSeFuL\n int[] x = {0, 0, 0};\n int[] y = {0, 0, 0};\n x[0] = canvas.getWidth() / 2;\n y[0] = canvas.getHeight() / 2;\n x[1] = (int) (x[0] * Math.cos((i) * angle + Math.PI / 2.0f) + x[0]);\n y[1] = (int) (y[0] * -Math.sin((i) * angle + Math.PI / 2.0f) + y[0]);\n x[2] = (int) (x[0] * Math.cos((i + 1) * angle + Math.PI / 2.0f) + x[0]);\n y[2] = (int) (y[0] * -Math.sin((i + 1) * angle + Math.PI / 2.0f) + y[0]);\n\n g.fillPolygon(x, y, 3);\n }\n } else {\n // Bars\n\n // Calculate box width and heights\n float column_width = 1.0f * canvas.getWidth() / array.get_array_length();\n float row_height = 1.0f * (canvas.getHeight()) / array.get_max_int();\n\n for (int i = 0; i < array.get_array_length(); i++) {\n // Change color\n Color c = Color.getHSBColor(1.0f * array.get_value(i) / array.get_max_int(), 1.0f, 0.7f);\n g.setColor(c);\n\n // Calculate x and y positions\n float x = i * column_width;\n x = Math.max(x, 1.0f);\n float y = canvas.getHeight() - (array.get_value(i) * row_height);\n\n // Draw box\n g.fillRect((int) x, (int) y, (int) column_width, canvas.getHeight() - (int) y);\n }\n }\n }\n }", "public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\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}", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "public Pie()\n\t{\n\t\tthis.setPreferredSize(new Dimension (1000, 1000));\n\t}", "private void paintCourbePoints() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) {\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) {\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\t//Utilisation d'un carre/losange pour simuler un point \n\t\t\t\t//de taille superieur a un pixel car celui-ci est peu visible.\n\t\t\t\tpaintPointInColor(i-2, j);\n\t\t\t\tpaintPointInColor(i-1, j-1);\t\t\t\t\n\t\t\t\tpaintPointInColor(i-1, j);\n\t\t\t\tpaintPointInColor(i-1, j+1);\n\t\t\t\tpaintPointInColor(i, j-2);\t//\t *\n\t\t\t\tpaintPointInColor(i, j-1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j);\t//\t* * * * *\n\t\t\t\tpaintPointInColor(i, j+1);\t//\t * * *\n\t\t\t\tpaintPointInColor(i, j+2);\t//\t *\n\t\t\t\tpaintPointInColor(i+1, j-1);\n\t\t\t\tpaintPointInColor(i+1, j);\n\t\t\t\tpaintPointInColor(i+1, j+1);\n\t\t\t\tpaintPointInColor(i+2, j);\n\t\t\t}\n\t\t}\t\t\n\t}", "public ChartController()\n {\n \tthis.pieModel = new PieChartModel();\n \tthis.pieModel.set(\"\", 0);\n \tthis.categoryModel = new CartesianChartModel() ;\n \tChartSeries fakultas = new ChartSeries() ;\n \tfakultas.set(\"\", 0);\n \tthis.categoryModel.addSeries(fakultas);\n }", "@Override\r\n public void paint(Graphics g) {\n super.paint(g);\r\n Color col = new Color(255, 255, 255);//color gris\r\n g.drawLine(0, 20, 245, 20);//pinta una linea en la parte superior de la ventana\r\n Dimension size = getSize();//encapsula el tamñao de un objeto\r\n int parteSuperiorTablero = (int) size.getHeight() - altoTablero * alturaPieza();\r\n\r\n for (int i = 0; i < altoTablero; ++i) {\r\n for (int j = 0; j < anchoTablero; ++j) {\r\n PiezasTetris pieza = dimensionar(j, altoTablero - i - 1);\r\n if (pieza != PiezasTetris.NoPieza) {\r\n pintarPiezas(g, 0 + j * anchoPieza(),\r\n parteSuperiorTablero + i * alturaPieza(), pieza);\r\n }\r\n }\r\n }\r\n\r\n if (piezaActual.getPieza() != PiezasTetris.NoPieza) {\r\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 pintarPiezas(g, 0 + x * anchoPieza(),\r\n parteSuperiorTablero + (altoTablero - y - 1) * alturaPieza(),\r\n piezaActual.getPieza());\r\n }\r\n }\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) { \n \n XYChart.Series series = new XYChart.Series<>();\n \n \n series.setName(\"Gagnant\");\n series.getData().add(new XYChart.Data(\"Jan\", 100));\n series.getData().add(new XYChart.Data(\"Fev\", 170));\n series.getData().add(new XYChart.Data(\"Mars\", 197));\n series.getData().add(new XYChart.Data(\"Avr\", 160));\n series.getData().add(new XYChart.Data(\"Mai\", 165));\n series.getData().add(new XYChart.Data(\"Juin\", 179));\n series.getData().add(new XYChart.Data(\"Juil\", 195));\n series.getData().add(new XYChart.Data(\"Aout\", 140));\n series.getData().add(new XYChart.Data(\"Sept\", 121));\n series.getData().add(new XYChart.Data(\"Oct\", 173));\n series.getData().add(new XYChart.Data(\"Nov\", 185));\n series.getData().add(new XYChart.Data(\"Dec\", 150));\n \n XYChart.Series perdant = new XYChart.Series<>();\n perdant.setName(\"Perdant\");\n \n perdant.getData().add(new XYChart.Data(\"Jan\", 80));\n perdant.getData().add(new XYChart.Data(\"Fev\", 60));\n perdant.getData().add(new XYChart.Data(\"Mars\", 80));\n perdant.getData().add(new XYChart.Data(\"Avr\", 70));\n perdant.getData().add(new XYChart.Data(\"Mai\", 70));\n perdant.getData().add(new XYChart.Data(\"Juin\", 60));\n perdant.getData().add(new XYChart.Data(\"Juil\", 100));\n perdant.getData().add(new XYChart.Data(\"Aout\", 80));\n perdant.getData().add(new XYChart.Data(\"Sept\", 50));\n perdant.getData().add(new XYChart.Data(\"Oct\", 79));\n perdant.getData().add(new XYChart.Data(\"Nov\", 70));\n perdant.getData().add(new XYChart.Data(\"Dec\", 12));\n \n\n Tooltip tooltip = new Tooltip(\"Le nombre de gagnants ou cours des mois augmentent souvent.\");\n areaChart.getStylesheets().add(\"-fx-color:green;\");\n areaChart.getData().addAll(series, perdant);\n BarChart.getStylesheets().add(\"chart-bar series<1> bar-legend-symbol default-color<red>\");\n BarChart.getData().addAll(perdant);\n\n\n }", "public void dibujarSubformula(Nodo act, int x, int y, int x2, int y2, JPanel p, Color colorP) {\n\n Graphics2D g = (Graphics2D) p.getGraphics();\n\n if (colorP != null) {\n System.out.println(\"diferente de null\");\n color = colorP;\n }\n\n if (act == null) {\n return;\n } else {\n int ancho = act.valor.length();\n\n g.setColor(Color.BLACK);\n g.drawLine(x + 15, y + 3, x2 + 15, y2 + 30);\n\n System.out.println(color.toString());\n g.setColor(color);\n\n //el dibujo del circulo dependiendo la cantidad de letras y simbolos\n if (ancho >= 0 && ancho <= 2) {\n g.setColor(color);\n g.fillOval(x, y, 30, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 11, (y) + 20);\n\n System.out.println(\"0 y 2\");\n }\n\n if (ancho >= 3 && ancho <= 5) {\n g.setColor(color);\n g.fillOval(x, y, 40, 33);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) + 5, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 6 && ancho <= 8) {\n g.setColor(color);\n g.fillOval(x - 18, y, 55, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x) - 11, (y) + 20);\n System.out.println(\"3 y 8\");\n }\n if (ancho >= 9 && ancho <= 13) {\n g.setColor(color);\n g.fillOval(x - 25, y + 3, 85, 30);\n\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 30) + 12, (y) + 25);\n System.out.println(\"9 y 13\");\n }\n if (ancho >= 14 && ancho <= 18) {\n g.setColor(color);\n g.fillOval(x - 25, y + 10, 115, 30);\n System.out.println(\"14 y 18\");\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 20) + 12, (y) + 30);\n\n }\n if (ancho >= 19 && ancho <= 23) {\n g.setColor(color);\n g.fillOval(x - 52, y + 1, 132, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 50), (y) + 20);\n System.out.println(\"19 y 23\");\n\n }\n if (ancho >= 24 && ancho <= 27) {\n g.setColor(color);\n g.fillOval(x - 58, y + 10, 148, 30);\n g.setColor(Color.BLACK);\n g.drawString(\"\" + act.valor, (x - 55), (y) + 30);\n System.out.println(\"24 y 27\");\n\n }\n\n if (act.getNodoIzq() != null) {\n dibujarSubformula(act.getNodoIzq(), (x) - (anchoX(act.altura())), y + 100, x, y, p, color);\n\n }\n if (act.getNodoDer() != null) {\n dibujarSubformula(act.getNodoDer(), (x) + (anchoX(act.altura())), y + 100, x, y, p, color);\n }\n\n }\n }", "@DisplayName(\"Coloca las piezas negras en la parte superior del tablero\")\r\n\t\t@ParameterizedTest\r\n\t\t@CsvSource({ \"0,0,1\", \"0,2,2\", \"0,4,3\", \"0,6,4\", \"1,1,5\", \"1,3,6\", \"1,5,7\", \"1,7,8\", \"2,0,9\", \"2,2,10\",\r\n\t\t\t\t\"2,4,11\", \"2,6,12\" })\r\n\t\tvoid comprobarColocacionInicialDePiezasNegras(int fila, int columna, int id) {\r\n\t\t\tCelda celda = tablero.obtenerCelda(fila, columna);\r\n\t\t\tassertThat(\"Celda vacia\", celda.estaVacia(), is(false));\r\n\t\t\tassertThat(\"Color de pieza colocada incorrecta\", celda.obtenerColorDePieza(), is(NEGRO));\r\n\t\t\tassertThat(\"Tipo de pieza incorrecto\", celda.obtenerPieza().obtenerTipoPieza(), is(PEON));\r\n\t\t\tassertThat(\"Identificador incorrecto\", celda.obtenerPieza().obtenerId(), is(id));\r\n\t\t\tassertThat(\"Numero de peones negros incorrecto\", tablero.obtenerNumeroPiezas(NEGRO), is(12));\r\n\t\t}", "public void pintarRines(Graphics2D pG) {\n\n\n double cos = 0.829;\n double sin = 0.559;\n int radius = DIAMETER / 2;\n int diameter1 = 2 * DIAMETER / 5;\n int diameter2 = DIAMETER / 5;\n int diameter3 = DIAMETER / 10;\n int delta0 = DIAMETER / 5;\n int delta1 = radius - diameter1 / 2;\n int delta2 = radius - diameter2 / 2;\n int delta3 = radius - diameter3 / 2;\n int d2 = (int) (diameter1 * cos / 2);\n int d1 = (int) (diameter1 * sin / 2);\n\n // Points\n int x1 = x + radius - d2; // Represents the x value in QII and QIII\n int y1 = y + radius - d1; // Represents the y value in QI and QII\n int x2 = x + radius + d2; // Represents the x value in QI and QIV\n int y2 = y + radius + d1; // Represents the y value in QIII and QIV\n int vertX = x+ radius;\n int topY = y + radius - diameter1/2;\n int bottomY = y + radius+diameter1/2;\n\n // Paints circle with diameter1\n pG.setColor(new Color(14, 14, 14));\n pG.fillOval(x + delta1, y + delta1, diameter1, diameter1);\n\n\n // Paint circle with diamater 2\n pG.setColor(Color.DARK_GRAY);\n pG.fillOval(x + delta2, y + delta2, diameter2, diameter2);\n\n\n pG.setColor(Color.DARK_GRAY);\n BasicStroke stroke = new BasicStroke(DIAMETER / 15);\n pG.setStroke(stroke);\n pG.drawLine(x1, y1, x2, y2);\n pG.drawLine(x1,y2,x2,y1);\n pG.drawLine(vertX, topY, vertX, bottomY);\n\n // Draw center donut shape\n pG.setColor(Color.GRAY);\n BasicStroke stroke1 = new BasicStroke(DIAMETER / 50);\n pG.setStroke(stroke1);\n pG.drawOval(x + delta3, y + delta3, diameter3, diameter3);\n\n\n }", "void iniciaPanel() {\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tinfo[i][j] = new JLabel(\"\");\n\t\t\t\tinfo[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tinfo[i][j].setOpaque(true);\n\t\t\t\tif(i==0) {\n\t\t\t\t\tinfo[i][j].setBackground(UIManager.getColor(\"List.selectionBackground\"));\n\t\t\t\t}\n\t\t\t\tif(i==1) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.yellow);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==2) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.blue);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==3) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.red);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(i==4) {\n\t\t\t\t\tinfo[i][j].setBackground(Color.gray);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tpanel.add(info[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tinfo[0][0].setText(\"PROCESOS\");\n\t\tinfo[1][0].setText(\"P1\");\n\t\tinfo[2][0].setText(\"P2\");\n\t\tinfo[3][0].setText(\"P3\");\n\t\tinfo[4][0].setText(\"P4\");\n\t\tinfo[0][1].setText(\"TIEMPO DE ARRIBO/LLEGADA\");\n\t\tinfo[0][2].setText(\"RAFAGAS DE USO DEL CPU\");\n\t\t\n\t\t//llenado donde estara la simulacion\t\t\n\t\tfor (int i = 0; i < ns; i++) {\n\t\t\tfor (int j = 0; j < ms; j++) {\n\t\t\t\tsimulacion[i][j] = new JLabel(\"\");\n\t\t\t\tsimulacion[i][j].setBorder(new LineBorder(new Color(0, 0, 0), 1, true));\n\t\t\t\tsimulacion[i][j].setOpaque(true);\n\t\t\t\tsimulacion[i][j].setBackground(Color.WHITE);\n\t\t\t\tsimulacion[i][j].setVisible(false);\n\t\t\t\tsimulacion[i][j].setFont(fuente2);\n\t\t\t\tpanel_2.add(simulacion[i][j]);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tllenainfo();\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n redChart = new javax.swing.JPanel();\n jPanel2 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n redLimiar = new javax.swing.JSpinner();\n redPre = new javax.swing.JButton();\n redAplic = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n redStats = new javax.swing.JTextPane();\n jLabel1 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n redEixX = new javax.swing.JComboBox();\n redEixY = new javax.swing.JComboBox();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\" Principal Component Analysis (PCA)\");\n setIconImage(null);\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n redChart.setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout redChartLayout = new javax.swing.GroupLayout(redChart);\n redChart.setLayout(redChartLayout);\n redChartLayout.setHorizontalGroup(\n redChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 0, Short.MAX_VALUE)\n );\n redChartLayout.setVerticalGroup(\n redChartLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 277, Short.MAX_VALUE)\n );\n\n jPanel2.setBackground(new java.awt.Color(255, 255, 255));\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Configuração\"));\n\n jLabel2.setText(\"<html>\\n<p>\\nA avaliação de desempenho será realizada através do <strong>k-NN</strong> com a <strong>configuração atual</strong>.\\n</p>\\n<p>\\n*A base de dados será automaticamente normalizada, caso ainda não seja.\\n</p>\\n</html>\");\n\n jLabel3.setText(\"Porcentagem de variância coberta pelas componentes principais:\");\n\n redLimiar.setModel(new javax.swing.SpinnerNumberModel(0.95d, 0.1d, 1.0d, 0.05d));\n\n redPre.setText(\"Pré-Visualizar\");\n redPre.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redPreActionPerformed(evt);\n }\n });\n\n redAplic.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n redAplic.setText(\"Aplicar*\");\n redAplic.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n redAplicActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redLimiar, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redPre, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redAplic, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(redLimiar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(redAplic)\n .addComponent(redPre))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n redStats.setFont(new java.awt.Font(\"Courier New\", 0, 10)); // NOI18N\n redStats.setFocusable(false);\n jScrollPane2.setViewportView(redStats);\n\n jLabel1.setText(\"Eixo X:\");\n\n jLabel4.setText(\"Eixo Y:\");\n\n redEixX.setMaximumSize(new java.awt.Dimension(384, 32767));\n redEixX.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n changeAxis(evt);\n }\n });\n\n redEixY.setMaximumSize(new java.awt.Dimension(384, 32767));\n redEixY.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n changeAxis(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(redChart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redEixY, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redEixX, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane2))\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(redEixX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(redEixY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(redChart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(jScrollPane2))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void mostrarCoches() {\n int i = 0;\n for (Coche unCoche : coches) {\n System.out.println((i + 1) + \"º \" + coches.get(i));\n ++i;\n }\n }", "private void dibujarPieza(PiezaColor pieza,PosicionAjedrez pos){\n\t\tImage img=imagenes.dameImagen(pieza);\n\t\tPosicionTablero posicion=transformar(pos);\n\t\ttablero[posicion.getColumna()][posicion.getFila()].getGraphicsContext2D().drawImage(img, 1.25, 1.25,60,60);\n\n\t}", "private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}", "private void setGraphPanels() {\n\n GraphArray g;\n\n for (Sort s : sorts) {\n //g = new GraphArray(s.getArray(), s.getClass().getSimpleName());\n container.add(s.getGraph().getChartPanel());\n }\n }", "private void resetPieza() {\n for (int i = 0; i < altoTablero * anchoTablero; ++i) {\r\n piezas[i] = PiezasTetris.NoPieza;\r\n }\r\n }", "public void Dios()\r\n {\r\n \tif(!dios)\r\n \t\tgrafico.cambiarA(0);\r\n \telse\r\n \t\tgrafico.cambiarA(1);\r\n dios=!dios;\r\n }", "private void montarPainelJogo(Dificuldade dificuldade) {\n\t\tthis.painelJogo = new JPanel(new GridLayout(dificuldade.getValor(), dificuldade.getValor()));\r\n\t\tpainelJogo.setBounds(12, 77, 738, 612);\r\n\t\tpainelJogo.setOpaque(false);\r\n\t\tlayeredPane.add(painelJogo);\r\n\r\n\t\t// PAINEL DOS NUMEROS DE CASAS\r\n\t\tthis.painelJogo2 = new JPanel(new GridLayout(dificuldade.getValor(), dificuldade.getValor()));\r\n\t\tpainelJogo2.setBounds(12, 77, 738, 612);\r\n\t\tpainelJogo2.setOpaque(false);\r\n\t\tlayeredPane.add(painelJogo2);\r\n\r\n\t}", "public void pridajPane() {\n\t\tmojPane.setAlignment(Pos.CENTER);\n\n\t\tmojPane.getChildren().addAll(informacia, vyberPredmetov, tabulkaZiak);\n\t}", "public static void main(String[]args){\n JFrame frame = new JFrame(\"Pie Chart\"); \n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n Pie chart1 = new Pie();\n frame.getContentPane().add (chart1);\n frame.pack();\n frame.setVisible(true);\n }", "private void updatePieChart() {\n //If both EXPENSE and INCOME calculation are completed, do this\n if(isCategoryIncomeCalculationComplete && isCategoryExpenseCalculationComplete){\n List<Category> catList = new ArrayList<>();\n\n int[] colorList = new int[]{R.color.alizarin, R.color.nephritis};\n\n Category catExpense = new Category();\n catExpense.setName(\"Expense\");\n catExpense.setCost(Math.abs(totalExpenseCost));\n catExpense.setColor(getResources().getString(colorList[0]));\n\n Category catIncome = new Category();\n catIncome.setName(\"Income\");\n catIncome.setCost(Math.abs(totalIncomeCost));\n catIncome.setColor(getResources().getString(colorList[1]));\n\n catList.add(catIncome);\n catList.add(catExpense);\n\n pieChartFragment.setData(catList, true);\n }\n }", "JFreeChart generateBox();", "private void nastavGraf() {\n barChart = (BarChart) findViewById(R.id.bargraph);\n\n ArrayList<BarEntry> barEntries = new ArrayList<>();\n ArrayList<String> theDates = new ArrayList<>();\n\n // ziskame zaznamy z tabuľky Steps a naplnime graf\n List<HashMap<String, String>> zoznam = mDatabaseHelper.getSteps();\n HashMap<String, String> mapa = new HashMap<>();\n for (int i = 0; i < zoznam.size(); i++) {\n if (i == 3) break;\n mapa = zoznam.get(i);\n theDates.add(mapa.get(\"datum\"));\n barEntries.add(new BarEntry(Float.parseFloat(mapa.get(\"kroky\")), i));\n }\n\n BarDataSet barDataSet = new BarDataSet(barEntries, \"Steps\");\n int redColorValue = Color.parseColor(\"#ff1744\");\n barDataSet.setColor(redColorValue);\n BarData theData = new BarData(theDates, barDataSet);\n\n barChart.setData(theData);\n barChart.getLegend().setEnabled(false);\n barChart.setDescription(null);\n }", "private void colocar(){\n setLayout(s);\n eleccion = new BarraEleccion(imagenes,textos);\n eleccion.setLayout(new GridLayout(4,4));\n eleccion.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createBevelBorder(5), \"SELECCIONA EL MAGUEY\",\n TitledBorder.CENTER, TitledBorder.TOP,new Font(\"Helvetica\",Font.BOLD,15),Color.WHITE));\n eleccion.setFondoImagen(imgFond);\n etqAlcohol = new JLabel(\"SELECCIONA EL GRADO DE ALCOHOL\");\n etqAlcohol.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqAlcohol.setForeground(Color.WHITE);\n alcohol = new JComboBox<>();\n etqTipo = new JLabel(\"SELECCIONA EL TIPO DE MEZCAL\");\n etqTipo.setFont(new Font(\"Helvetica\", Font.BOLD, 14));\n etqTipo.setForeground(Color.WHITE);\n tipo = new JComboBox<>();\n btnRegistrar = new JButton();\n btnRegistrar.setFont(new Font(\"Sylfaen\", Font.BOLD, 17));\n btnRegistrar.setText(\"Registrar\");\n btnRegistrar.setHorizontalAlignment(SwingConstants.CENTER);\n btnRegistrar.setActionCommand(\"registrar\");\n add(eleccion);\n add(etqAlcohol);\n add(alcohol);\n add(etqTipo);\n add(tipo);\n add(btnRegistrar);\n iniciarVistas();\n }", "public void agregarPaneles(){\n vistaInicial.jpIzquierda.removeAll();\n this.limpiarPaneles();\n vistaInicial.jpIzquierda.add(panelIngresoControlador.getPanelIngreso());\n vistaInicial.jpDerecha.add(panelBusquedaControlador.getPanelBusqueda());\n vistaInicial.jpCentral.add(panelLibro);\n vistaInicial.jpIzquierda.repaint();\n this.actualizarPaneles();\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}", "private void visualizarm(){\r\n switch(this.opc){\r\n case 1:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t\\t\\t\\t\"+min+\":\"+seg+\"\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n System.out.printf(\"%s\\t\",mfacil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 2:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n System.out.printf(\"%s\\t\",mmedio[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 3:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\t6\\n\");\r\n System.out.printf(\"------------------------------------------------------------------------\\n\");\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n System.out.printf(\"%s\\t\",mdificil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n }\r\n }", "private ApexCharts crearGraficoDonutGastosMesActualPorCategoria() {\n\t\tList<Categoria> listaCategorias = categoriaService.obtenerTodasCategorias();\n\t\t// Obtenemos los nombres de las categorias\n\t\tString[] labes = obtenerLabes(listaCategorias);\n\n\t\t// Obtenemos el valor del gasto por cada categoria\n\t\tDouble[] serie = obtenerMovimientos(listaCategorias);\n\t\t\n\t\t// Obtenemos colores aleatorios para cada fragmento del grafico\n\t\tString[] colors = obtenerColores(listaCategorias);\n\t\t\n\t\treturn ApexChartsBuilder.get()\n .withChart(ChartBuilder.get().withType(Type.donut).build())\n .withLegend(LegendBuilder.get()\n .withPosition(Position.right)\n .build())\n .withSeries(serie)\n .withResponsive(ResponsiveBuilder.get()\n .withBreakpoint(480.0)\n .build())\n .withLabels(labes)\n \t\t.withColors(colors)\n .build();\n\t}", "public void showDrones(MyCanvas c) {\n for (Pieces d : drones) { //loop through drones and display\n d.displayDrone(c);\n }\n\n }", "private void dibujarReina(Graphics g) {\n\t\tint x = (fila - 1) * 50 + 10;\r\n\t\tint y = (columna - 1) * 50 + 40;\r\n\t\tg.drawLine(x + 5, y + 45, x + 45, y + 45);\r\n\t\tg.drawLine(x + 5, y + 45, x + 5, y + 5);\r\n\t\tg.drawLine(x + 45, y + 45, x + 45, y + 5);\r\n\t\tg.drawLine(x + 5, y + 35, x + 45, y + 35);\r\n\t\tg.drawLine(x + 5, y + 5, x + 15, y + 20);\r\n\t\tg.drawLine(x + 15, y + 20, x + 25, y + 5);\r\n\t\tg.drawLine(x + 25, y + 5, x + 35, y + 20);\r\n\t\tg.drawLine(x + 35, y + 20, x + 45, y + 5);\r\n\t\tg.drawOval(x + 20, y + 20, 10, 10);\r\n\t}", "public void init() {//lo que es evento con el Mouse\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n tablero[x][y].addMouseListener(new java.awt.event.MouseAdapter() {\n\n public void mousePressed(java.awt.event.MouseEvent evt) {\n seleccionarPieza(evt);//cuando mouse se levantado o presionado haga esto\n //////////////////////////////\n }\n\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n dejarPieza(evt);\n ////////////////////\n }\n });\n tablero[x][y].addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n /*\n * Para simular que la pieza es arrastrada, uso el label tmp, y le cambio sus coordenadas, con la del mouse.\n */\n tmp.setLocation(cuadroSeleccionado.getLocation().x + evt.getX() - 18, cuadroSeleccionado.getLocation().y + evt.getY() - 28);\n }\n });\n\n\n }\n }\n }", "public static void main(String[] args) throws Exception {\n Presentation presentation = new Presentation();\r\n\r\n //Load the file from disk.\r\n presentation.loadFromFile(\"data/VaryColorsOfSameSeriesDataMarkers.pptx\");\r\n\r\n //Get the chart from the presentation.\r\n IChart chart = (IChart)presentation.getSlides().get(0).getShapes().get(0);\r\n\r\n //Create a ChartDataPoint object and specify the index.\r\n ChartDataPoint dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(0);\r\n\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.RED);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.RED);\r\n\r\n //Add the data point to the point collection of a series.\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(1);\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.BLACK);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.BLACK);\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n dataPoint = new ChartDataPoint(chart.getSeries().get(0));\r\n dataPoint.setIndex(2);\r\n //Set the fill color of the data marker.\r\n dataPoint.getMarkerFill().getFill().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getFill().getSolidColor().setColor(Color.BLUE);\r\n\r\n //Set the line color of the data marker.\r\n dataPoint.getMarkerFill().getLine().setFillType(FillFormatType.SOLID);\r\n dataPoint.getMarkerFill().getLine().getSolidFillColor().setColor(Color.BLUE);\r\n chart.getSeries().get(0).getDataPoints().add(dataPoint);\r\n\r\n String result = \"output/varyColorsOfSameSeriesDataMarkers_result.pptx\";\r\n\r\n //Save to file.\r\n presentation.saveToFile(result, FileFormat.PPTX_2010);\r\n }", "private void viewPCAChart(int pcaI, int pcaII) {\r\n DivaClientService.computePCA(pcaI, pcaII,\r\n new AsyncCallback<PCAImageResult>() {\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Selection_Manager.connError();\r\n }\r\n\r\n @Override\r\n public void onSuccess(PCAImageResult result) {\r\n pcaPlotComponent = new PCAPlotComponent(result, Selection_Manager, DivaClientService, datasetInfo.getColNumb(), datasetInfo.getDatasetInfo(), middlePanelWidth);\r\n topMidLayout.add(pcaPlotComponent.getPCAComponent());\r\n topMidLayout.setCellHorizontalAlignment(pcaPlotComponent.getPCAComponent(), HorizontalPanel.ALIGN_RIGHT);\r\n if (!init) {\r\n SelectionManager.Busy_Task(false, true);\r\n }\r\n if (init) {\r\n viewRankTables();\r\n }\r\n }\r\n });\r\n }", "public void Mostrar() {\n \n for (int i=0;i<3;i++) {\n System.out.print(\"Torre \"+i+\": \");\n for (Iterator it = columnas[i].iterator(); it.hasNext();) {\n int n = (int) it.next();\n System.out.print(n+\"[\"+\"]\");\n longitud++;\n }\n System.out.println(\"\");\n \n }\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 Pieza obtenerPieza() {\n return pieza;\n }", "public void goToPieChart(ActionEvent event) throws SQLException {\n\t\tconn = MySqlConnection.ConnectDb();\n\n\t\tObservableList<Data> list = FXCollections.observableArrayList();\n\t\tString sql = \"select category, amount from Account\";\n\t\tps = conn.prepareStatement(sql);\n\t\trs = ps.executeQuery();\n\t\t\n\t\t\n\t\tfor(Account acc: lists) {\n\t\t\tlist.addAll(new PieChart.Data(acc.getCategory(), acc.getAmount()));\n\t\t}\n\t\t\n\t\tPieChart pieChart = new PieChart();\n\t\tpieChart.getData().addAll(list);\n\t\tpieChart.setTitle(\"Expense Distributon\");\n\n\t\tScene scene = new Scene(pieChart, 500, 500);\n\t\tStage stage = new Stage();\n\t\tstage.setScene(scene);\n\t\tstage.show();\n\t}", "public void obtenerValorDePiezaEnDolaresADolares() {\r\n\t\tPieza pieza = new Pieza(\"\",10,Moneda.DOLAR);\t\t\r\n\t\tdouble precio = pieza.getPrecioEn(Moneda.DOLAR);\r\n\t\tAssert.assertEquals(precio, 10);\r\n\t}", "public static void Agrupar() {\n\t\tArrayList<ArrayList<Double>> distancias_centroids = new ArrayList<ArrayList<Double>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Double> distancias= new ArrayList<Double>();\n\t\t\tfor (int j=0;j<petalas.size();j++) {\n\t\t\t\tdouble x1= centroids.get(i).petal_length;\n\t\t\t\tdouble x2= petalas.get(j).petal_length;\n\t\t\t\tdouble y1= centroids.get(i).petal_width;\n\t\t\t\tdouble y2= petalas.get(j).petal_width;\n\t\t\t\tdouble cateto1= x1-x2;\n\t\t\t\tdouble cateto2= y1-y2;\n\t\t\t\tdouble hipotenusa = Math.sqrt(cateto1*cateto1+cateto2*cateto2);\n\t\t\t\tdistancias.add(hipotenusa);\n\t\t\t\t/*\n\t\t\t\tSystem.out.println(\"cateto1: \"+cateto1);\n\t\t\t\tSystem.out.println(\"cateto2: \"+cateto2);\n\t\t\t\tSystem.out.println(\"hipotenusa: \"+hipotenusa);\n\t\t\t\t*/\n\t\t\t\t\t\t\t}\n\t\t\t\n\t\t\tdistancias_centroids.add(distancias);\t\t\t\n\t\t}\n\t\t/*\n\t\tSystem.out.println(\"Distancias Centroids:\");\n\t\tfor (int i=0;i<distancias_centroids.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tfor (int j=0;j<distancias_centroids.get(i).size();j++) {\n\t\t\t\tSystem.out.println(distancias_centroids.get(i).get(j));\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t//Para qual centroid pertece cada ponto\n\t\tArrayList<ArrayList<Petala>> pontos_de_cada_centroid = new ArrayList<ArrayList<Petala>>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tArrayList<Petala> p = new ArrayList<Petala>();\n\t\t\tpontos_de_cada_centroid.add(p); \n\t\t}\n\t\tfor (int i=0;i<petalas.size();i++) {\n\t\t\tdouble menor =100;\n\t\t\tint centroid_menor=0;\n\t\t\tfor (int j=0;j<centroids.size();j++) {\n\t\t\t\tif (distancias_centroids.get(j).get(i)<menor) {\n\t\t\t\t\tmenor = distancias_centroids.get(j).get(i);\n\t\t\t\t\tcentroid_menor=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpontos_de_cada_centroid.get(centroid_menor).add(petalas.get(i));\n\t\t}\n\t\t/*\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tSystem.out.println(\"Centroid \"+i);\n\t\t\tSystem.out.println(\"Petalas: \");\n\t\t\tSystem.out.println(pontos_de_cada_centroid.get(i));\n\t\t}\n\t\t*/\n\t\t//Novos centroids\n\t\tArrayList<Petala> novos_centroids = new ArrayList<Petala>();\n\t\tfor (int i=0;i<pontos_de_cada_centroid.size();i++) {\n\t\t\tdouble soma_x=0;\n\t\t\tdouble soma_y=0;\n\t\t\tfor (int j=0;j<pontos_de_cada_centroid.get(i).size();j++) {\n\t\t\t\tsoma_x+=pontos_de_cada_centroid.get(i).get(j).petal_length;\n\t\t\t\tsoma_y+=pontos_de_cada_centroid.get(i).get(j).petal_width;\n\t\t\t}\n\t\t\tdouble novo_x=soma_x/pontos_de_cada_centroid.get(i).size();\n\t\t\tdouble novo_y=soma_y/pontos_de_cada_centroid.get(i).size();\n\t\t\tPetala novo_centroid = new Petala(novo_x,novo_y);\n\t\t\tnovos_centroids.add(novo_centroid);\n \t\t}\n\t\t\n\t\t//Gravar Geracao\n\t\tArrayList<Petala> gc= new ArrayList<Petala>();\n\t\tfor (int i=0;i<centroids.size();i++) {\n\t\t\tgc.add(centroids.get(i));\n\t\t}\n\t\tGeracao geracao = new Geracao(gc,pontos_de_cada_centroid);\n\t\tgeracoes.add(geracao);\n\t\t//Condicao de Parada\n\t\tboolean terminou = true;\n\t\tfor (int i=0; i<centroids.size();i++) {\n\t\t\tif (centroids.get(i).petal_length!=novos_centroids.get(i).petal_length) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (centroids.get(i).petal_width!=novos_centroids.get(i).petal_width) {\n\t\t\t\tterminou = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (terminou) {\n\t\t\t/*\n\t\t\tSystem.out.println(\"Novos centroids:\");\n\t\t\tSystem.out.println(novos_centroids);\n\t\t\t\n\t\t\tSystem.out.println(\"FIM!\");\n\t\t*/\n\t\t}else {\n\t\t\tcentroids.clear();\n\t\t\tfor (int i=0;i<novos_centroids.size();i++) {\n\t\t\t\tcentroids.add(novos_centroids.get(i));\n\t\t\t}\n\t\tgeracao_atual++;\n\t\t\tAgrupar();\n\t\t}\n\t}", "public void mostrarVagon() {\n\t\tSystem.out.println(\"Estado actual del vagon\");\n\t\tfor (int i = 0; i < getNumeroAsientosFila(); i++) {\n\t\t\tfor (int j = 0; j < getNumeroAsientosColumna(); j++) {\n\t\t\t\tSystem.out.print(vagonVacio[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private JPanel agregarPanelPuertos(JPanel contenedor) {\n\t\tJPanel panelPort = new JPanel(new GridBagLayout()) {\n\t\t\t/**\n\t\t\t * \n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = -4409720857557537617L;\n\n\t\t\t@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(Color.WHITE);\n\t\t\t\tg.fillRect(0, 0, getWidth(), getHeight());\n\t\t\t}\n\t\t};\n\t\tpanelPort.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));\n\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.gridx = 0;\n\t\tc.gridy = 1;\n\t\tc.weighty = 0.0;\n\t\tc.weightx = 1.0;\n\t\tc.anchor = GridBagConstraints.WEST;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tcontenedor.add(panelPort, c);\n\n\t\t//Crea los registros\n\t\trow = new ArrayList<JPanel>();\n\t\tlabelPort = new ArrayList<JLabel>();\n\t\tarrowPort = new ArrayList<JLabel>();\n\t\tvalorPort = new ArrayList<JLabel>();\n\t\tarrowFlag = new ArrayList<JLabel>();\n\t\tvalorFlag = new ArrayList<JLabel>();\n\t\t\n\t\tGridBagConstraints c1 = new GridBagConstraints();\n\t\tc1.gridx = 0;\n\t\tc1.weighty = 0.0;\n\t\tc1.weightx = 1.0;\n\t\tc1.anchor = GridBagConstraints.WEST;\n\t\tc1.fill = GridBagConstraints.HORIZONTAL;\n\n\t\t//ENTRADA\n\t\tJPanel panelRow = new JPanel(new GridBagLayout());\n\t\tpanelRow.setBackground(this.getColorRow(0));\n\t\trow.add(panelRow);\n\t\t\n\t\tc1.gridy = 0;\n\t\tpanelPort.add(panelRow, c1);\n\t\tlabelPort.add(agregarLabelPuerto(panelRow, \"ENTRADA\", 0));\n\t\tarrowPort.add(agregarArrowPuerto(panelRow, 0));\n\t\tvalorPort.add(agregarValorPuerto(panelRow, \"\", 0));\n\t\tarrowFlag.add(agregarArrowFlag(panelRow, 0));\n\t\tvalorFlag.add(agregarValorFlag(panelRow, \"\", 0));\n\t\t\n\t\t//SALIDA\n\t\tpanelRow = new JPanel(new GridBagLayout());\n\t\tpanelRow.setBackground(this.getColorRow(0));\n\t\trow.add(panelRow);\n\t\t\n\t\tc1.gridy = 1;\n\t\tpanelPort.add(panelRow, c1);\n\t\tlabelPort.add(agregarLabelPuerto(panelRow, \"SALIDA\", 1));\n\t\tarrowPort.add(agregarArrowPuerto(panelRow, 1));\n\t\tvalorPort.add(agregarValorPuerto(panelRow, \"\", 1));\n\t\tarrowFlag.add(agregarArrowFlag(panelRow, 1));\n\t\tvalorFlag.add(agregarValorFlag(panelRow, \"\", 1));\t\t\n\n\n\t\treturn panelPort;\n\t}", "public void afficherPoints(){\n for(Point point : pointArrayList){\n getMapPane().getChildren().add(point.getImageView());\n visualObjects.add(point);\n }\n }", "private void addCharts() {\n piechartPanel.removeAll();\n piechartPanel.validate();\n piechartPanel.repaint();\n\n barschartPanel.removeAll();\n barschartPanel.validate();\n barschartPanel.repaint();\n if (cpanel != null) {\n cpanel = null;\n }\n pieChart = new PieChart(collection, 0, type, cb_sort.isSelected()).chart;\n barsChart = new BarsChart(collection, 0, type, cb_sort.isSelected()).chart;\n cpanel = new ChartPanel(pieChart);\n cpanel.setSize(piechartPanel.getSize());\n piechartPanel.add(cpanel);\n piechartPanel.getParent().validate();\n cpanel = new ChartPanel(barsChart);\n cpanel.setSize(barschartPanel.getSize());\n barschartPanel.add(cpanel);\n barschartPanel.getParent().validate();\n }", "public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}", "private void mostrarDatosPeliculas() {\n this.mBinding.tvMostrarError.setVisibility(View.GONE);\n /* Then, make sure the weather data is visible */\n this.mBinding.rvPeliculas.setVisibility(View.VISIBLE);\n }", "public void afficherFifo() {\n\t\tint nbrCols = listEtapeFifo.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Integer> list: listEtapeFifo) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\t\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtapeFifo.size();i++) {\n\t\t\tArrayList<Integer> list = listEtapeFifo.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\t//Processus p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + list.get(j));\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}", "@Override\n public String toString() {\n int numeritosY = 0;\n int numeritosX = 0;\n StringBuilder datos = new StringBuilder(\" \");\n\n //Imprime los numeros de arriba\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\" \").append(numeritosX);\n numeritosX++;\n }\n datos.append(\"\\n \");\n //Imprime la primera linea que corresponde con la parte superior del tablero.\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n //Imprime el resto del tablero.\n for (int y = 0; y < casillas.length; y++) {\n datos.append(numeritosY).append(\"\\033[33m\"+\" | \"+\"\\033[0m\");\n for (int x = 0; x < casillas[y].length; x++) {\n datos.append(casillas[y][x].toString());\n }\n datos.append(\"\\n\");\n datos.append(\" \");\n for (int i = 0; i < casillas[y].length; i++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n numeritosY++;\n }\n return datos.toString();\n }", "public static void main(String[] args) throws Exception {\n Mapper mapper = new Mapper() {\n @Override\n public double f(double x, double y) {\n return 10 * Math.sin(x / 10) * Math.cos(y / 20) * x;\n }\n };\n\n // Define range and precision for the function to plot\n Range range = new Range(-150, 150);\n int steps = 50;\n\n // Create the object to represent the function over the given range.\n final Shape surface =\n new SurfaceBuilder().orthonormal(new OrthonormalGrid(range, steps, range, steps), mapper);\n surface.setColorMapper(new ColorMapper(new ColorMapRainbow(), surface.getBounds().getZmin(),\n surface.getBounds().getZmax(), new Color(1, 1, 1, .5f)));\n surface.setFaceDisplayed(true);\n surface.setWireframeDisplayed(true);\n surface.setWireframeColor(Color.BLACK);\n\n // Create a chart and add surface\n \n AWTChartFactory f = new DepthPeelingChartFactory(new DepthPeelingPainterFactory());\n Chart chart = f.newChart(Quality.Advanced().setAlphaActivated(false));\n\n chart.getScene().getGraph().add(surface);\n \n chart.getScene().getGraph().setStrategy(null);\n \n // depth peeling shaders do not mix correctly with 2.0.1 TextRenderer\n chart.getView().getAxis().setTextRenderer(new TextBitmapRenderer());\n\n\n // Setup a colorbar\n AWTColorbarLegend cbar = new AWTColorbarLegend(surface, chart.getView().getAxis().getLayout());\n cbar.setMinimumDimension(new Dimension(100, 600));\n //surface.setLegend(cbar);\n \n chart.open();\n chart.getMouse();\n\n ChartLauncher.openChart(chart);\n }", "public void med1() {\n DrawingPanel win = new DrawingPanel(WIDTH, HEIGHT);\n java.awt.Graphics g = win.getGraphics();\n win.setTitle(\"Med. 1\");\n win.setLocation(300, 10);\n win.setBackground(java.awt.Color.red);\n for(int y = -10; y < HEIGHT; y += 24) {\n for(int x = -10; x < WIDTH; x += 24) {\n octagon(x, y, g);\n }\n }\n }", "private void paintBeanMachine(){\n Line baseLine = new Line();\n\n baseLine.startXProperty().bind(widthProperty().multiply(0.2));\n baseLine.startYProperty().bind(heightProperty().multiply(0.8));\n baseLine.endXProperty().bind(widthProperty().multiply(0.8));\n baseLine.endYProperty().bind(heightProperty().multiply(0.8));\n\n // distance gap per circle\n double distance = (baseLine.getEndX() - baseLine.getStartX()) / SLOTS;\n ballRadius = distance / 2;\n\n //Draw pegs\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n Circle[] pegs = new Circle[factorialSum(SLOTS)];\n int index = 0;\n\n for(int row = 0; row < SLOTS; row++){\n DoubleBinding y = baseLine.startYProperty().subtract(heightProperty().multiply(0.2).divide(row + 1));\n\n for(int col = 0; col < SLOTS - row; col++){\n Circle peg = new Circle(5, Color.BLUE);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(row).multiply(0.5))\n .add(dist.divide(2))\n .add(dist.multiply(row)));\n peg.centerYProperty().bind(y);\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n\n Line line = new Line();\n line.startXProperty().bind(peg.centerXProperty());\n line.startYProperty().bind(peg.centerYProperty());\n line.endXProperty().bind(peg.centerXProperty());\n line.endYProperty().bind(baseLine.startYProperty());\n getChildren().add(line);\n }\n }\n\n /*\n for(int i = 1; i <= SLOTS; i++){\n double x = baseLine.getStartX() + (i * distance * 0.50) + distance / 2;\n double y = baseLine.getStartY() - (distance * i) - distance / 2;\n\n for(int j = 0; j <= SLOTS - i; j++){\n Circle peg = new Circle(5, Color.BLUE);\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(i).multiply(0.5))\n .add(dist.divide(2)));\n peg.centerYProperty().bind(baseLine.startYProperty()\n .subtract(dist.multiply(i))\n .subtract(dist.divide(2)));\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n x += distance;\n }\n }\n */\n\n distance = distance + (distance / 2) - pegs[0].getRadius();\n // Connect the base of the triangle with lowerLine\n // NOT including left most and right most line\n Line[] lines = new Line[SLOTS - 1];\n for (int i = 0; i < SLOTS - 1; i++) {\n double x1 = pegs[i].getCenterX() + pegs[i].getRadius() * Math.sin(Math.PI);\n double y1 = pegs[i].getCenterY() - pegs[i].getRadius() * Math.cos(Math.PI);\n lines[i] = new Line(x1, y1, x1, y1 + distance);\n\n }\n // Draw right most and left most most line\n Line[] sides = new Line[6];\n sides[0] = new Line(\n baseLine.getEndX(), baseLine.getEndY(),\n baseLine.getEndX(), baseLine.getEndY() - distance);\n sides[1] = new Line(\n baseLine.getStartX(), baseLine.getStartY(),\n baseLine.getStartX(), baseLine.getStartY() - distance);\n\n //Draw left side line\n /*\n for(int i = 2; i < 4; i++){\n double x = pegs[pegs.length - i].getCenterX();\n double y = pegs[pegs.length - i].getCenterY() - distance;\n sides[i] = new Line(x, y, sides[i - 2].getEndX(), sides[i - 2].getEndY());\n }\n */\n\n // Draw the upper 2 lines on top of the triangle\n /*\n for (int i = 4; i < sides.length; i++){\n sides[i] = new Line(\n sides[i-2].getStartX(), sides[i-2].getStartY(),\n sides[i-2].getStartX(), sides[i-2].getStartY() - (distance * 0.6)\n );\n }\n */\n\n getChildren().addAll(baseLine);\n getChildren().addAll(pegs);\n //getChildren().addAll(lines);\n //getChildren().addAll(sides);\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tPieSlice s;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfloat temp=0,total=0;\n\t\t\t\t\t\tfor (int i = 0; i < pg.getSlices().size(); i++) {\n\t\t\t\t\t\t\ttemp=Float.parseFloat(BackgroundService.itemdata[i][4]);\n\t\t\t\t\t\t\ts = pg.getSlice(i);\n\t\t\t\t\t\t\ts.setGoalValue(temp);\n\t\t\t\t\t\t\ttotal+=temp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (int i = 0; i < pg.getSlices().size(); i++) {\n\t\t\t\t\t\t\ttemp=Float.parseFloat(BackgroundService.itemdata[i][4]);\n\t\t\t\t\t\t\ttper[i].setText((int)(temp/total*100+0.5) + \"%\");\n\t\t\t\t\t\t\tttime[i].setText((int)(temp/120) + \"d\" +(int)(temp%120)/5 +\"h\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpg.setInterpolator(new AccelerateDecelerateInterpolator());\n\t\t\t\t\t\tpg.setAnimationListener(getAnimationListener());\n\t\t\t\t\t\tpg.animateToGoalValues();\n\n\t\t\t\t\t}", "@Test\n public void test84() throws Throwable {\n Point2D.Double point2D_Double0 = new Point2D.Double();\n point2D_Double0.setLocation(0.0, 0.0);\n CategoryAxis categoryAxis0 = new CategoryAxis(\"\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot(categoryAxis0);\n DefaultPolarItemRenderer defaultPolarItemRenderer0 = new DefaultPolarItemRenderer();\n Color color0 = (Color)defaultPolarItemRenderer0.getItemLabelPaint(871, (-1498));\n Number[][] numberArray0 = new Number[5][3];\n Number[] numberArray1 = new Number[2];\n int int0 = Calendar.LONG_FORMAT;\n numberArray1[0] = (Number) 2;\n int int1 = Float.SIZE;\n numberArray1[1] = (Number) 32;\n numberArray0[0] = numberArray1;\n Number[] numberArray2 = new Number[4];\n numberArray2[0] = (Number) 0.0;\n numberArray2[1] = (Number) 0.0;\n numberArray2[2] = (Number) 0.0;\n numberArray2[3] = (Number) 0.0;\n numberArray0[1] = numberArray2;\n Number[] numberArray3 = new Number[1];\n numberArray3[0] = (Number) 0.0;\n numberArray0[2] = numberArray3;\n Number[] numberArray4 = new Number[7];\n numberArray4[0] = (Number) 0.0;\n long long0 = XYBubbleRenderer.serialVersionUID;\n numberArray4[1] = (Number) (-5221991598674249125L);\n numberArray4[2] = (Number) 0.0;\n numberArray4[3] = (Number) 0.0;\n numberArray4[4] = (Number) 0.0;\n int int2 = JDesktopPane.LIVE_DRAG_MODE;\n numberArray4[5] = (Number) 0;\n numberArray4[6] = (Number) 0.0;\n numberArray0[3] = numberArray4;\n Number[] numberArray5 = new Number[9];\n numberArray5[0] = (Number) 0.0;\n numberArray5[1] = (Number) 0.0;\n numberArray5[2] = (Number) 0.0;\n numberArray5[3] = (Number) 0.0;\n numberArray5[4] = (Number) 0.0;\n numberArray5[5] = (Number) 0.0;\n numberArray5[6] = (Number) 0.0;\n numberArray5[7] = (Number) 0.0;\n int int3 = SwingConstants.HORIZONTAL;\n numberArray5[8] = (Number) 0;\n numberArray0[4] = numberArray5;\n DefaultIntervalCategoryDataset defaultIntervalCategoryDataset0 = new DefaultIntervalCategoryDataset(numberArray0, numberArray0);\n LogarithmicAxis logarithmicAxis0 = new LogarithmicAxis(\"org.jfree.data.ComparableObjectItem\");\n LineAndShapeRenderer lineAndShapeRenderer0 = new LineAndShapeRenderer();\n CategoryPlot categoryPlot0 = null;\n try {\n categoryPlot0 = new CategoryPlot((CategoryDataset) defaultIntervalCategoryDataset0, categoryAxis0, (ValueAxis) logarithmicAxis0, (CategoryItemRenderer) lineAndShapeRenderer0);\n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n assertThrownBy(\"org.jfree.data.category.DefaultIntervalCategoryDataset\", e);\n }\n }", "public void toChartData() {\n //this.chart = chart;\n chart.getData().clear();\n Set<String> labels = new HashSet<>(getLabels().values());\n Object[] names = getLocations().keySet().toArray();\n \n for (String label : labels) \n {\n XYChart.Series<Number, Number> series = new XYChart.Series<>();\n series.setName(label);\n getLabels().entrySet().stream().filter(entry -> entry.getValue().equals(label)).forEach(entry -> {\n Point2D point = getLocations().get(entry.getKey());\n \n XYChart.Data data = new XYChart.Data<>(point.getX(), point.getY()); \n series.getData().add(data);\n \n \n });\n\n getChart().getData().add(series);\n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n s.getNode().setStyle(\"-fx-stroke-width: 0; \");\n s.getNode().setStyle(\"-fx-stroke: transparent; \");\n\n } \n\n\n }\n getChart().setAnimated(false);\n getChart().getData().add(new XYChart.Series<Number,Number>());\n \n for (XYChart.Series<Number, Number> s : getChart().getData()) {\n for (XYChart.Data<Number, Number> d : s.getData()) {\n\n for(Object name: names)\n {\n if(getLocations().get((String)name).getX()==d.getXValue().doubleValue()\n && getLocations().get((String)name).getY()==d.getYValue().doubleValue())\n {\n Tooltip.install(d.getNode(),new Tooltip((String)name));\n }\n \n \n }\n d.getNode().setCursor(Cursor.CROSSHAIR);\n \n \n }\n \n }\n \n\n \n /* getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n //System.out.print(minX+\" \"+maxX+\" \"+minY+\" \"+maxY);\n double deltaX = maxX-minX;\n double deltaY = maxY-minY;\n double lowerY = deltaY>1?minY-deltaY*0.05:minY*0.1;\n double upperY = deltaY>1?maxY+deltaY*0.05:maxY*0.1;\n if(deltaY==0)\n {\n lowerY = -0.5;\n upperY = 0.5;\n }\n double lowerX = deltaX>1?minX-deltaX*0.05:minX*0.1;\n double upperX = deltaX>1?minX+deltaX*0.05:maxX*0.1;\n if(deltaX == 0)\n {\n lowerX = -0.5;\n upperX = 0.5;\n }\n \n ((NumberAxis)getChart().getXAxis()).setLowerBound(lowerX);\n ((NumberAxis)getChart().getXAxis()).setUpperBound(upperX);\n ((NumberAxis)getChart().getYAxis()).setLowerBound(lowerY);\n ((NumberAxis)getChart().getYAxis()).setUpperBound(upperY);\n */\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n \n double deltaY = getMaxY()-getMinY();\n double deltaX = getMaxX()-getMinX();\n if(deltaX==0) \n {\n deltaX = 1;\n setMinX(getMinX()-getMinX()*0.1-1);\n setMaxX(getMaxX()+getMaxX()*0.1+1);\n }\n if(deltaY==0)\n {\n deltaY = 1;\n setMinY(getMinY()-getMinY()*0.1-1);\n setMaxY(getMaxY()+getMaxY()*0.1+1);\n }\n\n getChart().getXAxis().setAutoRanging(false);\n getChart().getYAxis().setAutoRanging(false);\n ((NumberAxis)getChart().getXAxis()).setLowerBound(getMinX()-Math.abs(deltaX/10));\n ((NumberAxis)getChart().getXAxis()).setUpperBound(getMaxX()+Math.abs(deltaX/10));\n ((NumberAxis)getChart().getYAxis()).setLowerBound(getMinY()-Math.abs(deltaY/10));\n ((NumberAxis)getChart().getYAxis()).setUpperBound(getMaxY()+Math.abs(deltaY/10));\n\n \n }" ]
[ "0.6897354", "0.6603145", "0.65580666", "0.650281", "0.63509184", "0.6342772", "0.62926334", "0.62874186", "0.62723553", "0.6265927", "0.6216885", "0.6197988", "0.6176121", "0.6131771", "0.6122153", "0.61152273", "0.6112601", "0.6043316", "0.60091776", "0.5995067", "0.5981892", "0.59814376", "0.5980896", "0.5970139", "0.5944795", "0.58813363", "0.58733433", "0.5867293", "0.58473724", "0.5825155", "0.5818116", "0.5786928", "0.5764822", "0.5763622", "0.57498354", "0.574608", "0.57391196", "0.5728802", "0.5723889", "0.57215977", "0.5661817", "0.5661215", "0.565682", "0.5642955", "0.56377137", "0.5623289", "0.55856836", "0.5567698", "0.55532086", "0.5531286", "0.5529762", "0.5529381", "0.552917", "0.5499735", "0.54876953", "0.54762185", "0.5471659", "0.5459854", "0.54571223", "0.54569274", "0.5440116", "0.5431814", "0.5428168", "0.5426033", "0.54240674", "0.5421542", "0.5401745", "0.53952295", "0.5390625", "0.5389119", "0.53833", "0.53786397", "0.53766286", "0.5375293", "0.5367195", "0.5367129", "0.53646356", "0.5358285", "0.53542304", "0.5343548", "0.53431225", "0.534274", "0.53334075", "0.5320546", "0.53197783", "0.531594", "0.53158724", "0.53086907", "0.53011084", "0.52972806", "0.52962154", "0.5294556", "0.5290905", "0.52851576", "0.5283274", "0.52808696", "0.52723217", "0.52671134", "0.5264209", "0.52566075" ]
0.68128836
1
Se le asignan un numero de piezas a todos los jugadores
public static void establecerMano(Monton todas,Mano[] jugadores){ int pos; Pieza pieza; for (int i = 0; i < jugadores.length; i++) { for (int j = 0; j < Ajustes.PIEZAS_MANO; j++) { if(todas.getNPiezasMonton()>0){ pos=(int) (Math.random()*todas.getNPiezasMonton()); pieza=todas.getUnaPieza(pos); jugadores[i].setUnaPieza(pieza); todas.eliminarPiezaMonton(pieza); } } } System.out.println("\nCada jugador tiene "+jugadores[0].getNPiezas()+" piezas."); if(todas.getNPiezasMonton()!=0) System.out.println("Y en el monton quedan "+todas.getNPiezasMonton()); else System.out.println("No quedan piezas en el monton"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "public static void jogar(int numeroJogador) {\n\t\tint ponto = 0;\r\n\t\t\r\n\t\t//em quanto jogador nao fizer 5 pontos ele vai repetir o laço\r\n\t\twhile (ponto < 5) {\r\n\t\t\t//joga o dado1 e dao2 (gerando valor aleatorio de 1 a 6)\r\n\t\t\tint dado1 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\tint dado2 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\t//se o valor da soma do dado1 e dado2 for 7 ou 11, ele ganha 1 ponto\r\n\t\t\tif (((dado1 + dado2) == 7) || ((dado1 + dado2) == 11)) {\r\n\t\t\t\tponto++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"jogador \"+numeroJogador+\"º. Ponto = \"+ ponto);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//depois de fazer os 5 pontos, é verificado em que posição o jogador esta.\r\n\t\tif (posicao == 0) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Primeiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 5000,00\");\t\t\t\r\n\t\t} else if (posicao == 1) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Segundo jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 4000,00\");\t\t\t\r\n\t\t} else if (posicao == 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Terceiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 3000,00\");\t\t\t\r\n\t\t} else if (posicao > 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"jogador \" + numeroJogador + \"º esta em \" + posicao + \"º posicao. Não ganhou nada\");\r\n\t\t}\r\n\t}", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "@Override\n public void setJugadoresEsperando(int i) {\n lblNumeroJugadores.setText(Integer.toString(i));\n }", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public static void asignarPunteo(int puntos, String nombreJugador) {\n for (int sizeNombres = 0; sizeNombres < nombres.length - 1; sizeNombres++) {\n if ((nombreJugador.equals(nombres[sizeNombres])) && (puntos == 1)) {\n punteos[sizeNombres] += 1;\n break;\n }\n\n }\n\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "private void configurarNumeros(int i, int j) {\n\t\tlblNumeros[i][j].setText(Integer.toString(this.mapa.getCelula(i, j).getQtdBombasVizinhas()));\r\n\t\tswitch (this.mapa.getCelula(i, j).getQtdBombasVizinhas()) {\r\n\t\tcase 1:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.BLUE.brighter().brighter());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.GREEN.darker());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.RED);\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.BLUE.darker().darker());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.RED.darker());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.MAGENTA);\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.YELLOW);\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tlblNumeros[i][j].setForeground(Color.CYAN);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public Jugador(String nombreJugador)\n {\n this.nombreJugador = nombreJugador;\n cartasQueTieneEnLaMano = new Carta[5];\n numeroCartasEnLaMano = 0;\n }", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}", "public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = baraja.getBaraja();\n\t}", "public void testCasillasJugador1( )\n {\n setupEscenario1( );\n int tamanho = casillasJugador1.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador1.get( i ) ).intValue( );\n assertEquals( marcaJugador1, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "private Integer contabilizaJogas(Jogador jogador)\r\n {\r\n int i = 0 ;\r\n \r\n if(contadorJogadas.containsKey(jogador)) {\r\n i = contadorJogadas.get(jogador);\r\n }\r\n \r\n contadorJogadas.put(jogador, i + 1);\r\n return contadorJogadas.get(jogador);\r\n }", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "private void pojedi (int i, int j) {\n\t\trezultat++;\n\t\tthis.zmija.add(0, new Cvor(i,j));\n\t\tthis.dodajZmiju();\n\t\tthis.dodajHranu();\n\t}", "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}", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "private int fichasSeguidas(char[] array, char jugador) {\n if (array.length == 0)\n return 0; // última puesta\n if (array[0] != 'V') // si no hay hueco, devolver 0\n return 0;\n\n // buscar el hueco más cercano disponible\n int posHueco = 0;\n for (int i = 1; i < array.length; i++) {\n if (array[i] == 'V')\n posHueco++;\n else\n break;\n }\n\n // a partir de ahí, contar las fichas seguidas\n int fichasSeguidas = 0;\n for (int i = posHueco + 1; i < array.length; i++) {\n if (array[i] == jugador)\n fichasSeguidas++;\n else\n break;\n }\n\n return fichasSeguidas;\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}", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "private void compruebaMinas(boolean add, int i, int j) {\n\tif (add) {\n\t contadorInterrogaciones++;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas++;\n\t }\n\t} else {\n\t contadorInterrogaciones--;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas--;\n\t }\n\t}\n\tif ((contadorMinas == numMinas) && (contadorInterrogaciones == numMinas)) {\n\t this.setVisible(false);\n\t ventanaReset.setVisible(true);\n\t labelGanador.setVisible(true);\n\t}\n }", "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 main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tint numZonas;\r\n\t\tSystem.out.println(\"¿Cuantas zonas hay?\");\r\n\t\tnumZonas = sc.nextInt();\r\n\t\t\r\n\t\tString añadir;\r\n\t\tint añadirZona = 0;\r\n\t\tint [][] densidadArea = new int [2][numZonas];\r\n\t\tint [][] denAreaExtra = new int[2][numZonas + añadirZona];\r\n\t\tString [] lugares = new String [numZonas];\r\n\t\tString [] lugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\r\n\t\tfor (int i = 0 ; i < numZonas ; i++) {\r\n\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\tlugares [i]= sc.next();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\tdensidadArea [0][i] = sc.nextInt();\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\tdensidadArea [1][i] = sc.nextInt();\t\r\n\t\t\t\r\n\t\t\tResultados(numZonas, lugares, densidadArea);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"¿Quieres añadir más zonas? (Si/No)\");\r\n\t\tañadir = sc.next();\r\n\t\t\r\n\t\tif (añadir.equals (\"Si\")) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"¿Cuantas zonas quieres añadir?\");\r\n\t\t\tañadirZona = sc.nextInt();\r\n\t\t\tlugaresExtra = new String [numZonas + añadirZona];\r\n\t\t\t\r\n\t\t\tfor (int j = numZonas ; j < (numZonas + añadirZona) ; j++) {\r\n\t\t\t\tSystem.out.println(\"Introduce el nombre de la zona: \");\r\n\t\t\t\tlugaresExtra [j]= sc.next();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce la densidad de la zona:\");\r\n\t\t\t\tdenAreaExtra [0][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Introduce el area de la zona: \");\r\n\t\t\t\tdenAreaExtra [1][j] = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\tResultados2(añadirZona, lugaresExtra, denAreaExtra);\r\n\t\t\t}\r\n\t\t\tnumZonas = numZonas + añadirZona;\r\n\t\t}\r\n\t\telse {\t\r\n\t\t\tSystem.out.println(\"Ya hemos terminado la consulta, gracias.\");\r\n\t\t}\r\n\t\t\r\n\t\tsc.close();\r\n\t\r\n\t\r\n\t\r\n\t}", "private void cuentaminas() {\n\t//TODO: falta por hacer que calcule lasminas en el borde exterior\n\t//Probar a hacerlo con un try catch\n\tint minas = 0;\n\n\tfor (int i = 0; i < filas; i++) {\n\t for (int j = 0; j < columnas; j++) {\n\t\t//\t1 2 3\n\t\t//\t4 X 5\n\t\t//\t6 7 8\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j - 1].getMina();//1\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j].getMina();//2\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j + 1].getMina();//3\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j - 1].getMina();//4\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j + 1].getMina();//5\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j - 1].getMina();//6 \t\t \n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j].getMina();//7\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j + 1].getMina();//8\n\t\t} catch (Exception e) {\n\t\t}\n\t\tarrayBotones[i][j].setNumeroMinasAlrededor(minas);\n\t\t//TODO: comentar la siguiente parte para que no aparezcan los numeros al iniciar\n//\t\tif (arrayBotones[i][j].getMina() == 0 && minas != 0) {\n//\t\t arrayBotones[i][j].setText(String.valueOf(minas));\n//\t\t}\n\t\tminas = 0;\n\t }\n\t}\n }", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public void setPapeles(int avenida, int calle, int cant);", "public void retournerLesPilesParcelles() {\n int compteur = 0;\n //pour chacune des 4 piles , retourner la parcelle au sommet de la pile\n for (JLabel jLabel : pileParcellesGUI) {\n JLabel thumb = jLabel;\n retournerParcelles(thumb, compteur);\n compteur++;\n }\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 jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public void ajoutPions() {\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, true, (String) JouerIA.getColor1().first()));\n\n } else {\n this.ajoutPieces(new Pion(i, j+1, true, (String) JouerIA.getColor1().first()));\n }\n }\n\n }\n\n for (int i = 6; i < 10; i++) {\n for (int j = 0; j < 10; j += 2) {\n if (i % 2 == 0) {\n this.ajoutPieces(new Pion(i, j, false, (String) JouerIA.getColor2().first()));\n } else {\n this.ajoutPieces(new Pion(i, j + 1, false, (String) JouerIA.getColor2().first()));\n }\n }\n\n }\n }", "public void qtadeDeNumeros(){\n for(int i = 0; i < 9; i++){\n qtadePorNum.add(i, new Pair(i+1, numeroDeElementos(i+1)));\n }\n }", "public int cantidadMinasAlrededor(int i, int j) {\r\n\t\tint cantidadMinasAlrededor = 0;\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i-1][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j+1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i+1][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif(casillas[i][j-1].esMina()) {\r\n\t\t\t\tcantidadMinasAlrededor++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IndexOutOfBoundsException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(NullPointerException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\treturn cantidadMinasAlrededor;\r\n\t}", "public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }", "public void ejercicio06() {\r\n\t\tcabecera(\"06\", \"Numero mayor\");\r\n\r\n\t\t// Inicio modificacion\r\n\r\n\t\tSystem.out.println(\"Por favor, introduzca un numero\");\r\n\t\tint n1 = Teclado.readInteger();\r\n\t\tSystem.out.println(\"Por favor, introduzca otro numero\");\r\n\t\tint n2 = Teclado.readInteger();\r\n\t\tSystem.out.println(\"Por favor, introduzca otro numero\");\r\n\t\tint n3 = Teclado.readInteger();\r\n\r\n\t\tStringBuffer salida = new StringBuffer();\r\n\r\n\t\tint mayor = n1;\r\n\r\n\t\tif (n1==n2&&n2==n3) {\r\n\t\t\tsalida.append(\"Los tres numeros son \"+n2+\", y son iguales. \");\r\n\t\t}else{\r\n\t\t\tif (n1==n2) {\r\n\t\t\tsalida.append(\"El numero \"+n1+\" esta repetido 2 veces \");\r\n\t\t\t}else if (n2==n3) {\r\n\t\t\tsalida.append(\"El numero \"+n2+\" esta repetido 2 veces \");\r\n\t\t\t}else if (n1==n3) {\r\n\t\t\tsalida.append(\"El numero \"+n3+\" esta repetido 2 veces \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (mayor < n2) {\r\n\t\tmayor = n2;\r\n\t\t}else if(mayor < n3){\r\n\t\t\tmayor = n3;\r\n\t\t}\r\n\t\tsalida.append(\"El numero dado mas grande es \"+mayor+\".\");\r\n\r\n\t\tSystem.out.println(salida.toString());\r\n\r\n\t\t// Fin modificacion\r\n\t}", "private void montarBotoesJogo() {\n\r\n\t\tbotoes = new BotaoJogo[dificuldade.getValor()][dificuldade.getValor()];\r\n\r\n\t\tfor (int i = 0; i < botoes.length; i++) {\r\n\t\t\tfor (int j = 0; j < botoes.length; j++) {\r\n\t\t\t\tbotoes[i][j] = new BotaoJogo(i, j);\r\n\t\t\t\tbotoes[i][j].setDisabledIcon(iconBandeira);\r\n\t\t\t\tbotoes[i][j].addActionListener(this);\r\n\t\t\t\tbotoes[i][j].addMouseListener(this);\r\n\t\t\t\tbotoes[i][j].setIcon(iconBotao);\r\n\t\t\t\tthis.painelJogo.add(botoes[i][j]);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static boolean juegoAcabado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tif (contColor==-1) System.out.println( pelota.getColor() );\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-1) return false;\r\n\t\treturn true;\r\n\t}", "public void atualizaJogo() {\n\t\t \t int[][] tabuleiro = new int[4][4];\n\t\t \t tabuleiro = jogo.getTabuleiro();\n\t\t \t \n\t\t \t for(int i = 0; i < 4; i++) {\n\t\t \t\t\tfor(int j = 0; j < 4; j++) {\n\t\t \t\t\t\tif(tabuleiro[i][j] == 0) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/0.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 4) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/4.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 8) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/8.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 16) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/16.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 32) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/32.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 64) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/64.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 128) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/128.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 256) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/256.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 512) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/512.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 1024) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/1024.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2048) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2048.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t }", "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 void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "public static int parni(int broj) {\n\t\tString velicina = \"\" + broj;\n\t\tint velicinaBroja = velicina.length();\n\t\tint zbir = 0;\n\t\tint ostatak;\n\t\twhile (velicinaBroja > 0) {\n\t\t\tif (broj % 2 == 0) {\n\t\t\t\tostatak = broj % 10;\n\t\t\t\tzbir = 10 * zbir + ostatak;\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t\tif (broj % 2 != 0) {\n\t\t\t\tbroj = broj / 10;\n\t\t\t\tvelicinaBroja = velicinaBroja - 1;\n\t\t\t}\n\n\t\t}\n\n\t\treturn zbir;\n\t}", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }", "public void mostrarPorcentajeRangos(int porcentaje) {\n \t//Las parejas a colorear seran todas las cartas\n \tint numParejas = ((NUMCARTAS*NUMCARTAS) * porcentaje)/100;\n \tArrayList <String> parejasOrdenadas = new ArrayList<String>();\n \tfor (int i = 0; i < numParejas; i++)\n \t\tparejasOrdenadas.add(slanskyTable.devuelveCarta(i));\n \n \tfor (int i = 0; i < NUMCARTAS; i++) \n \t\tfor (int j = 0; j < NUMCARTAS; j++) {\n \t\t\tif(tablero[i][j].isSelected()) toggle(i,j);\n \t\t\tif (parejasOrdenadas.contains(tablero[i][j].getText())) {\n \t\t\t\ttoggle(i,j);\n \t\t\t\ttablero[i][j].setBackground(colorPorcentajes);\n \t\t\t}\n \t\t}\t\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 }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public void repartirGananciasDealer() {\n\t\t if(contieneJugador(ganador,\"dealer\")) {\n\t\t\t if(verificarJugadaBJ(manosJugadores.get(3))) {\n\t\t\t\t System.out.println(\"Pareja nombre agregado dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores() + 15;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\", cantidadGanancia));\n\t\t\t }else {\n\t\t\t\t System.out.println(\"Pareja nombre agregado --> dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores()+10;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t\t }\n\t\t }else {\n\t\t\t int cantidadGanancia = verificarCantidadGanadores();\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t }\n\t\t \n\t }", "public static int[]reparacion(int[] hijo,int ttablero){\n int []hijor=new int[ttablero];\n int falta;\n int cont=0;\n int aux;\n int repite;\n ArrayList<Integer> repetidos = new ArrayList<>();\n ArrayList<Integer> faltantes = new ArrayList<>();\n for(int i=0;i<=ttablero;i++){\n aux=hijo[i];\n for(int j=0;j<=ttablero;j++){\n if(aux==hijo[j]){\n cont=cont+1;\n // System.out.println(\"contador \"+cont+\" se repite el hijo \" +hijo[j]);\n }\n if (cont>=2) {\n repite=hijo[j];\n repetidos.add(repite);\n // System.out.println(\"se repite el numero \"+repite );\n cont=0; \n } \n \n }\n cont=0; \n }\n \n //limpiar de repetidos el array repetidos\n for (int i = 0; i<repetidos.size(); i++) {\n int auxi=repetidos.get(i);\n //System.out.println(\"aux \"+ auxi );\n for (int j = i+1;j<repetidos.size() ; j++) {\n if (auxi==repetidos.get(j)) {\n //System.out.println(\"repetidos \"+ repetidos.get(i) );\n repetidos.remove(j);\n \n }\n \n }\n \n }\n \n for (int i = 0; i <repetidos.size(); i++) {\n // System.out.println(\"repetidos finalmente \"+ repetidos.get(i) );\n }\n int a=0;\n for (int i = 0; i <=ttablero; i++) {\n int auxx=i;\n for (int j = 0; j<=ttablero; j++) {\n \n }\n }\n int [] auscio=new int [ttablero];\n for (int i = 0; i <ttablero; i++) {\n auscio[i]=0;\n // System.out.println(\"auscio \"+auscio[i]);\n }\n \n for (int i = 0; i <ttablero; i++) {\n // int amp=i;\n for (int j = 0; j<ttablero; j++) {\n if (i==hijo[j]) {\n auscio[i]=1;\n }\n }\n }\n \n for (int i = 0; i <ttablero; i++) {\n // System.out.print(\"\"+auscio[i]);\n }\n for (int i = 0; i <ttablero; i++) {\n if (auscio[i]==0) {\n // System.out.println(\"falta el numero \"+(i));\n faltantes.add(i);\n }\n }\n \n return hijor;\n }", "public boolean probajGusarski(int red, int kolona) {// 1 polje\n\n\t\tif (red > 9 || kolona > 9)\n\t\t\treturn false;\n\t\tif (tabla[red][kolona] != Polje1.slobodan)\n\t\t\treturn false;\n\n\t\tint redIznadNemoguc, kolonaLevoNemoguca, redIspodNemoguc, kolonaDesnoNemoguca;\n\n\t\tif (red == 9)\n\t\t\tredIspodNemoguc = red;\n\t\telse\n\t\t\tredIspodNemoguc = red + 1;\n\n\t\tif (red == 0)\n\t\t\tredIznadNemoguc = red;\n\t\telse\n\t\t\tredIznadNemoguc = red - 1;\n\n\t\tif (kolona == 9)\n\t\t\tkolonaDesnoNemoguca = kolona;\n\t\telse\n\t\t\tkolonaDesnoNemoguca = kolona + 1;\n\n\t\tif (kolona == 0)\n\t\t\tkolonaLevoNemoguca = kolona;\n\t\telse\n\t\t\tkolonaLevoNemoguca = kolona - 1;\n\t\tfor (int i = redIznadNemoguc; i <= redIspodNemoguc; i++)\n\t\t\tfor (int j = kolonaLevoNemoguca; j <= kolonaDesnoNemoguca; j++)\n\t\t\t\ttabla[i][j] = Polje1.nemoguc;\n\n\t\ttabla[red][kolona] = Polje1.zauzet;\n\t\tlistaBrodova[brojBrodova] = new Brod1(new Koordinate1(red, kolona), 1, Orijentacije1.horizontalno);\n\t\tpreostalo += 1;\n\t\tbrojBrodova++;\n\t\treturn true;\n\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}", "public void setNUMCOPIAS(int value) {\n this.numcopias = value;\n }", "public void leerPacientes (int id_nutricionista);", "public void mostrarVideojuegosNumeradosPorOrdenDeRegistro()\n {\n int posicActual = 0;\n while (posicActual < listaDeVideojuegos.size()) {\n System.out.println((posicActual+1) + \". \" + listaDeVideojuegos.get(posicActual).getDatosVideojuego());\n posicActual++;\n }\n }", "public void generaNumeros() {\n\n\n int number =0;\n int numeroSeleccionado=gameMemoriaUno.getNumberaleatorio();\n //se agrega numero a las lista de numeros\n\n if(numeroSeleccionado == -1){\n llamaResultado(super.getActividad(), tFinal, tInicio, Num3_5_1Activity.class,gameMemoriaUno.getNumeros(),gameMemoriaUno.getAciertosTotales(),gameMemoriaUno.getFallosTotales(),gameMemoriaUno.getNumEcxluidosList(),gameMemoriaUno.getNumeroPregunta());\n\n }else {\n\n\n gameMemoriaUno.addNumerosSet(numeroSeleccionado);\n for (int i = 1; i < 6; i++) {\n //obtiene numeros del costalito menos el numero seleccionado\n number = gameMemoriaUno.getNumeroArreglo();\n //agrego numeros\n gameMemoriaUno.addNumerosSet(number);\n }\n\n Iterator<Integer> iter = gameMemoriaUno.getNumerosSet().iterator();\n\n int contadorNumeros=0;\n while (iter.hasNext()) {\n int valor=iter.next().intValue();\n lista.add(valor);\n if(gameMemoriaUno.getDificultad()==contadorNumeros){\n gameMemoriaUno.setNumerosElejidos(new int[valor]);\n }\n\n contadorNumeros+=1;\n }\n Collections.shuffle(lista, new Random());\n Collections.shuffle(lista, new Random());\n\n\n\n }\n\n\n }", "public Jugador(int dorsal)\n {\n Random rmd = new Random();\n edad = rmd.nextInt(23)+18 ;\n estadoForma = rmd.nextInt(11);\n int nom = rmd.nextInt(33);\n Nombres nomb = new Nombres();\n nombre = nomb.getNombre(nom);\n this.dorsal = dorsal;\n this.nombre = nombre;\n }", "public static int juego(String jugadorA, String jugadorB) {\r\n\t\t\r\n\t\tint fila = 0, columna = 0, alternador = 0;\r\n\t\tString jugadorAux, pieza;\r\n\t\tboolean malIntroducido, noRepetir;\r\n\t\ttablero = new Tablero();\r\n\t\tSystem.out.println(tablero.toString());\r\n\t\t\r\n\t\twhile (tablero.finJuego() == 0) {\r\n\t\t\tnoRepetir = true;\r\n\t\t\tif (alternador == 0) {\r\n\t\t\t\tjugadorAux = jugadorA;\r\n\t\t\t\talternador = 1;\r\n\t\t\t\tpieza = \"X\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tjugadorAux = jugadorB;\r\n\t\t\t\talternador = 0;\r\n\t\t\t\tpieza = \"O\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce el número\");\r\n\t\t\t\tcolumna = entrada.nextInt() - 1;\r\n\t\t\t\tif (columna != 0 && columna != 1 && columna != 2) {\r\n\t\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t\tSystem.out.println(\"Entrada incorrecta\");\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce la letra\");\r\n\t\t\t\tString C = entrada.next(); \r\n\t\t\t\tswitch(C) {\r\n\t\t\t\tcase \"A\": fila = 0; break;\r\n\t\t\t\tcase \"B\": fila = 1; break;\r\n\t\t\t\tcase \"C\": fila = 2; break;\r\n\t\t\t\tdefault: System.out.println(\"Entrada incorrecta\");\r\n\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\t\r\n\t\t\tnoRepetir = tablero.setCasilla(fila, columna, pieza);\r\n\t\t\t} while(!noRepetir);\r\n\t\t\t\t\r\n\t\t\tSystem.out.println(tablero.toString());\r\n\t\t\t\r\n\t\t} \r\n\t\treturn tablero.finJuego();\r\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "static void jugadorAJugar(String nombre) throws NombreNoValidoException, JugadorYaExisteException, JugadorNoExisteException{\n\t\tif(jugadores.contains(nombre)&&!participantes.contains(nombre))\n\t\t\tparticipantes.volcarJugadorALista(jugadores.get(jugadores.indexOf(nombre)));\n\t\telse if(!jugadores.contains(nombre))\n\t\t\tthrow new JugadorNoExisteException(\"Jugador no existe en la lista.\");\n\t\telse\n\t\t\tthrow new JugadorYaExisteException(\"Jugador ya existe.\");\n\t\t\t\n\t}", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "private void lisaaMiinaOikealle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i + 1 < x) {\n lista = this.ruudukko[i + 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }", "public int cuantosParrafos() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas estrofas quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "public static void main(String[] args) { \n /* Grafo grafo = new Grafo();\n \n No no;\n no = new No(\"1\");//0\n grafo.addNo(no);\n no = new No(\"2\");//1\n grafo.addNo(no);\n no = new No(\"3\");//2\n grafo.addNo(no);\n no = new No(\"4\");//3\n grafo.addNo(no);\n no = new No(\"5\");//4\n grafo.addNo(no);\n no = new No(\"6\");//5\n grafo.addNo(no);\n no = new No(\"7\");//6\n grafo.addNo(no);\n \n //Cria as arestas do nó\n \n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 2);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 5);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 4);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 2);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(4), 7);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 1);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(4), 4);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(5), 3);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 4);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(5), 1);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 5);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 7);\n \n No no;\n no = new No(\"SF\");//0\n grafo.addNo(no);\n no = new No(\"LA\");//1\n grafo.addNo(no);\n no = new No(\"D\");//2\n grafo.addNo(no);\n no = new No(\"C\");//3\n grafo.addNo(no);\n no = new No(\"A\");//4\n grafo.addNo(no);\n no = new No(\"B\");//5\n grafo.addNo(no);\n no = new No(\"NY\");//6\n grafo.addNo(no);\n no = new No(\"M\");//7\n grafo.addNo(no);\n \n \n //Cria as arestas do nó\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(1), 39);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(2), 89);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(3), 120);\n Aresta.inserirAresta(grafo.getNo(0), grafo.getNo(6), 210);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(2), 50);\n Aresta.inserirAresta(grafo.getNo(1), grafo.getNo(6), 170);\n Aresta.inserirAresta(grafo.getNo(2), grafo.getNo(3), 65);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(5), 79);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(6), 59);\n Aresta.inserirAresta(grafo.getNo(3), grafo.getNo(4), 99);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(6), 80);\n Aresta.inserirAresta(grafo.getNo(4), grafo.getNo(7), 70);\n Aresta.inserirAresta(grafo.getNo(5), grafo.getNo(6), 20);\n Aresta.inserirAresta(grafo.getNo(6), grafo.getNo(7), 66);*/\n \n Grafo grafo = GrafoAleatorioKruskal.gerar(1000, 10, 10, 100);\n //Gera a arvore geradora com custo minimo\n grafo.kruskal();\n \n //TESTE\n int teste = grafo.getNo(0).getConjunto();\n boolean answer = true;\n for(No n : grafo.getNos()){\n if (teste!= n.getConjunto()){\n answer = false;\n }\n }\n if(answer){\n System.out.println(\"Todos os nós pertecem ao mesmo conjunto\");\n }\n else{\n System.out.println(\"Deu erro\");\n }\n }", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "@Test\n\tpublic void testEliminarJugadores() {\n\t\tSalaDeJuego sala = new SalaDeJuego(\"sala1\");\n\t\tassertEquals(0, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 1\n\t\tJugador jugador1 = new Jugador(\"Maikcrosoft\", 1);\n\t\tsala.admitirJugador(jugador1);\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 2\n\t\tJugador jugador2 = new Jugador(\"crosoft\", 2);\n\t\tsala.admitirJugador(jugador2);\n\t\tassertEquals(2, sala.getCantJugadores());\n\t\t//Elimina al primer jugador, verifica que la cantidad de jugadores = 1\n\t\tsala.eliminarJugador(jugador1);\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Elimina al primer jugador, verifica que la cantidad de jugadores = 0\n\t\tsala.eliminarJugador(jugador2);\n\t\tassertEquals(0, sala.getCantJugadores());\n\t}", "public static void jouerAuFizzBuzz(){\n\t\tint nb = Tools.inputInt(\"Tapez un nombre : \");\n\t\tint i=0;\n\t\t\n\t\twhile (i<=nb) {\n\t\t\tafficherFizzBuzzOuNombre(i);\n\t\t\ti++;\n\t\t}\n\t}", "@Test\n public void testBuscarJugador() {\n ArrayList<Jugador> jugadores;\n jugadores = new ArrayList<>();\n System.out.println(\"Prueba 5\");\n Jugador ju = new Jugador(\"005\", \"Sebas\", 0, 0);\n jugadores.add(ju);\n int encontrado= util.buscarJugador(\"005\", jugadores);\n assertEquals(0, encontrado);\n }", "private void generisiPolje() {\r\n\t\tint polje = rnd.nextInt(broj_slobodnih);\r\n\t\tint vrijednost = rnd.nextInt(4);\r\n\t\tif(vrijednost == 0)\r\n\t\t\tvrijednost = 4;\r\n\t\telse\r\n\t\t\tvrijednost = 2;\r\n\t\t\r\n\t\tint brojac = 0;\r\n\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tif(tabela[i][j] == 0) {\r\n\t\t\t\t\tif(brojac == polje)\r\n\t\t\t\t\t\ttabela[i][j] = vrijednost;\r\n\t\t\t\t\tbrojac++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\tbroj_slobodnih--;\r\n\t}", "public void ucitajPotez(Potez potez) {\n\t\tint red = potez.vratiRed();\n\t\tint kolona = potez.vratiKolonu();\n\t\ttabla[red][kolona] = potez.vratiRezultat();\n\n\t\tif (potez.vratiRezultat() == Polje1.potopljen) {\n\t\t\tint gornjiRed, gornjaKolona;\n\t\t\tboolean cont1 = false;\n\t\t\tboolean cont2 = false;\n\t\t\tboolean redar = false;\n\t\t\tboolean kolonar = false;\n\t\t\twhile (redar == false) {\n\t\t\t\tif (red == 0) {\n\t\t\t\t\tgornjiRed = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjiRed = red - 1;\n\t\t\t\t}\n\t\t\t\tif (red == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\tred--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjiRed++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[gornjiRed][kolona] == Polje1.pogodjen || tabla[gornjiRed][kolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[gornjiRed][kolona] = Polje1.potopljen;\n\t\t\t\t\t\tred++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tredar = true;\n\t\t\t}\n\t\t\tcont1 = false;\n\t\t\tcont2 = false;\n\t\t\tred = potez.vratiRed();\n\t\t\twhile (kolonar == false) {\n\t\t\t\tif (kolona == 0) {\n\t\t\t\t\tgornjaKolona = 0;\n\t\t\t\t\tcont1 = true;\n\t\t\t\t} else {\n\t\t\t\t\tgornjaKolona = kolona - 1;\n\t\t\t\t}\n\t\t\t\tif (kolona == 9) {\n\t\t\t\t\tcont2 = true;\n\t\t\t\t}\n\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen && cont1 == false) {\n\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\tkolona--;\n\t\t\t\t} else {\n\t\t\t\t\tcont1 = true;\n\t\t\t\t\tgornjaKolona++;\n\t\t\t\t}\n\t\t\t\tif (cont1 == true) {\n\t\t\t\t\tif (tabla[red][gornjaKolona] == Polje1.pogodjen || tabla[red][gornjaKolona] == Polje1.potopljen) {\n\t\t\t\t\t\ttabla[red][gornjaKolona] = Polje1.potopljen;\n\t\t\t\t\t\tkolona++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcont2 = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (cont1 == true && cont2 == true)\n\t\t\t\t\tkolonar = true;\n\n\t\t\t}\n\n\t\t}\n\n\n\t}", "private void montarLabelNumeros() {\n\r\n\t\tlblNumeros = new JLabel[this.dificuldade.getValor()][this.dificuldade.getValor()];\r\n\r\n\t\tBorder borda = BorderFactory.createLineBorder(Color.BLACK, 2);\r\n\r\n\t\tfor (int i = 0; i < lblNumeros.length; i++) {\r\n\t\t\tfor (int j = 0; j < lblNumeros.length; j++) {\r\n\t\t\t\tlblNumeros[i][j] = new JLabel(\"\", SwingConstants.CENTER);\r\n\t\t\t\tlblNumeros[i][j].setVisible(true);\r\n\r\n\t\t\t\tconfiguraFonteNumeros(lblNumeros[i][j]);//CHAMA PRA CONFIGURAR A FONTE BASEADO NA DIFICULDADE\r\n\r\n\t\t\t\tthis.painelJogo2.add(lblNumeros[i][j]);//ADICIONA NO PAINEL\r\n\t\t\t\tif (this.mapa.getCelula(i, j).isBomba() == false) {//\r\n\t\t\t\t\tif (this.mapa.getCelula(i, j).isEmBranco() == false) {//SE NAO FOR BOMBA NEM EM BRANCO CONFIGURA OS NUMEROS DAQUELE LABEL\r\n\t\t\t\t\t\tconfigurarNumeros(i, j);\r\n\t\t\t\t\t} \r\n\t\t\t\t} else {//SE FOR BOMBA, DEIXA OPACO, DEIXA O BACKGROUND VERMELHO E COLOCA O ICONE\r\n\t\t\t\t\tlblNumeros[i][j].setOpaque(true);\r\n\t\t\t\t\tlblNumeros[i][j].setBackground(Color.RED);\r\n\t\t\t\t\tlblNumeros[i][j].setIcon(iconBomba);\r\n\t\t\t\t}\r\n\t\t\t\tlblNumeros[i][j].setBorder(borda);//COLOCA UMA BORDA NO LABEL\r\n\t\t\t\tlblNumeros[i][j].setVisible(false);//DEIXA INVISIVEL, SO FICA VISIVEL QND O BOTAO DA MESMA POSICAO EH ABERTO\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void instanciarJugador(Jugador jugador) {\n\t\tjugadores[contSalas] = jugador;\n\t\tcontJugadores++;\n\t}", "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 }", "public void setNumGruppoPacchetti(int numGruppoPacchetti);", "public figuras(int opcion) {\r\n this.opcion = opcion;\r\n // this.aleatorio = aleatorio;\r\n }", "public void ComenzarJuego() {\n Random R = new Random();\n int i = -1; // declaro una variable i(intentos como deducion) para realizar la la busqueda de dicha palabra\n do{ //inicio un ciclo tipo (do) para que intentos sea igual a R.nextInt(palabras) en teoria el bucle\n //se ejecuta obligatoriamente\n i = R.nextInt(PalabrasAdivinar.length);\n \n }while (posicion == i); //si la condicion posicion se cumple, posicion va ser igual a i(intentos)\n posicion = i;\n palabras = PalabrasAdivinar[posicion];\n \n // y palbras va ser igual a PalabrasAdivinadar\n for (i = 0; i < palabras.length(); i++);{ \n //el ciclo for que es i(intentos) va ser igual a cero, donde inicia posicion, la condicion i va ser menor a palabras (relaciona),{ // y la ultima va manipular los valores que mencionamos\n if(palabras.charAt(i)!) // si se cumple palabras va ser igual a '' y solucion = caract sino = espacio para generar las palabras\n Solucion += (\"_\"); // debemos pensar que es muy necesario por el hecho de los espacios si por ejemplo gears of war \n else \n Solucion += (\" \");\n \n }\n \n Dibujar();\n \n }", "public void determinarGanador() {\n\t\t\n\t\t if(valorManos[3]>21) {\n\n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }else if(((valorManos[0] <= valorManos[3]) && (valorManos[1] <= valorManos[3]) &&( valorManos[2] <= valorManos[3]))\n\t\t\t\t && valorManos[3] <= 21){\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t\t// numGanadores ++;\n\t\t }else if(valorManos[0]>21 && valorManos[1] >21 && valorManos[2]>21 && valorManos[3] <= 21) {\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t }\n\t\t else { \n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]>valorManos[3] && valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t \n\t\t if(valorManos[0] > 21 && valorManos[1] > 21 && valorManos[2] > 21 && \n\t\t\t\t valorManos[3] > 21){\n\t\t\t\n\t\t }else if(valorManos[3]<21 && ganador.size()==0){\n\t\t\t ganador.add(\"dealer\");\n\t\t }\n\t }", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "@Test\n\tpublic void testAdmitirJugadores() {\n\t\tSalaDeJuego sala = new SalaDeJuego(\"sala1\");\n\t\tassertEquals(0, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 1\n\t\tJugador jugador1 = new Jugador(\"Maikcrosoft\", 1);\n\t\tassertTrue(sala.admitirJugador(jugador1));\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 2\n\t\tJugador jugador2 = new Jugador(\"crosoft\", 2);\n\t\tassertTrue(sala.admitirJugador(jugador2));\n\t\tassertEquals(2, sala.getCantJugadores());\n\t\t//Crea un tercer jugador y lo admite. Consulta por cantidad de jugadores = 3\n\t\tJugador jugador3 = new Jugador(\"soft\", 3);\n\t\tassertTrue(sala.admitirJugador(jugador3));\n\t\tassertEquals(3, sala.getCantJugadores());\n\t\t//Crea un cuarto jugador y lo admite. Consulta por cantidad de jugadores = 4\n\t\tJugador jugador4 = new Jugador(\"croso\", 4);\n\t\tassertTrue(sala.admitirJugador(jugador4));\n\t\tassertEquals(4, sala.getCantJugadores());\n\t\t//Crea un quinto jugador y verifica que lo rechace. \n\t\tJugador jugador5 = new Jugador(\"ikcro\", 5);\n\t\tassertFalse(sala.admitirJugador(jugador5));\n\t}", "public void venderJogos(Jogo jogo, Usuario usuario, int preco) throws Exception {\n\t\ttry {\n\t\t\tif (usuarios.containsKey(usuario.getLogin())) {\n\t\t\t\tif (usuario.getDinheiro() >= preco) {\n\t\t\t\t\tusuario.setDinheiro((usuario.getDinheiro() - preco));\n\t\t\t\t\tusuario.jogosComprados.add(jogo);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Quantidade de dinheiro insuficiente\");\n\t\t}\n\t}", "@Override\n\tpublic void dibujar(Graphics2D g) {\n\n\t\tif (contadorJugador == 0) {\n\t\t\tenemigos.add(enemigo1);\n\t\t\tenemigos.add(enemigo2);\n\t\t\t// Se volverian a generar los objetos\n\t\t\tConstantes.volverTodoCero();\n\t\t\tcontadorJugador++;\n\t\t}\n\t\tg.scale(Constantes.ESCALAX, Constantes.ESCALAY);\n\t\t\n\t\t// Importante\n\t\tmapa.dibujar(g);\n\t\tdibujarArmas(g);\n\t\t//\n\t\tjugador.dibujar(g);\n\t\tenemigo1.dibujar(g);\n\t\tenemigo2.dibujar(g);\n\t\tcasa1.dibujar(g);\n\t\tcasa2.dibujar(g);\n\t\tcasa3.dibujar(g);\n\t\tcasa4.dibujar(g);\n\t\tcasa5.dibujar(g);\n\t\tcasa6.dibujar(g);\n\n\t\ttry {\n\t\t\t// Esto sirve para que no dispare seguido es el contador que va aumentado hasta\n\t\t\t// el tiempo que tenga cada arma\n\t\t\tif (Tecla.esperarArma != ((Armas) Tecla.objetoElegido).esperaDisparo) {\n\t\t\t\tTecla.esperarArma++;\n\t\t\t}\n\t\t} catch (NullPointerException | ClassCastException e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\n\t\t// System.out.println(Tecla.esperarArma);\n\n\t\tMapa.paredAbajo = new Rectangle(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredIzquierda = new Rectangle(Mapa.rectanguloIx, Mapa.rectanguloIy, 3, Constantes.ALTOMAPA);\n\t\tMapa.paredArriba = new Rectangle(Mapa.rectanguloAx, Mapa.rectanguloAy, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredDerecha = new Rectangle(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\t// ---\n\t\t// Prueba\n\t\t// ---\n\n\t\trecorrerArrayBalaMover(g);\n\n\t\tg.drawRect(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tg.drawRect(Mapa.rectanguloAx, Mapa.rectanguloAy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloIx, Mapa.rectanguloIy, Constantes.ANCHOMAPA, 3);\n\n\t}", "private void dibujarPuntos() {\r\n for (int x = 0; x < 6; x++) {\r\n for (int y = 0; y < 6; y++) {\r\n panelTablero[x][y].add(obtenerIcono(partida.getTablero()\r\n .getTablero()[x][y].getColor()));\r\n }\r\n }\r\n }", "private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\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 void setPuntos(int puntaje) {\n this.puntos = puntaje;\n }", "public void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }", "public void setPuertas(int puerta) {\n\t\t\r\n\t}", "private static void obterNumeroLugar(String nome) {\n\t\tint numero = gestor.obterNumeroLugar(nome);\n\t\tif (numero > 0)\n\t\t\tSystem.out.println(\"O FUNCIONARIO \" + nome + \" tem LUGAR no. \" + numero);\n\t\telse\n\t\t\tSystem.out.println(\"NAO EXISTE LUGAR de estacionamento atribuido a \" + nome);\n\t}", "ModoJuego(int intentos, int numCasillas, boolean repetirColores, int maxColores) {\n\t\tthis.intentos = intentos;\n\t\tthis.numCasillas = numCasillas;\n\t\tthis.repetirColores = repetirColores;\n\t\tthis.maxColores = maxColores;\n\n\t}", "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 void mostrarListaJugadores(){\n for (int i = 0; i < jugadores.length; i++) {\n \n if(jugadores[i]!=null){\n System.out.println(\" \"+jugadores[i].toString()+\" \");\n }\n \n }\n }", "public void setEgresosPorCompras(int egresosPorCompras){\n this.egresosPorCompras = egresosPorCompras;\n }", "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}", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }" ]
[ "0.74836755", "0.6930138", "0.6746559", "0.669875", "0.66514564", "0.6358218", "0.6355003", "0.6235207", "0.6179033", "0.61490595", "0.6147696", "0.61129576", "0.6019812", "0.59982383", "0.59923446", "0.59922326", "0.59912896", "0.5958109", "0.5956989", "0.5926648", "0.5904779", "0.59018207", "0.58497304", "0.584496", "0.58433354", "0.582564", "0.581998", "0.58168906", "0.58065087", "0.58056515", "0.57986414", "0.57904696", "0.57610685", "0.57521605", "0.5746942", "0.57299507", "0.57243806", "0.5720537", "0.57187825", "0.57104707", "0.5698912", "0.56764865", "0.5674406", "0.56722206", "0.5667401", "0.5666723", "0.56597584", "0.5656649", "0.5656523", "0.562769", "0.5627474", "0.56170595", "0.56150854", "0.560331", "0.56014335", "0.5597574", "0.55871224", "0.5581607", "0.5577718", "0.5573646", "0.5564465", "0.5562485", "0.5560209", "0.554813", "0.5546443", "0.5545555", "0.5535139", "0.5534018", "0.5525878", "0.55238646", "0.55192226", "0.55134577", "0.5512739", "0.55094475", "0.55076444", "0.5496877", "0.54899704", "0.5483647", "0.547257", "0.5465001", "0.54634607", "0.5451648", "0.54474866", "0.54460776", "0.54440564", "0.54433376", "0.54428893", "0.54393256", "0.5426859", "0.54219633", "0.54219085", "0.5418094", "0.54142576", "0.5411973", "0.54094326", "0.5404054", "0.5398008", "0.53977275", "0.5393357", "0.53893405" ]
0.6321591
7
Busca el doble mas alto que tiene algun jugador en su mano
public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0 int numeroDoble=6; int toret=0; while(numeroDoble>=0){ int n=0; while(n<jug.length){ int f=0; while( f<jug[n].getNPiezas() && (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble)) f++; if(f<jug[n].getNPiezas()){ System.out.println("Encontrada la "+numeroDoble+","+numeroDoble +", la tiene él jugador "+(n+1)+" y el tiene " + "el primer turno"); toret=n; numeroDoble=-10; } n++; } numeroDoble-=1; } if(numeroDoble==-1){ toret=(int) (Math.random()*jug.length); System.out.println("No se ha encontrado ningun jugador con alguna pieza doble.\n" + "Empieza el jugador "+toret); } return toret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void establecerMano(Monton todas,Mano[] jugadores){\n int pos;\n Pieza pieza;\n for (int i = 0; i < jugadores.length; i++) {\n for (int j = 0; j < Ajustes.PIEZAS_MANO; j++) {\n if(todas.getNPiezasMonton()>0){\n pos=(int) (Math.random()*todas.getNPiezasMonton());\n pieza=todas.getUnaPieza(pos);\n jugadores[i].setUnaPieza(pieza);\n todas.eliminarPiezaMonton(pieza); \n }\n \n }\n }\n System.out.println(\"\\nCada jugador tiene \"+jugadores[0].getNPiezas()+\" piezas.\");\n if(todas.getNPiezasMonton()!=0)\n System.out.println(\"Y en el monton quedan \"+todas.getNPiezasMonton());\n else\n System.out.println(\"No quedan piezas en el monton\");\n }", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "public static void asignarPunteo(int puntos, String nombreJugador) {\n for (int sizeNombres = 0; sizeNombres < nombres.length - 1; sizeNombres++) {\n if ((nombreJugador.equals(nombres[sizeNombres])) && (puntos == 1)) {\n punteos[sizeNombres] += 1;\n break;\n }\n\n }\n\n }", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "private void analizarMensaje(String entrada, int indexJugador) {\n\t\tSystem.out.println(\"Analizando el mensaje del jugador con index \"+indexJugador+\" que dice \"+entrada);\n\t\t// TODO Auto-generated method stub\n\t\t// garantizar que solo se analice la petición del jugador en turno.\n\t\twhile (indexJugador != jugadorEnTurno && !entrada.equals(\"reiniciar\") && !entrada.equals(\"abandonar\")) {\n\t\t\tbloqueoJuego.lock();\n\t\t\ttry {\n\t\t\t\tesperarTurno.await();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\n\t\t// valida turnos para jugador 0 o 1\n\n\t\tif (entrada.equals(\"pedir\")) {\n\t\t\t// dar carta\n\t\t\tmostrarMensaje(\"Se envió carta al jugador \" + idJugadores[indexJugador]);\n\t\t\tCarta carta = mazo.getCarta();\n\t\t\t// adicionar la carta a la mano del jugador en turno\n\t\t\tmanosJugadores.get(indexJugador).add(carta);\n\t\t\tcalcularValorMano(carta, indexJugador);\n\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t// datosEnviar.ponerImagen(carta);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t// determinar qué sucede con la carta dada en la mano del jugador y\n\t\t\t// mandar mensaje a todos los jugadores\n\t\t\tif (valorManos[indexJugador] > 21) {\n\t\t\t\t// jugador Voló\n\t\t\t\tdatosEnviar\n\t\t\t\t\t\t.setMensaje(idJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste :(\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"voló\");\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador] + \" volo\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// notificar a todos que jugador sigue\n\t\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[0].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[1].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else {// era el jugador 3 entonces se debe iniciar el dealer\n\t\t\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tiniciarDealer();\n\t\t\t\t}\n\n\t\t\t} else {// jugador no se pasa de 21 puede seguir jugando\n\t\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"sigue\");\n\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Plantar\n\t\t} else if (entrada.equals(\"plantar\")) {\n\t\t\t// jugador en turno plantó\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" se plantó\");\n\t\t\tdatosEnviar.setJugadorEstado(\"plantó\");\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t// notificar a todos el jugador que sigue en turno\n\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tiniciarDealer();\n\t\t\t}\n\t\t\t// APUESTA\n\t\t}\n\t\telse if(entrada.equals(\"abandonar\")) {\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tterminarJuego();\n\t\t}\n\t\telse if(entrada.equals(\"salgo\")) {\n\t\t\t\n\t\t}\n\t\telse if(entrada.equals(\"reiniciar\")) {\n\t\t\tnumeroJugadoresReiniciando++;\n\t\t\tif(numeroJugadoresReiniciando==3) {\n\t\t\t\treiniciar();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdatosEnviar.setJugadorEstado(\"reiniciando\");\n\t\t\t\tjugadores[indexJugador].enviarMensajeCliente(datosEnviar);\n\t\t\t\tSystem.out.println(\"Enviando reiniciar al jugador con index \"+indexJugador);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tapuestasJugadores[indexJugador] = Integer.parseInt(entrada);\n\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" aposto \" + entrada);\n\t\t\tSystem.out.println(indexJugador+\" aposto \"+entrada);\n\t\t\tdatosEnviar.setEstadoJuego(true);\n\t\t\tdatosEnviar.setJugadorEstado(\"apuesta\");\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tSystem.out.println(\"Apuestas a enviar:\");\n\t\t\tfor(int i=0; i<apuestasJugadores.length;i++) {\n\t\t\t\tSystem.out.println(\"[\"+i+\",\"+apuestasJugadores[i]+\"]\");\n\t\t\t}\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\tdatosEnviar.setMensaje(\"\");\n\t\t\tdatosEnviar.setEstadoJuego(false);// Ronda de pedir cartas.\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t}\n\t}", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "public boolean asignarMascota(Perro perro){\n boolean bandera = false;\n Persona[] miembros_familia;\n familia_asignada = \"\";\n\n while (!bandera){\n //Recorrer todo el arreglo de Familia\n for (int i = 0; i <= numero_familias; i++){\n //Obtener los miembros de la familia actual \n miembros_familia = familias[i].getMiembros();\n\n //Recorrer cada miembro del arreglo de Persona\n for (int j = 0; j < miembros_familia.length; j++){ \n //Obtener edad del miembro\n int edad = miembros_familia[j].getEdad();\n\n //Verificar si el miembro al que se analiza puede tener la mascota y si esa familia puede tener perro\n if(verificarMascota(perro, edad)){\n if (familias[i].getNumeroMascotas() < 4){\n bandera = true;\n familias[i].setNumeroMascotas();\n familia_asignada = familias[i].getApellido();\n j = miembros_familia.length;\n i = familias.length;\n }\n }\n else{\n j = miembros_familia.length;\n }\n }\n }\n break;\n }\n return bandera;\n }", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "private String pedirCasilla(String mensaje) {\n char columna;\n int fila;\n String casilla;\n do {\n casilla = ManejoInfo.getTextoSimple(\"la casilla \" + mensaje);\n columna = casilla.charAt(0);\n fila = Character.getNumericValue(casilla.charAt(1));\n if (!validarColum(columna) && fila >= 9) {\n System.out.println(\"\\nIngrese una casilla valida!\\n\");\n }\n } while (!validarColum(columna) && fila >= 9);\n return casilla;\n }", "public void cartgarTareasConRepeticionDespuesDe(TareaModel model,int unid_medi,String cant_tiempo,String tomas)\n {\n Date fecha = convertirStringEnFecha(model.getFecha_aviso(),model.getHora_aviso());\n Calendar calendar = Calendar.getInstance();\n\n if(fecha != null)\n {\n calendar.setTime(fecha);\n calcularCantidadDeRepeticionesHorasMin(unid_medi,calendar,cant_tiempo,tomas,model);\n }\n }", "public boolean checkTonKhoHienTai(Integer masoThuoc){\n //System.out.println(\"-----checkTonKhoHienTai()-----\");\n boolean conTonThuoc = false;\n String sSQL = \"SELECT * from Ton_kho t, \" +\n \"(SELECT MAX(t.tonkho_Ma) as tonkho_ma FROM Ton_Kho t, Dm_khoa k WHERE t.dmkhoa_maso = k.dmkhoa_maso and t.dmthuoc_Maso = :dmthuocMaso AND (k.dmkhoa_Ma NOT IN ('KTL','KTD')) GROUP BY t.tonkho_Malienket) a \" +\n \"where t.tonkho_ma = a.tonkho_ma and t.tonkho_ton > 0\";\n Query q = getEm().createNativeQuery(sSQL, TonKho.class);\n q.setParameter(\"dmthuocMaso\", masoThuoc);\n List result = q.getResultList();\n if (result != null && result.size() > 0) {\n conTonThuoc = true;\n }\n return conTonThuoc;\n }", "String ponerMarcaCongelado(final boolean esCongelado) {\n return esCongelado ? Constantes.MARCA_CONGELADO : \"\";\n\n }", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "public void OnibusCheio(Connection con, List<Bilhetes> temporaria) {\n\t\t\n\t\t\n\t\t//Verifica se o onibus ja possui 15 pessoas (maximo de assento no meu onibus)\n\t\t\n\t\t\t\ttry {\n\t\t\t\t\tstmt=con.prepareStatement(\"select count(destino) from bilhetes where destino = ? and Hembarque = ? group by destino\" );\n\t\t\t\t\n\t\t\t\tstmt.setString(1, temporaria.get(0).getDestino());\n\t\t\t\tstmt.setString(2, temporaria.get(0).getHora_embarque());\n\t\t\t\t\n\t\t\t\tstmt.execute();\n\t\t\t\trs=stmt.getResultSet();\n\t\t\t\t\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tNumero_DE_Passageiro = rs.getInt(1);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ERRO: ONIBUS LOTADO, Numero de passageiros :\"+ Numero_DE_Passageiro);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public String dimeTuTiempo()\n {\n String cadResultado=\"\";\n if (horas<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+horas;\n cadResultado=cadResultado+\":\";\n if(minutos<10)\n {\n cadResultado=cadResultado+\"0\";\n }\n cadResultado=cadResultado+minutos;\n \n return cadResultado;\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}", "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 determinarGanador() {\n\t\t\n\t\t if(valorManos[3]>21) {\n\n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }else if(((valorManos[0] <= valorManos[3]) && (valorManos[1] <= valorManos[3]) &&( valorManos[2] <= valorManos[3]))\n\t\t\t\t && valorManos[3] <= 21){\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t\t// numGanadores ++;\n\t\t }else if(valorManos[0]>21 && valorManos[1] >21 && valorManos[2]>21 && valorManos[3] <= 21) {\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t }\n\t\t else { \n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]>valorManos[3] && valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t \n\t\t if(valorManos[0] > 21 && valorManos[1] > 21 && valorManos[2] > 21 && \n\t\t\t\t valorManos[3] > 21){\n\t\t\t\n\t\t }else if(valorManos[3]<21 && ganador.size()==0){\n\t\t\t ganador.add(\"dealer\");\n\t\t }\n\t }", "public static void darMasaje() {\n\n\t}", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "public static void jogar(int numeroJogador) {\n\t\tint ponto = 0;\r\n\t\t\r\n\t\t//em quanto jogador nao fizer 5 pontos ele vai repetir o laço\r\n\t\twhile (ponto < 5) {\r\n\t\t\t//joga o dado1 e dao2 (gerando valor aleatorio de 1 a 6)\r\n\t\t\tint dado1 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\tint dado2 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\t//se o valor da soma do dado1 e dado2 for 7 ou 11, ele ganha 1 ponto\r\n\t\t\tif (((dado1 + dado2) == 7) || ((dado1 + dado2) == 11)) {\r\n\t\t\t\tponto++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"jogador \"+numeroJogador+\"º. Ponto = \"+ ponto);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//depois de fazer os 5 pontos, é verificado em que posição o jogador esta.\r\n\t\tif (posicao == 0) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Primeiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 5000,00\");\t\t\t\r\n\t\t} else if (posicao == 1) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Segundo jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 4000,00\");\t\t\t\r\n\t\t} else if (posicao == 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Terceiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 3000,00\");\t\t\t\r\n\t\t} else if (posicao > 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"jogador \" + numeroJogador + \"º esta em \" + posicao + \"º posicao. Não ganhou nada\");\r\n\t\t}\r\n\t}", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\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 }", "public void tocarTelefone() {\n System.out.println(\"Telefone \" + getNumero() + \" está tocando!\");\n notificarTodos();\n }", "public static void turnoJugador(){\n //variables locales\n int opcionBatalla;\n Scanner scannerDos=new Scanner(System.in);//nuevo scanner vara no recargar al anterior\n //menu de opciones para el turno del jugador\n System.out.println(\"\\nturno de:\"+nombrePersonaje);\n\tSystem.out.println(\"\\n1.Atacar\\t\\t\\t\\t\\tnombre:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.println(\"2.Curar\\t\\t\\t\\t\\t\\tPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.println(\"3.Item\\t\\t\\t\\t\\t\\tPuntos De mana (MP):\\t\"+puntosDeMana);\n\tSystem.out.println(\"4.Tengo Miedo\\t\\t\\t\\t\\tOro: \\t\\t\"+oro);\n System.out.println(\"\\t\\t\\t\\t\\t\\tVida del enemigo:\\t\"+puntosDeVidaEnemigo);\n\n do{//validando la opcion seleccionada\n System.out.println(\"Numero de opcion:\");\n opcionBatalla= scannerDos.nextInt();\n \n }while(opcionBatalla<1||opcionBatalla>4);\n //comparacion de la opcion seleccionada\n switch(opcionBatalla){\n case 1:{\n atacar();//llamando funcion atacar\n break;\n }\n case 2:{\n curar();//llamando funcion curar\n break;\n }\n case 3:{\n item();//llamando funcion item\n break;\n }\n \tdefault:{\n miedo();//llamando funcion miedo\n break;\n } \n }\n }", "public void jugarMaquinaSola(int turno) {\n if (suspenderJuego) {\n return;\n }\n CuadroPieza cuadroActual;\n CuadroPieza cuadroDestino;\n CuadroPieza MovDestino = null;\n CuadroPieza MovActual = null;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n cuadroActual = tablero[x][y];\n if (cuadroActual.getPieza() != null) {\n if (cuadroActual.getPieza().getColor() == turno) {\n for (int x1 = 0; x1 < 8; x1++) {\n for (int y1 = 0; y1 < 8; y1++) {\n cuadroDestino = tablero[x1][y1];\n if (cuadroDestino.getPieza() != null) {\n if (cuadroActual.getPieza().validarMovimiento(cuadroDestino, this)) {\n if (MovDestino == null) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n } else {\n if (cuadroDestino.getPieza().getPeso() > MovDestino.getPieza().getPeso()) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n if (cuadroDestino.getPieza().getPeso() == MovDestino.getPieza().getPeso()) {\n //Si es el mismo, elijo al azar si moverlo o no\n if (((int) (Math.random() * 3) == 1)) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n }\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n if (MovActual == null) {\n boolean b = true;\n do {//Si no hay mov recomendado, entonces genero uno al azar\n int x = (int) (Math.random() * 8);\n int y = (int) (Math.random() * 8);\n tablero[x][y].getPieza();\n int x1 = (int) (Math.random() * 8);\n int y1 = (int) (Math.random() * 8);\n\n MovActual = tablero[x][y];\n MovDestino = tablero[x1][y1];\n if (MovActual.getPieza() != null) {\n if (MovActual.getPieza().getColor() == turno) {\n b = !MovActual.getPieza().validarMovimiento(MovDestino, this);\n //Si mueve la pieza, sale del while.\n }\n }\n } while (b);\n }\n if (MovActual.getPieza().MoverPieza(MovDestino, this)) {\n this.setTurno(this.getTurno() * -1);\n if (getRey(this.getTurno()).isInJacke(this)) {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Hacke Mate!!! - te lo dije xD\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n } else {\n JOptionPane.showMessageDialog(null, \"Rey en Hacke - ya t kgste\");\n }\n } else {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Empate!!!\\nComputadora: Solo por que te ahogaste...!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n if (Pieza.getCantMovimientosSinCambios() >= 50) {\n JOptionPane.showMessageDialog(null, \"Empate!!! \\nComputadora: Vaya, han pasado 50 turnos sin comernos jeje!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Otra Partida Amistosa¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n }\n }\n if (this.getTurno() == turnoComputadora) {\n jugarMaquinaSola(this.getTurno());\n }\n }", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "Jugador consultarGanador();", "public void asignarPedido(Pedido pedido){\n\t\tdouble costeMin=100000;\n\t\tint pos=0;\n\t\t\n\t\tif (pedido.getPeso()<PESOMAXMOTO) {\n\t\tif(motosDisponibles.size()!=0){\n\t\t \n\t\t\tpos=0;\n\t\t\t//Damos como primer valor el de primera posición\n\t\t\t\n\t\t\tcosteMin=pedido.coste(motosDisponibles.get(0));\n\t\t\t\n\t\t\t//Ahora vamos a calcular el min yendo uno por uno\n\t\t\t\n\t\t\tfor(int i=0; i<motosDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(motosDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(motosDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Una vez hallada la moto de menor coste la asignamos\n\t\t\tpedido.setTransporte(motosDisponibles.get(pos));\n\t\t\tmotosDisponibles.removeElementAt(pos);\n\t\t\t\n\t\t \n\t\t}\n\t\telse {\n\t\t\tpedidosEsperandoMoto.add(pedidosEsperandoMoto.size(),pedido);\n\t\t}\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (furgonetasDisponibles.size()!=0){\n\t\t\tcosteMin = pedido.coste(furgonetasDisponibles.get(0));\n\t\t\tfor(int i=0; i<furgonetasDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(furgonetasDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(furgonetasDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpedido.setTransporte(furgonetasDisponibles.get(pos));\n\t\t\tfurgonetasDisponibles.removeElementAt(pos);\n\t\t}\n\t\t\telse{\n\t\t\t\tpedidosEsperandoFurgoneta.add(pedidosEsperandoFurgoneta.size(),pedido);\n\t\t\t}\n\t\t}\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public int jogadorAtual() {\n return vez;\n }", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}", "private void verificarMuerte() {\n if(vidas==0){\n if(estadoJuego==EstadoJuego.JUGANDO){\n estadoJuego=EstadoJuego.PIERDE;\n //Crear escena Pausa\n if(escenaMuerte==null){\n escenaMuerte=new EscenaMuerte(vistaHUD,batch);\n }\n Gdx.input.setInputProcessor(escenaMuerte);\n efectoGameOver.play();\n if(music){\n musicaFondo.pause();\n }\n }\n guardarPuntos();\n }\n }", "public void actualizarPantallaJuego(float delta)\r\n {\r\n //recuadroInfoJuego.actualizarTiempo(delta); // Con esto actualizamos el tiempo del HUD\r\n\r\n // Con el siguiente ciclo actualizamos el movimiento o posicion de los monstruos\r\n for (int i=0; i < enemigos.size(); i++)\r\n {\r\n // Metodo encargado de renovar las posiciones dado un diferencial de tiempo\r\n enemigos.get(i).actualizarPosicion(delta);\r\n\r\n // En caso que el enemigo haya muerto entonces\r\n if (enemigos.get(i).haMuerto())\r\n {\r\n // Se lo pasamos al jugador contrario de modo que\r\n try\r\n {\r\n // Le enviamos un mensaje sobre que tipo de enemigo debe generar de manera aleatoria\r\n String aux = \"Transferir enemigo: \" + enemigos.get(i).getTipo() + \"\\n\";\r\n socketCliente.getOutputStream().write(aux.getBytes());\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n // Se suma su valor en puntaje al puntaje general obtenido por el usuario\r\n recuadroInfoJuego.agregarPuntaje(enemigos.get(i).getPuntaje());\r\n\r\n // Luego, se suma uno al numero total de enemigos eliminados por el jugador\r\n recuadroInfoJuego.anotarEnemigo();\r\n\r\n // Y se elimina el monstruo de la lista de enemigos\r\n enemigos.remove(i);\r\n i = i - 1;\r\n }\r\n }\r\n\r\n // Si ya se cumplio el tiempo para generar otro monstruo entonces\r\n if (contaTiempo >= tiempoParaGeneracion)\r\n {\r\n // Agregamos un nuevo enemigo aleatorio en coordenas generadas tambien de manera aleatoria\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), MathUtils.random(1,5), true));\r\n\r\n // Y reseteamos el contador de tiempo\r\n contaTiempo = 0;\r\n }\r\n\r\n // O si se detecto que me pasaron un monstruo entonces\r\n if (enemigoTransferido != -1)\r\n {\r\n // Genero el tipo de monstruo especificado en coordenadas aleatorias\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), enemigoTransferido, true));\r\n\r\n // Y reinicio el dectector de monstruos tranferidos\r\n enemigoTransferido = -1;\r\n }\r\n\r\n contaTiempo = contaTiempo + delta; // Por ultimo se cuenta el tiempo\r\n }", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "@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 Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "public void comprobarEstado() {\n if (ganarJugadorUno = true) {\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (ganarJugadorDos = true) {\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tirar == 9 && !ganarJugadorUno && !ganarJugadorDos) {\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\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}", "private boolean completouVolta(int jogador, int valorDados) {\n\n if ((this.posicoes[jogador] + valorDados) >= 40 && this.posicoes[jogador] != 40) {\n this.listaJogadores.get(jogador).addDinheiro(200);\n this.print(\"\\tGanha $200 por passar pela casa 40.\");\n return true;\n }\n return false;\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 recibirAtaque(Integer danio) {\n List<Soldado> eliminados = new ArrayList<Soldado>();\n for (Soldado soldado : soldados) {\n if (danio > 0) {\n danio = soldado.recibirAtaque(danio);\n if (soldado.getVida() <= 0) {\n eliminados.add(soldado);\n }\n } else {\n break;\n }\n }\n eliminarSoldados(eliminados);\n }", "private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "private String mayorTurno(ABBTurnosTDA a){\t\t\n\t\tif(a.hijoDer().arbolVacio())\n\t\t\treturn a.turno();\n\t\telse\n\t\t\treturn mayorTurno(a.hijoDer());\n\t}", "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 synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }", "public void pedirPuestoDeInforme(Pasajero pasajero) {\n\t\tSystem.out.println(\"[\\uD83D\\uDC6E FILA PUESTO INFORME]: \"+pasajero.toString()+\" se ha formado\");\n\t\ttry {\n\t\t\tthis.turnoPuestoDeInforme.acquire();} catch (InterruptedException e) {}\n\t\t//El pasajero es atendido por un puesto de informe\n\t\ttry {\n\t\t\tthis.puestosDeInformesDisponibles.acquire();} catch (InterruptedException e) {}\n\t\t\n\t\t//Le digo al anterior pasajero que avance un lugar\n\t\tthis.turnoPuestoDeInforme.release();\t\n\t\t\n\t\tSystem.out.println(\"\\uD83D\\uDEC9 \\uD83D\\uDEC8 \"+pasajero.toString()+\": Esta siendo atendido por un puesto de informes\");\n\t\t//Se me da un vuelo (pues no interesa modelar el tema de reserva)\n\t\ttry {\n\t\t\t//simulo atención\n\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {}\n\t\tthis.torre.obtenerPasaje(pasajero);\n\t\tthis.puestosDeInformesDisponibles.release();\n\t\t}", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public char fazerJogada(int linha, int coluna) {\r\n \r\n // se a jogada é valida\r\n if (ehJogadaValida(linha,coluna)) {\r\n // pegar o simbolo do jogador da vez\r\n char simbolo = jogadorDaVez().getSimbolo();\r\n \r\n // colocar o simbolo no tabuleiro do jogador da vez\r\n tabuleiro.setPeca(linha,coluna,simbolo);\r\n \r\n // contar o numero de jogadas\r\n contaJogadas++;\r\n \r\n // verificar se o jogo nao terminou\r\n if (!verificaFimDoJogo()) { \r\n // muda de jogador\r\n vezDoJogador1 = !vezDoJogador1;\r\n } else {\r\n this.fimDoJogo = true;\r\n if (this.vencedor != null) { // caso empatou..\r\n this.vencedor.incrementaVitorias();\r\n }\r\n }\r\n // retornar o simbolo do jogador\r\n return simbolo;\r\n }\r\n return ' ';\r\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}", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "public Queue mejoresPromediosMes(int TamañoArreglo, int mes )\n\t{\n\t\tQueue Respuesta = null;\n\n\t\t//Pasa los arreglos de queue mes a un arreglo temporal \n\t\tQueue f = queueMonthly;\n\t\tQueue pre = null;\n\t\tfor(int i = 0; i< (queueMonthly.darNumeroElementos()-1); i++)\n\t\t{\n\t\t\tdouble[] dato= (double[]) queueMonthly.dequeue();\n\t\t\tUBERTrip datof = new UBERTrip((short)dato[0],(short)dato[1], (short)dato[2],(float) dato[3],(float) dato[4], (float)dato[5],(float) dato[6]);\n\t\t\t\n\t\t\tpre.enqueue(datof);\n\t\t}\n\n\t\tUBERTrip[] arreglo = new UBERTrip[pre.darNumeroElementos()]; \n\n\t\tfor(int z= 0; z< pre.darNumeroElementos(); z ++)\n\t\t{\n\t\t\tUBERTrip y = (UBERTrip) pre.dequeue();\n\t\t\tarreglo[z] = y;\n\t\t}\n\n\t\t//Separo el arreglo por los datos del mes solicitado \n\t\tUBERTrip[] arregloMes= new UBERTrip[pre.darNumeroElementos()];\n\n\t\tint posicion = 0;\n\n\t\tfor(int j = 0; j< arreglo.length; j++)\n\t\t{\n\t\t\tdouble[] x = arreglo[j].darDatosViaje();\n\n\t\t\tif(x[2] == mes)\n\t\t\t{\n\t\t\t\tarregloMes[posicion] = arreglo[j]; \n\t\t\t\tposicion ++;\n\t\t\t}\n\t\t}\n\n\t\t// Ordenamiento por insercion\n\t\tfor (int i=1; i < arregloMes.length; i++) \n\t\t{\n\t\t\tUBERTrip aux = arregloMes[i];\n\n\t\t\tint j = 0;\n\n\t\t\tdouble datosArreglomes[] = arregloMes[j].darDatosViaje();\n\t\t\tdouble datosAux[] = aux.darDatosViaje();\n\n\t\t\tfor (j=i-1; j >= 0 && datosArreglomes[3] > datosAux[3]; j--)\n\t\t\t{\n\t\t\t\tarregloMes[j+1] = arregloMes[j];\n\t\t\t}\n\t\t\tarregloMes[j+1] = aux;\n\t\t}\n\n\t\t// Retorna los N elementos \n\t\tfor(int i =0; i< TamañoArreglo; i++)\n\t\t{\n\t\t\tRespuesta.enqueue(arregloMes[i]);\n\t\t}\n\n\t\treturn Respuesta;\n\t}", "public int masVendido(int cantidad){\r\n \r\n return cantidad;\r\n }", "private Boolean esMejor() {\n if(debug) {\n System.out.println(\"**********************esMejor\");\n }\n \n if(this.solOptima == null || (this.sol.pesoEmparejamiento < this.solOptima.pesoEmparejamiento)) return true;\n else return false;\n }", "public String[] listadoJugadoresEnMesa() {\n\n\t\tString[] listado = new String[this.jugadoresEnMesa.size()];\n\n\t\tfor (int i = 0; i < this.jugadoresEnMesa.size(); i++)\n\t\t\tlistado[i] = String.format(\"%d - %s\", (i + 1), this.jugadoresEnMesa.get(i).info());\n\n\t\treturn listado;\n\t}", "public void maximo(java.awt.event.KeyEvent evt, int tamanio, String txt){\n if (txt.length()== tamanio){\r\n evt.consume();\r\n JOptionPane.showMessageDialog(null,\"¡Sólo puede ingresar \"+ tamanio +\" carácteres!\",\"Mensaje del Sistema\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "private void botonEnviarActionPerformed(java.awt.event.ActionEvent evt) {\n emisor = Integer.parseInt(jTextField2.getText());\r\n time_emisor = Integer.parseInt(jTextField4.getText());\r\n receptor = Integer.parseInt(jTextField3.getText());\r\n time_receptor = Integer.parseInt(jTextField5.getText());\r\n \r\n posXEmisor = emisor;\r\n posYEmisor = time_emisor;\r\n posXReceptor = receptor;\r\n posYReceptor = time_receptor;\r\n \r\n if(desfaces[emisor][time_emisor]>=desfaces[receptor][time_receptor]){\r\n jButton1.setEnabled(true);\r\n lienzo.setGraficar_flecha(true);\r\n } else {\r\n lienzo.setGraficar_flecha(false);\r\n lienzo.repaint();\r\n jPanel5.repaint();\r\n }\r\n }", "public boolean buscarMovimiento(String gstrLBL_GLOSA, String gstrLBL_ORDENANTE, String gstrLBL_FECHA, String GstrLBL_TIPO,\n\t\t\tString gstrLBL_MONTO, String gstrLBL_MONEDA) throws InterruptedException, IOException{\n\t\tWebElement lista = Mdl_Variables.Gwed_Driver.findElement(By.xpath(\"//html/body/div[1]/div[1]/div/div[2]/div/div/ul\"));\n\t\tList<WebElement> num=lista.findElements(By.xpath(\".//li\"));\n\t\t\n\t\tfor (int j = 0;j<num.size();j++)\n\t\t{\n\t\t\t/*if(num.get(j).getText().split(\"\\n\")[0].trim().equals(gstrLBL_GLOSA)){\n\t\t\t\tif(num.get(j).getText().split(\"\\n\")[1].trim().equals(gstrLBL_ORDENANTE)){\n\t\t\t\t\tif(num.get(j).getText().split(\"\\n\")[2].trim().equals(gstrLBL_FECHA)){\n\t\t\t\t\t\tif(num.get(j).getText().split(\"\\n\")[3].trim().equals(formatearMonto(GstrLBL_TIPO,gstrLBL_MONTO,gstrLBL_MONEDA))){\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tif(num.get(j).getText().split(\"\\n\")[0].trim().equals(gstrLBL_GLOSA)){\n\t\t\t\tif(num.get(j).getText().split(\"\\n\")[1].trim().equals(gstrLBL_FECHA)){\n\t\t\t\t\tif(num.get(j).getText().split(\"\\n\")[2].trim().equals(formatearMonto(GstrLBL_TIPO,gstrLBL_MONTO,gstrLBL_MONEDA))){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public String gIngresarMesa(int idMesa, int idJugador){\n PaquetePk pk = new PaquetePk(String.valueOf(idMesa) + \"-\" + String.valueOf(idJugador) , TipoPaquete.INGRESAR_A_MESA);\n return Parser.objectToString(pk);\n }", "public static int tirarDados(){\n //elige valores aleatorios para los dados\n int dado1 = 1 + numerosAleatorios.nextInt(6);//<primer tiro del dado\n int dado2 = 1 + numerosAleatorios.nextInt(6);//< segundo tiro del dado\n \n int suma = dado1 + dado2;//< suma de los valores de los dados\n \n //muestra los resultados de este tiro\n System.out.printf(\"El jugador tiro %d + %d = %d%n\", dado1, dado2, suma);\n return suma;\n }", "public Jugador obtenerJugador();", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "public static String asignarNombres() {\n Scanner escaner = new Scanner(System.in);\n String nombrePrevioArreglo;\n int contador;\n boolean nombreEncontrado = true;\n\n System.out.println(\"Bienvenido Jugador\");\n System.out.println(\"Escribe tu nombre: \\n\");\n nombrePrevioArreglo = escaner.nextLine();\n //Volvemos a construir el string que adoptara los valores del mismo pero en mayusculas\n nombrePrevioArreglo = new String((mayusculas(nombrePrevioArreglo.toCharArray())));\n\n //Empezamos desde una condicion de inicio 1 para agrandar los nombres y asignarle el nombre a la posicion 0 como al punteo\n if (nombres.length == 1) {\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n nombres[0] = nombrePrevioArreglo;\n punteos[0] = 0;\n\n } else {\n //ciclo que trata de encontrar el nombre en el arreglo nombre\n for (contador = 0; contador < nombres.length; contador++) {\n if (nombrePrevioArreglo.equals(nombres[contador])) {\n nombreEncontrado = true;\n break;\n }\n nombreEncontrado = false;\n }\n /*Al no encontrar el nombre creamos dos arreglos mas (nombresAuxiliar y punteosAuxiliar) que serviran de almacenamiento tenporal mientras\n volvemos a crear el nuevo arreglo de los nombres les volvemos a colocar los datos que poseian mas el nombre nuevo\n */\n if (nombreEncontrado == false) {\n String[] nombresAuxiliar = new String[nombres.length];\n int[] punteosAuxiliar = new int[nombres.length];\n punteosAuxiliar = punteos;\n nombresAuxiliar = nombres;\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n for (contador = 0; contador < nombresAuxiliar.length; contador++) {\n nombres[contador] = nombresAuxiliar[contador];\n punteos[contador] = punteosAuxiliar[contador];\n }\n punteos[nombres.length - 2] = 0;\n nombres[nombres.length - 2] = nombrePrevioArreglo;\n }\n }\n //Regresa el nombre ya registrado\n return nombrePrevioArreglo;\n\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "public void setPuntos(int puntaje) {\n this.puntos = puntaje;\n }", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }", "@Override\n\tpublic void darMasaje() {\n\t\t\n\t}", "private String limitarTamanoMensaje(String mensaje, int max) {\n int lon = mensaje.length();\n String strTexto = \"\";\n if (lon > max) {\n for (int i = 0; i < max; i++) {\n strTexto += mensaje.charAt(i);\n }\n } else {\n strTexto = mensaje;\n }\n return strTexto;\n }", "public int buscarCuenta (String cuenta){// busca el dni de los jugadores pasando un parametro cuenta valido\r\n\t\tString cadena=\"SELECT Dni_Jugador FROM jugadores where Cuenta_Bancaria='\"+cuenta+\"'\";\r\n\t\ttry{\r\n\t\t\tthis.abrir();\r\n\t\t\ts=c.createStatement(); // similar al anterior\r\n\t\t\treg=s.executeQuery(cadena);\r\n\t\t\twhile(reg.next()){ //mientras exista un próximo registro, retorna 1 o 0 si no hay mas registros\r\n\t\t\t\ts.close();\r\n\t\t\t\tthis.cerrar();\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\ts.close();\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tcatch ( SQLException e){\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "private void compruebaMinas(boolean add, int i, int j) {\n\tif (add) {\n\t contadorInterrogaciones++;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas++;\n\t }\n\t} else {\n\t contadorInterrogaciones--;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas--;\n\t }\n\t}\n\tif ((contadorMinas == numMinas) && (contadorInterrogaciones == numMinas)) {\n\t this.setVisible(false);\n\t ventanaReset.setVisible(true);\n\t labelGanador.setVisible(true);\n\t}\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 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 void contarPosiciones() {\n if (tablero[0] == 1 && tablero[1] == 1 && tablero[2] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 1 && tablero[4] == 1 && tablero[5] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 1 && tablero[7] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[3] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 1 && tablero[4] == 1 && tablero[7] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[5] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[4] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[4] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n // posibilidades jugados dos\n if (tablero[0] == 2 && tablero[1] == 2 && tablero[2] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 2 && tablero[4] == 2 && tablero[5] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 2 && tablero[7] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[3] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 2 && tablero[4] == 2 && tablero[7] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[5] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[4] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[4] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if(tirar == 18 && !ganarJugadorUno && !ganarJugadorDos ){\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public int consultaMesa(int mesa){\n \n int val;\n if(mesas[mesa-1] == 0){\n System.out.println(\"¡¡¡mesa disponible!!!\");\n \n System.out.println(\"¿desea asignar esta mesa a algun comensal?\\n1.-si\\n2.-no \"); //pregunta si quiere agregar comensal \n val = num.nextInt();\n \n if(val < 1 || val > 2){\n System.out.println(\"el valor es invalido\");\n }else if(val == 1){ //ingresa si es necesario\n //llamar funcion\n \n System.out.println(\"ingrese nombre de comensal: \");\n num.nextLine();\n comensal = num.nextLine();\n asignaMesa(comensal,mesa);\n }else if(val == 2){\n System.out.println(\"estas son las mesas disponibles: \");\n for(int i=0;i<mesas.length;i++){ \n System.out.print(\" \"+mesas[i]);\n }\n }\n }else if(mesas[mesa-1] == 1){\n System.out.println(\"mesa ocupada\");\n System.out.println(\"estas son las mesas disponibles: \");\n for(int i=0;i<10;i++){\n System.out.print(\" \"+mesas[i]);\n }\n }\n return 0;\n }", "private void cuentaminas() {\n\t//TODO: falta por hacer que calcule lasminas en el borde exterior\n\t//Probar a hacerlo con un try catch\n\tint minas = 0;\n\n\tfor (int i = 0; i < filas; i++) {\n\t for (int j = 0; j < columnas; j++) {\n\t\t//\t1 2 3\n\t\t//\t4 X 5\n\t\t//\t6 7 8\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j - 1].getMina();//1\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j].getMina();//2\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j + 1].getMina();//3\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j - 1].getMina();//4\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j + 1].getMina();//5\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j - 1].getMina();//6 \t\t \n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j].getMina();//7\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j + 1].getMina();//8\n\t\t} catch (Exception e) {\n\t\t}\n\t\tarrayBotones[i][j].setNumeroMinasAlrededor(minas);\n\t\t//TODO: comentar la siguiente parte para que no aparezcan los numeros al iniciar\n//\t\tif (arrayBotones[i][j].getMina() == 0 && minas != 0) {\n//\t\t arrayBotones[i][j].setText(String.valueOf(minas));\n//\t\t}\n\t\tminas = 0;\n\t }\n\t}\n }", "@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 static void tienda(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int opcionCompra; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //mostrando en pantalla las opciones de la tienda\n System.out.println(\"Bienvenido a la tienda, que deceas adquirir:\\n\");\n\tSystem.out.println(\"PRODUCTO \\tPRECIO \\tBENEFICIO\");\n\tSystem.out.println(\"1.Potion \\t50 oro \\tcura 25 HP\");\n\tSystem.out.println(\"2.Hi-Potion\\t100 oro \\tcura 75 HP\");\n\tSystem.out.println(\"3.M-Potion \\t75 oro \\trecupera 10 MP\");\n //ingresando numero de opcion\n System.out.println(\"\\n\\nIngrese numero de opcion:\");\n opcionCompra=scannerDos.nextInt();\n //comparando la opcion de compra\n switch(opcionCompra){\n case 1:{//condicion de oro necesario para el articulo1 \n\t\t\tif(oro>=50){\n articulo1=articulo1+1;\n System.out.println(\"compra exitosa\");\n }else {\n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t\tcase 2:{//condicion de oro necesario para el articulo2\n if(oro>=100){\n articulo2=articulo2+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t default:{//condicion de oro necesario para el articulo3\n if(oro>=75){\n articulo3=articulo3+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\"); //poner while para ,ejora\n \t\t}\n break;\n }\n }\n }", "public void mostraMesasVoto() {\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\trmiserver.printMesasVoto(this.idConsola);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "public Imprimir_ConvertirNumerosaLetras(String numero) throws NumberFormatException {\r\n\t\t// Validamos que sea un numero legal\r\n\t\tif (Integer.parseInt(numero) > 999999999)\r\n\t\t\tthrow new NumberFormatException(\"El numero es mayor de 999'999.999, \" +\r\n\t\t\t\t\t\"no es posible convertirlo\");\r\n\t\t\r\n\t\t//Descompone el trio de millones - ¡SGT!\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(numero,8)) + String.valueOf(Dataposi(numero,7)) + String.valueOf(Dataposi(numero,6)));\r\n\t\tif(k == 1)\r\n\t\t\tenLetras = \"UN MILLON \";\r\n\t\tif(k > 1)\r\n\t\t\tenLetras = Interpretar(String.valueOf(k)) + \"MILLONES \";\r\n\r\n\t\t//Descompone el trio de miles - ¡SGT!\r\n\t\tint l = Integer.parseInt(String.valueOf(Dataposi(numero,5)) + String.valueOf(Dataposi(numero,4)) + String.valueOf(Dataposi(numero,3)));\r\n\t\tif(l == 1)\r\n\t\t\tenLetras += \"MIL \";\r\n\t\tif(l > 1)\r\n\t\t\tenLetras += Interpretar(String.valueOf(l))+\"MIL \";\r\n\r\n\t\t//Descompone el ultimo trio de unidades - ¡SGT!\r\n\t\tint j = Integer.parseInt(String.valueOf(Dataposi(numero,2)) + String.valueOf(Dataposi(numero,1)) + String.valueOf(Dataposi(numero,0)));\r\n\t\tif(j == 1)\r\n\t\t\tenLetras += \"UN\";\r\n\t\t\r\n\t\tif(k + l + j == 0)\r\n\t\t\tenLetras += \"CERO\";\r\n\t\tif(j > 1)\r\n\t\t\tenLetras += Interpretar(String.valueOf(j));\r\n\t\t\r\n\t\tenLetras += \"PESOS\";\r\n\r\n\t}", "private void mostrarPorMarca() {\n Scanner leer = new Scanner(System.in);\n String marca; //marca a buscar\n int cont = 0;\n System.out.print(\"Introduce la marca de coche a buscar: \");\n marca = leer.next();\n\n System.out.print(\"Las posiciones con coches con esa marca son: \");\n\n for (int i = 0; i < this.coches.size(); i++) {\n if (coches.get(i).getMarca().equalsIgnoreCase(marca)) {\n if (cont != 0) {\n System.out.print(\", \");\n }\n System.out.print(i);\n cont = 1;\n }\n }\n System.out.println();\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "public int obtenerMinuto() { return minuto; }", "private Celula celulaEscolhida(BotaoJogo botao) {\n\t\treturn mapa.getCelula(botao.getLinha(), botao.getColuna());\r\n\t}" ]
[ "0.6531318", "0.62545747", "0.6145477", "0.602559", "0.60227895", "0.60150766", "0.6010115", "0.6009563", "0.5995503", "0.5969164", "0.5961272", "0.5955689", "0.59420455", "0.5919171", "0.59181994", "0.591455", "0.5899144", "0.5897197", "0.5895217", "0.58821094", "0.5870968", "0.5847584", "0.5843677", "0.5832857", "0.58316785", "0.5829434", "0.58293927", "0.58088183", "0.5781613", "0.57733077", "0.5767343", "0.5737932", "0.5724838", "0.57231724", "0.56912774", "0.567818", "0.5660382", "0.5660029", "0.5657016", "0.5650971", "0.5649054", "0.5648963", "0.5646466", "0.56464404", "0.5644169", "0.5641819", "0.56139857", "0.5611989", "0.56009996", "0.5596917", "0.5586249", "0.55792147", "0.55786836", "0.5570187", "0.5568947", "0.55651546", "0.5564186", "0.55588573", "0.5557845", "0.5557373", "0.55572903", "0.5552498", "0.5539319", "0.5536512", "0.5533031", "0.552646", "0.5517103", "0.5516397", "0.55147064", "0.55141073", "0.5513817", "0.5509229", "0.5508873", "0.55029446", "0.5501039", "0.5496459", "0.5496326", "0.5495601", "0.54930943", "0.5490992", "0.54898506", "0.54876465", "0.5486951", "0.54838514", "0.5475519", "0.54709524", "0.5470862", "0.54663634", "0.5462564", "0.5459686", "0.5459177", "0.5455666", "0.5453994", "0.54539317", "0.5453415", "0.5447548", "0.5441055", "0.54353815", "0.54322386", "0.54297876" ]
0.6316497
1
Analiza la variable puedeJugar de cada jugador
public static boolean sePuedeSeguir(Mano [] jugadores){ boolean toret; int n=0; while(n<jugadores.length && !jugadores[n].getPuedeJugar()) n++; return !(n==jugadores.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "public boolean verificarJugadaBJ(ArrayList<Carta> manoJugador) {\n\t\t if(manoJugador.size() == 2) {\n\t\t\t for(int i = 0; i < manoJugador.size(); i++) {\n\t\t\t\t if(manoJugador.get(i).getValor().equals(\"As\")) {\n\t\t\t\t\t for(int j = 0; j < 2; j++) {\n\t\t\t\t\t\t if(manoJugador.get(j).getValor().equals(\"K\") || manoJugador.get(j).getValor().equals(\"J\") ||\n\t\t\t\t\t\t\tmanoJugador.get(j).getValor().equals(\"Q\")) {\n\t\t\t\t\t\t\treturn true; \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\t return false;\n\t\t }else {\n\t\t\t return false;\n\t\t }\n\t\t \n\t }", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}", "public static void establecerMano(Monton todas,Mano[] jugadores){\n int pos;\n Pieza pieza;\n for (int i = 0; i < jugadores.length; i++) {\n for (int j = 0; j < Ajustes.PIEZAS_MANO; j++) {\n if(todas.getNPiezasMonton()>0){\n pos=(int) (Math.random()*todas.getNPiezasMonton());\n pieza=todas.getUnaPieza(pos);\n jugadores[i].setUnaPieza(pieza);\n todas.eliminarPiezaMonton(pieza); \n }\n \n }\n }\n System.out.println(\"\\nCada jugador tiene \"+jugadores[0].getNPiezas()+\" piezas.\");\n if(todas.getNPiezasMonton()!=0)\n System.out.println(\"Y en el monton quedan \"+todas.getNPiezasMonton());\n else\n System.out.println(\"No quedan piezas en el monton\");\n }", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "private Integer contabilizaJogas(Jogador jogador)\r\n {\r\n int i = 0 ;\r\n \r\n if(contadorJogadas.containsKey(jogador)) {\r\n i = contadorJogadas.get(jogador);\r\n }\r\n \r\n contadorJogadas.put(jogador, i + 1);\r\n return contadorJogadas.get(jogador);\r\n }", "private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public Jugador obtenerJugador();", "private boolean completouVolta(int jogador, int valorDados) {\n\n if ((this.posicoes[jogador] + valorDados) >= 40 && this.posicoes[jogador] != 40) {\n this.listaJogadores.get(jogador).addDinheiro(200);\n this.print(\"\\tGanha $200 por passar pela casa 40.\");\n return true;\n }\n return false;\n\n }", "public void testCasillasJugador1( )\n {\n setupEscenario1( );\n int tamanho = casillasJugador1.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador1.get( i ) ).intValue( );\n assertEquals( marcaJugador1, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public void contarPosiciones() {\n if (tablero[0] == 1 && tablero[1] == 1 && tablero[2] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 1 && tablero[4] == 1 && tablero[5] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 1 && tablero[7] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[3] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 1 && tablero[4] == 1 && tablero[7] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[5] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 1 && tablero[4] == 1 && tablero[8] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 1 && tablero[4] == 1 && tablero[6] == 1) {\n ganarJugadorUno = true;\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n // posibilidades jugados dos\n if (tablero[0] == 2 && tablero[1] == 2 && tablero[2] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[3] == 2 && tablero[4] == 2 && tablero[5] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[6] == 2 && tablero[7] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[3] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[1] == 2 && tablero[4] == 2 && tablero[7] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[5] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[0] == 2 && tablero[4] == 2 && tablero[8] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tablero[2] == 2 && tablero[4] == 2 && tablero[6] == 2) {\n ganarJugadorDos = true;\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if(tirar == 18 && !ganarJugadorUno && !ganarJugadorDos ){\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\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}", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public static void jogar(int numeroJogador) {\n\t\tint ponto = 0;\r\n\t\t\r\n\t\t//em quanto jogador nao fizer 5 pontos ele vai repetir o laço\r\n\t\twhile (ponto < 5) {\r\n\t\t\t//joga o dado1 e dao2 (gerando valor aleatorio de 1 a 6)\r\n\t\t\tint dado1 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\tint dado2 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\t//se o valor da soma do dado1 e dado2 for 7 ou 11, ele ganha 1 ponto\r\n\t\t\tif (((dado1 + dado2) == 7) || ((dado1 + dado2) == 11)) {\r\n\t\t\t\tponto++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"jogador \"+numeroJogador+\"º. Ponto = \"+ ponto);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//depois de fazer os 5 pontos, é verificado em que posição o jogador esta.\r\n\t\tif (posicao == 0) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Primeiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 5000,00\");\t\t\t\r\n\t\t} else if (posicao == 1) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Segundo jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 4000,00\");\t\t\t\r\n\t\t} else if (posicao == 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Terceiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 3000,00\");\t\t\t\r\n\t\t} else if (posicao > 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"jogador \" + numeroJogador + \"º esta em \" + posicao + \"º posicao. Não ganhou nada\");\r\n\t\t}\r\n\t}", "private boolean realizarCompra(int jogador, Lugar lugar) throws Exception {\n\n\n if (this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\tO lugar \" + lugar.getNome() + \" está à venda!\");\n this.print(\"\\tAtual dinheiro:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tTenta realizar a compra\");\n if (this.efetuarCompra(this.posicoes[jogador], this.listaJogadores.get(jogador))) {\n this.print(\"\\tJogador compra \" + lugar.getNome());\n return true;\n\n } else {\n this.print(\"\\tCompra não realizada!\");\n return false;\n }\n\n }\n\n return false;\n }", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "public int[] jouer(int[] dernierJeu, boolean ordiCommence)\r\n {\r\n System.out.println(\"dJ : \"+dernierJeu[0]+\" \"+dernierJeu[1]);\r\n\r\n //System.out.println(\"Ordinateur va jouer\");\r\n int[] res = new int[3]; //tableau a rendre\r\n if (!ordiCommence)\r\n {\r\n actualiser(dernierJeu);\r\n }\r\n\r\n res = chercher(dernierJeu[0], dernierJeu[1], 3);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 1);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 0);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 2);\r\n }\r\n }\r\n }\r\n return res;\r\n }", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "private boolean isUmJogador(String nome) {\n for (int i = 0; i < listaJogadores.size(); i++) {\n Jogador jogador = listaJogadores.get(i);\n\n if (jogador.getNome().equals(nome)) {\n return true;\n }\n\n }\n\n return false;\n }", "public void determinarGanador() {\n\t\t\n\t\t if(valorManos[3]>21) {\n\n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }else if(((valorManos[0] <= valorManos[3]) && (valorManos[1] <= valorManos[3]) &&( valorManos[2] <= valorManos[3]))\n\t\t\t\t && valorManos[3] <= 21){\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t\t// numGanadores ++;\n\t\t }else if(valorManos[0]>21 && valorManos[1] >21 && valorManos[2]>21 && valorManos[3] <= 21) {\n\n\t\t\t ganador.add(\"dealer\");\n\n\t\t }\n\t\t else { \n\t\t\t for(int i=0;i<3;i++) {\n\t\t\t\t if(valorManos[i]>valorManos[3] && valorManos[i]<=21) {\n\t\t\t\t\t ganador.add(idJugadores[i]);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\t\t \n\t\t if(valorManos[0] > 21 && valorManos[1] > 21 && valorManos[2] > 21 && \n\t\t\t\t valorManos[3] > 21){\n\t\t\t\n\t\t }else if(valorManos[3]<21 && ganador.size()==0){\n\t\t\t ganador.add(\"dealer\");\n\t\t }\n\t }", "public Jogo jogoComMaisJogadas() {\r\n\t\tJogo jogoComMaisJogadas = listaDeJogosComprados.get(0);\r\n\t\t\r\n\t\tfor (Jogo jogo : listaDeJogosComprados) {\r\n\t\t\tif (jogo.getVezesJogadas() >= jogoComMaisJogadas.getVezesJogadas()) {\r\n\t\t\t\tjogoComMaisJogadas = jogo;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn jogoComMaisJogadas;\r\n\t}", "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 static void asignarPunteo(int puntos, String nombreJugador) {\n for (int sizeNombres = 0; sizeNombres < nombres.length - 1; sizeNombres++) {\n if ((nombreJugador.equals(nombres[sizeNombres])) && (puntos == 1)) {\n punteos[sizeNombres] += 1;\n break;\n }\n\n }\n\n }", "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}", "private int fichasSeguidas(char[] array, char jugador) {\n if (array.length == 0)\n return 0; // última puesta\n if (array[0] != 'V') // si no hay hueco, devolver 0\n return 0;\n\n // buscar el hueco más cercano disponible\n int posHueco = 0;\n for (int i = 1; i < array.length; i++) {\n if (array[i] == 'V')\n posHueco++;\n else\n break;\n }\n\n // a partir de ahí, contar las fichas seguidas\n int fichasSeguidas = 0;\n for (int i = posHueco + 1; i < array.length; i++) {\n if (array[i] == jugador)\n fichasSeguidas++;\n else\n break;\n }\n\n return fichasSeguidas;\n }", "public Jugador(String nombreJugador)\n {\n this.nombreJugador = nombreJugador;\n cartasQueTieneEnLaMano = new Carta[5];\n numeroCartasEnLaMano = 0;\n }", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public void lancerJeu () {\n switch (choixModeJeu) {\n case \"C\":\n Jeu jeuJoueC = new JeuChallenger(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueC.unJeu();\n break;\n case \"U\":\n Jeu jeuJoueU = new JeuDuel(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueU.unJeu();\n break;\n case \"D\":\n Jeu jeuJoueD = new JeuDefenseur(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueD.unJeu();\n break;\n default:\n LOG.error(\"Cas du choix du mode de jeu non géré\");\n break;\n }\n }", "public ArrayList<Jugador> getJugadores() \n\t{\n\t\treturn jugadores;\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "private static void eliminarJugador() {\n\t\ttry {\n\t\t\tSystem.out.println(jugadores.toString());\n\t\t\tjugadores.borrar(Teclado.leerCadena(\"Nombre:\"));//indica el nombre del jugador que se desea borrar\n\t\t} catch (JugadorNoExisteException | NombreNoValidoException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "Jugador consultarGanador();", "private void inicializarVariablesControlRonda() {\n\t\ttieneAs = new int[4];\n\t\tfor(int i=0;i<tieneAs.length;i++) {\n\t\t\ttieneAs[i]=0;\n\t\t}\n\t\tidJugadores = new String[3];\n\t\tvalorManos = new int[4];\n\t\t\n\t\tmazo = new Baraja();\n\t\tCarta carta;\n\t\tganador = new ArrayList<String>();\n\t\tapuestasJugadores = new int[3];\n\t\tmanoJugador1 = new ArrayList<Carta>();\n\t\tmanoJugador2 = new ArrayList<Carta>();\n\t\tmanoJugador3 = new ArrayList<Carta>();\n\t\tmanoDealer = new ArrayList<Carta>();\n\t\tparejaNombreGanancia = new ArrayList<Pair<String,Integer>>(); \n\t\t\n\t\t// gestiona las tres manos en un solo objeto para facilitar el manejo del hilo\n\t\tmanosJugadores = new ArrayList<ArrayList<Carta>>(4);\n\t\tmanosJugadores.add(manoJugador1);\n\t\tmanosJugadores.add(manoJugador2);\n\t\tmanosJugadores.add(manoJugador3);\n\t\tmanosJugadores.add(manoDealer);\n\t\t// reparto inicial jugadores 1 y 2\n\t\tfor (int i = 1; i <= 2; i++) {\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador1.add(carta);\n\t\t\tcalcularValorMano(carta, 0);\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador2.add(carta);\n\t\t\tcalcularValorMano(carta, 1);\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador3.add(carta);\n\t\t\tcalcularValorMano(carta, 2);\n\t\t}\n\t\t// Carta inicial Dealer\n\t\tcarta = mazo.getCarta();\n\t\tmanoDealer.add(carta);\n\t\tcalcularValorMano(carta, 3);\n\n\t\t\n\t}", "public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = baraja.getBaraja();\n\t}", "public static void instanciarJugador(Jugador jugador) {\n\t\tjugadores[contSalas] = jugador;\n\t\tcontJugadores++;\n\t}", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "static void jugadorAJugar(String nombre) throws NombreNoValidoException, JugadorYaExisteException, JugadorNoExisteException{\n\t\tif(jugadores.contains(nombre)&&!participantes.contains(nombre))\n\t\t\tparticipantes.volcarJugadorALista(jugadores.get(jugadores.indexOf(nombre)));\n\t\telse if(!jugadores.contains(nombre))\n\t\t\tthrow new JugadorNoExisteException(\"Jugador no existe en la lista.\");\n\t\telse\n\t\t\tthrow new JugadorYaExisteException(\"Jugador ya existe.\");\n\t\t\t\n\t}", "public String[] listadoJugadoresEnMesa() {\n\n\t\tString[] listado = new String[this.jugadoresEnMesa.size()];\n\n\t\tfor (int i = 0; i < this.jugadoresEnMesa.size(); i++)\n\t\t\tlistado[i] = String.format(\"%d - %s\", (i + 1), this.jugadoresEnMesa.get(i).info());\n\n\t\treturn listado;\n\t}", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "private void compruebaMinas(boolean add, int i, int j) {\n\tif (add) {\n\t contadorInterrogaciones++;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas++;\n\t }\n\t} else {\n\t contadorInterrogaciones--;\n\t if (arrayBotones[i][j].getMina() == 1) {\n\t\tcontadorMinas--;\n\t }\n\t}\n\tif ((contadorMinas == numMinas) && (contadorInterrogaciones == numMinas)) {\n\t this.setVisible(false);\n\t ventanaReset.setVisible(true);\n\t labelGanador.setVisible(true);\n\t}\n }", "private static boolean juegoAcabado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posición del color de la pelota en el array de contadores\r\n\t\t\tif (contColor==-1) System.out.println( pelota.getColor() );\r\n\t\t\tcontPelotas[contColor]++;\r\n\t\t}\r\n\t\tfor (int contador : contPelotas) if (contador>=tamanyoTablero-1) return false;\r\n\t\treturn true;\r\n\t}", "public void mostrarListaJugadores(){\n for (int i = 0; i < jugadores.length; i++) {\n \n if(jugadores[i]!=null){\n System.out.println(\" \"+jugadores[i].toString()+\" \");\n }\n \n }\n }", "private static void joga(JogoMancala jogo) throws MancalaException {\n jogo.iniciaJogo();\n Jogador jogadorAtual = jogo.getJogadorAtual();\n while(!jogo.fimDeJogo()) {\n jogadorAtual = jogo.umaJogada(jogadorAtual.escolheJogada(jogo), JogoMancala.COM_EVENTO);\n }\n }", "private boolean soyYo(Jugador jugador){\r\n return this.jugador==jugador;\r\n }", "public List<Jogo> jogosComJogabilidadeComum(Jogabilidade jogabilidade) {\r\n\t\tList<Jogo> listaDeJogosComMesmaJogabilidade = new ArrayList<Jogo>();\r\n\r\n\t\tfor (Jogo jogo : listaDeJogosComprados) {\r\n\t\t\tif (jogo.getJogabilidades().contains(jogabilidade)) {\r\n\t\t\t\tlistaDeJogosComMesmaJogabilidade.add(jogo);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn listaDeJogosComMesmaJogabilidade;\r\n\t}", "public void golpearJugador(Jugador j) {\n\t\t\n\t}", "public int estadoFisicoJugador(int camiseta) {\n int retorno = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getNumeroCamiseta() == camiseta) {\n\n retorno = jugadores[i].getEstado();\n\n }\n break;\n\n }\n return retorno;\n }", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }", "@Test\n public void testBuscarJugador() {\n ArrayList<Jugador> jugadores;\n jugadores = new ArrayList<>();\n System.out.println(\"Prueba 5\");\n Jugador ju = new Jugador(\"005\", \"Sebas\", 0, 0);\n jugadores.add(ju);\n int encontrado= util.buscarJugador(\"005\", jugadores);\n assertEquals(0, encontrado);\n }", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "private void cuentaminas() {\n\t//TODO: falta por hacer que calcule lasminas en el borde exterior\n\t//Probar a hacerlo con un try catch\n\tint minas = 0;\n\n\tfor (int i = 0; i < filas; i++) {\n\t for (int j = 0; j < columnas; j++) {\n\t\t//\t1 2 3\n\t\t//\t4 X 5\n\t\t//\t6 7 8\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j - 1].getMina();//1\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j].getMina();//2\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i - 1][j + 1].getMina();//3\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j - 1].getMina();//4\n\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i][j + 1].getMina();//5\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j - 1].getMina();//6 \t\t \n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j].getMina();//7\n\t\t} catch (Exception e) {\n\t\t}\n\t\ttry {\n\t\t minas += arrayBotones[i + 1][j + 1].getMina();//8\n\t\t} catch (Exception e) {\n\t\t}\n\t\tarrayBotones[i][j].setNumeroMinasAlrededor(minas);\n\t\t//TODO: comentar la siguiente parte para que no aparezcan los numeros al iniciar\n//\t\tif (arrayBotones[i][j].getMina() == 0 && minas != 0) {\n//\t\t arrayBotones[i][j].setText(String.valueOf(minas));\n//\t\t}\n\t\tminas = 0;\n\t }\n\t}\n }", "boolean esMovimientoLegal(Jugada jugada) throws CeldasFueraTableroException;", "@Test\n\tpublic void testAdmitirJugadores() {\n\t\tSalaDeJuego sala = new SalaDeJuego(\"sala1\");\n\t\tassertEquals(0, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 1\n\t\tJugador jugador1 = new Jugador(\"Maikcrosoft\", 1);\n\t\tassertTrue(sala.admitirJugador(jugador1));\n\t\tassertEquals(1, sala.getCantJugadores());\n\t\t//Crea un jugador y lo admite. Consulta por cantidad de jugadores = 2\n\t\tJugador jugador2 = new Jugador(\"crosoft\", 2);\n\t\tassertTrue(sala.admitirJugador(jugador2));\n\t\tassertEquals(2, sala.getCantJugadores());\n\t\t//Crea un tercer jugador y lo admite. Consulta por cantidad de jugadores = 3\n\t\tJugador jugador3 = new Jugador(\"soft\", 3);\n\t\tassertTrue(sala.admitirJugador(jugador3));\n\t\tassertEquals(3, sala.getCantJugadores());\n\t\t//Crea un cuarto jugador y lo admite. Consulta por cantidad de jugadores = 4\n\t\tJugador jugador4 = new Jugador(\"croso\", 4);\n\t\tassertTrue(sala.admitirJugador(jugador4));\n\t\tassertEquals(4, sala.getCantJugadores());\n\t\t//Crea un quinto jugador y verifica que lo rechace. \n\t\tJugador jugador5 = new Jugador(\"ikcro\", 5);\n\t\tassertFalse(sala.admitirJugador(jugador5));\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 void setJugador1(Jugador jugador1) {\n\t\tthis.jugador1 = jugador1;\n\t}", "public boolean gano() {\r\n\t\tboolean gano = false;\r\n\t\tint contador = 0;\r\n\t\tint c = (casillas.length * casillas[0].length) - cantidadMinas;\r\n\t\tfor(int i = 0; i< casillas.length && !gano; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[i].length && !gano; j++) {\r\n\t\t\t\tif(casillas[i][j].esMina() == false) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == true) {// si no es mina\r\n\t\t\t\t\tcontador++;\r\n\t\t\t\t\tif(contador == c) {// no ha sido seleccionada\r\n\t\t\t\t\t\tgano = true;\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}\r\n\t\treturn gano;\r\n\t}", "private void resolverEmpate(ArrayList<Jugador> jugadoresConCartas,\n\t\t\tArrayList<Jugador> jugadoresEmpatados) throws Exception {\n\t\t// Si hay jugadores empatados...\n\t\tArrayList<Jugador> empatadosCopia = new ArrayList<Jugador>();\n\t\tempatadosCopia.addAll(jugadoresEmpatados);\n\t\tfor (Jugador jugador : jugadoresConCartas)\n\t\t{\n\t\t\tif (!jugadoresEmpatados.contains(jugador))\n\t\t\t{\n\t\t\t\tañadirJugador(jugador);\n\t\t\t\tempatadosCopia.remove(jugador);\n\t\t\t}\n\t\t\t//Añadimos los jugadores que no están en conflicto\n\t\t}\n\t\tfor (Jugador jugador : empatadosCopia)\n\t\t{\n\t\t\tint index = new Random().nextInt(baraja.getBaraja().size());\n\t\t\tjugador.setCuantasRecibe(baraja.getBaraja().get(index));\n\t\t\tbaraja.getBaraja().remove(index);\n\t\t}\n\t\t// Ahora que ya han elegido carta los pondremos por orden\n\t\tCollections.sort(empatadosCopia, new Comparator<Jugador>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Jugador j1, Jugador j2) {\n\t\t\t\treturn j1.getCuantasRecibe().getValor() - j2.getCuantasRecibe().getValor();\n\t\t\t}\n\t\t});\n\t\tfor (Jugador jugador : empatadosCopia) añadirJugador(jugador);\n\t}", "public boolean cortarMus(Jugador j);", "public static int juego(String jugadorA, String jugadorB) {\r\n\t\t\r\n\t\tint fila = 0, columna = 0, alternador = 0;\r\n\t\tString jugadorAux, pieza;\r\n\t\tboolean malIntroducido, noRepetir;\r\n\t\ttablero = new Tablero();\r\n\t\tSystem.out.println(tablero.toString());\r\n\t\t\r\n\t\twhile (tablero.finJuego() == 0) {\r\n\t\t\tnoRepetir = true;\r\n\t\t\tif (alternador == 0) {\r\n\t\t\t\tjugadorAux = jugadorA;\r\n\t\t\t\talternador = 1;\r\n\t\t\t\tpieza = \"X\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tjugadorAux = jugadorB;\r\n\t\t\t\talternador = 0;\r\n\t\t\t\tpieza = \"O\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce el número\");\r\n\t\t\t\tcolumna = entrada.nextInt() - 1;\r\n\t\t\t\tif (columna != 0 && columna != 1 && columna != 2) {\r\n\t\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t\tSystem.out.println(\"Entrada incorrecta\");\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce la letra\");\r\n\t\t\t\tString C = entrada.next(); \r\n\t\t\t\tswitch(C) {\r\n\t\t\t\tcase \"A\": fila = 0; break;\r\n\t\t\t\tcase \"B\": fila = 1; break;\r\n\t\t\t\tcase \"C\": fila = 2; break;\r\n\t\t\t\tdefault: System.out.println(\"Entrada incorrecta\");\r\n\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\t\r\n\t\t\tnoRepetir = tablero.setCasilla(fila, columna, pieza);\r\n\t\t\t} while(!noRepetir);\r\n\t\t\t\t\r\n\t\t\tSystem.out.println(tablero.toString());\r\n\t\t\t\r\n\t\t} \r\n\t\treturn tablero.finJuego();\r\n\t}", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }", "public static ArrayList<Jugador> leerFicheroMercado(ArrayList<Jugador> arrayJugadores) {\n ArrayList<Jugador> arrayMercado = new ArrayList<>();\n File aFile = new File(\"./src/ficheros/Mercado.txt\");\n\n try {\n FileReader fr = new FileReader(aFile);\n BufferedReader br = new BufferedReader(fr);\n String linea = br.readLine();\n\n while (linea != null) {\n String[] dividir = linea.split(\";\");\n\n for (int i = 0; i < dividir.length - 1; i++) {\n for (int j = 0; j < arrayJugadores.size(); j++) {\n if (arrayJugadores.get(j).getNombre().equals(dividir[i])) {\n arrayMercado.add(arrayJugadores.get(j));\n break;\n }\n }\n }\n linea = br.readLine();\n\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return arrayMercado;\n\n }", "public void venderJogos(Jogo jogo, Usuario usuario, int preco) throws Exception {\n\t\ttry {\n\t\t\tif (usuarios.containsKey(usuario.getLogin())) {\n\t\t\t\tif (usuario.getDinheiro() >= preco) {\n\t\t\t\t\tusuario.setDinheiro((usuario.getDinheiro() - preco));\n\t\t\t\t\tusuario.jogosComprados.add(jogo);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Quantidade de dinheiro insuficiente\");\n\t\t}\n\t}", "private static boolean verifTapis(){\n\t\tint compte = 0;\n\t\tfor(int i = 0; i<jeu.getJoueurs().length; i++){\n\t\t\tif(jeu.getJoueurs()[i].getTapisRest()==0 || jeu.getJoueurs()[i].getMonnaie()==0){\n\t\t\t\tcompte++;\n\t\t\t}\n\t\t}\n\t\tif(compte == jeu.getJoueurs().length){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void comprobarEstado() {\n if (ganarJugadorUno = true) {\n Toast.makeText(this, jugadorUno + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (ganarJugadorDos = true) {\n Toast.makeText(this, jugadorDos + \" es el ganador\", Toast.LENGTH_SHORT).show();\n }\n if (tirar == 9 && !ganarJugadorUno && !ganarJugadorDos) {\n Toast.makeText(this, \"Empate\", Toast.LENGTH_SHORT).show();\n }\n }", "public static void turnoJugador(){\n //variables locales\n int opcionBatalla;\n Scanner scannerDos=new Scanner(System.in);//nuevo scanner vara no recargar al anterior\n //menu de opciones para el turno del jugador\n System.out.println(\"\\nturno de:\"+nombrePersonaje);\n\tSystem.out.println(\"\\n1.Atacar\\t\\t\\t\\t\\tnombre:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.println(\"2.Curar\\t\\t\\t\\t\\t\\tPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.println(\"3.Item\\t\\t\\t\\t\\t\\tPuntos De mana (MP):\\t\"+puntosDeMana);\n\tSystem.out.println(\"4.Tengo Miedo\\t\\t\\t\\t\\tOro: \\t\\t\"+oro);\n System.out.println(\"\\t\\t\\t\\t\\t\\tVida del enemigo:\\t\"+puntosDeVidaEnemigo);\n\n do{//validando la opcion seleccionada\n System.out.println(\"Numero de opcion:\");\n opcionBatalla= scannerDos.nextInt();\n \n }while(opcionBatalla<1||opcionBatalla>4);\n //comparacion de la opcion seleccionada\n switch(opcionBatalla){\n case 1:{\n atacar();//llamando funcion atacar\n break;\n }\n case 2:{\n curar();//llamando funcion curar\n break;\n }\n case 3:{\n item();//llamando funcion item\n break;\n }\n \tdefault:{\n miedo();//llamando funcion miedo\n break;\n } \n }\n }", "public boolean turno(Jugador jugador, int numJugador) {\n\n int colIn = 0, filaIn = 0, colFn = 0, filaFn = 0;\n boolean movimientoValido = false;\n\n do {\n System.out.println(\"\\n Turno de \" + jugador.getNombre() + \":\");\n\n System.out.println(\"\\n (Si quieres salir escribe 'no')\");\n String ficha = LecturaDatos.leerTexto(\" Elige la ficha a mover (a1): \");\n\n if (ficha.equals(\"no\")) {\n return true;\n }\n colIn = tablero.buscarIndiceLetras(ficha.charAt(0));\n filaIn = Character.getNumericValue(ficha.charAt(1)) - 1;\n\n ficha = LecturaDatos.leerTexto(\" Elige la casilla a la que moveras: \");\n colFn = tablero.buscarIndiceLetras(ficha.charAt(0));\n filaFn = Character.getNumericValue(ficha.charAt(1)) - 1;\n\n boolean sePuede = rectificarCeldas(filaIn, colIn, filaFn, colFn, jugador);\n\n if (sePuede) {\n movimientoValido = comprobarMovimiento(filaIn, colIn, filaFn, colFn, jugador, numJugador);\n if (movimientoValido) {\n realizarMovimiento(tableroPartida[filaIn][colIn], tableroPartida[filaFn][colFn]);\n tablero.mostrarTablero();\n } else {\n System.out.println(\"\\n Movimiento no valido11\");\n }\n } else {\n System.out.println(\"\\n Movimiento no valido12\");\n }\n\n } while (movimientoValido == false);\n\n // realizarMovimiento(tableroPartida[filaIn][colIn],\n // tableroPartida[filaFn][colFn]);\n // tablero.mostrarTablero();\n\n // revisar si la casilla inicial tiene letra\n\n // revisar si es x ^ o\n\n // revisar si la casilla final está vacia\n\n // comprobar si se puede hacer el movimiento\n return false;\n }", "public static void jawaban1() {\n int cari;\r\n boolean ditemukan = true;\r\n int a=0;\r\n\r\n //membentuk array yang berisi data\r\n int[] angka = new int[]{74, 98, 72, 74, 72, 90, 81, 72};\r\n \r\n //mengeluarkan array\r\n for (int i = 0; i < angka.length; i++) {\r\n System.out.print(angka [i]+\"\\t\");\r\n\r\n \r\n }\r\n\r\n\r\n //meminta user memasukkan angka yang hendak dicari\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.println(\"\\nMasukkan angka yang ingin anda cari dibawah sini\");\r\n cari = keyboard.nextInt();\r\n\r\n //proses pencarian atau pencocokan data pada array\r\n for (int i = 0; i < angka.length; i++) {\r\n if (cari == angka[i]) {\r\n ditemukan = true;\r\n \r\n System.out.println(\"Angka yang anda masukkan ada didalam data ini\");\r\n \r\n break;\r\n }\r\n\r\n }\r\n //proses hitung data\r\n if (ditemukan == true) {\r\n \r\n for (int i = 0; i < angka.length; i++) {\r\n if (angka[i]== cari){\r\n a++;\r\n }\r\n \r\n }\r\n\r\n }\r\n \r\n System.out.println(\"Selamat data anda dengan angka \"+cari+ \" ditemukan sebanyak \"+a);\r\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "@Override\n\tpublic void visit(DisparoJugadorMaximo disparoJugadorMaximo) {\n\t\t\n\t}", "public int getCartasJugador() {\r\n\t\tint suma = this.escudoTorre.getValor() + this.escudoRey.getValor()\r\n\t\t\t\t+ this.escudoNobleza.getValor() + this.escudoRey.getValor();\r\n\t\treturn suma;\r\n\t}", "public void agregarAtaquesAJugador(EstructuraKonquest estructuraKonquest){\n Jugadores jugador;\n java.util.List<Ataque> listaDeAtq = estructuraKonquest.getAtaques();\n for (int i = 0; i < listaDeAtq.size(); i++) {\n Ataque ataque = listaDeAtq.get(i);\n for (int j = 0; j < estructuraKonquest.getJugadores().size(); j++) {\n jugador = estructuraKonquest.getJugadores().get(j);\n if (ataque.getJugador().getNombre().equalsIgnoreCase(jugador.getNombre())) {\n ataque.setJugador(jugador);\n jugador.getListaAtaques().add(ataque);\n }\n } \n }\n }", "public Jugador ganador(){\n return partida.ganador();\n }", "private int[] comparaSeAtaqueGanhouNoDado() {\n int size_ataque;\n int size_defesa;\n\n if (dadosAtaque[1] == 0) {\n size_ataque = 1;\n } else if (dadosAtaque[2] == 0) {\n size_ataque = 2;\n } else {\n size_ataque = 3;\n }\n\n if (dadosDefesa[1] == 0) {\n size_defesa = 1;\n } else if (dadosDefesa[2] == 0) {\n size_defesa = 2;\n } else {\n size_defesa = 3;\n }\n\n int[] resultado = new int[Math.max(size_defesa, size_ataque)];\n\n for (int i = resultado.length - 1; i >= 0; i--) {\n\n if (dadosAtaque[i] > 0 && dadosDefesa[i] > 0) {\n if (dadosAtaque[i] > dadosDefesa[i]) {\n resultado[i] = 1;\n } else {\n resultado[i] = 0;\n }\n } else {\n resultado[i] = 2;\n }\n }\n return resultado;\n }", "public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}", "public ArrayList<Jogador> getJogadores() {\r\n return jogadores;\r\n }", "private boolean jaTemDono(int posicao) {\n String nomeDono = Donos.get(posicao).toString();\n return (this.isUmJogador(nomeDono));\n\n }", "public boolean contieneJugador(ArrayList<String> ganador, String jugadorBuscado) {\n\t\t for(int i = 0; i < ganador.size(); i++) {\n\t\t\tif(ganador.get(i).equals(jugadorBuscado)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t }\n\t\t return false;\n\t }", "public void encerrarJogo(){\n if (isAndamento()) {\n situacao = SituacaoJogoEnum.ENCERRADO;\n }\n }", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "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 void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }" ]
[ "0.70811087", "0.6865466", "0.6656846", "0.66486055", "0.6611359", "0.6588311", "0.65203315", "0.65051645", "0.6466204", "0.64543504", "0.63369554", "0.62826115", "0.62348264", "0.62085134", "0.6095198", "0.60610193", "0.6004074", "0.5990925", "0.59804946", "0.5961182", "0.5949165", "0.59432894", "0.59333634", "0.5922919", "0.591537", "0.59124947", "0.5898061", "0.5895867", "0.5891544", "0.58897436", "0.5882542", "0.58775204", "0.58644587", "0.58575654", "0.5836197", "0.58323246", "0.5827284", "0.5811545", "0.58101237", "0.58006704", "0.58001363", "0.57940435", "0.5791575", "0.57841384", "0.5780524", "0.5777956", "0.5771306", "0.5761511", "0.57601833", "0.5756577", "0.57379663", "0.573349", "0.5732944", "0.57265383", "0.57155263", "0.5710228", "0.5702119", "0.5683161", "0.56736374", "0.5640892", "0.56316036", "0.5626204", "0.5624723", "0.5623456", "0.56228656", "0.56186634", "0.5617138", "0.5610584", "0.56073064", "0.56038815", "0.56026757", "0.559484", "0.55942893", "0.5591864", "0.55901086", "0.55837303", "0.5574477", "0.55689204", "0.5564578", "0.55618924", "0.5560501", "0.55582386", "0.5554277", "0.5551305", "0.5541793", "0.5525391", "0.55198586", "0.5510682", "0.5508887", "0.5508604", "0.54993665", "0.54912937", "0.5488899", "0.54842675", "0.5482721", "0.5471165", "0.54654944", "0.54633814", "0.54583114", "0.5455832" ]
0.6017587
16
Primero mira si al ultimo jugador le quedaban fichas y luego quien tiene menor puntos
public static void quienHaGanado(Mano[] jugadores, int actual,int carro){ if(jugadores[actual].getNPiezas()!=0){ boolean dosIguales=false; actual=0; for (int i = 1; i < jugadores.length; i++) { if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion if(i==carro){//el jugador i es el carro actual=i; dosIguales=false; } else if(actual==carro){//el jugador actual es el carro dosIguales=false; } else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores. dosIguales=true; } } if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual actual=i; dosIguales=false; } } if(dosIguales){ System.out.println("pene"); Excepciones.cambiarColorAzul("Y los GANADORES SON...."); for (int i = 0; i < jugadores.length; i++) { if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) { //System.out.println("\t\t\u001B[34mEl jugador nº- "+(i+1)+": "+jugadores[i].getNombre()); Excepciones.cambiarColorAzul("\t\tEl jugador nº- "+(i+1)+": "+jugadores[i].getNombre()); } } System.out.println("\u001B[30m"); } else{ Excepciones.cambiarColorAzul("Y el GANADOR ES...."); //System.out.println("\t\t\u001B[34mEl jugador nº- "+(actual+1)+": "+jugadores[actual].getNombre()+"\u001B[30m"); Excepciones.cambiarColorAzul("\t\tEl jugador nº- "+(actual+1)+": "+jugadores[actual].getNombre()); } } else { Excepciones.cambiarColorAzul("Y el GANADOR ES...."); //System.out.println("\t\t\u001B[34mEl jugador nº- "+(actual+1)+": "+jugadores[actual].getNombre()+"\u001B[30m"); Excepciones.cambiarColorAzul("\t\tEl jugador nº- "+(actual+1)+": "+jugadores[actual].getNombre()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int fichasSeguidas(char[] array, char jugador) {\n if (array.length == 0)\n return 0; // última puesta\n if (array[0] != 'V') // si no hay hueco, devolver 0\n return 0;\n\n // buscar el hueco más cercano disponible\n int posHueco = 0;\n for (int i = 1; i < array.length; i++) {\n if (array[i] == 'V')\n posHueco++;\n else\n break;\n }\n\n // a partir de ahí, contar las fichas seguidas\n int fichasSeguidas = 0;\n for (int i = posHueco + 1; i < array.length; i++) {\n if (array[i] == jugador)\n fichasSeguidas++;\n else\n break;\n }\n\n return fichasSeguidas;\n }", "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 }", "public static void topicosMaisUtilizados() throws IOException {\n\n clearScreen();\n int contador = 0;\n int maximo = 0;\n String nomes[] = new String[1000];\n int mensagens[] = new int[1000];\n int i = 0, j = 0;\n int temp = 0; \n String tempo=\"\";\n int cont = 0;\n\n x = new Scanner(new File(\"Topicos.txt\"));\n \n while(x.hasNext()){\n\n String a = x.next();\n String b = x.next();\n String c = x.next();\n cont++;\n\n String line = \"\";\n\n File topico = new File(a+\".txt\");\n Scanner top = new Scanner(new File(a+\".txt\"));\n\n y = new Scanner(new File(a+\".txt\"));\n\n BufferedReader read = new BufferedReader(new FileReader(topico)); \n\n while((line = read.readLine()) != null)\n {\n contador++; // contar quantas mensagens o topico tem\n }\n\n mensagens[i] = contador; // atribuir a um array o numero de mensagens e a outro o nome dos topicos\n nomes[i] = a;\n contador = 0;\n i++;\n }\n for(i = 0; i < 100; i++){\n for(j = i+1; j < 100; j++){\n if(mensagens[i] < mensagens[j]){ // ordenar os topicos com mais mensagens para os que têm menos\n temp = mensagens[i];\n mensagens[i] = mensagens[j];\n mensagens[j]=temp;\n\n tempo = nomes[i];\n nomes[i] = nomes[j];\n nomes[j] = tempo;\n }\n }\n }\n System.out.println(\"\\033[1mTópicos mais ativos: \\033[0m\\n\");\n if(cont < 3){\n for(j = 0;j<cont;j++){\n System.out.println(nomes[j] + \" com \" + mensagens[j] + \" mensagens\"); // imprimir os 3 topicos mais ativos, exceto se existirem menos de 3 elementos, e aí apresenta os que existem\n }\n }\n else{\n for(j = 0;j<3;j++){\n System.out.println(nomes[j] + \" com \" + mensagens[j] + \" mensagens\");\n }\n }\n }", "public int Tipo() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n String linea;\r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n tipo=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n tipo=\"Regulares\";\r\n }\r\n if (a==2){\r\n tipo=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n tipo=\"Mayores\";\r\n }\r\n if (a==4){\r\n tipo=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+tipo+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerTipo == contador){\r\n errorTipo =String.valueOf(String.valueOf(leerTipo).length());\r\n if (a==0){\r\n resultadoembarazadas+=1;\r\n }\r\n if (a==1){\r\n resultadoregulares+=1;\r\n }\r\n if (a==2){\r\n resultadodiscapacitados+=1;\r\n }\r\n if (a==3){\r\n resultadomayores+=1;\r\n }\r\n if (a==4){\r\n resultadocorporativos+=1;\r\n }\r\n contador +=1;\r\n leerTipo +=6;\r\n\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n //return resultado;\r\n return 0;\r\n }", "public static void main(String[] args) throws Exception {\n \n\n\t File pasta = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\phishing\");\n\t \n\t File[] arquivos = pasta.listFiles();\n\t \n\t \n\t for (File file : arquivos) {\n\t\t System.out.println(file.getName()+ \"\tphishing\");\n\t }\n\t \n\t File pasta1 = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\not_phishing\");\n\t \n\t File[] arquivos1 = pasta1.listFiles();\n\t \n\t \n\t for (File file : arquivos1) {\n\t\t if(!file.isDirectory()){\n\t\t\t System.out.println(file.getName()+ \"\tnot_phishing\"); \n\t\t }\t\t \n\t }\n\t \n//\t FileReader m = new FileReader(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\EMAIL000240\");\n//\n//\t\tStringBuffer text = new StringBuffer();\n//\t\tint l;\n//\t\twhile ((l = m.read()) != -1) {\n//\t\t\ttext.append((char) l);\n//\t\t}\n//\t\tm.close();\n//\t\t\n//\t\tString texto = text.toString();\n//\t\t\n//\t\tSystem.out.println(texto);\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tSystem.out.println(\"############################################### NOVO TEXTO ##############################################\");\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tString texto1 = texto.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"[0-9]\", \"\");\n//\t\tSystem.out.println(texto1);\n\t \n\t\t\n\t\t \n\t \n\t \n }", "private long recursivoCarpeta(File archivo,String nombre)\n {\n //variable para guardar el peso total\n long pesoArchivo=0;\n //verificamos si es una carpeta o un archivo\n if(archivo.isDirectory())\n {\n //si es una carpeta obtenemos su lista de archivos\n File lista[]=archivo.listFiles();\n //creamos un ciclo y aplicamos el mismo metodo para verificar si es acarpeta o archivo\n for (File file : lista) {\n pesoArchivo+=recursivoCarpeta(file, nombre);\n }\n }\n else\n {\n //si es un archivo\n //obtenemos su peso\n pesoArchivo=archivo.length();\n //auxiliar para guardar la direccion del archivo\n String aux=archivo.toString();\n //guardamos la direccion del archivo\n documentos.add(archivo.getPath());\n //obtenemos la subcadena desde donde comienza el nombre de la carpeta\n aux=aux.substring(aux.indexOf(nombre),aux.length());\n //agregamos el nombre a la lista\n nombres.add(aux);\n }\n //devolvemos el peso del archivo\n return pesoArchivo;\n }", "public static ArrayList<Puntaje> getListadoPuntajes(String jugador)\n {\n ArrayList<Puntaje> listado = new ArrayList<>();\n String rutaPuntaje = \"src/recursos/puntaje.txt\"; \n try \n {\n File archivo = new File(rutaPuntaje);\n if(!archivo.exists())\n return listado;\n\n listado = listadoPuntajes(rutaPuntaje,jugador); \n }\n catch(Exception ex)\n {\n return listado;\n } \n return listado; \n }", "public void Horas() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n \r\n \r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (a==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (a==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null)\r\n if (leerHora == contador){\r\n comparar = linea.substring(0,2);\r\n \r\n if (\"09\".equals(comparar)){\r\n nueve++;\r\n }\r\n if (\"10\".equals(comparar)){\r\n diez++;\r\n }\r\n if (\"11\".equals(comparar)){\r\n once++;\r\n }\r\n if (\"13\".equals(comparar)){\r\n una++;\r\n }\r\n if (\"14\".equals(comparar)){\r\n dos++;\r\n }\r\n if (\"15\".equals(comparar)){\r\n tres++;\r\n }\r\n if (\"16\".equals(comparar)){\r\n cuatro++;\r\n }\r\n \r\n contador +=1;\r\n leerHora += 6;\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "public int puntoUno() {\n int contador = 0;\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > 10) {\n contador++;\n }\n }\n return contador;\n }", "public static boolean comprobarPrestamo(int codigo) throws IOException {\n\t\tboolean b = false;\n\t\tif (new File(Const.FLIBROASIGNADOA).isFile()) {\n\t\t\tf = new RandomAccessFile(Const.FLIBROASIGNADOA, \"r\");\n\t\t\tArchivos.irARegistro(f, codigo, Const.N);\n\n\t\t\tLibro l = new Libro();\n\t\t\tl.leer(f);\n\t\t\tif (l.prestado)\n\t\t\t\tb = true;\n\n\t\t\tf.close();\n\t\t} else\n\t\t\tSystem.out.println(\"El Fichero no existe - ERROR EN: mostrarFichero\");\n\n\t\treturn b;\n\t}", "public void Fecha() throws FileNotFoundException, IOException {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (b=0;b<5;b++){\r\n if (b==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (b==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (b==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (b==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (b==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerFecha == contador){\r\n errorFecha = linea.substring(1,2);\r\n if (errorFecha.equals(\"/\")){\r\n comparar = linea.substring(0, 1);\r\n if (\"1\".equals(comparar)){\r\n d1++;\r\n }\r\n if (\"2\".equals(comparar)){\r\n d2++;\r\n }\r\n if (\"3\".equals(comparar)){\r\n d3++;\r\n }\r\n if (\"4\".equals(comparar)){\r\n d4++;\r\n }\r\n if (\"5\".equals(comparar)){\r\n d5++;\r\n }\r\n if (\"6\".equals(comparar)){\r\n d6++;\r\n }\r\n if (\"7\".equals(comparar)){\r\n d7++;\r\n }\r\n if (\"8\".equals(comparar)){\r\n d8++;\r\n }\r\n if (\"9\".equals(comparar)){\r\n d9++;\r\n }\r\n } \r\n else{\r\n comparar1=linea.substring(0, 2);\r\n if (\"10\".equals(comparar1)){\r\n d10++;\r\n }\r\n if (\"11\".equals(comparar1)){\r\n d11++;\r\n }\r\n if (\"12\".equals(comparar1)){\r\n d12++;\r\n }\r\n if (\"13\".equals(comparar1)){\r\n d13++;\r\n }\r\n if (\"14\".equals(comparar1)){\r\n d14++;\r\n }\r\n if (\"15\".equals(comparar1)){\r\n d15++;\r\n }\r\n if (\"16\".equals(comparar1)){\r\n d16++;\r\n }\r\n if (\"17\".equals(comparar1)){\r\n d17++;\r\n }\r\n if (\"18\".equals(comparar1)){\r\n d18++;\r\n }\r\n if (\"19\".equals(comparar1)){\r\n d19++;\r\n }\r\n if (\"20\".equals(comparar1)){\r\n d20++;\r\n }\r\n if (\"21\".equals(comparar1)){\r\n d21++;\r\n }\r\n if (\"22\".equals(comparar1)){\r\n d22++;\r\n }\r\n if (\"23\".equals(comparar1)){\r\n d23++;\r\n }\r\n if (\"24\".equals(comparar1)){\r\n d24++;\r\n }\r\n if (\"25\".equals(comparar1)){\r\n d25++;\r\n }\r\n if (\"26\".equals(comparar1)){\r\n d26++;\r\n }\r\n if (\"27\".equals(comparar1)){\r\n d27++;\r\n }\r\n if (\"28\".equals(comparar1)){\r\n d28++;\r\n }\r\n if (\"29\".equals(comparar1)){\r\n d29++;\r\n }\r\n if (\"30\".equals(comparar1)){\r\n d30++;\r\n }\r\n if (\"31\".equals(comparar1)){\r\n d31++;\r\n }\r\n \r\n }\r\n leerFecha+=6;\r\n contador += 1;\r\n }\r\n \r\n else{\r\n contador += 1;\r\n \r\n \r\n }\r\n } \r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "public static void publicarTopico() throws IOException, InterruptedException {\n\n clearScreen();\n Scanner input = new Scanner(System.in);\n File subscritos = new File(user+\".txt\"); \n File topicos = new File(\"Topicos.txt\");\n BufferedReader reader = new BufferedReader(new FileReader(subscritos));\n BufferedReader read = new BufferedReader(new FileReader(topicos));\n boolean subscrito = false; // variavel para verificar se já está subscrito\n System.out.print(\"Em que tópico deseja publicar? (Sair 0) \\n> \");\n String escolha = input.next();\n\n if(!escolha.equals(\"0\")){\n int maximo = 100;\n String mensagem = \"\";\n File topico = new File (escolha+\".txt\");\n\n if(!topico.exists()){\n System.out.println(\"O topico não existe!\");\n TimeUnit.SECONDS.sleep(2);\n publicarTopico();\n return;\n\n }\n\n BufferedReader topicoReader = new BufferedReader(new FileReader(escolha+\".txt\"));\n FileWriter topicoWriter = new FileWriter(escolha+\".txt\",true);\n\n x = new Scanner(new File(\"Topicos.txt\"));\n \n \n while(x.hasNext()){\n String a = x.next();\n String b = x.next();\n String c = x.next();\n\n if(escolha.equals(a))\n maximo = Integer.parseInt(c); // maximo de mensagens no topico\n }\n\n try\n {\n \n String line = \"\", oldtext = \"\",newTexto=\"\";\n\n while((line = reader.readLine()) != null)\n {\n if(line.contains(escolha)){ // se o topico estiver subscrito, guardar a mensagem\n System.out.print(\"Escrever mensagem: \");\n input.nextLine();\n mensagem = input.nextLine();\n subscrito = true;\n }\n }\n reader.close();\n\n BufferedReader reader1 = new BufferedReader(new FileReader(escolha+\".txt\"));\n BufferedReader reader2 = new BufferedReader(new FileReader(escolha+\".txt\"));\n\n int cont = 0;\n\n while((line = reader1.readLine()) != null){\n cont++;\n }\n\n while((line = reader2.readLine()) != null){ \n if(cont < maximo){ // verificar o maximo de mensagens possiveis\n newTexto += line + \"\\r\\n\";\n }\n cont--;\n }\n\n PrintWriter pw = new PrintWriter(escolha+\".txt\");\n\n topicoWriter.write(newTexto); // escrever no ficheiro que guarda as mensagens do topico\n topicoWriter.write(user+\":\");\n topicoWriter.write(\" \");\n topicoWriter.write(\"0 likes: \");\n topicoWriter.write(\"em \"+escolha+ \"-> \");\n topicoWriter.write(mensagem);\n topicoWriter.write(\"\\n\");\n\n topicoWriter.flush();\n topicoWriter.close();\n\n if (subscrito == false){\n System.out.println(\"\\033[1mNão estás subscrito nesse tópico!\\033[0m\");\n TimeUnit.SECONDS.sleep(2);\n publicarTopico();\n return;\n }\n\n System.out.println(\"\\n\\033[1mMensagem publicada\\033[0m\");\n }\n \n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n }", "private static void checkFile()\n {\n if( !datei.exists() )\n {\n System.out.println(\"Herje! Noch nichts da? Kein Problem, Du bekommst jetzt einfach mal was\");\n new ErstelleFelder().createFarm();\n saveCSV();\n }\n // Wenn JA, auslesen\n else\n {\n System.out.println(\"Oha, da haben wir ja bereits ein paar Pflanzen. Komm' mit, ich zeige die Dir\\n\");\n try\n {\n new LeseAusDatei().leseCsv();\n\n BufferedReader br = null;\n try\n {\n br = new BufferedReader(new FileReader(datei));\n }\n catch(FileNotFoundException e)\n {\n System.err.println(e);\n }\n\n String currLine;\n maisFeld.clear();\n weizenFeld.clear();\n\n while( (currLine = br.readLine()) != null )\n {\n String[] currLineSplit = currLine.split(\";\");\n int laufendeNummer = Integer.parseInt(currLineSplit[0]);\n String pflanzenArt = currLineSplit[1];\n double pflanzenHoehe = Double.parseDouble(currLineSplit[2]);\n\n System.out.println(laufendeNummer + \" \" + pflanzenArt + \" \" + format(pflanzenHoehe));\n\n if( pflanzenArt.equals(\"Mais\") )\n {\n maisFeld.add(new Mais(pflanzenHoehe));\n }\n if( pflanzenArt.equals(\"Weizen\") )\n {\n weizenFeld.add(new Weizen(pflanzenHoehe));\n }\n }\n System.out.println(\"\");\n System.out.println(\"Wir haben \" + maisFeld.size() + \" Maiskölbchen und \" + weizenFeld.size() + \" Weizenhalme.\\n\");\n br.close();\n }\n catch(IOException e)\n {\n System.err.println(e);\n }\n }\n }", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "public void enviar(String pasta1, String pasta2, int x){\r\n\t\tSystem.out.println(\"t: \\n\" + pasta1 + \"\\n\" + pasta2 );\r\n\t\tint cont = 0;\r\n\t\tif (pasta1 != \"\" || pasta2 != \"\"){\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tList<File> pdfs = buscaRecursiva(new File(pasta1), \"\");\r\n\t\t\t\t//System.out.println(\"Quantidade: \" + pdfs.size() + \"\\n\");\r\n\r\n\t\t\t\tfor (File pdf : pdfs) {\r\n\t\t\t\t\t//System.out.println(\"bytes: \" + pdf.length());\r\n\t\t\t\t\t//System.out.println(\"Arquivo: \" + pdf.getName());\r\n\t\t\t\t\t//String local = pasta1.substring( pasta1.lastIndexOf(\"/\")+1,pasta1.length() );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (pdf.getAbsolutePath().length() > x){\r\n\t\t\t\t\t\tcont++;\r\n\t\t\t\t\t\tSystem.out.println(pdf.getAbsolutePath().length()+ \" Arquivo: \" + pdf.getAbsolutePath() );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(cont);\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\r\n\r\n\t\t}else{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Escolha um destino!!!\");\r\n\t\t}\r\n\r\n\t}", "public void processaArquivos() throws Exception\n\t{\n\t\t/* Busca o nome do diretorio no arquivo de propriedades */\n\t\tString nomeDiretorio = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\tFile dirArquivos = new File(nomeDiretorio);\n\t\tif (!dirArquivos.isDirectory())\n\t\t\tthrow new IOException(\"Diretorio invalido... \"+nomeDiretorio);\n\n\t\t/* Busca os arquivos das ordems (arquivos com informacoes de caixa) */\n\t\tFileFilter filtro = new OrdemVoucherFileFilter(getPropriedade(\"ordemVoucher.patternArquivos\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t getPropriedade(\"ordemVoucher.extensaoArquivos\"));\n\t\tFile arquivosOrdem[] = dirArquivos.listFiles(filtro);\n\t\t\n\t\t/* Faz a varredura dos arquivos de ordem de voucher encontrados */\n\t\tfor (int i=0; i < arquivosOrdem.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Processando ordem:\"+arquivosOrdem[i].getName());\n\t\t\t\tif (existeArquivos(arquivosOrdem[i]))\n\t\t\t\t{\n\t\t\t\t\t// Realiza a concatenacao dos arquivos da ordem agrupando-as por item\n\t\t\t\t\t// e entao processa-os para a criptografia e compactacao antes de \n\t\t\t\t\t// envia-los ao GPP\n\t\t\t\t\tString arqAProcessar[] = concatenaArquivos(arquivosOrdem[i]);\n\t\t\t\t\t\n\t\t\t\t\t// Para cada arquivo encontrado de ordem de criacao de voucher\n\t\t\t\t\t// faz se a criptografia dos arquivos de caixa correspondentes\n\t\t\t\t\t// para entao compacta-los em um unico arquivo para posteriormente\n\t\t\t\t\t// ser enviado ao GPP juntamente com este arquivo de capa\n\t\t\t\t\t// da ordem de criacao do voucher\n\t\t\t\t\tString arquivoCompactado = criptografaECompactaOrdem(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\n\t\t\t\t\t// Caso ao criar os arquivos criptografados e compacta-los aconteca algum\n\t\t\t\t\t// erro entao o retorno do metodo e um nome de arquivo nulo. Se este nome\n\t\t\t\t\t// for nulo, entao nada e executado com esta ordem passando entao para a\n\t\t\t\t\t// proxima\n\t\t\t\t\tif (arquivoCompactado != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Envia o arquivo do cabecalho da ordem \n\t\t\t\t\t\t// e em seguida envia o arquivo compactado\n\t\t\t\t\t\tenviaArquivoParaGPP(arquivosOrdem[i]);\n\t\t\t\t\t\tenviaArquivoParaGPP(new File(arquivoCompactado));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove os arquivos criptografados e compactados que foram enviados\n\t\t\t\t\t\t// para o GPP\n\t\t\t\t\t\tremoveArquivos(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Move os arquivos de origem das informacoes de voucher para um diretorio\n\t\t\t\t\t\t// historico desses arquivos\n\t\t\t\t\t\t// Obs: Os arquivos concatenados foram removidos do diretorio\n\t\t\t\t\t\tmoveArquivos(arquivosOrdem[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Erro ao processar ordem:\"+arquivosOrdem[i].getName()+\" Erro:\"+e);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n File ruta = new File(\"C:\\\\Users\\\\usuario\\\\Documents\\\\curso de java online sepe\\\\unidad 1 clase file\\\\ejercicios\");\n // establecer el nombre del fichero a crear\n File f = new File(ruta, \"datos.txt\");\n File f1 = new File(ruta, \"datosNuevos.txt\");\n // imprimir la ruta absoluta del archivo\n System.out.println(f.getAbsolutePath());\n // Devuelve un String conteniendo el directorio padre del File. Devuelve null si no tiene directorio padre. del archivo\n System.out.println(f.getParent());\n // imprimir la ruta absoluta de la ruta del archivo\n System.out.println(ruta.getAbsolutePath());\n // Devuelve un String conteniendo el directorio padre del File. Devuelve null si no tiene directorio padre. de la ruta\n System.out.println(ruta.getParent());\n if (!f.exists()) { //se comprueba si el fichero existe o no\n System.out.println(\"Fichero \" + f.getName() + \" no existe\");\n if (!ruta.exists()) { //se comprueba si la ruta existe o no\n System.out.println(\"El directorio \" + ruta.getName() + \" no existe\");\n if (ruta.mkdir()) { //se crea la carpeta\n System.out.println(\"Directorio creado\");\n if (f.createNewFile()) { //se crea el fichero.\n System.out.println(\"Fichero \" + f.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f.getName());\n }\n } else {\n System.out.println(\"No se ha podido crear \" + ruta.getName());\n }\n } else { //si la ruta existe creamos el fichero\n if (f.createNewFile()) {\n System.out.println(\"Fichero \" + f.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f.getName());\n }\n }\n } else { //el fichero existe. Mostramos el tamaño\n System.out.println(\"Fichero \" + f.getName() + \" existe\");\n System.out.println(\"Tamaño \" + f.length() + \" bytes\");\n }\n\n // mostrar los archivos en esa carpeta\n File f2 = new File(ruta, \".\");\n // creamos un array para mostrar todos los archivos en esa ruta\n String[] listaArchivos = f2.list();\n if (!f1.exists()) { //se comprueba si el fichero existe o no\n System.out.println(\"Fichero \" + f1.getName() + \" no existe\");\n }\n if (f1.createNewFile()) { //se crea el fichero. Si se ha creado correctamente\n System.out.println(\"Fichero \" + f1.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f1.getName());\n }\n for (int i = 0; i < listaArchivos.length; i++) {\n System.out.println(listaArchivos[i]);\n }\n // mostrar el numero de archivos en esa carpeta\n String[] elementos = ruta.list();\n System.out.println(\"La carpeta \" + ruta.getAbsolutePath() + \" tiene \" + elementos.length + \" subelementos\");\n }", "public void affichage() {\n\n if (songnumber==0) {\n vitesse=5.69f;\n depart=55510;\n while (notes.size ()<=fichier.length) {\n for (int j=0; j<fichier.length; j++) {\n if (song[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n\n if (songnumber==1) {\n vitesse=4;\n depart=57050;\n while (notes.size ()<=fichier2.length) {\n for (int j=0; j<fichier2.length; j++) {\n if (song2[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song2[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song2[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song2[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n\n if (songnumber==2) {\n vitesse=4.4f;\n depart=47880;\n while (notes.size ()<=fichier4.length) {\n for (int j=0; j<fichier4.length; j++) {\n if (song4[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song4[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song4[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song4[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n\n if (songnumber==3) {\n vitesse=7.11f;\n depart=57260;\n while (notes.size ()<=fichier3.length) {\n for (int j=0; j<fichier3.length; j++) {\n if (song3[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song3[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song3[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song3[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n if (songnumber==4) {\n vitesse=4.22f;\n depart=60860;\n while (notes.size ()<=fichier5.length) {\n for (int j=0; j<fichier5.length; j++) {\n if (song5[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song5[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song5[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song5[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n if (songnumber==5) {\n vitesse=4.09f;\n depart=38300;\n while (notes.size ()<=fichier6.length) {\n for (int j=0; j<fichier6.length; j++) {\n if (song6[j][0]==1) notes.add(new Note(430, couleurNote1, (j*30)-depart)); \n if (song6[j][1]==1) notes.add(new Note(500, couleurNote2, (j*30)-depart)); \n if (song6[j][2]==1) notes.add(new Note(570, couleurNote3, (j*30)-depart)); \n if (song6[j][3]==1) notes.add(new Note(640, couleurNote4, (j*30)-depart));\n }\n }\n }\n}", "private static String sacarRuta(File[] ficheros, int indice, \n\t\t\tString texto) {\n\t\tString nombre = null;\n\t\tif (indice <= ficheros.length - 1) {\n\t\t\tif (practica6.Prueba1.\n\t\t\t\t\tesFicheroGrafico(ficheros[indice])) {\n\t\t\t\tif (ficheros[indice].getName().\n\t\t\t\t\t\tequalsIgnoreCase(texto)) {\n\t\t\t\t\treturn ficheros[indice].getPath();\n\t\t\t\t} else {\n\t\t\t\t\tindice++;\n\t\t\t\t\treturn sacarRuta(ficheros, indice, texto);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nombre;\n\t}", "public static int CreacioAny (int any, String FitxerHist,int apostes){\n\t\tString dadac;\r\n\t\tint dada;\r\n\t\tString fitxer_nou;\r\n\t\tint dada1,dada2,dada3,dada4,dada5,dada6,dada7;\r\n\t\t//Indiquem la ruta\r\n\t\tfitxer_nou=\"c:/tmp/\"+any+\".txt\";\r\n\t\tboolean entrada=false;\r\n\t\t\r\n\t\ttry{\r\n\t\t\t DataInputStream LeeFichero=new DataInputStream(new FileInputStream(FitxerHist));\r\n\t\t\t //Aqui començara la lectura\r\n\t\t\t do{\r\n\t\t\t \tFileWriter fw = new FileWriter(fitxer_nou,true);\r\n\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\t\t//primer llegim el fitxer dadac, que indicara el any\r\n\t\t\t \tdadac=LeeFichero.readUTF();\r\n\t\t\t \ttry{\r\n\t\t\t \t\t//Ara el passarem a int per despres compararlo amb el que nosaltres indiquem\r\n\t\t\t \t\t//Tambe llegirem les altres dadas\r\n\t\t\t \t\tdada=Integer.parseInt(dadac);\r\n\t\t\t \t\tdada1=LeeFichero.readInt();\r\n\t\t\t \t\tdada2=LeeFichero.readInt();\r\n\t\t\t \t\tdada3=LeeFichero.readInt();\r\n\t\t\t \t\tdada4=LeeFichero.readInt();\r\n\t\t\t \t\tdada5=LeeFichero.readInt();\r\n\t\t\t \t\tdada6=LeeFichero.readInt();\r\n\t\t\t \t\tdada7=LeeFichero.readInt();\r\n\t\t\t \t\tentrada=false;\r\n\t\t\t \t\t//entrada sera per sortir del do a la primera volta\r\n\t\t\t \t\tif (dada==any){\r\n\t\t\t \t\t\t//Si la pirmera dada de la fila (any) es el que nosaltres volem, entrarem aqui\r\n\t\t\t \t\t\tdo{\r\n\t\t\t \t\t\t\t//Escrivim tot el que conte la linia de la nostra dada\r\n\t\t\t \t\t\t\tbw.write(any+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada1+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada2+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada3+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada4+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada5+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada6+\" \");\r\n\t\t\t \t\t\t\tbw.write(dada7+\" \");\r\n\t\t\t \t\t\t\tbw.newLine();\r\n\t\t\t \t\t\t\tentrada=true;\r\n\t\t\t \t\t\t\t//Tambe pujem apostes a +7, per indicar quantes dades hi han\r\n\t\t\t \t\t\t\tapostes=apostes+7;\r\n\t\t\t \t\t\t}while(entrada==false);\r\n\t\t\t \t\tbw.close();\r\n\t\t\t\t\t\tfw.close();\r\n\t\t\t \t}\r\n\t\t\t \t}catch (NumberFormatException f){\r\n\t\t\t \t\treturn apostes;\r\n\t\t\t \t}\r\n\t\t\t }while(true);\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t\r\n\t\t\t\treturn apostes;\r\n\t\t\t}\t\r\n\t\t\t\t \r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n String contenido = \"\";\r\n\r\n try {\r\n FileReader in = new FileReader(\"./src/fichero_prueba.txt\");\r\n int c = in.read();\r\n\r\n while (c != -1) {\r\n contenido += (char) c;\r\n c = in.read();\r\n }\r\n in.close();\r\n } catch (IOException e){\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n System.out.println(contenido);\r\n\r\n\r\n //LEER MENSAJE POR BLOQUES\r\n\r\n String contenido2 = \"\";\r\n\r\n try {\r\n BufferedReader inb = new BufferedReader(new FileReader(\"./src/fichero_prueba.txt\"));\r\n\r\n String linea = inb.readLine();\r\n while (linea!=null){\r\n contenido2 += linea+\"\\n\";\r\n linea = inb.readLine();\r\n }\r\n inb.close();\r\n } catch (IOException e){\r\n e.printStackTrace();\r\n }\r\n System.out.println(contenido2);\r\n\r\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Dime que nombre quieres ponerle al fichero\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString nombre = scan.nextLine();\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\" Selecciona la opcion que quieres: 1 Crea el fichero 2 Muestra la info 3 muestra la longitud 4 comprueba si existe 5 borra el fichero 9 salir\"\n\t\t\t\t+ \"\");\n\t\tint numero = sc.nextInt();\n\t\t\n\t\t//while(numero <6) {\n\t\tswitch(numero) {\n\t\tcase 1:\n\t\t\t//System.out.println(\"Dime que nombre quieres ponerle al fichero\");\n\t\t\tFile fichero = new File(nombre +\".txt\");\n\t\t\ttry {\n\t\t\t\tif(fichero.createNewFile() == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"El fichero se ha creado\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"El fichero no se ha creado\");\n\t\t\t\t}\n\t\t\t} catch (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\tbreak;\n\t\tcase 2:\n\t\t\tfichero = new File(nombre +\".txt\");\n\t\t\tSystem.out.println(fichero.getName());\n\t\t\tSystem.out.println(fichero.getPath());\n\t\t\tSystem.out.println(fichero.getAbsolutePath());\n\t\t\tSystem.out.println(fichero.length());\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tfichero = new File(nombre +\".txt\");\n\t\t\tSystem.out.println(fichero.length());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tfichero = new File(nombre +\".txt\");\n\t\t\ttry {\n\t\t\t\tif(fichero.createNewFile() == true)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"El fichero se ha creado\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"El fichero no se ha creado\");\n\t\t\t\t}\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\tbreak;\n\t\tcase 5:\n\t\t\tfichero = new File(nombre +\".txt\");\n\t\t\tfichero.delete();\n\t\t\tbreak;\t\t\t\n\t\tcase 9:\n\t\t\tSystem.exit(0);\n\t\t\tbreak;\n\t\t}//}\n\t\t\t\n\t\t}", "private String[] concatenaArquivos(File ordem) throws Exception\n\t{\n\t\t// Cria referencia para os arquivos que serao retornados\n\t\t// apos o processamento\n\t\tCollection arquivosAposConcatenacao = new LinkedList();\n\t\t\n\t\t// Busca o objeto VoucherOrdem contendo os dados da ordem\n\t\t// que foram lidos a partir do arquivo cabecalho da ordem\n\t\tArquivoPedidoVoucherParser ordemParser = new ArquivoPedidoVoucherParser();\n\t\tVoucherOrdem ordemVoucher = ordemParser.parse(ordem);\n\t\t\n\t\t// Busca agora todas os nomes de arquivos de caixa\n\t\t// existentes gravados tambem no arquivo cabecalho\n\t\tString arquivosCaixa[] = getNomeArquivosCaixa(ordem);\n\t\tString dirOrigem = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\t\t\n\t\t// Faz a iteracao nos itens da ordem para entao criar um arquivo \n\t\t// para cada item no formato PrintOrder#[NUMORDEM]_[NUMITEM].dat\n\t\t// e para cada item entao identifica quais arquivos serao concatenados\n\t\tint realNumItem \t\t= 1;\n\t\tlong qtdeSomaCartoes \t= 0;\n\t\tboolean deveConcatenar \t= true;\n\t\tfor (Iterator i=ordemVoucher.getItensOrdem().iterator(); i.hasNext();)\n\t\t{\n\t\t\tVoucherOrdemItem itemOrdem = (VoucherOrdemItem)i.next();\n\t\t\t// O numero do item no sistema GPP comeca a partir do numero zero (0)\n\t\t\t// portanto como na Tecnomen e criado com item 1 o valor e decrescido de um\n\t\t\tlong qtdCartoes = procBatchPOA.getQtdeCartoes(ordemVoucher.getNumeroOrdem(),realNumItem-1);//(int)itemOrdem.getNumItem()-1);\n\t\t\tqtdeSomaCartoes += itemOrdem.getQtdeCartoes();\n\t\t\tif (qtdCartoes != 0 && deveConcatenar)\n\t\t\t{\n\t\t\t\titemOrdem.setQtdeCartoes( qtdCartoes );\n\t\t\t\tFile arquivoItem = new File(getNomeArquivoItem(ordem,realNumItem));//itemOrdem.getNumItem()));\n\t\t\t\tFileOutputStream itemStream = new FileOutputStream(arquivoItem);\n\t\t\t\tif (itemStream != null)\n\t\t\t\t{\n\t\t\t\t\t// Identifica quais sao os arquivos que devem ser concatenados\n\t\t\t\t\t// para este item. Para cada arquivo encontrado , este e lido\n\t\t\t\t\t// e entao concatenado ao arquivo do item que foi criado\n\t\t\t\t\tString caixasDoItem[] = getArquivosCaixaPorItem(ordemVoucher,itemOrdem,arquivosCaixa);\n\t\t\t\t\t// Atualiza informacoes de numeracao de lote do pedido no GPP\n\t\t\t\t\tatualizaNumeracaoLote(ordemVoucher.getNumeroOrdem(),realNumItem,caixasDoItem);//itemOrdem.getNumItem(),caixasDoItem);\n\t\t\t\t\tfor (int j=0; j < caixasDoItem.length; j++)\n\t\t\t\t\t\titemStream.write(getStreamArquivo(new File(dirOrigem+\n\t\t\t\t\t\t System.getProperty(\"file.separator\")+\n\t\t\t\t\t\t caixasDoItem[j])));\n\t\n\t\t\t\t\titemStream.close();\n\t\t\t\t\tarquivosAposConcatenacao.add(arquivoItem.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\titemOrdem.setQtdeCartoes(0);\n\n\t\t\tdeveConcatenar = (qtdCartoes == qtdeSomaCartoes);\n\t\t\tif (qtdCartoes == qtdeSomaCartoes)\n\t\t\t{\n\t\t\t\tqtdeSomaCartoes = 0;\n\t\t\t\trealNumItem++;\n\t\t\t}\n\t\t}\n\t\treturn (String[])arquivosAposConcatenacao.toArray(new String[0]);\n\t}", "public void segunda_parte(String path) {\r\n\t\tArrayList<String>palabras=new ArrayList<String>();\r\n\t\tint i=0,j=0;\r\n\t\tboolean flag_to_stop=false;\r\n\t\tString first_string=\"\",second_string=\"\";\r\n\t\tFile archivo=new File(path);\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(archivo);\r\n\t\t\twhile(sc.hasNext()) {\r\n\t\t\t\tpalabras.add(sc.nextLine());\r\n\t\t\t}\r\n\t\t\tsc.close(); //when i've all the strings on memory, i dont really need the file anymore\r\n\t\t\tfor(i=0;i<palabras.size();i++) {\r\n\t\t\t\tfor(j=0;j<palabras.size();j++) {\r\n\t\t\t\t\tif(i!=j) { //to avoid compare the same word\r\n\t\t\t\t\t\tif(comparador_de_strings(palabras.get(i), palabras.get(j))==1) {\r\n\t\t\t\t\t\t\tfirst_string=palabras.get(i);\r\n\t\t\t\t\t\t\tsecond_string=palabras.get(j);\r\n\t\t\t\t\t\t\tflag_to_stop=true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else;\r\n\t\t\t\t} if(flag_to_stop) {\r\n\t\t\t\t\teliminar_letra_extra(first_string, second_string);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\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}\r\n\t\t\r\n\t}", "private static void task45() {\n String path1, path2;\n path1 = \"d:\\\\common\\\\java\\\\w3resource\\\\src\\\\basicPart1\\\\test.txt\";\n path2 = \"d:\\\\common\\\\java\\\\w3resource\\\\src\\\\basicPart1\\\\test-text.txt\";\n File file = new File(\"test.txt\");\n\n File file2 = new File(\"d:\\\\common\\\\java\\\\w3resource\\\\src\\\\basicPart1\\\\test-text.txt\");\n long size1 = file.length();\n long size2 = file2.length();\n\n System.out.println(\"d:\\\\common\\\\java\\\\w3resource\\\\src\\\\basicPart1\\\\test.txt \" + size1 + \" bites\");\n System.out.println(\"d:\\\\common\\\\java\\\\w3resource\\\\src\\\\basicPart1\\\\test-text.txt \" + size2 + \" bites\");\n }", "public boolean sePuedeMover(int ficha) {\r\n boolean ret = false;\r\n int sentido = 1;\r\n if (isTurnoRojo()) {\r\n sentido = -1;\r\n }\r\n int[] aux = encontrarPosicion(ficha);\r\n int fila = aux[0];\r\n int columna = aux[1];\r\n\r\n if (movimientos[ficha] && (tablero[fila + sentido][columna].getTipo().equals(\"Vacio\") || tablero[fila + sentido][columna - 1].getTipo().equals(\"Vacio\") || tablero[fila + sentido][columna + 1].getTipo().equals(\"Vacio\"))) {\r\n ret = true;\r\n }\r\n\r\n return ret;\r\n\r\n }", "public static void main (String []args){\n\t\tString root = \"/home/weslley/ArtigoGroundHog2015/LogProjetos2015\";\n\t\tString rootCompleto = \"/home/weslley/mestrado2014/FinalProjects\";\n\t\t//String listaProjetosSemData = \"/home/weslley/ArtigoGroundHog2015/projectsNames2015.txt\";\n\n\t\t//Para alguns projetos nao datados\n/*\t\tVector<String> listaProjetosNaoDatados = null;\n\t\ttry {\n\t\t\tlistaProjetosNaoDatados = readProjectsNames();\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\tFile folder = new File(root);\n\t\tFile folderCompleto = new File(rootCompleto);\n\n\t\tint x = 0;\n\t\tFile firstLevel[] = folder.listFiles();\n\t\tFile firstLevelCompleto[] = folderCompleto.listFiles();\n\n\t\tboolean completed = true;\n\n\t\tfor (int i = 0; i < firstLevel.length; i++){\n\n\t\t\t//if(listaProjetosNaoDatados.contains(firstLevel[i].getName())){\n\n\t\t\t\tFile projetoDatado=null;\n\t\t\t\ttry {\n\t\t\t\t\tprojetoDatado = findFile(firstLevelCompleto, firstLevel[i].getName());\n\t\t\t\t} catch (IOException 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\n\t\t\t\tif(projetoDatado!=null){\n\n\t\t\t\t\tFile secondLevel[] = firstLevel[i].listFiles();\n\t\t\t\t\t//System.out.println(firstLevel[i].getName());\n\t\t\t\t\tif (secondLevel != null){\n\t\t\t\t\t\tfor(int j = 0; j < secondLevel.length && completed; j++){\n\t\t\t\t\t\t\t//System.out.println(secondLevel[j].getName());\n\t\t\t\t\t\t\tif (secondLevel[j].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\tFile thirdLevel[] = secondLevel[j].listFiles();\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t\tfor (int k = 0;thirdLevel!=null && k < thirdLevel.length && completed; k++){\n\t\t\t\t\t\t\t\t\tif (thirdLevel[k].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\t\t\tif (!(thirdLevel[k].getName().startsWith(\"[\") && thirdLevel[k].getName().contains(\"]\"))){\n\n\t\t\t\t\t\t\t\t\t\t\t//File secondLevelCompleto[] = projetoDatado.listFiles();\n\t\t\t\t\t\t\t\t\t\t\tFile secondLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\tFile thirdLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tsecondLevelCompletoAuxiliar = findFile(projetoDatado.listFiles(), secondLevel[j].getName());\n\t\t\t\t\t\t\t\t\t\t\t\tif(secondLevelCompletoAuxiliar!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevelCompletoAuxiliar = findFile(secondLevelCompletoAuxiliar.listFiles(), thirdLevel[k].getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (thirdLevelCompletoAuxiliar!=null && thirdLevelCompletoAuxiliar.getName().startsWith(\"[\") && thirdLevelCompletoAuxiliar.getName().contains(\"]\")){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(thirdLevelCompletoAuxiliar!=null && (thirdLevelCompletoAuxiliar.getName().endsWith(thirdLevel[k].getName()) || (compararProjetoSemExtensao(thirdLevelCompletoAuxiliar.getName(),thirdLevel[k].getName() )))){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFile rename = new File(thirdLevel[k].getParent() + \"/\" + thirdLevelCompletoAuxiliar.getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevel[k].renameTo(rename);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString novoNome = thirdLevel[k].getName();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\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}//System.out.println(\"asdasd\" + x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//}\n\n\t\t\t}\n\t\t}\n\t}", "private boolean pomjeri(int direkcija) {\t\r\n\t\t/**\r\n\t\t * Atribut predstavlja zadnje polje u smjeru direkcije u redu ili koloni (zavisno od toga da li je\r\n\t\t * pomjeranje horizontalno ili vertikalno).\r\n\t\t */\r\n\t\tint pocetna;\r\n\t\t/**\r\n\t\t * Atribut govori u kojem smjeru se pomjera trenutnaPozicija (smjer je suprotan direkciji poteza).\r\n\t\t */\r\n\t\tint pomak;\r\n\t\t/**\r\n\t\t * Atribut predstavlja prvo prazno polje na koje se moze pomjeriti iduce neprazno polje.\r\n\t\t */\r\n\t\tint trenutnaPozicija;\r\n\t\t/**\r\n\t\t * Atribut se postavlja na true ukoliko dodje do nekog pomjeranja (promjene u odnosu na prijasnje stanje tabele).\r\n\t\t */\r\n\t\tboolean bilo_promjene = false;\r\n\t\t\r\n\t\t// pomjeranje desno i lijevo\r\n\t\tif(direkcija == 1 || direkcija == 2) {\r\n\t\t\tpocetna = 6 - 3*direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 2*direkcija - 3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++) {\r\n\t\t\t\tfor(int j = pocetna ; j != pocetna + 4 * pomak ; j += pomak) {\r\n\t\t\t\t\tif(tabela[i][trenutnaPozicija] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[i][trenutnaPozicija] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// pomjeranje gore i dole\r\n\t\telse {\r\n\t\t\tpocetna = direkcija; // pocetna je ili 3 ili 0\r\n\t\t\tpomak = 1 - (2*direkcija)/3; // pomak je ili -1 ili 1\r\n\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t\r\n\t\t\t// ovaj dio vrsi samo pomjeranje polja\r\n\t\t\tfor(int j = 0 ; j < 4 ; j++) {\r\n\t\t\t\tfor(int i = pocetna ; i != pocetna + 4 * pomak ; i += pomak) {\r\n\t\t\t\t\tif(tabela[trenutnaPozicija][j] != 0) // ukoliko se na pocetku desi da to polje nije slobodno\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\telse if (tabela[i][j] != 0) { // pomjeri to polje u smjeru direkcija\r\n\t\t\t\t\t\ttabela[trenutnaPozicija][j] = tabela[i][j];\r\n\t\t\t\t\t\ttabela[i][j] = 0;\r\n\t\t\t\t\t\ttrenutnaPozicija += pomak;\r\n\t\t\t\t\t\tbilo_promjene = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrenutnaPozicija = pocetna;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bilo_promjene;\r\n\t}", "public static boolean generarArchivo(Cancion miCancion) throws ArchivosException {\n\t\t\n\t\tString compas = \" \";\n\t\tArrayList<Estrofa> todasLasEstrofas = miCancion.getEstrofas();\n\t\tint linea = 1;\n\t\t\n\t\tString nombre = Utiles.reemplazarEspaciosDeString(miCancion.getNombreArchivo());\n\t\t\n\t\tString sFichero = nombre+Constantes.EXTENSION_ARCHIVO;\n\t\tFile fichero = new File(sFichero);\n\t\t\n\t\twhile(fichero.exists()) {\n\t\t\tnombre = nombre+\"_\";\n\t\t\tsFichero = nombre+Constantes.EXTENSION_ARCHIVO;\n\t\t\tfichero = new File(sFichero);\n\t\t\t\n\t\t}\n\t\t\n\t\tmiCancion.setNombreArchivo(nombre);\n\n\t\t\n\t\tescribirArchivo(miCancion.getNombreArchivo()+Constantes.EXTENSION_ARCHIVO, \"Tempo \" + miCancion.getTempo(), false);\n\t\tescribirArchivo(miCancion.getNombreArchivo()+Constantes.EXTENSION_ARCHIVO, \"\", true);\n\t\t\n\t\tfor (Estrofa est : todasLasEstrofas) {\n\t\t\t\n\t\t\tescribirArchivo(miCancion.getNombreArchivo()+Constantes.EXTENSION_ARCHIVO, \"Groove \" + est.getEstilo(), true);\n\t\t\t\n\t\t\tArrayList<Compas> todosLosCompases = est.getListaDeCompases();\n\t\t\n\t\t\tfor (Compas com : todosLosCompases) {\n\t\t\t\tArrayList<Acorde> todosLosAcordes = com.getAcordes();\n\t\t\t\tcompas = \" \";\n\t\t\t\tfor (Acorde ac : todosLosAcordes) {\n\t\t\t\t\tcompas = compas + \" \" + ac.getNombre();\n\t\t\t\t}\n\t\t\t\tescribirArchivo(miCancion.getNombreArchivo()+Constantes.EXTENSION_ARCHIVO, linea + compas, true);\n\t\t\t\tlinea++;\n\t\t\t}\t\n\t\t}\n\t\t//System.out.println(\"Nuevo archivo generado: \" + miCancion.getNombreArchivo()+Constantes.EXTENSION_ARCHIVO);\n\n\t\treturn crearMIDI(miCancion.getNombreArchivo(), false);\n\t}", "public void preenchercomlike(){\n \n \n javax.swing.table.DefaultTableModel dtm4 = (javax.swing.table.DefaultTableModel)jtablearquivos.getModel(); \n dtm4.setNumRows(0); \n \n int k=0;\n try{\n conexao.Conectar();\n conexao.sql = \"SELECT data,nomefile FROM arquivo WHERE nomefile LIKE ? \";\n conexao.ps = conexao.con.prepareStatement(conexao.sql); \n ps.setString(1,\"%\"+jTextField2.getText()+\"%\");\n conexao.rs = conexao.ps.executeQuery();\n \n \n \n while(conexao.rs.next())\n {\n \n dtm4.addRow(new Object[]{\" \",\" \",\" \"}); \n jtablearquivos.setValueAt(conexao.rs.getString(1),k,0); \n jtablearquivos.setValueAt(conexao.rs.getString(2),k,1); \n k++;\n }\n \n \n }catch(SQLException ex){\n JOptionPane.showMessageDialog(rootPane, ex.getMessage(), \"Erro ao popular tabelas!\", JOptionPane.ERROR_MESSAGE);\n }\n \n }", "private String getResultTest(){\n\t\tString nomarchivo = \"arcade.txt\";\n\t\tString todo=\"\";\n\t\tFile root = Environment.getExternalStorageDirectory();\n\t\tif(root.canRead()){\n\t\t\tFile dir = new File(root + \"/pfc\");\n\t\t\tFile file=new File(dir,nomarchivo);\n\t\t\t\n\t\t\tif(dir.exists() && file.exists()){\n\t\t\t\ttry {\n\t\t\t\t\tFileInputStream fIn = new FileInputStream(file);\n\t\t\t\t\tInputStreamReader archivo = new InputStreamReader(fIn);\n\t\t\t\t\tBufferedReader br = new BufferedReader(archivo);\n\t\t\t\t\tString linea = br.readLine();\n\t\t\t\t\twhile (linea != null) {\n\t\t\t\t\t\ttodo = todo + linea + \"\\n\";\n\t\t\t\t\t\tlinea = br.readLine();\n\t\t\t\t\t}\n\t\t\t\t\tbr.close();\n\t\t\t\t\tarchivo.close();\n\t\t\t\t\tfile.delete();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tSystem.out.println(\"Se ha producido un error al intentar leer el archivo\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn todo;\n\t}", "public void calculosFicha(int ficha, int fila, int columna, String mov) {\r\n this.setseMovio(true);\r\n this.setContador(0);\r\n this.setContadorMov(this.getContadorMov() - 1);\r\n\r\n int diagonalP = ficha;\r\n int horizontal = ficha;\r\n int vertical = ficha;\r\n int diagonalS = ficha;\r\n boolean arriba = true;\r\n boolean abajo = true;\r\n boolean derecha = true;\r\n boolean izquierda = true;\r\n int num = 0;\r\n while (izquierda || derecha || arriba || abajo) {\r\n num++;\r\n if (fila - num == 0) {\r\n arriba = false;\r\n }\r\n if (fila + num == 9) {\r\n abajo = false;\r\n }\r\n if (columna + num == 10) {\r\n derecha = false;\r\n }\r\n if (columna - num == 0) {\r\n izquierda = false;\r\n }\r\n\r\n if (arriba) {\r\n vertical += tablero[fila - num][columna].getValor();\r\n }\r\n if (abajo) {\r\n vertical += tablero[fila + num][columna].getValor();\r\n }\r\n if (derecha) {\r\n horizontal += tablero[fila][columna + num].getValor();\r\n }\r\n if (izquierda) {\r\n horizontal += tablero[fila][columna - num].getValor();\r\n }\r\n if (arriba && izquierda) {\r\n diagonalP += tablero[fila - num][columna - num].getValor();\r\n }\r\n if (arriba && derecha) {\r\n diagonalS += tablero[fila - num][columna + num].getValor();\r\n }\r\n if (abajo && izquierda) {\r\n diagonalS += tablero[fila + num][columna - num].getValor();\r\n }\r\n if (abajo && derecha) {\r\n diagonalP += tablero[fila + num][columna + num].getValor();\r\n }\r\n\r\n }\r\n\r\n Arrays.fill(movimientos, false);\r\n if (vertical < 9 && vertical != ficha) {\r\n movimientos[vertical] = true;\r\n }\r\n if (horizontal < 9 && horizontal != ficha) {\r\n movimientos[horizontal] = true;\r\n }\r\n if (diagonalP < 9 && diagonalP != ficha) {\r\n movimientos[diagonalP] = true;\r\n }\r\n if (diagonalS < 9 && diagonalS != ficha) {\r\n movimientos[diagonalS] = true;\r\n }\r\n this.comprobarMov();\r\n }", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "private String[] filtrarArchivosTmp(String[] listadoImagenes) {\n\t\tString extensionArchivo;\n\t\tint contadorArchivosNoTmp = 0;\n\t\tfor(String s: listadoImagenes) {\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {contadorArchivosNoTmp++;}\n\t\t}\n\t\t\n\t\t//Armo nuevo array filtrando archivos .tmp\n\t\tString listadoImagenesSinTmp[] = new String[contadorArchivosNoTmp];\n\t\tint contador = 0;\n\t\tfor(int i=0 ; i<listadoImagenes.length ; i++) {\n\t\t\tString s = listadoImagenes[i];\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {\n\t\t\t\tlistadoImagenesSinTmp[contador] = listadoImagenes[i];\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listadoImagenesSinTmp;\n\t}", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "private void choixRepertoire(int format){\n\t\tString path = \"\"; //Chemin a parcourir\n\t\tJFileChooser chooser = null;\n\t\tif(SauvegardeRepertoire.getPaths().isEmpty()){//Si la liste des repertoires est vide\n\t\t\tchooser = new JFileChooser();\n\t\t}\n\t\telse{//si elle n'est pas vide\n\t\t\tIterator<String> it = SauvegardeRepertoire.getPaths().iterator();\n\t\t\twhile (it.hasNext() && path.equals(\"\")) {\n\t\t\t\tString str = (String) it.next();\n\t\t\t\tFile file = new File(str);\n\n\t\t\t\tif (file.exists()) //on recupere le premier repertoire possible\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t}\n\n\t\t\tif(path.equals(\"\"))//si on a pas trouvé de chemin coherent\n\t\t\t\tchooser = new JFileChooser();\n\t\t\telse\n\t\t\t\tchooser = new JFileChooser(path);\n\t\t}\n\t\tFileNameExtensionFilter filter=null;\n\t\tswitch(format)\n\t\t{\n\t\t\tcase PDFFile:\n\t\t\t\tfilter = new FileNameExtensionFilter(\"PDF\",\"pdf\");\n\t\t\t\tbreak;\n\t\t\tcase ARFFFile:\n\t\t\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t\t\tchooser.setAcceptAllFileFilterUsed(false);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tchooser.setFileFilter(filter);\n\t\tchooser.setMultiSelectionEnabled(false);\n\t\tint returnVal = chooser.showOpenDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tSauvegardeRepertoire.ajoutPath(chooser);//permet de sauvegarder les repertoires\n\t\t\tif(filter!=null && filter.getExtensions()[0].equals(\"pdf\")) {\n\t\t\t\tgestionFichier(chooser);\n\t\t\t\tunlockButton();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgestionFichierDataSet(chooser);\n\t\t\t\tbDataTraining.setEnabled(true);\n\t\t\t}\n\n\t\t}\n\t}", "private boolean compareFile(java.io.FileInputStream r25, java.io.FileInputStream r26) {\n /*\n r24 = this;\n r7 = 5;\n r8 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r2 = 0;\n r21 = r25.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r0 = (int) r0;\t Catch:{ IOException -> 0x00ce }\n r19 = r0;\n r21 = r26.getChannel();\t Catch:{ IOException -> 0x00ce }\n r22 = r21.size();\t Catch:{ IOException -> 0x00ce }\n r0 = r22;\n r9 = (int) r0;\n r0 = r19;\n if (r0 != r9) goto L_0x002e;\n L_0x0020:\n r21 = 1;\n r0 = r19;\n r1 = r21;\n if (r0 < r1) goto L_0x002e;\n L_0x0028:\n r21 = 1;\n r0 = r21;\n if (r9 >= r0) goto L_0x003c;\n L_0x002e:\n r21 = 0;\n r25.close();\t Catch:{ IOException -> 0x0037 }\n r26.close();\t Catch:{ IOException -> 0x0037 }\n L_0x0036:\n return r21;\n L_0x0037:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x0036;\n L_0x003c:\n r21 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n r0 = r19;\n r1 = r21;\n if (r0 > r1) goto L_0x00b4;\n L_0x0044:\n r6 = r19;\n L_0x0046:\n r20 = r19 / r6;\n r21 = 5;\n r0 = r20;\n r1 = r21;\n if (r0 < r1) goto L_0x00b7;\n L_0x0050:\n r14 = 5;\n L_0x0051:\n r21 = r6 * r14;\n r20 = r19 - r21;\n r15 = r20 / r14;\n r3 = 1;\n r5 = 0;\n r4 = 0;\n r16 = 0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r18 = r0;\n r0 = new byte[r6];\t Catch:{ IOException -> 0x00ce }\n r17 = r0;\n r5 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r25;\n r5.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r4 = new java.io.BufferedInputStream;\t Catch:{ IOException -> 0x00ce }\n r0 = r26;\n r4.<init>(r0);\t Catch:{ IOException -> 0x00ce }\n r12 = 0;\n L_0x0073:\n if (r12 >= r14) goto L_0x00bf;\n L_0x0075:\n if (r3 == 0) goto L_0x00bf;\n L_0x0077:\n r21 = 0;\n r0 = r18;\n r1 = r21;\n r5.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = 0;\n r0 = r17;\n r1 = r21;\n r4.read(r0, r1, r6);\t Catch:{ IOException -> 0x00ce }\n r21 = r6 + r15;\n r16 = r16 + r21;\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r5.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r0 = r16;\n r0 = (long) r0;\t Catch:{ IOException -> 0x00ce }\n r22 = r0;\n r0 = r22;\n r4.skip(r0);\t Catch:{ IOException -> 0x00ce }\n r13 = 0;\n L_0x00a2:\n if (r13 >= r6) goto L_0x00bc;\n L_0x00a4:\n if (r3 == 0) goto L_0x00bc;\n L_0x00a6:\n r21 = r18[r13];\t Catch:{ IOException -> 0x00ce }\n r22 = r17[r13];\t Catch:{ IOException -> 0x00ce }\n r0 = r21;\n r1 = r22;\n if (r0 != r1) goto L_0x00ba;\n L_0x00b0:\n r2 = 1;\n L_0x00b1:\n r13 = r13 + 1;\n goto L_0x00a2;\n L_0x00b4:\n r6 = 128; // 0x80 float:1.794E-43 double:6.32E-322;\n goto L_0x0046;\n L_0x00b7:\n r14 = r20;\n goto L_0x0051;\n L_0x00ba:\n r2 = 0;\n goto L_0x00b1;\n L_0x00bc:\n r12 = r12 + 1;\n goto L_0x0073;\n L_0x00bf:\n r25.close();\t Catch:{ IOException -> 0x00c9 }\n r26.close();\t Catch:{ IOException -> 0x00c9 }\n L_0x00c5:\n r21 = r2;\n goto L_0x0036;\n L_0x00c9:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00ce:\n r10 = move-exception;\n r10.printStackTrace();\t Catch:{ all -> 0x00df }\n r2 = 0;\n r25.close();\t Catch:{ IOException -> 0x00da }\n r26.close();\t Catch:{ IOException -> 0x00da }\n goto L_0x00c5;\n L_0x00da:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00c5;\n L_0x00df:\n r21 = move-exception;\n r25.close();\t Catch:{ IOException -> 0x00e7 }\n r26.close();\t Catch:{ IOException -> 0x00e7 }\n L_0x00e6:\n throw r21;\n L_0x00e7:\n r11 = move-exception;\n r11.printStackTrace();\n goto L_0x00e6;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.sec.clipboard.data.list.ClipboardDataBitmap.compareFile(java.io.FileInputStream, java.io.FileInputStream):boolean\");\n }", "public void salvaPartita(String file) {\n\r\n }", "private void borraArchivos() {\n boolean isBorrado;\n for (BeanCargaOmisos dato : this.listadoCargaOmisos) {\n String dirBitacora = dato.getRutaEnBitacora();\n String dirRepositorio = dato.getRutaEnRepositorio();\n if (dirBitacora != null && !dirBitacora.isEmpty()) {\n File archivoBitacora = new File(dirBitacora);\n if (archivoBitacora.exists()) {\n isBorrado = archivoBitacora.delete();\n getLogger().debug(isBorrado);\n }\n }\n if (dirRepositorio != null && !dirRepositorio.isEmpty()) {\n File archivoRepositorio = new File(dirRepositorio);\n if (archivoRepositorio.exists()) {\n isBorrado = archivoRepositorio.delete();\n getLogger().debug(isBorrado);\n }\n }\n }\n }", "public String getNombreArchivoAdjunto(){\r\n\t\treturn dato.getNombreArchivo() + \".pdf\";\r\n\t}", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "private static void recorrerFicheros(File[] ficheros, int indice,\n\t\t\tString texto) {\n\t\tif (indice <= ficheros.length - 1) {\n\t\t\tif (practica6.Prueba1.\n\t\t\t\t\tesFicheroGrafico(ficheros[indice])) {\n\t\t\t\tImageIcon img = new ImageIcon(ficheros[indice].\n\t\t\t\t\t\tgetPath().toLowerCase());\n\t\t\t\t// comprueba si tiene alguna coincidencia\n\t\t\t\tif (ficheros[indice].getName().\n\t\t\t\t\t\tindexOf(texto) != -1) {\n\t\t\t\t\tSystem.out.printf(\"%s%n\", ficheros[indice].\n\t\t\t\t\t\t\tgetPath());\n\t\t\t\t\t// lo agrega al vector\n\t\t\t\t\tv.add(img);\n\t\t\t\t}\n\t\t\t\tindice++;\n\t\t\t\trecorrerFicheros(ficheros, indice, texto);\n\t\t\t} else {\n\t\t\t\tindice++;\n\t\t\t\trecorrerFicheros(ficheros, indice, texto);\n\t\t\t}\n\t\t}\n\t}", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "private File getRotationFile(File file){\n System.out.println(\"Начата ротация: \");\n \n File parent = file.getParentFile();\n File ret;\n String withoutExtension = getWithoutExtension(file.getName());\n String extension = getExtension(file.getName());\n \n if (isContainsCountBrackets(withoutExtension)){\n int openBracket = withoutExtension.lastIndexOf(\"(\");\n int closeBracket = withoutExtension.lastIndexOf(\")\");\n String clearName = withoutExtension.substring(0, openBracket);\n String numbers = withoutExtension.substring(openBracket+1, closeBracket);\n //then it is getting his number\n try {\n int number = Integer.parseInt(numbers);\n int newlc = countRotation(clearName, extension, parent.toPath(), number);\n //check for append in old file\n if (existsRotationFile(clearName, newlc, extension, parent.toPath())\n && Files.size(getPathRotationFile(clearName, newlc, extension, parent.toPath()))>=maxSize)\n ret = createNewRotationFile(clearName, extension, parent.toPath());\n else {//size of file fits\n ret = getPathRotationFile(clearName, newlc, extension, parent.toPath()).toFile();\n }\n return ret;\n } catch (NumberFormatException ex){\n System.out.println(\"При парсинге number\"\n +numbers+\" ошибка: \"\n +ex.getMessage());\n //if it is the simply name\n int newlc = countRotation(withoutExtension, extension, parent.toPath(), 0);\n //check for append in old file\n try{\n if (existsRotationFile(withoutExtension, newlc, extension, parent.toPath())\n && Files.size(getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()))>=maxSize)\n ret = createNewRotationFile(withoutExtension, extension, parent.toPath());\n else {//size of file fits\n ret = getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()).toFile();\n }\n } catch (IOException e){\n ret = getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()).toFile();\n System.out.println(\"Ошибка в получении пути файла: \"+e.getMessage());\n }\n return ret;\n } catch (IOException ex){\n ret = getPathRotationFile(withoutExtension, lastCountRotation, extension, parent.toPath()).toFile();\n System.out.println(\"Ошибка в получении пути файла: \"+ex.getMessage());\n return ret;\n }\n } else {//if it is the simply name\n int newlc = countRotation(withoutExtension, extension, parent.toPath(), 0);\n //check for append in old file\n try{\n if (existsRotationFile(withoutExtension, newlc, extension, parent.toPath())\n && Files.size(getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()))>=maxSize)\n ret = createNewRotationFile(withoutExtension, extension, parent.toPath());\n else {//size of file fits\n ret = getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()).toFile();\n }\n } catch (IOException e){\n ret = getPathRotationFile(withoutExtension, newlc, extension, parent.toPath()).toFile();\n System.out.println(\"Ошибка в получении пути файла: \"+e.getMessage());\n }\n return ret;\n }\n }", "public void guardarPuntaje() {\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tBufferedWriter bw;\r\n\t\ttry {\r\n\t\t\tif (archivo.exists()) {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(\"\\r\\n\"+jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t}", "public static int BuscarPerrox(Perro BaseDeDatosPerros[], String razas[], int codPerro) {\n int cont = 0;\r\n boolean condicion = false;\r\n char generoPerro, generoPerr, generPerro = 'd';\r\n String razaPerr, tipoRaza;\r\n do {\r\n System.out.println(\"Ingrese el Genero de perro : Macho(M),Hembra (H)\");\r\n generoPerro = TecladoIn.readLineNonwhiteChar();\r\n\r\n if (ValidacionDeGenero(generoPerro)) {\r\n generPerro = generoPerro;\r\n condicion = true;\r\n } else {\r\n System.out.println(\".......................................................\");\r\n System.out.println(\"Ingrese un Genero Correcto: Macho('M') o Hembra ('H')\");\r\n System.out.println(\".......................................................\");\r\n condicion = false;\r\n }\r\n } while (condicion != true);\r\n \r\n tipoRaza=IngresarRazaCorrecta();\r\n \r\n for (int i = 0; i < codPerro; i++) {\r\n razaPerr = BaseDeDatosPerros[i].getRaza();\r\n generoPerr = BaseDeDatosPerros[i].getGenero();\r\n\r\n if (tipoRaza.equals(razaPerr) && (generPerro == generoPerr)) {\r\n cont++;\r\n }\r\n\r\n }\r\n\r\n \r\n\r\n return cont;}", "public void primera_parte(String path) {\r\n\t\tint aparece_dos_veces=0,aparece_tres_veces=0;\r\n\t\tint[] abecedario=new int[26];\r\n\t\tString linea;\r\n\t\tFile archivo=new File(path);\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(archivo);\r\n\t\t\twhile(sc.hasNextLine()) {\r\n\t\t\t\tinicializar_vector(abecedario);\r\n\t\t\t\tlinea=sc.nextLine();\r\n\t\t\t\tprocesar_linea(abecedario,linea);\r\n\t\t\t\tfor(int j=0;j<abecedario.length;j++) {\r\n\t\t\t\t\tif(abecedario[j]==2) {\r\n\t\t\t\t\t\taparece_dos_veces++;\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\tfor(int j=0;j<abecedario.length;j++) {\r\n\t\t\t\t\tif(abecedario[j]==3) {\r\n\t\t\t\t\t\taparece_tres_veces++;\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\t\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t\tint resultado=(aparece_dos_veces*aparece_tres_veces);\r\n\t\t\tSystem.out.println(\"Our Checksum is: \"+resultado);\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}\r\n\t\t\r\n\t\t\r\n\t}", "public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\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\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\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\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n File myFile = new File (\"d:/names.txt\");\r\n // para saber si el archivo no existe, devuelve true o false\r\n System.out.println(\"file.exists(): \" + myFile.exists());\r\n System.out.println(\"file.isDirectory(): \" + myFile.isDirectory());\r\n // para saber la fecha de modificación\r\n System.out.println(\"file.lastModified(): \" + myFile.lastModified());\r\n // para saber el nombre del archivo\r\n System.out.println(\"file.getName(): \" + myFile.getName());\r\n // para saber la ruta\r\n System.out.println(\"file.getPath(): \" + myFile.getPath());\r\n // para saber el tamaño en bytes que ocupa en disco\r\n System.out.println(\"file.length(): \" + myFile.length()+\" bytes\");\r\n // para saber si es de lectura, devuelve true o false\r\n System.out.println(\"file.canRead():\" + myFile.canRead());\r\n\r\n //File newfolder = new File(\"D:/carpeta con archivos año mío\");\r\n //System.out.println(newfolder.mkdir());\r\n\r\n // si fuera un directorio, para saber los archivos que contiene\r\n File carpeta = new File(\"D:/carpeta_con_archivos\");\r\n System.out.println(\"----listado archivos D:/carpeta_archivos------\");\r\n for (String archivo : carpeta.list()) {\r\n System.out.println(archivo);\r\n }\r\n\r\n //agregar una linea nueva a un archivo existente (METODO 1)\r\n /*try {\r\n //abra el archivo , TRUE en un forma append (agregar nuevos valores)\r\n FileWriter myFile2 = new FileWriter(\"d:/names.txt\", true);\r\n //cargar en memora ram del SO el contenido del archivo\r\n BufferedWriter dataFile = new BufferedWriter(myFile2);\r\n //agregar una nueva linea\r\n dataFile.write(\"\\nnueva linea tres\");\r\n dataFile.close();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }*/\r\n //agregar una linea nueva a un archivo existente (METODO 1 optimizado)\r\n /*try{\r\n BufferedWriter dataFile = new BufferedWriter(new FileWriter(\"d:/names.txt\",true));\r\n //agregamos la nueva linea\r\n dataFile.write(\"nueva linea sin borrar\");\r\n dataFile.close();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }*/\r\n // agregar nueva linea con metodo super optimizado en lineas (METODO FLAHS)\r\n try{\r\n PrintWriter myFile3 = new PrintWriter(new BufferedWriter(new FileWriter(\"d:/names.txt\", true)));\r\n myFile3.println(\"Otra nueva línea mezclando las dos librerías (PrintWriter + FileWriter) \");\r\n myFile3.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "public boolean turno(Jugador jugador, int numJugador) {\n\n int colIn = 0, filaIn = 0, colFn = 0, filaFn = 0;\n boolean movimientoValido = false;\n\n do {\n System.out.println(\"\\n Turno de \" + jugador.getNombre() + \":\");\n\n System.out.println(\"\\n (Si quieres salir escribe 'no')\");\n String ficha = LecturaDatos.leerTexto(\" Elige la ficha a mover (a1): \");\n\n if (ficha.equals(\"no\")) {\n return true;\n }\n colIn = tablero.buscarIndiceLetras(ficha.charAt(0));\n filaIn = Character.getNumericValue(ficha.charAt(1)) - 1;\n\n ficha = LecturaDatos.leerTexto(\" Elige la casilla a la que moveras: \");\n colFn = tablero.buscarIndiceLetras(ficha.charAt(0));\n filaFn = Character.getNumericValue(ficha.charAt(1)) - 1;\n\n boolean sePuede = rectificarCeldas(filaIn, colIn, filaFn, colFn, jugador);\n\n if (sePuede) {\n movimientoValido = comprobarMovimiento(filaIn, colIn, filaFn, colFn, jugador, numJugador);\n if (movimientoValido) {\n realizarMovimiento(tableroPartida[filaIn][colIn], tableroPartida[filaFn][colFn]);\n tablero.mostrarTablero();\n } else {\n System.out.println(\"\\n Movimiento no valido11\");\n }\n } else {\n System.out.println(\"\\n Movimiento no valido12\");\n }\n\n } while (movimientoValido == false);\n\n // realizarMovimiento(tableroPartida[filaIn][colIn],\n // tableroPartida[filaFn][colFn]);\n // tablero.mostrarTablero();\n\n // revisar si la casilla inicial tiene letra\n\n // revisar si es x ^ o\n\n // revisar si la casilla final está vacia\n\n // comprobar si se puede hacer el movimiento\n return false;\n }", "public static void main(String[] args) throws IOException {\n\t\t\tBufferedReader entrada = new BufferedReader(new FileReader(\"src\\\\ListaEnlazada3\\\\F.txt\"));\n\t\t\tPrintWriter salida = new PrintWriter(new FileWriter(\"src\\\\ListaEnlazada3\\\\Fsalida.txt\"));\n\t\t\tPilaEnListaEnlazada pila = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada pila2 = new PilaEnListaEnlazada();\n\t\t\tPilaEnListaEnlazada result = new PilaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola = new ColaEnListaEnlazada();\n\t\t\tColaEnListaEnlazada cola2 = new ColaEnListaEnlazada();\n\t\t\tString str;\n\t\t\tint linea=0;\n\t\t\tint lleva=0;\n\t\t\twhile(entrada.ready())\n\t\t\t{\n\t\t\t\tstr = entrada.readLine();\n\t\t\t\tlinea++;\n\t\t\t\tif(linea==1)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));//guarda el primer caracter de la cadena de texto.\n\t\t\t\t\t\t\t //En la pila, e incrementa el contador.\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException eq)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(linea==2)\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 2, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse//De no cumplise las condiciones anterirores entramos a este ciclo else.\n\t\t\t\t{\n\t\t\t\t\tfor(int i=0; i<str.length();i++)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(Integer.parseInt(str.substring(i, i+1)));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(NumberFormatException ea)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"Hay una letra o caracter en la pila 1, la cual fue borrada.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!pila2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)pila.pop()+(int)pila2.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);//sacamos el residuo del numero y lo guardamos en la cola\n\t\t\t\t\t\tlleva=1;//Incrementamos el lleva en 1, ya que hay un exceso en el numero.\n\t\t\t\t\t}\n\t\t\t\t\telse//Si el numero no es mayor que 9.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);//Se guarda el numero sin sacarle su residuo.\n\t\t\t\t\t\tlleva=0;//le bajamos el valor del lleva a 0, para evitar problemas de acarreo posteriores.\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||pila2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(pila.size()>pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila2.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()<pila2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()&&pila2.isEmpty()&&lleva==1)//Si la pila, la pila2 estan vacias y el lleva ==1 \n\t\t\t\t\t\t //significa que no hay un numero para sumar, pero estoy llevando \n\t\t\t\t\t\t //un acarreo\n\t\t\t\t\t\t //el cual tengo que tener en cuenta para la sig suma.\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!cola.isEmpty()&&!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tint numero = (int)cola.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\tif(pila.isEmpty()||cola.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola2.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twhile(!pila.isEmpty()&&!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\tint numero = (int)cola2.dequeue()+(int)pila.pop()+lleva;\n\t\t\t\t\tif(numero>9)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero%10);\n\t\t\t\t\t\tlleva=1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(numero);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(pila.isEmpty()||cola2.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cola2.size()>pila.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpila.push(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pila.size()>cola2.size())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcola2.enqueue(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(cola2.isEmpty()&&pila.isEmpty()&&lleva==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tcola.enqueue(lleva);\n\t\t\t\t\t\tlleva=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sirve para invertir los valores y mostrarlos como una suma normal.\n\t\t\twhile(!cola.isEmpty()||!cola2.isEmpty()||!pila.isEmpty())\n\t\t\t{\n\t\t\t\tif(!cola.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!cola2.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)cola2.dequeue());\n\t\t\t\t}\n\t\t\t\telse if(!pila.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tresult.push((int)pila.pop());\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(!result.isEmpty())\n\t\t\t{\n\t\t\t\tcola2.enqueue((int)result.pop());\n\t\t\t}\n\t\t\tSystem.out.print(\"Suma: \"+cola2.toString());\n\t\t\tsalida.print(\"Suma total:\"+cola2.toString());\n\t\t\tentrada.close();\n\t\t\tsalida.close();\n\t}", "public boolean excribirResultados(String nom, ArrayList<Resultado> resFinal) { \n objDate = new Date(); \n hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n String fecha = hourdateFormat.format(objDate);\n \n hourdateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH.mm.ss\");\n this.nombre = hourdateFormat.format(objDate) + \" \" +nom;\n try{\n file.abrirArchivo(nombre, true, false);\n file.escribirArchivo(fecha, true); \n file.escribirArchivo(encabezado, true);\n file.escribirArchivo(\"\", true);\n String nombreFun = resFinal.get(0).getFuncion();\n for (Resultado res : resFinal) { \n if(!nombreFun.equals(res.getFuncion())){\n file.escribirArchivo(\"\", true);\n nombreFun = res.getFuncion();\n }\n encabezado = organizarCadena(res);\n //escribir linea en el archivo\n file.escribirArchivo(encabezado, true); \n }\n file.escribirArchivo(\"\\n\", false); \n }catch(Exception e){\n System.out.println(\"error manipulando un archivo. ex = \" + e.getMessage());\n return false;\n }finally{\n // En el finally se cierra el fichero, para asegurarse que se cierra si todo va bien o si salta una excepcion.\n try{ \n if( null != file ){ \n file.cerrarArchivo();\n }\n }catch (Exception e2){ \n System.out.println(\"error cerando un archivo. ex = \" + e2.getMessage());\n return false;\n }\n }\n return true;\n }", "public boolean hasFiles() {\n if (arquivos.size() > 0) {\n return true; \n }\n return false;\n }", "public void uploadFile() throws IOException {\n\n\t\t// Provera da li ima jos mesta za upload (samo za standard korisnike -\n\t\t// ogranicenje je 4 fajla)\n\t\tfor (User u : Server.dataBase)\n\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\tif (u.getTipKorisnika().toString().equals(\"STANDARD\"))\n\t\t\t\t\tif (u.getBrojFajlova() > 3)\n\t\t\t\t\t\tpom = \"***ogranicenje\";\n\n\t\tif (pom.equals(\"***ogranicenje\")) {\n\t\t\tclientOutput.println(\"Dostignut je maksimalan broj fajlova!\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do fajla koji zelite da upload-ujete, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do mesta gde zelite da upload-ujete fajl, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\t\tdestinacija = new File(userInput);\n\t\t\tdestinacija.createNewFile();\n\n\t\t\tif (destinacija.getName().endsWith(\".txt\")) {\n\t\t\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(userInput)));\n\t\t\t\tpom = null;\n\n\t\t\t\tdo {\n\t\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\t\tif (userInput.equals(\"***kraj\"))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (pom != null)\n\t\t\t\t\t\tpw.print(\"\\n\");\n\t\t\t\t\tpw.print(userInput);\n\t\t\t\t\tpom = \"upis\";\n\t\t\t\t\tclientOutput.println(userInput);\n\t\t\t\t} while (true);\n\t\t\t\tpw.close();\n\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t} else {\n\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\ttry {\n\t\t\t\t\tFileOutputStream fOut = new FileOutputStream(destinacija);\n\t\t\t\t\tbyte[] b = Base64.getDecoder().decode(userInput);\n\t\t\t\t\tfOut.write(b);\n\t\t\t\t\tfOut.close();\n\t\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public ArrayList<String> verPuntajes(){\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tArrayList<String> datos = new ArrayList<String>();\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader(archivo);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString linea = \"\";\r\n\t\t\twhile ((linea = br.readLine()) != null) {\r\n\t\t\t\tdatos.add(linea);\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn datos;\r\n\t}", "public static void main(String[] args) {\n Director principal = new Director(\"data/\");\n Director secundar = new Director(\"sub/\");\n\n FisierMP3 fisierMP3 = new FisierMP3(\"fisier.mp3\");\n FisierSVG fisierSVG = new FisierSVG(\"fisier.svg\");\n FisierText fisierText = new FisierText(\"fisier.txt\");\n fisierText.setAlignStrategy(new AlignRight());\n FisierText fisierText2 = new FisierText(\"fisier2.txt\");\n fisierText2.setAlignStrategy(new AlignLeft());\n\n principal.addFile(fisierMP3);\n principal.addFile(fisierSVG);\n principal.addFile(fisierText2);\n principal.addFile(secundar);\n\n secundar.addFile(fisierText);\n\n // b. Printarea directoarelor folosind un AlignStrategy\n //\n // OUTPUT\n // <<<<<./data/fisier.mp3>>>>>\n // <<<<<./data/fisier.svg>>>>>\n // <<<<<./data/fisier2.txt>>>>>\n // <<<<<./data/sub/fisier.txt>>>>>\n printDirector(\"./\", principal, new AlignCenter());\n\n // c. Calcul total al dimensiunii\n //\n // Folosind structura creata la a) avem\n // 1 fisierMP3 + 1 fisierSVG + 2 fisierText\n // 3072Kb (3Mb) + 45Kb + 2*5Kb = 3127Kb\n //\n // OUTPUT\n // Marime totala: 3127Kb\n int marimeTotala = principal.getTotalSize();\n System.out.println(\"Marime totala: \" + marimeTotala + \"Kb\");\n }", "private void escoger(){\n partida.escoger(ficha1,ficha2);\n ficha1=null;\n ficha2=null;\n this.ok=partida.ok;\n }", "public int compararPuntuacion(String pNombre, int pPuntos){\n\t\tint rdo = 0;\n\t\tif(this.getNombre().equals(pNombre)){\n\t\t\t\tif(this.getPuntos()<pPuntos){\n\t\t\t\t\trdo = 2;\n\t\t\t\t}else{\n\t\t\t\t\trdo = 1;\n\t\t\t\t}\n\t\t}\n\t\treturn rdo;\n\t}", "public boolean isConfermabile() {\n boolean confermabile = false;\n Date d1, d2;\n\n try { // prova ad eseguire il codice\n confermabile = super.isConfermabile();\n\n /* controllo che le date siano in sequenza */\n if (confermabile) {\n d1 = this.getDataInizio();\n d2 = this.getDataFine();\n confermabile = Lib.Data.isSequenza(d1, d2);\n }// fine del blocco if\n\n /* controllo che almeno una riga sia selezionata */\n if (confermabile) {\n confermabile = getPanServizi().getRigheSelezionate().size() > 0;\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return confermabile;\n\n }", "public static void guardarArchivo(LinkedList<LinkedList<Integer>> permutacionParaCadaSubconjunto,\n int numeroDePuntos, float p) {\n final String nombreDelArchivo = \"respuesta-ejemplo-U=\" + numeroDePuntos + \"-p=\" + p + \".txt\";\n try {\n PrintWriter escritor = new PrintWriter(nombreDelArchivo, \"UTF-8\");\n for (LinkedList<Integer> lista : permutacionParaCadaSubconjunto) {\n for (Integer duenoDeVehiculo : lista)\n escritor.print(duenoDeVehiculo + \" \");\n escritor.println();\n }\n escritor.close();\n } catch (IOException ioe) {\n System.out.println(\"Error escribiendo el archivo de salida \" + ioe.getMessage());\n }\n }", "public static void leProcesso(String nomeProcesso) {\n\t\tdouble ms = 0;\n\t\tdouble media = 0;\n\n\t\ttry {\n\t\t\tProcess processo = Runtime.getRuntime().exec(nomeProcesso);// executa no terminal o que esta escrito na\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// variavel nomeProcesso\n\t\t\tInputStream fluxo = processo.getInputStream();// pega fluxo de erro.\n\t\t\tInputStreamReader leitor = new InputStreamReader(fluxo);// Transforma fluxo em string\n\t\t\tBufferedReader buffer = new BufferedReader(leitor);// Joga no buffer\n\t\t\tString linha = buffer.readLine();// le a linha\n\n\t\t\twhile (linha != null) {\n\n\t\t\t\tString[] vetorPalavras = linha.split(\" \");// O m�todo split quebra uma String em v�rias substrings a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// partir de um caracter definido por voc�.\n\n\t\t\t\tfor (String palavra : vetorPalavras) {// ciclo condicional enquanto o array vetorPalavras possuir alguma\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// palavra fa�a\n\n\t\t\t\t\tif (palavra.contains(\"tempo=\")) {// Se a linha contiver a palavra tempo=\n\t\t\t\t\t\tString encontrada = palavra.replace(\"tempo=\", \"\");// A palavra encontrada na linha - tempo= �\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// substituida por vazio\n\t\t\t\t\t\tencontrada = encontrada.replace(\"ms\", \"\");// A palavra encontrada na linha - ms � substituida\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// por vazio\n\n\t\t\t\t\t\tms = Double.parseDouble(encontrada);// converte String em Double\n\t\t\t\t\t\tmedia = ms + media;// concatena o valor ms e soma com o valor que estiver na variavel media\n\t\t\t\t\t}\n\t\t\t\t\tif (palavra.contains(\"time=\")) {// Se a linha contiver a palavra tempo=\n\t\t\t\t\t\tString encontrada = palavra.replace(\"time=\", \"\");// A palavra encontrada na linha - tempo= �\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// substituida por vazio\n\t\t\t\t\t\tencontrada = encontrada.replace(\"ms\", \"\");// A palavra encontrada na linha - ms � substituida\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// por vazio\n\n\t\t\t\t\t\tms = Double.parseDouble(encontrada);// converte String em Double\n\t\t\t\t\t\tmedia = ms + media;// concatena o valor ms e soma com o valor que estiver na variavel media\n\t\t\t\t\t\t// System.out.println(ms);//Imprimi todos os 10 pings\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tlinha = buffer.readLine();// le linha no buffer\n\t\t\t}\n\n\t\t\tmedia = media / 10;// divide valor somado da media pela quantidade de pings realizados\n\t\t\tSystem.out.println(\"A média de tempo é de: \" + media + \" ms\");// imprime na tela\n\n\t\t\tbuffer.close();// fecha e limpa da memoria.\n\t\t\tleitor.close();// fecha leitor\n\t\t\tfluxo.close();// fecha fluxo\n\n\t\t} catch (IOException e) {// Sai por exception\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Before\r\n\tpublic void faireAvant(){\r\n\t\tfile3Donnees = new File(\"fichierTest3Donnees.csv\");\r\n\t\tfile11Donnees = new File(\"fichierTest11Donnees.csv\");\r\n\t}", "static void testFichier(String rep){\n\t\tFile f = new File(rep);\n\t\t\n\t\t// Si le rep existe\n\t\tif(f.exists()){\n\t\t\t// on prend le contenu du rep sous forme de liste\n\t\t\tString[] contenu = f.list();\n\t\t\t// on parcours les fichiers/dossiers\n\t\t\tfor(int i=0; i<contenu.length; i++)\n\t\t\t{\n\t\t\t\tFile f2 = new File(rep,contenu[i]);\n\t\t\t\t// si c'est un sous répertoire\n\t\t\t\tif(f2.isDirectory()){\n\t\t\t\t\t// on affiche le nom du rep\n\t\t\t\t\tSystem.out.println(\"Dossier \" + contenu[i]);\n\t\t\t\t\t// Et on parcours son contenu par récursivité\n\t\t\t\t\ttestFichier(rep+\"/\"+contenu[i]);\n\t\t\t\t}\n\t\t\t\t// si c'est un fichier\n\t\t\t\telse\n\t\t\t\t\t// on affiche son nom\n\t\t\t\t\tSystem.out.println(\"\\tFichier \" + contenu[i]);\n\t\t\t}\n\t\t}\n\t}", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void upload() throws ServicioException {\n if (justificacionHelper.getArchivoCargado() != null) {\n if (justificacionHelper.getArchivoCargado().getContentType().equals(\"application/pdf\")) {\n ParametroGlobal buscarParametroGlobalPorNemonico =\n administracionServicio.buscarParametroGlobalPorNemonico(\n ParametroGlobalEnum.TAMANIO_MAXIMO_PDF.getCodigo());\n if (justificacionHelper.getArchivoCargado().getSize()\n > buscarParametroGlobalPorNemonico.getValorNumerico().longValue()) {\n mostrarMensajeEnPantalla(\"El tamaño del archivo supera los \"\n + (buscarParametroGlobalPorNemonico.getValorNumerico().longValue() / 1024) + \" MB\",\n FacesMessage.SEVERITY_WARN);\n justificacionHelper.setArchivoRequerido(Boolean.TRUE);\n justificacionHelper.setArchivoCargado(null);\n } else {\n mostrarMensajeEnPantalla(\"ec.gob.mrl.smp.justificacionReglas.archivoCargadoCorrectamente\",\n FacesMessage.SEVERITY_INFO);\n justificacionHelper.setArchivoRequerido(Boolean.FALSE);\n System.out.println(\"Archivo Cargado \" + justificacionHelper.getArchivoCargado().getFileName());\n }\n } else {\n mostrarMensajeEnPantalla(\"ec.gob.mrl.smp.justificacionReglas.archivoCargadoNoesPDF\",\n FacesMessage.SEVERITY_ERROR);\n justificacionHelper.setArchivoRequerido(Boolean.TRUE);\n justificacionHelper.setArchivoCargado(null);\n }\n\n }\n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "private String criptografaECompactaOrdem(File ordem, String arqAProcessar[]) throws Exception\n\t{\n\t\tlong numOrdem = getNumeroOrdem(ordem);\n\n\t\tString requisitante = getIdRequisitante(numOrdem);\n\t\t/* Se o requisitante ou a ordem nao for encontrada\n\t\t * o GPP retorna o valor NAO_DISPONIVEL para o id do\n\t\t * requisitante. Neste caso o metodo termina, pois\n\t\t * nada pode ser feito com os arquivos da ordem. Caso\n\t\t * os arquivos a serem processados tambem seja uma\n\t\t * referencia nula, o procedimento e o mesmo\n\t\t */\n\t\tif (requisitante.equals(GPPTransferenciaVoucher.REQUISITANTE_NAO_DIPONIVEL) || arqAProcessar == null)\n\t\t\treturn null;\n\t\t\t\n\t\tString nomeSoftware = getPropriedade(\"ordemVoucher.pgp\");\n\t\tString userId = getPropriedade(\"ordemVoucher.pgp.userID\");\n\t\tString verbPhrase = getPropriedade(\"ordemVoucher.pgp.verbPhrase\");\n\t\tfor (int i=0; i < arqAProcessar.length; i++)\n\t\t{\n\t\t\t/* Define a execucao do comando de criptografia */\n\t\t\tString nomeArquivo = arqAProcessar[i];\t\t\t\n//\t\t\tString cmd[] = {nomeSoftware,\"+force\",\"-es\",nomeArquivo,requisitante,\"-u\",userId,\"-z\",verbPhrase};\n\t\t\tString cmd[] = {nomeSoftware,verbPhrase,userId,requisitante,nomeArquivo};\n\n\t\t\tSystem.out.println(\"Criptografando arquivo:\"+nomeArquivo+\" ....\");\n\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\tProcess p = rt.exec(cmd);\n\t\t\tp.waitFor();\n\t\t\tif (p.exitValue() != 0)\n\t\t\t\tthrow new Exception(\"Processo de criptografia nao foi executado corretamente para o arquivo:\"+arqAProcessar[i]+\" requisitante:\"+requisitante+\" valor de saida:\"+p.exitValue());\n\t\t\t\n\t\t\t/* Fecha os \"Stream\" da classe Process\n\t\t\t * Isso evita o erro \"Too Many Open Files\" no sistema operacional\n\t\t\t */\n\t\t\tp.getOutputStream().close();\n\t\t\tp.getErrorStream().close();\n\t\t\tp.getInputStream().close();\n\t\t}\n\t\t\n\t\t/* Como este metodo ja possui o nome das caixas (arquivos de voucher)\n\t\t * que foram criptografados, entao chama o metodo responsavel \n\t\t * em compactar estes arquivos em um so com o mesmo nome do arquivo\n\t\t * de cabecalho da Ordem porem com extensao diferente\n\t\t */\n\t\tString nomeArqCompactado = compactaOrdem(ordem,arqAProcessar);\n\t\treturn nomeArqCompactado;\n\t}", "private void solicitaPecas(String nomeArquivoTorrent) throws UnknownHostException {\n\n try {\n\n // Passo 1 - Envia uma mensagem p ip do ArqTorrent com #+nomeArqTorrent\n ipServidor = getEnderecoRastreador(nomeArquivoTorrent);\n InetAddress enderecoServidor = InetAddress.getByName(ipServidor);\n String nomeArqOriginal = \"#\" + retornaNomeArq(nomeArquivoTorrent);\n DatagramPacket pacoteRequisicao = new DatagramPacket((nomeArqOriginal).getBytes(), nomeArqOriginal.length(), enderecoServidor, porto);\n soqueteCliente.send(pacoteRequisicao);\n\n //Recebe como resposta os pares que possuem alguma peça daquele arquivo\n DatagramPacket pacoteResposta = new DatagramPacket(new byte[256], 256);\n soqueteCliente.receive(pacoteResposta);\n String dadosResposta = new String(pacoteResposta.getData()).trim();\n System.out.println(\"Dados resposta: \" + dadosResposta);\n String[] ipPares = dadosResposta.split(\"-\");\n //System.out.println(\"Quantidade:\" +ipPares.length);\n\n\n //ARRUMAR ISSO DEPOIS\n String nomeArqePecas = \"$\" + retornaNomeArq(nomeArquivoTorrent)+\"/0-30\";\n DatagramPacket pacoteRequisicaoPecas = new DatagramPacket((nomeArqePecas).getBytes(), nomeArqePecas.length(), enderecoServidor, porto);\n soqueteCliente.send(pacoteRequisicaoPecas);\n\n System.out.println(\"nome: \"+nomeArqOriginal);\n Path path = Paths.get(nomeArqOriginal);\n\n File arquivoDados = path.toFile();\n RandomAccessFile arq = new RandomAccessFile(arquivoDados,\"rw\");\n int i=0;\n while(i<30){\n DatagramPacket peca = new DatagramPacket(new byte[1000], 1000);\n soqueteCliente.receive(peca);\n\n System.out.println(peca);\n String g = Metadados.geraChave(peca.getData());\n System.out.println(i + \"> \" + g);\n // writePeca(i,peca.getData(),arq);\n i++;\n }\n\n\n\n //DatagramPacket pacoteResposta = new DatagramPacket(new byte[25600], 25600);\n //soqueteCliente.receive(pacoteResposta);\n clienteTerminou = true;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n }", "private static void createFileUmidade() throws IOException {\r\n\t\tInteger defaultUmidade = 30;\r\n\t\tarqUmidade = new File(pathUmidade);\r\n\t\tif(!arqUmidade.exists()) {\r\n\t\t\tarqUmidade.createNewFile();\r\n\t\t\tFileWriter fw = new FileWriter(getArqUmidade());\r\n\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\tbuffWrite.close();\r\n\t\t}else {\r\n\t\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\t\tif(!buffRead.ready()) {/*Se o arquivo se encontar criado mas estiver vazio*/\r\n\t\t\t\tFileWriter fw = new FileWriter(arqUmidade);\r\n\t\t\t\tBufferedWriter buffWrite = new BufferedWriter(fw);\r\n\t\t\t\tbuffWrite.append(defaultUmidade.toString() + String.valueOf('\\n'));/*Inicializa o arquivo com uma umidade Inicial*/\r\n\t\t\t\tbuffWrite.close();\r\n\t\t\t}\r\n\t\t\tbuffRead.close();\r\n\t\t}\r\n\t}", "public String[][] medianaDeTres(String[][] arr, int primeiro, int ultimo, int requiredData) {\r\n\t\tif (requiredData != 4) {\r\n\t\t\tif (primeiro < ultimo) {\r\n\r\n\t\t\t\tint meio = ((primeiro + ultimo) / 2);\r\n\t\t\t\tint a = Integer.parseInt(arr[primeiro][requiredData]);\r\n\t\t\t\tint b = Integer.parseInt(arr[meio][requiredData]);\r\n\t\t\t\tint c = Integer.parseInt(arr[ultimo][requiredData]);\r\n\t\t\t\tint medianaIndice;\r\n\r\n\t\t\t\tif (a < b) {\r\n\t\t\t\t\tif (b < c) {\r\n\t\t\t\t\t\t// a < b && b < c\r\n\t\t\t\t\t\tmedianaIndice = meio;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (a < c) {\r\n\t\t\t\t\t\t\t// a < c && c <= b\r\n\t\t\t\t\t\t\tmedianaIndice = ultimo;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// c <= a && a < b\r\n\t\t\t\t\t\t\tmedianaIndice = primeiro;\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\tif (c < b) {\r\n\t\t\t\t\t\t// c < b && b <= a\r\n\t\t\t\t\t\tmedianaIndice = meio;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (c < a) {\r\n\t\t\t\t\t\t\t// b <= c && c < a\r\n\t\t\t\t\t\t\tmedianaIndice = ultimo;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// b <= a && a <= c\r\n\t\t\t\t\t\t\tmedianaIndice = primeiro;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswap(arr, medianaIndice, ultimo);\r\n\r\n\t\t\t\tint pivo = Integer.parseInt(arr[ultimo][requiredData]);\r\n\r\n\t\t\t\tint i = (primeiro - 1);\r\n\t\t\t\tfor (int j = primeiro; j <= ultimo - 1; j++) {\r\n\r\n\t\t\t\t\tif (Integer.parseInt(arr[j][requiredData]) < pivo) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[ultimo];\r\n\t\t\t\tarr[ultimo] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\tmedianaDeTres(arr, primeiro, piAux - 1, requiredData);\r\n\t\t\t\tmedianaDeTres(arr, piAux + 1, ultimo, requiredData);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (primeiro < ultimo) {\r\n\t\t\t\tCollator collator = Collator.getInstance();\r\n\t\t\t\tcollator.setStrength(Collator.NO_DECOMPOSITION);\r\n\t\t\t\tint meio = ((primeiro + ultimo) / 2);\r\n\t\t\t\tString a = (arr[primeiro][requiredData]);\r\n\t\t\t\tString b = (arr[meio][requiredData]);\r\n\t\t\t\tString c = (arr[ultimo][requiredData]);\r\n\t\t\t\tint medianaIndice;\r\n\r\n\t\t\t\tif (collator.compare(b, a) > 0) {\r\n\t\t\t\t\tif (collator.compare(c, b) > 0) {\r\n\t\t\t\t\t\t// a < b && b < c\r\n\t\t\t\t\t\tmedianaIndice = meio;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (collator.compare(c, a) > 0) {\r\n\t\t\t\t\t\t\t// a < c && c <= b\r\n\t\t\t\t\t\t\tmedianaIndice = ultimo;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// c <= a && a < b\r\n\t\t\t\t\t\t\tmedianaIndice = primeiro;\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\tif (collator.compare(b, c) > 0) {\r\n\t\t\t\t\t\t// c < b && b <= a\r\n\t\t\t\t\t\tmedianaIndice = meio;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (collator.compare(a, c) > 0) {\r\n\t\t\t\t\t\t\t// b <= c && c < a\r\n\t\t\t\t\t\t\tmedianaIndice = ultimo;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// b <= a && a <= c\r\n\t\t\t\t\t\t\tmedianaIndice = primeiro;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswap(arr, medianaIndice, ultimo);\r\n\r\n\t\t\t\tString pivo = (arr[ultimo][requiredData]);\r\n\r\n\t\t\t\tint i = (primeiro - 1);\r\n\t\t\t\tfor (int j = primeiro; j <= ultimo - 1; j++) {\r\n\r\n\t\t\t\t\tif (collator.compare(pivo, arr[j][requiredData]) > 0) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[ultimo];\r\n\t\t\t\tarr[ultimo] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\tmedianaDeTres(arr, primeiro, piAux - 1, requiredData);\r\n\t\t\t\tmedianaDeTres(arr, piAux + 1, ultimo, requiredData);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arr;\r\n\t}", "public int cuantosParrafos() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas estrofas quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "private int updateUmidade() throws FileNotFoundException, IOException{\r\n\t\tFileReader fr = new FileReader(getArqUmidade());\r\n\t\tBufferedReader buffRead = new BufferedReader(fr);\r\n\t\tInteger contribuicaoUmidadeEquip ;\r\n\t\t/*Lendo a umidade do arquivo*/\r\n\t\tInteger umidadeAtual = Integer.parseInt(buffRead.readLine());\r\n\t\t\r\n\t\tif(umidadeAtual <= 0) {//quando umidade chega a 0, para de diminuir\r\n\t\t\tcontribuicaoUmidadeAmbiente = 0;\r\n\t\t} else {\r\n\t\t\tcontribuicaoUmidadeAmbiente = -1;\r\n\t\t}\r\n\t\t\r\n\t\t/*Lendo contribuicao do irrigador no arquivo*/\r\n\t\tfr = new FileReader(getArqContribuicaoUmidade());\r\n\t\tbuffRead = new BufferedReader(fr);\r\n\t\tcontribuicaoUmidadeEquip = Integer.parseInt(buffRead.readLine());\r\n\t\tbuffRead.close();\r\n\r\n\t\treturn umidadeAtual + contribuicaoUmidadeAmbiente + contribuicaoUmidadeEquip;\r\n\t}", "private void testePerformaceUtilizandoPesquisaBinaria(String arquivo) {\n\t\tleituraDo(arquivo);\r\n\t\tleitor.ordenarComSort();\r\n\t\t\r\n\t\t// QUANDO EU EXECUTAR A PESQUISA LINEAR\r\n\t\tlong tempoInicial = System.currentTimeMillis(); \r\n\t\t@SuppressWarnings(\"static-access\")\r\n\t\tint posicaoPalavraPesquisada = algoritimoDePesquisa.pesquisaBinaria(leitor.getConjuntoPalavrasArquivo(), \"casa\");\r\n\t\tlong tempoFinal = System.currentTimeMillis(); \r\n\t\t\r\n\t\t// ENTÃO ELE DEVE ACHAR A PALAVRA CHAVE E DEVO PRINTAR O TEMPO DE EXECUÇÃO NA TELA\r\n\t\tprintResultado(arquivo, \"Binaria\", posicaoPalavraPesquisada,tempoFinal - tempoInicial);\r\n\t}", "public String[] parseToProblema (String rutaFichero) {\n String[] problema = new String[3];\n String fichero = \"\";\n try (BufferedReader reader = new BufferedReader (new FileReader(rutaFichero))) { \n String line = reader.readLine();\n while (line != null) {\n fichero = fichero.concat(line);\n line = reader.readLine();\n }\n } catch (IOException ex) {\n System.out.println(\"ERROR AL LEER EL FICHERO JSON\");\n }\n \n JSONObject obj = new JSONObject (fichero);\n problema[0] = obj.getString(\"INITIAL\");\n problema[1] = obj.getString(\"OBJETIVE\");\n problema[2] = obj.getString(\"MAZE\");\n \n return problema;\n }", "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void validateFile(final boolean isRustica) {\n\t\thayErroresFilas = false;\r\n\t\thayErroresFila = false;\r\n\r\n\t\tcampoMasaCorrectos = true;\r\n\t\tcampoHojaCorrecto = true;\r\n\t\tcampoParecelaCorrecto = true;\r\n\t\tcampoTipoCorrecto = true;\r\n\t\tcampoFechaAltaCorrecto = true;\r\n\t\tcampoFechaBajaCorrecto = true;\r\n\r\n\t\tFile currentDirectory = (File) blackboard.get(ImportarUtils_LCGIII.LAST_IMPORT_DIRECTORY);\r\n\r\n\t\tGeopistaFiltroFicheroFilter filter = new GeopistaFiltroFicheroFilter();\r\n\t\tfilter.addExtension(\"SHP\");\r\n filter.setDescription(\"Shapefiles\");\r\n\t\t\r\n final JFileChooser jfc;\r\n final JTextField jtf;\r\n if (isRustica)\r\n {\r\n \tjfc = fcRustica;\t\r\n \tjtf = this.txtFicheroRustica;\r\n }\r\n\t\telse\r\n\t\t{\r\n\t\t\tjfc = fcUrbana;\r\n\t\t\tjtf = this.txtFicheroUrbana;\r\n\t\t}\r\n\t\t\t\t\r\n\t\t// FILES(*.*)\r\n jfc.setFileFilter(filter);\r\n \tjfc.setAcceptAllFileFilterUsed(false); // QUITA LA OPCION ALL\r\n\t\tjfc.setCurrentDirectory(currentDirectory);\r\n\t\t\r\n\t\tint returnVal = jfc.showOpenDialog(this);\r\n\t\tblackboard.put(ImportarUtils_LCGIII.LAST_IMPORT_DIRECTORY, jfc.getCurrentDirectory());\r\n\r\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION)\r\n\t\t{\r\n\t\t\t// Cargamos el fichero que hemos obtenido\r\n\t\t\tString fichero;\r\n\t\t\tfichero = jfc.getSelectedFile().getPath();\r\n\t\t\tjtf.setText(fichero); // meto el fichero seleccionado\r\n\t\t\t// en el campo\r\n\r\n\t\t\tcadenaTexto = \"<font face=SansSerif size=3>\"\r\n\t\t\t\t+ aplicacion.getI18nString(\"ImportacionComenzar\") + \"<b>\" + \" \"\r\n\t\t\t\t+ jfc.getSelectedFile().getName() + \"</b>\";\r\n\t\t\t\r\n\t\t\tcadenaTexto = cadenaTexto + \"<p>\" + aplicacion.getI18nString(\"OperacionMinutos\") + \" ...</p></font>\";\r\n\t\t\tcadenaTexto = cadenaTexto + aplicacion.getI18nString(\"importar.datos.parcelas\");\r\n\r\n\t\t\tediError.setText(cadenaTexto);\r\n\t\t\tcadenaTexto=\"\";\r\n\r\n\t\t\tfinal TaskMonitorDialog progressDialog = \r\n\t\t\t\tnew TaskMonitorDialog(aplicacion.getMainFrame(), geopistaEditor.getContext().getErrorHandler());\r\n\r\n\t\t\tprogressDialog.setTitle(aplicacion.getI18nString(\"ValidandoDatos\"));\r\n\t\t\tprogressDialog.report(aplicacion.getI18nString(\"ValidandoDatos\"));\r\n\t\t\tprogressDialog.addComponentListener(new ComponentAdapter()\r\n\t\t\t{\r\n\t\t\t\tpublic void componentShown(ComponentEvent e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Wait for the dialog to appear before starting the\r\n\t\t\t\t\t// task. Otherwise\r\n\t\t\t\t\t// the task might possibly finish before the dialog\r\n\t\t\t\t\t// appeared and the\r\n\t\t\t\t\t// dialog would never close. [Jon Aquino]\r\n\t\t\t\t\tnew Thread(new Runnable()\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpublic void run()\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tGeopistaLayer layerParcelas = (GeopistaLayer) blackboard.get(\"capaParcelasInfoReferencia\");\r\n\t\t\t\t\t\t\t\tif (layerParcelas != null)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tgeopistaEditor.getLayerManager().remove(layerParcelas);\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tlayerParcelas = (GeopistaLayer) geopistaEditor.loadData(\r\n\t\t\t\t\t\t\t\t\t\tjfc.getSelectedFile().getAbsolutePath(),\r\n\t\t\t\t\t\t\t\t\t\taplicacion.getI18nString(\"importar.informe.parcelas\"));\r\n\t\t\t\t\t\t\t\tlayerParcelas.setActiva(false);\r\n\t\t\t\t\t\t\t\tlayerParcelas.addStyle(new BasicStyle(new Color(64, 64,64)));\r\n\t\t\t\t\t\t\t\tlayerParcelas.setVisible(false);\r\n\r\n\t\t\t\t\t\t\t\tif (isRustica)\r\n\t\t\t\t\t\t\t\t\tblackboard.put(\"capaParcelasInfoReferencia\", layerParcelas);\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\tblackboard.put(\"capaParcelasInfoReferenciaUrbana\", layerParcelas);\r\n\r\n\t\t\t\t\t\t\t\t// Obtener el esquema\r\n\t\t\t\t\t\t\t\tFeatureSchema esquema = layerParcelas.getFeatureCollectionWrapper().getFeatureSchema();\r\n\r\n\t\t\t\t\t\t\t\t// Localizar los campos\r\n\t\t\t\t\t\t\t\tcampoMasaCorrectos = encontrarCampo(\"MASA\",esquema);\r\n\t\t\t\t\t\t\t\tcampoHojaCorrecto = encontrarCampo(\"HOJA\",esquema);\r\n\t\t\t\t\t\t\t\tcampoParecelaCorrecto = encontrarCampo(\"PARCELA\",esquema);\r\n\t\t\t\t\t\t\t\tcampoTipoCorrecto = encontrarCampo(\"TIPO\",esquema);\r\n\t\t\t\t\t\t\t\tcampoFechaAltaCorrecto = encontrarCampo(\"FECHAALTA\", esquema);\r\n\t\t\t\t\t\t\t\tcampoFechaBajaCorrecto = encontrarCampo(\"FECHABAJA\", esquema);\r\n\r\n\t\t\t\t\t\t\t\tif (campoMasaCorrectos \r\n\t\t\t\t\t\t\t\t\t\t&& campoHojaCorrecto\r\n\t\t\t\t\t\t\t\t\t\t&& campoParecelaCorrecto\r\n\t\t\t\t\t\t\t\t\t\t&& campoTipoCorrecto\r\n\t\t\t\t\t\t\t\t\t\t&& campoFechaAltaCorrecto\r\n\t\t\t\t\t\t\t\t\t\t&& campoFechaBajaCorrecto)\r\n\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\t// A partir de aqui hay que\r\n\t\t\t\t\t\t\t\t\t// verificar que no hay nulos y es\r\n\t\t\t\t\t\t\t\t\t// del tipo correcto los valores.\r\n\t\t\t\t\t\t\t\t\tList listaLayer = layerParcelas.getFeatureCollectionWrapper().getFeatures();\r\n\t\t\t\t\t\t\t\t\tIterator itLayer = listaLayer.iterator();\r\n\r\n\t\t\t\t\t\t\t\t\twhile (itLayer.hasNext())\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif (hayErroresFila)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t// break;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tFeature f = (Feature) itLayer.next();\r\n\t\t\t\t\t\t\t\t\t\tString masa = f.getString(\"MASA\");\r\n\t\t\t\t\t\t\t\t\t\tString hoja = f.getString(\"HOJA\");\r\n\t\t\t\t\t\t\t\t\t\tString parcela = f.getString(\"PARCELA\");\r\n\r\n\t\t\t\t\t\t\t\t\t\tString tipo = f.getString(\"TIPO\");\r\n\t\t\t\t\t\t\t\t\t\t// Comprobamos que no sea nulo y\r\n\t\t\t\t\t\t\t\t\t\t// sea una U o una R\r\n\t\t\t\t\t\t\t\t\t\tif ((!tipo.equals(\"U\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& (!tipo.equals(\"R\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& (!tipo.equals(\"D\"))\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& (!tipo.equals(\"X\")))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t// Solo puede haber una R \r\n\t\t\t\t\t\t\t\t\t\t\t// una U una D o una X.\r\n\t\t\t\t\t\t\t\t\t\t\tcadenaTexto = cadenaTexto\r\n\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.rustico\")\r\n\t\t\t\t\t\t\t\t\t\t\t+ masa\r\n\t\t\t\t\t\t\t\t\t\t\t+ hoja\r\n\t\t\t\t\t\t\t\t\t\t\t+ parcela\r\n\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.fin.rustico\");\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\r\n\t\t\t\t\t\t\t\t\t\t\t// break;\r\n\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\telse if (!isRustica && (tipo.equals(\"R\") || tipo.equals(\"D\") || tipo.equals(\"X\")))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tcadenaTexto = I18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.inicio.parcelario\")\r\n\t\t\t\t\t\t\t\t\t\t\t+ I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.validacion.urbana\") + \r\n\t\t\t\t\t\t\t\t\t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.fin.parcelario\");\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\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\telse if (isRustica && tipo.equals(\"U\"))\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tcadenaTexto = I18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.inicio.parcelario\")\r\n\t\t\t\t\t\t\t\t\t\t\t+ I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.validacion.rustica\") + \r\n\t\t\t\t\t\t\t\t\t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.fin.parcelario\");\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\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\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t// Comprobamos que la fecha\r\n\t\t\t\t\t\t\t\t\t\t\t// que viene sea fecha\r\n\t\t\t\t\t\t\t\t\t\t\ttry\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\t\tDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tDate date = (Date) formatter.parse(f.getString(\"FECHAALTA\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Comprobamos que la\r\n\t\t\t\t\t\t\t\t\t\t\t\t// fecha de baja es nula\r\n\t\t\t\t\t\t\t\t\t\t\t\t// o valida o 9999999\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (f.getString(\"FECHABAJA\").equals(\"99999999\"))\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\t\t// Correcto\r\n\t\t\t\t\t\t\t\t\t\t\t\t\thayErroresFila = false;\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\telse\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\t\tif ((f.getString(\"FECHABAJA\")) == null)\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\t\thayErroresFila = false;\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\telse\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\t\t// Comprobamos que sea una fecha correcta\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry\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\t\tDateFormat formatter1 = new SimpleDateFormat(\"yyyyMMdd\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDate date1 = (Date) formatter1.parse(f.getString(\"FECHABAJA\"));\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\tcatch (Exception excp)\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\t\texcp.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcadenaTexto = cadenaTexto\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.fecha.baja\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ masa\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ hoja\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ parcela\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.fin.rustico\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// break;\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\t//jtf.setBorder(BorderFactory.createLineBorder(Color.GREEN, 2));\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (isRustica)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\trusticaValida = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t\turbanaValida = true;\r\n\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\tcatch (Exception exc)\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\t\t// En la fecha de alta\r\n\t\t\t\t\t\t\t\t\t\t\t\tcadenaTexto = cadenaTexto\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.fecha.alta.validacion\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ masa\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ hoja\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ parcela\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ aplicacion.getI18nString(\"importar.informe.parcelas.fin.rustico\");\r\n\t\t\t\t\t\t\t\t\t\t\t\texc.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\t\t\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\t// break;\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\t\r\n\t\t\t\t\t\t\t\t\t\t\t//Se comprueba si la geometría es de tipo polygon y no es empty (únicas válidas en la capa parcelas)\r\n\t\t\t\t\t\t\t\t\t\t\tif (!(f.getGeometry() instanceof Polygon)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t|| f.getGeometry().isEmpty())\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\tcadenaTexto = I18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.inicio.parcelario\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t+ I18N.get(\"ImportadorParcelas\", \"importar.informacion.referencia.validacion.geometria\") + \r\n\t\t\t\t\t\t\t\t\t\t\t\tI18N.get(\"ImportadorParcelas\", \"importar.informe.parcelas.error.fin.parcelario\");\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\thayErroresFila = true;\r\n\t\t\t\t\t\t\t\t\t\t\t\thayErroresFilas = true;\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}\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\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t// Alguno de los campos no están\r\n\t\t\t\t\t\t\t\t\t// definidos\r\n\t\t\t\t\t\t\t\t\t// JOptionPane.showMessageDialog(this,aplicacion.getI18nString(\"importar.informe.parcelas.algun.campo\"));\r\n\t\t\t\t\t\t\t\t\tcadenaTexto += aplicacion.getI18nString(\"importar.informacion.ficheros.no.correctos\");\r\n\t\t\t\t\t\t\t\t\thayErroresFilas = true;\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\tif (isRustica)\r\n\t\t\t\t\t\t\t\t\t\trusticaValida = false;\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\turbanaValida = false;\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\tcatch (Exception e)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\thayErroresFilas = true;\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\tfinally\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tprogressDialog.setVisible(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).start();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tGUIUtil.centreOnWindow(progressDialog);\r\n\t\t\tprogressDialog.setVisible(true);\r\n\r\n\t\t\tif (hayErroresFilas)\r\n\t\t\t{\r\n\t\t\t\tjtf.setBorder(BorderFactory.createLineBorder(Color.RED, 2));\r\n\t\t\t\tcadenaTexto = cadenaTexto + aplicacion.getI18nString(\"validacion.finalizada\");\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tjtf.setBorder(BorderFactory.createLineBorder(Color.GREEN, 2));\r\n\t\t\t\tcadenaTexto = cadenaTexto + aplicacion.getI18nString(\"importar.informe.parcelas.fichero.correcto\")\r\n\t\t\t\t+ aplicacion.getI18nString(\"validacion.finalizada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tediError.setText(cadenaTexto);\r\n\t\t\twizardContext.inputChanged();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tlong totalTiempo;\n long tiempoInicio;\n\t\t\n tiempoInicio = System.currentTimeMillis();\n \n Archivos arch = new Archivos();\n \n String RutaArchivo = \"/home/ochacon/pan-plagiarism-corpus-2010/IndiceDoc.txt\"; //RUTA SERVIDOR\n //String RutaArchivo = \"C:/Users/oschacon/Desktop/IndiceDoc.txt\"; //RUTA WINDOWS TRABAJO\n //String RutaArchivo = \"/mnt/c/Users/oschacon/Desktop/IndiceDoc.txt\"; //RUTA BASH WINDOWS TRABAJO\n //String RutaArchivo = \"/Users/marcusfenix/Documents/IndiceDoc.txt\"; //RUTA MAC\n File ArchivoIn = new File(RutaArchivo);\n \n if(ArchivoIn.exists() && ArchivoIn.isFile())\n {\n \tString RutaArchivoDestino = \"/home/ochacon/pan-plagiarism-corpus-2010/Objeto.obj\";\n \tFile ArchivoOut = new File(RutaArchivoDestino);\n \tif(ArchivoOut.exists())\n \t{\n \t\t//ArchivoOut.delete();\n \t}\n \t/*BufferedWriter bw;\n\t\t\ttry {\n\t\t\t\tbw = new BufferedWriter(new FileWriter(ArchivoOut));\n\t\t\t\t//bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(nombreArchivoDestino), \"UTF8\"));\n\t\t\t\t//bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(nombreArchivo)));\n\t\t\t\tbw.close();\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\tarch.LeerArchivos(ArchivoIn);\n }\n else if(ArchivoIn.isDirectory())\n {\n \tSystem.out.println(\"La ruta corresponde a un Directorio.\");\n }\n else\n {\n \tSystem.out.println(\"El archivo en la ruta especificada no existe.\");\n }\n \n totalTiempo = System.currentTimeMillis() - tiempoInicio;\n\t\t\n\t\tSystem.out.println(\"Tiempo demorado: \" + (float) totalTiempo/1000 + \" Segundos.\");\n\t}", "public void imprimirResultados(int fo,File archivoResultados,Ruteo r){\n\t\tint numo=0;\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tnumo+=ruta.obras.size()-2;\n\t\t}\n\t\tdistanciaTotalRecorrida=darDistanciaTotal(r);\n\t\ttiempoComputacionalTotal=darTiempoTotal();\n\t\ttry{\n\t\tFileWriter fw = new FileWriter(archivoResultados.getAbsoluteFile());\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\" GRASP + SET COVERING \");\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tif(fo==FO1){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar Costos\");\n\t\t}else if(fo==FO2){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el maximo tiempo de las rutas\");\n\t\t}else if(fo==FO3){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el numero de rutas\");\t\n\t\t}else if(fo==FO4){\n\t\t\tbw.write(\"La funcion objetivo usada fue: Minimizar el tiempo\");\n\t\t}\n\t\tbw.newLine();\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\n\t\tbw.write(\"Distancia total recorrida por todos los interventores: \"+distanciaTotalRecorrida);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero obras: \"+numo);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional de GRASP + Set Covering: \"+tiempoComputacionalTotal);\n\t\tbw.newLine();\n\t\tbw.write(\"Numero de iteraciones de GRASP: \"+k);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional promedio de una iteración de GRASP: \"+tiempoComputacionalIterGrasp);\n\t\tbw.newLine();\n\t\tbw.write(\"Tiempo computacional del Set Covering: \"+tiempoComputacionalSetCovering);\n\t\tbw.newLine();\t\n\t\tbw.write(\"FO: \"+objval);\n\t\tbw.newLine();\t\n\t\tbw.write(\"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* RUTAS *********************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tfor(int i=0;i<r.rutas.size();i++){\n\t\t\tRuta ruta=r.rutas.get(i);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\"---------------INFORMACION RUTA \"+(i+1)+\":\");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Id: \"+(i+1));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de recorrido: \"+ruta.diasRecorrido/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Dias de descanso: \"+ruta.diasDescanso/24.0);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Cantidad de obras: \"+(ruta.obras.size()-2));\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por recorrido: \"+ruta.costoRecorrido);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * Costo por descanso: \"+ruta.costoDescanso);\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" * OBRAS: \");\n\t\t\tbw.newLine();\t\n\t\t\tbw.write(\" \"+ruta.obras.toString());\n\t\t}\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"************************* FIN RUTAS *****************************\");\n\t\tbw.newLine();\t\n\t\tbw.write(\"*****************************************************************\");\n\t\tbw.close();\n\t\t\n\t\tJOptionPane.showMessageDialog (null, \"El archivo se guardo con los parametros satisfactoriamente.\", \"Archivo Guardado\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception ee){\n\t\t\tJOptionPane.showMessageDialog (null, \"No se llevó a cabo la simulación.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t}", "public static int leerPeliculas(String[] peliculas,String[] tipoPeliculas,double[]recaudaciones,int [] salas,String [] funciones) throws IOException{\r\n File file = new File(\"peliculas.txt\");\r\n Scanner arch2 = new Scanner(file); \r\n int i = 0;\r\n while ( arch2.hasNextLine()){\r\n String linea = arch2.nextLine();\r\n String [] partes = linea.split(\",\");\r\n String pelicula = partes[0];\r\n String t = partes[1];\r\n double rec = Double.parseDouble(partes[2]);\r\n for(int j = 3;j<partes.length;j+=2){\r\n peliculas[i]= pelicula;\r\n tipoPeliculas[i] = t;\r\n recaudaciones[i] = rec;\r\n int n = Integer.parseInt(partes[j]);\r\n String f = partes[j+1];\r\n salas[i] = n;\r\n funciones[i] = f;\r\n i++;\r\n \r\n }\r\n \r\n i ++; \r\n }\r\n arch2.close(); \r\n return i;\r\n }", "public static void main(String[] args) {\n \n String palabaras[], palabraSelected=\"\";\n char juego[];\n char letra; \n char seguir; \n \n \n //puede volver a jugar.\n //con las palabras que no ha salido. Gastando palabras\n //en caso de no existir palabra terminar el juego e indicar el mensaje respectivo.\n\n\n do {\n aciertos=0; errores=0;\n bandera=false;\n\n palabaras= leerArchivo();\n \n if(palabaras.length==0){\n System.out.println(\"No se puede jugar porque no hay palabras\");\n break; \n }\n\n \n \n String nombre= palabaras[0].substring(0,18).trim().toUpperCase();\n\n String pa= String.format(\"%1$-20s\", \"walter\");\n System.out.println(pa.length());\n\n // escribirLineaArchivo(palabaras);\n \n //obtenerPalabra\n //random para obtener la palabara\n \n palabraSelected= obtenerPalabra(palabaras);\n //palabraSelected= palabraSelected.toUpperCase();\n \n //obtnerVectorJuego\n //instacia del venctor juego con el tamaño de la palabra seleccionada\n juego= obtenerVectorJuego(palabraSelected);\n \n /*//1 manera apata de llenar el vector juego con la palabra seleccinada\n for(int i=0; i<palabraSelected.length(); i++){\n \n juego[i]=palabraSelected.charAt(i);\n \n }\n */\n \n //segunda manera\n\n /* if(!palabraSelected.equals(\"fdd\")){\n\n\n }*/\n \n System.out.println(\"BIENVENIDO AL JUEGO DEL AHORCADO..\"); \n \n do {\n \n bandera=false;\n //imprimirJuego\n imprimirJuego(palabraSelected, juego);\n \n letra = solicitarLetra();\n \n //validarLetra\n validarLetra(letra, juego);\n \n //imprimirResultado\n imprimirResultado();\n \n \n } while (aciertos!=juego.length && errores!=7);\n \n \n //imprimirResultadoFinal\n imprimirResultadoFinal(juego, palabraSelected);\n\n\n\n System.out.println(\"Desea volver a jugar(S/N)? \"); \n seguir= scan.next().toUpperCase().charAt(0);\n \n eliminarPalabraArchivo(palabraSelected, palabaras);\n \n\n\n\n\n } while (seguir=='S');\n }", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "public static void main (String[] args) {\n\t\t\r\n\t\tFile archivo = new File(RUTA_TEMP + args[0]);\r\n\t\t\r\n\t\t//A la variable x le damos el valor del tamaņo del archivo\r\n\t\t\r\n\t\tlong x = archivo.length();\r\n\t\t\r\n\t\t//Hacemos conversiones\r\n\t\t\r\n\t\tlong conversionKB = x/1024;\r\n\t\tlong conversionMB = (x/1024)/1024;\r\n\t\tSystem.out.println(x + \" B\");\r\n\t\tSystem.out.println(conversionKB + \" KB\");\r\n\t\tSystem.out.println(conversionMB + \" MB\");\r\n\t\t\r\n\t}", "@Test\n\tpublic void testListarArquivoComRegistro() throws IOException\n\t{\n\t\t// 1) criar um arquivo de dados com 1 registro\n\t\tString nomeArquivo = \"dados.txt\";\n\t\tnew File(nomeArquivo).createNewFile();\n\t\tFileOutputStream fos = \n\t\t\t\tnew FileOutputStream(nomeArquivo);\n\t\tfos.write(\n\t\t\t\"001;Josť das Couves;BH;MG;2500\\n\".getBytes());\n\t\tfos.close();\n\t\t// 2) criar o processador de arq. seq.\n\t\tProcessadorDeArquivoSequencial pas = \n\t\t\tnew ProcessadorDeArquivoSequencial(nomeArquivo);\n\t\t// 3) listar os registros do arquivo\n\t\tList<Registro> lista = pas.listar();\n\t\t// 4) verificar quantidade de registros\n\t\tAssert.assertEquals(1, lista.size());\n\t\t// 5) excluir o arquivo criado\n\t\tnew File(nomeArquivo).delete();\n\t\t\n\t}", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "public boolean puedeEnviar(){\n\t\tDate hoy = new Date();\n\t\tint transcurridos = 0;\n\t\tif(fechaUltimaModificacion != null){\n\t\t\ttranscurridos = obtener_dias_entre_2_fechas(fechaUltimaModificacion, hoy);\n\t\t\tif(transcurridos > 3)\n\t\t\t\treturn false;\n\t\t}else if(fechaCreacion != null){\n\t\t\ttranscurridos = obtener_dias_entre_2_fechas(fechaCreacion, hoy);\n\t\t\tif(transcurridos > 3)\n\t\t\t\treturn false;\n\t\t} \n\t\treturn true;\t\n\t}", "private static void m133350k() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"filesToDelete.name\");\n if (!C7634n.m23723c(name, \"-concat-v\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"filesToDelete.name\");\n if (!C7634n.m23723c(name2, \"-concat-a\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"filesToDelete.name\");\n if (!C7634n.m23723c(name3, \"_synthetise\", false)) {\n }\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"filesToDelete.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n file2.delete();\n }\n }\n }\n }", "private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "public boolean Info_repetida(String nombre_archivo, String nombre_dis_peli) {\r\n boolean disponible = true;\r\n String line;\r\n String[] info;\r\n try (BufferedReader br = new BufferedReader(new FileReader(nombre_archivo))) {\r\n while ((line = br.readLine()) != null) {\r\n info = line.split(\";\");\r\n if (info[0].equals(nombre_dis_peli)) {\r\n disponible = false;\r\n }\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"Se despicho\" + ex);\r\n }\r\n return disponible;\r\n }", "public boolean cortarMus(Jugador j);", "private int pasarMilisegundoASegundo( long milisegundos )\n {\n return (int)(milisegundos/MILISEGUNDOS_EN_SEGUNDO);\n }", "public void ejercicio02() {\r\n\t\tcabecera(\"02\", \"Bisiesto no bisiesto\");\r\n\t\t// Inicio modificacion\r\n\t\t\r\n\t\tSystem.out.println(\"Introduce un año\");\r\n\r\n\t\tint anyo = Teclado.readInteger();\r\n\r\n\t\tif (anyo%400==0 || (anyo%4==0 && anyo%100!=0)) {\r\n\t\t\tSystem.out.println(anyo + \" es un año bisiesto\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(anyo + \" no es un año bisiesto\");\r\n\t\t}\r\n\r\n\t\t// Fin modificacion\r\n\t}", "public static boolean comprobarDatosGuardados(){\n boolean aDevolver = true;\n Properties propiedades = new Properties();\n try {\n propiedades.load(new FileReader(\"guardado.props\"));\n String ubicacion = propiedades.getProperty(\"ubicacion\");\n File fichero = new File(ubicacion);\n FileInputStream input = new FileInputStream(ubicacion);\n } catch (IOException e) {\n aDevolver = false;\n System.out.println(\"No se pudo encontrar el archivo de propiedades\");\n }\n\n return aDevolver;\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 static String cargarPreguntas(String fileName){\n String line = null; \n try {\n //Para lectura del archivo\n FileReader fileReader =\n new FileReader(fileName); \n \n //BufferedReader para optimización de recursos\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n \n// Lee línea por línea, verifica que tengan algo de texto\n while(((line = bufferedReader.readLine()) != null)) {\n if ((line.length() > 0) && !(line.startsWith(\"//\"))){\n// Para ignorar las líneas de comentario en el archivo de texto\n //if (!(line.startsWith(\"//\"))){\n// Crea una lista de Strings para cada línea a evaluar\n List<String> listaLinea = new ArrayList<>(Arrays.asList(line.split(\";\")));\n// Impresión de prueba del ArrayList(descomentar)\n// System.out.println(listaLinea);\n \n //Obtiene lista de Respuestas, en tipo String\n List <String >resp = listaLinea.subList(1,listaLinea.size());\n //Creación de Respuestas (bajo el debido constructor) en un HashSet\n HashSet<Respuesta> respuestas = new HashSet(); \n for (int i = 0; i < resp.size();i++){\n if (i == 0){\n //Identifica la respuesta correcta\n respuestas.add(new Respuesta(resp.get(i), true));\n }\n else{\n //Identifica las respuestas incorrectas\n respuestas.add(new Respuesta(resp.get(i), false));\n } \n }\n //System.out.println(resp); Impresión de prueba (descomentar)\n \n //Agrega Preguntas y Respuestas a nuestro HashSet y HashMap\n Almacenamiento.getPreguntas().add(new Pregunta(listaLinea.get(0)));\n Almacenamiento.getMapaPR().put(new Pregunta(listaLinea.get(0)), respuestas); \n //}\n }\n }\n //Impresiones de prueba, descomentar.\n// for(Pregunta p: Almacenamiento.getPreguntas()){\n// System.out.println(p.toString()); \n// } \n// Almacenamiento.getMapaPR().forEach((k,v)-> System.out.println(k+\", \"+v));\n \n // Siempre cerrar archivo, para optimizar recursos\n bufferedReader.close(); \n }\n //Detalle de exception impreso en consola\n catch(FileNotFoundException ex) {\n System.out.println(\n \"No se pudo abrir archivo '\" +\n fileName + \"'\"); \n }\n //Detalle de exception impreso en consola\n catch(IOException ex) {\n System.out.println(\n \"Error leyendo archivo '\"\n + fileName + \"'\"); \n }\n return null;\n }", "public static String inputFileName( String estensione) {\n\t\tString fileName=LeggiStringhe.leggiStringa(INSERISCI_NOME_FILE);\n\t\tif (!hasEstensione(fileName)) { // if 1\n\t\t\tif (estensione.charAt(0) !=PUNTO) { //if 2\n estensione=PUNTO+estensione; \n\t\t\t}// if2\n\t\t\tfileName=fileName+estensione;\n\t\t}// if2\n\t\t\n\t\treturn fileName;\n\t}", "public void cadastrarOfertasQuad1(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q1.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine();\n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(1);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas1LazyModel = null;\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n } \n }", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "public void seleccionarArchivo(){\n JFileChooser j= new JFileChooser();\r\n FileNameExtensionFilter fi= new FileNameExtensionFilter(\"pdf\",\"pdf\");\r\n j.setFileFilter(fi);\r\n int se = j.showOpenDialog(this);\r\n if(se==0){\r\n this.txtCurriculum.setText(\"\"+j.getSelectedFile().getName());\r\n ruta_archivo=j.getSelectedFile().getAbsolutePath();\r\n }else{}\r\n }", "public boolean asignarMascota(Perro perro){\n boolean bandera = false;\n Persona[] miembros_familia;\n familia_asignada = \"\";\n\n while (!bandera){\n //Recorrer todo el arreglo de Familia\n for (int i = 0; i <= numero_familias; i++){\n //Obtener los miembros de la familia actual \n miembros_familia = familias[i].getMiembros();\n\n //Recorrer cada miembro del arreglo de Persona\n for (int j = 0; j < miembros_familia.length; j++){ \n //Obtener edad del miembro\n int edad = miembros_familia[j].getEdad();\n\n //Verificar si el miembro al que se analiza puede tener la mascota y si esa familia puede tener perro\n if(verificarMascota(perro, edad)){\n if (familias[i].getNumeroMascotas() < 4){\n bandera = true;\n familias[i].setNumeroMascotas();\n familia_asignada = familias[i].getApellido();\n j = miembros_familia.length;\n i = familias.length;\n }\n }\n else{\n j = miembros_familia.length;\n }\n }\n }\n break;\n }\n return bandera;\n }" ]
[ "0.65007484", "0.6310286", "0.6069047", "0.5952033", "0.5940649", "0.5871564", "0.5833821", "0.58209693", "0.5813769", "0.5695036", "0.5694484", "0.56590146", "0.5637353", "0.56351984", "0.5625879", "0.5622713", "0.5622287", "0.55931777", "0.5590095", "0.55792546", "0.5576914", "0.5574967", "0.5573904", "0.5572011", "0.55684006", "0.55384034", "0.5528195", "0.5524019", "0.55027187", "0.5476268", "0.5475601", "0.54699033", "0.5445822", "0.5439195", "0.5424167", "0.5416654", "0.5416634", "0.5412991", "0.5410077", "0.53997123", "0.5383197", "0.5379775", "0.53790873", "0.5366621", "0.5347024", "0.53456455", "0.53434837", "0.53414184", "0.53368443", "0.5331001", "0.5326037", "0.532542", "0.5322661", "0.53212607", "0.531748", "0.53162915", "0.5312063", "0.5302383", "0.5301937", "0.5291178", "0.5272484", "0.5269423", "0.5264083", "0.5263696", "0.52512234", "0.5247609", "0.5246767", "0.52461535", "0.5242213", "0.52397317", "0.5239253", "0.52256685", "0.52253616", "0.5215226", "0.5213447", "0.5211797", "0.5211775", "0.52017856", "0.5196556", "0.51962394", "0.51827854", "0.51781243", "0.5175798", "0.5165143", "0.51573354", "0.5150329", "0.5148682", "0.514403", "0.5137325", "0.51360756", "0.51269126", "0.5125275", "0.5122989", "0.51171905", "0.5115712", "0.51118207", "0.51062286", "0.5105296", "0.5104767", "0.51022786" ]
0.53775126
43
Muestra todos los jugadores junto con sus fichas y sus puntos
public static void tablaPuntos(Mano[] jug){ StringBuilder toret= new StringBuilder(); for (int i = 0; i < jug.length; i++) { toret.append(jug[i].getNombre()); toret.append(": \n"); toret.append(jug[i]); toret.append("\nPuntos: "); toret.append(jug[i].getPuntuacion()); toret.append("\n"); } System.out.println(toret.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<Puntaje> getListadoPuntajes(String jugador)\n {\n ArrayList<Puntaje> listado = new ArrayList<>();\n String rutaPuntaje = \"src/recursos/puntaje.txt\"; \n try \n {\n File archivo = new File(rutaPuntaje);\n if(!archivo.exists())\n return listado;\n\n listado = listadoPuntajes(rutaPuntaje,jugador); \n }\n catch(Exception ex)\n {\n return listado;\n } \n return listado; \n }", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\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 }", "public void getListaArchivos() {\n\n File rutaAudio = new File(Environment.getExternalStorageDirectory() + \"/RecordedAudio/\");\n File[] archivosAudio = rutaAudio.listFiles();\n\n for (int i = 0; i < archivosAudio.length; i++) {\n File file = archivosAudio[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n\n File rutaVideos = new File(Environment.getExternalStorageDirectory() + \"/RecordedVideo/\");\n File[] archivosVideo = rutaVideos.listFiles();\n\n for (int i = 0; i < archivosVideo.length; i++) {\n File file = archivosVideo[i];\n listadoArchivos.add(new Archivo(file.getName()));\n }\n }", "public void processaArquivos() throws Exception\n\t{\n\t\t/* Busca o nome do diretorio no arquivo de propriedades */\n\t\tString nomeDiretorio = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\tFile dirArquivos = new File(nomeDiretorio);\n\t\tif (!dirArquivos.isDirectory())\n\t\t\tthrow new IOException(\"Diretorio invalido... \"+nomeDiretorio);\n\n\t\t/* Busca os arquivos das ordems (arquivos com informacoes de caixa) */\n\t\tFileFilter filtro = new OrdemVoucherFileFilter(getPropriedade(\"ordemVoucher.patternArquivos\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t getPropriedade(\"ordemVoucher.extensaoArquivos\"));\n\t\tFile arquivosOrdem[] = dirArquivos.listFiles(filtro);\n\t\t\n\t\t/* Faz a varredura dos arquivos de ordem de voucher encontrados */\n\t\tfor (int i=0; i < arquivosOrdem.length; i++)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Processando ordem:\"+arquivosOrdem[i].getName());\n\t\t\t\tif (existeArquivos(arquivosOrdem[i]))\n\t\t\t\t{\n\t\t\t\t\t// Realiza a concatenacao dos arquivos da ordem agrupando-as por item\n\t\t\t\t\t// e entao processa-os para a criptografia e compactacao antes de \n\t\t\t\t\t// envia-los ao GPP\n\t\t\t\t\tString arqAProcessar[] = concatenaArquivos(arquivosOrdem[i]);\n\t\t\t\t\t\n\t\t\t\t\t// Para cada arquivo encontrado de ordem de criacao de voucher\n\t\t\t\t\t// faz se a criptografia dos arquivos de caixa correspondentes\n\t\t\t\t\t// para entao compacta-los em um unico arquivo para posteriormente\n\t\t\t\t\t// ser enviado ao GPP juntamente com este arquivo de capa\n\t\t\t\t\t// da ordem de criacao do voucher\n\t\t\t\t\tString arquivoCompactado = criptografaECompactaOrdem(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\n\t\t\t\t\t// Caso ao criar os arquivos criptografados e compacta-los aconteca algum\n\t\t\t\t\t// erro entao o retorno do metodo e um nome de arquivo nulo. Se este nome\n\t\t\t\t\t// for nulo, entao nada e executado com esta ordem passando entao para a\n\t\t\t\t\t// proxima\n\t\t\t\t\tif (arquivoCompactado != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Envia o arquivo do cabecalho da ordem \n\t\t\t\t\t\t// e em seguida envia o arquivo compactado\n\t\t\t\t\t\tenviaArquivoParaGPP(arquivosOrdem[i]);\n\t\t\t\t\t\tenviaArquivoParaGPP(new File(arquivoCompactado));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Remove os arquivos criptografados e compactados que foram enviados\n\t\t\t\t\t\t// para o GPP\n\t\t\t\t\t\tremoveArquivos(arquivosOrdem[i],arqAProcessar);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Move os arquivos de origem das informacoes de voucher para um diretorio\n\t\t\t\t\t\t// historico desses arquivos\n\t\t\t\t\t\t// Obs: Os arquivos concatenados foram removidos do diretorio\n\t\t\t\t\t\tmoveArquivos(arquivosOrdem[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Erro ao processar ordem:\"+arquivosOrdem[i].getName()+\" Erro:\"+e);\n\t\t\t}\n\t\t}\n\t}", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "private String[] concatenaArquivos(File ordem) throws Exception\n\t{\n\t\t// Cria referencia para os arquivos que serao retornados\n\t\t// apos o processamento\n\t\tCollection arquivosAposConcatenacao = new LinkedList();\n\t\t\n\t\t// Busca o objeto VoucherOrdem contendo os dados da ordem\n\t\t// que foram lidos a partir do arquivo cabecalho da ordem\n\t\tArquivoPedidoVoucherParser ordemParser = new ArquivoPedidoVoucherParser();\n\t\tVoucherOrdem ordemVoucher = ordemParser.parse(ordem);\n\t\t\n\t\t// Busca agora todas os nomes de arquivos de caixa\n\t\t// existentes gravados tambem no arquivo cabecalho\n\t\tString arquivosCaixa[] = getNomeArquivosCaixa(ordem);\n\t\tString dirOrigem = getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\t\t\n\t\t// Faz a iteracao nos itens da ordem para entao criar um arquivo \n\t\t// para cada item no formato PrintOrder#[NUMORDEM]_[NUMITEM].dat\n\t\t// e para cada item entao identifica quais arquivos serao concatenados\n\t\tint realNumItem \t\t= 1;\n\t\tlong qtdeSomaCartoes \t= 0;\n\t\tboolean deveConcatenar \t= true;\n\t\tfor (Iterator i=ordemVoucher.getItensOrdem().iterator(); i.hasNext();)\n\t\t{\n\t\t\tVoucherOrdemItem itemOrdem = (VoucherOrdemItem)i.next();\n\t\t\t// O numero do item no sistema GPP comeca a partir do numero zero (0)\n\t\t\t// portanto como na Tecnomen e criado com item 1 o valor e decrescido de um\n\t\t\tlong qtdCartoes = procBatchPOA.getQtdeCartoes(ordemVoucher.getNumeroOrdem(),realNumItem-1);//(int)itemOrdem.getNumItem()-1);\n\t\t\tqtdeSomaCartoes += itemOrdem.getQtdeCartoes();\n\t\t\tif (qtdCartoes != 0 && deveConcatenar)\n\t\t\t{\n\t\t\t\titemOrdem.setQtdeCartoes( qtdCartoes );\n\t\t\t\tFile arquivoItem = new File(getNomeArquivoItem(ordem,realNumItem));//itemOrdem.getNumItem()));\n\t\t\t\tFileOutputStream itemStream = new FileOutputStream(arquivoItem);\n\t\t\t\tif (itemStream != null)\n\t\t\t\t{\n\t\t\t\t\t// Identifica quais sao os arquivos que devem ser concatenados\n\t\t\t\t\t// para este item. Para cada arquivo encontrado , este e lido\n\t\t\t\t\t// e entao concatenado ao arquivo do item que foi criado\n\t\t\t\t\tString caixasDoItem[] = getArquivosCaixaPorItem(ordemVoucher,itemOrdem,arquivosCaixa);\n\t\t\t\t\t// Atualiza informacoes de numeracao de lote do pedido no GPP\n\t\t\t\t\tatualizaNumeracaoLote(ordemVoucher.getNumeroOrdem(),realNumItem,caixasDoItem);//itemOrdem.getNumItem(),caixasDoItem);\n\t\t\t\t\tfor (int j=0; j < caixasDoItem.length; j++)\n\t\t\t\t\t\titemStream.write(getStreamArquivo(new File(dirOrigem+\n\t\t\t\t\t\t System.getProperty(\"file.separator\")+\n\t\t\t\t\t\t caixasDoItem[j])));\n\t\n\t\t\t\t\titemStream.close();\n\t\t\t\t\tarquivosAposConcatenacao.add(arquivoItem.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\titemOrdem.setQtdeCartoes(0);\n\n\t\t\tdeveConcatenar = (qtdCartoes == qtdeSomaCartoes);\n\t\t\tif (qtdCartoes == qtdeSomaCartoes)\n\t\t\t{\n\t\t\t\tqtdeSomaCartoes = 0;\n\t\t\t\trealNumItem++;\n\t\t\t}\n\t\t}\n\t\treturn (String[])arquivosAposConcatenacao.toArray(new String[0]);\n\t}", "public static void main(String[] args) throws Exception {\n \n\n\t File pasta = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\phishing\");\n\t \n\t File[] arquivos = pasta.listFiles();\n\t \n\t \n\t for (File file : arquivos) {\n\t\t System.out.println(file.getName()+ \"\tphishing\");\n\t }\n\t \n\t File pasta1 = new File(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\not_phishing\");\n\t \n\t File[] arquivos1 = pasta1.listFiles();\n\t \n\t \n\t for (File file : arquivos1) {\n\t\t if(!file.isDirectory()){\n\t\t\t System.out.println(file.getName()+ \"\tnot_phishing\"); \n\t\t }\t\t \n\t }\n\t \n//\t FileReader m = new FileReader(\"C:\\\\Users\\\\Álvaro\\\\workspace\\\\ProjetoTCC\\\\src\\\\data\\\\dir\\\\training\\\\EMAIL000240\");\n//\n//\t\tStringBuffer text = new StringBuffer();\n//\t\tint l;\n//\t\twhile ((l = m.read()) != -1) {\n//\t\t\ttext.append((char) l);\n//\t\t}\n//\t\tm.close();\n//\t\t\n//\t\tString texto = text.toString();\n//\t\t\n//\t\tSystem.out.println(texto);\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tSystem.out.println(\"############################################### NOVO TEXTO ##############################################\");\n//\t\tSystem.out.println(\"#########################################################################################################\");\n//\t\tString texto1 = texto.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"<.*?>\", \"\");\n//\t\ttexto1 = texto1.replaceAll(\"[0-9]\", \"\");\n//\t\tSystem.out.println(texto1);\n\t \n\t\t\n\t\t \n\t \n\t \n }", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public static void main(String[] args) {\n\r\n String contenido = \"\";\r\n\r\n try {\r\n FileReader in = new FileReader(\"./src/fichero_prueba.txt\");\r\n int c = in.read();\r\n\r\n while (c != -1) {\r\n contenido += (char) c;\r\n c = in.read();\r\n }\r\n in.close();\r\n } catch (IOException e){\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n System.out.println(contenido);\r\n\r\n\r\n //LEER MENSAJE POR BLOQUES\r\n\r\n String contenido2 = \"\";\r\n\r\n try {\r\n BufferedReader inb = new BufferedReader(new FileReader(\"./src/fichero_prueba.txt\"));\r\n\r\n String linea = inb.readLine();\r\n while (linea!=null){\r\n contenido2 += linea+\"\\n\";\r\n linea = inb.readLine();\r\n }\r\n inb.close();\r\n } catch (IOException e){\r\n e.printStackTrace();\r\n }\r\n System.out.println(contenido2);\r\n\r\n }", "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\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\r\n\t\t\t\t}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "public void uploadFile() throws IOException {\n\n\t\t// Provera da li ima jos mesta za upload (samo za standard korisnike -\n\t\t// ogranicenje je 4 fajla)\n\t\tfor (User u : Server.dataBase)\n\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\tif (u.getTipKorisnika().toString().equals(\"STANDARD\"))\n\t\t\t\t\tif (u.getBrojFajlova() > 3)\n\t\t\t\t\t\tpom = \"***ogranicenje\";\n\n\t\tif (pom.equals(\"***ogranicenje\")) {\n\t\t\tclientOutput.println(\"Dostignut je maksimalan broj fajlova!\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do fajla koji zelite da upload-ujete, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tclientOutput.println(\n\t\t\t\t\t\">>> Unesite relativnu putanju do mesta gde zelite da upload-ujete fajl, zajedno sa imenom fajla: \");\n\t\t\tuserInput = clientInput.readLine();\n\n\t\t\tuserInput = \"drive/\" + username + \"/\" + userInput;\n\t\t\tdestinacija = new File(userInput);\n\t\t\tdestinacija.createNewFile();\n\n\t\t\tif (destinacija.getName().endsWith(\".txt\")) {\n\t\t\t\tPrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(userInput)));\n\t\t\t\tpom = null;\n\n\t\t\t\tdo {\n\t\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\t\tif (userInput.equals(\"***kraj\"))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (pom != null)\n\t\t\t\t\t\tpw.print(\"\\n\");\n\t\t\t\t\tpw.print(userInput);\n\t\t\t\t\tpom = \"upis\";\n\t\t\t\t\tclientOutput.println(userInput);\n\t\t\t\t} while (true);\n\t\t\t\tpw.close();\n\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t} else {\n\t\t\t\tuserInput = clientInput.readLine();\n\t\t\t\ttry {\n\t\t\t\t\tFileOutputStream fOut = new FileOutputStream(destinacija);\n\t\t\t\t\tbyte[] b = Base64.getDecoder().decode(userInput);\n\t\t\t\t\tfOut.write(b);\n\t\t\t\t\tfOut.close();\n\t\t\t\t\tfor (User u : Server.dataBase)\n\t\t\t\t\t\tif (username.equals(u.getUsername()))\n\t\t\t\t\t\t\tu.setBrojFajlova(u.getBrojFajlova() + 1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private String[] filtrarArchivosTmp(String[] listadoImagenes) {\n\t\tString extensionArchivo;\n\t\tint contadorArchivosNoTmp = 0;\n\t\tfor(String s: listadoImagenes) {\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {contadorArchivosNoTmp++;}\n\t\t}\n\t\t\n\t\t//Armo nuevo array filtrando archivos .tmp\n\t\tString listadoImagenesSinTmp[] = new String[contadorArchivosNoTmp];\n\t\tint contador = 0;\n\t\tfor(int i=0 ; i<listadoImagenes.length ; i++) {\n\t\t\tString s = listadoImagenes[i];\n\t\t\textensionArchivo = s.substring(s.length()-3,s.length());\n\t\t\tif(!extensionArchivo.equals(\"tmp\")) {\n\t\t\t\tlistadoImagenesSinTmp[contador] = listadoImagenes[i];\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listadoImagenesSinTmp;\n\t}", "public static void topicosMaisUtilizados() throws IOException {\n\n clearScreen();\n int contador = 0;\n int maximo = 0;\n String nomes[] = new String[1000];\n int mensagens[] = new int[1000];\n int i = 0, j = 0;\n int temp = 0; \n String tempo=\"\";\n int cont = 0;\n\n x = new Scanner(new File(\"Topicos.txt\"));\n \n while(x.hasNext()){\n\n String a = x.next();\n String b = x.next();\n String c = x.next();\n cont++;\n\n String line = \"\";\n\n File topico = new File(a+\".txt\");\n Scanner top = new Scanner(new File(a+\".txt\"));\n\n y = new Scanner(new File(a+\".txt\"));\n\n BufferedReader read = new BufferedReader(new FileReader(topico)); \n\n while((line = read.readLine()) != null)\n {\n contador++; // contar quantas mensagens o topico tem\n }\n\n mensagens[i] = contador; // atribuir a um array o numero de mensagens e a outro o nome dos topicos\n nomes[i] = a;\n contador = 0;\n i++;\n }\n for(i = 0; i < 100; i++){\n for(j = i+1; j < 100; j++){\n if(mensagens[i] < mensagens[j]){ // ordenar os topicos com mais mensagens para os que têm menos\n temp = mensagens[i];\n mensagens[i] = mensagens[j];\n mensagens[j]=temp;\n\n tempo = nomes[i];\n nomes[i] = nomes[j];\n nomes[j] = tempo;\n }\n }\n }\n System.out.println(\"\\033[1mTópicos mais ativos: \\033[0m\\n\");\n if(cont < 3){\n for(j = 0;j<cont;j++){\n System.out.println(nomes[j] + \" com \" + mensagens[j] + \" mensagens\"); // imprimir os 3 topicos mais ativos, exceto se existirem menos de 3 elementos, e aí apresenta os que existem\n }\n }\n else{\n for(j = 0;j<3;j++){\n System.out.println(nomes[j] + \" com \" + mensagens[j] + \" mensagens\");\n }\n }\n }", "private File[] arrayDosArquivos() {\r\n\t\tFile file = new File(CAMINHO);\r\n\t\tfile.mkdirs();\r\n\t\treturn file.listFiles();\r\n\t}", "@RequestMapping(value = \"/siguiente1\", method = RequestMethod.POST)\r\n public ResponseEntity<String> uploadMultipleFileHandler(@RequestParam(\"inputNameModel\") String nameModelo,\r\n @RequestParam(\"filePaso1\") MultipartFile[] files) {\r\n \t\t\t\tString[] names = {\"modelIcon.png\", \"Fondo.png\", \"Mascara.png\"};\r\n\r\n for (int i = 0; i < files.length; i++) {\r\n MultipartFile file = files[i];\r\n String name = names[i];\r\n\r\n try {\r\n byte[] imageInByte = file.getBytes();\r\n\r\n // Creating the directory to store file\r\n String rootPath = System.getProperty(\"catalina.home\");\r\n File dir = new File(rootPath + File.separator + \"tmpFiles\"+ File.separator + nameModelo);\r\n if (!dir.exists()){\r\n\t\t\t\t\t\t\t\t//\tSystem.out.println( \"Ruta de las magenes: \");\r\n\t\t\t\t\t\t\t\t//\tSystem.out.println( rootPath + File.separator + \"tmpFiles\" + File.separator + nameModelo);\r\n\t\t\t\t\t\t\t\t\tdir.mkdirs();\r\n\t\t\t\t\t\t\t\t}\r\n\r\n // Create the file on server\r\n File serverFile = new File(dir.getAbsolutePath() + File.separator + name);\r\n BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(serverFile));\r\n stream.write(imageInByte);\r\n stream.close();\r\n\r\n //logger.info(\"Server File Location=\"\r\n // + serverFile.getAbsolutePath());\r\n\r\n System.out.println( \"You successfully uploaded file=\" + name);\r\n } catch (Exception e) {\r\n\t\t\t\t\t\t\t\treturn new ResponseEntity<String>(\"You failed to upload \" + name + \" => \" + e.getMessage(), HttpStatus.OK);\r\n }\r\n }\r\n\t\t\t\tString[] colors = null;\r\n\t\t\t\t//if ( files.length = 3){\r\n\t\t\t\t\tSystem.out.println( \"Si tenemos cargado mascara ...\");\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tMultipartFile f = files[2];\r\n\t\t\t\t\t\tbyte[] imageInByte = f.getBytes();\r\n\t\t\t\t\t\tInputStream in = new ByteArrayInputStream(imageInByte);\r\n\t\t\t\t\t\tBufferedImage image = ImageIO.read(in);\r\n\t\t\t\t\t\tcolors = convertTo2DWithoutUsingGetRGB(image);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\treturn new ResponseEntity<String>(\"Error al generar la lista de colores => \" + e.getMessage(), HttpStatus.OK);\r\n\t\t\t\t\t}\r\n\t\t\t\t//}\r\n \treturn new ResponseEntity<String>(\" >>>> FIN <<<<\", HttpStatus.OK);\r\n }", "public static void main(String[] args) throws IOException {\n\t\tPath p=Paths.get(\"D:\\\\Users\\\\Filip\\\\hr\\\\fer\\\\oop\\\\lab5\\\\racuni\");\n\t\tMySecondByteReader reader=new MySecondByteReader();\n\t\tFiles.walkFileTree(p,reader);\n\n\t\tPath iso=Paths.get(\"D:/Users/Filip/hr/fer/oop/lab5/cjenik.88592.txt\");\n\t\tPath utf=Paths.get(\"D:/Users/Filip/hr/fer/oop/lab5/cjenik.utf8.txt\");\n\n\t\tFiles.deleteIfExists(utf);\n\t\tFiles.deleteIfExists(iso);\n\n\t\tFiles.createFile(utf);\n\t\tFiles.createFile(iso);\n\n\t\ttry(BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(iso.toString())),\"ISO-8859-2\"))){\n\t\t\treader.getCollection().stream().forEach(new Consumer<Artikl>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void accept(Artikl a) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriter.write(a.getNaziv().toString()+\" \"+a.getCijena().toString());\n\t\t\t\t\t\twriter.write(\"\\n\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t\tcatch(IOException ex){\n\t\t\tSystem.err.println(ex);\n\t\t}\n\n\t\ttry(BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(utf.toString())),\"UTF-8\"))){\n\t\t\treader.getCollection().stream().forEach(new Consumer<Artikl>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void accept(Artikl a) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\twriter.write(a.getNaziv().toString()+\" \"+a.getCijena().toString());\n\t\t\t\t\t\twriter.write(\"\\n\");\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\t\tcatch(IOException ex){\n\t\t\tSystem.err.println(ex);\n\t\t}\n\t}", "public void leeArchivo() throws IOException {\n // defino el objeto de Entrada para tomar datos\n BufferedReader brwEntrada;\n try {\n // creo el objeto de entrada a partir de un archivo de texto\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n } catch (FileNotFoundException e) {\n // si marca error es que el archivo no existia entonces lo creo\n File filPuntos = new File(\"datos.txt\");\n PrintWriter prwSalida = new PrintWriter(filPuntos);\n // le pongo datos ficticios o de default\n // lo cierro para que se grabe lo que meti al archivo\n prwSalida.close();\n // lo vuelvo a abrir porque el objetivo es leer datos\n brwEntrada = new BufferedReader(new FileReader(\"datos.txt\"));\n }\n // con el archivo abierto leo los datos que estan guardados\n brwEntrada.close();\n }", "public static void main(String[] args) {\n File myFile = new File (\"d:/names.txt\");\r\n // para saber si el archivo no existe, devuelve true o false\r\n System.out.println(\"file.exists(): \" + myFile.exists());\r\n System.out.println(\"file.isDirectory(): \" + myFile.isDirectory());\r\n // para saber la fecha de modificación\r\n System.out.println(\"file.lastModified(): \" + myFile.lastModified());\r\n // para saber el nombre del archivo\r\n System.out.println(\"file.getName(): \" + myFile.getName());\r\n // para saber la ruta\r\n System.out.println(\"file.getPath(): \" + myFile.getPath());\r\n // para saber el tamaño en bytes que ocupa en disco\r\n System.out.println(\"file.length(): \" + myFile.length()+\" bytes\");\r\n // para saber si es de lectura, devuelve true o false\r\n System.out.println(\"file.canRead():\" + myFile.canRead());\r\n\r\n //File newfolder = new File(\"D:/carpeta con archivos año mío\");\r\n //System.out.println(newfolder.mkdir());\r\n\r\n // si fuera un directorio, para saber los archivos que contiene\r\n File carpeta = new File(\"D:/carpeta_con_archivos\");\r\n System.out.println(\"----listado archivos D:/carpeta_archivos------\");\r\n for (String archivo : carpeta.list()) {\r\n System.out.println(archivo);\r\n }\r\n\r\n //agregar una linea nueva a un archivo existente (METODO 1)\r\n /*try {\r\n //abra el archivo , TRUE en un forma append (agregar nuevos valores)\r\n FileWriter myFile2 = new FileWriter(\"d:/names.txt\", true);\r\n //cargar en memora ram del SO el contenido del archivo\r\n BufferedWriter dataFile = new BufferedWriter(myFile2);\r\n //agregar una nueva linea\r\n dataFile.write(\"\\nnueva linea tres\");\r\n dataFile.close();\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }*/\r\n //agregar una linea nueva a un archivo existente (METODO 1 optimizado)\r\n /*try{\r\n BufferedWriter dataFile = new BufferedWriter(new FileWriter(\"d:/names.txt\",true));\r\n //agregamos la nueva linea\r\n dataFile.write(\"nueva linea sin borrar\");\r\n dataFile.close();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }*/\r\n // agregar nueva linea con metodo super optimizado en lineas (METODO FLAHS)\r\n try{\r\n PrintWriter myFile3 = new PrintWriter(new BufferedWriter(new FileWriter(\"d:/names.txt\", true)));\r\n myFile3.println(\"Otra nueva línea mezclando las dos librerías (PrintWriter + FileWriter) \");\r\n myFile3.close();\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n }", "public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }", "public static void inicializaMedicosText() {\n \n try (BufferedWriter bw = new BufferedWriter(new FileWriter(\"medicos.txt\"))) {\n for (Medico m : medicos) {\n if(m.getPuesto()==null)\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",0\");\n else\n bw.write(m.getCedula() + \",\" + m.getNombres() + \",\" + m.getApellidos() + \",\" + m.getEdad() + \",\" + m.getPuesto().getId());\n bw.newLine();\n }\n }\n catch (IOException ex) {\n Logger.getLogger(StageAdmin.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void EliminarArchivos(){\n\t\ttry{\n\t\tFile Delete = new File(\"Cod.txt\");\n\t\tDelete.deleteOnExit();\n\t\tFile Borrar = new File(\"Maq.txt\");\n\t\tBorrar.deleteOnExit();\n\t\tFile eliminar = new File(\"WS.txt\");\n\t\teliminar.deleteOnExit();\n\t\tFile Bye = new File(\"RESPALDO.txt\");\n\t\tBye.deleteOnExit();\n\t\t\tBufferedReader numero= new BufferedReader(new FileReader(\"WS.txt\"));\n\t\t\tString valor = numero.readLine();\n\t\t\tint NumAreas= Integer.valueOf(valor);\n\t\t\tfor(int i=0; i< NumAreas;i++){\n\t\t\t\tvalor= numero.readLine();\n\t\t\t\tFile eliminas = new File(\"WS\"+valor+\".txt\");\n\t\t\t\teliminas.deleteOnExit();\n\t\t\t}\n\t\t\tnumero.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\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}", "public static void main (String []args){\n\t\tString root = \"/home/weslley/ArtigoGroundHog2015/LogProjetos2015\";\n\t\tString rootCompleto = \"/home/weslley/mestrado2014/FinalProjects\";\n\t\t//String listaProjetosSemData = \"/home/weslley/ArtigoGroundHog2015/projectsNames2015.txt\";\n\n\t\t//Para alguns projetos nao datados\n/*\t\tVector<String> listaProjetosNaoDatados = null;\n\t\ttry {\n\t\t\tlistaProjetosNaoDatados = readProjectsNames();\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\tFile folder = new File(root);\n\t\tFile folderCompleto = new File(rootCompleto);\n\n\t\tint x = 0;\n\t\tFile firstLevel[] = folder.listFiles();\n\t\tFile firstLevelCompleto[] = folderCompleto.listFiles();\n\n\t\tboolean completed = true;\n\n\t\tfor (int i = 0; i < firstLevel.length; i++){\n\n\t\t\t//if(listaProjetosNaoDatados.contains(firstLevel[i].getName())){\n\n\t\t\t\tFile projetoDatado=null;\n\t\t\t\ttry {\n\t\t\t\t\tprojetoDatado = findFile(firstLevelCompleto, firstLevel[i].getName());\n\t\t\t\t} catch (IOException 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\n\t\t\t\tif(projetoDatado!=null){\n\n\t\t\t\t\tFile secondLevel[] = firstLevel[i].listFiles();\n\t\t\t\t\t//System.out.println(firstLevel[i].getName());\n\t\t\t\t\tif (secondLevel != null){\n\t\t\t\t\t\tfor(int j = 0; j < secondLevel.length && completed; j++){\n\t\t\t\t\t\t\t//System.out.println(secondLevel[j].getName());\n\t\t\t\t\t\t\tif (secondLevel[j].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\tFile thirdLevel[] = secondLevel[j].listFiles();\n\t\t\t\t\t\t\t\tx++;\n\t\t\t\t\t\t\t\tfor (int k = 0;thirdLevel!=null && k < thirdLevel.length && completed; k++){\n\t\t\t\t\t\t\t\t\tif (thirdLevel[k].getName().compareTo(\".DS_Store\") != 0){\n\t\t\t\t\t\t\t\t\t\tif (!(thirdLevel[k].getName().startsWith(\"[\") && thirdLevel[k].getName().contains(\"]\"))){\n\n\t\t\t\t\t\t\t\t\t\t\t//File secondLevelCompleto[] = projetoDatado.listFiles();\n\t\t\t\t\t\t\t\t\t\t\tFile secondLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\tFile thirdLevelCompletoAuxiliar;\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tsecondLevelCompletoAuxiliar = findFile(projetoDatado.listFiles(), secondLevel[j].getName());\n\t\t\t\t\t\t\t\t\t\t\t\tif(secondLevelCompletoAuxiliar!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevelCompletoAuxiliar = findFile(secondLevelCompletoAuxiliar.listFiles(), thirdLevel[k].getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (thirdLevelCompletoAuxiliar!=null && thirdLevelCompletoAuxiliar.getName().startsWith(\"[\") && thirdLevelCompletoAuxiliar.getName().contains(\"]\")){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(thirdLevelCompletoAuxiliar!=null && (thirdLevelCompletoAuxiliar.getName().endsWith(thirdLevel[k].getName()) || (compararProjetoSemExtensao(thirdLevelCompletoAuxiliar.getName(),thirdLevel[k].getName() )))){\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFile rename = new File(thirdLevel[k].getParent() + \"/\" + thirdLevelCompletoAuxiliar.getName());\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthirdLevel[k].renameTo(rename);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tString novoNome = thirdLevel[k].getName();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}catch (IOException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\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}//System.out.println(\"asdasd\" + x);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t//}\n\n\t\t\t}\n\t\t}\n\t}", "public void Horas() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n \r\n \r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (a==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (a==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null)\r\n if (leerHora == contador){\r\n comparar = linea.substring(0,2);\r\n \r\n if (\"09\".equals(comparar)){\r\n nueve++;\r\n }\r\n if (\"10\".equals(comparar)){\r\n diez++;\r\n }\r\n if (\"11\".equals(comparar)){\r\n once++;\r\n }\r\n if (\"13\".equals(comparar)){\r\n una++;\r\n }\r\n if (\"14\".equals(comparar)){\r\n dos++;\r\n }\r\n if (\"15\".equals(comparar)){\r\n tres++;\r\n }\r\n if (\"16\".equals(comparar)){\r\n cuatro++;\r\n }\r\n \r\n contador +=1;\r\n leerHora += 6;\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "final public void GuardarCuadruplos() throws ParseException {\ntry {\n // Crea un cuadro de dialogo. El input se guarda en strNomArchivo\n String strNomArchivo = \"\";\n\n // Si el campo quedo vacío o se cerró la ventana, volver a mostrarlo\n while (strNomArchivo==null || strNomArchivo.trim().isEmpty()) {\n strNomArchivo = (String)JOptionPane.showInputDialog(\n null, \"Escribe el nombre que tendra el archivo\", \"Input\", JOptionPane.PLAIN_MESSAGE, null, null, null);\n }\n\n // objeto printwriter con el nombre del archivo\n PrintWriter codigoObj = new PrintWriter(strNomArchivo);\n\n // Agrega uno por uno los cuadruplos al archivo\n for (int i=0; i < cuadruplos.size(); i++) {\n codigoObj.println( Cuadruplo.returnCuadruplo( (Cuadruplo)cuadruplos.get(i) ) );\n }\n\n // cierra el archivo\n codigoObj.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(e.getMessage());\n }\n }", "@Test\n\tpublic void testListarArquivoComRegistro() throws IOException\n\t{\n\t\t// 1) criar um arquivo de dados com 1 registro\n\t\tString nomeArquivo = \"dados.txt\";\n\t\tnew File(nomeArquivo).createNewFile();\n\t\tFileOutputStream fos = \n\t\t\t\tnew FileOutputStream(nomeArquivo);\n\t\tfos.write(\n\t\t\t\"001;Josť das Couves;BH;MG;2500\\n\".getBytes());\n\t\tfos.close();\n\t\t// 2) criar o processador de arq. seq.\n\t\tProcessadorDeArquivoSequencial pas = \n\t\t\tnew ProcessadorDeArquivoSequencial(nomeArquivo);\n\t\t// 3) listar os registros do arquivo\n\t\tList<Registro> lista = pas.listar();\n\t\t// 4) verificar quantidade de registros\n\t\tAssert.assertEquals(1, lista.size());\n\t\t// 5) excluir o arquivo criado\n\t\tnew File(nomeArquivo).delete();\n\t\t\n\t}", "public static String cargarPreguntas(String fileName){\n String line = null; \n try {\n //Para lectura del archivo\n FileReader fileReader =\n new FileReader(fileName); \n \n //BufferedReader para optimización de recursos\n BufferedReader bufferedReader =\n new BufferedReader(fileReader);\n \n// Lee línea por línea, verifica que tengan algo de texto\n while(((line = bufferedReader.readLine()) != null)) {\n if ((line.length() > 0) && !(line.startsWith(\"//\"))){\n// Para ignorar las líneas de comentario en el archivo de texto\n //if (!(line.startsWith(\"//\"))){\n// Crea una lista de Strings para cada línea a evaluar\n List<String> listaLinea = new ArrayList<>(Arrays.asList(line.split(\";\")));\n// Impresión de prueba del ArrayList(descomentar)\n// System.out.println(listaLinea);\n \n //Obtiene lista de Respuestas, en tipo String\n List <String >resp = listaLinea.subList(1,listaLinea.size());\n //Creación de Respuestas (bajo el debido constructor) en un HashSet\n HashSet<Respuesta> respuestas = new HashSet(); \n for (int i = 0; i < resp.size();i++){\n if (i == 0){\n //Identifica la respuesta correcta\n respuestas.add(new Respuesta(resp.get(i), true));\n }\n else{\n //Identifica las respuestas incorrectas\n respuestas.add(new Respuesta(resp.get(i), false));\n } \n }\n //System.out.println(resp); Impresión de prueba (descomentar)\n \n //Agrega Preguntas y Respuestas a nuestro HashSet y HashMap\n Almacenamiento.getPreguntas().add(new Pregunta(listaLinea.get(0)));\n Almacenamiento.getMapaPR().put(new Pregunta(listaLinea.get(0)), respuestas); \n //}\n }\n }\n //Impresiones de prueba, descomentar.\n// for(Pregunta p: Almacenamiento.getPreguntas()){\n// System.out.println(p.toString()); \n// } \n// Almacenamiento.getMapaPR().forEach((k,v)-> System.out.println(k+\", \"+v));\n \n // Siempre cerrar archivo, para optimizar recursos\n bufferedReader.close(); \n }\n //Detalle de exception impreso en consola\n catch(FileNotFoundException ex) {\n System.out.println(\n \"No se pudo abrir archivo '\" +\n fileName + \"'\"); \n }\n //Detalle de exception impreso en consola\n catch(IOException ex) {\n System.out.println(\n \"Error leyendo archivo '\"\n + fileName + \"'\"); \n }\n return null;\n }", "private static synchronized void saveArchivo(List<String> objects, String cabecera, String name) \n\t\t\tthrows Exception {\n\t\tFileWriter file = new FileWriter(Configuracion.pathRetencionTesaka + name +\".txt\");\n\t\tfile.write(cabecera);\n\t\tfor (String string : objects) {\n\t\t\tfile.write(string);\n\t\t}\t\n\t\tfile.flush();\n\t\tfile.close();\n\t\tFiledownload.save(InformeHechauka.PATH_FILE + name +\".txt\", null);\n\t}", "public TiendaVideojuegos(String datos)\n {\n listaDeVideojuegos = new ArrayList<Videojuegos>();\n codVideojuego = 0;\n try{\n File archivo = new File(datos);\n Scanner sc = new Scanner(archivo);\n while (sc.hasNextLine()) {\n String[] datosVideojuego = sc.nextLine().split(\"#\");\n String titulo = datosVideojuego[0];\n String plataforma = datosVideojuego[1];\n int dia = Integer.parseInt(datosVideojuego[2]);\n int mes = Integer.parseInt(datosVideojuego[3]);\n int anyo = Integer.parseInt(datosVideojuego[4]);\n addVideojuego(titulo, dia, mes, anyo, plataforma);\n }\n \n sc.close();\n }\n catch (FileNotFoundException a) {\n a.printStackTrace();\n }\n \n }", "public static ArrayList<Puntaje> listadoPuntajes(String ruta, String jugador)\n { \n ArrayList<String> listadoPuntajes = helper.HelperArchivo.leerLineasArchivo(ruta);\n ArrayList<Puntaje> listado = new ArrayList<>(); \n int nivel;\n double puntajeGanado;\n \n for(String puntaje : listadoPuntajes)\n {\n System.out.println(\"puntaje=\"+puntaje);\n String[] puntajePart = puntaje.split(\",\"); \n if(jugador.equalsIgnoreCase(puntajePart[0]))\n { \n nivel = Integer.parseInt(puntajePart[1]);\n puntajeGanado = Double.parseDouble(puntajePart[2]); \n listado.add(new Puntaje(jugador,nivel,puntajeGanado));\n } \n } \n return listado;\n }", "public static void main(String[] args) throws IOException {\n File ruta = new File(\"C:\\\\Users\\\\usuario\\\\Documents\\\\curso de java online sepe\\\\unidad 1 clase file\\\\ejercicios\");\n // establecer el nombre del fichero a crear\n File f = new File(ruta, \"datos.txt\");\n File f1 = new File(ruta, \"datosNuevos.txt\");\n // imprimir la ruta absoluta del archivo\n System.out.println(f.getAbsolutePath());\n // Devuelve un String conteniendo el directorio padre del File. Devuelve null si no tiene directorio padre. del archivo\n System.out.println(f.getParent());\n // imprimir la ruta absoluta de la ruta del archivo\n System.out.println(ruta.getAbsolutePath());\n // Devuelve un String conteniendo el directorio padre del File. Devuelve null si no tiene directorio padre. de la ruta\n System.out.println(ruta.getParent());\n if (!f.exists()) { //se comprueba si el fichero existe o no\n System.out.println(\"Fichero \" + f.getName() + \" no existe\");\n if (!ruta.exists()) { //se comprueba si la ruta existe o no\n System.out.println(\"El directorio \" + ruta.getName() + \" no existe\");\n if (ruta.mkdir()) { //se crea la carpeta\n System.out.println(\"Directorio creado\");\n if (f.createNewFile()) { //se crea el fichero.\n System.out.println(\"Fichero \" + f.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f.getName());\n }\n } else {\n System.out.println(\"No se ha podido crear \" + ruta.getName());\n }\n } else { //si la ruta existe creamos el fichero\n if (f.createNewFile()) {\n System.out.println(\"Fichero \" + f.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f.getName());\n }\n }\n } else { //el fichero existe. Mostramos el tamaño\n System.out.println(\"Fichero \" + f.getName() + \" existe\");\n System.out.println(\"Tamaño \" + f.length() + \" bytes\");\n }\n\n // mostrar los archivos en esa carpeta\n File f2 = new File(ruta, \".\");\n // creamos un array para mostrar todos los archivos en esa ruta\n String[] listaArchivos = f2.list();\n if (!f1.exists()) { //se comprueba si el fichero existe o no\n System.out.println(\"Fichero \" + f1.getName() + \" no existe\");\n }\n if (f1.createNewFile()) { //se crea el fichero. Si se ha creado correctamente\n System.out.println(\"Fichero \" + f1.getName() + \" creado\");\n } else {\n System.out.println(\"No se ha podido crear \" + f1.getName());\n }\n for (int i = 0; i < listaArchivos.length; i++) {\n System.out.println(listaArchivos[i]);\n }\n // mostrar el numero de archivos en esa carpeta\n String[] elementos = ruta.list();\n System.out.println(\"La carpeta \" + ruta.getAbsolutePath() + \" tiene \" + elementos.length + \" subelementos\");\n }", "public void crearArchivoDeTexto(String rutas,String nombre, String texto){\n try{\n archivo = new File(rutas + File.separator + nombre);\n String rutaCompleta=archivo.getAbsolutePath();\n \n System.out.println(rutaCompleta);\n FileWriter archivoEscritura= new FileWriter(rutaCompleta,true);\n BufferedWriter escritura= new BufferedWriter(archivoEscritura);\n escritura.append(texto+\"\\n\");\n escritura.close();\n archivoEscritura.close();\n }catch(FileNotFoundException e1){\n System.out.println(\"Ruta de archivo no encontrada\");\n }catch(IOException e2){\n System.out.println(\"Error de escritura\");\n }catch(Exception e3){\n System.out.println(\"Error General\");\n }\n }", "public void main(String[] args) {\n String datas=\"\";\n try {\n File myObj = new File(\"configuracion.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n String[] partes = datas.split(\">\"); //separa el contenido del fichero en diferentes string\n String[] cambios; //y lo vuelve a separar para quitar los titulos entre <>. Ej: <Localizaciones>\n for (int i = 1; i < 4; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n //calcular num de elementos de cada parte\n int[] numelementos = new int[3];\n for (int i = 0; i < 3; i++) {\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='(')\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag1=1;\n }\n }\n }\n\n localizacionesString = new String [numelementos[0]]; //incializa la informacion de cada objeto \n personajesString = new String [numelementos[1]]; //segun el largo de los strings que hemos separado\n objetosString = new String [numelementos[2]];\n String cambio = \"\";\n int count = 0 ;\n\n //Se rellena cada string con un for propio\n //Dentro de un try para deteccion de errores\n try {\n //for para Localizaciones\n for (int i=0; count<numelementos[0]; ++i){ \n if (partes[1].charAt(i)==')'){\n localizacionesString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesString[count]=localizacionesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n if (partes[1].charAt(i)==','){ //Control de errores en el txt /*\n if(partes[1].charAt(i+1)!=' '){\n cambio=cambio+\", \";\n continue;\n }\n if(partes[1].charAt(i+1)==' '&&partes[1].charAt(i+2)==' '){\n cambio=cambio+\", \";\n ++i;\n for(;;i++){\n if(partes[1].charAt(i)!=' ')\n break;\n }\n }\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\"; \n }\n for (int f,i = 0; i < numelementos[0]; i++) {\n f=0;\n for (int j = 0; j < localizacionesString[i].length(); j++) {\n if(localizacionesString[i].charAt(j)==')'||localizacionesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count = 0;\n\n //for para Personajes\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n personajesString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n personajesString[count]=personajesString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[1]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < personajesString[i].length(); j++) {\n if(personajesString[i].charAt(j)==')'||personajesString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n \n count=0;\n\n //for para Objetos\n for (int i=0; count<numelementos[2]; ++i){\n if (partes[3].charAt(i)==')'){\n objetosString[count]=\"\";\n cambio=cambio+partes[3].charAt(i);\n objetosString[count]=objetosString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[3].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[2]; i++) { //Control de errores/*\n f=0;\n for (int j = 0; j < objetosString[i].length(); j++) {\n if(objetosString[i].charAt(j)==')'||objetosString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag1=1;\n }\n } // */\n\n \n } catch (Exception e) {\n System.out.println(\"ERROR EN LECTURA FICHERO\");\n flag1 = 1;\n }\n \n \n\n\n\n\n\n //leer fichero de objetivos(funciona igual que el de configuracion.txt)\n\n datas=\"\";\n try {\n File myObj = new File(\"objetivos.txt\");\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String data = myReader.nextLine();\n datas = datas + data;\n }\n myReader.close();\n }\n\n catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n\n partes = datas.split(\">\");\n for (int i = 1; i < 3; i++) {\n cambios=partes[i].split(\"<\");\n partes[i]=cambios[0];\n }\n \n numelementos = new int[2];\n for(int i=0 ; i<2 ; i++){\n for(int j=0; j<partes[i+1].length(); j++){\n if(partes[i+1].charAt(j)=='('){\n numelementos[i]++;\n if(partes[i+1].charAt(j)==')'){\n if(numelementos[i]==0)\n flag2=1;\n }\n }\n }\n }\n\n localizacionesObjetivoString = new String [numelementos[0]];\n objetosObjetivoString = new String [numelementos[1]];\n cambio=\"\";\n\n count = 0;\n\n try {\n // for para las localizaciones objetivo\n for (int i=0; count<numelementos[0]; ++i){\n if (partes[1].charAt(i)==')'){\n localizacionesObjetivoString[count]=\"\";\n cambio=cambio+partes[1].charAt(i);\n localizacionesObjetivoString[count]=localizacionesObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[1].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < localizacionesObjetivoString[i].length(); j++) {\n if(localizacionesObjetivoString[i].charAt(j)==')'||localizacionesObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n count=0;\n\n // for para los objetos objetivo\n for (int i=0; count<numelementos[1]; ++i){\n if (partes[2].charAt(i)==')'){\n objetosObjetivoString[count]=\"\";\n cambio=cambio+partes[2].charAt(i);\n objetosObjetivoString[count]=objetosObjetivoString[count]+cambio;\n ++count;\n cambio=\"\";\n continue;\n }\n cambio=cambio+partes[2].charAt(i);\n if(cambio.charAt(0)==' ')\n cambio=\"\";\n }\n for (int f,i = 0; i < numelementos[0]; i++) { //Control de errores /*\n f=0;\n for (int j = 0; j < objetosObjetivoString[i].length(); j++) {\n if(objetosObjetivoString[i].charAt(j)==')'||objetosObjetivoString[i].charAt(j)=='('){\n ++f;\n }\n }\n if(f<2||f>2){\n flag2=1;\n }\n } // */\n\n } catch (Exception e) {\n System.out.println(\"ERRROR EN LA LECTURA DE FICHERO\");\n flag2=1;\n }\n \n System.out.println(\"\");\n }", "public ArrayList<String> verPuntajes(){\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tArrayList<String> datos = new ArrayList<String>();\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader(archivo);\r\n\t\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\tString linea = \"\";\r\n\t\t\twhile ((linea = br.readLine()) != null) {\r\n\t\t\t\tdatos.add(linea);\t\t\t\t\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn datos;\r\n\t}", "public static void publicarTopico() throws IOException, InterruptedException {\n\n clearScreen();\n Scanner input = new Scanner(System.in);\n File subscritos = new File(user+\".txt\"); \n File topicos = new File(\"Topicos.txt\");\n BufferedReader reader = new BufferedReader(new FileReader(subscritos));\n BufferedReader read = new BufferedReader(new FileReader(topicos));\n boolean subscrito = false; // variavel para verificar se já está subscrito\n System.out.print(\"Em que tópico deseja publicar? (Sair 0) \\n> \");\n String escolha = input.next();\n\n if(!escolha.equals(\"0\")){\n int maximo = 100;\n String mensagem = \"\";\n File topico = new File (escolha+\".txt\");\n\n if(!topico.exists()){\n System.out.println(\"O topico não existe!\");\n TimeUnit.SECONDS.sleep(2);\n publicarTopico();\n return;\n\n }\n\n BufferedReader topicoReader = new BufferedReader(new FileReader(escolha+\".txt\"));\n FileWriter topicoWriter = new FileWriter(escolha+\".txt\",true);\n\n x = new Scanner(new File(\"Topicos.txt\"));\n \n \n while(x.hasNext()){\n String a = x.next();\n String b = x.next();\n String c = x.next();\n\n if(escolha.equals(a))\n maximo = Integer.parseInt(c); // maximo de mensagens no topico\n }\n\n try\n {\n \n String line = \"\", oldtext = \"\",newTexto=\"\";\n\n while((line = reader.readLine()) != null)\n {\n if(line.contains(escolha)){ // se o topico estiver subscrito, guardar a mensagem\n System.out.print(\"Escrever mensagem: \");\n input.nextLine();\n mensagem = input.nextLine();\n subscrito = true;\n }\n }\n reader.close();\n\n BufferedReader reader1 = new BufferedReader(new FileReader(escolha+\".txt\"));\n BufferedReader reader2 = new BufferedReader(new FileReader(escolha+\".txt\"));\n\n int cont = 0;\n\n while((line = reader1.readLine()) != null){\n cont++;\n }\n\n while((line = reader2.readLine()) != null){ \n if(cont < maximo){ // verificar o maximo de mensagens possiveis\n newTexto += line + \"\\r\\n\";\n }\n cont--;\n }\n\n PrintWriter pw = new PrintWriter(escolha+\".txt\");\n\n topicoWriter.write(newTexto); // escrever no ficheiro que guarda as mensagens do topico\n topicoWriter.write(user+\":\");\n topicoWriter.write(\" \");\n topicoWriter.write(\"0 likes: \");\n topicoWriter.write(\"em \"+escolha+ \"-> \");\n topicoWriter.write(mensagem);\n topicoWriter.write(\"\\n\");\n\n topicoWriter.flush();\n topicoWriter.close();\n\n if (subscrito == false){\n System.out.println(\"\\033[1mNão estás subscrito nesse tópico!\\033[0m\");\n TimeUnit.SECONDS.sleep(2);\n publicarTopico();\n return;\n }\n\n System.out.println(\"\\n\\033[1mMensagem publicada\\033[0m\");\n }\n \n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }\n }", "private static void recorrerFicheros(File[] ficheros, int indice,\n\t\t\tString texto) {\n\t\tif (indice <= ficheros.length - 1) {\n\t\t\tif (practica6.Prueba1.\n\t\t\t\t\tesFicheroGrafico(ficheros[indice])) {\n\t\t\t\tImageIcon img = new ImageIcon(ficheros[indice].\n\t\t\t\t\t\tgetPath().toLowerCase());\n\t\t\t\t// comprueba si tiene alguna coincidencia\n\t\t\t\tif (ficheros[indice].getName().\n\t\t\t\t\t\tindexOf(texto) != -1) {\n\t\t\t\t\tSystem.out.printf(\"%s%n\", ficheros[indice].\n\t\t\t\t\t\t\tgetPath());\n\t\t\t\t\t// lo agrega al vector\n\t\t\t\t\tv.add(img);\n\t\t\t\t}\n\t\t\t\tindice++;\n\t\t\t\trecorrerFicheros(ficheros, indice, texto);\n\t\t\t} else {\n\t\t\t\tindice++;\n\t\t\t\trecorrerFicheros(ficheros, indice, texto);\n\t\t\t}\n\t\t}\n\t}", "public String upload() throws FileNotFoundException, IOException{\n FileOutputStream fout=new FileOutputStream(\"/tmp/mi_archivo\");\n int read=0;\n byte[] data=new byte[1024];\n InputStream in = archivo.getInputStream();\n\n while((read = in.read(data)) != -1){\n fout.write(data, 0, read);\n }\n\n return \"\";\n }", "private static void listarDirectorio2(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t\t//System.out.println(\"\");\n\t\t\t\t//listarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// explora nuevos directorios\n\t\t\tif (ficheros[i].isDirectory()) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tlistarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t}", "public List<Cuenta> leerArchivoToList(InputStream archivo);", "public static void listarContenidoDirectorio(File directorio) {\n\t System.out.println(\"D \" + directorio+\" \"+ new Date(directorio.lastModified()));\n\t //creamos un array con los archivos que hay dentro\n\t File[] listado = directorio.listFiles();\n\t \n\t if (listado!=null) {\n\t \t//recorremos la lista de achivos\n\t for(File file:listado) {\n\t \t//si lo que encontramos es un directorio llamamos recursivamente a la funcion listarContenidoDirectorio\n\t if (file.isDirectory())\n\t \tlistarContenidoDirectorio(file);\n\t //si son archivos pedimos que los imprima\n\t else {\n\t \t\n\t System.out.println(\"F \"+file+ \" \"+new Date(file.lastModified()));\n\t }\n\t }\n\t }\n\n\t }", "public void llenarListaArchivos(int op) {\n String[] archivosPermitidos = {\".HA\", \".HE\"};\n if (op == 1) {\n archivos_directorio.removeAllItems();\n } else {\n archivos_directorio2.removeAllItems();\n }\n File directorio = new File(\"./\");\n File[] archivos = null;\n if (directorio.exists()) {\n archivos = directorio.listFiles();\n }\n int i;\n\n for (i = 0; i < archivos.length; i++) {\n if (op == 1 && (\"\" + archivos[i]).contains(\".txt\")) {\n archivos_directorio.addItem(\"\" + archivos[i]);\n } else {\n int j;\n for (j = 0; j < archivosPermitidos.length; j++) {\n if ((\"\" + archivos[i]).contains(archivosPermitidos[j])) {\n archivos_directorio2.addItem(\"\" + archivos[i]);\n break;\n }\n }\n }\n }\n\n }", "public void respaldo() {\n if (seleccionados != null && seleccionados.length > 0) {\n ZipOutputStream salidaZip; //Donde va a quedar el archivo zip\n\n File file = new File(FacesContext.getCurrentInstance()\n .getExternalContext()\n .getRealPath(\"/temporales/\") + archivoRespaldo + \".zip\");\n\n try {\n salidaZip\n = new ZipOutputStream(new FileOutputStream(file));\n ZipEntry entradaZip;\n\n for (String s : seleccionados) {\n if (s.contains(\"Paises\")) {\n\n entradaZip = new ZipEntry(\"paises.json\");\n salidaZip.putNextEntry(entradaZip);\n byte data[]\n = PaisGestion.generaJson().getBytes();\n salidaZip.write(data, 0, data.length);\n salidaZip.closeEntry();\n }\n }\n salidaZip.close();\n\n // Descargar el archivo zip\n //Se carga el zip en un arreglo de bytes...\n byte[] zip = Files.readAllBytes(file.toPath());\n\n //Generar la página de respuesta...\n HttpServletResponse respuesta\n = (HttpServletResponse) FacesContext\n .getCurrentInstance()\n .getExternalContext()\n .getResponse();\n\n ServletOutputStream salida\n = respuesta.getOutputStream();\n\n //Defino los encabezados de la página de respuesta\n respuesta.setContentType(\"application/zip\");\n respuesta.setHeader(\"Content-Disposition\",\n \"attachement; filename=\" + archivoRespaldo + \".zip\");\n\n salida.write(zip);\n salida.flush();\n\n //Todo listo\n FacesContext.getCurrentInstance().responseComplete();\n file.delete();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(RespaldoController.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n\n }", "private void exportarDatos() {\r\n // Cabecera\r\n System.out.println(\"Exportación de Datos\");\r\n System.out.println(\"====================\");\r\n\r\n // Acceso al Fichero\r\n try (PrintWriter pr = new PrintWriter(DEF_NOMBRE_FICHERO)) {\r\n // Bucle de Escritura\r\n for (Item item : CARRITO) {\r\n // Generar Linea de Texto\r\n String linea = String.format(Locale.ENGLISH, \"%d%s%s%s%.2f%s%s\",\r\n item.getId(), REG_CSV_ESCR,\r\n item.getNombre(), REG_CSV_ESCR,\r\n item.getPrecio(), REG_CSV_ESCR,\r\n UtilesGraficos.obtenerNombreColor(item.getColor()));\r\n\r\n // Item > Fichero\r\n pr.println(linea);\r\n }\r\n\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"Datos exportados correctamente\");\r\n } catch (NumberFormatException | NullPointerException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Formato de datos incorrecto\");\r\n\r\n // Vaciado Carrito\r\n CARRITO.clear();\r\n } catch (IOException e) {\r\n // Mensaje Informativo\r\n UtilesEntrada.hacerPausa(\"ERROR: Acceso al fichero\");\r\n }\r\n }", "public void bajaUsuario(int id) throws IOException {\n//\t\tUsuario[] vu = ReturnArr.listadoUsuarios();\n\n\t\tMiObjectInputStream oi = null;\n\t\tboolean b = false, libPres = false;\n\n\t\ttry { // comprueba que el archivo FUSUARIOS existe antes de leerlo\n\t\t\toi = new MiObjectInputStream(new FileInputStream(Const.FUSUARIOS));\n\t\t\tb = true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Archivo no encontrado - bajaUsuario - \" + e.toString());\n\t\t}\n\n\t\tif (b) { // si el archivo existe, muestra en pantalla el listado de usuarios\n\t\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOSAUX, true);\n\t\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\n\t\t\ttry {\n\t\t\t\tint i = 0;\n\t\t\t\twhile (b) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tUsuario u = (Usuario) oi.readObject();\n\t\t\t\t\t\tif (i == id) {\n\t\t\t\t\t\t\tfor (int j = 0; j < Const.MAXLIBROSPRES; j++) {\n\t\t\t\t\t\t\t\tif (u.getLibrosPrestados()[j] != null) {\n\t\t\t\t\t\t\t\t\tlibPres = true;\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\t\t\t\t\t\t// cambiara el Usuario por un null cuando el id sea el mismo y no tenga libros\n\t\t\t\t\t\t// en prestamo.\n\t\t\t\t\t\tif (i == id && !libPres) {\n\t\t\t\t\t\t\tu = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Guardo los usuarios en el archivo\n\t\t\t\t\t\too.writeObject(u);\n\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} catch (EOFException e) {\n\t\t\t\t\t\tb = false;\n\t\t\t\t\t}\n\t\t\t\t} // finaliza el while para la lectura\n\t\t\t\too.close();\n\t\t\t\toi.close();\n\t\t\t} catch (Exception e) { // encaso de encontrar el archivos pero no puede leerlo\n\t\t\t\tSystem.out.println(\"Problemas al leer el archivo - bajaUsuario - \" + e.toString());\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Elimina el archivo antiguo de usuarios y en su lugar se renombra el auxiliar\n\t\t\t * con el de usuarios eliminado\n\t\t\t */\n\t\t\tBackup.reemplazoFich(Const.FUSUARIOS, Const.FUSUARIOSAUX);\n\t\t}\n\t}", "public static void getListOfAllFileVarianta2() {\n\t\tPath pathToSrc = Paths.get(\"D:\\\\TorrentsMd\");\r\n\t\ttry {\r\n\t\t\t//cu method references\r\n//\t\t\tFiles.walk(pathToSrc)\r\n//\t\t\t\t.map(Path::toFile)\r\n//\t\t\t\t.filter(File::isFile)\r\n//\t\t\t\t.map(File::getName)\r\n//\t\t\t\t.sorted()\r\n//\t\t\t\t.forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t//cu lambda, dar dpdv semantic sunt identice\r\n\t\t\tFiles.walk(pathToSrc)\r\n\t\t\t\t .map(path -> path.toFile()) //trasnform fiecare Path din stream intr-un File\r\n\t\t\t\t .filter(file -> file.isFile()) //filtrez doar fisierele\r\n\t\t\t\t .map(file -> file.getName())//transform fiecare File din stream intr-un String, care e numele sau\r\n\t\t\t\t .sorted()\r\n\t\t\t\t .forEach(file -> System.out.println(file));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void IntercambiarArchivos(byte[] archivoSinCifrar) {\r\n\t\ttry {\r\n\t\t\tString entry;\r\n\t\t\tServerSocket socketServidor = new ServerSocket();\r\n\t\t\tSocket client = socketServidor.accept();\r\n\t\t\t\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());\r\n\t ObjectInputStream ois = new ObjectInputStream(client.getInputStream());\r\n\t \t \r\n\t BufferedReader inFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\t BufferedWriter OutFromServer = new BufferedWriter( new OutputStreamWriter(client.getOutputStream() ) );\r\n\t \r\n\t OutputStream in = client.getOutputStream();\r\n\t DataOutputStream dataOut = new DataOutputStream(in);\r\n\t \r\n\t OutFromServer.write(\"GENERAR DH\");\r\n\t entry = inFromClient.readLine();\r\n\t if(entry.equals(\"LISTO PARA GENERAR DH\")) {\r\n\t \t\r\n\t }\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private String[] getNomeArquivosCaixa(File ordem) throws IOException\n\t{\n\t\tCollection arquivos = new LinkedList();\n\t\tFileReader \t\tfReader \t= new FileReader(ordem);\n\t\tBufferedReader \tbuffReader \t= new BufferedReader(fReader);\n\t\tString patternNomArqCaixa = getPropriedade(\"ordemVoucher.patternArquivosCaixa\");\n\t\tString linha=null;\n\t\twhile ( (linha=buffReader.readLine()) != null )\n\t\t\t/* Verifica se o pattern dos nomes de arquivos foi encontrado */\n\t\t\tif (linha.indexOf(patternNomArqCaixa) > -1)\n\t\t\t{\n\t\t\t\t/* Faz o split da linha que contem diferentes campos separados por \",\"\n\t\t\t\t * Utiliza a classe abaixo devido a maquina da Tecnomen possuir\n\t\t\t\t * a versao 1.3 do Java\n\t\t\t\t */\n\t\t\t\t//String campos[] = linha.split(\",\");\n\t\t\t\tStringTokenizer strToken = new StringTokenizer(linha,\",\");\n\t\t\t\tString campos[] = new String[strToken.countTokens()];\n\t\t\t\tfor (int i=0; i < campos.length; i++)\n\t\t\t\t\tcampos[i] = strToken.nextToken();\n\n\t\t\t\t/* O primeiro campo e o nome do arquivo */\n\t\t\t\tarquivos.add(campos[0]);\n\t\t\t}\n\n\t\tbuffReader.close();\n\t\tfReader.close();\n\t\treturn (String[])arquivos.toArray(new String[0]);\n\t}", "public void analizarArchivo(){\n\t\ttry{\n\t\t\twhile((caracter = inputStream.read())!=-1){\n\t\t\t\testado = analizador.analizarSimbolo(caracter);\n\t\t\t\t//outputStream.write(analizador.simbolo);\n\t\t\t\thistoriaStream.write(formatoEstado(estado));\n\t\t\t\tif(estado == 18 ){//La palabra es web o ebay\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: ebay \\n\");\n\t\t\t\t}else if(estado == 146){\n\t\t\t\t\toutputStream.write(\"Auto: Línea [\"+analizador.numero_lineas+\"] Palabra: web \\n\");\n\t\t\t\t}\n\t\t\t\tif(analizador.isPalabra == true || analizador.isLinea == true){\n\t\t\t\t\thistoriaStream.write(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Num. palabras: \"+analizador.numero_palabras+\" Numero líneas: \"+analizador.numero_lineas+\" Numero correctas: \"+analizador.numero_correctas);\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String[] rutaImagen) throws Exception;", "public void guardarPuntaje() {\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tBufferedWriter bw;\r\n\t\ttry {\r\n\t\t\tif (archivo.exists()) {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(\"\\r\\n\"+jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t}", "static void LeerArchivo(){ \r\n \t//iniciamos el try y si no funciona se hace el catch\r\n\r\n try{ \r\n \t//se crea un objeto br con el archivo de txt\r\n \tBufferedReader br = new BufferedReader( \r\n \tnew FileReader(\"reporte.txt\")\r\n );\r\n String s;\r\n //Mientras haya una linea de texto se imprime\r\n while((s = br.readLine()) != null){ \r\n System.out.println(s);\r\n }\r\n //se cierra el archivo de texto\r\n br.close(); \r\n } catch(Exception ex){\r\n \t//si no funciona se imprime el error\r\n System.out.println(ex); \r\n }\r\n }", "public void Listar()\n {\n File diretorio = new File(dir_arq_download);\n File[] arquivos = diretorio.listFiles();\n if(arquivos != null)\n {\n int length = arquivos.length;\n for(int i = 0; i < length; ++i)\n {\n File f = arquivos[i];\n if (f.isFile())\n {\n Arquivos.add(f.getName());\n }\n }\n\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>\n (this,android.R.layout.simple_dropdown_item_1line, Arquivos);\n SpnListarArquivos.setAdapter(arrayAdapter);\n }\n }", "public static void main(String[] args) throws IOException {\n TxtToDocX z = new TxtToDocX();\r\n Sala x = new Sala();\r\n z.catchNameFiles();\r\n\r\n for (int i = 0; i < nomeArquivos.length; i++) {\r\n z.LoadTxt(nomeArquivos[i]);\r\n }\r\n z.replaces();\r\n \r\n \r\n for (int i = 0; i < nomeArquivos.length; i++) {\r\n System.out.println(nomeArquivos[i]);\r\n }\r\n // z.replaces();\r\n for (int j = 0; j < salas2.size(); j++) {\r\n System.out.println(\"Turma: \" + salas2.get(j).getNome());\r\n for (int i = 0; i < salas2.get(j).getDadosalas().size(); i++) {\r\n if (salas2.get(j).getDadosalas().get(i).getSerie().equals(salas2.get(j).getNome())) {\r\n\r\n System.out.println(\"Matricula:\" + salas2.get(j).getDadosalas().get(i).getMatricula()\r\n + \" Nome:\" + salas2.get(j).getDadosalas().get(i).getNome()\r\n + \" Senha:\" + salas2.get(j).getDadosalas().get(i).getSenha() + \"\\n\");\r\n }\r\n }\r\n }\r\n \r\n z.WriteDocx();\r\n }", "public void Fecha() throws FileNotFoundException, IOException {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n // Apertura del fichero y creacion de BufferedReader para poder\r\n // hacer una lectura comoda (disponer del metodo readLine()).\r\n // Lectura del fichero\r\n String linea;\r\n \r\n for (b=0;b<5;b++){\r\n if (b==0){\r\n categoria=\"Embarazadas\";\r\n }\r\n if (b==1){\r\n categoria=\"Regulares\";\r\n }\r\n if (b==2){\r\n categoria=\"Discapacitados\";\r\n }\r\n if (b==3){\r\n categoria=\"Mayores\";\r\n }\r\n if (b==4){\r\n categoria=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+categoria+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerFecha == contador){\r\n errorFecha = linea.substring(1,2);\r\n if (errorFecha.equals(\"/\")){\r\n comparar = linea.substring(0, 1);\r\n if (\"1\".equals(comparar)){\r\n d1++;\r\n }\r\n if (\"2\".equals(comparar)){\r\n d2++;\r\n }\r\n if (\"3\".equals(comparar)){\r\n d3++;\r\n }\r\n if (\"4\".equals(comparar)){\r\n d4++;\r\n }\r\n if (\"5\".equals(comparar)){\r\n d5++;\r\n }\r\n if (\"6\".equals(comparar)){\r\n d6++;\r\n }\r\n if (\"7\".equals(comparar)){\r\n d7++;\r\n }\r\n if (\"8\".equals(comparar)){\r\n d8++;\r\n }\r\n if (\"9\".equals(comparar)){\r\n d9++;\r\n }\r\n } \r\n else{\r\n comparar1=linea.substring(0, 2);\r\n if (\"10\".equals(comparar1)){\r\n d10++;\r\n }\r\n if (\"11\".equals(comparar1)){\r\n d11++;\r\n }\r\n if (\"12\".equals(comparar1)){\r\n d12++;\r\n }\r\n if (\"13\".equals(comparar1)){\r\n d13++;\r\n }\r\n if (\"14\".equals(comparar1)){\r\n d14++;\r\n }\r\n if (\"15\".equals(comparar1)){\r\n d15++;\r\n }\r\n if (\"16\".equals(comparar1)){\r\n d16++;\r\n }\r\n if (\"17\".equals(comparar1)){\r\n d17++;\r\n }\r\n if (\"18\".equals(comparar1)){\r\n d18++;\r\n }\r\n if (\"19\".equals(comparar1)){\r\n d19++;\r\n }\r\n if (\"20\".equals(comparar1)){\r\n d20++;\r\n }\r\n if (\"21\".equals(comparar1)){\r\n d21++;\r\n }\r\n if (\"22\".equals(comparar1)){\r\n d22++;\r\n }\r\n if (\"23\".equals(comparar1)){\r\n d23++;\r\n }\r\n if (\"24\".equals(comparar1)){\r\n d24++;\r\n }\r\n if (\"25\".equals(comparar1)){\r\n d25++;\r\n }\r\n if (\"26\".equals(comparar1)){\r\n d26++;\r\n }\r\n if (\"27\".equals(comparar1)){\r\n d27++;\r\n }\r\n if (\"28\".equals(comparar1)){\r\n d28++;\r\n }\r\n if (\"29\".equals(comparar1)){\r\n d29++;\r\n }\r\n if (\"30\".equals(comparar1)){\r\n d30++;\r\n }\r\n if (\"31\".equals(comparar1)){\r\n d31++;\r\n }\r\n \r\n }\r\n leerFecha+=6;\r\n contador += 1;\r\n }\r\n \r\n else{\r\n contador += 1;\r\n \r\n \r\n }\r\n } \r\n }\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n }", "private void solicitaPecas(String nomeArquivoTorrent) throws UnknownHostException {\n\n try {\n\n // Passo 1 - Envia uma mensagem p ip do ArqTorrent com #+nomeArqTorrent\n ipServidor = getEnderecoRastreador(nomeArquivoTorrent);\n InetAddress enderecoServidor = InetAddress.getByName(ipServidor);\n String nomeArqOriginal = \"#\" + retornaNomeArq(nomeArquivoTorrent);\n DatagramPacket pacoteRequisicao = new DatagramPacket((nomeArqOriginal).getBytes(), nomeArqOriginal.length(), enderecoServidor, porto);\n soqueteCliente.send(pacoteRequisicao);\n\n //Recebe como resposta os pares que possuem alguma peça daquele arquivo\n DatagramPacket pacoteResposta = new DatagramPacket(new byte[256], 256);\n soqueteCliente.receive(pacoteResposta);\n String dadosResposta = new String(pacoteResposta.getData()).trim();\n System.out.println(\"Dados resposta: \" + dadosResposta);\n String[] ipPares = dadosResposta.split(\"-\");\n //System.out.println(\"Quantidade:\" +ipPares.length);\n\n\n //ARRUMAR ISSO DEPOIS\n String nomeArqePecas = \"$\" + retornaNomeArq(nomeArquivoTorrent)+\"/0-30\";\n DatagramPacket pacoteRequisicaoPecas = new DatagramPacket((nomeArqePecas).getBytes(), nomeArqePecas.length(), enderecoServidor, porto);\n soqueteCliente.send(pacoteRequisicaoPecas);\n\n System.out.println(\"nome: \"+nomeArqOriginal);\n Path path = Paths.get(nomeArqOriginal);\n\n File arquivoDados = path.toFile();\n RandomAccessFile arq = new RandomAccessFile(arquivoDados,\"rw\");\n int i=0;\n while(i<30){\n DatagramPacket peca = new DatagramPacket(new byte[1000], 1000);\n soqueteCliente.receive(peca);\n\n System.out.println(peca);\n String g = Metadados.geraChave(peca.getData());\n System.out.println(i + \"> \" + g);\n // writePeca(i,peca.getData(),arq);\n i++;\n }\n\n\n\n //DatagramPacket pacoteResposta = new DatagramPacket(new byte[25600], 25600);\n //soqueteCliente.receive(pacoteResposta);\n clienteTerminou = true;\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n }", "public static void archivoUsuariosNulos() throws Exception {\n\n\t\tFileOutputStream fo = new FileOutputStream(Const.FUSUARIOS, true);\n\t\tMiObjectOutputStream oo = new MiObjectOutputStream(fo);\n\n\t\tint i = 0;\n\t\twhile (i < Const.MAXUSUARIOS) {\n\n\t\t\tUsuario u = new Usuario();\n\t\t\tu = null;\n\t\t\too.writeObject(u);\n\n\t\t\t// Guardo los usuarios en el archivo\n\t\t\ti++;\n\n\t\t} // finaliza el while para la lectura\n\t\too.close();\n\t}", "public static void pokreniTagNadSvima(File[] files){\n\t for (File file : files) {\n\t \tif (file.isDirectory()) {\n\t //System.out.println(\"Directory: \" + file.getName());\n\t \t\tpokreniTagNadSvima(file.listFiles()); // Calls same method again.\n\t } else \n\t if(!file.getPath().contains(\".DS_Store\")){\n\t \t//System.out.println(file.getPath());\n\t \t //System.out.println(file.getAbsolutePath());\n\t \t//tekstovi.put((String)file.getPath(), vratiStringFajla((String)file.getPath()));\n\t \tnapraviTextFajloveKonacne(file.getAbsolutePath());\n\t \t//System.out.println((String)file.getPath()+vratiStringFajla((String)file.getPath()));\n\t }\n\t }\n\t \n\t \n\t\t//napraviTextFajloveKonacne(putanjaDoFajla)\n\t}", "private void cargarFichero() throws FileNotFoundException {\n\t\tFile miFichero = new File(NOMBRE_FICHERO);\n\t\tFileWriter erroresFichero;\n\t\t\n\t\tScanner in = new Scanner(miFichero);\n\t\t\n\t\tEjercicio nuevoEjer;\n\t\tString siguienteLinea;\n\t\tComprobadorEntradaFichero comprobador = new ComprobadorEntradaFichero();\n\t\tString errores = \"\";\n\t\tint numLinea = 1;\n\t\t\n\t\twhile (in.hasNextLine()) {\n\t\t\t\n\t\t\tsiguienteLinea = in.nextLine();\n\t\t\tif (comprobador.test(siguienteLinea)) {\n\t\t\t\tnuevoEjer = new Ejercicio(siguienteLinea);\n\t\t\t\tcoleccionEj.addEjercicio(nuevoEjer);\n\t\t\t} else {\n\t\t\t\t//Controlar cuántos errores va dando\n\t\t\t\terrores += \"Error en la línea: \" + String.valueOf(numLinea) + \". Datos: \" + siguienteLinea + \"\\n\";\n\t\t\t}\n\t\t\tnumLinea++;\n\t\t}\n\t\t\n\t\tin.close();\n\t\t\n\t\t\n\t\t//Ahora escribimos \n\t\tif (errores != \"\") {\n\t\t\ttry {\n\t\t\t erroresFichero = new FileWriter(NOMBRE_FICHERO_ERRORES);\n\t\t\n\t\t\t erroresFichero.write(errores);\n\n\t\t\t erroresFichero.close();\n\n\t\t\t} catch (Exception ex) {\n\t\t\t\tSystem.out.println(\"Mensaje de la excepción: \" + ex.getMessage());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void borraArchivos() {\n boolean isBorrado;\n for (BeanCargaOmisos dato : this.listadoCargaOmisos) {\n String dirBitacora = dato.getRutaEnBitacora();\n String dirRepositorio = dato.getRutaEnRepositorio();\n if (dirBitacora != null && !dirBitacora.isEmpty()) {\n File archivoBitacora = new File(dirBitacora);\n if (archivoBitacora.exists()) {\n isBorrado = archivoBitacora.delete();\n getLogger().debug(isBorrado);\n }\n }\n if (dirRepositorio != null && !dirRepositorio.isEmpty()) {\n File archivoRepositorio = new File(dirRepositorio);\n if (archivoRepositorio.exists()) {\n isBorrado = archivoRepositorio.delete();\n getLogger().debug(isBorrado);\n }\n }\n }\n }", "private void removeArquivos(File arquivoOrdem, String arquivosCaixa[]) throws IOException\n\t{\n\t\tfor (int i=0; i < arquivosCaixa.length; i++)\n\t\t{\n\t\t\t// Remove o arquivo concatenado que foi criptografado\n\t\t\tString extArqCriptografado \t= getPropriedade(\"ordemVoucher.extensaoArquivoCriptografado\");\n//\t\t\tString dirOrigem \t\t= getPropriedade(\"ordemVoucher.dirArquivos\");\n\t\t\tString nomArqCriptografado\t= arquivosCaixa[i]+extArqCriptografado;\n\t\t\tFile arquivoCriptografado\t= new File(nomArqCriptografado);\n\t\t\tSystem.out.println(\"Removendo arquivo \"+nomArqCriptografado);\n\t\t\tif (!arquivoCriptografado.delete())\n\t\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+nomArqCriptografado);\n\n\t\t\t// Remove o arquivo concatenado original\n\t\t\tString nomArqOrigem\t\t\t= arquivosCaixa[i];\n\t\t\tFile arquivoOrigem\t\t= new File(nomArqOrigem);\n\t\t\tSystem.out.println(\"Removendo arquivo \"+nomArqOrigem);\n\t\t\tif (!arquivoOrigem.delete())\n\t\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+nomArqOrigem);\n\t\t}\n\t\t\n\t\t/* Remove tambem o arquivo compactado que foi enviado para o GPP */\n\t\tFile arqCompactado = new File(getNomeArquivoCompactado(arquivoOrdem));\n\t\tSystem.out.println(\"Removendo arquivo \"+arqCompactado.getName());\n\t\tif (!arqCompactado.delete())\n\t\t\tSystem.out.println(\"Nao foi possivel remover o arquivo \"+arqCompactado.getName());\n\t}", "public void devolverArchivo(ArrayList<Alumno> lista) // Crea archivo de texto con la lista de datos ya ordenada\n {\n try\n {\n PrintWriter print = new PrintWriter(\"Registros Ordenados.txt\");\n for(int k=0; k<100; k++)\n {\n print.println(F0.get(k).getNombre() + \", \" + F0.get(k).getApellido() + \", \" + F0.get(k).getNoCnt());\n }\n print.close();\n }\n catch(Exception ex)\n {\n System.out.println(ex.getMessage());\n }\n }", "public void crearImagenes() {\n try {\n fondoJuego1 = new Imagenes(\"/fondoJuego1.png\",39,-150,-151);\n fondoJuego2 = new Imagenes(\"/fondoJuego2.png\",40,150,149);\n regresar = new Imagenes(\"/regresar.png\",43,90,80);\n highLight = new Imagenes(\"/cursorSubmenus.png\",43,90,80);\n juegoNuevo = new Imagenes(\"/juegoNuevo.png\",44,90,80);\n continuar = new Imagenes(\"/continuar.png\",45,90,80);\n tituloJuegoNuevo = new Imagenes(\"/tituloJuegoNuevo.png\",200,100,165);\n tituloContinuar = new Imagenes(\"/tituloContinuar.png\",201,100,40);\n tituloRegresar = new Imagenes(\"/tituloRegresar.png\",202,20,100);\n\t} catch(IOException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n\n\t\tArquivo arq = new Arquivo();\n\t\tint opcao = -1;\n\t\tScanner entrada = new Scanner(System.in);\n\t\tString caminhoArquivo, caminhoDiretorio, diretorio, diretorioNovo;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nPrograma de manipulação de arquivos e diretórios.\"\n\t\t\t\t\t\t\t\t+\"Digite uma das seguintes opções:\");\n\t\t\tSystem.out.println(\"1 para criar um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n2 para excluir um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n3 para renomear um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n4 para mover um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n5 para criar um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n6 para excluir um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n7 para renomear um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n8 para mover um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n9 para criar um arquivo e escrever um texto nesse mesmo arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n10 para ler um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n11 para exibir informações sobre um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n12 para exibir informações sobre um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n13 para exibir todos os arquivos e subdiretórios de um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n0 para encerrar\");\n\t\t\ttry {\n\t\t\t\topcao = entrada.nextInt();\n\t\t\t}\n\t\t\tcatch(InputMismatchException e) {\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tentrada.nextLine();\n\t\t\t\n\t\t\tswitch (opcao) {\n\t\t\tcase 0:\n\t\t\t\tSystem.out.println(\"Programa encerrado!\");\n\t\t\t\tentrada.close();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.criarArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.excluirArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o novo nome do arquivo: \");\n\t\t\t\tString novoNome = entrada.nextLine();\n\t\t\t\tarq.renomearArquivo(caminhoArquivo, novoNome);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o novo destino do arquivo: \");\n\t\t\t\tString novoCaminho = entrada.nextLine();\n\t\t\t\tarq.moverArquivo(caminhoArquivo, novoCaminho);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"Digite o caminho do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tarq.criarDiretorio(diretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"Digite o caminho do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tarq.excluirDiretorio(diretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 7:\n\t\t\t\tSystem.out.println(\"Digite o caminho atual do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o caminho novo do diretório: \");\n\t\t\t\tdiretorioNovo = entrada.nextLine();\n\t\t\t\tarq.renomearDiretorio(diretorio, diretorioNovo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 8:\n\t\t\t\tSystem.out.println(\"Digite o caminho atual do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o caminho novo do diretório: \");\n\t\t\t\tdiretorioNovo = entrada.nextLine();\n\t\t\t\tarq.moverDiretorio(diretorio, diretorioNovo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 9:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Escreva o texto a ser incluído no arquivo: \");\n\t\t\t\tString texto = entrada.nextLine();\n\t\t\t\tarq.criaEEscreveNoArquivo(caminhoArquivo, texto);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 10:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite 't' para ler todas as linhas do arquivo e\"\n\t\t\t\t\t\t\t\t\t+\" 'p' para selecionar as linhas do arquivo a serem lidas: \");\n\t\t\t\tchar lerLinhas = entrada.next().charAt(0);\n\t\t\t\tif(lerLinhas == 't')\n\t\t\t\t\tarq.lerArquivo(caminhoArquivo);\n\t\t\t\telse if(lerLinhas == 'p') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Digite a linha inicial a ser lida: \");\n\t\t\t\t\t\tint linhaIni = entrada.nextInt();\n\t\t\t\t\t\tSystem.out.println(\"Digite a linha final a ser lida: \");\n\t\t\t\t\t\tint linhaFinal = entrada.nextInt();\n\t\t\t\t\t\tarq.lerArquivo(caminhoArquivo, linhaIni, linhaFinal);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(InputMismatchException e) {\n\t\t\t\t\t\tSystem.out.println(\"Entrada inválida!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Opção inválida!\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 11:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.infosDoArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 12:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do diretório: \");\n\t\t\t\tcaminhoDiretorio = entrada.nextLine();\n\t\t\t\tarq.infosDoDiretorio(caminhoDiretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 13:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do diretório: \");\n\t\t\t\tcaminhoDiretorio = entrada.nextLine();\n\t\t\t\tarq.infosArqESubdirDoDiretorio(caminhoDiretorio);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Operação inválida!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}while(opcao != 0);\n\t}", "public static void borrarhijoRecursivo(Path carpetaHija) {\n\n\t\tDirectoryStream<Path> hijosCarpeta;// Este objeto sirve para poder iterar directorios lo convertimos en una\n\t\t\t\t\t\t\t\t\t\t\t// especie\n\t\t// de lista para guardar varios Path\n\n\t\ttry {\n\n\t\t\thijosCarpeta = Files.newDirectoryStream(carpetaHija);// hacemos esto para crear diferentes Path en los\n\t\t\t// subdirectorios de carpeta\n\n\t\t\t// y en el segundo borrar los ficheros\n\t\t\tfor (Path entry : hijosCarpeta) {\n\n\t\t\t\tif (Files.isDirectory(entry)) {\n\t\t\t\t\tSystem.out.println(\"entrando en\" + entry);\n\t\t\t\t\tborrarhijoRecursivo(entry);\n\t\t\t\t} else {\n\n\t\t\t\t\tSystem.out.println(\"borrando\" + entry);\n\t\t\t\t\tFiles.delete(entry);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Borrando carpeta \" + carpetaHija.toAbsolutePath());\n\t\t\tFiles.delete(carpetaHija);\n\n\t\t\t// llamamos otra vez a la funcion recursivamente para crear la carpeta\n\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}", "private static void recorrerDirectorios(File[] ficheros, \n\t\t\tint indice, String texto) {\n\t\tif (indice <= ficheros.length - 1) {\n\t\t\tif (ficheros[indice].isDirectory()) {\n\t\t\t\t// si es directorio\n\t\t\t\tFile nuevo = new File(ficheros[indice].getPath());\n\t\t\t\tFile[] tabla = nuevo.listFiles();\n\t\t\t\trecorrerFicheros(tabla, 0, texto);\n\t\t\t\trecorrerDirectorios(tabla, 0, texto);\n\t\t\t\tindice++;\n\t\t\t\trecorrerDirectorios(ficheros, indice, texto);\n\t\t\t} else {\n\t\t\t\tindice++;\n\t\t\t\trecorrerDirectorios(ficheros, indice, texto);\n\t\t\t}\n\t\t}\n\t}", "void separateOut() {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir\n + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n if (outputType.equals(\"Text\")) {\n FileWriter writer = new FileWriter(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".txt\", false);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n document.save(outputDir + flist.get(i).getName().substring(0,\n flist.get(i).getName().lastIndexOf(\".\")) + \".pdf\");\n document.close();\n }\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public void grabaArchivo() throws IOException {\n\n System.out.println(\"Grabando archivo\");\n PrintWriter fileOut = new PrintWriter(new FileWriter(\"src/images/save.txt\"));\n for (int i = 0; i < vec.size(); i++) {\n\n Object x = vec.get(i);\n\n if (x instanceof Player) {\n x = (Player) vec.get(i);\n fileOut.println(x.toString());\n } else if (x instanceof Shot) {\n x = (Shot) vec.get(i);\n fileOut.println(x.toString());\n } else if (x instanceof Alien){\n x = (Alien) vec.get(i);\n fileOut.println(x.toString());\n } else {\n fileOut.println((String) x);\n }\n }\n\n vec.clear();\n fileOut.close();\n }", "public ArchivoClientes(){\n\t\t\n\t\tif(archivo.exists()){\n\t\t\t//System.out.println(\"El archivo ya existe\");\n\t\t}else{\n\t\t\ttry {\n\t\t\t\t//archivo.mkdir();\n\t\t\t\tarchivo.createNewFile();\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Creación del archivo clientes: \" +e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public GestorArchivos(String numeroArchivo)\r\n {\r\n this.rutaArchivoEntrada = new File(\"archivostexto/in/in\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n this.rutaArchivoSalida = new File(\"archivostexto/out/out\" + numeroArchivo + \".txt\").getAbsolutePath().replace(\"\\\\\", \"/\");\r\n }", "private static void listarDirectorio(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"CURRENT DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t}", "private void asignarDestinosAScannersHijos() {\n\t\tPasadaPorScanner pasadaPorScannerHija = crearPasadaPorScannerHija();\n\t\tthis.pasadasPorScannerHijas.add(pasadaPorScannerHija);\n\n\t\tfor (Destino destinoAAsignar : this.destinos) {\n\t\t\tPasadaPorScanner ultimaPasadaPorScanner = this.pasadasPorScannerHijas\n\t\t\t\t\t.get(this.pasadasPorScannerHijas.size() - 1);\n\t\t\tif (!this.estaLlenoElScanner(ultimaPasadaPorScanner, destinoAAsignar) || esElUltimoScanner()) {\n\t\t\t\tultimaPasadaPorScanner.agregarDestinoAProcesar(destinoAAsignar);\n\t\t\t\tdestinoAAsignar.agregarNodoPorDondePaso(ultimaPasadaPorScanner.getId());\n\t\t\t} else {\n\t\t\t\tPasadaPorScanner nuevaPasadaPorScanner = crearPasadaPorScannerHija();\n\t\t\t\tnuevaPasadaPorScanner.agregarDestinoAProcesar(destinoAAsignar);\n\t\t\t\tthis.pasadasPorScannerHijas.add(nuevaPasadaPorScanner);\n\t\t\t\tdestinoAAsignar.agregarNodoPorDondePaso(nuevaPasadaPorScanner.getId());\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n\t\tArrayList<CorreoElectronico> correo = new ArrayList<>();\r\n\r\nPath path = Paths.get(\"src/main/resources/emails.txt\");\r\n\r\n try(BufferedReader reader = Files.newBufferedReader(path, Charset.forName(\"UTF-8\"))){ \r\n\r\n String currentLine = null;\r\n\r\n while((currentLine = reader.readLine()) != null){//while there is content on the current line\r\n\r\n \t CorreoElectronico correos = new CorreoElectronico();\r\n \t String[] linea = currentLine.split(\" , \");\r\n \t correos.setDireccion(linea[0]);\r\n \t correos.setAsunto(linea[1]);\r\n \t correo.add(correos);\r\n System.out.println(currentLine); // print the current line\r\n\r\n }\r\n\r\n }catch(IOException ex){\r\n\r\n ex.printStackTrace(); //handle an exception here\r\n\r\n }\r\nEnviadorCorreo enviador = new EnviadorCorreo();\r\nfor (CorreoElectronico coreos: correo) {\r\n\tenviador.enviarCorreo(coreos);\r\n}\r\n\r\n\t}", "private void todos(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n ResultSet resultado = null;//Objeto para obtener los resultados de las consultas sql\r\n String sql = \"\";\r\n try {\r\n con = conBD.getCConexion();\r\n //Definición de Sentencia SQL\r\n //sql = \"SELECT semail,sclave,nestado,snombre,sapellido,stelefono,sgenero,nidPerfil FROM usuarios\";\r\n sql = \"SELECT semail,sclave,nestado,usuarios.snombre,sapellido,stelefono,sgenero,nidPerfil,\"\r\n + \"(case WHEN nestado=0 THEN 'Inactivo' ELSE 'Activo' END) AS sestado,\"\r\n + \"(case WHEN sgenero=0 THEN 'Femenino' ELSE 'Masculino' END) AS desgenero,\"\r\n + \"perfiles.snombre \"\r\n + \"FROM usuarios,perfiles \"\r\n + \"where usuarios.nidPerfil=perfiles.idPerfil \"\r\n + \"order by usuarios.snombre\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeQuery(sql);\r\n\r\n //arreglo donde se gurdaran los usuarios encontrados en la BD\r\n ArrayList Usuarios = new ArrayList();\r\n while (resultado.next()) //si el resultado tiene datos empezar a guardarlos.\r\n {\r\n Usuario e = new Usuario(resultado.getString(1), resultado.getString(2),\r\n resultado.getString(4), resultado.getString(5), resultado.getString(6), resultado.getString(7),\r\n resultado.getInt(8), resultado.getInt(3));\r\n //agregamos las descripciones al objeto.\r\n e.setDescripcionEstado(resultado.getString(9));\r\n e.setDescripcionGenero(resultado.getString(10));\r\n e.setDescripcionPerfil(resultado.getString(11));\r\n //Agregamos el estudiante al arrelo\r\n Usuarios.add(e);\r\n }\r\n // Agregar el arreglo de estudiantes a la solicitud\r\n request.setAttribute(\"usuarios\", Usuarios);\r\n //redirigir la solicitu a la página JSP\r\n request.getRequestDispatcher(\"/ListaUsuarios.jsp\").include(request, response);\r\n //cerrar la conexion\r\n //con.close();\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }", "public void segunda_parte(String path) {\r\n\t\tArrayList<String>palabras=new ArrayList<String>();\r\n\t\tint i=0,j=0;\r\n\t\tboolean flag_to_stop=false;\r\n\t\tString first_string=\"\",second_string=\"\";\r\n\t\tFile archivo=new File(path);\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(archivo);\r\n\t\t\twhile(sc.hasNext()) {\r\n\t\t\t\tpalabras.add(sc.nextLine());\r\n\t\t\t}\r\n\t\t\tsc.close(); //when i've all the strings on memory, i dont really need the file anymore\r\n\t\t\tfor(i=0;i<palabras.size();i++) {\r\n\t\t\t\tfor(j=0;j<palabras.size();j++) {\r\n\t\t\t\t\tif(i!=j) { //to avoid compare the same word\r\n\t\t\t\t\t\tif(comparador_de_strings(palabras.get(i), palabras.get(j))==1) {\r\n\t\t\t\t\t\t\tfirst_string=palabras.get(i);\r\n\t\t\t\t\t\t\tsecond_string=palabras.get(j);\r\n\t\t\t\t\t\t\tflag_to_stop=true;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else;\r\n\t\t\t\t} if(flag_to_stop) {\r\n\t\t\t\t\teliminar_letra_extra(first_string, second_string);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\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}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tPath ulaznaPutanja = Paths.get(\"input.txt\");\n\t\t\n\t\t// Neke zanimljivosti\n\t\tSystem.out.println(\"path.toString() = \" + ulaznaPutanja/*.toString()*/);\n\t\t\n\t\t// Npr ako je path: /home/korisnik/Desktop/input.txt\n\t\t// getFileName(): vratice se \"input.txt\"\n\t\t// getParent(): vratice se \"/home/korisnik\"\n\t\t// getRoot(): vratice se \"/\"\n\t\tSystem.out.println(\"Ime datoteke: \" + ulaznaPutanja.getFileName());\n\t\tSystem.out.println(\"Parent putanje: \" + ulaznaPutanja.getParent());\n\t\tSystem.out.println(\"Root: \" + ulaznaPutanja.getRoot());\n\t\t\n\t\t// Izuzetno koristan metod za slucaj da nam se ne pronalazi datoteka\n\t\t// koja je zadataka relativno (jer najcesce ne znamo od odnosu NA STA je relativno).\n\t\tSystem.out.println(\"Apsolutna putanja: \" + ulaznaPutanja.toAbsolutePath().toString());\n\t\tSystem.out.println();\n\t\t\n\t\t// ----------------------------------------------------------------------------------------\n\t\t// CITANJE\n\t\t// ----------------------------------------------------------------------------------------\n\t\ttry {\n\t\t\t// Liste i ostale genericke kolekcije u Javi ce biti obradjeni narednih casova.\n\t\t\t// Za sada, dovoljno nam je da znamo da iteriramo kroz listu.\n\t\t\t// StandardCharsets predstavlja klasu kojoj mozemo pronaci kodiranje koje nam je potrebno.\n\t\t\t// Na kursu cemo uvek specifikovati UTF_8.\n\t\t\tList<String> linije = Files.readAllLines(ulaznaPutanja, StandardCharsets.UTF_8);\n\t\t\tSystem.out.println(\"Sadrzaj datoteke:\" + ulaznaPutanja.toAbsolutePath());\n\t\t\tfor (String linija: linije)\n\t\t\t\tSystem.out.println(linija);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Neuspelo otvaranje ulazne datoteke!\");\n\t\t\te.printStackTrace();\n\t\t} \n\n\t\t// ----------------------------------------------------------------------------------------\n\t\t// PISANJE\n\t\t// ----------------------------------------------------------------------------------------\n\t\tPath izlaznaPutanja = Paths.get(\"output.txt\");\n\t\tSystem.out.println(\"\\nPisemo u datoteku: \" + izlaznaPutanja.toAbsolutePath());\n\t\tList<String> linije;\n\t\t\n\t\t// Primer kako mozemo da inicijalizujemo listu (slicno poput int[] a = {1, 2, 3, 4};\n\t\tlinije = Arrays.asList(\"Zdravo\", \" \", \"svete\", \"!\");\n\n\t\ttry {\n\t\t\t// Klasa StandardOpenOption omogucava da specifikujemo na koji nacin se \"otvara\" datoteka.\n\t\t\t// Odnosno, da li da ukoliko postoji datoteka, ne uspe otvaranje (eng. File already exists),\n\t\t\t// da li da se pisanje vrsi tako sto se stari sadrzaj obrise, ili se ipak pise na kraj datoteke i slicno.\n\t\t\t// Ukoliko se ne specifikuju opcije java radi:\n // * StandardOpenOption.CREATE \t\t\t\t\t- kreira datoteku \n // * StandardOpenOption.TRUNCATE_EXISTING \t\t- brise prethodni sadrzaj ukoliko postoji\n\t\t\t// Files.write(izlaznaPutanja, linije);\n\t\t\tFiles.write(izlaznaPutanja, linije, StandardOpenOption.APPEND); \t// dodaje sadrzaj na kraj datoteke\n\t\t\tSystem.out.println(\"Sadrzaj je uspesno upisan!\");\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Neuspelo pisanje u datotekU!\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public void exibeTodosPassageiros(TextArea x)\n\t{\n\t\ttry {\n\t\t\t\n\t\t\tstmt=con.prepareStatement(\" select idbilhete, nome,origem,destino from passageiro,bilhetes where idbilhete=id_bilhete \\r\\n\" + \n\t\t\t\t\t\"order by idbilhete;\");\n\t\t\t\n\t\t\t\n\t\t\tstmt.execute();\n\t\t\t\n\t\t\t\n\t\t\trs=stmt.getResultSet();\n\t\t\t\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t\t\n\t\t\t{\n\t\t\t\t\n\t\t\t\tint bilhete = rs.getInt(1);\n\t\t\t\tString nome = rs.getString(2);\n\t\t\t\tString destino =rs.getString(3);\n\t\t\t\tString origem =rs.getString(4);\n\t\t\t\t\n\t\t\t\t\n\t\t\t \n\n\t\t\t\tx.append(\"\\r\\n | \"+ bilhete + \" | - \" + nome+\" - \"+ origem +\" - \" + destino + \" \\t\\t\\r\\n\\t\\r\\n \");\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t\t\n\t}", "public int Tipo() {\r\n File archivo = null;\r\n FileReader fr = null;\r\n BufferedReader br = null;\r\n \r\n try {\r\n String linea;\r\n for (a=0;a<5;a++){\r\n if (a==0){\r\n tipo=\"Embarazadas\";\r\n }\r\n if (a==1){\r\n tipo=\"Regulares\";\r\n }\r\n if (a==2){\r\n tipo=\"Discapacitados\";\r\n }\r\n if (a==3){\r\n tipo=\"Mayores\";\r\n }\r\n if (a==4){\r\n tipo=\"Corporativos\";\r\n }\r\n archivo = new File (System.getProperty(\"user.dir\")+\"/Clientes/\"+tipo+\".txt\");\r\n fr = new FileReader (archivo);\r\n br = new BufferedReader(fr);\r\n while((linea=br.readLine())!=null){\r\n if (leerTipo == contador){\r\n errorTipo =String.valueOf(String.valueOf(leerTipo).length());\r\n if (a==0){\r\n resultadoembarazadas+=1;\r\n }\r\n if (a==1){\r\n resultadoregulares+=1;\r\n }\r\n if (a==2){\r\n resultadodiscapacitados+=1;\r\n }\r\n if (a==3){\r\n resultadomayores+=1;\r\n }\r\n if (a==4){\r\n resultadocorporativos+=1;\r\n }\r\n contador +=1;\r\n leerTipo +=6;\r\n\r\n }\r\n else{\r\n contador += 1;\r\n }\r\n }\r\n }\r\n\r\n }\r\n catch(Exception e){\r\n e.printStackTrace();\r\n }finally{\r\n // En el finally cerramos el fichero, para asegurarnos\r\n // que se cierra tanto si todo va bien como si salta \r\n // una excepcion.\r\n try{ \r\n if( null != fr ){ \r\n fr.close(); \r\n } \r\n }catch (Exception e2){ \r\n e2.printStackTrace();\r\n }\r\n }\r\n //return resultado;\r\n return 0;\r\n }", "void mergeOut() {\n String outputName = outputDir + flist.get(0).getName().substring(0,\n flist.get(0).getName().lastIndexOf(\".\"));\n if (outputType.equals(\"Text\")) {\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n for (int j = 1; j < images.length; j++) {\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n }\n bWriter.close();\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n FileWriter writer = new FileWriter(outputName + \".txt\", true);\n BufferedWriter bWriter = new BufferedWriter(writer);\n while ((line = r.readLine()) != null) {\n bWriter.write(line);\n bWriter.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n bWriter.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } else if (outputType.equals(\"PDF\")) {\n PDDocument document = new PDDocument();\n for (int i = 0; i < files.size(); i++) {\n Process p;\n String line;\n try {\n if (files.get(i).startsWith(\"pdf\")) {\n String[] images = files.get(i).split(\"\\n\");\n for (int j = 1; j < images.length; j++) {\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n p = Runtime.getRuntime().exec(SCRIPT + images[j]);\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n //cleanTempImages(images);\n } else if (files.get(i).startsWith(\"err\")) {\n System.out.println(\"Error with reading pdf.\");\n //cleanTempImages(files.get(i).split(\"\\n\"));\n } else {\n p = Runtime.getRuntime().exec(SCRIPT + files.get(i));\n BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));\n PDPage page = new PDPage();\n document.addPage(page);\n PDPageContentStream contentStream = new PDPageContentStream(document, page);\n contentStream.beginText();\n contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n contentStream.setLeading(14.5f);\n contentStream.newLineAtOffset(25, 700);\n while ((line = r.readLine()) != null) {\n contentStream.showText(line);\n contentStream.newLine();\n //textArea.setText(textArea.getText() + line + \"\\n\");\n }\n contentStream.endText();\n contentStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n try {\n document.save(outputName + \".pdf\");\n document.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "public void ejecutarCargue() {\n String respuesta = null;\n try {\n loggerApp.info(\"Cargues masivos timbres - ejecutar cargue\");\n if (!validarExtension(Constantes.EXTENSIONES_ARCHIVO_EXCEL, file)) {\n abrirModal(\"SARA\", \"Error: El archivo \" + (null == file ? \" \" : file.getName()) + \" no cumple con el formato de extensión válido \" + Constantes.EXTENSIONES_ARCHIVO_EXCEL, null);\n return;\n }\n generarListaData();\n cargarTimbresMasivosObjectContext.setAtributo(\"listaTimbres\", listaData);\n this.servletHelper = new CargarTimbresMasivosServletHelper(sessionLocal, cargarTimbresMasivosObjectContext, objectContext, sessionAjustes, cuadreCifrasSessionLocal, cajeroSession);\n if (this.servletHelper != null) {\n respuesta = servletHelper.obtenerDatos();\n }\n if (respuesta != null && !respuesta.trim().isEmpty()) {\n abrirModal(\"SARA\", respuesta, null);\n }\n } catch (FileStructureException ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", ex.getMessage(), null);\n } catch (Exception ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", Constantes.MSJ_ERROR_INTERNO, null);\n }\n\n }", "public ControladorArchivos() {\n diccionarioEncriptado = new HashMap<>();\n llenarDiccionario();\n for (Map.Entry<String, String> entry : diccionarioEncriptado.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n System.out.println(key);\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tListaNombre nombres = new ListaNombre();\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"guido\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"juan\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"daria\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.add(new Nombre(\"pedro\"));\n//\t\tnombres.setCantRepetidos(3);\n//\t\tfor (Nombre nom : nombres.getNombres()) {\n//\t\t\tSystem.out.println(nom.getNombre() + \" \" + nom.getCant());\n//\t\t}\n\t\tnombres = ( Archivo.leer(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\premioA.in\"));\n\t\tArchivo.escribir(\"C:\\\\Users\\\\guido\\\\eclipse-workspace\\\\DescubriendoNombresRepetidos\\\\salida.out\",nombres);\n\t}", "void registrarArticulosMigracion(Integer codigoCompania, String namefile, Date fechaEjecucion, List<? extends MigrarDatosProcesoVentaDTO> listaDatosArchivoFTP) throws SICException, ParseException;", "public String[] parseToProblema (String rutaFichero) {\n String[] problema = new String[3];\n String fichero = \"\";\n try (BufferedReader reader = new BufferedReader (new FileReader(rutaFichero))) { \n String line = reader.readLine();\n while (line != null) {\n fichero = fichero.concat(line);\n line = reader.readLine();\n }\n } catch (IOException ex) {\n System.out.println(\"ERROR AL LEER EL FICHERO JSON\");\n }\n \n JSONObject obj = new JSONObject (fichero);\n problema[0] = obj.getString(\"INITIAL\");\n problema[1] = obj.getString(\"OBJETIVE\");\n problema[2] = obj.getString(\"MAZE\");\n \n return problema;\n }", "public void leerDeFichero() {\n try\n {\n Scanner sc = new Scanner(new File(\"texto.txt\"));\n while (sc.hasNextLine() && !textoCompleto())\n addFrase(sc.nextLine());\n sc.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void CargarDatosUsuario(String nickname, String mail, String nombre, String pass, DataDireccion direccion, String apellido, Date fechaNacimiento, String rutaImagen);", "public ArrayList<String> listarArquivosTxt() {\n try {\n return metodos.listarArquivos();\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public static ArrayList<Jugador> leerFicheroMercado(ArrayList<Jugador> arrayJugadores) {\n ArrayList<Jugador> arrayMercado = new ArrayList<>();\n File aFile = new File(\"./src/ficheros/Mercado.txt\");\n\n try {\n FileReader fr = new FileReader(aFile);\n BufferedReader br = new BufferedReader(fr);\n String linea = br.readLine();\n\n while (linea != null) {\n String[] dividir = linea.split(\";\");\n\n for (int i = 0; i < dividir.length - 1; i++) {\n for (int j = 0; j < arrayJugadores.size(); j++) {\n if (arrayJugadores.get(j).getNombre().equals(dividir[i])) {\n arrayMercado.add(arrayJugadores.get(j));\n break;\n }\n }\n }\n linea = br.readLine();\n\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return arrayMercado;\n\n }", "private static void escribirArchivo(String nombre, String contenido, boolean agregar) {\n\n\t\tFileOutputStream archivo = null;\n\t\tBufferedOutputStream buffer = null;\n\t\tbyte entrada[] = new byte [100];\n\t\tArrayList<String> lista = new ArrayList<String>(5);\n\n\t\ttry {\n\t\t\tarchivo = new FileOutputStream(nombre, agregar);\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbuffer = new BufferedOutputStream(archivo);\n\t\t\tbuffer.write(contenido.getBytes());\n\t\t\tbuffer.write(\"\\n\".getBytes());\n\t\t\tbuffer.flush();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void concatePlainText(String[] filenames, String desFileName) {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(desFileName));\n //StringBuffer buffer=new StringBuffer();\n for (String filename : filenames) {\n BufferedReader reader = new BufferedReader(new FileReader(filename));\n String str;\n while ((str = reader.readLine()) != null) {\n // buffer.append(str);\n writer.write(str);\n writer.newLine();\n }\n reader.close();\n }\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void cargarArchivoAlumnos() {\n String aux = \"\";\n String texto = \"\";\n\n JFileChooser file = new JFileChooser();\n file.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\n //Filtro\n FileNameExtensionFilter filtro = new FileNameExtensionFilter(\"*.XML\", \"xml\");\n\n file.setFileFilter(filtro);\n\n int seleccion = file.showOpenDialog(this);\n\n if (seleccion == JFileChooser.APPROVE_OPTION) {\n File fichero = file.getSelectedFile();\n\n insertarAlumnos(fichero.getPath());\n\n }\n }", "protected JSONArray getTacoFichas() {\n\t\tJSONArray jsa = new JSONArray();\r\n\t\tfor (int i = 0; i < this.fichasMesa.size(); i++) {\r\n\t\t\tjsa.put(this.fichasMesa.get(i).toJSON());\r\n\t\t}\r\n\t\treturn jsa;\r\n\t}", "List<String> obtenerlineas(String archivo) throws FileException;", "@Test\n\tpublic void testListarVazio() throws IOException {\n\t\t// 1) criar o arquivo de dados vazio\n\t\tString nomeArquivo = \"dados.txt\";\n\t\tnew File(nomeArquivo).createNewFile();\t\t\n\t\t// 2) criar o processador de arquivos\n\t\t// utilizando o arquivo criado acima\n\t\tProcessadorDeArquivoSequencial pas = \n\t\t\t\tnew ProcessadorDeArquivoSequencial(\n\t\t\t\t\t\tnomeArquivo);\n\t\t// 3) solicitar a listagem dos registros\n\t\t// do processador\n\t\tList<Registro> lista = pas.listar();\n\t\t// 4) verificar tamanho zero dos registros\n\t\tAssert.assertTrue(lista.isEmpty());\n\t\t// 5) excluir o arquivo criado\n\t\tnew File(nomeArquivo).delete();\n\t}", "public void criaListaArqLocal(String diretorio) {\r\n\t\tFile arquivo = new File(diretorio);\r\n\t\tFile[] aux = null;\r\n\t\taux = arquivo.listFiles();\r\n\t\tif ((this.aFilesNaPasta.size() == 0) && (this.aPastas.size() == 0)) {\r\n\t\t\tfor (int i = 0; i < aux.length; i++) {\r\n\t\t\t\tif (aux[i].isFile()) {\r\n\t\t\t\t\tthis.aFilesNaPasta.add(aux[i].getName());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.aPastas.add(aux[i].getName());\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tthis.aFilesRemPasta.clear();\r\n\t\t\tthis.aPastasRemovidas.clear();\r\n\t\t} else {\r\n\t\t\taFilesRemPasta.addAll(aFilesNaPasta);\r\n\t\t\taFilesNaPasta.clear();\r\n\t\t\taPastasRemovidas.addAll(aPastas);\r\n\t\t\taPastas.clear();\r\n\t\t\tfor (int i = 0; i < aux.length; i++) {\r\n\t\t\t\tif (aux[i].isFile()) {\r\n\t\t\t\t\tthis.aFilesNaPasta.add(aux[i].getName());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.aPastas.add(aux[i].getName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void abrirArchivo() {\r\n try {\r\n entrada = new Scanner(new File(\"estudiantes.txt\"));\r\n } // fin de try\r\n catch (FileNotFoundException fileNotFoundException) {\r\n System.err.println(\"Error al abrir el archivo.\");\r\n System.exit(1);\r\n } // fin de catch\r\n }", "public void cargarProductosVendidos() {\n try {\n //Lectura de los objetos de tipo productosVendidos\n FileInputStream archivo= new FileInputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectInputStream ruta = new ObjectInputStream(archivo);\n productosVendidos = (ArrayList) ruta.readObject();\n archivo.close();\n \n \n } catch (IOException ioe) {\n System.out.println(\"Error de IO: \" + ioe.getMessage());\n } catch (ClassNotFoundException cnfe) {\n System.out.println(\"Error de clase no encontrada: \" + cnfe.getMessage());\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }" ]
[ "0.6687478", "0.6529938", "0.65074533", "0.6469516", "0.64455485", "0.63158125", "0.6271771", "0.6156713", "0.61394626", "0.61168975", "0.6105473", "0.60990655", "0.6044922", "0.60397726", "0.59490746", "0.5948175", "0.59219563", "0.58808136", "0.58255875", "0.58076054", "0.5803031", "0.5801612", "0.579347", "0.5780252", "0.5748957", "0.5728835", "0.5722267", "0.57088304", "0.5667633", "0.5663901", "0.5657482", "0.56561255", "0.56480515", "0.56479347", "0.56478506", "0.56431425", "0.56383806", "0.56280625", "0.5627359", "0.562272", "0.5611469", "0.5597811", "0.5586173", "0.55838555", "0.5565056", "0.55630267", "0.55619216", "0.55610365", "0.5554979", "0.55547994", "0.5554742", "0.5549878", "0.55474925", "0.5538803", "0.553716", "0.55359364", "0.55307275", "0.5523373", "0.5518663", "0.55117387", "0.55036116", "0.5490656", "0.5488273", "0.54839987", "0.54735327", "0.5473411", "0.5467019", "0.5464413", "0.5458854", "0.54572916", "0.5426284", "0.54201794", "0.5412343", "0.54048365", "0.53990966", "0.5396502", "0.53943795", "0.53931063", "0.5392048", "0.53743017", "0.5369784", "0.5362519", "0.5356078", "0.53488183", "0.534441", "0.5340362", "0.53403395", "0.53356504", "0.5324307", "0.53239155", "0.53221935", "0.5316936", "0.53167695", "0.5314608", "0.53103125", "0.5300999", "0.5300983", "0.5290457", "0.5288651", "0.52836436", "0.52699107" ]
0.0
-1
Getter method for property data.
public Data getData() { return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getData(){\n\t\treturn this.data;\n\t}", "@Override\r\n\t\tpublic Meta_data getData() {\n\t\t\treturn this.data;\r\n\t\t}", "public Object getData() {\n\t\treturn data;\n\t}", "public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}", "public Object data() {\n return this.data;\n }", "public String getData() {\r\n return this.data;\r\n }", "public PData getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn this.data;\n\t}", "Object getData() { /* package access */\n\t\treturn data;\n\t}", "public T getData() {\n return this.data;\n }", "T getData() {\n\t\treturn data;\n\t}", "public T getData()\n\t{ \treturn this.data; }", "@java.lang.Override\n public godot.wire.Wire.Value getData() {\n return data_ == null ? godot.wire.Wire.Value.getDefaultInstance() : data_;\n }", "public String getData()\n {\n return data;\n }", "public T getData()\n\t{\n\t\treturn this.data;\n\t}", "public Object getData() \n {\n return data;\n }", "T getData() {\n return this.data;\n }", "public java.lang.String getData() {\r\n return data;\r\n }", "public T getData(){\n return this.data;\n }", "public String getData() {\n\treturn data;\n }", "public String getData() {\r\n\t\treturn data;\r\n\t}", "public String getData()\n\t{\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n\t\treturn data;\n\t}", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String getData() {\n return data;\n }", "public String data() {\n return this.data;\n }", "public E getData(){\n\t\t\treturn data;\n\t\t}", "@Override\r\n\tpublic E getData() {\n\t\treturn data;\r\n\t}", "public String getData() {\r\n\t\t\treturn data;\r\n\t\t}", "public Object getData();", "public String getData() {\r\n return Data;\r\n }", "public String getData() {\r\n return Data;\r\n }", "public T getData() {\r\n return data;\r\n }", "public DataItem getData() {\n return data;\n }", "public DatatypeProp getProperty() {\n return property;\n }", "public IData getData() {\n return data;\n }", "Object getData();", "Object getData();", "public E getData() { return data; }", "public synchronized Object getData() {\n return data;\n }", "public E getData() {\r\n\t\treturn data;\r\n\t}", "public D getData(){\n\t\treturn data;\n\t}", "public A getData()\n\t{\n\t\treturn data;\n\t}", "public D getData() {\n return data;\n }", "public D getData() {\n return data;\n }", "public E getData() {\n return data;\n }", "public K data()\n {\n\treturn this.data;\n }", "java.lang.String getData();", "@Override\n public final native String getData() /*-{\n return this.data;\n }-*/;", "public String getData() {\n return coreValue();\n }", "public E getData()\n {\n return data;\n }", "public E getData()\n {\n return data;\n }", "public HashMap<Long, String> getData() {\n\t\treturn data;\n\t}", "public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;", "public Map<String, Object> getData() {\n\t\treturn this.data;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<PropertyItem> getModelData() {\n\t\treturn mProperties;\n\t}", "public JavaScriptObject getData() {\n\t return getDataImpl(getUrl(), getRealHeight(), getRealWidth());\n }", "@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getDataOrBuilder() {\n return getData();\n }", "final public Object getDataObject() {\n return this.dataObject;\n }", "public message.Figure.FigureData.FigureProperty getProperty() {\n return property_;\n }", "com.google.protobuf.ByteString\n getPropertyBytes();", "public String getProperty();", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public long getData() {\n return data;\n }", "public Object getDataObject() {\n return dataObject;\n }", "String getData();", "java.lang.String getProperty();", "public abstract Object getData();", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getData() {\n return data_;\n }", "public DerivedWord getData() {\n \treturn this.data;\n }", "public T getData() {\n return mData;\n }", "@Accessor(qualifier = \"certificateData\", type = Accessor.Type.GETTER)\n\tpublic String getCertificateData()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CERTIFICATEDATA);\n\t}", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "Property getProperty();", "Property getProperty();", "@Override\r\n\tprotected Object getData() {\n\t\treturn null;\r\n\t}", "@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }", "public T value()\r\n {\r\n return data;\r\n }", "public message.Figure.FigureData.FigureProperty getProperty() {\n return property_;\n }", "public LiveData<DataEntry> getData() {\n return data;\n }", "public Object getData() {\n\t\t\treturn null;// this.element;\n\t\t}" ]
[ "0.7315571", "0.71727896", "0.7099374", "0.70957893", "0.7090632", "0.70905894", "0.707523", "0.70282274", "0.6969563", "0.6955585", "0.69552314", "0.6904015", "0.6902253", "0.6885942", "0.6882503", "0.6880496", "0.6866483", "0.6862771", "0.6861909", "0.68438435", "0.6836332", "0.6831711", "0.6826968", "0.6821776", "0.6821776", "0.6821776", "0.6821776", "0.68133974", "0.68133974", "0.68133974", "0.68133974", "0.68023074", "0.6790154", "0.67878276", "0.6779385", "0.67717654", "0.6769041", "0.6769041", "0.6755558", "0.6749157", "0.67433363", "0.6726947", "0.67129624", "0.67129624", "0.66929233", "0.66643506", "0.6660571", "0.66561997", "0.6631629", "0.6612618", "0.6612618", "0.66080594", "0.6600485", "0.65927505", "0.6587132", "0.658352", "0.6571394", "0.6571394", "0.65484", "0.65118945", "0.6493079", "0.6482748", "0.64617777", "0.64520115", "0.64455605", "0.64353585", "0.64300597", "0.6420873", "0.6418801", "0.6418801", "0.6418801", "0.6418801", "0.6417723", "0.6417723", "0.6417723", "0.6417723", "0.64157796", "0.6415337", "0.6415337", "0.6410089", "0.64051276", "0.6400395", "0.63936347", "0.638895", "0.6383279", "0.6383279", "0.6383279", "0.63804317", "0.6369357", "0.63645846", "0.6349963", "0.6349952", "0.6349952", "0.6340535", "0.63388443", "0.63365614", "0.6334051", "0.6325742", "0.6320914" ]
0.69599676
10
Setter method for property data.
public void setData(Data data) { this.data = data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setData(Object data) {\r\n this.data = data;\r\n }", "public void setData(Object data) {\n this.data = data;\n }", "public void setData(V data){\n\t\tthis.data = data;\n\t}", "public void setData(Object data) {\n\t\tthis.data = data;\n\t}", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "void setData(T data) {\n\t\tthis.data = data;\n\t}", "public void setData(E data){\n\t\t\tthis.data = data;\n\t\t}", "@Override\r\n\tpublic void setData(E data) {\n\t\tthis.data=data;\r\n\t}", "public void setData(E data) {\r\n\t\tthis.data = data;\r\n\t}", "public void setData(D data) {\n this.data = data;\n }", "public void setData(T data){\n this.data = data;\n }", "public void setData(String data) {\r\n this.data = data;\r\n }", "public void setData(String data) {\n _data = data;\n }", "public void setData( E data ) {\n\t\tthis.data = data;\n\t}", "public void setData(String data) {\n this.data = data;\n }", "public void setData(E data)\n {\n this.data = data;\n }", "public void setData(String data) {\n\tthis.data = data;\n }", "public void setData(String data) {\n\t\tthis.data = data;\n\t}", "public void setData(String data) {\n\t\tthis.data = data;\n\t}", "public void setData(Object oData) { m_oData = oData; }", "public abstract void setCustomData(Object data);", "public void setData(java.lang.String data) {\r\n this.data = data;\r\n }", "public void setData(IData data) {\n this.data = data;\n }", "@Override\n\tpublic void setData() {\n\n\t}", "void setData(Object data);", "void setData (Object data);", "abstract public void setUserData(Object data);", "public void setUserData(Object data);", "void setData (Object newData) { /* package access */ \n\t\tdata = newData;\n\t}", "private void setData() {\n\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setData(D s){\n\t\tdata = s;\n\t}", "public void setData(int data) {\n\t\tthis.data = data;\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic <T> void setModelData(List<T> data) {\n\t\t\tmProperties = (List<PropertyItem>) data;\n\t\t\n\t}", "public void setData(java.util.List data) {\r\n this.data = data;\r\n }", "public void setData(E d)\n {\n data = d;\n }", "public void setData(int data)\n\t {\n\t this.data = data;\n\t }", "public void setData(byte data) {\n this.data = data;\n }", "public void setData(long value) {\n this.data = value;\n }", "void setData(byte[] data) {\n this.data = data;\n }", "@Override\r\n\tpublic void setData(String data) {\r\n\t\tsuper.setData(data);\r\n\t\tString src = data;\r\n\t\tif (data == null) {\r\n\t\t\tsrc = \"\";\r\n\t\t}\r\n\r\n\t\tthis.image.setAttribute(\"src\", src);\r\n\t}", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "public void setData(String data) {\n this.data = data == null ? null : data.trim();\n }", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "public void setData(Object o){}", "public void setData(Map<E, String> data) {\n\t\tthis.data = data;\n\t}", "public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}", "public void dataWasSet();", "public T setUserData(Object data)\n\t{\n\t\tuserData = data;\n\t\treturn (T) this;\n\t}", "public void setData (G pData){\n this._data=pData;\n }", "@Override\n public void setData(byte[] data) {\n\tsuper.setData(data);\n\tsetLC(data.length);\n }", "public void setData(List<Number> data) {\n this.data = data;\n }", "@Override\n\tpublic void setDataObject(DataObject arg0) throws DataBindingException {\n\n\t}", "public Value setBottomPropertyData() {\n checkNotUnknown();\n Value r = new Value(this);\n r.flags &= ~PROPERTYDATA;\n return canonicalize(r);\n }", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "public void setData(byte[] data) {\n this.data = data;\n }", "@Override\n public void setUserData(final Object userData) {\n this.userData = userData;\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public void setData(Object d) {\n\t\t funcData = d; \n\t}", "void setObjectValue(Object dataObject);", "@Override\r\n\t\tpublic Object setUserData(String key, Object data, UserDataHandler handler)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "public DataURL setData(String data){\n if(data != null){\n this.data = data;\n }\n return this;\n }", "public void setData(GenericItemType data) {\n this.data = data;\n }", "public void setData (Date date) {\r\n\t\tthis.data=date;\r\n\t\t\r\n\t}", "@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}", "public void put(T data){\r\n\t\tthis.data = data;\r\n\t}", "public void setDataObject(Object dataObj)\r\n {\r\n\r\n debug(\"setDataObject() - Set Data member Obj\");\r\n // Null out any reference to this data that may be present\r\n stockData = null;\r\n if (dataObj != null)\r\n {\r\n if (dataObj instanceof StockData)\r\n {\r\n stockData = (StockData) dataObj;\r\n }\r\n else if (dataObj instanceof String)\r\n {\r\n stockData = addSymbolToCurrentWatchList((String) dataObj);\r\n }\r\n\r\n }\r\n\r\n debug(\"setDataObject() - stockData is [\" + ((stockData == null) ? \"null\" : stockData.getName()) + \"]\");\r\n }", "public synchronized Object setData(Object newData) {\n Object old = data;\n data = newData;\n return old;\n }", "public void setData(final D dt) {\n this.data = dt;\n }", "public void setUserData (Object userData) {\n\t\tthis.userData = userData;\n\t}", "public void setDataUnsafe(Serializable data) { this.data = data; }", "public void setUserData(Object userData) {\n this.userData = userData;\n }", "public void updateData() {}", "public void setData(boolean isData);", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "public void setDataValue(String key, Object value) {\n\t\t if (value == null) {\n\t\t\t data.remove(key);\n\t\t }else {\n\t\t\t data.put(key, value);\n\t\t }\n\t }", "@Override\n\tpublic void setProperty(String propertyName, Object value) {\n\t\t\n\t}", "public void onDataChanged(IData data) {\r\n setData(data);\r\n }", "public void setData(int[] data) {\n this.data = data;\n }", "public void setData(@NotNull String key, @NotNull Object value) {\n data.put(key, value);\n }", "public void setData(String d) {\n _data = d.getBytes();\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public boolean is_set_data() {\n return this.data != null;\n }", "public void setProperty(String name,Object value);", "public void setData(List<Event> data) {\n this.data = data;\n }", "private void setExtProperty(String propertyName, String dataConfigPropertyName, Object value) {\n ReflectionTestUtils.invokeMethod(this, \"setProperty\", new Object[]{propertyName, dataConfigPropertyName, value});\n }", "void setUserData(Object userData);", "void setDatty(Datty newDatty);", "public void setData(Hashtable<String, Vector<Double>> data)\n {\n this.data = data;\n }", "final public void setDataObject(Object _object) {\n this.dataObject = _object;\n }", "public void setUserData(String key, Object data) {\n button.setUserData(key, data);\n }", "public void setData(Comparable pData) {\n data = pData;\n }", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "public void setData(byte[] data) {\r\n this.bytes = data;\r\n }", "public void addProperty(String name, PropertyObject data) {\n this.properties.put(name, data);\n }", "protected abstract List<String> writeData(T property);", "public void setdat()\n {\n }" ]
[ "0.75627446", "0.752536", "0.74827284", "0.74613327", "0.7409053", "0.7303612", "0.7268738", "0.7252397", "0.72215766", "0.72087276", "0.7190595", "0.71803904", "0.71723276", "0.71177745", "0.71139383", "0.71046406", "0.70832175", "0.70403445", "0.70403445", "0.70340586", "0.69552463", "0.6937764", "0.68830293", "0.6849628", "0.67982984", "0.67813194", "0.6729509", "0.6688693", "0.6655632", "0.6637187", "0.6549287", "0.6549287", "0.65003675", "0.6437182", "0.6436664", "0.6390365", "0.6381706", "0.6360852", "0.6356371", "0.6348109", "0.6321911", "0.63090336", "0.63033843", "0.63033843", "0.63033843", "0.62940186", "0.6266787", "0.62323874", "0.6211314", "0.6202004", "0.6199868", "0.6192384", "0.6188426", "0.6164941", "0.61565495", "0.61501765", "0.612868", "0.61276996", "0.61245185", "0.60994714", "0.6068809", "0.60667235", "0.60659575", "0.60570157", "0.60400325", "0.6028547", "0.6019304", "0.60177743", "0.5998094", "0.5990958", "0.59652334", "0.59621704", "0.59459955", "0.59453136", "0.5943167", "0.5924109", "0.5911494", "0.59047055", "0.5874375", "0.587339", "0.5870504", "0.5853683", "0.58510786", "0.58504117", "0.58504117", "0.5846567", "0.5832921", "0.58234274", "0.5810159", "0.58038425", "0.5801306", "0.57960624", "0.5783046", "0.5778926", "0.5778111", "0.5778111", "0.57682467", "0.57634836", "0.5753517", "0.5723979" ]
0.73325664
5
Getter method for property ip.
public String getIp() { return ip; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getIp() {\r\n return ip;\r\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public java.lang.String getIp() {\r\n return ip;\r\n }", "@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}", "public String getIp(){\n\treturn ip;\n }", "public int getIp() {\n return ip_;\n }", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "@java.lang.Override\n public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "public String getIP() {\n return this.IP;\n }", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "public String getIpAddr() {\r\n return ipAddr;\r\n }", "public static String getIP() {\n\t\treturn ip;\r\n\t}", "public String getIpAddr() {\n return ipAddr;\n }", "public String getIp();", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n }\n }", "public String getIpaddress ()\n {\n return ipaddress;\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIP() {\r\n return IP;\r\n }", "public String getIp() {\n\t\treturn ip.getText();\n\t}", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ip_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getIp() {\n Object ref = ip_;\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 ip_ = s;\n return s;\n }\n }", "public String getIp() {\n Object ref = ip_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public int getIp() {\n return instance.getIp();\n }", "public int getIp() {\n return instance.getIp();\n }", "public String getIp() {\n return (String) get(24);\n }", "String getIp();", "String getIp();", "public String getIpAddress() {\n return ipAddress;\n }", "public String ipAddress() {\n return this.ipAddress;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@XmlElement(required = true, name = \"ip\")\n public String getIp() {\n return ip;\n }", "public String getIpAddress() {\n return ipAddress;\n }", "public String getIpAddress() {\n return ipAddress;\n }", "public java.lang.String getIpaddress() {\n return ipaddress;\n }", "public InetAddress getAddress() {\n return ip;\n }", "public String getIp() {\n return getIpString(inetAddress);\n }", "public IPAddress getIPAddress() {\n return iPAddress;\n }", "public String getIPAddress()\n {\n return fIPAddress;\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getIpaddress() {\n\t\treturn ipaddress;\n\t}", "public InputProcessor getIP() {\r\n return ip;\r\n }", "public InetAddress getIP();", "public String getIPAddress () {\n\t\treturn _ipTextField.getText();\n\t}", "public com.google.protobuf.ByteString\n getIpBytes() {\n Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "int getIp();", "int getIp();", "int getIp();", "public int getInIp() {\n return instance.getInIp();\n }", "public int getInIp() {\n return instance.getInIp();\n }", "@Nullable public abstract String ipAddress();", "public com.google.protobuf.ByteString\n getIpBytes() {\n Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getInIp() {\n return inIp_;\n }", "public int getInIp() {\n return inIp_;\n }", "public InetAddress getIPAddress ( ) { return _IPAddress; }", "@Override\r\n\tpublic String getIp() {\n\t\treturn null;\r\n\t}", "int getInIp();", "int getInIp();", "@Override\r\n public String getIPAddress() {\r\n return address;\r\n }", "public String getDeviceIp(){\n\t return deviceIP;\n }", "java.lang.String getAgentIP();", "com.google.protobuf.ByteString getIpBytes();", "public InetAddress getIpAddress() \n\t{\n\t\treturn ipAddress;\n\t}", "com.google.protobuf.ByteString\n getIpBytes();", "com.google.protobuf.ByteString\n getIpBytes();", "@Override\n public InetAddress getIp() {\n this.ip =\n maybeHostname\n .map(\n hostname -> {\n try {\n return InetAddress.getByName(hostname);\n } catch (final UnknownHostException e) {\n return ip;\n }\n })\n .orElse(ip);\n return ip;\n }", "java.lang.String getDestinationIp();", "public String getClientip() {\n return clientip;\n }" ]
[ "0.85167015", "0.8490006", "0.84713846", "0.84713846", "0.84713846", "0.84713846", "0.84713846", "0.84713846", "0.8453721", "0.842714", "0.8364758", "0.8346088", "0.832196", "0.832196", "0.82793295", "0.82793295", "0.82793295", "0.82394147", "0.82112545", "0.8168167", "0.8168167", "0.8168167", "0.8168167", "0.8168167", "0.8168167", "0.8168167", "0.8168167", "0.81257606", "0.81250876", "0.80751574", "0.8068092", "0.80578375", "0.80578375", "0.80578375", "0.8052447", "0.804668", "0.804668", "0.8044182", "0.80389386", "0.8037493", "0.8030386", "0.80257016", "0.8012264", "0.7997755", "0.7954673", "0.79375243", "0.79375243", "0.79310584", "0.79310584", "0.7890668", "0.78690434", "0.78690434", "0.7841334", "0.7801987", "0.778656", "0.77849233", "0.7781388", "0.7781388", "0.777113", "0.7736451", "0.7717071", "0.77119535", "0.77022254", "0.769094", "0.769094", "0.769094", "0.769094", "0.76865876", "0.76856554", "0.768051", "0.7663544", "0.7641235", "0.76192427", "0.7605915", "0.7605915", "0.7605915", "0.7605915", "0.7542604", "0.7542604", "0.7542604", "0.7541948", "0.7541948", "0.75406194", "0.7526981", "0.752502", "0.752502", "0.7508236", "0.74905354", "0.7489416", "0.7489416", "0.74158895", "0.74080265", "0.7366014", "0.73577917", "0.7352568", "0.7288389", "0.7288389", "0.7287194", "0.7277894", "0.72645396" ]
0.8445998
9
Setter method for property ip.
public void setIp(String ip) { this.ip = ip; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIp(String ip) {\n this.ip = ip;\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "private void setIp(int value) {\n \n ip_ = value;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(String ip) {\n this.ip = ip;\n }", "public void setIp(final String ip) {\n this.ip = ip;\n }", "public void setIp(java.lang.String ip) {\r\n this.ip = ip;\r\n }", "public void setIp (java.lang.String ip) {\r\n\t\tthis.ip = ip;\r\n\t}", "public void setIp (java.lang.String ip) {\r\n\t\tthis.ip = ip;\r\n\t}", "public void setIp(String ip) {\r\n this.ip = ip == null ? null : ip.trim();\r\n }", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public void setIp(String ip) {\n this.ip = ip == null ? null : ip.trim();\n }", "public void setIp(String value) {\n set(24, value);\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public Builder setIp(int value) {\n bitField0_ |= 0x00000100;\n ip_ = value;\n onChanged();\n return this;\n }", "private void setInIp(int value) {\n \n inIp_ = value;\n }", "private void setInIp(int value) {\n \n inIp_ = value;\n }", "public String getIp() {\r\n return ip;\r\n }", "public Builder setIp(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n ip_ = value;\n onChanged();\n return this;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n ip_ = value;\n onChanged();\n return this;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n ip_ = value;\n onChanged();\n return this;\n }", "public String getIp(){\n\treturn ip;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n ip_ = value;\n onChanged();\n return this;\n }", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n ip_ = value;\n onChanged();\n return this;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public String getIp() {\n return ip;\n }", "public void setIP(String IP) {\n this.IP = IP;\n }", "public void setIP(java.lang.String IP) {\r\n this.IP = IP;\r\n }", "@Override\n\tpublic String getIp() {\n\t\treturn ip;\n\t}", "public Builder setIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ip_ = value;\n bitField0_ |= 0x00000002;\n onChanged();\n return this;\n }", "public void setDeviceIP(String argIp){\n\t deviceIP=argIp;\n }", "public Builder setIp(int value) {\n copyOnWrite();\n instance.setIp(value);\n return this;\n }", "public Builder setIp(int value) {\n copyOnWrite();\n instance.setIp(value);\n return this;\n }", "@XmlElement(required = true, name = \"ip\")\n public String getIp() {\n return ip;\n }", "public void setIpAddress(String ipAddress) {\n this.ipAddress = ipAddress;\n }", "public java.lang.String getIp() {\r\n return ip;\r\n }", "public String getIpAddr() {\r\n return ipAddr;\r\n }", "public void setIpAddr(String ipAddr) {\n this.ipAddr = ipAddr == null ? null : ipAddr.trim();\n }", "public void setIpAddress(InetAddress addr) \n\t{\n\t\tthis.ipAddress = addr;\n\t}", "public int getIp() {\n return ip_;\n }", "public void setIpAddr(String ipAddr) {\r\n if (StringUtil.isNotNUll(ipAddr)) {\r\n this.ipAddr = ipAddr == null ? null : ipAddr.trim();\r\n } else {\r\n this.ipAddr = null;\r\n }\r\n }", "public String getIP() {\n return this.IP;\n }", "@Override\n\t\tpublic void ipChange() {\n\t\t\t\n\t\t}", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public int getIp() {\n return ip_;\n }", "public String getIpAddr() {\n return ipAddr;\n }", "public void setArduinoIP(String ip) {\n\t\tipaddress = ip;\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "public java.lang.String getIp () {\r\n\t\treturn ip;\r\n\t}", "@Override\r\n public void setIPAddress(String address) {\r\n this.address = address;\r\n }", "public void setIPAddress(final IPAddress iPAddress) {\n this.iPAddress = iPAddress;\n }", "public void setIpAddress(String ipAddress) {\n this.ipAddress = WordCache.getWordCache(ipAddress);\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public java.lang.String getIp(){\r\n return localIp;\r\n }", "public Builder setDestinationIp(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n destinationIp_ = value;\n onChanged();\n return this;\n }", "public void setIpaddress(java.lang.String ipaddress) {\n this.ipaddress = ipaddress;\n }", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "java.lang.String getIp();", "public String getIp();", "public String getIpaddress ()\n {\n return ipaddress;\n }", "public void setServerIP(String ip)\n\t{\n\t\tthis.serverIP = ip;\n\t}", "@java.lang.Override\n public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "public void setIpadress(java.lang.String ipadress) {\r\n this.ipadress = ipadress;\r\n }", "public void setIpaddress(String ipaddress) {\n\t\tthis.ipaddress = ipaddress;\n\t}", "public static String getIP() {\n\t\treturn ip;\r\n\t}", "public void setIpSource(String value) {\n setProperty(IP_SOURCE, value, \"\");\n }", "public String getIpaddress() {\n\t\treturn ipaddress;\n\t}", "public Builder setInIp(int value) {\n copyOnWrite();\n instance.setInIp(value);\n return this;\n }", "public Builder setInIp(int value) {\n copyOnWrite();\n instance.setInIp(value);\n return this;\n }", "public java.lang.String getIP() {\r\n return IP;\r\n }", "public String getIpAddress() {\n return ipAddress;\n }", "public String getIp() {\n Object ref = ip_;\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 ip_ = s;\n return s;\n }\n }", "public boolean setIP(String IP) {\n try {\n mIP = IP;\n return true;\n } catch (Exception ex) {\n return false;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\r\n\tpublic String getIp() {\n\t\treturn null;\r\n\t}", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getIp() {\n java.lang.Object ref = ip_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n ip_ = s;\n return s;\n }\n }", "public Builder clearIp() {\n bitField0_ = (bitField0_ & ~0x00000002);\n ip_ = getDefaultInstance().getIp();\n onChanged();\n return this;\n }", "public InputProcessor getIP() {\r\n return ip;\r\n }", "public String getIpAddress() {\n return ipAddress;\n }", "public String getIpAddress() {\n return ipAddress;\n }", "public com.google.protobuf.ByteString\n getIpBytes() {\n java.lang.Object ref = ip_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n ip_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.81702346", "0.8139689", "0.8139689", "0.8058997", "0.8058997", "0.8057695", "0.8040692", "0.79729325", "0.79729325", "0.7771532", "0.776077", "0.776077", "0.776077", "0.75697196", "0.75053865", "0.75053865", "0.7493319", "0.7462796", "0.7462796", "0.74440163", "0.74249774", "0.74101263", "0.73913306", "0.737597", "0.73724204", "0.736882", "0.7368696", "0.7349205", "0.7349205", "0.7349205", "0.7349205", "0.7349205", "0.7349205", "0.73484445", "0.73443764", "0.7303929", "0.72965336", "0.72961515", "0.71734035", "0.71403444", "0.71403444", "0.7084284", "0.7083462", "0.7053575", "0.70152706", "0.6958812", "0.6952133", "0.69486916", "0.69452393", "0.69333106", "0.69279236", "0.6914361", "0.6914361", "0.6914361", "0.6903035", "0.686087", "0.68450606", "0.68450606", "0.6829822", "0.68131065", "0.68008775", "0.67979366", "0.67979366", "0.6761281", "0.675185", "0.67383313", "0.67383313", "0.67383313", "0.67383313", "0.67383313", "0.67383313", "0.67383313", "0.67383313", "0.67344797", "0.6732825", "0.67195374", "0.66959286", "0.6656042", "0.66011804", "0.6583776", "0.65741277", "0.65731204", "0.65587795", "0.65587795", "0.65459025", "0.65422803", "0.6537004", "0.6535493", "0.6525441", "0.6525441", "0.6525368", "0.6506542", "0.65047187", "0.64996356", "0.64934707", "0.64871085", "0.64855707", "0.64798945", "0.64798945", "0.64702696" ]
0.801267
7
Getter method for property country.
public String getCountry() { return country; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public CountryCode getCountry() {\n return country;\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public String getCountry()\n {\n return country;\n }", "public String getCountry() {\r\n return this.country;\r\n }", "public Country getCountry() {\r\n return country;\r\n }", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public Country getCountry() {\n return country;\n }", "public java.lang.String getCountry() {\r\n return country;\r\n }", "Country getCountry();", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "java.lang.String getCountry();", "java.lang.String getCountry();", "public java.lang.String getCountry() {\n return country;\n }", "public String getCountry() {\n return Country;\n }", "public IsoCountry getCountry() {\n return country;\n }", "public CountryType getCountry() {\r\n\t\treturn country;\r\n\t}", "public java.lang.String getCountry() {\n return Country;\n }", "public final String getCountry() {\n\t\treturn country;\n\t}", "public java.lang.String getCountry () {\n\t\treturn country;\n\t}", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public String getCountryName();", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n }\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getcountryCode() {\n return countryCode;\n }", "public Integer getCountryId() {\n return countryId;\n }", "public CountryEntry getCountry(){\n\t\treturn (CountryEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_LINK);\n\t}", "public String getContactCountry() {\n return contactCountry;\n }", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public int getCountryId() {\n return countryId;\n }", "java.lang.String getCountryName();", "public String countryCode() {\n return countryCode;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "public long getCountryId() {\n return countryId;\n }", "com.google.protobuf.ByteString\n getCountryBytes();", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountryID() {\n return countryID;\n }", "public String getCompanyCountry() {\n return companyCountry;\n }", "public String getCountry_id() {\n return country_id;\n }", "com.google.protobuf.ByteString\n getCountryBytes();", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public static String getCountrySetting() {\r\n\t\treturn countrySetting;\r\n\t}", "public java.lang.String getOriginatingCountry() {\r\n return originatingCountry;\r\n }", "@ApiModelProperty(value = \"Country name of IP address\")\n public String getCountryName() {\n return countryName;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').\")\n\n public String getCountryCode() {\n return countryCode;\n }", "public void setCountry(Country country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "public StrColumn getCountry() {\n return delegate.getColumn(\"country\", DelegatingStrColumn::new);\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.country;\n\t}", "public java.lang.String getCountryCode() {\n return countryCode;\n }", "public String getCountry() {\n\t\treturn addressFormat;\n\t}", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public int getCountryId();", "public Address country(String country) {\n this.country = country;\n return this;\n }", "@ApiModelProperty(value = \"Two-letter country code of IP address\")\n public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode_;\n }", "public String getCountryName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_NAME);\n\t}", "public String getCountryCode()\r\n\t{\r\n\t\treturn this.countryCode;\r\n\t}", "String getCountryCode();", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public String getCountryFieldName() {\n return getStringProperty(COUNTRY_FIELD_NAME_KEY);\n }", "Country getAvailableCountryById(int countryId);", "java.lang.String getCountryCode();" ]
[ "0.8508782", "0.84988046", "0.848924", "0.848924", "0.848924", "0.848924", "0.848924", "0.848924", "0.848924", "0.8473651", "0.8462404", "0.84618723", "0.842262", "0.84058034", "0.8403383", "0.8403383", "0.837947", "0.837947", "0.8355946", "0.8324874", "0.8314418", "0.82813984", "0.82813984", "0.82813984", "0.82539636", "0.82539636", "0.8253903", "0.8250223", "0.8102395", "0.80314595", "0.7988696", "0.7956869", "0.7913911", "0.78784996", "0.77741295", "0.7738183", "0.768993", "0.76455206", "0.7630776", "0.7630776", "0.7630776", "0.7594425", "0.75742376", "0.7528921", "0.75038105", "0.7445857", "0.742716", "0.74155736", "0.7414846", "0.73936623", "0.7393414", "0.7384248", "0.73828095", "0.73762524", "0.73467344", "0.73349583", "0.73344016", "0.73344016", "0.73344016", "0.73311263", "0.7318733", "0.72929996", "0.72640747", "0.72155046", "0.72155046", "0.7151049", "0.7094537", "0.7029058", "0.70283556", "0.7014733", "0.6993286", "0.6993286", "0.6993286", "0.6993286", "0.6993286", "0.6993286", "0.69645625", "0.6954245", "0.6949455", "0.69401115", "0.69333947", "0.69145525", "0.69074315", "0.6889108", "0.6887239", "0.6883757", "0.6883757", "0.68662524", "0.68657", "0.6863411", "0.68566984", "0.68542814", "0.68403625", "0.6829873", "0.6819161", "0.6819161", "0.6819161", "0.680242", "0.67986745", "0.6788027" ]
0.8426379
12
Setter method for property country.
public void setCountry(String country) { this.country = country; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountry(Country country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "public void setCountry(String country) {\r\n this.country = country.trim();\r\n }", "public void setCountry (java.lang.String country) {\n\t\tthis.country = country;\n\t}", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "public void setCountryName(String value);", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(java.lang.CharSequence value) {\n this.country = value;\n }", "public CountryCode getCountry() {\n return country;\n }", "public String getCountry() {\r\n return country;\r\n }", "public Builder setCountry(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\r\n return this.country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public Country getCountry() {\r\n return country;\r\n }", "public final void setCountry(final String ccountry) {\n\t\tthis.country = ccountry;\n\t}", "public String getCountry() {\n return country;\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry()\n {\n return country;\n }", "public Address country(String country) {\n this.country = country;\n return this;\n }", "public Country getCountry() {\n return country;\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public void setCountryId(int value);", "public void setCountry(Country v) throws TorqueException\n {\n if (v == null)\n {\n setCustCountryId( 999);\n }\n else\n {\n setCustCountryId(v.getCountryId());\n }\n aCountry = v;\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setCountry(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.country = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public String getCountry() {\n return Country;\n }", "public IsoCountry getCountry() {\n return country;\n }", "public Builder setCountry(CountryCode country) {\n this.country = country;\n return this;\n }", "public java.lang.String getCountry() {\r\n return country;\r\n }", "public void setcountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public CountryType getCountry() {\r\n\t\treturn country;\r\n\t}", "public void setCountryCode(String countryCode)\r\n\t{\r\n\t\tthis.countryCode = countryCode;\r\n\t}", "Country getCountry();", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public void setCountryId(String countryId) {\r\n this.countryId = countryId;\r\n }", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "public java.lang.String getCountry() {\n return country;\n }", "public void setCountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "public void setDestinationCountry(String value) {\r\n this.destinationCountry = value;\r\n }", "boolean update(Country country);", "public void setCountryCode(java.lang.String countryCode) {\n this.countryCode = countryCode;\n }", "public Builder setCountryBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "java.lang.String getCountry();", "java.lang.String getCountry();", "public String getCountry_id() {\n return country_id;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public final String getCountry() {\n\t\treturn country;\n\t}", "public void setCountryFieldName(final String value) {\n setProperty(COUNTRY_FIELD_NAME_KEY, value);\n }", "public void setCountryId(java.lang.String countryId) {\r\n this.countryId = countryId;\r\n }", "public int getCountryId() {\n return countryId;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryCode(String countryCode) {\r\n\t\t\tthis.countryCode = countryCode;\r\n\t\t}", "private void setCountries(List<Country> countries) {\n this.countries = countries;\n }", "public Builder clearCountry() {\n bitField0_ = (bitField0_ & ~0x00000080);\n country_ = getDefaultInstance().getCountry();\n onChanged();\n return this;\n }", "public void setContactCountry(String contactCountry) {\n this.contactCountry = contactCountry;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "public Integer getCountryId() {\n return countryId;\n }", "public java.lang.String getCountry() {\n return Country;\n }", "public long getCountryId() {\n return countryId;\n }", "public String getcountryCode() {\n return countryCode;\n }", "private void setCountryCode(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n countryCode_ = value;\n }", "public void testSetCountry() {\r\n try {\r\n address.setCountry(null);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.84134346", "0.8139528", "0.8139528", "0.8139528", "0.8139528", "0.8139528", "0.8139528", "0.8040335", "0.8040335", "0.80245334", "0.7984706", "0.79626447", "0.79626447", "0.79626447", "0.78205484", "0.78003645", "0.7709301", "0.7686047", "0.75250345", "0.7463463", "0.7463463", "0.7462294", "0.73596346", "0.73519415", "0.7331741", "0.7307674", "0.73056376", "0.72990704", "0.7284565", "0.7284565", "0.7284565", "0.7284565", "0.7284565", "0.7284565", "0.7284565", "0.7277889", "0.7259523", "0.72495776", "0.7236001", "0.72210634", "0.72210634", "0.7202049", "0.7181673", "0.71808827", "0.7150506", "0.7150506", "0.7150506", "0.7094381", "0.7094381", "0.70876586", "0.70876586", "0.70876586", "0.7083178", "0.7049399", "0.70478183", "0.7006906", "0.69147927", "0.6889116", "0.68408936", "0.67939067", "0.6790625", "0.67697805", "0.67695385", "0.6749121", "0.6749071", "0.67464477", "0.67386407", "0.6712622", "0.66820145", "0.66809475", "0.6680043", "0.665301", "0.66455036", "0.66253686", "0.6598291", "0.654224", "0.654224", "0.6512828", "0.651181", "0.64923406", "0.64790785", "0.6477879", "0.6477382", "0.64757425", "0.64757425", "0.64702", "0.6464974", "0.6462137", "0.64538157", "0.6451186", "0.6441094", "0.6440528", "0.64399636", "0.6439122", "0.64361936", "0.64285237", "0.64241904", "0.64241904", "0.64241904", "0.63851506" ]
0.80935097
7
Getter method for property area.
public String getArea() { return area; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return this.area;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "public Rectangle getArea() {\n return area;\n }", "public int getArea()\n {\n return area;\n }", "public int getArea() {\n\t\treturn area;\n\t}", "public AreaProperties getProperties() {\n return this.properties;\n }", "public double getArea()\n {\n return area;\n }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public double getArea() {\n\t\treturn this.area;\n\t}", "public float getArea() {\n return area;\n }", "public float getArea(){\n return area;\n\t}", "public double get_Area() {\n return this.Area;\n }", "public abstract int getArea();", "public abstract String getArea();", "public JQLayoutArea getArea()\n {\n return area;\n }", "public String getLocationArea() {\n return locationArea;\n }", "public double getArea();", "public double getArea();", "public double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public int area() {\n \tarea = width()*height();\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "double getArea() {\n return width * height;\n }", "public int getArea(){\n return imageArea;\n }", "Double getAreaValue();", "double getArea();", "double getArea();", "public abstract float getArea();", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }", "public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }", "public double getArea(){\n return 3.14 * radius * radius;\n }", "public AreaGeometry getGeometry() {\n return this.geometry;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public String getAreaName()\n {\n return this.areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (this.getPerimetro()*Math.sqrt(Math.pow(getLongitudLado(), 2))-(Math.pow((getLongitudLado()/2), 2)))/2;\n\t}", "public int getAreaNo() {\n return areaNo_;\n }", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "public String getArea_id() {\n return area_id;\n }", "public String getBuildingarea() {\r\n\t\treturn buildingarea;\r\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "double getArea(){\n return height*width;\n }", "public java.lang.String getVAL_AREA() {\r\n return VAL_AREA;\r\n }", "public String getCourseArea() {\n return courseArea;\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public String getNombreArea() { return (this.nombreArea == null) ? \"\" : this.nombreArea; }", "public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}", "public double getArea() {\n\t\treturn height * length;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn \"My rectangle's Areas is \"+area();\r\n\t}", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "public double getArea() {\n return this.length * this.width;\n }", "@Override\n public double getArea() {\n return (int) this.radiusX * (int) this.radiusY * Math.PI;\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (2 + 2 * (Math.sqrt(2))) * side * side; // JA\n\t}", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public double getArea(){\n return 0;\n }", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public double area() {\n\t\treturn width * height;\n\t}", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public int getArea()\n {\n return this.length * this.width;\n }", "public double area() {\n return (width * height);\n }", "ObjectProperty<Bounds> drawAreaBoundsProperty();", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}", "public Number getBuildingArea() {\n return (Number) getAttributeInternal(BUILDINGAREA);\n }", "public void setArea(String area) {\n this.area = area;\n }", "public double getArea (){\n int area = length * length;\n System.out.println(area);\n return area;\n }", "public static double getArea() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n }", "public final int getArea()\n\t{\n\t\treturn address >>> 12;\n\t}", "public void setArea(String area) {\n this.area = area;\n }", "public Number getGroundArea() {\n return (Number) getAttributeInternal(GROUNDAREA);\n }", "public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}", "public double getArea() {\n return x * y;\n }", "@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}" ]
[ "0.80875796", "0.80875796", "0.80875796", "0.80416316", "0.79770964", "0.7957574", "0.79391503", "0.7878544", "0.78425103", "0.7747158", "0.7729724", "0.7661118", "0.7599047", "0.7550779", "0.74967253", "0.74203086", "0.7384054", "0.7281046", "0.7274907", "0.71984607", "0.71984607", "0.71984607", "0.71651083", "0.71651083", "0.71651083", "0.7163297", "0.712768", "0.712768", "0.7076161", "0.7057574", "0.7050378", "0.70288944", "0.70288944", "0.70283556", "0.7011448", "0.7011448", "0.701028", "0.7009568", "0.699954", "0.69967985", "0.69816434", "0.6963716", "0.6956262", "0.69446087", "0.69414824", "0.69414824", "0.68963337", "0.68929815", "0.6868155", "0.6865026", "0.6845971", "0.6832616", "0.68189985", "0.68039465", "0.68005306", "0.6789304", "0.6757082", "0.6757082", "0.6754385", "0.6750303", "0.6741839", "0.67336845", "0.6731795", "0.6726261", "0.67248", "0.6720654", "0.6717049", "0.6711761", "0.66996545", "0.6699166", "0.6699166", "0.6699166", "0.66895205", "0.66799694", "0.66799694", "0.66799694", "0.6677298", "0.66733277", "0.6672144", "0.66598505", "0.66593236", "0.66558886", "0.6655524", "0.66555196", "0.66520077", "0.662334", "0.66232765", "0.6620251", "0.6617943", "0.6617572", "0.6614071", "0.6613549", "0.6611669", "0.6604215", "0.66019803", "0.6598514", "0.65929693", "0.6576344", "0.65716", "0.6569823" ]
0.8050202
3
Setter method for property area.
public void setArea(String area) { this.area = area; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "public void setArea(Polygon area) {\n\t\tthis.area = area;\n\t}", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(String area) {\n\t\tthis.area = area;\n\t}", "@Override\n public final void setArea(JQLayoutArea area)\n {\n if (area != null)\n {\n removeClass(area.getAreaClass().toString());\n }\n this.area = area;\n if (this.area != null)\n {\n addClass(this.area.getAreaClass().toString());\n }\n }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "public void SetArea(double area) {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_SetArea(swigCPtr, this, area);\n }", "public void setNombreArea(String p) { this.nombreArea = p; }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return this.area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "public Rectangle getArea() {\n return area;\n }", "public int getArea() {\n\t\treturn area;\n\t}", "public double getArea()\n {\n return area;\n }", "public float getArea(){\n return area;\n\t}", "public int getArea()\n {\n return area;\n }", "public float getArea() {\n return area;\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public void setLocationArea(String locationArea) {\n this.locationArea = locationArea;\n }", "public void setNombreCodigoArea(String p) { this.nombreCodigoArea = p; }", "@Override\n\tpublic int updateArea(Area area) {\n\t\treturn areaMapper.updateArea(area);\n\t}", "@Override\n\tpublic void computeArea() {\n\t\tthis.area = length * length;\t\t\t\t\n\t}", "public double get_Area() {\n return this.Area;\n }", "public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}", "public JQLayoutArea getArea()\n {\n return area;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "void calculateArea() {\n this.setArea(this.getArea()/2);\n }", "public int area() {\n \tarea = width()*height();\n }", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }", "public void setPersonnelArea(String personnelArea);", "public void setAreaColor(Color c)\r\n/* 53: */ {\r\n/* 54: 37 */ this.areaColor = c;repaint();\r\n/* 55: */ }", "public abstract int getArea();", "@Override\r\n\tpublic void calcArea() {\n\t\t\r\n\t}", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void setArea_id(String area_id) {\n this.area_id = area_id;\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "public Builder setAreaNo(int value) {\n \n areaNo_ = value;\n onChanged();\n return this;\n }", "public String getArea_id() {\n return area_id;\n }", "public void setBuildingArea(Number value) {\n setAttributeInternal(BUILDINGAREA, value);\n }", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public String getLocationArea() {\n return locationArea;\n }", "public void setVAL_AREA(java.lang.String VAL_AREA) {\r\n this.VAL_AREA = VAL_AREA;\r\n }", "public Poi ToArea()\r\n {\r\n this.lat = PoiManager.roundToHalfDown(this.lat);\r\n this.lon = PoiManager.roundToHalfDown(this.lon);\r\n return this;\r\n }", "public abstract Area newArea();", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public int getArea(){\n return imageArea;\n }", "public void setGameArea(int width, int height){\n this.gameAreaWidth = width;\n this.gameAreaHeight = height;\n }", "ObjectProperty<Bounds> drawAreaBoundsProperty();", "public double getArea();", "public double getArea();", "public double getArea();", "public abstract String getArea();", "Double getAreaValue();", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public Area() {\n\t}", "@Override\r\n public double area() {\n return height*width;\r\n }", "public void setArea(double radius) {\n this.radius = radius;\n }", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public AreaProperties getProperties() {\n return this.properties;\n }", "public abstract float getArea();", "public Area() {\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public double getArea(){\n return 3.14 * radius * radius;\n }", "public java.lang.String getVAL_AREA() {\r\n return VAL_AREA;\r\n }", "@Override\r\n\tpublic double area() {\r\n\r\n\t\treturn this.sideA*this.sideB;\r\n\t}", "public void setGroundArea(Number value) {\n setAttributeInternal(GROUNDAREA, value);\n }", "public void setAreaCode(int value) {\r\n this.areaCode = value;\r\n }", "private void mapAreaOne()\n\n {\n\n Area area = areaIDMap.get(Constants.FIRST_AREA_ID);\n\n area.areaMap.put(Constants.North, areaIDMap.get(Constants.SECOND_AREA_ID));\n\n area.areaMap.put(Constants.South, areaIDMap.get(Constants.FIFTH_AREA_ID));\n\n area.areaMap.put(Constants.East, areaIDMap.get(Constants.FOURTH_AREA_ID));\n\n area.areaMap.put(Constants.West, areaIDMap.get(Constants.SIXTH_AREA_ID));\n\n area.paths = Constants.NorthSouthEastAndWest;\n\n }", "AREA createAREA();", "public void setAreacode(Integer areacode) {\n this.areacode = areacode;\n }", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "public String getAreaName()\n {\n return this.areaName;\n }", "@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public void setBuildingarea(String buildingarea) {\r\n\t\tthis.buildingarea = buildingarea;\r\n\t}", "public int getAreaNo() {\n return areaNo_;\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "double getArea();", "double getArea();", "@Override\n\tpublic void area() {\n\t\tSystem.out.println(\"------------------------------\");\n\t\tSystem.out.println(this.name+\"的面积:\"+land1high*land1);\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "public Builder clearArea() {\n if (areaBuilder_ == null) {\n area_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n areaBuilder_.clear();\n }\n return this;\n }", "public Builder clearArea() {\n if (areaBuilder_ == null) {\n area_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n areaBuilder_.clear();\n }\n return this;\n }", "public Builder clearArea() {\n if (areaBuilder_ == null) {\n area_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n areaBuilder_.clear();\n }\n return this;\n }" ]
[ "0.7883478", "0.7746467", "0.76713645", "0.7489925", "0.72993326", "0.7182676", "0.7182676", "0.7103377", "0.7103377", "0.70442986", "0.70013684", "0.6965618", "0.6961695", "0.69417244", "0.69417244", "0.69417244", "0.6901725", "0.67350364", "0.67292625", "0.6701115", "0.66050184", "0.660275", "0.65697974", "0.65618086", "0.6548337", "0.6494761", "0.6485681", "0.6468135", "0.64432734", "0.63686335", "0.6337779", "0.62878793", "0.6217758", "0.6217758", "0.6203791", "0.62036616", "0.61668915", "0.6156204", "0.6146963", "0.6140062", "0.6125464", "0.6119057", "0.6119057", "0.6116203", "0.61122257", "0.61122257", "0.6111369", "0.61038053", "0.6103168", "0.60923326", "0.60923326", "0.60923326", "0.6081662", "0.60768133", "0.605536", "0.60467094", "0.6042852", "0.6042852", "0.6039589", "0.6032905", "0.6024841", "0.60244155", "0.60244155", "0.60244155", "0.6016032", "0.6015119", "0.6006354", "0.5999725", "0.5999258", "0.5992943", "0.59928066", "0.59492666", "0.59290254", "0.59252465", "0.5910144", "0.5910144", "0.5899889", "0.58921665", "0.58903223", "0.58894104", "0.5886385", "0.58756346", "0.5873175", "0.58559334", "0.58537066", "0.5852367", "0.58436406", "0.58397067", "0.58381957", "0.5833332", "0.5829948", "0.5827581", "0.5827581", "0.5827526", "0.5827526", "0.5817992", "0.5815252", "0.57934636", "0.57934636", "0.57934636" ]
0.76351696
3
Getter method for property region.
public String getRegion() { return region; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return this.region;\n }", "public Region getRegion() {\n return region;\n }", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "IRegion getRegion();", "public EnumRegion getRegion()\n {\n return region;\n }", "public int getRegionValue() {\n return region_;\n }", "public int getRegionValue() {\n return region_;\n }", "public TypeOfRegion getRegion();", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "int getRegionValue();", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public CoordinateRadius getRegion();", "@AutoEscape\n public String getRegion();", "public String getRegionNo() {\n return regionNo;\n }", "kr.pik.message.Profile.HowMe.Region getRegion();", "public String getRegionId() {\r\n return regionId;\r\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionno() {\n return regionno;\n }", "public Long getRegionId() {\n return this.regionId;\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public String getRegionName() {\n return regionName;\n }", "public String getRegionid() {\n return regionid;\n }", "public int getRegionid() {\n return regionid;\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public byte [] getRegionName() {\n return regionName;\n }", "public NegotiableQuoteAddressRegion getRegion() {\n return (NegotiableQuoteAddressRegion) get(\"region\");\n }", "public String getRegion_id() {\n return region_id;\n }", "public int getRegionid() {\n\treturn regionid;\n}", "public String getRegionFullName() {\n return regionFullName;\n }", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "@Nullable public abstract URI region();", "java.lang.String getRegionCode();", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public Regions getRegions () {\n return this.regions;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public double regionValue(){\n return counter.regionValue();\n }", "Region region();", "Region region();", "Region region();", "Region region();", "public Rectangle2D.Float getRegion() {\n\t\t\treturn new Rectangle2D.Float(origin.x, origin.y, width, height);\n\t\t}", "java.lang.String getRegionId();", "public List<String> regions() {\n return this.regions;\n }", "Integer getRegionId();", "public Region getCurrentRegion() {\n\n return currentRegion;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n }\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "public Texture getTexture() {\n\t\treturn region;\n\t}", "com.google.protobuf.ByteString getRegionCodeBytes();", "public ShowRegionElements getShowRegionAccess() {\n\t\treturn pShowRegion;\n\t}", "public String getStaticRegionId() {\n return staticRegionId;\n }", "@ApiModelProperty(value = \"State/region code of IP address\")\n public String getRegionCode() {\n return regionCode;\n }", "public TextureRegion getTextureRegion() {\n\t\treturn textureRegion;\n\t}", "public WorldRegions getWorldRegions()\n {\n return regions;\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setRegion(String region);", "public void setRegion(String region) {\n this.region = region;\n }", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "public String getOperateRegion() {\r\n return operateRegion;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getItuRegion() {\n return localItuRegion;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public String getStorageRegion() {\n return this.StorageRegion;\n }", "public String getValidRegionDesc();", "public java.util.List<String> getRegionNames() {\n if (regionNames == null) {\n regionNames = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return regionNames;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "@Schema(description = \"The country or region imposing the tax.\")\n public String getTaxingRegion() {\n return taxingRegion;\n }", "public BigDecimal getBENEF_REGION() {\r\n return BENEF_REGION;\r\n }", "public void setRegion(Region region) {\n this.region = region;\n }", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "public RegionState getRegionForState(String state);", "com.google.protobuf.ByteString\n getRegionIdBytes();", "public String getNomregion() {\n return (String) getAttributeInternal(NOMREGION);\n }", "public java.lang.String getPortRegionCode() {\n\t\treturn _tempNoTiceShipMessage.getPortRegionCode();\n\t}", "public int getC_Region_ID();" ]
[ "0.8131512", "0.8131512", "0.8131512", "0.8112334", "0.8112334", "0.8097342", "0.8097342", "0.8097342", "0.8097342", "0.8097342", "0.8071395", "0.80683535", "0.7814059", "0.77610534", "0.7704964", "0.7683116", "0.75715053", "0.75459665", "0.7508708", "0.7500151", "0.74578536", "0.7412714", "0.74063885", "0.7301327", "0.7277727", "0.72760314", "0.7242996", "0.7214435", "0.7214435", "0.7214435", "0.7213708", "0.7208445", "0.72037756", "0.7202252", "0.7185721", "0.7148235", "0.7055794", "0.7050601", "0.704928", "0.70334965", "0.69933933", "0.699244", "0.6966306", "0.68622524", "0.68421626", "0.67962366", "0.67839783", "0.67839783", "0.67839783", "0.67839783", "0.6783832", "0.6775325", "0.67701083", "0.67599374", "0.67599374", "0.67599374", "0.67599374", "0.66976434", "0.6624873", "0.6605172", "0.6582889", "0.65758425", "0.6549982", "0.6544961", "0.6536158", "0.6516946", "0.6501142", "0.6442448", "0.64388174", "0.6438797", "0.6422382", "0.64132893", "0.64089787", "0.6359742", "0.63246244", "0.6317283", "0.63164085", "0.6316377", "0.6313108", "0.6313108", "0.6313108", "0.6295024", "0.6293262", "0.62819743", "0.6281648", "0.62519586", "0.6244603", "0.6227967", "0.6227967", "0.6227967", "0.6203215", "0.6170816", "0.614637", "0.614019", "0.61130035", "0.60916424", "0.60023767", "0.60023", "0.59803283", "0.59745187" ]
0.8033688
12
Setter method for property region.
public void setRegion(String region) { this.region = region; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRegion(String region);", "public void setRegion(Region region) {\n this.region = region;\n }", "@Generated\n @Selector(\"setRegion:\")\n public native void setRegion(@NotNull UIRegion value);", "public void setRegion(CoordinateRadius region);", "public void setRegion(final TypeOfRegion region);", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(EnumRegion region)\n {\n this.region = region;\n }", "@Method(selector = \"setRegion:animated:\")\n public native void setRegion(@ByVal MKCoordinateRegion region, boolean animated);", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public void setREGION(java.lang.String value)\n {\n if ((__REGION == null) != (value == null) || (value != null && ! value.equals(__REGION)))\n {\n _isDirty = true;\n }\n __REGION = value;\n }", "public void setC_Region_ID (int C_Region_ID);", "public Builder setRegion(kr.pik.message.Profile.HowMe.Region value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n region_ = value.getNumber();\n onChanged();\n return this;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public Region getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public Builder setRegionValue(int value) {\n region_ = value;\n onChanged();\n return this;\n }", "public String getRegion() {\n return this.region;\n }", "public Builder setRegion(String region) {\n try {\n _locbld.setRegion(region);\n } catch (InvalidLocaleIdentifierException e) {\n throw new IllegalArgumentException(e);\n }\n return this;\n }", "@AutoEscape\n public String getRegion();", "public int getRegionValue() {\n return region_;\n }", "public void setCurrentRegion(Region currentRegion) {\n\n this.currentRegion = currentRegion;\n }", "public void setTexture(TextureRegion region) {\n \ttexture = region;\n \torigin = new Vector2(texture.getRegionWidth()/2.0f,texture.getRegionHeight()/2.0f);\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "public int getRegionValue() {\n return region_;\n }", "IRegion getRegion();", "public void testGetSetRegion() {\n exp = new Experiment(\"10\");\n GeoLocation location = new GeoLocation(50.0, 40.0);\n exp.setRegion(location);\n assertEquals(\"get/setRegion does not work\", 50.0, exp.getRegion().getLat());\n assertEquals(\"get/setRegion does not work\", 40.0, exp.getRegion().getLon());\n }", "public String getRegionid() {\n return regionid;\n }", "public String getRegion_id() {\n return region_id;\n }", "public String getRegionId() {\r\n return regionId;\r\n }", "void addRegion(Region region);", "public long getRegionId() {\r\n return regionId;\r\n }", "public void setRegionId(long regionId) {\r\n this.regionId = regionId;\r\n }", "public String getRegionNo() {\n return regionNo;\n }", "@Test\n public void testSetAndGetRegion() {\n System.out.println(\"getRegion\");\n TextRegion instance = new TextRegion();\n assertNull(instance.getRegion());\n String expResult = \"region\";\n instance.setRegion(expResult);\n String result = instance.getRegion();\n assertEquals(expResult, result);\n assertEquals(0.0f, instance.getConfidence(), 0.001f);\n assertNull(instance.getImageUrl());\n assertNull(instance.getOrder());\n assertNull(instance.getPageUrl());\n assertNull(instance.getResourceId());\n assertNull(instance.getText());\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public Builder setRegionId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n regionId_ = value;\n onChanged();\n return this;\n }", "public void setRegionid(int newRegionid) {\n regionid = newRegionid;\n }", "public void setRegionid(int newValue) {\n\tthis.regionid = newValue;\n}", "public Long getRegionId() {\n return this.regionId;\n }", "public String getRegionno() {\n return regionno;\n }", "public int getRegionid() {\n return regionid;\n }", "int getRegionValue();", "public void setRegionname(java.lang.String newRegionname) {\n\tregionname = newRegionname;\n}", "public int getRegionid() {\n\treturn regionid;\n}", "public void setRegion_id(String region_id) {\n this.region_id = region_id;\n }", "public TypeOfRegion getRegion();", "Region region();", "Region region();", "Region region();", "Region region();", "@NotNull\n @Generated\n @Selector(\"region\")\n public native UIRegion region();", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public Builder withRegion(final String region) {\n this.region = region;\n return this;\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public void setRegionid(String regionid) {\n this.regionid = regionid;\n }", "public void setItuRegion(int param) {\n if (param == java.lang.Integer.MIN_VALUE) {\n localItuRegionTracker = false;\n } else {\n localItuRegionTracker = true;\n }\n this.localItuRegion = param;\n }", "public void setRegionManager(final RegionManagerBean injRegionManager) {\n regionManager = injRegionManager;\n }", "public String getRegionName() {\n return regionName;\n }", "public void setRegionNo(String regionNo) {\n this.regionNo = regionNo == null ? null : regionNo.trim();\n }", "public Builder setRegion(String region) {\n/* 1601 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public CoordinateRadius getRegion();", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public void setRegionName(String regionName) {\r\n this.regionName = regionName == null ? null : regionName.trim();\r\n }", "public void setRegionId(String regionId) {\r\n this.regionId = regionId == null ? null : regionId.trim();\r\n }", "public void setRegionno(String regionno) {\n this.regionno = regionno == null ? null : regionno.trim();\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "@Nullable public abstract URI region();", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public void save() {\n RegionOwn.saveRegionOwner(this);\n }", "@ApiModelProperty(value = \"State/region code of IP address\")\n public String getRegionCode() {\n return regionCode;\n }", "public void setStorageRegion(String StorageRegion) {\n this.StorageRegion = StorageRegion;\n }", "public void toggleRegion(){\n\t\tif(getRegion() == regionNormal)\n\t\t\tsetRegion(regionDown);\n\t\t\n\t\telse if(getRegion() == regionDown)\n\t\t\tsetRegion(regionNormal);\t\t\n\t}", "public void setRegionFullName(String regionFullName) {\n this.regionFullName = regionFullName == null ? null : regionFullName.trim();\n }", "public byte [] getRegionName() {\n return regionName;\n }", "@Test\n\tpublic void testSetRegionMap() {\n\t\tMap<String, Region> regionMap = new LinkedHashMap<String, Region>();\n\t\tRegion caRegion = new RegionImpl(COUNTRY_CODE_CA,\n\t\t\t\t\t\t\t\t\t\t Arrays.asList(SUB_COUNTRY_CODE_AB, SUB_COUNTRY_CODE_BC));\n\t\tregionMap.put(COUNTRY_CODE_CA, caRegion);\n\n\t\tregionMap.put(COUNTRY_CODE_US, new RegionImpl(\"US\"));\n\n\t\tthis.shippingRegionImpl.setRegionMap(regionMap);\n\t\tassertSame(regionMap, this.shippingRegionImpl.getRegionMap());\n\n\t\t//Check the regionStr\n\t\tString regionString = this.shippingRegionImpl.getRegionStr();\n\t\tassertTrue(regionString.contains(\"[CA(AB,BC)]\"));\n\t\tassertTrue(regionString.contains(\"[US()]\"));\n\t}", "public String getRegionFullName() {\n return regionFullName;\n }" ]
[ "0.7793143", "0.75845027", "0.7566997", "0.7505375", "0.74107367", "0.7358714", "0.7329305", "0.7329305", "0.7329305", "0.7289737", "0.72282046", "0.72282046", "0.72282046", "0.7220757", "0.68926305", "0.6864642", "0.6864642", "0.68365085", "0.67149556", "0.67142624", "0.6712548", "0.6712548", "0.6712548", "0.6637419", "0.6637419", "0.6624167", "0.6624167", "0.6624167", "0.6624167", "0.6624167", "0.6605616", "0.65987724", "0.65965515", "0.6555331", "0.6325071", "0.6196183", "0.61893284", "0.617379", "0.6166505", "0.61483043", "0.61240053", "0.61179256", "0.6066747", "0.6052824", "0.6038717", "0.60385686", "0.60345453", "0.60336185", "0.60065615", "0.5998591", "0.5988432", "0.59822845", "0.59822845", "0.59822845", "0.59807485", "0.59770006", "0.59728646", "0.5970797", "0.59623075", "0.5955326", "0.5936546", "0.59300333", "0.5927276", "0.59188515", "0.5907336", "0.5893654", "0.5893654", "0.5893654", "0.5893654", "0.5880983", "0.58786124", "0.58476514", "0.5832976", "0.57904416", "0.578883", "0.5787291", "0.5785532", "0.57767314", "0.5761803", "0.56883657", "0.56731164", "0.56583494", "0.5653428", "0.564728", "0.5646909", "0.56230056", "0.5619729", "0.5593763", "0.5572779", "0.5572779", "0.5572779", "0.55609554", "0.55422765", "0.5510509", "0.550746", "0.55024195", "0.5489607", "0.5472827", "0.5437739", "0.5418172" ]
0.72119135
14
Getter method for property city.
public String getCity() { return city; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\n return (String) get(\"city\");\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity()\n {\n \treturn city;\n }", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "@Override\n public String getCity() {\n return this.city;\n }", "public City getCity() {\n return city;\n }", "public String getCity() {\n return City;\n }", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return City;\n }", "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public String getLocationCity() {\n return locationCity;\n }", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }", "String getCity();", "@AutoEscape\n\tpublic String getCity();", "public String getCityName() {\n return cityName;\n }", "public String getCityName() {\n return cityName;\n }", "public String getCompanyCity() {\n return companyCity;\n }", "public String getContactCity() {\n return contactCity;\n }", "public String getCityname() {\n return cityname;\n }", "@Override\n\tpublic java.lang.String getCity() {\n\t\treturn _candidate.getCity();\n\t}", "public String getJobCity() {\r\n return jobCity;\r\n }", "public String getCityno() {\n return cityno;\n }", "public String getCityId() {\n return cityId;\n }", "@ApiModelProperty(value = \"City of IP address\")\n public String getCity() {\n return city;\n }", "public abstract String getCity();", "public String getCityId() {\r\n return cityId;\r\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "java.lang.String getCityName();", "public String getCorpCity() {\n return corpCity;\n }", "public void getCity(){\n }", "public Long getCityId() {\n return cityId;\n }", "public CityEntry getCity(){\n\t\treturn (CityEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_LINK);\n\t}", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "@ApiModelProperty(value = \"所在-市\")\n public String getCity() {\n return city;\n }", "public CustomerAddressQuery city() {\n startField(\"city\");\n\n return this;\n }", "public String getCity_id() {\n return city_id;\n }", "public void setCity(String city){\n this.city = city;\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public String getCityName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_NAME);\n\t}", "public void setCity(String city) {\n this.city = city;\n }", "@SuppressWarnings(\"unused\")\n public Integer getCityID() { return cityID; }", "String getCityname(){\n \treturn city_name;\n }", "public String getHospitalCity() {\n return hospitalCity;\n }", "public Integer getCityid() {\n return cityid;\n }", "public String getCityFieldName() {\n return getStringProperty(CITY_FIELD_NAME_KEY);\n }", "public void setCity(City city) {\n this.city = city;\n }", "public String getAdmCity() {\n return admCity;\n }", "public void setCity (String city) {\n\t\tthis.city=city;\n\t}", "public void setCity(String city){\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public String getCreatecity() {\n return createcity;\n }", "public String getAccountCityName() {\n return accountCityName;\n }", "public Address city(String city) {\n this.city = city;\n return this;\n }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}" ]
[ "0.86548114", "0.86548114", "0.86548114", "0.8648216", "0.8625721", "0.8625721", "0.8625721", "0.86165446", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8611426", "0.8548449", "0.85317034", "0.85317034", "0.85220295", "0.8500062", "0.8500062", "0.8499079", "0.8487563", "0.8478034", "0.846316", "0.846316", "0.846316", "0.846316", "0.8451827", "0.84499854", "0.84368545", "0.84281117", "0.8405158", "0.8395028", "0.8395028", "0.8305721", "0.8299991", "0.82660264", "0.82514596", "0.82514596", "0.82292026", "0.81388533", "0.79832125", "0.79789656", "0.7976052", "0.7955408", "0.7955408", "0.79179144", "0.78740275", "0.78400695", "0.778475", "0.7732142", "0.7714775", "0.76676154", "0.76668334", "0.76542073", "0.76175874", "0.7615464", "0.7615464", "0.7590844", "0.7581926", "0.74593145", "0.74566996", "0.7444315", "0.7426461", "0.7426461", "0.74035466", "0.73816067", "0.7378429", "0.7367371", "0.73569816", "0.73569816", "0.73431647", "0.73431647", "0.73431647", "0.73431647", "0.73431647", "0.73431647", "0.7342391", "0.7336091", "0.7334094", "0.7321639", "0.72931635", "0.7246881", "0.7238183", "0.72346735", "0.72326523", "0.72209233", "0.72115237", "0.72016925", "0.72016925", "0.7190266", "0.71724886", "0.715867", "0.7134174", "0.7115374", "0.7115374" ]
0.86137813
8
Setter method for property city.
public void setCity(String city) { this.city = city; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCity(City city) {\n this.city = city;\n }", "public void setCity(String city);", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city){\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity (String city) {\n\t\tthis.city=city;\n\t}", "public void setCity(City city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city){\n\t\tthis.city = city;\n\t}", "public void setCity(java.lang.String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city)\n\t{\n\t\tCity = city;\n\t}", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(java.lang.String City) {\n this.City = City;\n }", "@Override\n public void setCity(String a) {\n this.city = a;\n }", "public void setCity (java.lang.String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public abstract void setCity(String sValue);", "public void setCity(String value) {\n setAttributeInternal(CITY, value);\n }", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }", "@Override\n\tpublic void setCity(java.lang.String city) {\n\t\t_candidate.setCity(city);\n\t}", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public void setLocationCity(String locationCity) {\n this.locationCity = locationCity;\n }", "public boolean setCity(String someCity) {\n if (VMSPro.checkString(someCity)) {\n this.city = someCity;\n return true;\n }\n return false;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public Address city(String city) {\n this.city = city;\n return this;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "@SuppressWarnings(\"All\")\n void setCity(String city){\n prefs.edit().putString(\"city\", city).commit();\n }", "@Override\n public String getCity() {\n return this.city;\n }", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public City getCity() {\n return city;\n }", "public String getCity()\n {\n \treturn city;\n }", "public String getCity() {\n return City;\n }", "public void setCity(String s) {\r\n\t\tstate = s;\t\t\r\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "@ApiModelProperty(value = \"City of IP address\")\n public String getCity() {\n return city;\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public void setJobCity(String jobCity) {\r\n this.jobCity = jobCity;\r\n }", "public void setCityname(String cityname) {\n this.cityname = cityname;\n }", "public void setContactCity(String contactCity) {\n this.contactCity = contactCity;\n }", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public void setCityFieldName(final String value) {\n setProperty(CITY_FIELD_NAME_KEY, value);\n }", "public void setCityId(String cityId) {\n this.cityId = cityId;\n }", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public void setCityId(String cityId) {\r\n this.cityId = cityId;\r\n }", "public String getCityName() {\n return cityName;\n }", "public String getCityName() {\n return cityName;\n }", "public String getCityname() {\n return cityname;\n }", "@AutoEscape\n\tpublic String getCity();", "public String getCityId() {\r\n return cityId;\r\n }", "public String getCityId() {\n return cityId;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public void setCity_id(String city_id) {\n this.city_id = city_id;\n }" ]
[ "0.8527293", "0.8463363", "0.83847237", "0.83847237", "0.83731836", "0.8330701", "0.8330701", "0.8330701", "0.8330701", "0.8330701", "0.8330701", "0.8236547", "0.8216861", "0.8171864", "0.81706524", "0.8161946", "0.8161946", "0.8147446", "0.8136603", "0.8136603", "0.80421126", "0.80421126", "0.80421126", "0.80421126", "0.7943648", "0.7904459", "0.7899392", "0.7876034", "0.7876034", "0.78069705", "0.78069705", "0.78069705", "0.78069705", "0.78069705", "0.7734865", "0.76343584", "0.762691", "0.7607089", "0.7527489", "0.7527489", "0.7527489", "0.7507999", "0.74960005", "0.7493303", "0.7493303", "0.7493303", "0.74819493", "0.7450574", "0.7449844", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.7448576", "0.74133164", "0.74133164", "0.7390262", "0.7347789", "0.7304828", "0.73007166", "0.73007166", "0.73007166", "0.73007166", "0.7264462", "0.72422266", "0.7241412", "0.7241412", "0.72125673", "0.72112536", "0.7208939", "0.7165178", "0.7159165", "0.71590865", "0.71590865", "0.71193975", "0.7119026", "0.70940167", "0.7088214", "0.7081201", "0.7046459", "0.70190644", "0.70190644", "0.70015836", "0.69799465", "0.6972059", "0.6958682", "0.6939964", "0.6939964", "0.6937485", "0.69348586", "0.6924672", "0.69242775", "0.6886724", "0.6886724", "0.6882996" ]
0.829339
11
Getter method for property county.
public String getCounty() { return county; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCounty() {\r\n return county;\r\n }", "public String getCounty()\n {\n \treturn county;\n }", "public String getCounty() {\n return mCounty;\n }", "public String getCountyname() {\n return countyname;\n }", "public Integer getCountyid() {\n return countyid;\n }", "public String getCountyCd() {\n\t\treturn countyCd;\n\t}", "@ApiModelProperty(value = \"所在-区\")\n public String getCounty() {\n return county;\n }", "public String getCounty_id() {\n return county_id;\n }", "@Override\n public String toString() {\n return getCounty();\n }", "public void setCounty(String county) {\r\n this.county = county;\r\n }", "public void setCounty(String county) {\n this.county = county;\n }", "public java.lang.String getSzCdCounty()\r\n {\r\n return this._szCdCounty;\r\n }", "public String getCountyFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTY);\n }", "public void setCounty(String county) {\n this.county = county == null ? null : county.trim();\n }", "public Long getCountyagent() {\n return countyagent;\n }", "public void setCounty_id(String county_id) {\n this.county_id = county_id;\n }", "public gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct getCityCountyStruct(int index)\r\n throws java.lang.IndexOutOfBoundsException\r\n {\r\n // check bounds for index\r\n if (index < 0 || index >= this._cityCountyStructList.size()) {\r\n throw new IndexOutOfBoundsException(\"getCityCountyStruct: Index value '\" + index + \"' not in range [0..\" + (this._cityCountyStructList.size() - 1) + \"]\");\r\n }\r\n \r\n return (gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct) _cityCountyStructList.get(index);\r\n }", "public void setCountyid(Integer countyid) {\n this.countyid = countyid;\n }", "public String getCouname() {\n return couname;\n }", "public int getCityCountyStructCount()\r\n {\r\n return this._cityCountyStructList.size();\r\n }", "public void setCountyname(String countyname) {\n this.countyname = countyname;\n }", "public void setSzCdCounty(java.lang.String szCdCounty)\r\n {\r\n this._szCdCounty = szCdCounty;\r\n }", "public gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[] getCityCountyStruct()\r\n {\r\n int size = this._cityCountyStructList.size();\r\n gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[] array = new gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[size];\r\n for (int index = 0; index < size; index++){\r\n array[index] = (gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct) _cityCountyStructList.get(index);\r\n }\r\n \r\n return array;\r\n }", "String getCity();", "@Override\n public String getCity() {\n return this.city;\n }", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "java.lang.String getCityName();", "public void setCounselingField( String counselingField ) {\n this.counselingField = counselingField;\n }", "public java.util.Enumeration<gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct> enumerateCityCountyStruct()\r\n {\r\n return java.util.Collections.enumeration(this._cityCountyStructList);\r\n }", "public String getCity() {\n return (String) get(\"city\");\n }", "public Integer getCyrs() {\r\n return cyrs;\r\n }", "public String getNationality(){\n\t\treturn nationality;\n\t}", "int countByExample(CountyExample example);", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "public String getCouncil() {\n return council;\n }", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "County selectByPrimaryKey(Long id);", "public String getCityno() {\n return cityno;\n }", "public java.lang.String getCity() {\n return City;\n }", "public String getCity() {\n return City;\n }", "public String getCorpCity() {\n return corpCity;\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCompanyCity() {\n return companyCity;\n }", "@Override\n\tpublic java.lang.String getCity() {\n\t\treturn _candidate.getCity();\n\t}", "public String getCity() {\n return city;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public java.util.List<gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct> getCityCountyStructAsReference()\r\n {\r\n return this._cityCountyStructList;\r\n }", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public abstract String getCity();", "@AutoEscape\n\tpublic String getCity();", "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "public String getCity()\n {\n \treturn city;\n }", "java.lang.String getCountry();", "java.lang.String getCountry();", "@AutoEscape\n\tpublic String getNationality();", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public City getCity() {\n return city;\n }", "public int getCityCount() {\n\t\treturn cityCount;\n\t}", "@Override\r\n\tpublic PsType getPsType() {\n\t\treturn PsType.NY;\r\n\t}", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public String getPhnAreaCityCd()\n\t{\n\t\treturn mPhnAreaCityCd;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCounty(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[5];\n\t}", "List<County> selectByExample(CountyExample example);", "public String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getAccountCityName() {\n return accountCityName;\n }", "public String getNationality() {\r\n\t\treturn nationality;\r\n\t}", "public String getAreaCityCode() {\n return areaCityCode;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "public String getCity() {\n return city;\n }", "public String getCityCode() {\n return (String)getAttributeInternal(CITYCODE);\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public int getPennies()\n {\n\treturn pennies;\n }", "public java.lang.String getCityPostalcode () {\n\t\treturn cityPostalcode;\n\t}", "public String getBankCity() {\r\n return bankCity;\r\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCityName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_NAME);\n\t}" ]
[ "0.86527824", "0.8489922", "0.83471465", "0.78239125", "0.7729133", "0.76870924", "0.76271516", "0.75775373", "0.7390961", "0.7283088", "0.72696495", "0.7254065", "0.70417464", "0.66090465", "0.63552445", "0.6222266", "0.6178018", "0.61117375", "0.6062521", "0.60503286", "0.59735125", "0.59151405", "0.58516693", "0.5795509", "0.57939225", "0.5768081", "0.5768081", "0.5767768", "0.57655525", "0.5751897", "0.5717913", "0.5709971", "0.5703197", "0.56985074", "0.5695419", "0.56657666", "0.5654426", "0.564016", "0.564016", "0.564016", "0.56369495", "0.5625838", "0.5621723", "0.558346", "0.5576301", "0.55691653", "0.5558904", "0.5555778", "0.55554885", "0.55326885", "0.55326885", "0.55326885", "0.5518041", "0.5516739", "0.5516739", "0.5506946", "0.550265", "0.55010766", "0.5500062", "0.5497944", "0.5497944", "0.5496963", "0.549447", "0.54934347", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.54909253", "0.5488281", "0.5480511", "0.54805106", "0.54723316", "0.54723316", "0.5471736", "0.5458055", "0.5455245", "0.5454996", "0.54463387", "0.5432791", "0.5432572", "0.54296124", "0.5426312", "0.5417141", "0.54162985", "0.54158723", "0.5413314", "0.5413314", "0.5406775", "0.539066", "0.53903836", "0.53856695", "0.5378607", "0.5378607", "0.5364633" ]
0.8658718
0
Setter method for property county.
public void setCounty(String county) { this.county = county; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCounty(String county) {\r\n this.county = county;\r\n }", "public String getCounty() {\n return county;\n }", "public void setCounty(String county) {\n this.county = county == null ? null : county.trim();\n }", "public String getCounty() {\r\n return county;\r\n }", "public String getCounty()\n {\n \treturn county;\n }", "public String getCounty() {\n return mCounty;\n }", "public void setCountyid(Integer countyid) {\n this.countyid = countyid;\n }", "public void setCounty_id(String county_id) {\n this.county_id = county_id;\n }", "public String getCounty_id() {\n return county_id;\n }", "@ApiModelProperty(value = \"所在-区\")\n public String getCounty() {\n return county;\n }", "public Integer getCountyid() {\n return countyid;\n }", "public void setCountyname(String countyname) {\n this.countyname = countyname;\n }", "public String getCountyname() {\n return countyname;\n }", "public String getCountyCd() {\n\t\treturn countyCd;\n\t}", "public void setSzCdCounty(java.lang.String szCdCounty)\r\n {\r\n this._szCdCounty = szCdCounty;\r\n }", "@Override\n public String toString() {\n return getCounty();\n }", "public void setCounselingField( String counselingField ) {\n this.counselingField = counselingField;\n }", "public java.lang.String getSzCdCounty()\r\n {\r\n return this._szCdCounty;\r\n }", "int updateByPrimaryKeySelective(County record);", "int updateByPrimaryKey(County record);", "public abstract void setCity(String sValue);", "public void setCountable(Boolean countable) {\n\t this.countable = countable;\n\t}", "public String getCountyFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTY);\n }", "public void setNationality(String nationality);", "public void setNY(int ny){\n newY=ny;\n }", "public Long getCountyagent() {\n return countyagent;\n }", "int updateByExampleSelective(County record, CountyExample example);", "int updateByExample(County record, CountyExample example);", "public void setCounselType( Short counselType ) {\n this.counselType = counselType;\n }", "public void setCity(String city);", "public void setCountyagent(Long countyagent) {\n this.countyagent = countyagent;\n }", "public void setCouname(String couname) {\n this.couname = couname == null ? null : couname.trim();\n }", "public int getCityCountyStructCount()\r\n {\r\n return this._cityCountyStructList.size();\r\n }", "public void setCityCount(int cityCount) {\n\t\tthis.cityCount = cityCount;\n\t}", "@Override\n\t\t\t\tpublic void onItemSelected(AdapterView<?> parent, View v, int position,long id) {\n\t\t\t\t\tselectedCounrty = parent.getItemAtPosition(position).toString();\n\t\t\t\t}", "int countByExample(CountyExample example);", "County selectByPrimaryKey(Long id);", "public void setCity(City city) {\n this.city = city;\n }", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }", "public void setCouncil(String council) {\n this.council = council;\n }", "public void setCity(String s) {\r\n\t\tstate = s;\t\t\r\n\t}", "public void addInfectedCounty(String county) {\n\n File file = new File(\"src/com/company/Data/Users.json\");\n\n if (file.exists()) {\n // Caso que o ficheiro exista\n try {\n JSONParser jsonParser = new JSONParser();\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONArray listCounties = (JSONArray) obj.get(\"Counties\");\n\n JSONObject countyObj;\n boolean found = false;\n\n for (int i = 0; !found && i < listCounties.size(); i++) {\n countyObj = (JSONObject) listCounties.get(i);\n\n if (countyObj.get(\"name\").equals(county)) {\n found = true;\n int totalAdd = Integer.parseInt(countyObj.get(\"infectedTot\").toString()) + 1;\n\n ((JSONObject) listCounties.get(i)).put(\"infectedTot\", totalAdd);\n }\n\n }\n\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n JSONArray register = (JSONArray) obj.get(\"Registry\");\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", register);\n objWrite.put(\"Counties\", listCounties);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct getCityCountyStruct(int index)\r\n throws java.lang.IndexOutOfBoundsException\r\n {\r\n // check bounds for index\r\n if (index < 0 || index >= this._cityCountyStructList.size()) {\r\n throw new IndexOutOfBoundsException(\"getCityCountyStruct: Index value '\" + index + \"' not in range [0..\" + (this._cityCountyStructList.size() - 1) + \"]\");\r\n }\r\n \r\n return (gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct) _cityCountyStructList.get(index);\r\n }", "@Test\r\n public void testSetNationality() {\r\n System.out.println(\"setNationality\");\r\n String nationality = null;\r\n Interviewee instance = new Interviewee();\r\n instance.setNationality(nationality);\r\n // TODO review the generated test code and remove the default call to fail.\r\n \r\n }", "public void setCyrs(Integer cyrs) {\r\n this.cyrs = cyrs;\r\n }", "public void setCity(String city){\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "@Override\n public void setCity(String a) {\n this.city = a;\n }", "public String getCouname() {\n return couname;\n }", "public java.util.Enumeration<gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct> enumerateCityCountyStruct()\r\n {\r\n return java.util.Collections.enumeration(this._cityCountyStructList);\r\n }", "public void setCity(String value) {\n setAttributeInternal(CITY, value);\n }", "@Override\n\tpublic void setNationality(java.lang.String nationality) {\n\t\t_candidate.setNationality(nationality);\n\t}", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public Capital() {\n\t\tthis.nation = \"korea\";\n\t\tthis.capital = \"seoul\";\n\t}", "public void setNationality(String nationality){\n\t\tthis.nationality = nationality;\n\t}", "public void setCity(java.lang.String City) {\n this.City = City;\n }", "public void setCity( EAIMMCtxtIfc theCtxt, java.lang.String theCity) throws EAIException;", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "List<County> selectByExample(CountyExample example);", "public void setNationality(String nationality) {\n this.nationality = nationality;\n }", "void insertSelective(County record);", "public void setOccupancy(int value) {\n this.occupancy = value;\n }", "public String getCityno() {\n return cityno;\n }", "public int getCityCount() {\n\t\treturn cityCount;\n\t}", "public abstract void setCntCod(int cntCod);", "@Override\n public String getCity() {\n return this.city;\n }", "public void setCity(City city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n this.city = city;\n }", "public void setNationality(String nationality) {\r\n\t\tthis.nationality = nationality;\r\n\t}", "public void setCity(String city)\n\t{\n\t\tCity = city;\n\t}", "@JsonSetter(\"salary\")\n public void setSalary (int value) { \n this.salary = value;\n notifyObservers(this.salary);\n }", "void setCapital(ch.crif_online.www.webservices.crifsoapservice.v1_00.Amount capital);", "public void setDistrict(int district) { this.district = district; }", "void insert(County record);", "public java.util.Iterator<gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct> iterateCityCountyStruct()\r\n {\r\n return this._cityCountyStructList.iterator();\r\n }", "public void setCity (String city) {\n\t\tthis.city=city;\n\t}", "public String getPhnAreaCityCd()\n\t{\n\t\treturn mPhnAreaCityCd;\n\t}", "@Override\r\n\tpublic PsType getPsType() {\n\t\treturn PsType.NY;\r\n\t}", "public void setSrcCity(String value) {\r\n setAttributeInternal(SRCCITY, value);\r\n }", "public void setCity(String city){\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "@AutoEscape\n\tpublic String getCity();", "private void fillCountyManager(CountyManager cmr,CountyManagerForm countyManager) {\n\t\tCounty county = countyDao.findUniqueBy(\"countyId\", countyManager.getCountyId());\n\t\tcmr.setCounty(county);\n\t}", "@SuppressWarnings(\"All\")\n void setCity(String city){\n prefs.edit().putString(\"city\", city).commit();\n }", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public java.util.List<gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct> getCityCountyStructAsReference()\r\n {\r\n return this._cityCountyStructList;\r\n }", "public void setCpnyCd(String CpnyCd) {\n\t\t_CpnyCd = CpnyCd;\n\t}", "public void setCity(java.lang.String city) {\r\n this.city = city;\r\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public void setCityState(String cityState) {\r\n\t\tthis.cityState = cityState;\r\n\t}" ]
[ "0.84229517", "0.7692943", "0.76859426", "0.7683258", "0.737294", "0.73010135", "0.71777815", "0.7160993", "0.71213245", "0.7106054", "0.7064159", "0.70537174", "0.7040384", "0.69745404", "0.6618513", "0.6463209", "0.6391317", "0.63669705", "0.5895684", "0.57729447", "0.57656634", "0.5762766", "0.57364565", "0.5695494", "0.5677352", "0.56257933", "0.5581791", "0.5576894", "0.5556636", "0.555019", "0.5498817", "0.54939336", "0.5452397", "0.54110235", "0.5383102", "0.52397364", "0.52050406", "0.5196086", "0.519339", "0.51759887", "0.51540256", "0.514727", "0.5115625", "0.51118696", "0.50706285", "0.50681704", "0.506267", "0.506267", "0.5042387", "0.50399673", "0.50147706", "0.5007996", "0.49961987", "0.49778774", "0.49778774", "0.49555466", "0.49443513", "0.4930534", "0.49120516", "0.48903582", "0.48903582", "0.48903582", "0.48903582", "0.48903582", "0.48903582", "0.48821938", "0.4873335", "0.48433983", "0.48428312", "0.48383796", "0.48252138", "0.48114076", "0.48098227", "0.48086408", "0.48063552", "0.4805108", "0.48027202", "0.4792438", "0.47917628", "0.47890037", "0.47797662", "0.47725484", "0.47665197", "0.47489196", "0.47462273", "0.47393134", "0.4738924", "0.4715501", "0.4715501", "0.47126517", "0.47113696", "0.47096068", "0.47085455", "0.47085455", "0.47017843", "0.4688276", "0.4686914", "0.46853805", "0.46853805", "0.4683435" ]
0.8356185
1
Getter method for property isp.
public String getIsp() { return isp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getIsp_id() {\n return isp_id;\n }", "public PIS getPis() {\n return pis;\n }", "public void setIsp(String isp) {\n this.isp = isp;\n }", "String getProperty();", "String getProperty();", "String getProperty();", "public String getCorpProvince() {\n return corpProvince;\n }", "@JsonProperty(PROP_SRC_OR_DST_IPS)\n public IpSpace getSrcOrDstIps() {\n return _srcOrDstIps;\n }", "public String getProperty();", "public String getCorpCity() {\n return corpCity;\n }", "public String getPs() {\n return ps;\n }", "java.lang.String getProperty();", "public String getCompany()\n {\n return (String) getProperty(PropertyIDMap.PID_COMPANY);\n }", "public String getHospitalCity() {\n return hospitalCity;\n }", "Property getProperty();", "Property getProperty();", "public Z getP() {\n return mP;\n }", "@JsonProperty(PROP_SRC_IPS)\n public IpSpace getSrcIps() {\n return _srcIps;\n }", "public String getProperty() {\n return \"\";\n }", "@Override\n\t\t\t\tpublic String getValue() {\n\t\t\t\t\treturn pc.name();\n\t\t\t\t}", "public void setIsp_id(String isp_id) {\n this.isp_id = isp_id;\n }", "@Override\n\tpublic String getProvincia() {\n\t\treturn model.getProvincia();\n\t}", "public Number getPesocont()\n {\n return (Number)getAttributeInternal(PESOCONT);\n }", "public String getHospitalProvince() {\n return hospitalProvince;\n }", "public String getSpLocation() {\r\n return spLocation;\r\n }", "public ISLP<N, S, W, P> getSlp() {\n return slp;\n }", "public String getCompanyCity() {\n return companyCity;\n }", "public PC getPC() {return _pc;}", "public java.lang.String getPresentity(){\r\n return localPresentity;\r\n }", "public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Estado_ps_peticionLocal getEstado_ps_peticion();", "public CostoGastoImporLogic getCostoGastoImporLogic()\t{\t\t\r\n\t\treturn costogastoimporLogic;\r\n\t}", "public String getPn() { return this.pn; }", "public Integer getProperty() {\n\t\t\treturn null;\n\t\t}", "public int getPais() {\n return pais;\n }", "String getPais();", "public Property getProperty() {\n\treturn commonproperty;\r\n}", "@Override\n public String getProperty(String s) {\n return null;\n }", "protected abstract String getPropertyValue(Server instance);", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public String getCity()\n {\n \treturn city;\n }", "public String getProjContactPhone() {\n return projContactPhone;\n }", "public jkt.hms.masters.business.MasHospital getComapny () {\n\t\treturn comapny;\n\t}", "public OspfProcess getOspfConfig() {\n\t\treturn this.ospfConfig;\n\t}", "@Override\r\n\tpublic PsType getPsType() {\n\t\treturn PsType.NY;\r\n\t}", "public IPV getPV(){\n return pvMap.get(IPVWidgetModel.PROP_PVNAME);\n }", "String getCity();", "public int getPlat()\n {\n return plat;\n }", "public String getSite() {\r\n return site;\r\n }", "public String getSite() {\r\n return site;\r\n }", "private Physician getPhysician() {\n\t\treturn this.physician;\r\n\t}", "public String getCnpjPossuidor() {\n return cnpjPossuidor;\n }", "public MPPS getMppsI() {\n\t\treturn mppsI;\n\t}", "protected final IntervalNode getP() {\n\treturn(this.p);\n }", "public String getSite() {\n return site;\n }", "public abstract String getCity();", "@Override\n public int get()\n { \n return this.pr;\n }", "@Override\n public String getCity() {\n return this.city;\n }", "public jkt.hrms.masters.business.MstrProject getPrj () {\n\t\treturn prj;\n\t}", "public String getProptel() {\r\n\t\treturn proptel;\r\n\t}", "public PortAllié getSparte() {\n\t\treturn this.Sparte;\n\t}", "public String getCompany()\r\n {\r\n return (m_company);\r\n }", "@Override\n public String getCPR() {\n return CPR;\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\n return City;\n }", "public String getNombreParking() {\n return nombreParking;\n\n }", "public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Estado_psLocal getEstado_ps();", "public String getCity() {\n return (String) get(\"city\");\n }", "public java.lang.String getPon() {\n return pon;\n }", "public String getScqymc() {\n return scqymc;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public static PVProperty getPVProperty() {\n return pvProperty;\n }", "Object getPropertytrue();", "public Site getSite() {\n return site;\n }", "public int getProS() {\n/* 60 */ return this.proS;\n/* */ }", "@java.lang.Override\n public double getPValue() {\n return pValue_;\n }", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public String getProjFlow() {\r\n\t\treturn projFlow;\r\n\t}", "public CtrlPorta getCtrlP() {\r\n return this.ctrlPorta;\r\n }", "public int getP() {\r\n\t\treturn this.p;\r\n\t}", "public String getSvip() { return this.svip; }", "public City getCity() {\n return city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public PropertyChangeSupport getPptyChgSpt(){\n\t\treturn pptyChgSpt;\n\t}", "@ApiModelProperty(value = \"City of IP address\")\n public String getCity() {\n return city;\n }" ]
[ "0.6418178", "0.63147813", "0.6127013", "0.56708306", "0.56708306", "0.56708306", "0.56659454", "0.56620437", "0.56283796", "0.55819446", "0.5528921", "0.55076283", "0.5492252", "0.54910004", "0.5490104", "0.5490104", "0.5468617", "0.5456519", "0.5424098", "0.5418186", "0.5405883", "0.5396638", "0.5382769", "0.5345603", "0.53440607", "0.5323848", "0.5316473", "0.52860904", "0.5285585", "0.5274046", "0.5268124", "0.5266107", "0.5245154", "0.5237773", "0.52338874", "0.5230448", "0.52249074", "0.52213883", "0.5217688", "0.5217688", "0.5208984", "0.51672655", "0.51608264", "0.51479995", "0.51463455", "0.51389265", "0.5132245", "0.51293296", "0.51207274", "0.51207274", "0.51167625", "0.5115896", "0.5113554", "0.5104941", "0.5101215", "0.50998944", "0.5095734", "0.50953543", "0.50891083", "0.50873137", "0.5087212", "0.5085169", "0.5080287", "0.50728935", "0.50666916", "0.50666916", "0.50666916", "0.50653666", "0.50614834", "0.5054925", "0.50532025", "0.50527364", "0.50522745", "0.5050435", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.50469315", "0.5045894", "0.5037914", "0.5034315", "0.50339967", "0.5032517", "0.50309646", "0.5029108", "0.5028746", "0.5026708", "0.50136954", "0.49984017", "0.49957383", "0.49957383", "0.49957383", "0.49948838", "0.49944624" ]
0.72063434
0
Setter method for property isp.
public void setIsp(String isp) { this.isp = isp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getIsp() {\n return isp;\n }", "public void setIsp_id(String isp_id) {\n this.isp_id = isp_id;\n }", "protected abstract void setPpl();", "public String getIsp_id() {\n return isp_id;\n }", "protected abstract void setSpl();", "void setOsP( String osP );", "public abstract void setCity(String sValue);", "public void setP(List<Production> p);", "public void setCity(String city);", "public void setPresentity(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentityTracker = true;\r\n } else {\r\n localPresentityTracker = false;\r\n \r\n }\r\n \r\n this.localPresentity=param;\r\n \r\n\r\n }", "public PIS getPis() {\n return pis;\n }", "public void setP(Double p);", "public void setCodProd(IProduto codigo);", "public void setJP_SalesRep_Value (String JP_SalesRep_Value);", "private void setHospital(String p_hospital){\n\t\tthis.nombreHospital = p_hospital;\n\t}", "public void setLocation(entity.PolicyLocation value);", "void setProvincia(String provincia);", "public void setPs(String ps) {\n this.ps = ps == null ? null : ps.trim();\n }", "public interface ISPHandler {\n void setLocation(String location);\n\n String getLocation();\n\n void setLoadedCities(boolean loadedCities);\n\n boolean isLoadedCities();\n}", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "public abstract void setPoseSolver(PoseSolver poseSolver);", "public abstract void setPoint(Point p);", "public void setUWCompany(entity.UWCompany value);", "public void setCorpProvince(String corpProvince) {\n this.corpProvince = corpProvince;\n }", "public void set(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}", "public void setIsperson(Integer isperson) {\n this.isperson = isperson;\n }", "public void setP(boolean p) {\n\tthis.p = p;\n }", "public abstract void setValue(Context c, Object v) throws PropertyException;", "protected void setPC(final int value) {\r\n this.pc = value;\r\n }", "@Override\n public void set(DP value) {\n if (value == null || \"\".equals(value)) {\n isValid.set(true);\n source.set(null);\n return;\n }\n final SP parsed;\n try {\n parsed = formatter.parse(value);\n } catch (Exception e) {\n isValid.set(false);\n // we failed to parse the value, but still treat this as touching the source property\n source.setTouched(true);\n return;\n }\n isValid.set(true);\n source.set(parsed);\n }", "void setStation(double station);", "public void setShip (Ship s){\n \tthis.ship=s;\n }", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public void setProposition(String string);", "public void setMppsI(MPPS mppsI) {\n\t\tthis.mppsI = mppsI;\n\t}", "public void setPathway(PathwayHolder p)\r\n\t{\n\t}", "public void setCity(City city) {\n this.city = city;\n }", "public void setPiece(PieceIF p);", "public void setPc(int pc) {\n this.pc = pc;\n }", "public void setSW(java.lang.String param) {\r\n localSWTracker = param != null;\r\n\r\n this.localSW = param;\r\n }", "@Override\n\tpublic void setIsPort(boolean isPort) {\n\t\t_scienceApp.setIsPort(isPort);\n\t}", "public void setLivingProvince(Province livingProvince) {\n this.livingProvince = livingProvince;\n }", "public abstract void setEstado_ps_peticion(\n\t\tco\n\t\t\t.com\n\t\t\t.telefonica\n\t\t\t.atiempo\n\t\t\t.ejb\n\t\t\t.eb\n\t\t\t.Estado_ps_peticionLocal anEstado_ps_peticion);", "public void setCodigoImputacion(String p) { this.codigoImputacion = p; }", "@Test\n public void testSetPourcentage() {\n \n assertEquals(0.0,soin3.getPourcentage(),0.01);\n soin3.setPourcentage(0.7);\n assertEquals(0.7,soin3.getPourcentage(),0.01);\n }", "public void setCodProvincia(String codProvincia);", "protected void setCities(Vector<Site> cities){\n this.cities=cities;\n }", "public abstract void setEstado_ps(\n\t\tco.com.telefonica.atiempo.ejb.eb.Estado_psLocal anEstado_ps);", "public void setSite(Site site) throws ParameterException {\n\n\t\twillsSiteParam.setValue((String)site.getParameter(WILLS_SITE_NAME).getValue());\n\t\tthis.site = site;\n\t\tsetPropagationEffectParams();\n\n\t}", "public void setServicioDimensionContable(ServicioDimensionContable servicioDimensionContable)\r\n/* 260: */ {\r\n/* 261:322 */ this.servicioDimensionContable = servicioDimensionContable;\r\n/* 262: */ }", "public static void setPricings (int ipricings){\n\t\t\tpricings = ipricings;\n\t}", "@Value(\"#{props.endpoint}\")\n\tpublic void setEndPoint(String val) {\t\t\n\t this.val = val;\n\t}", "public void setcurrentPara(int p){\r\n currentPara= p;\r\n \r\n }", "public void setCorpCity(String corpCity) {\n this.corpCity = corpCity;\n }", "public void setCodigo_pcom(java.lang.String newCodigo_pcom);", "public void set(){\n if (getRhs().isResolved() && getRhs().isSimpleValue()){\n getParameter().setExpression((ArchSimpleExpressionSymbol) getRhs());\n }\n else {\n throw new IllegalStateException(\"The value of the parameter is set to a sequence or the expression is not resolved. This should never happen.\");\n }\n }", "public UpdatePolymorphismSiteSetter() {\n super(\"org.tair.db.locusdetail\", 2147483647);\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public void setIp(java.lang.String param){\r\n localIpTracker = true;\r\n \r\n this.localIp=param;\r\n \r\n\r\n }", "public abstract void setPhone1(String sValue);", "public abstract void setPhone2(String sValue);", "@Test\n public void testSetInterfaceIp() throws Exception {\n isisNeighbor.setInterfaceIp(interfaceIp);\n result2 = isisNeighbor.interfaceIp();\n assertThat(result2, is(interfaceIp));\n }", "private void setP1( Point p1 ){\n this.p1=p1;\n }", "public void setDominio(String p) { this.dominio = p; }", "public void setCompany(String company)\r\n {\r\n m_company = company;\r\n }", "public void setCity(String city){\n this.city = city;\n }", "public Builder setP(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n p_ = value;\n onChanged();\n return this;\n }", "public void setScope(Scope scp) {\n this.scope = scp;\n }", "private void setP2( Point p2 ){\n this.p2=p2;\n }", "public void setSpId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpIdTracker = true;\r\n } else {\r\n localSpIdTracker = false;\r\n \r\n }\r\n \r\n this.localSpId=param;\r\n \r\n\r\n }", "public void setFromStation(String fromStation);", "public void setCompany(Company aCompany) {\n company = aCompany;\n }", "public void setPiece(Piece piece, PieceValidator pv);", "@Override\n public void setValue(Point3D value) {\n this.velocity = value;\n }", "private void assignSpacePerimeter()\n {\n\n }", "public void setS(String s);", "@Test\n public void testSetOs() {\n System.out.println(\"setOs\");\n String os = \"\";\n VM instance = null;\n instance.setOs(os);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void setObservacion(java.lang.String param){\n \n this.localObservacion=param;\n \n\n }", "public void setToStation(String toStation);", "public void setServicioFacturaProveedorSRI(ServicioFacturaProveedorSRI servicioFacturaProveedorSRI)\r\n/* 116: */ {\r\n/* 117:133 */ this.servicioFacturaProveedorSRI = servicioFacturaProveedorSRI;\r\n/* 118: */ }", "public void setSite(Site aSite) {\n this.site = aSite;\n }", "public void setSite(Site site) {\n\t\tthis.site = site;\n\t\tIterator it = site.getParametersIterator();\n\t\treplaceSiteParams(it);\n\t}", "public void setPuntoEmision(String puntoEmision)\r\n/* 129: */ {\r\n/* 130:217 */ this.puntoEmision = puntoEmision;\r\n/* 131: */ }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public abstract void setPhone3(String sValue);", "public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }", "public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }", "public void setSIP(Animal sIP){\n \tthis.sIP = sIP;\n\n }", "@Override\n protected void set(java.util.Collection<org.tair.db.locusdetail.IPolymorphismSite> list) {\n polymorphismSite = list;\n // Add the primary keys to the serialized key list if there are any.\n if (polymorphismSite != null) {\n for (com.poesys.db.dto.IDbDto object : polymorphismSite) {\n polymorphismSiteKeys.add(object.getPrimaryKey());\n }\n }\n }", "public void setPersonnelArea(String personnelArea);", "public void setCity( EAIMMCtxtIfc theCtxt, java.lang.String theCity) throws EAIException;", "public void setProperty(String name,Object value)\n {\n ClassAnalyzer.setProperty(m_Source,name,value);\n }", "public void setParameter(String pname, String pvalue) {\n\t\tif (pvalue == null || pvalue.isEmpty()) {\n\t\t\tparameters.remove(pname);\n\t\t} else {\n\t\t\tparameters.put(pname, pvalue);\n\t\t}\n\t}", "public abstract void setSpeed(int sp);", "public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }", "public void setNETSP(java.lang.String NETSP) {\n this.NETSP = NETSP;\n }", "public void setComCfg(String s) {\n if (s == null) comCfg = \"\";\n else comCfg = s;\n }", "public void setValue(S s) { value = s; }", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }" ]
[ "0.63520646", "0.6213539", "0.5958894", "0.58901995", "0.56462103", "0.5580956", "0.54566526", "0.5279284", "0.5126608", "0.5095283", "0.5072945", "0.50700796", "0.50537735", "0.5019459", "0.5019433", "0.5001042", "0.49726853", "0.49544027", "0.49516726", "0.4947577", "0.49429515", "0.49145696", "0.48912445", "0.48887694", "0.48831066", "0.48771107", "0.48632583", "0.48561996", "0.4849217", "0.4837176", "0.47860682", "0.4782798", "0.47791016", "0.47751635", "0.47696286", "0.4765667", "0.4747673", "0.47368228", "0.47310933", "0.47225243", "0.4721335", "0.47110277", "0.47108185", "0.47074935", "0.47059846", "0.46973735", "0.46932518", "0.46657285", "0.46649382", "0.46644765", "0.4657284", "0.46554822", "0.4647283", "0.46453917", "0.463944", "0.4631863", "0.46304625", "0.46301925", "0.46301925", "0.46270314", "0.46252924", "0.46242827", "0.46207133", "0.46184424", "0.46179813", "0.460744", "0.4602523", "0.45960793", "0.45940706", "0.45936146", "0.45907298", "0.45906535", "0.45849642", "0.45824027", "0.45796782", "0.45749095", "0.45667017", "0.45653728", "0.45627016", "0.4562353", "0.45618206", "0.45603442", "0.45571214", "0.45556036", "0.45556036", "0.45551968", "0.45550558", "0.45550558", "0.4549968", "0.45476514", "0.45468673", "0.45448267", "0.4543423", "0.4542962", "0.45396733", "0.45392862", "0.4539191", "0.45372522", "0.45360374", "0.4533663" ]
0.7229557
0
Getter method for property country_id.
public String getCountry_id() { return country_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getCountryId() {\n return countryId;\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public int getCountryId() {\n return countryId;\n }", "public long getCountryId() {\n return countryId;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public String getCountryID() {\n return countryID;\n }", "public int getCountryId();", "public int getCountryId(){\n return ID;\n }", "public int getId() {\n\t\treturn (m_country_id);\n\t}", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public CountryCode getCountry() {\n return country;\n }", "public Integer getOriginCountryId() {\r\n\t\treturn originCountryId;\r\n\t}", "@Override\n\tpublic Country getCountryById(Long countryId) {\n\t\treturn null;\n\t}", "public Country getById(Integer id) throws Exception;", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "public void setCountryId(String countryId) {\r\n this.countryId = countryId;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry()\n {\n return country;\n }", "public Country getCountry() {\r\n return country;\r\n }", "public String getCountry() {\r\n return this.country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "private Country getCountryByID(int countryID) {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(String.valueOf(countryID)));\n\n Country country = null;\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n country = new Country(id, name);\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n return country;\n }", "public Country getCountry() {\n return country;\n }", "public void setCountryId(int value);", "@Override\n public Country findOne(Integer id) {\n\n return countryRepository.findById(id).get();\n }", "public String countryCode() {\n return countryCode;\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public void setCountryId(java.lang.String countryId) {\r\n this.countryId = countryId;\r\n }", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public java.lang.String getCountry() {\r\n return country;\r\n }", "Country getCountry();", "public String getCountry() {\n return Country;\n }", "Country getAvailableCountryById(int countryId);", "public java.lang.String getCountry() {\n return country;\n }", "public int getCountryCallingCode() {\n return countryCallingCode;\n }", "java.lang.String getCountry();", "java.lang.String getCountry();", "String getCountryOfOrigin(long id) throws RemoteException;", "public IsoCountry getCountry() {\n return country;\n }", "public Object getCountryByIdOrName(Long id, String name);", "@Override\n @Transactional\n public Country getCountry(long id) {\n Optional<Country> result = countryRepository.findById(id);\n Country country = null;\n if (result.isPresent()) {\n country = result.get();\n }\n else {\n throw new NotFoundException(\"Did not find country id: \" + id);\n }\n return country;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public CountryType getCountry() {\r\n\t\treturn country;\r\n\t}", "public final String getCountry() {\n\t\treturn country;\n\t}", "public java.lang.String getCountry() {\n return Country;\n }", "public CountryEntry getCountry(){\n\t\treturn (CountryEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_LINK);\n\t}", "public String getcountryCode() {\n return countryCode;\n }", "public String getCountryName();", "public java.lang.String getCountry () {\n\t\treturn country;\n\t}", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n }\n }", "public Country(int id, String CountryName) {\n this.id = id;\n this.countryName = CountryName;\n }", "public static String getCountryName(int countryId){\n String userCountry;\n switch (countryId){\n case 1:\n userCountry = \"India\";\n break;\n case 2:\n userCountry = \"Italy\";\n break;\n case 3:\n userCountry = \"Germany\";\n break;\n default:\n userCountry = null;\n }\n return userCountry;\n }", "private Country findCountryById(String countryCode) {\n return countries.stream()\n .filter(country -> country.getCode().equals(countryCode))\n .findFirst()\n .orElseThrow(com.olgaivancic.apdhibernate.controller.NotFoundException::new);\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic void setCountryId(long countryId) {\n\t\t_candidate.setCountryId(countryId);\n\t}", "private String getCountry(String id) {\n\t\tif(Utility.keyLevel(id) == 0 ) // It's a country\n\t\t\treturn id;\n\t\telse if(Utility.keyLevel(id) == -1 ) // ZZZ\n\t\t\t return id;\n\t\telse {\n\t\t\t// It's higher admin than level 0. We need to find the country the code is in\n\t\t\tString ctrcode = GeographicMapper.getAlpha3(id.substring(0, 2));\n\t\t\treturn ctrcode;\n\t\t}\n\t}", "public String getContactCountry() {\n return contactCountry;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public static Country getCountryByID(int countryID) {\n Country country = null;\n\n try {\n String sql = \"SELECT * from countries WHERE Country_ID = \" + countryID;\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n country = new Country(id, name);\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n return country;\n }", "java.lang.String getCountryName();", "public java.lang.CharSequence getCountry() {\n return country;\n }", "@ApiModelProperty(value = \"Country name of IP address\")\n public String getCountryName() {\n return countryName;\n }", "public void setId(int p_id) {\n\t\tm_country_id = p_id;\n\t}", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryFieldName() {\n return getStringProperty(COUNTRY_FIELD_NAME_KEY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "@Cache(usage = NONSTRICT_READ_WRITE)\n @JoinColumn(name = \"shipment_country_id\")\n @ManyToOne(cascade = PERSIST, fetch = LAZY)\n public TdCountry getShipmentCountry() {\n return shipmentCountry;\n }", "@Transactional(readOnly = true) \n public CountryState findOne(Long id) {\n log.debug(\"Request to get CountryState : {}\", id);\n CountryState countryState = countryStateRepository.findOne(id);\n return countryState;\n }", "public Integer getCountyid() {\n return countyid;\n }", "Country getCountryByIdAndStatus(int countryId, int status);", "public String getCountryName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_NAME);\n\t}" ]
[ "0.85393375", "0.8514592", "0.841887", "0.8398458", "0.8395703", "0.82822585", "0.8162186", "0.81502056", "0.7940261", "0.7907779", "0.7851063", "0.7553271", "0.7553271", "0.7233583", "0.72334105", "0.7212711", "0.7166698", "0.7149347", "0.71121216", "0.7111557", "0.7102736", "0.70413816", "0.7030885", "0.7008201", "0.7008201", "0.7008201", "0.7008201", "0.7008201", "0.7008201", "0.7008201", "0.69941175", "0.69736385", "0.6963957", "0.69582665", "0.69573146", "0.69573146", "0.69366145", "0.69281626", "0.6857035", "0.68509585", "0.6834331", "0.6825209", "0.6825209", "0.6825209", "0.68225473", "0.6820375", "0.6803135", "0.67792827", "0.67700917", "0.67691284", "0.67483544", "0.6726561", "0.67212486", "0.67212486", "0.6712383", "0.66859955", "0.66069406", "0.6601729", "0.6591776", "0.6591776", "0.6591776", "0.6582483", "0.65749687", "0.6490904", "0.6457215", "0.64443535", "0.6441738", "0.6440575", "0.64077646", "0.63943046", "0.63839984", "0.6376084", "0.6376084", "0.6372632", "0.63675267", "0.6360863", "0.635766", "0.6318195", "0.6316916", "0.63031316", "0.629197", "0.62885046", "0.6285024", "0.6275134", "0.6239727", "0.62110525", "0.6201096", "0.61890227", "0.61550325", "0.61550325", "0.6146323", "0.6105046", "0.6105046", "0.6105046", "0.60791767", "0.60510516", "0.6022047", "0.6021086", "0.6017404", "0.6015791" ]
0.8325851
5
Setter method for property country_id.
public void setCountry_id(String country_id) { this.country_id = country_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountryId(int value);", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "public void setCountryId(String countryId) {\r\n this.countryId = countryId;\r\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public void setId(int p_id) {\n\t\tm_country_id = p_id;\n\t}", "public Integer getCountryId() {\n return countryId;\n }", "public String getCountry_id() {\n return country_id;\n }", "public void setCountryId(java.lang.String countryId) {\r\n this.countryId = countryId;\r\n }", "public long getCountryId() {\n return countryId;\n }", "public int getCountryId() {\n return countryId;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "@Override\n\tpublic void setCountryId(long countryId) {\n\t\t_candidate.setCountryId(countryId);\n\t}", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public String getCountryID() {\n return countryID;\n }", "public int getCountryId(){\n return ID;\n }", "public void setCountry(Country country) {\n this.country = country;\n }", "public int getCountryId();", "public void setCustCountryId(int v) throws TorqueException\n {\n \n if (this.custCountryId != v)\n {\n this.custCountryId = v;\n setModified(true);\n }\n \n \n if (aCountry != null && !(aCountry.getCountryId() == v))\n {\n aCountry = null;\n }\n \n }", "public int getId() {\n\t\treturn (m_country_id);\n\t}", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public DocumentLifecycleWorkflowRequest setCountryID(String countryID) {\n\t\tthis.countryID = countryID;\n\t\treturn this;\n\t}", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "public Country(int id, String CountryName) {\n this.id = id;\n this.countryName = CountryName;\n }", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "public Integer getOriginCountryId() {\r\n\t\treturn originCountryId;\r\n\t}", "public void setCountry(String country) {\r\n this.country = country.trim();\r\n }", "public void setCountryName(String value);", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public void setCountry (java.lang.String country) {\n\t\tthis.country = country;\n\t}", "public void setCountryKey(ObjectKey key) throws TorqueException\n {\n \n setCustCountryId(((NumberKey) key).intValue());\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "public void setCountry(Country v) throws TorqueException\n {\n if (v == null)\n {\n setCustCountryId( 999);\n }\n else\n {\n setCustCountryId(v.getCountryId());\n }\n aCountry = v;\n }", "@Override\n\tpublic Country getCountryById(Long countryId) {\n\t\treturn null;\n\t}", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "public Country(int id, String CountryName, String ContinentName) {\n this.id = id;\n this.countryName = CountryName;\n this.ParentContinent = ContinentName;\n }", "public void setOriginCountryId(Integer originCountryId) {\r\n\t\tthis.originCountryId = originCountryId;\r\n\t}", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public CountryCode getCountry() {\n return country;\n }", "public final void setCountry(final String ccountry) {\n\t\tthis.country = ccountry;\n\t}", "public void setcountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public Address country(String country) {\n this.country = country;\n return this;\n }", "public void setCountry(java.lang.CharSequence value) {\n this.country = value;\n }", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public String getCountry() {\r\n return country;\r\n }", "@Override\n\t public void updateCountry(Country country){\n\t Session session = factory.openSession();\n\t Transaction tx = null;\n\t \n\t try {\n\t tx = session.beginTransaction();\n\t //Integer countryID = country.getIdCountry();\n\t //country = (Country)session.get(Country.class, countryID);\n\t\t\t session.update(country); \n\t tx.commit();\n\t } catch (HibernateException e) {\n\t if (tx!=null) tx.rollback();\n\t e.printStackTrace(); \n\t } finally {\n\t session.close(); \n\t }\n\t }", "@Nonnull public CountryCode getCountry() { return country; }", "public String getCountry() {\n return country;\n }", "public City(int id, int countryId) {\n this(\"\", \"\", id, countryId);\n }", "public void setCountryCode(int value) {\r\n\t\tthis.countryCode = value;\r\n\t}", "public String getCountry() {\r\n return this.country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry() {\n return country;\n }", "public Builder setCountry(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "@RequestMapping(method = RequestMethod.GET, path = \"/admin/editCountry/{id}\")\n public String editCountry(@PathVariable int id, Model model) {\n model.addAttribute(\"country\", adminRepository.getCountry(id));\n return \"editCountry\";\n }", "public void setCountryCode(String countryCode)\r\n\t{\r\n\t\tthis.countryCode = countryCode;\r\n\t}", "public Country getCountry() {\r\n return country;\r\n }", "public String countryCode() {\n return countryCode;\n }", "public String getCountry()\n {\n return country;\n }", "public void setCountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryCallingCode(int countryCallingCode) {\n this.countryCallingCode = countryCallingCode;\n }", "public Country getCountry() {\n return country;\n }", "public void setCountryFieldName(final String value) {\n setProperty(COUNTRY_FIELD_NAME_KEY, value);\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public int getCountryCallingCode() {\n return countryCallingCode;\n }", "public Country getById(Integer id) throws Exception;", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setCountry(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.country = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "private void setCountryFlag(View view, String country) {\n ImageView countryView = view.findViewById(R.id.collected_country);\n if (country != null) {\n String countryResource = String.format(\"country_%s\", country.toLowerCase());\n int id = mContext.getResources().getIdentifier(countryResource, \"drawable\", mContext.getPackageName());\n if (id != 0) {\n countryView.setImageResource(id);\n countryView.setVisibility(View.VISIBLE);\n return;\n }\n }\n countryView.setVisibility(View.GONE);\n }", "public void setDestinationCountry(String value) {\r\n this.destinationCountry = value;\r\n }", "public void setCountryCode(java.lang.String countryCode) {\n this.countryCode = countryCode;\n }", "@Override\n @Transactional\n public void deleteCountry(long id) {\n countryRepository.deleteById(id);\n }" ]
[ "0.8428221", "0.8134522", "0.7966494", "0.7839697", "0.7794532", "0.777931", "0.776822", "0.77425796", "0.7705311", "0.7699371", "0.7677205", "0.7511357", "0.74635637", "0.74635637", "0.744482", "0.7405607", "0.7247328", "0.71357924", "0.7079369", "0.7012644", "0.7005943", "0.6943365", "0.6943365", "0.6943365", "0.6943365", "0.6943365", "0.6943365", "0.69100493", "0.68713135", "0.6856434", "0.679008", "0.6761714", "0.6747675", "0.67435604", "0.67435604", "0.67435604", "0.6637144", "0.6592165", "0.6579315", "0.65021396", "0.6488206", "0.6488206", "0.6463703", "0.64466244", "0.64394754", "0.641824", "0.6407371", "0.6383826", "0.6379507", "0.6352304", "0.63165057", "0.63165057", "0.628452", "0.6204987", "0.6159776", "0.61593986", "0.6155274", "0.6114548", "0.6097409", "0.6097409", "0.6097409", "0.60914123", "0.60840255", "0.6063586", "0.6053259", "0.60249513", "0.6024595", "0.6024019", "0.6021909", "0.6021909", "0.6021909", "0.6021909", "0.6021909", "0.6021909", "0.6021909", "0.6013976", "0.6013976", "0.6013388", "0.60123163", "0.6009491", "0.5991578", "0.59906274", "0.59670824", "0.5931754", "0.59262115", "0.59154266", "0.5899337", "0.58859074", "0.58651096", "0.58651096", "0.58651096", "0.5864045", "0.58631957", "0.58514017", "0.58514017", "0.58510107", "0.5848233", "0.5845663", "0.5834197", "0.58300954" ]
0.7952967
3
Getter method for property area_id.
public String getArea_id() { return area_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public void setArea_id(String area_id) {\n this.area_id = area_id;\n }", "public int getArea() {\n\t\treturn area;\n\t}", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "public String getArea() {\n return this.area;\n }", "public int getArea()\n {\n return area;\n }", "public int getAreaCode() {\r\n return areaCode;\r\n }", "public Integer getAreacode() {\n return areacode;\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "public AreaProp getAreaProp(int areaPropId) {\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n AreaProp areaProp = (AreaProp) session.get(AreaProp.class, areaPropId);\n return areaProp;\n }", "public String areaCode() {\n return areaCode;\n }", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public String getAreaCode() {\n return areaCode;\n }", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "public String getAreaName()\n {\n return this.areaName;\n }", "public Rectangle getArea() {\n return area;\n }", "public double getArea()\n {\n return area;\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public String getAreaCode() {\n return this.areaCode;\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(String area) {\n this.area = area;\n }", "public String getLocationArea() {\n return locationArea;\n }", "public float getArea() {\n return area;\n }", "public double get_Area() {\n return this.Area;\n }", "public Long getContentAreaId() {\n\t\treturn contentAreaId;\n\t}", "public void setArea(String area) {\n\t\tthis.area = area;\n\t}", "public String getBuildingarea() {\r\n\t\treturn buildingarea;\r\n\t}", "public String getNombreArea() { return (this.nombreArea == null) ? \"\" : this.nombreArea; }", "public abstract int getArea();", "AreaMaster findById(long areaId) throws NoSuchAreaException;", "public final int getArea()\n\t{\n\t\treturn address >>> 12;\n\t}", "public float getArea(){\n return area;\n\t}", "public String getCourseArea() {\n return courseArea;\n }", "public String getAreaName() {\n\t\tif (areaName == null) {\n\t\t\tProtectedRegion p = getPlot();\n\t\t\tPlotInfo info = plugin.getPlotInfo(worldName, p.getId());\n\t\t\tif (info != null) {\n\t\t\t\tareaName = info.areaName;\n\t\t\t}\n\t\t}\n\t\treturn areaName;\n\t}", "public AreaProperties getProperties() {\n return this.properties;\n }", "public String getAreaCode() \n\t{\n\t\treturn getNumber().substring(1,4);\n\t}", "@Override\n\t@Transactional\n\tpublic Area findById(Integer id) {\n\t\treturn dao.findById(id).get();\n\t\t\n\t}", "public void setArea(Polygon area) {\n\t\tthis.area = area;\n\t}", "public JQLayoutArea getArea()\n {\n return area;\n }", "public abstract String getArea();", "public AreaGeometry getGeometry() {\n return this.geometry;\n }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public int getIntProperty(@PropertyId int propertyId, int area)\n throws CarNotConnectedException {\n return mCarPropertyMgr.getIntProperty(propertyId, area);\n }", "private static OspfArea areaDetails(JsonNode areaNode) {\n OspfArea area = new OspfAreaImpl();\n String areaId = areaNode.path(AREAID).asText();\n if (isValidIpAddress(areaId)) {\n area.setAreaId(Ip4Address.valueOf(areaId));\n } else {\n log.debug(\"Wrong areaId: {}\", areaId);\n return null;\n }\n String routerId = areaNode.path(ROUTERID).asText();\n if (isValidIpAddress(routerId)) {\n area.setRouterId(Ip4Address.valueOf(routerId));\n } else {\n log.debug(\"Wrong routerId: {}\", routerId);\n return null;\n }\n String routingCapability = areaNode.path(EXTERNALROUTINGCAPABILITY).asText();\n if (isBoolean(routingCapability)) {\n area.setExternalRoutingCapability(Boolean.valueOf(routingCapability));\n } else {\n log.debug(\"Wrong routingCapability: {}\", routingCapability);\n return null;\n }\n String isOpaqueEnabled = areaNode.path(ISOPAQUE).asText();\n if (isBoolean(isOpaqueEnabled)) {\n area.setIsOpaqueEnabled(Boolean.valueOf(isOpaqueEnabled));\n } else {\n log.debug(\"Wrong isOpaqueEnabled: {}\", isOpaqueEnabled);\n return null;\n }\n area.setOptions(OspfUtil.HELLO_PACKET_OPTIONS);\n\n return area;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public String getNombreCodigoArea() { return (this.nombreCodigoArea == null) ? \"\" : this.nombreCodigoArea; }", "public AreaDirectory getAreaDirectory() {\r\n return areaDirectory;\r\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public Long getReceiverAreaId() {\n return receiverAreaId;\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int area() {\n \tarea = width()*height();\n }", "public Number getBuildingArea() {\n return (Number) getAttributeInternal(BUILDINGAREA);\n }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "public double getArea();", "public double getArea();", "public double getArea();", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "@GetMapping(value = \"/{id}\")\n\tpublic PlantingArea findById(@PathVariable Long id) throws NotFoundException {\n\t\treturn plantAreaServ.findById(id);\n\t}", "public native int kbAreaGetBorderAreaID(int areaID, long index);", "public int getArea(){\n return imageArea;\n }", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public String getBusinessArea() {\n return businessArea;\n }", "@Override\n\tpublic java.lang.String getAreaName() {\n\t\treturn _locMstLocation.getAreaName();\n\t}", "public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}", "public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public LinkedList<Area> getAreas(){\n\t\treturn areas;\n\t}", "@Path(\"interestAreaId/\")\n public service.InterestAreaResource getInterestAreaIdResource() {\n InterestAreaIdResourceSub resource = resourceContext.getResource(InterestAreaIdResourceSub.class);\n resource.setParent(getEntity());\n return resource;\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public String getAreaCityCode() {\n return areaCityCode;\n }", "@ApiModelProperty(example = \"14\", value = \"Provides the unit of measure in which area is provided in this message. Refer to OpenTravel Code List Unit of Measure (UOM).\")\n\n\n public Integer getAreaUnitOfMeasureCode() {\n return areaUnitOfMeasureCode;\n }", "public String getAuthorizedArea() {\n return (String)getAttributeInternal(AUTHORIZEDAREA);\n }" ]
[ "0.86402684", "0.86402684", "0.77819353", "0.77438885", "0.7493831", "0.7482017", "0.74777275", "0.74777275", "0.74777275", "0.7462828", "0.74379647", "0.74379647", "0.74009037", "0.7358695", "0.7302429", "0.7259419", "0.71598804", "0.7112069", "0.7112069", "0.70953643", "0.7093895", "0.705417", "0.7040081", "0.70398074", "0.70398074", "0.6965898", "0.6965898", "0.688139", "0.68564004", "0.683708", "0.6836412", "0.67531174", "0.6734324", "0.66703445", "0.665389", "0.6603991", "0.659861", "0.65891594", "0.6583143", "0.6538345", "0.6507184", "0.64673877", "0.6462582", "0.6457316", "0.64524955", "0.64479434", "0.64297664", "0.64093435", "0.63992375", "0.6397705", "0.63430226", "0.6342432", "0.63270485", "0.62805635", "0.6275058", "0.6240231", "0.6240231", "0.6236365", "0.6235445", "0.6229486", "0.6229486", "0.6229486", "0.6201918", "0.61963433", "0.61912006", "0.61912006", "0.61912006", "0.6168732", "0.6111649", "0.6111649", "0.6111649", "0.60999626", "0.6098562", "0.60981077", "0.60981077", "0.6069731", "0.6069731", "0.6069731", "0.606661", "0.6025923", "0.60229075", "0.6020769", "0.6013932", "0.60081595", "0.5991992", "0.5975853", "0.5967643", "0.5959964", "0.5952919", "0.5952919", "0.5947167", "0.5947167", "0.5947167", "0.5944357", "0.5939492", "0.59295446", "0.5927891", "0.5923574", "0.5914616", "0.5906073" ]
0.85533977
2
Setter method for property area_id.
public void setArea_id(String area_id) { this.area_id = area_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public void setAreaId(Integer areaId) {\n this.areaId = areaId;\n }", "public String getArea_id() {\n return area_id;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(Polygon area) {\n\t\tthis.area = area;\n\t}", "public void setArea(String area) {\n this.area = area;\n }", "public void setArea(String area) {\n\t\tthis.area = area;\n\t}", "public Builder setAreaNo(int value) {\n \n areaNo_ = value;\n onChanged();\n return this;\n }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "public void setArea(String area) {\n this.area = area == null ? null : area.trim();\n }", "@Override\n public final void setArea(JQLayoutArea area)\n {\n if (area != null)\n {\n removeClass(area.getAreaClass().toString());\n }\n this.area = area;\n if (this.area != null)\n {\n addClass(this.area.getAreaClass().toString());\n }\n }", "public void setAreaCode(int value) {\r\n this.areaCode = value;\r\n }", "public void setAreacode(Integer areacode) {\n this.areacode = areacode;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode;\n }", "@Override\n\tpublic int updateArea(Area area) {\n\t\treturn areaMapper.updateArea(area);\n\t}", "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "public void setNombreArea(String p) { this.nombreArea = p; }", "public void setNombreCodigoArea(String p) { this.nombreCodigoArea = p; }", "@Test\n public void testSetNeighborAreaId() throws Exception {\n isisNeighbor.setNeighborAreaId(areaId);\n result1 = isisNeighbor.neighborAreaId();\n assertThat(result1, is(areaId));\n }", "public void setAreaCode(String areaCode) {\n this.areaCode = areaCode == null ? null : areaCode.trim();\n }", "public void setLocationArea(String locationArea) {\n this.locationArea = locationArea;\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public void setAreaName(String areaName) {\n this.areaName = areaName;\n }", "public int getArea() {\n\t\treturn area;\n\t}", "public String getArea() {\n return area;\n }", "public void setAreaProveedor(int areaProveedor) { this.areaProveedor = areaProveedor; }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public int getAreaCode() {\r\n return areaCode;\r\n }", "public String getArea() {\n\t\treturn area;\n\t}", "public String getArea() {\n return this.area;\n }", "public Integer getAreacode() {\n return areacode;\n }", "public String areaCode() {\n return areaCode;\n }", "public void recibirId(AreaInvestigacion a) {\r\n\t\tarea = a;\r\n\t}", "@Override\n\t@XmlElement\n\tpublic void setAreaCode(String areaCode) {\n\t\t\n\t}", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "public void SetArea(double area) {\n OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_SetArea(swigCPtr, this, area);\n }", "private void mapAreaOne()\n\n {\n\n Area area = areaIDMap.get(Constants.FIRST_AREA_ID);\n\n area.areaMap.put(Constants.North, areaIDMap.get(Constants.SECOND_AREA_ID));\n\n area.areaMap.put(Constants.South, areaIDMap.get(Constants.FIFTH_AREA_ID));\n\n area.areaMap.put(Constants.East, areaIDMap.get(Constants.FOURTH_AREA_ID));\n\n area.areaMap.put(Constants.West, areaIDMap.get(Constants.SIXTH_AREA_ID));\n\n area.paths = Constants.NorthSouthEastAndWest;\n\n }", "public void initializeID(String id, Area area) throws FOPException\n {\n createID(id);\n configureID(id,area); \n }", "public void setBuildingArea(Number value) {\n setAttributeInternal(BUILDINGAREA, value);\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public void setBuildingarea(String buildingarea) {\r\n\t\tthis.buildingarea = buildingarea;\r\n\t}", "public void setContentAreaId(Long contentAreaId) {\n\t\tthis.contentAreaId = contentAreaId;\n\t}", "public void setCourseArea(String courseArea) {\n this.courseArea = courseArea;\n }", "public int getArea()\n {\n return area;\n }", "public void setPersonnelArea(String personnelArea);", "@ManyToOne(optional = true)\r\n\tpublic Area getArea() {\r\n\t\treturn this.area;\r\n\t}", "public void update(Area area) {\n\t\tdao.update(area);\n\t}", "public void setGameRoomID(String gameArea, String gameRoomID)\r\n\t{\r\n\t\tif(gameArea.toLowerCase().equals(\"fireworks\"))\r\n\t\t{\r\n\t\t\tgameFireworks.setRoomID(gameRoomID);\r\n\t\t}\r\n\t\telse if(gameArea.toLowerCase().equals(\"pirates\"))\r\n\t\t{\r\n\t\t\tgamePirates.setRoomID(gameRoomID);\r\n\t\t}\r\n\t}", "public Long getContentAreaId() {\n\t\treturn contentAreaId;\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Area)) {\r\n return false;\r\n }\r\n Area other = (Area) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public String getAreaName()\n {\n return this.areaName;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Area)) {\n return false;\n }\n Area other = (Area) object;\n if ((this.idArea == null && other.idArea != null) || (this.idArea != null && !this.idArea.equals(other.idArea))) {\n return false;\n }\n return true;\n }", "public String getAreaCode() {\n return this.areaCode;\n }", "public Builder clearAreaNo() {\n \n areaNo_ = 0;\n onChanged();\n return this;\n }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "@Override\n\t@Transactional\n\tpublic void save(Area area) {\n\t\tdao.save(area);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Area)) {\n return false;\n }\n Area other = (Area) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Test\n public void testNeighborAreaId() throws Exception {\n isisNeighbor.setNeighborAreaId(areaId);\n result1 = isisNeighbor.neighborAreaId();\n assertThat(result1, is(areaId));\n }", "public void setAreaDepartamento(String areaDepartamento) {\n\t\tthis.areaDepartamento.set(areaDepartamento);\n\t}", "public void setIntProperty(@PropertyId int propertyId, int area, int val)\n throws CarNotConnectedException {\n if (mHvacPropertyIds.contains(propertyId)) {\n mCarPropertyMgr.setIntProperty(propertyId, area, val);\n }\n }", "public double getArea()\n {\n return area;\n }", "public SafetyNetArea updateArea(SafetyNetArea area) {\n\n String typeId = area.getPromulgationType().getTypeId();\n log.info(\"Updating SafetyNET area \" + area.getName() + \" for promulgation type \" + typeId);\n\n SafetyNetArea original = findAreaByName(typeId, area.getName());\n original.update(area);\n\n return saveEntity(original);\n }", "public Area getArea(Area area) {\r\n\t\treturn this.getArea(area.getId());\r\n\t}", "public void setAreaCityCode(String areaCityCode) {\n this.areaCityCode = areaCityCode;\n }", "private void setAId(int value) {\n \n aId_ = value;\n }", "@Override\n\tpublic int deleteArea(int areaId) {\n\t\treturn areaMapper.deleteArea(areaId);\n\t}", "private void setRoomId(long value) {\n \n roomId_ = value;\n }", "@Override\n\tpublic int insertArea(Area area) {\n\t\treturn areaMapper.insertArea(area);\n\t}", "public abstract void setAcma_id(java.lang.Long newAcma_id);", "AreaMaster findById(long areaId) throws NoSuchAreaException;", "@Override\n\tpublic void setAreaName(java.lang.String AreaName) {\n\t\t_locMstLocation.setAreaName(AreaName);\n\t}", "@ApiModelProperty(example = \"14\", value = \"Provides the unit of measure in which area is provided in this message. Refer to OpenTravel Code List Unit of Measure (UOM).\")\n\n\n public Integer getAreaUnitOfMeasureCode() {\n return areaUnitOfMeasureCode;\n }", "public Rectangle getArea() {\n return area;\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public void setVAL_AREA(java.lang.String VAL_AREA) {\r\n this.VAL_AREA = VAL_AREA;\r\n }", "public String getLocationArea() {\n return locationArea;\n }", "public float getArea() {\n return area;\n }", "public void setAreaIdLogin(String id,TableQueryCallback<UserArea> callback) {\n mUserAreaTable.where().field(\"userId\").eq(id).execute(callback);\n }", "public void setLocationId(String value) { _locationId = value; }", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public float getArea(){\n return area;\n\t}", "public String getBuildingarea() {\r\n\t\treturn buildingarea;\r\n\t}", "public void setAuthorizedArea(String value) {\n setAttributeInternal(AUTHORIZEDAREA, value);\n }", "public void setReceiverAreaId(Long receiverAreaId) {\n this.receiverAreaId = receiverAreaId;\n }", "@Override\n\tpublic AreaExecution removeArea(long areaId) {\n\t\treturn null;\n\t}", "public void setShard(DissectableArea area, int shardIndex) {\n setShard(area.getIndex(), shardIndex);\n }", "public void deleteAreaProp(int areaPropId) {\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction transaction = session.beginTransaction();\n AreaProp areaProp = (AreaProp) session.get(AreaProp.class, areaPropId);\n session.delete(areaProp);\n transaction.commit();\n }", "public Long getReceiverAreaId() {\n return receiverAreaId;\n }" ]
[ "0.8119343", "0.8119343", "0.77818143", "0.76467776", "0.76467776", "0.7298053", "0.729406", "0.72862405", "0.72060394", "0.6995563", "0.698328", "0.698328", "0.6983238", "0.6983238", "0.6849826", "0.68076056", "0.67781556", "0.6700778", "0.66949004", "0.6560759", "0.65231574", "0.6419128", "0.6393108", "0.6371224", "0.6359183", "0.6357701", "0.63482684", "0.63385105", "0.63385105", "0.6207933", "0.61973053", "0.61776996", "0.6172837", "0.6172837", "0.6172837", "0.61453587", "0.61446697", "0.6089307", "0.608324", "0.605025", "0.60474133", "0.6042203", "0.60327786", "0.60327786", "0.60289127", "0.6003926", "0.59842163", "0.595509", "0.59440887", "0.59440887", "0.5939673", "0.5939673", "0.5936821", "0.59188664", "0.5905343", "0.5896353", "0.58857465", "0.587891", "0.58466053", "0.57753116", "0.57413393", "0.5711829", "0.57012415", "0.5675299", "0.56662416", "0.5657253", "0.5650105", "0.56426245", "0.56346875", "0.5613836", "0.56052285", "0.5597003", "0.5594383", "0.5594187", "0.5565295", "0.5564531", "0.553454", "0.55322456", "0.55135477", "0.54774845", "0.5464862", "0.5464596", "0.5446826", "0.54242903", "0.5413398", "0.5408261", "0.5399408", "0.5397799", "0.5396548", "0.5385431", "0.53618866", "0.5352416", "0.53508395", "0.53376603", "0.5328865", "0.5302328", "0.53018343", "0.5290098", "0.52893806", "0.5283222" ]
0.81412524
0
Getter method for property region_id.
public String getRegion_id() { return region_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRegionId() {\r\n return regionId;\r\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionid() {\n return regionid;\n }", "public Long getRegionId() {\n return this.regionId;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public int getRegionid() {\n return regionid;\n }", "java.lang.String getRegionId();", "public int getRegionid() {\n\treturn regionid;\n}", "Integer getRegionId();", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n }\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getRegionValue() {\n return region_;\n }", "public String getRegionNo() {\n return regionNo;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public int getRegionValue() {\n return region_;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return this.region;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\n return region;\n }", "public String getRegionno() {\n return regionno;\n }", "com.google.protobuf.ByteString\n getRegionIdBytes();", "public CustomerAddressQuery regionId() {\n startField(\"region_id\");\n\n return this;\n }", "public String getStaticRegionId() {\n return staticRegionId;\n }", "public Region getRegion() {\n return region;\n }", "public String getRegionName() {\r\n return regionName;\r\n }", "public String getRegionName() {\n return regionName;\n }", "public int getC_Region_ID();", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "public void setRegion_id(String region_id) {\n this.region_id = region_id;\n }", "public void setRegionid(String regionid) {\n this.regionid = regionid;\n }", "int getRegionValue();", "public byte [] getRegionName() {\n return regionName;\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public void setRegionId(long regionId) {\r\n this.regionId = regionId;\r\n }", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "java.lang.String getRegionCode();", "IRegion getRegion();", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "@Override\n\tpublic Region getRegionById(String id) {\n\t\treturn null;\n\t}", "public kr.pik.message.Profile.HowMe.Region getRegion() {\n kr.pik.message.Profile.HowMe.Region result = kr.pik.message.Profile.HowMe.Region.valueOf(region_);\n return result == null ? kr.pik.message.Profile.HowMe.Region.UNRECOGNIZED : result;\n }", "public EnumRegion getRegion()\n {\n return region;\n }", "@ApiModelProperty(value = \"State/region code of IP address\")\n public String getRegionCode() {\n return regionCode;\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "public LocalRegion getRegion() {\n\t\treturn this.region;\n\t}", "public Builder setRegionId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n regionId_ = value;\n onChanged();\n return this;\n }", "public BigDecimal getIdregions() {\n return (BigDecimal) getAttributeInternal(IDREGIONS);\n }", "@AutoEscape\n public String getRegion();", "public TypeOfRegion getRegion();", "public String getRegionFullName() {\n return regionFullName;\n }", "public void setRegionid(int newValue) {\n\tthis.regionid = newValue;\n}", "public String getID() {\n\t\treturn this.region.getFileName();\n\t}", "kr.pik.message.Profile.HowMe.Region getRegion();", "public CoordinateRadius getRegion();", "public void setRegionId(String regionId) {\r\n this.regionId = regionId == null ? null : regionId.trim();\r\n }", "String regionName();", "String regionName();", "String regionName();", "String regionName();", "public NegotiableQuoteAddressRegion getRegion() {\n return (NegotiableQuoteAddressRegion) get(\"region\");\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionid(int newRegionid) {\n regionid = newRegionid;\n }", "public void setC_Region_ID (int C_Region_ID);", "public String getRegionCodeFk() {\r\n return (String) getAttributeInternal(REGIONCODEFK);\r\n }", "com.google.protobuf.ByteString getRegionCodeBytes();", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public static de.fraunhofer.fokus.movepla.model.Region fetchByPrimaryKey(\n long regionId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getPersistence().fetchByPrimaryKey(regionId);\n }", "@Nullable public abstract URI region();", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public Regions getRegions () {\n return this.regions;\n }", "public void setRegion(String region);", "public List<Integer> getRegionIds() {\r\n\t\tList<Integer> regionIds = new ArrayList<>();\r\n\t\tfor (int x = southWestX >> 6; x < (northEastX >> 6) + 1; x++) {\r\n\t\t\tfor (int y = southWestY >> 6; y < (northEastY >> 6) + 1; y++) {\r\n\t\t\t\tint id = y | x << 8;\r\n\t\t\t\tregionIds.add(id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn regionIds;\r\n\t}", "public List<Region> getid(String id) {\r\n int idRegion = Integer.parseInt(id);\r\n return rdao.getRegionId(idRegion);\r\n }", "public void setRegion(Region region) {\n this.region = region;\n }", "public List<String> regions() {\n return this.regions;\n }", "public int getItuRegion() {\n return localItuRegion;\n }", "public void setProviderRegionId(String id) {\n providerRegionId = id;\n }", "public java.util.List<String> getRegionNames() {\n if (regionNames == null) {\n regionNames = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return regionNames;\n }", "public String getStorageRegion() {\n return this.StorageRegion;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<String> getRegion() {\n\t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getRegion\");\r\n\t}" ]
[ "0.8754461", "0.8741017", "0.8741017", "0.8741017", "0.86620307", "0.86059254", "0.8600333", "0.8525883", "0.8479357", "0.8414669", "0.8354576", "0.80241084", "0.80175024", "0.7903501", "0.7887526", "0.78052473", "0.7790166", "0.77492005", "0.77492005", "0.7737613", "0.7700259", "0.7700259", "0.7700259", "0.7700259", "0.7700259", "0.7699941", "0.76859176", "0.76859176", "0.76859176", "0.7653307", "0.7578353", "0.7546686", "0.7445311", "0.7427975", "0.7338211", "0.72991127", "0.72927105", "0.7276829", "0.72595483", "0.72460186", "0.7146816", "0.7127275", "0.70868933", "0.70245486", "0.70040286", "0.69835126", "0.6938784", "0.6930363", "0.6918481", "0.6907512", "0.6901374", "0.68506056", "0.68408084", "0.67774755", "0.67679304", "0.6739266", "0.6689296", "0.6687502", "0.6670339", "0.66574126", "0.6554372", "0.6459886", "0.64576834", "0.64569396", "0.6450313", "0.6434497", "0.6434497", "0.6434497", "0.6434497", "0.64260083", "0.6418979", "0.6418979", "0.6418979", "0.6392574", "0.6377626", "0.6376008", "0.63596225", "0.63488334", "0.6342073", "0.6342073", "0.6342073", "0.63318545", "0.63003963", "0.63003963", "0.63003963", "0.6295754", "0.62177724", "0.62054217", "0.62008387", "0.6198972", "0.6158048", "0.6158028", "0.612405", "0.6089888", "0.60379076", "0.60334885", "0.60286975", "0.60189193", "0.597823", "0.5960751" ]
0.85669804
7
Setter method for property region_id.
public void setRegion_id(String region_id) { this.region_id = region_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRegionId(long regionId) {\r\n this.regionId = regionId;\r\n }", "public void setRegionid(String regionid) {\n this.regionid = regionid;\n }", "public Builder setRegionId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n regionId_ = value;\n onChanged();\n return this;\n }", "public void setRegionid(int newValue) {\n\tthis.regionid = newValue;\n}", "public String getRegionId() {\r\n return regionId;\r\n }", "public String getRegionid() {\n return regionid;\n }", "public String getRegion_id() {\n return region_id;\n }", "public void setC_Region_ID (int C_Region_ID);", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public String getRegionId() {\n return regionId;\n }", "public void setRegionid(int newRegionid) {\n regionid = newRegionid;\n }", "public long getRegionId() {\r\n return regionId;\r\n }", "public int getRegionid() {\n return regionid;\n }", "public Long getRegionId() {\n return this.regionId;\n }", "public int getRegionid() {\n\treturn regionid;\n}", "public void setRegionId(String regionId) {\r\n this.regionId = regionId == null ? null : regionId.trim();\r\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "public void setRegionId(String regionId) {\n this.regionId = regionId == null ? null : regionId.trim();\n }", "java.lang.String getRegionId();", "public void setRegion(String region);", "Integer getRegionId();", "public void setRegion(Region region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\r\n this.region = region;\r\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setRegion(String region) {\n this.region = region;\n }", "public void setProviderRegionId(String id) {\n providerRegionId = id;\n }", "@NonNull\n public RegionTriggerBuilder setRegionId(@Nullable String regionId) {\n this.regionId = regionId;\n return this;\n }", "public CustomerAddressQuery regionId() {\n startField(\"region_id\");\n\n return this;\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n }\n }", "public java.lang.String getRegionId() {\n java.lang.Object ref = regionId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n regionId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getRegionNo() {\n return regionNo;\n }", "public com.google.protobuf.ByteString\n getRegionIdBytes() {\n java.lang.Object ref = regionId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n regionId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public void setRegion(String region) {\n this.region = region == null ? null : region.trim();\n }", "public Builder setRegionValue(int value) {\n region_ = value;\n onChanged();\n return this;\n }", "@Generated\n @Selector(\"setRegion:\")\n public native void setRegion(@NotNull UIRegion value);", "public void setRegion(final TypeOfRegion region);", "public String getRegionno() {\n return regionno;\n }", "public void setRegion(CoordinateRadius region);", "public void setRegion(EnumRegion region)\n {\n this.region = region;\n }", "public int getRegionValue() {\n return region_;\n }", "public void setREGION(java.lang.String value)\n {\n if ((__REGION == null) != (value == null) || (value != null && ! value.equals(__REGION)))\n {\n _isDirty = true;\n }\n __REGION = value;\n }", "public int getRegionValue() {\n return region_;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public String getRegion() {\r\n return region;\r\n }", "public void setRegionNo(String regionNo) {\n this.regionNo = regionNo == null ? null : regionNo.trim();\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return region;\n }", "public String getRegion() {\n return this.region;\n }", "public Builder setRegionIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n regionId_ = value;\n onChanged();\n return this;\n }", "public void setRegionno(String regionno) {\n this.regionno = regionno == null ? null : regionno.trim();\n }", "com.google.protobuf.ByteString\n getRegionIdBytes();", "public String getStaticRegionId() {\n return staticRegionId;\n }", "public int getC_Region_ID();", "public String getRegionName() {\r\n return regionName;\r\n }", "public String getRegionName() {\n return regionName;\n }", "public Builder setRegion(String region) {\n try {\n _locbld.setRegion(region);\n } catch (InvalidLocaleIdentifierException e) {\n throw new IllegalArgumentException(e);\n }\n return this;\n }", "public Builder clearRegionId() {\n \n regionId_ = getDefaultInstance().getRegionId();\n onChanged();\n return this;\n }", "public void setRegionname(java.lang.String newRegionname) {\n\tregionname = newRegionname;\n}", "@ApiModelProperty(value = \"State/region code of IP address\")\n public String getRegionCode() {\n return regionCode;\n }", "public void setRegionName(String regionName) {\r\n this.regionName = regionName == null ? null : regionName.trim();\r\n }", "@ApiModelProperty(value = \"State/region of IP address\")\n public String getRegionName() {\n return regionName;\n }", "@Override\n\tpublic Region getRegionById(String id) {\n\t\treturn null;\n\t}", "public void setIdregions(BigDecimal value) {\n setAttributeInternal(IDREGIONS, value);\n }", "public Region getRegion() {\n return region;\n }", "public void setRegionManager(final RegionManagerBean injRegionManager) {\n regionManager = injRegionManager;\n }", "public void setItuRegion(int param) {\n if (param == java.lang.Integer.MIN_VALUE) {\n localItuRegionTracker = false;\n } else {\n localItuRegionTracker = true;\n }\n this.localItuRegion = param;\n }", "public Builder setRegion(kr.pik.message.Profile.HowMe.Region value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n region_ = value.getNumber();\n onChanged();\n return this;\n }", "public void setStaticRegionId(String staticRegionId) {\n this.staticRegionId = staticRegionId == null ? null : staticRegionId.trim();\n }", "public java.lang.String getRegionname() {\n\treturn regionname;\n}", "public byte [] getRegionName() {\n return regionName;\n }", "int getRegionValue();", "public static java.lang.String getRegion(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "@AutoEscape\n public String getRegion();", "java.lang.String getRegionCode();", "public java.lang.String getREGION()\n {\n \n return __REGION;\n }", "@Method(selector = \"setRegion:animated:\")\n public native void setRegion(@ByVal MKCoordinateRegion region, boolean animated);", "public RegionProjection(Long regionId, Long countryId, String description) {\n this.regionId = regionId;\n this.countryId = countryId;\n this.description = description;\n }", "public Builder withRegion(final String region) {\n this.region = region;\n return this;\n }", "public void setCurrentRegion(Region currentRegion) {\n\n this.currentRegion = currentRegion;\n }", "public void setAD_Tree_SalesRegion_ID(int AD_Tree_SalesRegion_ID) {\n\t\tif (AD_Tree_SalesRegion_ID <= 0)\n\t\t\tset_ValueNoCheck(\"AD_Tree_SalesRegion_ID\", null);\n\t\telse\n\t\t\tset_ValueNoCheck(\"AD_Tree_SalesRegion_ID\", new Integer(\n\t\t\t\t\tAD_Tree_SalesRegion_ID));\n\t}", "public void setRegionCodeFk(String value) {\r\n setAttributeInternal(REGIONCODEFK, value);\r\n }", "public BigDecimal getIdregions() {\n return (BigDecimal) getAttributeInternal(IDREGIONS);\n }", "IRegion getRegion();" ]
[ "0.7945864", "0.79092675", "0.78699625", "0.7860377", "0.783937", "0.7832706", "0.7831504", "0.78038394", "0.7795622", "0.7795622", "0.7795622", "0.7748507", "0.77105004", "0.7682148", "0.75998914", "0.7573946", "0.75726604", "0.75041115", "0.75041115", "0.75041115", "0.74859613", "0.7383163", "0.73686665", "0.7223581", "0.7206301", "0.71762985", "0.71762985", "0.71762985", "0.7171943", "0.71133983", "0.71133983", "0.71133983", "0.7107602", "0.7086479", "0.70293653", "0.7013946", "0.6875436", "0.6846968", "0.6836485", "0.6810276", "0.6805207", "0.6797389", "0.6797389", "0.6778207", "0.66923773", "0.6653845", "0.661921", "0.6577381", "0.6574288", "0.656904", "0.6540873", "0.65365744", "0.65214735", "0.65214735", "0.6493058", "0.6493058", "0.6493058", "0.646863", "0.64630383", "0.64630383", "0.64630383", "0.64630383", "0.64630383", "0.6444588", "0.63995415", "0.63218623", "0.6306829", "0.6304429", "0.62517667", "0.6243179", "0.6231854", "0.6191699", "0.61881864", "0.61844265", "0.61752987", "0.61444294", "0.61027145", "0.60918546", "0.6055996", "0.6016786", "0.6002791", "0.5953156", "0.5952113", "0.593751", "0.5857974", "0.58506864", "0.58382547", "0.58321065", "0.5713531", "0.57112694", "0.56971776", "0.56916773", "0.5689546", "0.56063557", "0.56058115", "0.55915415", "0.55872494", "0.5551034", "0.5547208", "0.55443335" ]
0.79950964
0
Getter method for property city_id.
public String getCity_id() { return city_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public String getCityId() {\r\n return cityId;\r\n }", "public Long getCityId() {\n return cityId;\n }", "public Integer getCityid() {\n return cityid;\n }", "@SuppressWarnings(\"unused\")\n public Integer getCityID() { return cityID; }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "public Short getCityId() {\r\n return cityId;\r\n }", "@Override\n\tpublic int getCityId() {\n\t\treturn _locMstLocation.getCityId();\n\t}", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public void setCity_id(String city_id) {\n this.city_id = city_id;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "public void setCityid(Integer cityid) {\n this.cityid = cityid;\n }", "public void setCityId(Integer cityId) {\n this.cityId = cityId;\n }", "public void setCityId(String cityId) {\n this.cityId = cityId;\n }", "public void setCityId(String cityId) {\r\n this.cityId = cityId;\r\n }", "public void setCityId(Long cityId) {\n this.cityId = cityId;\n }", "public Long getOriginCityId() {\n return origin.getCityId();\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity() {\n return (String) get(\"city\");\n }", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "public City getCity() {\n return city;\n }", "TrackerCity getTrackerCity(final Integer id);", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityno() {\n return cityno;\n }", "public String getdArrivedcityid() {\n return dArrivedcityid;\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCity()\n {\n \treturn city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public String getCity() {\n return City;\n }", "public Long getDestinationCityId() {\n return destination.getCityId();\n }", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public String getdStartcityid() {\n return dStartcityid;\n }", "public String getdDestinationcityid() {\n return dDestinationcityid;\n }", "public Integer getBankCityId() {\r\n return bankCityId;\r\n }", "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "@Override\n public String getCity() {\n return this.city;\n }", "public java.lang.String getCity() {\n return City;\n }", "@Override\n\tpublic City findCityById(long id) {\n\t\treturn null;\n\t}", "public String getContactCity() {\n return contactCity;\n }", "public String getCityName() {\n return cityName;\n }", "public String getCityName() {\n return cityName;\n }", "public Long getWishCityId() {\n return wishCityId;\n }", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public String getCompanyCity() {\n return companyCity;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }", "public String getLocationCity() {\n return locationCity;\n }", "public String getCityname() {\n return cityname;\n }", "public Long getCityagent() {\n return cityagent;\n }", "public String getJobCity() {\r\n return jobCity;\r\n }", "@AutoEscape\n\tpublic String getCity();", "@ApiMethod(name = \"getCity\", path = \"city/{id}\", httpMethod = ApiMethod.HttpMethod.GET)\n public City getCity(@Named(\"id\") Long id)\n throws NotFoundException {\n\n return mCityService.getById(id);\n }", "public CityEntry getCity(){\n\t\treturn (CityEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_LINK);\n\t}", "public Collection<String> getChildCityId() {\n\t\treturn childCityId;\n\t}", "public String getHospitalCity() {\n return hospitalCity;\n }", "public String getCityCode() {\n return (String)getAttributeInternal(CITYCODE);\n }", "public void setCity(String city) {\n this.city = city;\n }", "@Override\r\n\tpublic List<City> getCityById(int pid) {\n\t\treturn cd.getCityById(pid);\r\n\t}", "@ApiModelProperty(value = \"City of IP address\")\n public String getCity() {\n return city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }" ]
[ "0.862333", "0.85914105", "0.85914105", "0.8586257", "0.8575492", "0.848586", "0.84310657", "0.8321626", "0.79752123", "0.7858258", "0.77067184", "0.77067184", "0.74938697", "0.7459869", "0.74484056", "0.7401815", "0.739299", "0.7383725", "0.7367496", "0.72983015", "0.7285108", "0.72829384", "0.72829384", "0.72829384", "0.72802985", "0.72802985", "0.7244086", "0.7244086", "0.7244086", "0.7244086", "0.72379184", "0.72310835", "0.72310835", "0.72310835", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.72300947", "0.7229927", "0.72123414", "0.72002995", "0.719161", "0.7188238", "0.7170731", "0.7170452", "0.7165869", "0.7147176", "0.7147176", "0.7139924", "0.71266556", "0.7126447", "0.711623", "0.71013397", "0.71013397", "0.7074574", "0.7031207", "0.69942456", "0.6991918", "0.6965834", "0.6964994", "0.69451374", "0.6936921", "0.6930748", "0.6917012", "0.68796325", "0.6848254", "0.68390626", "0.68390626", "0.6830639", "0.68234384", "0.68234384", "0.68118906", "0.6764658", "0.6764658", "0.6762666", "0.67618287", "0.67071396", "0.66681767", "0.6659751", "0.6637835", "0.66170824", "0.66143435", "0.66004586", "0.65668535", "0.65556777", "0.6554082", "0.654823", "0.65418124", "0.65388215", "0.65388215", "0.65388215", "0.65388215", "0.65388215", "0.65388215" ]
0.85373676
5
Setter method for property city_id.
public void setCity_id(String city_id) { this.city_id = city_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCityid(Integer cityid) {\n this.cityid = cityid;\n }", "public void setCityId(String cityId) {\n this.cityId = cityId;\n }", "public void setCityId(Integer cityId) {\n this.cityId = cityId;\n }", "public void setCityId(String cityId) {\r\n this.cityId = cityId;\r\n }", "public void setCityId(Long cityId) {\n this.cityId = cityId;\n }", "public String getCity_id() {\n return city_id;\n }", "public String getCityId() {\r\n return cityId;\r\n }", "public String getCityId() {\n return cityId;\n }", "public Long getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "public Integer getCityid() {\n return cityid;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "@SuppressWarnings(\"unused\")\n public Integer getCityID() { return cityID; }", "public void setCity(City city) {\n this.city = city;\n }", "@Override\n\tpublic void setCityId(int CityId) {\n\t\t_locMstLocation.setCityId(CityId);\n\t}", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(City city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city){\n this.city = city;\n }", "public void setCity (String city) {\n\t\tthis.city=city;\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public Short getCityId() {\r\n return cityId;\r\n }", "public void setCity(String city){\n\t\tthis.city = city;\n\t}", "public void setCity(String city)\n\t{\n\t\tCity = city;\n\t}", "public void setCity(java.lang.String city) {\r\n this.city = city;\r\n }", "public void setCityKey( Long cityKey ) {\n this.cityKey = cityKey;\n }", "public void setCity(String city);", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "@Override\n\tpublic int getCityId() {\n\t\treturn _locMstLocation.getCityId();\n\t}", "@Override\n\tpublic void setCity(java.lang.String city) {\n\t\t_candidate.setCity(city);\n\t}", "public void setCity (java.lang.String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(java.lang.String City) {\n this.City = City;\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }", "public void setLocationCity(String locationCity) {\n this.locationCity = locationCity;\n }", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public void setCity(String value) {\n setAttributeInternal(CITY, value);\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "@Override\n public void setCity(String a) {\n this.city = a;\n }", "public Address city(String city) {\n this.city = city;\n return this;\n }", "public void setContactCity(String contactCity) {\n this.contactCity = contactCity;\n }", "public void setJobCity(String jobCity) {\r\n this.jobCity = jobCity;\r\n }", "public void setBankCityId(Integer bankCityId) {\r\n this.bankCityId = bankCityId;\r\n }", "public void setCityname(String cityname) {\n this.cityname = cityname;\n }", "public void setWishCityId(Long wishCityId) {\n this.wishCityId = wishCityId;\n }", "public Integer getBankCityId() {\r\n return bankCityId;\r\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "@SuppressWarnings(\"All\")\n void setCity(String city){\n prefs.edit().putString(\"city\", city).commit();\n }", "public boolean setCity(String someCity) {\n if (VMSPro.checkString(someCity)) {\n this.city = someCity;\n return true;\n }\n return false;\n }", "public void setCityagent(Long cityagent) {\n this.cityagent = cityagent;\n }", "public Long getOriginCityId() {\n return origin.getCityId();\n }", "public String getCityno() {\n return cityno;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public String getdArrivedcityid() {\n return dArrivedcityid;\n }", "public abstract void setCity(String sValue);", "public void setdStartcityid(String dStartcityid) {\n this.dStartcityid = dStartcityid == null ? null : dStartcityid.trim();\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public void setCityno(String cityno) {\n this.cityno = cityno == null ? null : cityno.trim();\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getdDestinationcityid() {\n return dDestinationcityid;\n }", "public void setCitiesCityCode(Long citiesCityCode) {\n this.citiesCityCode = citiesCityCode;\n }", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public String getdStartcityid() {\n return dStartcityid;\n }", "@Override\n\t@XmlElement\n\tpublic void setCityCode(String cityCode) {\n\t\t\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "@Override\n\tpublic City findCityById(long id) {\n\t\treturn null;\n\t}", "public String getCity() {\n return city;\n }" ]
[ "0.82283676", "0.81818384", "0.8160321", "0.81467825", "0.8140078", "0.80223876", "0.7976071", "0.79596955", "0.78919667", "0.7889154", "0.7889154", "0.7793375", "0.77667123", "0.77307415", "0.77307415", "0.7654237", "0.74851906", "0.74054366", "0.73723364", "0.73723364", "0.7343936", "0.7343936", "0.7343936", "0.7343936", "0.7343936", "0.7343936", "0.7340634", "0.7330488", "0.7276011", "0.7272066", "0.72470856", "0.72470856", "0.7231602", "0.72250694", "0.7209889", "0.71933895", "0.7188585", "0.71851176", "0.71805066", "0.71805066", "0.7176512", "0.7176512", "0.7176512", "0.7176512", "0.7153674", "0.70099103", "0.70011204", "0.69445014", "0.6891957", "0.6891957", "0.6891957", "0.6891957", "0.6891957", "0.6740138", "0.67112184", "0.6597204", "0.6597204", "0.65841013", "0.65639675", "0.65417373", "0.65335625", "0.65139914", "0.6484073", "0.64808553", "0.6411489", "0.6385714", "0.6374355", "0.6367718", "0.6367718", "0.6344487", "0.63174933", "0.63082284", "0.62970155", "0.62926084", "0.62902546", "0.62902546", "0.6278439", "0.6270307", "0.6268521", "0.62664074", "0.62664074", "0.6263738", "0.62548536", "0.62526", "0.62526", "0.62526", "0.6243744", "0.62386703", "0.6214142", "0.6212757", "0.61977047", "0.61874384", "0.61874384", "0.61874384", "0.61874384", "0.61759824", "0.61759824", "0.61759824", "0.61747223", "0.61607766" ]
0.8212209
1
Getter method for property county_id.
public String getCounty_id() { return county_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getCountyid() {\n return countyid;\n }", "public String getCounty() {\n return county;\n }", "public String getCounty() {\r\n return county;\r\n }", "public void setCounty_id(String county_id) {\n this.county_id = county_id;\n }", "public String getCounty()\n {\n \treturn county;\n }", "public String getCountyCd() {\n\t\treturn countyCd;\n\t}", "public void setCountyid(Integer countyid) {\n this.countyid = countyid;\n }", "public String getCounty() {\n return mCounty;\n }", "public String getCountyname() {\n return countyname;\n }", "@ApiModelProperty(value = \"所在-区\")\n public String getCounty() {\n return county;\n }", "public java.lang.String getSzCdCounty()\r\n {\r\n return this._szCdCounty;\r\n }", "public void setCounty(String county) {\r\n this.county = county;\r\n }", "public void setCounty(String county) {\n this.county = county;\n }", "County selectByPrimaryKey(Long id);", "@Override\n public String toString() {\n return getCounty();\n }", "public Integer getCityid() {\n return cityid;\n }", "@SuppressWarnings(\"unused\")\n public Integer getCityID() { return cityID; }", "public Long getCountyagent() {\n return countyagent;\n }", "public String getCityId() {\n return cityId;\n }", "public String getCountyFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTY);\n }", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public String getCityId() {\r\n return cityId;\r\n }", "public Short getCityId() {\r\n return cityId;\r\n }", "public Long getCityId() {\n return cityId;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "public String getCity_id() {\n return city_id;\n }", "@Override\n\tpublic int getCityId() {\n\t\treturn _locMstLocation.getCityId();\n\t}", "public void setCounty(String county) {\n this.county = county == null ? null : county.trim();\n }", "public Integer getBankCityId() {\r\n return bankCityId;\r\n }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "public int getCountryId();", "public long getCountryId() {\n return countryId;\n }", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public Long getCountryId() {\n return this.countryId;\n }", "public Integer getCountryId() {\n return countryId;\n }", "public String getPhnAreaCityCd()\n\t{\n\t\treturn mPhnAreaCityCd;\n\t}", "TrackerCity getTrackerCity(final Integer id);", "public gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct getCityCountyStruct(int index)\r\n throws java.lang.IndexOutOfBoundsException\r\n {\r\n // check bounds for index\r\n if (index < 0 || index >= this._cityCountyStructList.size()) {\r\n throw new IndexOutOfBoundsException(\"getCityCountyStruct: Index value '\" + index + \"' not in range [0..\" + (this._cityCountyStructList.size() - 1) + \"]\");\r\n }\r\n \r\n return (gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct) _cityCountyStructList.get(index);\r\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public int getCountryId() {\n return countryId;\n }", "public int getId() {\n\t\treturn (m_country_id);\n\t}", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public String getCateId() {\n return cateId;\n }", "public int getCountryId(){\n return ID;\n }", "@Override\n\tpublic CounDTO getCounpaSuppById(int cId) {\n\t\tCounDTO counDTO = new CounDTO();\n\t\tCounpaSupp coun = this.counDAO.selectByPrimaryKey(cId);\n\t\tcounDTO.setMain(coun);\n\t\tMap<String, Object> params = new TreeMap<String, Object>();\n\t\tparams.put(\"admcode\", coun.getAdmcode());\n\t\tparams.put(\"year\", coun.getYear());\n\t\tcounDTO.setList(this.poorDAO.query(params));\n\t\treturn counDTO;\n\t}", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public String getCountryID() {\n return countryID;\n }", "public void setSzCdCounty(java.lang.String szCdCounty)\r\n {\r\n this._szCdCounty = szCdCounty;\r\n }", "public java.lang.String getCityPostalcode () {\n\t\treturn cityPostalcode;\n\t}", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCountry_id() {\n return country_id;\n }", "public Long getProvinceCitiesCode() {\n return provinceCitiesCode;\n }", "String getTaxId();", "public String getAreaCityCode() {\n return areaCityCode;\n }", "public Long getWishCityId() {\n return wishCityId;\n }", "public void setCountyname(String countyname) {\n this.countyname = countyname;\n }", "public String getCityno() {\n return cityno;\n }", "public int getC_Region_ID();", "public Integer getCid() {\n return cid;\n }", "public Integer getCid() {\n return cid;\n }", "public String getCityCode() {\n return (String)getAttributeInternal(CITYCODE);\n }", "java.lang.String getRegionId();", "public BigDecimal getCouid() {\n return couid;\n }", "long getBusinessCircleId();", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "public int getCityCountyStructCount()\r\n {\r\n return this._cityCountyStructList.size();\r\n }", "public Long getOriginCityId() {\n return origin.getCityId();\n }", "@Override\n\t\t\t\tpublic void onItemSelected(AdapterView<?> parent, View v, int position,long id) {\n\t\t\t\t\tselectedCounrty = parent.getItemAtPosition(position).toString();\n\t\t\t\t}", "public Integer getDistrict() {\n return district;\n }", "public Integer getDistrict() {\n return district;\n }", "@Override\r\n\tpublic List<City> getCityById(int pid) {\n\t\treturn cd.getCityById(pid);\r\n\t}", "Integer getRegionId();", "public Integer getNationalId() {\n return nationalId;\n }", "public String getCouncil() {\n return council;\n }", "public gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[] getCityCountyStruct()\r\n {\r\n int size = this._cityCountyStructList.size();\r\n gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[] array = new gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct[size];\r\n for (int index = 0; index < size; index++){\r\n array[index] = (gov.georgia.dhr.dfcs.sacwis.structs.output.CityCountyStruct) _cityCountyStructList.get(index);\r\n }\r\n \r\n return array;\r\n }", "public Integer getTownid() {\n return townid;\n }", "public Long getDestinationCityId() {\n return destination.getCityId();\n }", "public String getCid() {\n return cid;\n }", "public Integer getCoachid() {\n return coachid;\n }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "public Integer getCzId() {\r\n return czId;\r\n }", "public Integer getProvinceid() {\n return provinceid;\n }", "public Integer getProvinceid() {\n return provinceid;\n }", "public String getCompanyCity() {\n return companyCity;\n }", "List<County> selectByExample(CountyExample example);", "public String getdArrivedcityid() {\n return dArrivedcityid;\n }", "public String getCity() {\n return (String) get(\"city\");\n }", "public String getCust_id() {\r\n\t\treturn cust_id;\r\n\t}", "public long getBusinessCircleId() {\n return businessCircleId_;\n }", "@JsonGetter(\"company_id\")\n public String getCompanyId ( ) { \n return this.companyId;\n }", "@Override\n public String getCity() {\n return this.city;\n }", "public String getCouname() {\n return couname;\n }", "public Integer getCyrs() {\r\n return cyrs;\r\n }", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }" ]
[ "0.85267824", "0.75896245", "0.75543344", "0.7441724", "0.7398475", "0.7375841", "0.7318324", "0.7174712", "0.69674164", "0.66795325", "0.66133195", "0.6551921", "0.6544021", "0.6538143", "0.63456655", "0.6236509", "0.6234461", "0.61891484", "0.616265", "0.6138509", "0.61361754", "0.61361754", "0.6094798", "0.60843766", "0.6056585", "0.60385853", "0.6004131", "0.59947824", "0.5975868", "0.59549457", "0.58174527", "0.58144546", "0.5803689", "0.57672316", "0.5726675", "0.5685797", "0.5681309", "0.56439906", "0.56290305", "0.5625969", "0.56163216", "0.55939275", "0.558262", "0.558262", "0.55718476", "0.5558685", "0.55577177", "0.55421287", "0.553712", "0.5530622", "0.55236423", "0.5511457", "0.5511457", "0.54875886", "0.5477036", "0.5469715", "0.5464336", "0.54482055", "0.54434", "0.5437048", "0.5435379", "0.54350567", "0.54350567", "0.5432928", "0.5418504", "0.5408448", "0.5406083", "0.539484", "0.53786266", "0.535765", "0.53570044", "0.5338799", "0.5338799", "0.53274316", "0.5327258", "0.5322457", "0.531933", "0.53081775", "0.53054017", "0.52582264", "0.5257782", "0.5246796", "0.52465034", "0.52465034", "0.52465034", "0.52465034", "0.5240672", "0.5239676", "0.5239676", "0.52362657", "0.523371", "0.5233491", "0.5226636", "0.52056104", "0.52018005", "0.5197168", "0.5184328", "0.51843274", "0.5174583", "0.5170772" ]
0.85489684
0
Setter method for property county_id.
public void setCounty_id(String county_id) { this.county_id = county_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountyid(Integer countyid) {\n this.countyid = countyid;\n }", "public String getCounty_id() {\n return county_id;\n }", "public Integer getCountyid() {\n return countyid;\n }", "public void setCounty(String county) {\r\n this.county = county;\r\n }", "public void setCounty(String county) {\n this.county = county;\n }", "public void setCounty(String county) {\n this.county = county == null ? null : county.trim();\n }", "public String getCountyCd() {\n\t\treturn countyCd;\n\t}", "public String getCounty() {\n return county;\n }", "public String getCounty() {\r\n return county;\r\n }", "public void setCountyname(String countyname) {\n this.countyname = countyname;\n }", "public String getCounty()\n {\n \treturn county;\n }", "public void setSzCdCounty(java.lang.String szCdCounty)\r\n {\r\n this._szCdCounty = szCdCounty;\r\n }", "@ApiModelProperty(value = \"所在-区\")\n public String getCounty() {\n return county;\n }", "public String getCountyname() {\n return countyname;\n }", "public String getCounty() {\n return mCounty;\n }", "public void setCountryId(int value);", "int updateByPrimaryKeySelective(County record);", "public void setCityid(Integer cityid) {\n this.cityid = cityid;\n }", "int updateByPrimaryKey(County record);", "County selectByPrimaryKey(Long id);", "public void setCityId(String cityId) {\n this.cityId = cityId;\n }", "public void setCityId(String cityId) {\r\n this.cityId = cityId;\r\n }", "public java.lang.String getSzCdCounty()\r\n {\r\n return this._szCdCounty;\r\n }", "public void setCity_id(String city_id) {\n this.city_id = city_id;\n }", "public void setCounselingField( String counselingField ) {\n this.counselingField = counselingField;\n }", "public void setCityId(Integer cityId) {\n this.cityId = cityId;\n }", "public void setCityId(Long cityId) {\n this.cityId = cityId;\n }", "public Integer getCityid() {\n return cityid;\n }", "public String getCityId() {\n return cityId;\n }", "public String getCity_id() {\n return city_id;\n }", "public void setId(int p_id) {\n\t\tm_country_id = p_id;\n\t}", "public String getCityId() {\r\n return cityId;\r\n }", "@Override\n\t\t\t\tpublic void onItemSelected(AdapterView<?> parent, View v, int position,long id) {\n\t\t\t\t\tselectedCounrty = parent.getItemAtPosition(position).toString();\n\t\t\t\t}", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "@SuppressWarnings(\"unused\")\n public Integer getCityID() { return cityID; }", "public void setCustCountryId(int v) throws TorqueException\n {\n \n if (this.custCountryId != v)\n {\n this.custCountryId = v;\n setModified(true);\n }\n \n \n if (aCountry != null && !(aCountry.getCountryId() == v))\n {\n aCountry = null;\n }\n \n }", "public Long getCityId() {\n return cityId;\n }", "public void setCountyagent(Long countyagent) {\n this.countyagent = countyagent;\n }", "@Override\n\tpublic int getCityId() {\n\t\treturn _locMstLocation.getCityId();\n\t}", "public Long getCountyagent() {\n return countyagent;\n }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "public Short getCityId() {\r\n return cityId;\r\n }", "public void setC_Region_ID (int C_Region_ID);", "int updateByExampleSelective(County record, CountyExample example);", "@JsonSetter(\"company_id\")\n public void setCompanyId (String value) { \n this.companyId = value;\n }", "public Integer getBankCityId() {\r\n return bankCityId;\r\n }", "int updateByExample(County record, CountyExample example);", "@Override\n public String toString() {\n return getCounty();\n }", "public City(int id, int countryId) {\n this(\"\", \"\", id, countryId);\n }", "@Override\n\tpublic void setCityId(int CityId) {\n\t\t_locMstLocation.setCityId(CityId);\n\t}", "public void setTownid(Integer townid) {\n this.townid = townid;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "public void setCity(String city);", "@JsonSetter(\"trunkId\")\r\n public void setTrunkId (int value) { \r\n this.trunkId = value;\r\n }", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setBankCityId(Integer bankCityId) {\r\n this.bankCityId = bankCityId;\r\n }", "public void setRegionid(int newValue) {\n\tthis.regionid = newValue;\n}", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "public abstract void setCity(String sValue);", "@JsonSetter(\"orgId\")\r\n public void setOrgId (long value) { \r\n this.orgId = value;\r\n }", "@JsonSetter(\"subaccount_id\")\r\n public void setSubaccountId (int value) { \r\n this.subaccountId = value;\r\n }", "@Override\n\tpublic void setCountryId(long countryId) {\n\t\t_candidate.setCountryId(countryId);\n\t}", "public void setDistrict(int district) { this.district = district; }", "public void setCityCount(int cityCount) {\n\t\tthis.cityCount = cityCount;\n\t}", "public void setCyrs(Integer cyrs) {\r\n this.cyrs = cyrs;\r\n }", "protected void setId(long id) {\n\t\tgraphicFrame.getNvGraphicFramePr().getCNvPr().setId(id);\n\t}", "public void setCityKey( Long cityKey ) {\n this.cityKey = cityKey;\n }", "public static void setIccid(Object iccid) {\n\t\t\n\t}", "@Generated(value = \"com.sun.tools.xjc.Driver\", date = \"2021-08-07T09:44:49+02:00\", comments = \"JAXB RI v2.3.0\")\n public void setGeoCodeId(long value) {\n this.geoCodeId = value;\n }", "public void setCountable(Boolean countable) {\n\t this.countable = countable;\n\t}", "public long getCountryId() {\n return countryId;\n }", "public void setCity(City city) {\n this.city = city;\n }", "public void setC_BankAccount_ID (int C_BankAccount_ID);", "public void setWishCityId(Long wishCityId) {\n this.wishCityId = wishCityId;\n }", "public void setJP_BankDataLine_ID (int JP_BankDataLine_ID);", "public void setCouncil(String council) {\n this.council = council;\n }", "public String getPhnAreaCityCd()\n\t{\n\t\treturn mPhnAreaCityCd;\n\t}", "public void setPCatgryId(Number value) {\n\t\tsetNumber(P_CATGRY_ID, value);\n\t}", "public void setNY(int ny){\n newY=ny;\n }", "public void setNationality(String nationality);", "public Long getCountryId() {\n return this.countryId;\n }", "public void updateSCId(int sCid){\n\t\tthis.sCiD = sCid;\n\t}", "public void setCoachid(Integer coachid) {\n this.coachid = coachid;\n }", "public void setCity( EAIMMCtxtIfc theCtxt, java.lang.String theCity) throws EAIException;", "private void fillCountyManager(CountyManager cmr,CountyManagerForm countyManager) {\n\t\tCounty county = countyDao.findUniqueBy(\"countyId\", countyManager.getCountyId());\n\t\tcmr.setCounty(county);\n\t}", "public void setCountryKey(ObjectKey key) throws TorqueException\n {\n \n setCustCountryId(((NumberKey) key).intValue());\n }", "public void setIdSucursal(int idSucursal)\r\n/* 123: */ {\r\n/* 124:135 */ this.idSucursal = idSucursal;\r\n/* 125: */ }", "public void setC_Invoice_ID (int C_Invoice_ID);", "public void setContestId(String contestId) ;", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "public void setcId(Integer cId) {\n this.cId = cId;\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public void setProvinceid(Integer provinceid) {\n this.provinceid = provinceid;\n }", "public void setCity(String s) {\r\n\t\tstate = s;\t\t\r\n\t}", "@JsonSetter(\"salary\")\n public void setSalary (int value) { \n this.salary = value;\n notifyObservers(this.salary);\n }", "public void setNationalId(Integer nationalId) {\n this.nationalId = nationalId;\n }", "public void setCouname(String couname) {\n this.couname = couname == null ? null : couname.trim();\n }" ]
[ "0.82967085", "0.79711086", "0.7714318", "0.747038", "0.7408011", "0.68587315", "0.6556774", "0.6484521", "0.64519244", "0.6349096", "0.61699015", "0.60692614", "0.6049513", "0.6048673", "0.5980373", "0.5926883", "0.5918588", "0.5879387", "0.5858503", "0.57787025", "0.57153374", "0.56445944", "0.5630427", "0.56017524", "0.5590575", "0.55841833", "0.5548469", "0.55240446", "0.55118644", "0.55014706", "0.54981446", "0.54966366", "0.5448708", "0.5448033", "0.5448033", "0.54474086", "0.54449433", "0.542436", "0.5381422", "0.5375823", "0.53561634", "0.5354854", "0.5352219", "0.53418046", "0.5334302", "0.5325807", "0.53181005", "0.53143495", "0.5306805", "0.53024566", "0.52457225", "0.5238917", "0.5211925", "0.5188538", "0.51834565", "0.51821625", "0.5167011", "0.5167011", "0.51582915", "0.51270056", "0.51041186", "0.50955737", "0.50905657", "0.50701606", "0.50650924", "0.5043402", "0.50287575", "0.50206053", "0.50123996", "0.49949142", "0.49859184", "0.4985774", "0.49796838", "0.49791634", "0.4939207", "0.4925333", "0.49028844", "0.49028808", "0.48977342", "0.4890945", "0.48895055", "0.48811188", "0.48796323", "0.4873141", "0.4863365", "0.4862898", "0.4853606", "0.48486233", "0.4840953", "0.4838601", "0.48248923", "0.4821572", "0.48161718", "0.48143303", "0.48119473", "0.48119473", "0.4804705", "0.48030874", "0.48009676", "0.47999343" ]
0.82677704
1
Getter method for property isp_id.
public String getIsp_id() { return isp_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIsp_id(String isp_id) {\n this.isp_id = isp_id;\n }", "public String getIsp() {\n return isp;\n }", "@Transient\n\tpublic String getSpId() \t{ \n\t\treturn spId; \n\t}", "@Id\n\t@Column(name = \"SPID\")\n\tpublic Long getId() {\n\t\treturn id;\n\t}", "public Integer getSpId() {\n\t\treturn this.spId;\n\t}", "public String getHospitalId() {\n return hospitalId;\n }", "@Override\n public String getPigeonCoopID() {\n\n if(this.pigeonCoopID == null){\n\n this.pigeonCoopID = TestDatabase.getInstance().getClientField(token, id, \"pigeonCoopID\");\n }\n return pigeonCoopID;\n\n }", "public Integer getpId() {\n return pId;\n }", "public Long getPiid() {\n return piid;\n }", "public int getSeasonHSPConfigurationId() {\n return seasonHSPConfigurationId;\n }", "public Integer getPrjId() {\r\n return prjId;\r\n }", "public Integer getCarparksurveyinfoid() {\n return carparksurveyinfoid;\n }", "public int getpId() {\n return pId;\n }", "public void setIsp(String isp) {\n this.isp = isp;\n }", "public String getPrId() {\n return prId;\n }", "@JsonProperty(\"PoSId\")\n public String getPoSId() {\n return posId;\n }", "public java.lang.String getSpId(){\r\n return localSpId;\r\n }", "public String getPId() {\n return (String)getAttributeInternal(PID);\n }", "public String getSiteid() {\n return siteid;\n }", "public int getSpid(){\n return localSpid;\n }", "public Integer getSiteId() {\r\n return siteId;\r\n }", "public Integer getPlatformId() {\r\n return platformId;\r\n }", "public Integer getCompanyId() {\n return this.companyId;\n }", "long getParkingId();", "long getParkingId();", "long getParkingId();", "public String getProjId() {\n return projId;\n }", "public Integer getOpportunityID() {\n return opportunityID;\n }", "public String getPropertyId() {\n return propertyId;\n }", "public String siteId() {\n return this.siteId;\n }", "public String getCompanyId()\n {\n return companyId;\n }", "@Override\n\t\t\tpublic String getPropertyId() {\n\t\t\t\treturn null;\n\t\t\t}", "public Integer getCompanyId() {\n return companyId;\n }", "public Integer getCompanyId() {\n return companyId;\n }", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public long getCompanyId();", "public java.lang.String getCsp_Identificador() {\n return csp_Identificador;\n }", "@Override\n\t@Id\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\t@Column(name = \"pepe_sq_id\")\n\tpublic Long getId() {\n\t\treturn super.getId();\n\t}", "public String getPropertyID()\n {\n String v = (String)this.getFieldValue(FLD_propertyID);\n return StringTools.trim(v);\n }", "public YangString getPlmnIdValue() throws JNCException {\n return (YangString)getValue(\"plmn-id\");\n }", "public long getProjectId() {\r\n return projectId;\r\n }", "public String getProjectId() {\n return getProperty(Property.PROJECT_ID);\n }", "public int getCompanyId() {\n return companyId;\n }", "@Transient\n @JsonProperty(\"project\")\n public Long getProjectId() {\n if (project == null) {\n return 0L;\n } else {\n return project.getId();\n }\n }", "public Integer getInspartid() {\n return inspartid;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public java.lang.Object getOpportunityID() {\n return opportunityID;\n }", "@Override\n public long getCompanyId() {\n return _partido.getCompanyId();\n }", "public Integer getProjectId() {\n return projectId;\n }", "public Integer getProjectId() {\n return projectId;\n }", "public int getEmpId() {\n return id;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "@Override\n\tpublic long getCompanyId() {\n\t\treturn model.getCompanyId();\n\t}", "public Long getProjectId() {\n return projectId;\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public String getCompanyId() {\r\n return companyId;\r\n }", "public Integer getPoliticsId() {\n return politicsId;\n }", "public String getSysCompanyId() {\n return sysCompanyId;\n }", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "@Override\n\tpublic long getCompanyId();", "public String getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _paper.getCompanyId();\n\t}", "@JsonGetter(\"company_id\")\n public String getCompanyId ( ) { \n return this.companyId;\n }", "public Integer getSolutionId() {\n return solutionId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _scienceApp.getCompanyId();\n\t}", "public Integer getProjectId() {\n\t\treturn projectId;\n\t}", "public String getp_org_id() {\n return (String)getNamedWhereClauseParam(\"p_org_id\");\n }", "public long getCompanyId() {\n return companyId;\n }", "public Long getOpportunityId() {\n return opportunityId;\n }", "long getProposalId();", "public Integer getSiteId() {\r\n\t\treturn siteId;\r\n\t}", "public int getPropertyId() {\n\t\treturn propertyId;\n\t}", "public int getPropertyId() {\n\t\treturn propertyId;\n\t}", "public java.lang.String getInsolvency_id() {\n return insolvency_id;\n }", "public Number getProjectId() {\n return (Number) getAttributeInternal(PROJECTID);\n }", "public int getProjectId()\r\n\t{\r\n\t\treturn projectId;\r\n\t}", "@AutoEscape\n\tpublic String getIdPtoServicio();", "public org.apache.axis2.databinding.types.soapencoding.String getCSPID(){\n return localCSPID;\n }", "public Integer getEqpid() {\n return eqpid;\n }", "String getCampoId();", "String getSupplierID();", "@NonNull\n public String getId() {\n return mImpl.getId();\n }", "@Id\n\t@Column(name = \"SERV_PROV_CODE\", length = 15)\n\tpublic String getServiceProviderCode() \n\t{\n\t\treturn serviceProviderCode;\n\t}", "public Integer getProvinceid() {\n return provinceid;\n }", "public Integer getProvinceid() {\n return provinceid;\n }", "public java.lang.String getPresentid(){\r\n return localPresentid;\r\n }", "public Long getCompanyId() {\n return companyId;\n }", "public int getSupplierId()\n {\n return(this.SupplierId);\n }", "public StrColumn getIprId() {\n return delegate.getColumn(\"ipr_id\", DelegatingStrColumn::new);\n }", "@Override\n public String getExternalId() {\n CommerceId commerceId = getId();\n return commerceId.getExternalId().orElseGet(() -> commerceId.getTechId().orElse(null));\n }", "public Integer getPlatId() {\n return platId;\n }", "public int getEmpID() {\n return empID;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _employee.getCompanyId();\n\t}", "public int getId()\r\n/* 69: */ {\r\n/* 70:103 */ return this.idAutorizacionEmpresaSRI;\r\n/* 71: */ }" ]
[ "0.7165216", "0.6590433", "0.64257157", "0.6320056", "0.6287979", "0.61553764", "0.6040382", "0.59749514", "0.5947568", "0.5942288", "0.5906133", "0.5901658", "0.58662975", "0.58357275", "0.58274955", "0.5820604", "0.58109885", "0.57708055", "0.5769818", "0.5754386", "0.5744966", "0.572454", "0.5698591", "0.56954706", "0.56954706", "0.56954706", "0.5692753", "0.5683554", "0.568063", "0.5671683", "0.56701916", "0.56574833", "0.565312", "0.565312", "0.564739", "0.564739", "0.564739", "0.564739", "0.564739", "0.56453806", "0.5637845", "0.5618534", "0.5611916", "0.5607682", "0.56055856", "0.5605142", "0.5599529", "0.5596635", "0.5587511", "0.5587358", "0.55841595", "0.5575111", "0.5575111", "0.55729145", "0.5569154", "0.5569154", "0.5569154", "0.5565405", "0.55530506", "0.55530506", "0.5552605", "0.5549485", "0.55382264", "0.55382264", "0.55382264", "0.55382264", "0.5523215", "0.55227834", "0.5516977", "0.5507144", "0.55022633", "0.5491314", "0.54912084", "0.5490639", "0.54850644", "0.5483541", "0.54727757", "0.5470179", "0.5470179", "0.5470145", "0.5468036", "0.54645175", "0.5454724", "0.54531205", "0.54421246", "0.5439021", "0.54369956", "0.5431575", "0.54282707", "0.5426257", "0.5426257", "0.5423273", "0.54142404", "0.540624", "0.5402572", "0.5398892", "0.5389986", "0.5389005", "0.5378316", "0.5370772" ]
0.8004136
0
Setter method for property isp_id.
public void setIsp_id(String isp_id) { this.isp_id = isp_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getIsp_id() {\n return isp_id;\n }", "public void setIsp(String isp) {\n this.isp = isp;\n }", "public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }", "public void setSpId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localSpIdTracker = true;\r\n } else {\r\n localSpIdTracker = false;\r\n \r\n }\r\n \r\n this.localSpId=param;\r\n \r\n\r\n }", "public void setSeasonHSPConfigurationId(int value) {\n this.seasonHSPConfigurationId = value;\n }", "@Override\n public final void setItsId(final Long pId) {\n //stub\n }", "public String getIsp() {\n return isp;\n }", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "@JsonSetter(\"company_id\")\n public void setCompanyId (String value) { \n this.companyId = value;\n }", "public void setPId(String value) {\n setAttributeInternal(PID, value);\n }", "@Transient\n\tpublic String getSpId() \t{ \n\t\treturn spId; \n\t}", "@Id\n\t@Column(name = \"SPID\")\n\tpublic Long getId() {\n\t\treturn id;\n\t}", "public void setEqpid(Integer eqpid) {\n this.eqpid = eqpid;\n }", "public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }", "public void setpId(int pId) {\n this.pId = pId;\n }", "public void setpId(Integer pId) {\n this.pId = pId;\n }", "public void setPresentid(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localPresentidTracker = true;\r\n } else {\r\n localPresentidTracker = false;\r\n \r\n }\r\n \r\n this.localPresentid=param;\r\n \r\n\r\n }", "public void setCompanyId(Integer value) {\n this.companyId = value;\n }", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setCompanyId(long companyId);", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "public Integer getSpId() {\n\t\treturn this.spId;\n\t}", "public void setProvProcessId(Integer v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/prov_process_id\",v);\n\t\t_ProvProcessId=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "void setLspId(String lspId);", "@JsProperty(name = \"id\")\n public native void setId(String value);", "public void setInoId(String pId);", "@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}", "@Override\n\tpublic void setPID(int pid) {\n\t\tthis.pID = pid;\n\t\t\n\t}", "public void setIsperson(Integer isperson) {\n this.isperson = isperson;\n }", "public void setId(int p_id) {\n\t\tm_country_id = p_id;\n\t}", "public void setPlmnIdValue(String plmnIdValue) throws JNCException {\n setPlmnIdValue(new YangString(plmnIdValue));\n }", "private void setSrcId(int value) {\n \n srcId_ = value;\n }", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "public void setValueId(Integer valueId) {\n this.valueId = valueId;\n }", "public void setPipePipelinedetailsElementId(Integer v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/pipe_pipelineDetails_element_id\",v);\n\t\t_PipePipelinedetailsElementId=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "private void setId(int value) {\n \n id_ = value;\n }", "private void setProcessId(int value) {\n\t\tthis.processId = value;\n\t}", "@Override\n public void setId(int pintId) {\n this.intDynaGraphId = pintId;\n }", "public String getHospitalId() {\n return hospitalId;\n }", "public abstract void setProcessID(long pid);", "public void setPiid(Long piid) {\n this.piid = piid;\n }", "@JsonSetter(\"orgId\")\r\n public void setOrgId (long value) { \r\n this.orgId = value;\r\n }", "public void setM_Production_ID (int M_Production_ID);", "public int getSeasonHSPConfigurationId() {\n return seasonHSPConfigurationId;\n }", "public void setIdAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI(int idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI)\r\n/* 85: */ {\r\n/* 86:118 */ this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI = idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 87: */ }", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "public void setIdpres(int idpres) {\r\n this.idpres = idpres;\r\n }", "public void setCountryId(int value);", "@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract void setValue(String value);", "public void setValue_id(java.lang.String value_id) {\n this.value_id = value_id;\n }", "public void setCSPID(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localCSPID=param;\n \n\n }", "@JSProperty(\"id\")\n void setId(String value);", "private void setPoId(Long id) {\r\n this.poId = id;\r\n }", "private void setSrcId(int value) {\n \n srcId_ = value;\n }", "private void setPropertyID(String v)\n {\n this.setFieldValue(FLD_propertyID, StringTools.trim(v));\n }", "public void setIdOrganizacion(int idOrganizacion)\r\n/* 88: */ {\r\n/* 89:157 */ this.idOrganizacion = idOrganizacion;\r\n/* 90: */ }", "public void setServiceId(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localServiceIdTracker = true;\r\n } else {\r\n localServiceIdTracker = false;\r\n \r\n }\r\n \r\n this.localServiceId=param;\r\n \r\n\r\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setp_org_id(String value) {\n setNamedWhereClauseParam(\"p_org_id\", value);\n }", "public abstract void setCompteId(Integer pCompteId);", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public void setIdOrganizacion(int idOrganizacion)\r\n/* 113: */ {\r\n/* 114:127 */ this.idOrganizacion = idOrganizacion;\r\n/* 115: */ }", "@Override\n public void setCompanyId(long companyId) {\n _partido.setCompanyId(companyId);\n }", "public void setId(Long pid) {\n this.pid = pid;\n }", "public abstract void setIdpc(java.lang.String newIdpc);", "public int getSpid(){\n return localSpid;\n }", "public void setPrjId(Integer prjId) {\r\n this.prjId = prjId;\r\n }", "public void setIdPtoServicio(String idPtoServicio);", "public void setPlatformId(Integer platformId) {\r\n this.platformId = platformId;\r\n }", "public void setId(VfeWorkflowsAdpId id) { this.id = id; }", "public void setICID(int value) {\n this.icid = value;\n }", "public Long getPiid() {\n return piid;\n }", "public void setIdOrganizacion(int idOrganizacion)\r\n/* 95: */ {\r\n/* 96:126 */ this.idOrganizacion = idOrganizacion;\r\n/* 97: */ }", "public void setsId(Integer sId) {\n this.sId = sId;\n }", "public void setIdOrganizacion(int idOrganizacion)\r\n/* 99: */ {\r\n/* 100:160 */ this.idOrganizacion = idOrganizacion;\r\n/* 101: */ }", "public void setCaseID(java.lang.String param){\n \n this.localCaseID=param;\n \n\n }", "public String getSiteid() {\n return siteid;\n }", "public void setC_Region_ID (int C_Region_ID);", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(String value) {\n \tif (value==null)\n \t\tthis.id = \"\";\n \telse\n \t\tthis.id = value;\n }", "public void setPlatformId(int platformId) {\n this.platformId = platformId;\n }", "public Integer getCarparksurveyinfoid() {\n return carparksurveyinfoid;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "private void setObjId(int value) {\n \n objId_ = value;\n }", "public void setProjectID(int value) {\n this.projectID = value;\n }" ]
[ "0.7482968", "0.6745187", "0.5984741", "0.5953492", "0.5885025", "0.57507193", "0.5736361", "0.57315964", "0.57189125", "0.5633409", "0.5614145", "0.55686885", "0.5551069", "0.55443865", "0.5521807", "0.5516741", "0.5429504", "0.54219574", "0.5410374", "0.5410374", "0.5410374", "0.5410374", "0.5410374", "0.5384284", "0.5384284", "0.53736085", "0.53700477", "0.53685826", "0.53631014", "0.5345571", "0.53351504", "0.53284705", "0.5328284", "0.5323433", "0.53181666", "0.531706", "0.5258541", "0.5258541", "0.5239206", "0.52331287", "0.52295506", "0.5220901", "0.52159923", "0.5200754", "0.517982", "0.51792973", "0.5174684", "0.51672006", "0.51616174", "0.5159914", "0.51563615", "0.51466376", "0.5141164", "0.5136772", "0.5135948", "0.5135642", "0.5135446", "0.5128409", "0.51271427", "0.5127056", "0.51236767", "0.5112949", "0.51011467", "0.5100586", "0.509691", "0.5094176", "0.5090223", "0.50821686", "0.50809133", "0.5066663", "0.5064372", "0.5058503", "0.5057402", "0.5053093", "0.5046916", "0.50459516", "0.5045817", "0.50437874", "0.50380594", "0.50351894", "0.5020455", "0.50107545", "0.5007558", "0.50001884", "0.50001884", "0.50001884", "0.50001884", "0.50001884", "0.50001884", "0.50001884", "0.49900025", "0.49896023", "0.49868682", "0.49862778", "0.49862778", "0.49862778", "0.49862778", "0.49862778", "0.49862778", "0.49853954" ]
0.78305686
0
Create the View for the fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_mentions, container, false); //Inflate the views rvTweets = v.findViewById(R.id.rvTweet); pbNetwork = v.findViewById(R.id.pbNetwork); // finding swiperefresher swipeContainer = v.findViewById(R.id.swipeContainer); return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createFragment() {\n\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 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 View inflate = inflater.inflate(R.layout.fragment_creation, 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_viewer, container, false);\n initComponents(view);\n return view;\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 parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n fragmentView = inflater.inflate(R.layout.fragment_workout_details, container, false);\n ButterKnife.bind(this, fragmentView);\n\n return fragmentView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_class, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_blank, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_info, container, false);\n //Initialise UI elements\n saveButton = view.findViewById(R.id.save_button);\n saveButton.setOnClickListener(this);\n EditText titleEdit = view.findViewById(R.id.maze_title_edit);\n loadingScreen = view.findViewById(R.id.loading_screen);\n titleEdit.addTextChangedListener(createMazeTextWatcher);\n publicToggle = view.findViewById(R.id.public_switch);\n initPublicToggle();\n return view;\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 view = inflater.inflate(R.layout.fragment_site_progress_add, container, false);\n setHasOptionsMenu(true);\n ButterKnife.bind(this, view);\n\n initializeUI();\n bindData();\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,\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 View view = inflater.inflate(R.layout.fragment_tower_parameter, container, false);\n bind = ButterKnife.bind(this,view);\n EventBus.getDefault().register(this);\n initRecycleView();\n initView();\n initRotationAngle();\n initHookup();\n return view;\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\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_vicky, container, false);\r\n }", "@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 View view = inflater.inflate(R.layout.fragment_main, container, false);\n initUI(view);\n initData();\n setEventBus(this, true);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.gui_fragment,\n container, false);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_wo_de, container, false);\n initView(view);\n return view;\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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n return inflater.inflate(R.layout.fragment_blank, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_forecast, container, false);\n// view.setBackgroundColor(0xFFE0E0FF);\n\n /*\n //practical work 4 start here\n LinearLayout fragment_container = view.findViewById(R.id.fragment_forecast);\n fragment_container.setOrientation(LinearLayout.VERTICAL);\n // add the button in fragment\n ImageView weather = new ImageView(getContext());\n weather.setImageResource(R.drawable.sunny);\n TextView day = new TextView(getContext());\n day.setText(\"Thursday\");\n day.setTextSize(34);\n day.setBackgroundColor(0xFF1ed7e8);\n day.setPadding(0, 10, 0, 10);\n fragment_container.addView(weather);\n fragment_container.addView(day);\n */\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_elearning, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_canvas, 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, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_random_hf, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ins_tructor_event_create, 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_blank, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_seperate_detail_map, container, false);\n defineView(view);\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_reception_home, container, false);\r\n\r\n Hello(view);\r\n return view;\r\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_tab_tracking_sovilocation, container, false);\r\n\r\n setup(mView);\r\n GetData(true,\"\");\r\n\r\n return mView;\r\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_my, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_display, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_visitors, container, false);\n\n initViews(view);\n initListeners();\n getCurrentDateAndTime();\n setSpinner();\n\n return view;\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 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 View view = inflater\n .inflate(R.layout.static_fragment, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_main, container, false);\n setGuiComponents(rootView);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_sesion3, container, false);\n\n\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,\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 view= inflater.inflate(R.layout.fragment_upload_new, container, false);\n findViewByIds(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_near_peoples, container, false);\n getActivity().setTitle(\"Share Card\");\n initUI();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video_live, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fan, container, false);\n initilizeViews();\n setListeners();\n\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_factories, container, false);\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Log.d(TAG, \"onCreateView: \");\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment_blank, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_playlist, container, false);\n\n instView(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_form,container,false);\n nameEditText=view.findViewById(R.id.nameEditText);\n progressSeekBar=view.findViewById(R.id.progressSeekBar);\n threadButton = view.findViewById(R.id.threadButton);\n saveButton = view.findViewById(R.id.saveButton);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_vantaggi, container, false);\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\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_gank_fuli, container, false);\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment_plant_selection, 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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_profil, container, false);\n findView();\n initView();\n initListener();\n\n AndroidNetworking.initialize(getContext());\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_votevents, container, false);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_blank, container, false);\n\n setRecyclerView(view);\n setup(view);\n setFirebaseUser();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jogar, container, false);\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(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_selection, container, false);\n return v;\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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bookmark, container, false);\n context = getActivity();\n init(view);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.pickupboy_booking_fragment, container, false);\n mActivity = getActivity();\n userBookingFragment = this;\n initViews();\n getBundle();\n // manageHeaderView();\n setupTabIcons();\n setListener();\n setFragment(new FragementPickUpNewBooking());\n\n return view;\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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_movement, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v = inflater.inflate(R.layout.fragment_self_defense, container, false);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_video, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_main4, container, false);\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 return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {\n View fragmentView = inflater.inflate(R.layout.fragment_my, container, false);\n TextView mTitle = (TextView) fragmentView.findViewById(R.id.title);\n TextView mDescription = (TextView) fragmentView.findViewById(R.id.description);\n TextView state = (TextView) fragmentView.findViewById(R.id.place);\n TextView scroll = (TextView) fragmentView.findViewById(R.id.scroll);\n mTitle.setText(t);\n mDescription.setText(te);\n state.setText(pl);\n scroll.setText(sc);\n fragmentView.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(final View view) {\n if (listener != null) {\n listener.onClick(view);\n }\n }\n\n });\n return fragmentView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_mine, container, false);\n\n mTextView = view.findViewById(R.id.minefragment_textView);\n mTextView.setText(mParam1 + \"_fragment\");\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_destination, 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\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.fragment_galley_videos_fragment, container, false);\n return view;\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_today, container, false);\n initComponent(view);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_video, container, false);\n initialisation(root);\n return root;\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_tv, container, false);\n pb = view.findViewById(R.id.pb);\n pb.setVisibility(View.VISIBLE);\n setRecyclerView(view);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_listing_step2, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_guest, container, false);\n return super.onCreateView(inflater, container, savedInstanceState);\n }", "protected abstract Fragment createFragment();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_detail_jadwal_dokter, container, false);\n initView();\n tampilDataDetail();\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\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView view = inflater.inflate(R.layout.layout_fragment_draw, container,false);\n\t\t\n\t\tLog.e(\"TAG\",\"aaaaa\");\n\t\t\n\t\t//imageView = (ImageView)view.findViewById(R.id.backImageView);\n\t\tsurFaceView = (DrawFragmentSurfaceView)view.findViewById(R.id.drawSurFaceView);\n\t\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View vii = inflater.inflate(R.layout.fragment_schedule, container, false);\n return vii;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_new_design, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_who_working, 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\n return inflater.inflate(R.layout.fragment_fracment01, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_home, container, false);\n\n initializeEvents(v);\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_cases, container, false);\n Init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_web, container, false);\n initialize(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_insert_post, container, false);\n initviews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_events, container, false);\n ButterKnife.inject(this, view);\n return view;\n }" ]
[ "0.76026803", "0.75654334", "0.7554897", "0.75405586", "0.7529752", "0.74827135", "0.74821085", "0.7481404", "0.74769145", "0.74746925", "0.74657744", "0.74629635", "0.74535114", "0.7446879", "0.7444739", "0.74410063", "0.7433208", "0.7426764", "0.7410643", "0.7402823", "0.7397315", "0.73950887", "0.7389592", "0.73880565", "0.73870486", "0.7383833", "0.7383018", "0.73809296", "0.7371116", "0.73707414", "0.7364224", "0.73636526", "0.73583025", "0.73574704", "0.7356654", "0.735624", "0.7353616", "0.7353439", "0.7351562", "0.7347679", "0.7339231", "0.7338586", "0.7336332", "0.7335962", "0.73291904", "0.73256737", "0.73233867", "0.73225945", "0.7319152", "0.7310542", "0.73083836", "0.73000234", "0.7298882", "0.7295123", "0.72935915", "0.72934633", "0.7292075", "0.7291809", "0.7290914", "0.72846043", "0.7283378", "0.7281464", "0.72790915", "0.7277065", "0.7272616", "0.7271723", "0.7266788", "0.7266068", "0.72627103", "0.72620493", "0.72577006", "0.72557527", "0.7254411", "0.7251735", "0.72487545", "0.72445166", "0.72423327", "0.72417825", "0.72412664", "0.72410965", "0.7240893", "0.7237568", "0.7236945", "0.723488", "0.7233762", "0.7231861", "0.7231496", "0.72306234", "0.7227859", "0.72276425", "0.72273535", "0.7226863", "0.7225353", "0.72231513", "0.72212416", "0.72188056", "0.72159994", "0.7215947", "0.72146314", "0.7212551", "0.7211064" ]
0.0
-1
Triggered only when new data needs to be appended to the list Add whatever code is needed to append new items to the bottom of the list
@Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { loadNextDataFromApi(page); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewData(List<PublicPollResponseModel.Data> data) {\n //remove footer view\n this.removeFooterView(footer);\n //Add all data into the adapter\n adapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n adapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void addAsPerFilterFirstLoad(List<Job> newJob){\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(newJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }", "private void createList(DataSnapshot dataSnapshot) {\n if (daList.isEmpty()) {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n } else {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n }\n }", "public void addItem(ArrayList<HashMap<String, String>> new_list) {\n list = new_list;\n notifyDataSetChanged();\n }", "@Override\n\tpublic void addDataItem(FinanceData newdata) {\n\t\tlist_fr.add(0, newdata);\n\t}", "public void updateData(List<AddingTopItem> mList){\n mData.clear();\n mData.addAll(mList);\n this.notifyDataSetChanged();\n }", "private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}", "@Override\n public void onAdded() {\n }", "public void add(Item nextItemToAdd) {\n items.add(nextItemToAdd);\n Collections.sort(items);\n fireIntervalAdded(nextItemToAdd, indexOf(nextItemToAdd), indexOf(nextItemToAdd));\n }", "@Override\n public void refreshList(ArrayList<String> newList){\n }", "private void addItem() {\n\t\tString message = edtMessage.getText().toString();\n\t\t// build the human\n\t\tHuman hum = new Human(message, humans.size());\n\t\t// 1° method\n\t\tarrayAdapter.add(hum);\n\t\t// 2° method\n\t\t// messages.add(message);\n\t\t// arrayAdapter.notifyDataSetChanged();\n\t\t// and flush\n\t\tedtMessage.setText(\"\");\n\t}", "void checkLastItem() {\n if (!mItems.isEmpty() && !mItems.get(mItems.size() - 1).equals(ADD_NEW_ENTRY)) {\n // add last item again if missing\n mItems.add(ADD_NEW_ENTRY);\n // need to manually call, since this item is not in Db and hence ignored by DiffUtil\n notifyItemInserted(mItems.size() - 1);\n }\n }", "private void insertLatestData() {\n String[] names = new String[feedbacks.size()];\n String[] ratings = new String[feedbacks.size()];\n String[] reviews = new String[feedbacks.size()];\n for (int i = 0; i < feedbacks.size(); i++) {\n names[i] = \"Name: \" + feedbacks.get(i).getName();\n ratings[i] = \"Rating: \" + feedbacks.get(i).getRatingBar();\n reviews[i] = \"Review: \" + feedbacks.get(i).getReview();\n }\n feedbackListAdapter = new FeedbackListAdapter(ViewPsmFeedbackActivity.this, names, ratings, reviews);\n listFeedback.setAdapter(feedbackListAdapter);\n }", "private void addNewFoodItemRefresh() {\n // create a foodItem instance with input information\n FoodItem foodItem = new FoodItem(id.getText(), name.getText());\n foodItem.addNutrient(\"calories\", Double.valueOf(calories.getText()));\n foodItem.addNutrient(\"fat\", Double.valueOf(fat.getText()));\n foodItem.addNutrient(\"carbohydrate\", Double.valueOf(carbohydrate.getText()));\n foodItem.addNutrient(\"fiber\", Double.valueOf(fiber.getText()));\n foodItem.addNutrient(\"protein\", Double.valueOf(protein.getText()));\n this.foodData.addFoodItem(foodItem);// add it to the food data to store\n this.close();// close the addfooditem stage\n this.foodList.refreshAfterAdd(foodItem);// refresh the foodList\n\n }", "@Override\n public void onItemAdded(Object toAdd) {\n if(toAdd instanceof SpotifyItem)\n return;\n\n //Reflect changes in the drink list\n DrinkInfo item = (DrinkInfo)toAdd;\n Log.d(TAG, \"Array size = \" + mDrinkInfos.size());\n mDrinkInfos.add(mDrinkInfos.size(), item);\n mDrinkQueueAdapter.notifyDataSetChanged();\n Log.d(TAG, \"Added song: \" + item.getDrinkName());\n }", "public void addLast(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public void addAsPerSearch(List<Job> searchedJob) {\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(searchedJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }", "void notifyListItemInserted(int position);", "@Override\n public void onLoadMore() {\n if (searchbeanArrayList_new.size() != 0) {\n\n\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // remove progress item\n\n\n //add items one by one\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }\n }, 2000);\n\n }\n\n }", "void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}", "@Override\n public void refreshList() {\n }", "public void addData(@NonNull Collection<? extends T> newData) {\n mData.addAll(newData);\n notifyItemRangeInserted(mData.size() - newData.size() + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "@Override\n public void onMoreLoadding() {\n\n }", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onLoadMoreFinished(final LoadMoreFinishedEvent event) {\n if (!event.getSessionId().equals(MyApplication.getInstance().getSessionId())) {\n return;\n }\n EventBus.getDefault().removeStickyEvent(LoadMoreFinishedEvent.class);\n\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n if (event.isSuccessful()) {\n //Add on bottom but before the loading item\n for (StockChange stock : event.getStockList()) {\n mListManipulator.addItemToPosition(mListManipulator.getCount() - 1, stock);\n }\n // Remove loading item if it exists\n mListManipulator.removeLoadingItem();\n }\n mLoadingMore = false;\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n if (mEventListener != null) {\n mEventListener.onLoadMoreFinished(event);\n }\n }\n }.execute();\n }", "void loadNewData(List<Todo> newTodo) {\n mTodoList = newTodo;\n notifyDataSetChanged();\n }", "private void append_request(DataSnapshot dataSnapshot) {\n Iterator i = dataSnapshot.getChildren().iterator();\n //Go over all the requests\n while (i.hasNext()){\n\n //Add a new request iten to the list\n String message = (String) ((DataSnapshot)i.next()).getValue();\n String email = (String) ((DataSnapshot)i.next()).getValue();\n String newMessage= message ;\n //\" asked to join the group\"\n requestList.add(new requestItem(newMessage,email,activity_name));\n }\n request_item_adapter adapter = new request_item_adapter(this, R.layout.activity_request_item, requestList);\n //attaching adapter to the listview\n listView.setAdapter(adapter);\n }", "void append(int new_data)\n {\n /* 1. allocate node\n * 2. put in the data */\n Node new_node = new Node(new_data);\n\n Node last = head;/* used in step 5*/\n\n /* 3. This new node is going to be the last node, so\n * make next of it as NULL*/\n new_node.setNext(null);\n\n /* 4. If the Linked List is empty, then make the new\n * node as head */\n if(head == null)\n {\n new_node.setPrev(null);\n head = new_node;\n return;\n }\n\n /* 5. Else traverse till the last node */\n while(last.getNext() != null)\n last = last.getNext();\n\n /* 6. Change the next of last node */\n last.setNext(new_node);\n\n /* 7. Make last node as previous of new node */\n new_node.setPrev(last);\n }", "@Override\n\t\tpublic void onLoadMore() {\n\t\t\tdaoIndex++;\n\t\t\tgetData();\n\t\t\tadapter.notifyDataSetChanged();\n\t\t\tonLoad();\n\t\t}", "void append(int new_data) {\n\t\tNode new_node = new Node(new_data);\n\t\tNode last = head;\n\t\tnew_node.next = null;\n\t\tif (head == null) {\n\t\t\tnew_node.prev = null;\n\t\t\thead = new_node;\n\t\t\treturn;\n\t\t}\n\t\twhile (last.next != null)\n\t\t\tlast = last.next;\n\t\tlast.next = new_node;\n\t\tnew_node.prev = last;\n\t}", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "void addAll(List<News> data) {\n\t\t// Traverse the data list to add news item to the adapter's data set\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\t// Get the book at current index\n\t\t\tNews newsStory = data.get(i);\n\t\t\t// Add the book to the data set\n\t\t\tmNewsList.add(newsStory);\n\n\t\t\t// Notify the adapter of the change in the data set\n\t\t\t// so that it repopulates the view with the updated data set\n\t\t\tnotifyDataSetChanged();\n\t\t}\n\t}", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }", "public static void push(Object data) {\n list.add(data);\n }", "public static void addList() {\n\t}", "private void addToChatList(Chat[] newChats){\n if ( newChats == null || newChats.length == 0 ) {\n return;\n }\n if ( chatList.size() == 0 ) { // no chat history loaded yet\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n headIndex = newChats[0].id; // update the tail index\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else if ( newChats[newChats.length-1].id < chatList.get(0).id ) { // new.tail is prior to current.head\n // prepend the new chats to the head of the current chat\n int selection = lv_chat.getFirstVisiblePosition();\n selection += newChats.length;\n for ( int i = newChats.length-1; i >= 0; i-- ) {\n chatList.push(newChats[i]);\n }\n lv_chat.setSelection(selection);\n adapter.notifyDataSetChanged();\n Log.d(TAG,\"select:\"+selection);\n headIndex = newChats[0].id; // update the headIndex\n } else if ( newChats[0].id > chatList.get(chatList.size()-1).id ) { // new.head is after current.tail\n // append the new chats to the tail of the current chat\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else {\n Log.e(TAG,\"Loaded duplicated chat!\");\n }\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tlistitem.clear();\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetmessage_list(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txListView.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txListView.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txListView.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "private void Writehistory (List list, savekq savehistory){\n if (kiemtrasopt(list) < 10) {\n list.add(0, savehistory);\n } else {\n list.remove(9);\n list.add(0, savehistory);\n }\n }", "public void updateList() {\n\t\tthis.myList.clear();\n\t\tIterator<String> item = this.myHashMap.keySet().iterator();\n\n\t\twhile (item.hasNext())\n\t\t{\n\t\t\tString name = (String)item.next();\n\t\t\tthis.myList.add(name);\n\t\t}\n\t\tthis.nameId = -1;\n\t\t\n\t}", "public void onSetNewCurrentItem() {\n }", "private void addItemToList(String item) {\n itemList.add(item);\n\n // ListView aktualisieren\n adapter.notifyDataSetChanged();\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}", "public synchronized void addItem(ArrayList<Start.Ingredients> obj) {\r\n\t\t// Only add if the table is empty\r\n\t\twhile (!empty && count < 20) {\r\n\t\t\ttry {\r\n\t\t\t\twait();\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (count >= 20) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Set the contents and notifyAll()\r\n\t\tcontents = obj;\r\n\t\tempty = false;\r\n\t\tnotifyAll();\r\n\r\n\t}", "public void setNewData(@Nullable List<T> data) {\n this.mData = data == null ? new ArrayList<T>() : data;\n if (mRequestLoadMoreListener != null) {\n mNextLoadEnable = true;\n mLoadMoreEnable = true;\n mLoading = false;\n mLoadMoreView.setLoadMoreStatus(LoadMoreView.STATUS_DEFAULT);\n }\n mLastPosition = -1;\n notifyDataSetChanged();\n }", "public void addmyPollCommentsData(List<CommentDisplayResponseModel.Results.Data> data) {\n //add data\n myPollCommentsAdapter.addAll(data);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPollCommentsAdapter.notifyDataSetChanged();\n isLoading = false;\n\n }", "private void addItems() {\n while (true) {\n ClothingItem item = readItem();\n if (item == null || item.getId() < 0) {\n break;\n }\n try {\n ctrl.addItem(item);\n } catch (ValidatorException e) {\n e.printStackTrace();\n }\n }\n }", "public void populateList() {\n }", "public void doAdd() {\r\n\t\tif (_mode == MODE_LIST_ON_PAGE && _listForm != null) {\r\n\t\t\tDataStoreBuffer listDs = _listForm.getDataStore();\r\n\t\t\tDataStoreBuffer ds = getDataStore();\r\n\t\t\tif (listDs == ds && ds != null) {\r\n\t\t\t\t//same datastore on list and detail\r\n\t\t\t\tif (ds.getRowCount() > 0 && (ds.getRowStatus() == DataStoreBuffer.STATUS_NEW))\r\n\t\t\t\t\treturn;\r\n\r\n if (ds.getRowStatus() == DataStoreBuffer.STATUS_NEW_MODIFIED) ds.deleteRow();\r\n if (isDataModified()) undoChanges();\r\n\r\n\t\t\t\tds.insertRow();\r\n\t\t\t\tif (_listForm.getDataTable() != null) {\r\n\t\t\t\t\tJspDataTable tab = _listForm.getDataTable();\r\n\t\t\t\t\tif (!tab.isRowOnPage(ds.getRowCount() - 1))\r\n\t\t\t\t\t\ttab.setPage(tab.getPage(ds.getRowCount() - 1));\r\n\t\t\t\t}\r\n\t\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\t\tif (comp != null)\r\n\t\t\t\t\tcomp.setFocus();\r\n\t\t\t\tscrollToMe();\r\n\r\n\t\t\t} else if (_ds != null) {\r\n\t\t\t\t//different datastores on list and detail\r\n\t\t\t\tif (listDs != null)\r\n\t\t\t\t\tlistDs.clearSelectedRow();\r\n\t\t\t\t_listSelectedRow = null;\r\n\t\t\t\t_ds.reset();\r\n\t\t\t\t_ds.insertRow();\r\n\t\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\t\tif (comp != null)\r\n\t\t\t\t\tcomp.setFocus();\r\n\t\t\t\tscrollToMe();\r\n\t\t\t}\r\n\t\t\tsetVisible(true);\r\n\t\t} else {\r\n\t\t\t_listSelectedRow = null;\r\n\t\t\t_ds.reset();\r\n\t\t\t_ds.insertRow();\r\n\t\t\tHtmlFormComponent comp = findFirstFormComponent(this);\r\n\t\t\tif (comp != null)\r\n\t\t\t\tcomp.setFocus();\r\n\t\t\tscrollToMe();\r\n\t\t}\r\n\t}", "public void addMyPollData(List<UserPollResponseModel.Results.Data> dataResults) {\n //remove footer viewe\n this.removeFooterView(footer);\n //add data in array list\n myPolladapter.addAll(dataResults);\n //Notifies the attached observers that the underlying\n // data has been changed and any View reflecting the data set should refresh itself.\n myPolladapter.notifyDataSetChanged();\n isLoading = false;\n }", "public void addAll(List<Post> newList) {\n posts.addAll(newList);\n notifyDataSetChanged();\n }", "@Override\n public void run() {\n chatListAdapter.add(response);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }", "public void addData(@IntRange(from = 0) int position, @NonNull Collection<? extends T> newData) {\n mData.addAll(position, newData);\n notifyItemRangeInserted(position + getHeaderLayoutCount(), newData.size());\n compatibilityDataSizeChanged(newData.size());\n }", "public void addData (Object obj)\n {\n\tif (front == null) {\n\t front = new ListItem (obj);\n\t rear = front;\n\t}\n\telse {\n\t rear.next = new ListItem (obj);\n\t rear = rear.next;\n\t}\n\tnumItems++;\n }", "public void append(Object item);", "void append(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (back == null) \n\t\t{\n\t\t\tfront = back = temp; //if the list is empty, then the new node temp becomes the front and back of the list as its the only node within the list\n\t\t\tlength++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tback.next = temp; //the next node after the back node becomes the new node temp since it was inserted into the back of the list\n\t\t\ttemp.prev = back; //the new node temp's previous node becomes the back since temp is now the new back of the list\n\t\t\tback = temp; //the new back of the list now becomes the new node temp\n\t\t\tlength++;\n\t\t}\n\t}", "private static final <T> List<T> append(List<T> list, T newElement) {\n List<T> newList = Lists.newArrayListWithCapacity(list.size() + 1);\n newList.addAll(list);\n newList.add(newElement);\n return newList;\n }", "public void update_list_view() {\n\n Collections.sort(mA.alarms);\n\n // make array adapter to bind arraylist to listview with new custom item layout\n AlarmsAdapter aa = new AlarmsAdapter(mA, R.layout.alarm_entry, mA.alarms);\n alarm_list_view.setAdapter(aa);\n registerForContextMenu(alarm_list_view);\n aa.notifyDataSetChanged(); // to refresh items in the list\n }", "@Override\n public void run() {\n chatListAdapter.add(sendToOthers);\n chatListAdapter.notifyDataSetChanged();\n getListView().setSelection(chatListAdapter.getCount() - 1);\n }", "@Override\n public void insert(E newItem) {\n if (list.size()==0)\n list.add(newItem);\n else\n {\n ListIterator<E> itList = list.listIterator();\n boolean isAdded=false;\n while (itList.hasNext())\n {\n int status=newItem.toString().compareTo(itList.next().toString());\n if(status==0)\n {\n itList.add(newItem);\n isAdded=true;\n }\n else if(status<0)\n {\n if (itList.hasPrevious())\n itList.previous();\n itList.add(newItem);\n isAdded=true;\n break;\n }\n }\n if (!isAdded)\n {\n list.add(newItem);\n }\n }\n\n }", "public void addItem(LayoutElementParcelable e) {\n if (mainFrag.IS_LIST && itemsDigested.size() > 0) {\n itemsDigested.add(itemsDigested.size() - 1, new ListItem(e));\n } else if (mainFrag.IS_LIST) {\n itemsDigested.add(new ListItem(e));\n itemsDigested.add(new ListItem(EMPTY_LAST_ITEM));\n } else {\n itemsDigested.add(new ListItem(e));\n }\n\n notifyItemInserted(getItemCount());\n }", "private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }", "public void addNewItem(DataHolder newRow) {\n this.add(newRow);\n\n // sends request to update ListAdapter\n notifyDataSetChanged();\n }", "public void updateList()\r\n\t{\r\n\t\tclientQueue.offer(name);\r\n\t}", "public void addData(@NonNull T data) {\n mData.add(data);\n notifyItemInserted(mData.size() + getHeaderLayoutCount());\n compatibilityDataSizeChanged(1);\n }", "private void updateListViewLogWindow()\n {\n listViewMessageItems.clear();\n\n for(int i =0;i<= printResult.size() - 1;i++)\n {\n listViewMessageItems.add(printResult.get(i));\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "protected void populateContentListView(ArrayList<UnistorEntry> content){\n\n // If first entry is back button, the content array\n // is sorted without this item, which will be added in the first position\n if(content.get(0).getEntryType() == Constants.ENTRY_TYPE_BACK){\n UnistorEntry backEntry = content.remove(0);\n Collections.sort(content, new UnistorEntryComparator());\n content.add(0, backEntry);\n }else{\n Collections.sort(content, new UnistorEntryComparator());\n }\n\n // Setting the adapter with the new items.\n // If the adapter have been previously created, we use notifyDataSetChanged to refresh,\n // that uses fairly less resources than creating a new one.\n if(this.listView.getAdapter() == null){\n UnistorEntryListAdapter listViewAdapter = new UnistorEntryListAdapter(mContext, content);\n this.listView.setAdapter(listViewAdapter);\n // Set context menu for the listview\n registerForContextMenu(listView);\n\n }else{\n UnistorEntryListAdapter listViewAdapter = (UnistorEntryListAdapter)this.listView.getAdapter();\n listViewAdapter.clear();\n listViewAdapter.addAll(content);\n listViewAdapter.notifyDataSetChanged();\n }\n\n\n }", "public void cbListAddElement() {\n cbWorker.clear();\n cbWorker.add(cbJ);\n cbWorker.add(cbK);\n cbWorker.add(cbM);\n cbWorker.add(cbP);\n cbWorker.add(cbA);\n cbWorker.add(cbS);\n }", "void add(Iterable<S3TimeData> newData) {\n assert newData != null;\n\n synchronized (mux) {\n for (S3TimeData data : newData)\n map.put(data.getKey(), data);\n\n mux.notifyAll();\n }\n }", "private void refreshList () {\n List<DisplayedUserCommand> list = new ArrayList<DisplayedUserCommand>();\n for (DisplayedUserCommand command : myUserDefinedCommandsList) {\n list.add(command);\n }\n myUserDefinedCommandsList.clear();\n myUserDefinedCommandsList.addAll(list);\n }", "public void refresh(List<DataFeed> newData) {\n clear();\n addAll(newData);\n notifyDataSetChanged();\n }", "private void additems() {\n MaVolleyRequest.getInstance(getApplicationContext()).GetMethodRequest(getLink(), null, new VolleyRequestOnResultListener() {\n @Override\n public void onSucces(String result) {\n Log.d(\"qwerty\", getLink());\n ResearchResultBeanz item = (new Gson()).fromJson((new Gson()).fromJson(result, JsonObject.class).getAsJsonObject(\"data\"), ResearchResultBeanz.class);\n if (adapter == null) {\n adapter = new GridViewAdapter2(ImageGridViewActivity.this, Utils.fromArrayToList(item.items));\n gridView.setAdapter(adapter);\n } else {\n adapter.appendData (Utils.fromArrayToList(item.items));\n }\n flag_loading = false;\n }\n @Override\n public void onFailure(String error) {\n makeToast(\"Loading failure\");\n flag_loading = false;\n }\n });\n }", "private void updataUserfouce() {\n\t\tcDynamicAdapter.notifyDataSetChanged();\n\t}", "private void addFinanceItem(FinanceUnitData unitData, boolean update) {\n Calendar today = Calendar.getInstance();\n\n FinanceDailyData lastDateData = this.financeDataList.size() > 0 ? this.financeDataList.get(0) : null;\n if (lastDateData != null\n && today.get(Calendar.YEAR) == lastDateData.getDate().get(Calendar.YEAR)\n && today.get(Calendar.MONTH) == lastDateData.getDate().get(Calendar.MONTH)\n && today.get(Calendar.DAY_OF_MONTH) == lastDateData.getDate().get(Calendar.DAY_OF_MONTH)) {\n\n //Last day is today.\n lastDateData.getDataList().add(unitData);\n } else {\n FinanceDailyData todayData = new FinanceDailyData();\n todayData.setDate(today);\n todayData.getDataList().add(unitData);\n financeDataList.add(todayData);\n }\n\n // Refresh UI.\n if(update){\n updateFinanceList();\n }\n }", "public void append(int new_data) \r\n\t\t{ \r\n\t\t Node new_node = new Node(new_data); \r\n\t\t \r\n\t\t if (head == null) \r\n\t\t { \r\n\t\t head = new Node(new_data); \r\n\t\t return; \r\n\t\t } \r\n\t\t \r\n\t\t new_node.next = null; \r\n\t\t \r\n\t\t Node last = head; \r\n\t\t while (last.next != null) \r\n\t\t last = last.next; \r\n\t\t \r\n\t\t last.next = new_node; \r\n\t\t return; \r\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void addItemEventOccurred(AddItemEvent event) {\n\r\n\t\t\t\t\t}", "public void updateCardList(List<Entry> activityFeed) {\n\n List<Entry> newEntrytoAddList = new ArrayList<>();\n List<Entry> entriesToRemove = new ArrayList<>();\n\n //check if it is first run or refreshing list\n\n\n if (messagesHistory != null) {\n //remove deleted projects\n for (Entry entry : messagesHistory) {\n boolean stillExist = false;\n for (Entry entryFeed : activityFeed) {\n\n if (Objects.equals(entryFeed.getUpdated(), entry.getUpdated())) {\n stillExist = true;\n }\n }\n if (!stillExist) {\n entriesToRemove.add(entry);\n }\n }\n\n //add only new project\n for (Entry newEntry : activityFeed) {\n boolean duplicate = false;\n for (Entry currentEntry : messagesHistory) {\n if (Objects.equals(currentEntry.getUpdated(), newEntry.getUpdated())) {\n duplicate = true;\n }\n }\n if (!duplicate) {\n newEntrytoAddList.add(newEntry);\n }\n }\n\n\n //delete entries\n for (Entry toDelete : entriesToRemove) {\n cardView.remove(toDelete);\n }\n //add new entries\n for (Entry item : newEntrytoAddList) {\n cardView.add(0, item);\n new Handler().postDelayed(() -> {\n cardView.notifyInserted(0);\n rv.scrollToPosition(0);\n }, 500);\n\n }\n\n\n }\n boolean toNotify = false;\n if (cardView.getItemCount() == 0) {\n\n toNotify = true;\n messages.addAll(activityFeed);\n }\n\n //save cards history for later comparing if old entry were deleted or new were added\n messagesHistory = new ArrayList<>(messages);\n Handler handler = new Handler();\n boolean finalToNotify = toNotify;\n handler.postDelayed(() -> {\n if (finalToNotify) {\n cardView.notifyDataSetChanged();\n }\n AnimationUtil.stopRefreshAnimation(swipeRefreshLayout);\n }, 1000);\n }", "private void prepareData() {\n eventList = databaseHandler.getLatestDistinctEvents(prefs.getString(KEY_SORT_FIELD, \"name\"),\n prefs.getBoolean(KEY_SORT_ORDER_ASCENDING, true));\n\n // Send list to adapter\n eventLogAdapter.updateData(eventList);\n }", "public void updateList() \n { \n model.clear();\n for(int i = ScholarshipTask.repository.data.size() - 1; i >= 0; i--) \n {\n model.addElement(ScholarshipTask.repository.data.get(i));\n }\n }", "@Override\n public void onListDataLoaded() {\n if (this.progressBar != null && !this.isListLoaded) {\n this.progressBar.setVisibility(View.GONE);\n }\n if (!this.isListLoaded) {\n addListHeader();\n this.isListLoaded = true;\n }\n }", "private void updateUi (){\n //get the first list item postion\n int currentPosition =listView.getFirstVisiblePosition();\n //append the new recipes to listview\n RecipeAdapter adapter = new RecipeAdapter(this , recipesList);\n listView.setAdapter(adapter);\n // Setting new scroll position to continue\n listView.setSelectionFromTop(currentPosition + 1, 0);\n }", "public void appendData(T data){\n Node<T> newEnd = new Node<>(data); // new Node referenced by newEnd\n Node<T> thisNode = this; // grab this Node\n\n // traverse list and append to the tail\n while (thisNode.next != null){\n thisNode = thisNode.next;\n }\n thisNode.next = newEnd;\n }", "public void add_to_my_list_process(View v) {\n\n addToCart_flag = false;\n // get current login value saved in sharedpreferences object\n SharedPreferences loginSharedPref = getSharedPreferences(\"LoginData\", MODE_PRIVATE);\n // get current agent id\n final String AgentID = loginSharedPref.getString(\"ID\", \"\");\n // create string\n create_final_string_product();\n /* get all list names into arraylist object */\n ArrayList<String> listNames = get_list_data_from_local_DB(AgentID);\n // display alert box to choose list name by user\n display_list_names(listNames, AgentID);\n // clear all data after adding product into cart\n clear_data();\n }", "private void updateUserList() {\n\t\tUser u = jdbc.get_user(lastClickedUser);\n\t\tString s = String.format(\"%s, %s [%s]\", u.get_lastname(), u.get_firstname(), u.get_username());\n\t\tuserList.setElementAt(s, lastClickedIndex);\n\t}", "public void add(){\n list.add(smart);\n list.add(mega);\n list.add(smartMini);\n list.add(absolute);\n\n clientsList.add(client1);\n clientsList.add(client2);\n clientsList.add(client3);\n clientsList.add(client4);\n clientsList.add(client5);\n }", "void addData();", "private void grow() {\r\n\t\t\r\n\t\t Student [] newList = new Student[sizeOfList(list) + 4];\r\n\t int size = sizeOfList(list);\r\n\t \r\n\t for(int i = 0; i < size; i++) {\r\n\t \t newList[i] = list[i];\r\n\t }\r\n\t list = newList;\r\n\t}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n GenericTypeIndicator<ArrayList<String>> t = new GenericTypeIndicator<ArrayList<String>>() {};\n values = dataSnapshot.getValue(t);\n if (values != null) {\n for (int i = 0; i < values.size() ;i++){\n listAdapter.add(values.get(i));\n mainListView.setSelection(listAdapter.getCount() - 1);\n }\n } Log.d(\"guyTag\", values.toString());\n }", "private void updateList() {\r\n\t\tlistaStaff.setItems(FXCollections.observableArrayList(service\r\n\t\t\t\t.getStaff()));\r\n\t}", "public void addNewList(GroceryList list) {\n String key = listsRef.push().getKey();\n Map<String, Object> postValues = list.toMap();\n\n // TODO: lastUpdated\n\n // Set the values\n listsRef.child(key).setValue(postValues);\n }", "@Override\n public void onSuccess(List<BlocksByHeightQuery.Datum> list) {\n List<com.arcblock.btcblockviewer.BlocksByHeightQuery.Datum> oldList = new ArrayList<>();\n oldList.addAll(mBlocks);\n\n // set mBlocks with new data\n mBlocks = list;\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(new CoreKitDiffUtil<>(oldList, mBlocks), true);\n // need this line , otherwise the update will have no effect\n mListBlocksAdapter.setNewListData(mBlocks);\n result.dispatchUpdatesTo(mListBlocksAdapter);\n\n refreshNextAndPre();\n\n //2. view status change and loadMore component need\n if (mPagedQueryHelper.isHasMore()) {\n mListBlocksAdapter.setEnableLoadMore(true);\n mListBlocksAdapter.loadMoreComplete();\n } else {\n mListBlocksAdapter.loadMoreEnd();\n }\n }", "public void addLast(T listItem) {\n add(listItem);\n }", "private synchronized void addNewWatchList()\r\n {\r\n\r\n // Create a NEW header Vector\r\n Vector headers = new Vector();\r\n headers.removeAllElements();\r\n for (int i = 0; i < StockData.columns.length; i++)\r\n {\r\n headers.addElement(StockData.columns[i]);\r\n }\r\n\r\n // Now get the Count of the Lists already available\r\n int watchListCount = tabPane.getTabCount();\r\n // Create a new DATA Vector and add at least one item to it\r\n Vector data = new Vector();\r\n data.removeAllElements();\r\n\r\n data.addElement(new StockData());\r\n\r\n // Create our table Model with the headers and data\r\n StockDataTableModel tableModel = new StockDataTableModel(headers, data);\r\n\r\n // Create a new Table with the tablemodel\r\n JTable table = new HGTable(tableModel);\r\n\r\n // This method will add a timer ( via the index ) the table and tableModel\r\n // the appropriate vector containers.\r\n addDataToVectorContainers(table, tableModel, watchListCount);\r\n // This Method will add the Popup menu to the this table\r\n addPopupMenuToTable(table);\r\n // Create a new JSCrollPane with the the Table\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.getViewport().add(table);\r\n JPanel panel = new JPanel(new BorderLayout());\r\n\r\n // Create a new Vertical Panel to place our menu and JScrollPane Table\r\n JPanel lblPanel = createVerticalPanel(true);\r\n\r\n lblPanel.add(createDropDownMenu());\r\n panel.add(lblPanel, BorderLayout.NORTH);\r\n panel.add(scrollPane, BorderLayout.CENTER);\r\n\r\n // Build a defailt label for the TabPane\r\n String watchListName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + watchListCount;\r\n\r\n tabPane.addTab(watchListName, null, panel, new String(\"Click here to view \" + watchListName));\r\n\r\n watchListCount = tabPane.getTabCount();\r\n // Set the WatchList title via Properties\r\n // Set the WatchList count Property\r\n appProps.setProperty(watchListName, watchListName);\r\n appProps.setProperty(getString(\"WatchListTableModule.application_watchlist_count_key_title\"), \"\" + watchListCount);\r\n\r\n //// Request Focus on our tab pane\r\n //tabPane.requestFocus();\r\n // Set our selected index to the new Tab\r\n int index = tabPane.getTabCount() - 1;\r\n setNewTitle(index);\r\n\r\n tabPane.setSelectedIndex(0);\r\n tabPane.repaint();\r\n\r\n }", "private List<itemInfo> getNewEntries() {\n\n final List<itemInfo> entries = new ArrayList<itemInfo>();\n return entries;\n }", "@Override\n \tpublic void intervalAdded(ListDataEvent e) {\n \t\t\n \t}", "public void onAddItem(View view) {\n EditText editText = (EditText) findViewById(R.id.editText);\n // get the contents and cast from an Object to a String\n String text = editText.getText().toString();\n mNameMatch = false;\n\n // add the text to our adapter if text isn't blank\n if (text.trim().length() > 0) {\n for (int i = 0; i < mCurrentList.size(); i++) {\n if (text.equals(mCurrentList.get(i).text)) {\n Toast toast = Toast.makeText(NewListActivity.this, \"That option was already inserted previously\", Toast.LENGTH_SHORT);\n toast.setGravity(Gravity.CENTER, 0, 0);\n toast.show();\n mNameMatch = true;\n }\n }\n if (mNameMatch == false) {\n ListItem item = new ListItem(text, mListID, false);\n mAdapter.add(item, mAdapter.getItemCount());\n mCurrentList = mAdapter.getCurrentListItems(mListID, \"\");\n }\n\n } else {\n editText.setError(\"Nothing added because no text was inserted\");\n }\n\n // clear EditText so user won’t add it twice\n editText.setText(\"\");\n }", "@Override\n // once adding an entry\n public void onDataChange(DataSnapshot dataSnapshot) {\n Set<String> chatRoomsSet = new HashSet<String>();\n Iterator i = dataSnapshot.getChildren().iterator();\n\n // go through the whole database and add the new\n while (i.hasNext()){\n chatRoomsSet.add(((DataSnapshot)i.next()).getKey());\n }\n // clear the old list and add the new ones\n chatRoomsList.clear();\n chatRoomsList.addAll(chatRoomsSet);\n arrayAdapter.notifyDataSetChanged();\n }", "@Override\n public void add(Fish object) {\n list.add(object);//adds the Fish to the list\n Log.d(\"Adapter\",\"added\");\n }", "public void offer(int num){\n if(tail == fixedSize - 1) {\n List<Object> newList = new ArrayList<>();\n newList.add(num);\n //save next new list at tail\n tailList.add(newList);\n tailList = (List<Object>) tailList.get(tail);\n tail = 0;\n }else{ //not in last index,then directly add it;\n tailList.add(num);\n }\n count++;\n tail++;\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tif (listitem != null || listitem.size() > 0) {\n\t\t\t\t\tlistitem.clear();\n\t\t\t\t}\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txlistview.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txlistview.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txlistview.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "static void addItems(int needed) {\r\n List<ConnectionReqs> reqsList = new ArrayList<>();\r\n reqsList.add(AuctionServer.reqs);\r\n Socket dBSocket = null;\r\n while(needed > 0) {\r\n Item item = null;\r\n Random random = new Random();\r\n int randInt = random.nextInt(200);\r\n DBMessage dBMessage = null;\r\n try {\r\n dBSocket = new Socket(\"localHost\", 6002);\r\n dBOut = new ObjectOutputStream(dBSocket.getOutputStream());\r\n dBOut.flush();\r\n dBIn = new ObjectInputStream(dBSocket.getInputStream());\r\n dBMessage = new DBMessage.Builder()\r\n .command(DBMessage.Command.GET)\r\n .table(DBMessage.Table.ITEM)\r\n .accountId(randInt)\r\n .build();\r\n dBOut.writeObject(dBMessage);\r\n System.out.println(\"listening...\");\r\n DBMessage response = (DBMessage) dBIn.readObject();\r\n item = (Item) response.getPayload();\r\n System.out.println(item.toString());\r\n } catch (IOException | ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n if(!auctionHistory.contains(item)) {\r\n System.out.println(dBMessage.toString());\r\n auctionList.add(item);\r\n auctionHistory.add(item);\r\n needed--;\r\n }\r\n }\r\n }" ]
[ "0.68505", "0.67379105", "0.6576448", "0.64311814", "0.64057314", "0.63982946", "0.6386796", "0.63458884", "0.63386583", "0.63163674", "0.62840456", "0.6283957", "0.62335134", "0.62313133", "0.6194525", "0.6179969", "0.6171727", "0.61328447", "0.6077409", "0.60730094", "0.6071948", "0.6063674", "0.6056701", "0.60486484", "0.60244334", "0.5995539", "0.59900326", "0.5987027", "0.5984055", "0.59713674", "0.5962479", "0.5960138", "0.5959286", "0.5939941", "0.5929947", "0.5924557", "0.5913762", "0.5903071", "0.58923006", "0.5888823", "0.5880461", "0.58794934", "0.58771133", "0.5876776", "0.587461", "0.587379", "0.5871734", "0.5855677", "0.5855071", "0.5853677", "0.584448", "0.58323354", "0.5831266", "0.5822858", "0.581824", "0.58167773", "0.5808203", "0.5805854", "0.58032733", "0.58002746", "0.578978", "0.57888645", "0.5782705", "0.578063", "0.5779388", "0.57720983", "0.5767539", "0.5761035", "0.5755171", "0.57535446", "0.57512635", "0.5749851", "0.5747553", "0.57435435", "0.5738284", "0.5723631", "0.57210624", "0.5712816", "0.5709156", "0.57079345", "0.5703201", "0.5702906", "0.56887823", "0.5688275", "0.56846863", "0.56818277", "0.5679555", "0.5678822", "0.56719464", "0.5669279", "0.56677306", "0.5662113", "0.566188", "0.56617975", "0.56608987", "0.56581", "0.5645037", "0.5642652", "0.564167", "0.5639854", "0.5637486" ]
0.0
-1
Log.d("Twitter Client", response.toString()); iterate through the JSON response
@Override public void onSuccess(int statusCode, Header[] headers, JSONArray response) { for (int i = 0; i < response.length(); i++){ //get json object in the position index //create a tweet object with json object //add the tweet object to the arraylist of tweets //notify changes to adapter Tweet tweet = null; try { tweet = Tweet.fromJson(response.getJSONObject(i)); tweets.add(tweet); adapter.notifyItemInserted(tweets.size() - 1); } catch (JSONException e) { e.printStackTrace(); } if (tweet.uid < maxId){ maxId = tweet.uid; Log.d("MaxId", String.valueOf(maxId)); } swipeContainer.setRefreshing(false); pbNetwork.setVisibility(View.INVISIBLE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getTweets(long lastUid) {\n client.getMentionsTimeline(lastUid, new JsonHttpResponseHandler() {\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"DEBUG\", response.toString());\n addAll(Tweet.fromJsonArray(response));\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n });\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n System.out.println(response.get(i));\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "private ArrayList<TweetData> getTweets(JSONObject json, QueryTargetInfo info) {\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n\n JSONArray jsonArray = json.optJSONArray(\"statuses\");\n\n\n if (jsonArray == null) {\n return tweets;\n }\n\n for (int i = 0; i < jsonArray.length(); i++) {\n try {\n TweetData tweet = new TweetData();\n JSONObject tweetJson = jsonArray.getJSONObject(i);\n\n SimpleDateFormat df = new SimpleDateFormat(TIME_FORMAT);\n\n tweet.twitterId = tweetJson.getString(\"id_str\");\n tweet.published = (int)(df.parse(tweetJson.getString(\"created_at\")).getTime() / 1000);\n tweet.content = tweetJson.getString(\"text\");\n tweet.source = tweetJson.optString(\"source\", \"<No Source>\");\n tweet.lang = tweetJson.optString(\"lang\", \"en\");\n\n tweet.author = \"Jon Doe\";\n JSONObject user = tweetJson.optJSONObject(\"user\");\n if (user != null) {\n tweet.author = user.optString(\"screen_name\", \"Jon Doe\");\n }\n\n tweet.place = tweetJson.optString(\"place\", \"\");\n tweet.geo = tweetJson.optString(\"geo\", \"\");\n\n // Keep track of the smallest id.\n if (info.smallestId == null ||\n Long.valueOf(tweet.twitterId) < Long.valueOf(info.smallestId)) {\n info.smallestId = tweet.twitterId;\n }\n\n // Keep track of the last seen (max) id.\n if (info.lastSeenId == null ||\n Long.valueOf(tweet.twitterId) > Long.valueOf(info.lastSeenId)) {\n info.lastSeenId = tweet.twitterId;\n }\n\n tweets.add(tweet);\n } catch (Exception ex) {\n Logger.logError(\"Unable to parse tweet.\", ex);\n }\n }\n\n return tweets;\n }", "@Override\n public void onResponse(JSONArray response) {\n for(int i = 0; i<response.length();i++){\n try{\n JSONObject jsonObject = response.getJSONObject(i);\n String quote = jsonObject.getString(\"q\");\n String person = jsonObject.getString(\"a\");\n inspiration.setText(quote+\" -\"+person);\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n }", "public static List<Tweets> readTweetsFromWeb(String url) throws Exception\r\n {\r\n // String USER_AGENT = \"Mozilla/5.0\";\r\n List<Tweets> tweetList = new ArrayList<>();\r\n /* ObjectMapper mapper = new ObjectMapper();\r\n URL obj = new URL(url);\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n StringBuffer response = new StringBuffer();\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n*/ StringBuffer response = new StringBuffer();\r\n ObjectMapper mapper = new ObjectMapper();\r\n try {\r\n String USER_AGENT = \"Mozilla/5.0\";\r\n\r\n URL obj = new URL(\"https://api.darksky.net/forecast/91064979649945a5465006904adb8770/30.2672,-97.7431\");\r\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\r\n\r\n // optional default is GET\r\n con.setRequestMethod(\"GET\"); //establishing connection\r\n\r\n //add request header\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n\r\n int responseCode = con.getResponseCode();\r\n\r\n BufferedReader in = new BufferedReader(\r\n new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n\r\n\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n String after = response.toString();\r\n int x=0;\r\n // JSONObject json = new JSONObject(after);\r\n // return json;\r\n\r\n }catch (MalformedURLException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (JSONException e){\r\n e.printStackTrace();\r\n }\r\n return null;\r\n\r\n /* try {\r\n\r\n\r\n Tweets[] tweets = mapper.readValue(response.toString(), Tweets[].class);\r\n\r\n for(int i = 0; i<tweets.length; i++) {\r\n\r\n if(!((tweets[i].getId() > 0) && (tweets[i].getId() < Math.pow(2, 32)))) //making sure id in range\r\n {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getName() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkName(tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n Date date = null;\r\n try {\r\n if(tweets[i].getDate() == null)\r\n {\r\n continue;\r\n }\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss'Z'\"); //making date format\r\n date = sdf.parse(tweets[i].getDate()); //parsing into format\r\n if (!tweets[i].getDate().equals(sdf.format(date))) {\r\n date = null;\r\n }\r\n } catch (ParseException e) {\r\n e.printStackTrace();\r\n }\r\n if (date == null) {\r\n continue;\r\n }\r\n\r\n if(tweets[i].getText() == null)\r\n {\r\n continue;\r\n }\r\n\r\n if(checkLength(tweets[i].getText().length(), tweets[i].getName(), i)){\r\n continue;\r\n }\r\n\r\n // tweetList.add(tweets[i]);\r\n }\r\n\r\n\r\n\r\n\r\n }catch (UnrecognizedPropertyException e) {\r\n e.printStackTrace();\r\n } catch (JsonMappingException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return tweetList;\r\n */\r\n }", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\n public void onResponse(JSONArray response) {\n Log.i(TAG, \"Response => \" + response.toString());\n // Log.i(TAG, \"Response => \" + response.);\n // response.get\n\n }", "private void getSocialMediaPost() {\n Call<List<SocialMediaPost>> call = api_interface.getSocialMediaPost();\n\n //runs on a separate thread\n call.enqueue(new Callback<List<SocialMediaPost>>() {\n @Override\n public void onResponse(Call<List<SocialMediaPost>> call, Response<List<SocialMediaPost>> response) {\n if (!response.isSuccessful()){\n textView.setText(\"code: \"+ response.code());\n return;\n }\n\n List<SocialMediaPost> socialMediaPosts = response.body();\n StringBuilder stringBuilder = new StringBuilder();\n\n if (socialMediaPosts != null) {\n for (SocialMediaPost socialMediaPost : socialMediaPosts) {\n stringBuilder.append(socialMediaPost).append(\"/\");\n }\n }\n\n textView.setText(stringBuilder);\n\n }\n\n @Override\n public void onFailure(Call<List<SocialMediaPost>> call, Throwable t) {\n //Something went wrong with communication with the server\n //json object doesnt fit into what we are trying to pass it into\n textView.setText(t.getMessage());\n }\n });\n }", "@Override\n public void onResponse(String response) {\n Log.i(Constant.TAG_MAIN, \"Get JSON respone: \" + response);\n\n }", "public static void main(String[] args) throws ParseException {\n\t\tSystem.out.println(\"Hello World\");\n\n\t\tTwitterUser twitter_user = new TwitterUser();\n\t\t/*------------------------Question 1 -----------------------*/\n\n\t\tString url1 = \"https://api.twitter.com/1.1/account/verify_credentials.json\";\n\t\tString reponse1 = twitter_user.getResponse(url1);\n\n\t\tJSONParser parser1 = new JSONParser();\n\t\tObject objetNormal1 = parser1.parse(reponse1);\n\n\t\tJSONObject jsonObject1 = (JSONObject) objetNormal1;\n\n\t\tSystem.out\n\t\t\t\t.println(\"****************Question 1************************\");\n\t\tSystem.out.println(jsonObject1.get(\"id_str\"));\n\t\tSystem.out.println(jsonObject1.get(\"name\"));\n\t\tSystem.out.println(jsonObject1.get(\"screen_name\"));\n\t\tSystem.out.println(jsonObject1.get(\"followers_count\"));\n\t\tSystem.out.println(jsonObject1.get(\"friends_count\"));\n\t\tSystem.out.println(jsonObject1.get(\"created_at\"));\n\t\tSystem.out.println(jsonObject1.get(\"time_zone\"));\n\t\tSystem.out\n\t\t\t\t.println(\"**************************************************\");\n\n\t\t/*------------------------Question 2 -----------------------*/\n\n\t\tString url2 = \"https://api.twitter.com/1.1/followers/list.json\";\n\t\tString reponse2 = twitter_user.getResponse(url2);\n\n\t\tJSONParser parser2 = new JSONParser();\n\t\tObject objetNormal2 = parser2.parse(reponse2);\n\n\t\tJSONObject jsonObject2 = (JSONObject) objetNormal2;\n\t\tJSONArray array2 = (JSONArray) jsonObject2.get(\"users\");\n\n\t\tSystem.out\n\t\t\t\t.println(\"****************Question 2************************\");\n\t\tfor (int i = 0; i < array2.size(); i++) {\n\t\t\tJSONObject arrayObject = (JSONObject) array2.get(i);\n\t\t\tSystem.out.println(array2.size());\n\t\t\tSystem.out.println(\"=====>follower \" + i);\n\t\t\tSystem.out.println(arrayObject.get(\"name\"));\n\t\t\tSystem.out.println(arrayObject.get(\"screen_name\"));\n\t\t\tSystem.out.println(arrayObject.get(\"followers_count\"));\n\t\t\tSystem.out.println(arrayObject.get(\"friends_count\"));\n\t\t\tSystem.out.println(arrayObject.get(\"created_at\"));\n\t\t\tSystem.out.println(arrayObject.get(\"time_zone\"));\n\t\t}\n\t\tSystem.out\n\t\t\t\t.println(\"**************************************************\");\n\n\t\t/*------------------------Question 3 -----------------------*/\n\n\t\tString url3 = \"https://api.twitter.com/1.1/friends/list.json\";\n\t\tString reponse3 = twitter_user.getResponse(url3);\n\n\t\tJSONParser parser3 = new JSONParser();\n\t\tObject objetNormal3 = parser3.parse(reponse3);\n\n\t\tJSONObject jsonObject3 = (JSONObject) objetNormal3;\n\t\tJSONArray array3 = (JSONArray) jsonObject3.get(\"users\");\n\n\t\tint followersnumber = 0;\n\n\t\tDouble average;\n\n\t\t// System.out.println(\"liste friends \"+array3.size());\n\n\t\tfor (int i = 0; i < array3.size(); i++) {\n\n\t\t\tJSONObject arrayObjectlist = (JSONObject) array3.get(i);\n\t\t\tfollowersnumber = followersnumber\n\t\t\t\t\t+ Integer.parseInt(arrayObjectlist.get(\"followers_count\")\n\t\t\t\t\t\t\t.toString());\n\n\t\t}\n\t\taverage = (double) (followersnumber / array3.size());\n\t\tSystem.out\n\t\t\t\t.println(\"****************Question 3************************\");\n\t\tSystem.out.println(\"average of followers : \" + average);\n\t\tSystem.out\n\t\t\t\t.println(\"**************************************************\");\n\n\t\t/*------------------------Question 4 -----------------------*/\n\t\tDate d = new Date();\n\t\tString url4 = \"https://api.twitter.com/1.1/statuses/update.json?status=\"\n\t\t\t\t+ URLEncoder.encode(\"HELLO TWITTER \" + d.toString());\n\t\tString reponse4 = twitter_user.postResponse(url4);\n\t\tSystem.out\n\t\t\t\t.println(\"****************Question 4************************\");\n\t\t//The factory instance is re-useable and thread safe.\n\t //Twitter twitter = TwitterFactory.getSingleton();\n\t // Status status = twitter.updateStatus(latestStatus);\n\t //System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\n\t}", "public static void getUserTimeline(String user, Classifier classifier, HttpServletResponse response, int pagenum, int countnum) throws IOException {\n\t\tresponse.setContentType(\"application/json\");\n\t\tPrintWriter out = response.getWriter();\n Twitter twitter = new TwitterFactory().getInstance();\n try {\n List<Status> statuses;\n Paging page = new Paging(pagenum, countnum);\n statuses = twitter.getUserTimeline(user, page);\n String responseObject = \"{\\\"user\\\":\\\"\"+user+\"\\\",\\\"tweets\\\":[\";\n for (Status status : statuses) {\n // System.out.println(\"@\" + status.getUser().getScreenName() + \" - \" + status.getText());\n \t\n if (status.getText().length() >= 50) {\n \tString tweet = status.getText();\n \t\ttry {\n \t\t\ttweet = \"1 personal \"+tweet;\n \t\t\tresponseObject += \"{\\\"\"+status.getId()+\"\\\": {\\\"datetime\\\":\\\"\" + status.getCreatedAt().toString() + \"\\\",\";\n \t\t\tresponseObject += \"\\\"classification\\\":\"+printLabelings(classifier, tweet, out) + \"}},\";\n \t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n \t\t\t\t\n \t\t } else {\n \t\t\t\t// out.print(\"Please enter at least 50 characters for the tweet content.\");\n \t\t \t// TWEET CONTENT NOT LONG ENOUGH\n \t\t\t}\n }\n responseObject = responseObject.substring(0, responseObject.length()-1);\n out.print(responseObject + \"]}\");\n } catch (TwitterException te) {\n te.printStackTrace();\n System.out.println(\"Failed to get timeline: \" + te.getMessage());\n System.exit(-1);\n }\n }", "public List<TwitterDataExtract> GetData();", "@Override\n public void onResponse(JSONObject response){\n Log.i(\"Response\",String.valueOf(response));\n }", "private ArrayList<TweetData> query(QueryTargetInfo info) {\n String url;\n ArrayList<TweetData> tweets = new ArrayList<TweetData>();\n InputStream is = null;\n\n // lastSeenId should have been set earlier.\n // However, if it is still null, just use \"0\".\n if (info.lastSeenId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=0\",\n URL_BASE, info.query, RPP);\n } else if (info.smallestId == null) {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId);\n } else {\n url = String.format(\"%s?q=%s&count=%d&result_type=recent&since_id=%s&max_id=%s\",\n URL_BASE, info.query, RPP, info.lastSeenId, info.smallestId);\n }\n\n try {\n do {\n URL searchURL = new URL(url);\n HttpsURLConnection searchConnection = (HttpsURLConnection)searchURL.openConnection();\n\n searchConnection.setRequestProperty(\"Host\", \"api.twitter.com\");\n searchConnection.setRequestProperty(\"User-Agent\", \"BirdCatcher\");\n searchConnection.setRequestProperty(\"Authorization\", \"Bearer \" + kBearerToken);\n\n is = searchConnection.getInputStream();\n\n JSONTokener jsonTokener = new JSONTokener(is);\n\n JSONObject json = new JSONObject(jsonTokener);\n\n is.close();\n\n url = getNextLink(json, url, info);\n\n tweets.addAll(getTweets(json, info));\n\n Thread.sleep(1000);\n\n is = null;\n } while (url != null);\n } catch (Exception e) {\n Logger.logError(\"Error performing query\", e);\n\n if (is != null) {\n try {\n java.io.BufferedReader in =\n new java.io.BufferedReader(new java.io.InputStreamReader(is));\n\n String response = \"Response from Twitter:\\n\";\n String temp;\n\n while ((temp = in.readLine()) != null) {\n response += (temp + \"\\n\");\n }\n\n Logger.logDebug(response);\n\n response = null;\n temp = null;\n } catch (Exception ex) {\n }\n }\n\n return tweets;\n }\n\n return tweets;\n }", "private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }", "public void retrieveInformation() {\n\n new GetYourJsonTask2().execute(new ApiConnector());\n\n// Retrieve Info from ThingSpeak\n// String lightApi = \"https://api.thingspeak.com/channels/595680/fields/1.json?results=2\";\n// JsonObjectRequest objectRequest =new JsonObjectRequest(Request.Method.GET, lightApi, null,\n// new Response.Listener<JSONObject>() {\n// @Override\n// public void onResponse(JSONObject response) {\n// textView.append(\"lala\");\n// try {\n// JSONArray feeds = response.getJSONArray(\"feeds\");\n// for(int i=0; i<feeds.length();i++){\n// JSONObject jo = feeds.getJSONObject(i);\n// String l=jo.getString(\"field1\");\n// Toast.makeText(getApplicationContext(),l,Toast.LENGTH_SHORT).show();\n// textView.append(l);\n//\n// }\n// } catch (JSONException e) {\n// textView.append(\"error\");\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n//\n// }\n// });\n\n\n\n }", "public JsonHttpResponseHandler getComposeTweetHandler(final Context context, final List<Tweet> tweets, final TweetAdapter adapter, final RecyclerView rvTweets) {\n JsonHttpResponseHandler handler = new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"TwitterClient\", response.toString());\n\n // Get the tweet id from the response.\n try {\n Tweet tweet = Tweet.fromJson(response);\n tweets.add(0, tweet);\n adapter.notifyItemInserted(0);\n rvTweets.scrollToPosition(0);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"TwitterClient\", response.toString());\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"TwitterClient\", responseString);\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n }\n };\n\n return handler;\n }", "private void parseResponse(String response){\r\n System.out.println(\">>> response: \" + response);\r\n JSONObject result = null;\r\n try {\r\n result = new JSONObject(response);\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n if (result == null){\r\n callback.errorResponse(\"Unknown error\");\r\n }else {\r\n try {\r\n if (result.getString(\"result\").equals(FAILED)) {\r\n String error = result.getString(\"error\");\r\n if (error.isEmpty() && result.has(\"exception\")) {\r\n error = result.getString(\"exception\");\r\n }\r\n callback.errorResponse(error);\r\n } else {\r\n JSONArray data = null;\r\n if (result.has(\"data\")) {\r\n data = result.getJSONArray(\"data\");\r\n }\r\n callback.response(data);\r\n }\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "@Override\n public void onResponse(String response) {\n progressBar.setVisibility(View.INVISIBLE);\n\n\n try {\n //getting the whole json object from the response\n JSONObject obj = new JSONObject(response);\n\n //we have the array named tutorial inside the object\n //so here we are getting that json array\n JSONArray tutorialsArray = obj.getJSONArray(\"tutorials\");\n\n //now looping through all the elements of the json array\n for (int i = 0; i < tutorialsArray.length(); i++) {\n //getting the json object of the particular index inside the array\n JSONObject tutorialsObject = tutorialsArray.getJSONObject(i);\n\n //creating a tutorial object and giving them the values from json object\n Tutorial tutorial = new Tutorial(tutorialsObject.getString(\"name\"), tutorialsObject.getString(\"imageurl\"),tutorialsObject.getString(\"description\"));\n\n //adding the tutorial to tutoriallist\n tutorialList.add(tutorial);\n }\n\n //creating custom adapter object\n MyAdapter adapter = new MyAdapter(tutorialList, getApplicationContext());\n\n //adding the adapter to listview\n listView.setAdapter(adapter);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private List<ResponseList<Status>> get_tweet(long id) {\n\t\tList<ResponseList<Status>> tweets = new ArrayList(2);\n\t\ttry {\n\n\t\t\tPaging paging = new Paging(1, 200);\n\t\t\tResponseList<Status> tmp_Statues = twitter.getUserTimeline(id, paging); // get 200 Tweet\n\t\t\ttweets.add(0, tmp_Statues);\n\t\t\tpaging = new Paging(2, 200);\n\t\t\ttmp_Statues = twitter.getUserTimeline(id, paging);// get another 200 Tweet\n\t\t\ttweets.add(1, tmp_Statues);\n\n\t\t\tSystem.out.println(\"insert Tweets...\");\n\t\t\tSystem.out.println(\"path class\");\n\t\t\tSystem.getProperty(\"java.class.path\");\n\n\t\t\tfor (Status s : tweets.get(0))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"tweets.get(1)\");\n\n\t\t\tfor (Status s : tweets.get(1))\n\t\t\t\tdb.insertTweets(s);\n\t\t\tSystem.out.println(\"Update_Creat_At(id);\");\n\n\t\t\tdb.Update_Creat_At(id);\n\t\t\tSystem.out.println(\"update_Complete_Tweets\");\n\n\t\t\tdb.update_Complete_Tweets(id);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\t\treturn tweets;\n\t}", "@Override\n public Boolean onCompleted(Response response) throws Exception {\n System.out.println(response.getResponseBody());\n Type type = new TypeToken<Map<String, String>>() {\n }.getType();\n Map<String, String> jsonMap = jsonSeralizer.fromJson(response.getResponseBody(), type);\n //System.out.println(\"Results of Permssions set: \"+jsonMap);\n if (!jsonMap.get(\"success\").equals(1)) {\n System.out.println(\"File has been made available.\");\n return true;\n } else {\n System.out.println(jsonMap.get(\"error_message\"));\n return false;\n\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onResponse(String response) {\n\t\t\t\t\t\t\tparseRespense(response);\n\t\t\t\t\t\t}", "public void onResponse(JSONObject response) {\n if (response != null) {\n dissmissDialog();\n parseJsonFeed(response);\n }\n }", "public void onResponse(JSONObject response) {\n if (response != null) {\n dissmissDialog();\n parseJsonFeed(response);\n }\n }", "@Override\n public void onResponse(String json) {\n parseTempFBLogInResponse(json);\n }", "@Override\n public void onResponse(JSONObject response) {\n String key = \"servicios\";\n JSONArray servicios =null;\n\n try {\n servicios=response.getJSONArray(key);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n for (int i=0; i<servicios.length();i++){\n\n try {\n JSONObject servicio =servicios.getJSONObject(i);\n String rutEmpre = servicio.getString(\"rutEmpre\");\n String tipoServ = servicio.getString(\"tipoServ\");\n String fechaServ = servicio.getString(\"fechaServ\");\n String hora = servicio.getString(\"hora\");\n\n txtRut.setText(rutEmpre);\n editTxtFecha.setText(fechaServ);\n editTextHora.setText(hora);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n mUser = LoganSquare.parse(response.getString(\"barber\"), User.class);\n if (mUser == null || TextUtils.isEmpty(mUser.userid)) {\n gotoLogin();\n return;\n }\n\n saveKeyValue(\"me\", response.getString(\"barber\"));\n mCustomers = new ArrayList<>();\n mCustomers = LoganSquare.parseList(response.getString(\"customers\"), User.class);\n String total = response.getString(\"total_count\");\n //totalCountTV.setText(\"Total \" + total);\n int avg = response.getInt(\"average_cutting_time\");\n timePerCutTV.setText(\" \" + (avg / 60) + \"min\");\n queueCountTV.setText(\"(\" + mCustomers.size() + \")\");\n showUserInfo();\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "public void parseResponse();", "@Override\n protected void onPostExecute(ClarifaiResponse<List<ClarifaiOutput<Concept>>> response) {\n if (!response.isSuccessful()) {\n Toast.makeText(getApplicationContext(), \"API contact error\", Toast.LENGTH_SHORT).show();\n return;\n }\n final List<ClarifaiOutput<Concept>> predictions = response.get();\n if (predictions.isEmpty()) {\n Toast.makeText(getApplicationContext(), \"No results from API\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n final List<Concept> predictedTags = predictions.get(0).data();\n for(int i = 0; i < predictedTags.size(); i++) {\n tags.add(predictedTags.get(i).name());\n }\n printTags();\n }", "@Test\n\t\tpublic void createTweet() {\n\t\t\t\n\t\t\tRestAssured.baseURI=\"https://api.twitter.com/1.1/statuses\";\n\t\t\tResponse res=given().auth().oauth(ConsumerKey,ConsumerSecret,Token,TokenSecret).\n\t\t\tqueryParam(\"status\",\"I am learning API testing using RestAssured Java #Qualitest\").\n\t\t\twhen().post(\"/update.json\").then().extract().response();\n\t\t\t\n\t\t\tString responseString=res.asString();\n\t\t\t//System.out.println(responseString);\n\t\t\tlog.info(responseString);\n\t\t \n\t\t\tJsonPath js=new JsonPath(responseString);\n\t\t\tString id=js.get(\"id\").toString();\n\t\t\tlog.info(id);\n\t\t\tString text=js.get(\"text\").toString();\n\t\t\tlog.info(text);\n\t\t \n\t\t\t\n//\t\t\tString responseString=res.asString();\n//\t\t\tlog.info(responseString);\n//\t\t \n//\t\t\tJsonPath js=new JsonPath(responseString);\n//\t\t\tString id=js.get(\"id\").toString();\n//\t\t\tlog.info(id);\n//\t\t\tString text=js.get(\"text\").toString();\n//\t\t\tlog.info(text);\n//\t\t \n\t\t}", "@Override\n public void onResponse(String response) {\n try {\n //Convert response to a json\n JSONObject jsonObject = new JSONObject(response.toString());\n String result = jsonObject.getString(\"result\");\n eventArray = new JSONArray(result);\n createListData(eventArray);\n } catch (JSONException e) {\n Log.d(\"TimelineLog\", \"json conversion didn't work\");\n e.printStackTrace();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n TextView textview=(TextView)findViewById(R.id.name);\n// textview.setText(ExampleUsage.makeRequest());\n// ExampleUsage.makeRequest();\n RequestParams params=new RequestParams();\n params.put(\"city\", \"苏州\");\n// AsyncHttpResponseHandler client = new AsyncHttpResponseHandler();\n TwitterRestClient.get(\"getArea\", params, new AsyncHttpResponseHandler(){\n \t public void onSuccess(String response) {\n \t\t Log.e(\"onSuccess\", \"onSuccess\");\n System.out.println(response);\n String temp01 = response.substring(76);\n \t\t\tString temp02 = temp01.substring(0,temp01.length()-9);\n try {\n\t\t\t\t\tList<AreaImp> list = JSONUtils.fromJson(temp02, new TypeToken<List<AreaImp>>(){});\n\t\t\t\t} catch (Exception 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\n }\n \t public void onStart(){\n \t\t Log.e(\"onStart\", \"onStart\");\n \t }\n \t public void onFailure(Throwable e, String response) {\n \t\t Log.e(\"onFailure\", response);\n \t }\n \t public void onFinish() {\n \t\tLog.e(\"onFinish\", \"onFinish\");\n }\n });\n \n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n mCustomers = new ArrayList<>();\n mCustomers = LoganSquare.parseList(response.getString(\"customers\"), User.class);\n queueCountTV.setText(\"(\" + mCustomers.size() + \")\");\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(\"JSON_RESPONSE\",\"onResponse:\" +response.toString());\n }", "@Override\n public void onResponse(JSONObject response) {\n procesarRespuesta(response);\n Log.i(TAG, \"processanddo respuesta...\" + response);\n }", "private static ArrayList<Sample> getSamples(HttpResponse<String> response){\n\t\tArrayList<Sample> samples;\n\t\ttry {\n\t\t\tsamples = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Sample>>(){});\n\t\t\treturn samples;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public void onCompleted(GraphResponse response) {\n try {\n FbPost p = FbPostParser.parseFbPostResponse(finalPostArray.getJSONObject(finalI), response.getJSONObject().getJSONArray(\"data\"));\n if (p != null && DBManager.getDBManager(context).getPostById(p.getId()) == null) {\n postList.add(p);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n parseData(response);\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n String status = response.optString(\"status\");\n String msg = response.optString(\"msg\");\n\n String update_status = response.optString(\"update_status\");\n String totallike = response.optString(\"totallike\");\n if ((update_status.equalsIgnoreCase(\"1\") || update_status == \"1\") && (status == \"success\" || status.equalsIgnoreCase(\"success\"))) {\n tv_tlike.setTextColor(Color.RED);\n //ivLike.setBackgroundColor(Color.RED);\n tv_tlike.setText(totallike);\n } else {\n tv_tlike.setTextColor(Color.BLACK);\n tv_tlike.setText(totallike);\n }\n Toast.makeText(mContext, msg, Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onResponse(Response response) throws IOException {\n if (!response.isSuccessful()) {\n //Here our reponse is UnSucessfull so we inform the user\n // about the same as before\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n return;\n }\n //If Response is sucessfull we move forward and convert the\n // reponse which is in JSON format to String\n String respFromApi = response.body().string();\n\n //We will Log this LogCat in order to view the Raw Format recieved\n //you can open the log cat go in debug section and type RawData you\n // will be able to observe data there\n Log.d(\"RawData\", respFromApi);\n\n //Now We will call Extract Data Function which will retrieve the\n // woied and name of each city from the response\n try {\n extractData(respFromApi);\n } catch (Exception e) {\n //Informing Data is Not in JSON Format\n Toast.makeText(MainActivity.this, \"Response Not in JSON Format\", Toast.LENGTH_SHORT).show();\n }\n ;\n }", "@Override\r\n public void onResponse(JSONArray response) {\n parseData(response, requestCount);\r\n }", "public void onTweetSuccess(Tweet tweet);", "@Override\n public void onResponse(String response) {\n // try/catch block for returned JSON data\n // see API's documentation for returned format\n try {\n JSONObject result = new JSONObject(response);\n JSONArray resultList = result.getJSONArray(\"outputs\");\n JSONObject inner = resultList.getJSONObject(0);\n String out = inner.getString(\"output\");\n output.setText(\" \"+out);\n\n // catch for the JSON parsing error\n } catch (JSONException e) {\n Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void populateTimeline() {\n long fetchMoreStart = tweets.size() > 0 ? tweets.get(tweets.size() - 1).getUid() : -1;\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n // on success\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n addAll(Tweet.fromJSONArray(json));\n }\n\n // on failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, fetchMoreStart);\n }", "@Override\n\t\t\t\t\t\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\t\t\t\t\tString json = response;\n\t\t\t\t\t\t\t\tLog.d(\"arv\", \"arv\"+json);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onResponse(JSONObject response) {\n report = response;\n try {\n messageSent = report.getString(Const.REPORT_MESSAGE); //Gives profId\n chatLog = report.getString(Const.REPORT_CHATLOG); //Gives Chatlog\n } catch (JSONException jse) {\n // if an error occurs with the JSON, log it\n Log.d(\"Prof_Info_Fill\", jse.toString());\n }\n }", "@Override\n public void onResponse(final JSONObject response) {\n Log.d(\"Response from FatSecret\", response.toString());\n try{\n JSONObject res = new JSONObject(response.getJSONObject(\"foods\").getJSONArray(\"food\").get(0).toString());\n saveFoodID.setText(res.getString(\"food_id\"));\n mainFoodName = res.getString(\"food_name\");\n foodIDView.setText(getString(R.string.food_display, res.getString(\"food_name\"), res.getString(\"food_id\")));\n requestFinished(true);\n }\n catch (Exception e){}\n }", "@Override\n\t\t\tpublic void onResponse(Response response) throws IOException {\n Log.i(\"info\",response.body().string());\n\t\t\t}", "@Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n distance = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"distance\").getString(\"text\");\n duration = data.getJSONArray(\"rows\").getJSONObject(0).getJSONArray(\"elements\")\n .getJSONObject(0).getJSONObject(\"duration\").getString(\"text\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public JsonHttpResponseHandler getPopulateTimelineHandler(final long maxId, final List<Tweet> tweets, final TweetAdapter adapter, final Context context, final ProgressBarListener progressBarListener) {\n // Start showing the progress bar.\n progressBarListener.showProgressBar();\n\n JsonHttpResponseHandler handler = new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n super.onSuccess(statusCode, headers, response);\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n Log.d(\"TwitterClient\", response.toString());\n\n List<Tweet> newTweets = Tweet.fromJsonArray(response);\n\n // If there is no new tweets, do nothing.\n if (newTweets.size() > 0 && newTweets.get(0).getUid() > maxId) {\n tweets.addAll(newTweets);\n adapter.notifyDataSetChanged();\n }\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {\n Log.d(\"TwitterClient\", errorResponse.toString());\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {\n Log.d(\"TwitterClient\", responseString);\n throwable.printStackTrace();\n\n // Check connectivity.\n ConnectivityChecker cc = new ConnectivityChecker(context);\n cc.checkConnectivity();\n\n progressBarListener.hideProgressBar();\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, String responseString) {\n super.onSuccess(statusCode, headers, responseString);\n\n progressBarListener.hideProgressBar();\n }\n };\n\n return handler;\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n courseslist.add(response.get(i).toString());\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n ;\n }", "@Override\n public void onCompleted(GraphResponse response) {\n Log.d(\"GraphAPI FB debug\", String.valueOf(response));\n Log.d(\"GraphAPI FB debug\", response.toString());\n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response.toString());\n displayGraphResult(response);\n }", "@Override\n public void onResponse(String response) {\n System.out.println(response.toString());\n }", "@Override\n public Object parseNetworkResponse(Response response, int i) throws Exception {\n return response.body().string();\n }", "@Override\n void parseOAuthResponse(String data) {\n }", "@Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n ArrayList<Tweet> tweetList = Tweet.fromJSONArray(response);\n\n //load data into the view:\n\n //store reference to current size\n int currentSize = tweets.size();\n\n //add retrieved tweets to existing list\n tweets.addAll(tweetList);\n\n //visually refresh the list\n tweetsAdapter.notifyItemRangeInserted(currentSize, tweetList.size());\n\n if (!tweetList.isEmpty()) {\n updateIndex();\n }\n swipeContainer.setRefreshing(false);\n }", "private void getUserData() {\n TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();\n AccountService statusesService = twitterApiClient.getAccountService();\n Call<User> call = statusesService.verifyCredentials(true, true, true);\n call.enqueue(new Callback<User>() {\n @Override\n public void success(Result<User> userResult) {\n //Do something with result\n\n //parse the response\n String name = userResult.data.name;\n String email = userResult.data.email;\n String description = userResult.data.description;\n String pictureUrl = userResult.data.profileImageUrl;\n String bannerUrl = userResult.data.profileBannerUrl;\n String language = userResult.data.lang;\n long id = userResult.data.id;\n\n }\n\n public void failure(TwitterException exception) {\n //Do something on failure\n }\n });\n }", "@Override\n public void onResponse(JSONObject response) {\n try{\n JSONArray array = response.getJSONArray(\"nodes\");\n// Loop through the array elements\n for(int i=0;i<array.length();i++){\n // Get current json object\n JSONObject speakers = array.getJSONObject(i);\n JSONObject node = speakers.getJSONObject(\"node\");\n\n // Get the current student (json object) data\n String firstname = node.getString(\"first_name\");\n String lastname = node.getString(\"last_name\");\n String organization = node.getString(\"organization\");\n String title = node.getString(\"job_title\");\n\n\n // Display the formatted json data in text view\n responseView.append(firstname +\" \"+ lastname + \" \\n\"+ title +\" - \"+ organization );\n responseView.append(\"\\n\\n\");\n\n// LayoutInflater vi = (LayoutInflater) getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n// View v = vi.inflate(R.layout.activity_speaker, null);\n//\n// // fill in any details dynamically here\n// TextView textView = (TextView) v.findViewById(R.id.textViewSpeakers);\n// textView.setText(\"your text\"+ firstname);\n//\n// // insert into main view\n// ViewGroup insertPoint = (ViewGroup) findViewById(R.id.tableViewSpeakers);\n// insertPoint.addView(v, 0, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));\n\n// responseView.addView();\n\n\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n// responseView.setText(response.toString());\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(Verification_Activity.this, response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"------------------------------------------\");\n\n System.out.println(response.toString());\n if(response.toString().contains(\"200\")){\n if(response.toString().contains(\"password\")){\n String password=\"\";\n int i=46;\n while (true){\n password+=response.toString().charAt(i);\n i++;\n if(response.toString().charAt(i)=='\"')\n break;\n\n\n }\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"password\", password);\n editor.apply();\n }\n startActivity(new Intent(Verification_Activity.this, Public_register_Activity.class));\n }\n\n else {\n startActivity(new Intent(Verification_Activity.this, Singup_Activity.class));\n finish();\n\n }\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n Toast.makeText(Verification_Activity.this, response.toString(), Toast.LENGTH_SHORT).show();\n System.out.println(\"------------------------------------------\");\n\n System.out.println(response.toString());\n if(response.toString().contains(\"200\")){\n if(response.toString().contains(\"password\")){\n String password=\"\";\n int i=46;\n while (true){\n password+=response.toString().charAt(i);\n i++;\n if(response.toString().charAt(i)=='\"')\n break;\n\n\n }\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"password\", password);\n editor.apply();\n }\n startActivity(new Intent(Verification_Activity.this, Public_register_Activity.class));\n }\n\n else {\n startActivity(new Intent(Verification_Activity.this, Singup_Activity.class));\n finish();\n\n }\n\n\n }", "@Override\n public void onResponse(JSONObject response) {\n hideCustomLoadingView();\n try {\n String status = response.getString(\"status\");\n if (status.equals(\"1\")) {\n showToast(\"End\");\n int avg = response.getInt(\"avg_time\") / 60;\n timePerCutTV.setText(\" \" + avg + \"min\");\n String total = response.getString(\"total_count\");\n //totalCountTV.setText(\"Total \" + total);\n List<User> customers = new ArrayList<User>();\n boolean isFirst = true;\n for (User u : mCustomers) {\n if (!isFirst) {\n customers.add(u);\n } else {\n isFirst = false;\n }\n }\n mCustomers = customers;\n queueCountTV.setText(String.valueOf(mCustomers.size()));\n setCustomers();\n } else if (status.equals(\"false\")) {\n showToast(\"Fail\");\n } else {\n showToast(\"Network Error!\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n showToast(\"Network Error!\");\n }\n }", "@Override\n public void onResponse(JSONArray response) {\n try{\n // Loop through the array elements\n for(int i=0;i<response.length();i++){\n courseslistid.add(response.get(i).toString());\n }\n }catch (JSONException e){\n e.printStackTrace();\n }\n }", "private void listTeams(String response) {\n //System.out.println(response);\n teamList = findViewById(R.id.teamList);\n JsonParser parser = new JsonParser();\n JsonElement tList = parser.parse(response);\n JsonArray tArray = tList.getAsJsonArray();\n for(JsonElement tElement: tArray) {\n View messageChunk = getLayoutInflater().inflate(R.layout.team_chunk,\n teamList, false);\n //populate chunk\n JsonObject tObject = tElement.getAsJsonObject();\n String key = tObject.get(\"key\").getAsString();\n Team t = new Team(tObject.get(\"team_number\").getAsString(), tObject.get(\"nickname\").getAsString(), key);\n //TextView teamName = messageChunk.findViewById(R.id.teamName);\n //TextView teamNumber = messageChunk.findViewById(R.id.teamNumber);\n //teamName.setText(t.getName());\n //teamNumber.setText(t.getNumber());\n teamKeys.put(key, t);\n //if (teamKeys.get(key).getThumbnail() != null) {\n // ImageView i = messageChunk.findViewById(R.id.teamImageThumb);\n // i.setImageBitmap(teamKeys.get(key).getThumbnail());\n\n //}\n\n //chunk onClicklistener\n //Intent selectedTeam = new Intent(this, TeamInfo.class);\n //selectedTeam.putExtra(\"key\", key);\n //messageChunk.setOnClickListener(unused -> startActivity(selectedTeam));\n //teamList.addView(messageChunk);\n }\n drawUI();\n }", "@Override\n public void onCompleted(\n JSONObject object,\n GraphResponse response) {\n jsonGraphObject = response.getJSONObject();\n\n //Get user detail and save it to loacal instances.\n getFacebookInfo();\n\n LoginManager.getInstance().logOut();\n\n //Save info to params and pass Login Type [Twitch,Facebook,Twitter].\n //saveInfoToParams(ApplicationGlobal.TAG_LOGIN_FACEBOOK);\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tString httpresponse = new String();\r\n\t\t\t// for (int i = 0; i < 10; i++) {\r\n\t\t\thttpresponse = HTTPGetInfo();\r\n\t\t\ttry {\r\n\t\t\t\tJSONparser(httpresponse);\r\n\t\t\t} catch (JSONException e) {\r\n\t\t\t\t// TODO 自动生成的 catch 块\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "public void mapper(String line, PrintWriter stdout) {\n JsonParser jsonParser = new JsonParser();\n try{\n JsonObject tweetObj = jsonParser.parse(line).getAsJsonObject();\n \n // language\n String lang = tweetObj.get(\"lang\").toString();\n lang = lang.substring(1, lang.length() - 1);\n if (!lang.equals(\"en\")) {\n return; // not English\n }\n \n // date\n String created = tweetObj.get(\"created_at\").toString(); // column 3\n if (created.length() < 10) {\n return; //malformed\n }\n \n // tweet id\n JsonElement idElement = tweetObj.get(\"id\"); // column 1\n String id = null;\n if (idElement == null) {\n id = tweetObj.get(\"id_str\").toString();\n id = id.substring(1, id.length() - 1);\n if (id.length() < 1) {\n return; // malformed\n }\n } else {\n id = idElement.toString();\n }\n \n // text\n String text = tweetObj.get(\"text\").toString(); // column 5\n text = text.substring(1, text.length() - 1);\n if (text.length() < 1) {\n return; // malformed\n }\n \n // remove small urls\n text = text.replaceAll(\"\\\\\\\\n\",\"\\n\");\n text = text.replaceAll(\"\\\\\\\\t\",\"\\t\");\n text = text.replaceAll(\"\\\\\\\\r\",\"\\r\");\n text = text.replaceAll(\"(https?|ftp):\\\\/\\\\/[^\\\\s/$.?#][^\\\\s]*\", \"\");\n text = text.replaceAll(\"\\n\",\"\\\\\\\\n\");\n text = text.replaceAll(\"\\t\",\"\\\\\\\\t\");\n text = text.replaceAll(\"\\r\",\"\\\\\\\\r\");\n // user id\n JsonObject user = tweetObj.getAsJsonObject(\"user\");\n JsonElement user_idElement = user.get(\"id\"); // column 2\n String user_id = null;\n if (user_idElement == null) {\n user_id = user.get(\"id_str\").toString();\n user_id = user_id.substring(1, user_id.length() - 1);\n if (user_id.length() < 1) {\n return; // malformed\n }\n } else {\n user_id = user_idElement.toString();\n }\n \n // word count\n String words = wordCount(text);\n if (words.length() < 1) {\n return; // no valid words\n }\n \n // store data in a customized data structure\n Twitter enery = new Twitter(id, user_id, created, words);\n stdout.println(enery.toString());\n \n } catch (Exception e) {\n // a malformed tweet occurs\n // skip it and keep going\n }\n \n }", "@Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, \"Response: \" + response);\n try {\n ((TextView) findViewById(R.id.welcome)).setText(\"Welcome, \"\n + response.getString(\"name\"));\n Toast.makeText(getBaseContext(), \"Response: \" + response.get(\"name\"), Toast.LENGTH_SHORT)\n .show();\n } catch (JSONException e) {\n Log.d(TAG, \"JSONEXception Error: \" + e.toString());\n }\n }", "public void getFear() {\n Call<List<Chat>> call = jsonPlaceHolderApi.getFear();\n call.enqueue(new Callback<List<Chat>>() {\n @Override\n public void onResponse(Call<List<Chat>> call, Response<List<Chat>> response) {\n //not successful\n if (!response.isSuccessful()) {\n Toast.makeText(getContext().getApplicationContext(), response.code(), Toast.LENGTH_LONG).show();\n return;\n }\n //get data\n chat = response.body();\n //Toast.makeText(getContext().getApplicationContext(), chat.get(r).getText(), Toast.LENGTH_LONG).show();\n ai.setText(chat.get(r).getText());\n\n }\n @Override\n public void onFailure(Call<List<Chat>> call, Throwable t) {\n Toast.makeText(getContext().getApplicationContext(), t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n public void onNext(RandomUserResponse response) {\n Log.d(\"TAG\", response.getResults().get(0).getEmail());\n this.randomUserResponse = response;\n }", "private void followingFollowers(String action) {\n\n JsonElement jsonElementMe = whoami();\n if (Literals.following.name().equals(action)) {\n jsonArrayFollowing = new JsonArray();\n System.out.format(\"Gathering accounts that %s follows.\\n\", Utils.getProperty(jsonElementMe, Literals.acct.name()));\n }\n if (Literals.followers.name().equals(action)) {\n jsonArrayFollowers = new JsonArray();\n System.out.format(\"Gathering accounts that are following %s.\\n\", Utils.getProperty(jsonElementMe, Literals.acct.name()));\n }\n String id = Utils.getProperty(jsonElementMe, Literals.id.name());\n String urlString = String.format(\"https://%s/api/v1/accounts/%s/%s?limit=40\", Utils.getProperty(settingsJsonObject, Literals.instance.name()), id, action);\n URL url = Utils.getUrl(urlString);\n while (url != null) {\n HttpsURLConnection urlConnection;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n String authorization = String.format(\"Bearer %s\", settingsJsonObject.get(Literals.access_token.name()).getAsString());\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n String linkHeader = urlConnection.getHeaderField(\"link\");\n InputStream is = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n JsonArray jsonArray = gson.fromJson(isr, JsonArray.class);\n if (jsonArray.size() > 0) {\n if (Literals.following.name().equals(action)) {\n jsonArrayFollowing.addAll(jsonArray);\n System.out.format(\"Gathered %d accounts. Total so far %d.\\n\", jsonArray.size(), jsonArrayFollowing.size());\n }\n if (Literals.followers.name().equals(action)) {\n jsonArrayFollowers.addAll(jsonArray);\n System.out.format(\"Gathered %d accounts. Total so far %d.\\n\", jsonArray.size(), jsonArrayFollowers.size());\n }\n }\n url = null;\n if (Utils.isNotBlank(linkHeader)) {\n // System.out.format(\"Link header: %s\\n\", linkHeader);\n Pattern pattern = Pattern.compile(\"<([^>]+)>;\\\\s+rel=\\\"([^\\\"]+)\\\"\");\n Matcher matcher = pattern.matcher(linkHeader);\n while (matcher.find()) {\n urlString = matcher.group(1);\n String rel = matcher.group(2);\n // System.out.format(\"URL: %s REL: %s\\n\", urlString, rel);\n if (\"next\".equals(rel)) {\n url = Utils.getUrl(urlString);\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n url = null;\n }\n }\n\n ArrayList<Account> arrayListAccounts = new ArrayList<>();\n if (Literals.following.name().equals(action)) {\n for (JsonElement jsonElement : jsonArrayFollowing) {\n arrayListAccounts.add(transfer(jsonElement));\n }\n }\n if (Literals.followers.name().equals(action)) {\n for (JsonElement jsonElement : jsonArrayFollowers) {\n arrayListAccounts.add(transfer(jsonElement));\n }\n }\n Collections.sort(arrayListAccounts);\n for (Account account : arrayListAccounts) {\n System.out.format(\"%s %s\\n\", green(account.getDisplayNameAndAccount()), account.getUrl());\n }\n if (Literals.following.name().equals(action)) {\n System.out.format(\"\\nFollowing %d accounts.\\n\", jsonArrayFollowing.size());\n }\n if (Literals.followers.name().equals(action)) {\n System.out.format(\"\\n%d followers.\\n\", jsonArrayFollowers.size());\n }\n }", "public void getTweets() {\r\n\t\t\r\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\r\n\t\tcb.setDebugEnabled(true);\r\n\t\t\r\n\t\t//provide your own keys\r\n\t cb.setOAuthConsumerKey(\"ConsumerKey\");\r\n\t cb.setOAuthConsumerSecret(\"ConsumerSecret\");\r\n\t cb.setOAuthAccessToken(\"AccessToken\");\r\n\t cb.setOAuthAccessTokenSecret(\"TokenSecret\");\r\n\r\n TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance(); \r\n \r\n //Check for live status updates\r\n StatusListener listener = new StatusListener() {\r\n\r\n @Override\r\n public void onException(Exception arg0) {\r\n \tSystem.out.println(\"Exception!! Data Not Inserted Into Database\");\r\n }\r\n\r\n @Override\r\n public void onDeletionNotice(StatusDeletionNotice arg0) {\r\n \tSystem.out.println(\"Got a status deletion notice id:\" + arg0.getStatusId());\r\n }\r\n \r\n @Override\r\n public void onScrubGeo(long userId, long upToStatusId) {\r\n System.out.println(\"Got scrub_geo event userId:\" + userId + \" upToStatusId:\" + upToStatusId);\r\n }\r\n \r\n @Override\r\n public void onStatus(Status status) {\r\n \t\r\n \t User user = status.getUser();\r\n \t \r\n String username = status.getUser().getScreenName();\r\n String profileLocation = user.getLocation();\r\n long tweetId = status.getId(); \r\n String content = status.getText();\r\n \r\n \r\n //Create a model for the live data\r\n TweetModel memoryData = new TweetModel(username, profileLocation, tweetId, content);\r\n \r\n //store to MongoDB if data is correct\r\n System.out.println(++counter + \") username: \" + username + \" location: \" + profileLocation + \" tweetId \" + tweetId + \" Text: \" + content );\r\n data.save(memoryData);\r\n }\r\n \r\n\t\t\t@Override\r\n public void onTrackLimitationNotice(int arg0) {\r\n\t System.out.println(\"Got track limitation notice:\" + arg0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onStallWarning(StallWarning warning) {}\r\n };\r\n \r\n //Filter the live tweet results\r\n FilterQuery filterQuery = new FilterQuery();\r\n //Search for tweets with specific keywords\r\n String keywords[] = {\"Java\", \"Python\", \"PHP\"};\r\n //Restrict the language to English\r\n String[] lang = {\"en\"}; \r\n //Add the Filters\r\n filterQuery.language(lang);\r\n filterQuery.track(keywords);\r\n //Listen for Live Tweets\r\n twitterStream.addListener(listener);\r\n twitterStream.filter(filterQuery);\r\n\t}", "public void parseJsonResponse(String result) {\n Log.i(TAG, result);\n\n try {\n JSONArray jsonArray = new JSONArray(result);\n\n for(int i=0; i<jsonArray.length(); i++){\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n Song song = new Song();\n\n song.setSongName(jsonObject.getString(\"song\"));\n song.setSongUrl(jsonObject.getString(\"url\"));\n song.setArtists(jsonObject.getString(\"artists\"));\n song.setCoverUrl(jsonObject.getString(\"cover_image\"));\n\n songList.add(song);\n }\n songsAdapter.notifyDataSetChanged();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void onResponse(JSONObject response) {\n\r\n try {\r\n JSONArray data = response.getJSONArray(\"Data\");\r\n\r\n for (int i = 0; i < data.length(); i++) {\r\n JSONObject info = data.getJSONObject(i);\r\n student_id = info.getString(\"student_id\");\r\n username = info.getString(\"username\");\r\n email = info.getString(\"email\");\r\n password = info.getString(\"password\");\r\n arrayList.add(new profile(student_id, username, email, password));\r\n }\r\n loading.dismiss();\r\n } catch (JSONException e) {\r\n Log.d(\"Tag\", e.toString());\r\n }\r\n }", "@Override\n public void onResponse(JSONObject response) {\n try {\n /* Obtenemos los atributos que hacen a un objeto heroes. */\n JSONArray jsonArray = response.getJSONArray(\"heroes\");\n\n datoNombre = new String[jsonArray.length()]; // Cantidad de nombres heros.\n datoUrls = new String[jsonArray.length()]; // Cantidad de URLs en \"heroes\".\n\n //Extraemos los atributos de cada heroe existente\n for (int i = 0; i < jsonArray.length(); i++) {\n\n JSONObject hero = jsonArray.getJSONObject(i);\n\n String nombre = hero.getString(\"name\");\n String imageUrl = hero.getString(\"imageurl\");\n\n Log.i(\"MOSTRAR\", nombre + \" - \" + imageUrl);\n\n //enviamos los datos extraidos en la posicion i al metodo recibir()\n // y jsonArray.length() es la cantidad de heroes encontrados en el json\n recibir(nombre, imageUrl, jsonArray.length());\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "public List<String> homeTimeline() {\r\n\t\tList<String> twitterResponseList = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tProperties properties = getProperties();\r\n\t\t\tString apiUrl = properties.getProperty(\"twitter.api.home.timeline\") + \"?count=10\"; // append count to max of\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// 10\r\n\r\n\t\t\tHttpResponse apiResponse = executeHttpGet(apiUrl);\r\n\r\n\t\t\tif (200 == apiResponse.getStatusLine().getStatusCode()) {\r\n\t\t\t\tJSONArray jsonArray = new JSONArray(EntityUtils.toString(apiResponse.getEntity()));\r\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\t\tJSONObject userObject = (JSONObject) jsonObject.get(\"user\");\r\n\t\t\t\t\tString displayText = (String) userObject.get(\"screen_name\") + \" : \"\r\n\t\t\t\t\t\t\t+ (String) jsonObject.get(\"text\"); // data to be displayed in screen_name : tweet format\r\n\t\t\t\t\ttwitterResponseList.add(displayText); // list of data in the format mentioned above\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn twitterResponseList;\r\n\r\n\t}", "@Override\n public void onResponse(String response) {\n parseData(url, response);\n }", "protected void onPostExecute(SendMessage response) {\n\n Log.i(\"response\", String.valueOf(response) + Error);\n// if (response.getStatus().equalsIgnoreCase(\"true\")) {\n// Intent intent = new Intent(Lo.this, MainActivity.class);\n// startActivity(intent);\n\n// } else {\n// Toast.makeText(ChatActivity.this, response.getStatus(), Toast.LENGTH_LONG).show();\n// }\n\n\n // Show Response Json On Screen (activity)\n // uiUpdate.setText(Content);\n\n /****************** Start Parse Response JSON Data *************/\n\n // String OutputData = \"\"\n// \tSharedPreferences sp = getApplicationContext()\n\n\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(JSONObject response) {\n JSONObject data = null;\n try {\n data=response.getJSONObject(\"response\");\n confirmed.setText(data.getString(\"confirmed\"));\n active.setText(data.getString(\"active\"));\n recovered.setText(data.getString(\"recovered\"));\n deaths.setText(data.getString(\"deaths\"));\n progress.dismiss();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public void onResponse(String response)\n {\n\n }", "@Override\n public void onResponse(String response) {\n listTeams(response);\n\n }", "private void printRetweets(long statusId) throws TwitterException {\r\n List<Status> list = twitter.getRetweets(statusId);\r\n for (int i = 0; i < list.size(); i++) {\r\n System.out.println(\"##### This retweet was found over the twitter search api! #####\");\r\n printStatus(list.get(i));\r\n }\r\n }", "@Override\n public void onResponse(JSONObject jsonObject)\n {\n }", "@Override\n public void onResponse(JSONObject response) {\n String status= response.toString();\n txtJsonData.setText(status);\n pDialog.hide();\n }", "public void loadNextDataFromApi(int offset) {\n client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray response) {\n\n for (int i = 0; i < response.length(); i++){\n //get json object in the position index\n //create a tweet object with json object\n //add the tweet object to the arraylist of tweets\n //notify changes to adapter\n Tweet tweet = null;\n try {\n tweet = Tweet.fromJson(response.getJSONObject(i));\n tweets.add(tweet);\n adapter.notifyItemInserted(tweets.size() - 1);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n if (tweet.uid < maxId){\n maxId = tweet.uid;\n Log.d(\"MaxId\", String.valueOf(maxId));\n }\n\n }\n }\n });\n\n }", "@Override\n protected void onPostExecute(Object o)\n {\n if (o != null)\n {\n String response = o.toString();\n\n Log.i(\"INFO\", o.toString());\n\n parseJSON(response);\n }\n else\n {\n Toast.makeText(MainActivity.this,\n \"Sorry, it was not possible to get the schedule information\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(JSONArray response) {\n articleList.clear();\n try{\n for(int i = 0; i < response.length(); i++){\n JSONObject obj = response.getJSONObject(i);\n\n Article article = new Article(\n obj.getInt(\"record_id\"),\n obj.getString(\"title\"),\n obj.getString(\"short_info\"),\n obj.getString(\"date\"),\n obj.getString(\"image_url\"),\n null,\n null\n\n );\n articleList.add(article);\n }\n\n } catch (JSONException e){\n //parsing error in json data\n }\n notifyListener();\n\n }", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n try {\n //mengubah response string menjadi object\n JSONObject obj = new JSONObject(response);\n\n //obj.getstring(\"message\") digunakan untuk mengambil pesan message dari response\n Toast.makeText(profile.this, obj.getString(\"message\"), Toast.LENGTH_SHORT).show();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onResponse(JSONObject response) {\n System.out.println(response+\"ktjbkgrjbhymyposting\");\n try {\n if(response.getInt(\"status\")==200){\n// session.setToken(response.getString(\"token\"));\n listModel = new ArrayList<MyPostingModel>();\n JSONArray jsonArray = response.getJSONArray(\"data\");\n if (jsonArray.length()==0) {\n listMyPosting.setVisibility(View.GONE);\n tvNullPost.setVisibility(View.VISIBLE);\n } else {\n listMyPosting.setVisibility(View.VISIBLE);\n tvNullPost.setVisibility(View.GONE);\n for (int a = 0; a < jsonArray.length(); a++) {\n JSONObject object = jsonArray.getJSONObject(a);\n String begin_date = object.getString(\"begin_date\");\n String end_date = object.getString(\"end_date\");\n String business_code = object.getString(\"business_code\");\n String personal_number = object.getString(\"personal_number\");\n String posting_id = object.getString(\"posting_id\");\n String title = object.getString(\"title\");\n String description = object.getString(\"description\");\n String image = object.getString(\"image\");\n String date = object.getString(\"date\");\n String time = object.getString(\"time\");\n String change_date = object.getString(\"change_date\");\n String change_user = object.getString(\"change_user\");\n String avatar = object.getString(\"profile\");\n// String lovelikes = object.getString(\"lovelikes\");\n// JSONArray jsonArrayLike = object.getJSONArray(\"lovelikes\");\n String full_name = null;\n JSONArray jsonArrayName = object.getJSONArray(\"name\");\n for (int d=0; d<jsonArrayName.length(); d++) {\n JSONObject objectName = jsonArrayName.getJSONObject(d);\n full_name = objectName.getString(\"full_name\");\n }\n JSONArray jsonArrayComment = object.getJSONArray(\"comments\");\n JSONArray jsonArrayLike = object.getJSONArray(\"people_likes\");\n boolean status_like = false;\n for (int c=0; c<jsonArrayLike.length(); c++) {\n JSONObject objectLike = jsonArrayLike.getJSONObject(c);\n String personal_number_like = objectLike.getString(\"personal_number\");\n if (personal_number_like.equals(session.getUserNIK())) {\n status_like = true;\n } else {\n status_like = false;\n }\n }\n model = new MyPostingModel(begin_date, end_date, business_code, personal_number, posting_id, title, description, image, date, time, change_date, change_user, String.valueOf(jsonArrayComment.length()), String.valueOf(jsonArrayLike.length()), full_name, status_like, avatar);\n listModel.add(model);\n }\n adapter = new MyPostingAdapter(EmployeePostingActivity.this, listModel);\n listMyPosting.setAdapter(adapter);\n listMyPosting.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n// generateActivityId();\n Intent i = new Intent(EmployeePostingActivity.this, DetailpostActivity.class);\n i.putExtra(\"posting_id\",listModel.get(position).getPosting_id());\n i.putExtra(\"title\",listModel.get(position).getTitle());\n i.putExtra(\"description\",listModel.get(position).getDescription());\n i.putExtra(\"date\",listModel.get(position).getChange_date());\n i.putExtra(\"image\",listModel.get(position).getImage());\n i.putExtra(\"name\",listModel.get(position).getName());\n i.putExtra(\"status_like\",listModel.get(position).isStatus_like());\n i.putExtra(\"avatar\",listModel.get(position).getAvatar());\n startActivity(i);\n }\n });\n }\n progressDialogHelper.dismissProgressDialog(EmployeePostingActivity.this);\n }else{\n progressDialogHelper.dismissProgressDialog(EmployeePostingActivity.this);\n\n }\n }catch (Exception e){\n progressDialogHelper.dismissProgressDialog(EmployeePostingActivity.this);\n\n System.out.println(e);\n }\n\n }", "@Override\n public void onResponse(String response) {\n opprettListe(response);\n }", "@Override\n public void onResponse(JSONArray response) {\n listExams.clear();\n parseData(response);\n //Hiding the progressbar\n\n }", "@Override\n public void onResponse(String response) {\n Utils.logApiResponseTime(calendar, tag + \" \" + url);\n mHandleSuccessResponse(tag, response);\n\n }", "@Override\n public void run() {\n try {\n\n try {\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(\n googleApiClient);\n } catch (SecurityException e) {\n e.printStackTrace();\n }\n\n if (mLastLocation != null) {\n\n\n Query query = new Query(\"India\"); //\n\n GeoLocation location = new GeoLocation(mLastLocation.getLatitude(), mLastLocation.getLongitude()); //latitude, longitude\n\n query.setGeoCode(location, 5, Query.MILES); //location, radius, unit\n query.setSinceId(latestTweetId);\n QueryResult result;\n\n do {\n result = twitter.search(query);\n\n for (twitter4j.Status tweet : result.getTweets()) {\n\n if (tweet.getGeoLocation() != null) {\n\n newTweets.add(tweet);\n long id = tweet.getId();\n\n if (id > latestTweetId) {\n\n latestTweetId = id;\n }\n\n }\n\n System.out.println(\"@\" + tweet.getUser().getScreenName() + \" - \" + tweet.getText());\n }\n\n } while ((query = result.nextQuery()) != null);\n\n handler.sendEmptyMessage(1);\n }\n\n }catch(TwitterException te){\n System.out.println(\"Failed to search tweets: \" + te.getMessage());\n }\n\n\n\n\n\n }", "@Override\n public void onResponse(String response) {\n Log.d(DEBUG_TAG, \"Response is: \"+ response);\n }", "@Override\r\n public void onResponse(String response) {\n Log.i(\"MyQuestion\", response);\r\n try {\r\n \r\n Gson gson = new Gson();\r\n MyQuestionBean resultUser = gson.fromJson(response, MyQuestionBean.class);\r\n if (resultUser.getStatus() == 1) {\r\n if (resultUser.getData().isEmpty()) {\r\n empty_layout.setVisibility(View.VISIBLE);\r\n myQuestionListView.setVisibility(View.INVISIBLE);\r\n } else {\r\n adapter = new MyQuestionListViewAdapter(resultUser.getData(), MyQuestionActivity.this);\r\n myQuestionListView.setAdapter(adapter);\r\n }\r\n }\r\n } catch (Exception e) {\r\n Toast.makeText(MyQuestionActivity.this, \"网络请求失败\", Toast.LENGTH_SHORT).show();\r\n }\r\n }" ]
[ "0.6955072", "0.6549677", "0.64857656", "0.62850946", "0.6249039", "0.6172904", "0.6013537", "0.591393", "0.59024686", "0.5895447", "0.58754873", "0.5868207", "0.5848458", "0.5819683", "0.58004844", "0.5795212", "0.5776237", "0.57626206", "0.57582784", "0.5748746", "0.5726633", "0.5723354", "0.5721876", "0.5721876", "0.5717359", "0.57131344", "0.57102805", "0.56881887", "0.5684229", "0.5683464", "0.56730765", "0.56656164", "0.5658809", "0.565524", "0.5653211", "0.56487715", "0.56356937", "0.5617322", "0.5615107", "0.5612938", "0.5609409", "0.56082827", "0.5604591", "0.5604432", "0.5603667", "0.5595871", "0.55864054", "0.5584436", "0.55752546", "0.5569013", "0.55650395", "0.55589545", "0.555742", "0.5556917", "0.5546167", "0.5545024", "0.55438524", "0.5539718", "0.55346763", "0.5534359", "0.5533361", "0.5533361", "0.5517502", "0.5509184", "0.5506482", "0.5499183", "0.5498446", "0.5497852", "0.5496204", "0.54823834", "0.5479567", "0.54768974", "0.5471886", "0.5468574", "0.5442562", "0.5440304", "0.5438015", "0.5425214", "0.5418401", "0.54041874", "0.54041874", "0.54041874", "0.5403031", "0.54000235", "0.5391871", "0.53912157", "0.53906316", "0.53903395", "0.53844947", "0.53816664", "0.5380502", "0.53804994", "0.53796715", "0.5379526", "0.5379455", "0.5376681", "0.5374318", "0.5368255", "0.5365693", "0.5360963" ]
0.62587136
4
Send an API request to retrieve appropriate paginated data > Send the request including an offset value (i.e `page`) as a query parameter. > Deserialize and construct new model objects from the API response > Append the new data objects to the existing set of items inside the array of items > Notify the adapter of the new items made with `notifyItemRangeInserted()`
public void loadNextDataFromApi(int offset) { client.getMoreMentionsTimeline(maxId, new JsonHttpResponseHandler(){ @Override public void onSuccess(int statusCode, Header[] headers, JSONArray response) { for (int i = 0; i < response.length(); i++){ //get json object in the position index //create a tweet object with json object //add the tweet object to the arraylist of tweets //notify changes to adapter Tweet tweet = null; try { tweet = Tweet.fromJson(response.getJSONObject(i)); tweets.add(tweet); adapter.notifyItemInserted(tweets.size() - 1); } catch (JSONException e) { e.printStackTrace(); } if (tweet.uid < maxId){ maxId = tweet.uid; Log.d("MaxId", String.valueOf(maxId)); } } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void customLoadMoreDataFromApi(int offset) {\n// Log.d(TAG, \"page = \" + offset);\n populateTimeline();\n // This method probably sends out a network request and appends new data items to your adapter.\n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n }", "public void customLoadMoreDataFromApi() {\n // This method probably sends out a network request and appends new data items to your adapter. \n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n \tmakeGoogleApiCall();\n \t\n }", "public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n PostFetch postFetch = new PostFetch(getContext(), new AppUtils.MyInterface() {\n @Override\n public void myMethod(String response) {\n if(response.equals(\"0\")){\n Toast.makeText(getContext(), \"No internet connection\", Toast.LENGTH_SHORT).show();\n }\n else if(response.equals(\"1\")){\n Toast.makeText(getContext(), \"Unable to connect to server\", Toast.LENGTH_SHORT).show();\n }\n else {\n AppUtils.addPostsToAdapter(getContext(), response, mAdapter);\n }\n }\n });\n postFetch.execute(url, Integer.valueOf(offset*10).toString(), AppUtils.PAGE_SIZE);\n }", "public void loadNextDataFromApi(int offset) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n\n Toast.makeText(getActivity(), \"new data loading\", Toast.LENGTH_SHORT).show();\n\n final Integer count =Integer.parseInt(dataoffset)+10;\n dataoffset=count.toString();\n\n\n JsonObjectRequest fetchAllStores = new JsonObjectRequest(Request.Method.POST, \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString(), null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n Log.d(TAG, \"more data query : \" + \"http://omtii.com/mile/fetchpagegroupchat.php?mobno=\"+mobileno+\"&dataoffset=\"+count.toString());\n\n Log.d(TAG, \"Fetch Stores: \" + response);\n showStores(response);\n //MyRecyclerView.setAdapter(adapter);\n System.err.println(\"adpter attached\");\n adapter.notifyDataSetChanged();\n System.err.println(\"data set changed attached\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(TAG, \"Fetch Stores Error: \" + error.getMessage());\n }\n });\n ApplicationController.getInstance().addToRequestQueue(fetchAllStores);\n }", "public void customLoadMoreDataFromApi(int offset) {\n // This method probably sends out a network request and appends new data items to your adapter. \n // Use the offset value and add it as a parameter to your API request to retrieve paginated data.\n // Deserialize API response and then construct new objects to append to the adapter\n \tAsyncHttpClient client = new AsyncHttpClient();\n\t\t//https://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=%s&start=%d&imgsz=medium\n\t\t//client.get(\"https://ajax.googleapis.com/ajax/services/search/images?\"+\"start=\"+0+\"&v=1.0&q=\"+Uri.encode(query),\n\t\tclient.get(getQueryString(offset*8) + Uri.encode(query),\n\t\t\t\tnew JsonHttpResponseHandler(){\n\t\t\t@Override\n\t\t\tpublic void onSuccess(JSONObject response){\n\t\t\t\tJSONArray imageJsonResults = null;\n\t\t\t\ttry{\n\t\t\t\t\timageJsonResults = response.getJSONObject(\"responseData\").getJSONArray(\"results\");\n\t\t\t\t\timageAdapter.addAll(ImageResult.fromJSONArray(imageJsonResults));\t\n\t\t\t\t}catch(JSONException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n \t\n \t\n }", "public void customLoadMoreDataFromApi(int offset) {\n }", "private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n result.dispatchUpdatesTo(adapter);\n }", "public void loadNextDataFromApi(int offset, View view) {\n // Send an API request to retrieve appropriate paginated data\n // --> Send the request including an offset value (i.e `page`) as a query parameter.\n // --> Deserialize and construct new model objects from the API response\n // --> Append the new data objects to the existing set of items inside the array of items\n // --> Notify the adapter of the new items made with `notifyItemRangeInserted()`\n final int curSize = tweets.size();// adapter.getItemCount();\n\n // Create the Handler object (on the main thread by default)\n Handler handler = new Handler();\n // Define the code block to be executed\n Runnable runnableCode = () -> {\n // reset only with first load.\n //scrollListener.resetState();\n Log.d(\"DEBUG\", \"before new load tweets size:\" + curSize);\n if(hasLocal) {\n adapter.clear();\n hasLocal =false;\n populateTimeline(1L,Long.MAX_VALUE - 1);\n }else {\n populateTimeline(1L, tweets.get(curSize - 1).getId());\n }\n };\n // Run the above code block on the main thread after 500 miliseconds\n handler.postDelayed(runnableCode, 500);\n }", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy>0){\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n int lastItem = layoutManager.findLastCompletelyVisibleItemPosition(); //finds last visible item\n int currentTotalCount = layoutManager.getItemCount(); //find total number of displayed items\n\n if (mLoadingItems){\n if (currentTotalCount > previousTotal){\n mLoadingItems = false;\n previousTotal = currentTotalCount;\n }\n }\n if (!mLoadingItems && (currentTotalCount <= (lastItem +view_threshold))) {\n mLoadingItems = true;\n //Increment number of items on the list\n firstItemVisible = firstItemVisible+10;\n lastItemVisible = lastItemVisible+10;\n //Update adapter\n jsonParse();\n }\n }\n }\n });\n }", "List<Item<T>> addItemsForPage(final long page);", "@Override\n protected void loadNextDataFromApi(int page) {\n ParseQuery<Post> query = ParseQuery.getQuery(Post.class);\n query.include(Post.KEY_USER);\n query.whereEqualTo(Post.KEY_USER, ParseUser.getCurrentUser());\n query.setLimit(POST_LIMIT);\n query.setSkip(POST_LIMIT*page);\n query.addDescendingOrder(Post.KEY_CREATED_AT);\n query.findInBackground(new FindCallback<Post>() {\n @Override\n public void done(List<Post> posts, ParseException e) {\n if (e != null){\n Log.e(TAG, \"Issue with getting posts\", e);\n return;\n }\n for (Post post: posts){\n Log.i(TAG, \"Post: \" + post.getDescription() + \", username: \" + post.getUser().getUsername());\n }\n allPosts.addAll(posts);\n adapter.notifyDataSetChanged();\n }\n });\n\n\n }", "private void LoadItems() {\n\n Call<NewsResponce> callNews = null;\n\n if (SourceId != null && DateTo != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, DateTo, currentPage, SourceId);\n\n } else if (SourceId != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, currentPage, SourceId);\n\n } else if (SourceId != null && DateTo != null) {\n callNews = newsApiInterface.GetEverythingDateTo(NewsClient.API_KEY, DateTo, currentPage, SourceId);\n\n } else {\n DialogAlert(R.string.dialog_title_no_criterias, R.string.dialog_message_no_criterias);\n }\n\n if (callNews != null)\n callNews.enqueue(new Callback<NewsResponce>() {\n @Override\n public void onResponse(Call<NewsResponce> call, final Response<NewsResponce> response) {\n if (response.body() != null) {\n if (response.body().getTotalResults() > articleList.size()) {\n articleList.addAll(response.body().getArticles());\n newsAdapter.notifyDataSetChanged();\n ++currentPage;\n }\n } else\n articleList.clear();\n\n Log.d(TAG, articleList.size() + \"\");\n }\n\n @Override\n public void onFailure(Call<NewsResponce> call, Throwable t) {\n Log.e(TAG, t.getMessage());\n }\n });\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextDataFromApi(page);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n customLoadMoreDataFromApi(page);\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n public void onLoadMoreItems() {\n if (mAdapter.hasMoreItems()) {\n requestData(mAdapter.getItems() == null ? 0 : mAdapter.getItems().size(), false);\n } else {\n mAdapter.onFinishLoading(false);\n }\n }", "@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }", "@Override\n\t public void onLoadMore(int page, int totalItemsCount) {\n\t customLoadMoreDataFromApi(page); \n // or customLoadMoreDataFromApi(totalItemsCount); \n\t }", "@Override\n public void onLoadMore() {\n if (searchbeanArrayList_new.size() != 0) {\n\n\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n // remove progress item\n\n\n //add items one by one\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }\n }, 2000);\n\n }\n\n }", "private void fetchData() {\n if (!isNetworkAvailable()){\n Toast.makeText(this, getString(R.string.no_internet_connection), Toast.LENGTH_SHORT).show();\n swipeRefreshLayout.setRefreshing(false);\n return;\n }\n\n apiInterface = ApiUtils.getApi();\n Call<List<Item>> call = apiInterface.getItems();\n call.enqueue(new Callback<List<Item>>() {\n @Override\n public void onResponse(Call<List<Item>> call, Response<List<Item>> response) {\n if (response.isSuccessful()){\n DatabaseController.getInstance(getApplicationContext()).clearDatabase();\n PicassoTools.clearCache(Picasso.with(getApplicationContext()));\n List<Item> items = response.body();\n for (Item item : items) {\n DatabaseController.getInstance(getApplicationContext()).addItem(item);\n// Log.d(TAG, \"add in list items \" + item.getId().toString());\n }\n updateUI();\n }else {\n Log.d(TAG, response.errorBody().toString());\n Toast.makeText(MainActivity.this, R.string.error, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<List<Item>> call, Throwable t) {\n Log.d(TAG, \"onFailure: \" + t.getMessage());\n swipeRefreshLayout.setRefreshing(false);\n }\n });\n }", "LiveData<PagedList<Response>> pagedList();", "private void loadMoreItems() {\n isLoading = true;\n\n currentPage += 1;\n\n Call findMyFeedVideosCall = vimeoService.findMyFeedVideos(currentPage, PAGE_SIZE);\n calls.add(findMyFeedVideosCall);\n findMyFeedVideosCall.enqueue(findMyFeedVideosNextFetchCallback);\n }", "@Override\n public void onLoad(final int currentPage) {\n mModel.add(null);\n adapter.notifyItemInserted(mModel.size() - 1);\n\n //Delay loading for 5 seconds\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n //Generate a new set of data\n Collection<Model> temp = generate(currentPage, 10);\n\n //Remove progress model_item\n mModel.remove(mModel.size() - 1);\n adapter.notifyItemRemoved(mModel.size() - 1);\n\n //Update model and view\n mModel.addAll(temp);\n adapter.setLoaded();\n //Not effective but suitable for demonstration\n adapter.notifyDataSetChanged();\n }\n }, 5000);\n }", "@Override\n public void run() {\n\n if (pageTokenAvailable) {\n smoothProgressBar.setVisibility(View.VISIBLE);\n\n current_start += 10;\n\n // searchbean_post_data.getStart_limit()+=10;\n\n searchbean_post_data.setStart_limit(current_start);\n\n\n findDataFromServer();\n\n\n //or you can add all at once but do not forget to call mAdapter.notifyDataSetChanged();\n }\n\n\n }", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextData(page);\n }", "private void doApiCall() {\n\n if (currentPage != PAGE_START) adapter.removeLoading();\n\n // check weather is last page or not\n if (totalPage != 0) {\n adapter.addLoading();\n apiCall(currentPage);\n } else {\n isLastPage = true;\n }\n isLoading = false;\n }", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "public void paginationLoading() {\n mTvShows.add(null);\n notifyItemInserted(mTvShows.size() - 1);\n }", "private void loadMoreData() {\n twitterClient.getNextPageOfTweets(new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Headers headers, JSON json) {\n Log.i(ACTIVITY_TAG, \"onSuccess: loadMoreData\");\n // deserialize and construct new model objects from API response\n JSONArray jsonArray = json.jsonArray;\n try {\n // append new data object tweets to existing list\n // notify adapter\n tweetsAdapter.addAll(Tweet.fromJsonArray(jsonArray));\n } catch (JSONException e) {\n Log.e(ACTIVITY_TAG, \"JSON exception: loadMoreData\", e);\n }\n }\n\n @Override\n public void onFailure(int statusCode, Headers headers, String response, Throwable throwable) {\n Log.e(ACTIVITY_TAG, \"onFailure: loadMoreData:\" + response , throwable);\n }\n }, tweets.get(tweets.size() - 1).getId());\n }", "private void loadData() {\n RetrofitHelper.getInstance().getNearbyItems(new Observer<MainItemListBean>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(MainItemListBean mainItemListBean) {\n if (refreshLayout.getState() == RefreshState.Refreshing) {\n dataBeans.clear();\n }\n dataBeans.addAll(mainItemListBean.getData());\n if (dataBeans.isEmpty()) {\n emptyView.setVisibility(View.VISIBLE);\n } else {\n emptyView.setVisibility(View.GONE);\n }\n adapter.setData(dataBeans);\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n endLoading();\n }\n\n @Override\n public void onComplete() {\n endLoading();\n }\n }, longitude, latitude, maxDistance, page, category);\n }", "public void requestNews(int skip, int num){\n String tag_json = \"json_object_req\";\n\n String url = \"http://lighthauz.herokuapp.com/api/news/\";\n\n JsonObjectRequest req = new JsonObjectRequest(url + user.get(SessionManager.KEY_ID) + \"/\" + Integer.toString(skip) + \"/\" + Integer.toString(num),null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n\n JSONArray myArray;\n try{\n if (previousTotal==0){\n news.clear();\n }\n\n myArray = response.getJSONArray(\"news\");\n for(int i=0;i<myArray.length();i++){\n\n JSONObject author = myArray.getJSONObject(i).getJSONObject(\"author\");\n JSONObject idea = myArray.getJSONObject(i).getJSONObject(\"idea\");\n News newNews = new News(myArray.getJSONObject(i).getString(\"type\"),author.getString(\"id\"),idea.getString(\"id\"),author.getString(\"name\"),author.getString(\"pic\"),idea.getString(\"title\"),idea.getString(\"category\"),idea.getString(\"description\"),idea.getString(\"pic\"),myArray.getJSONObject(i).getLong(\"timestamp\"));\n news.add(newNews);\n\n }\n\n if(previousTotal==0){\n recView.setAdapter(adapter);\n } else {\n adapter.swap(news);\n }\n\n pb.setVisibility(View.GONE);\n recView.setVisibility(View.VISIBLE);\n\n }\n catch (JSONException e){\n Log.e(\"MYAPP\", \"unexpected JSON exception\", e);\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n }\n });\n\n// Adding request to request queue\n AppSingleton.getInstance(getContext()).addToRequestQueue(req, tag_json);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n notificationID = notifications.get(notifications.size()-1).getID();\n feachNotificationsFromApi(notificationID);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n Log.d(\"DEBUG\", \"network continue load before count:\" + tweets.size());\n loadNextDataFromApi(page, view);\n }", "private void additems() {\n MaVolleyRequest.getInstance(getApplicationContext()).GetMethodRequest(getLink(), null, new VolleyRequestOnResultListener() {\n @Override\n public void onSucces(String result) {\n Log.d(\"qwerty\", getLink());\n ResearchResultBeanz item = (new Gson()).fromJson((new Gson()).fromJson(result, JsonObject.class).getAsJsonObject(\"data\"), ResearchResultBeanz.class);\n if (adapter == null) {\n adapter = new GridViewAdapter2(ImageGridViewActivity.this, Utils.fromArrayToList(item.items));\n gridView.setAdapter(adapter);\n } else {\n adapter.appendData (Utils.fromArrayToList(item.items));\n }\n flag_loading = false;\n }\n @Override\n public void onFailure(String error) {\n makeToast(\"Loading failure\");\n flag_loading = false;\n }\n });\n }", "private void updateArticles() {\n progressDialog.show();\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Constant.API_URL, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n try {\n JSONArray jsonArray = new JSONArray(response.toString());\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n Article article = new Article();\n article.TITLE = jsonObject.getString(\"TITLE\");\n article.ID = jsonObject.getInt(\"ID\");\n article.URL = jsonObject.getString(\"URL\");\n article.PUBLISHER = jsonObject.getString(\"PUBLISHER\");\n article.CATEGORY = jsonObject.getString(\"CATEGORY\");\n article.HOSTNAME = jsonObject.getString(\"HOSTNAME\");\n article.TIMESTAMP = jsonObject.getLong(\"TIMESTAMP\");\n articles.add(article);\n if (!publisher.contains(jsonObject.getString(\"PUBLISHER\"))) {\n publisher.add(jsonObject.getString(\"PUBLISHER\"));\n }\n //Save publisher locally\n /*if (jsonObject.getString(\"PUBLISHER\") != null) {\n Publisher publisher = new Publisher();\n publisher.setPublisherName(jsonObject.getString(\"PUBLISHER\"));\n try {\n List<Publisher> publisherList = new RushSearch()\n .whereEqual(\"publisherName\", jsonObject.getString(\"PUBLISHER\"))\n .find(Publisher.class);\n if (publisherList.size() == 0) {\n publisher.save();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }*/\n }\n\n refreshList();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n }\n });\n\n //submitting request to server\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n requestQueue.add(jsonArrayRequest);\n }", "@Override\n public boolean onLoadMore(int page, int totalItemsCount, int firstVisibleItem) {\n if (loading) {\n getListDataByPaging(String.valueOf(page), firstVisibleItem);\n }\n // or loadNextDataFromApi(totalItemsCount);\n return true; // ONLY if more data is actually being loaded; false otherwise.\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextFeedPage(page);\n }", "@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}", "public abstract void onLoadMore(int page, int totalItemsCount);", "public abstract void onLoadMore(int page, int totalItemsCount);", "private void getData()\n {\n\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(WebAPIService.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n\n WebAPIService api = retrofit.create(WebAPIService.class);\n\n final Call<List<FoodItem>> call = api.getFoodData();\n\n call.enqueue(new Callback<List<FoodItem>>() {\n @Override\n public void onResponse(Call<List<FoodItem>> call, Response<List<FoodItem>> response) {\n\n foodList.clear();\n mainFoodList.clear();\n\n foodList.addAll(response.body());\n mainFoodList.addAll(response.body());\n\n foodListAdapter.notifyDataSetChanged();\n progressBar.setVisibility(View.GONE);\n swipeRefreshLayout.setRefreshing(false);\n }\n\n @Override\n public void onFailure(Call<List<FoodItem>> call, Throwable t) {\n Log.d(\"Retrofit err\" , t.getMessage());\n }\n });\n }", "public void fetchArticles(int page, boolean newSearch) {\n if(newSearch) { articles.clear(); }\n\n AsyncHttpClient client = new AsyncHttpClient();\n String url;\n RequestParams params = new RequestParams();\n params.put(\"api-key\", \"ed5753fe0329424883b2a07a7a7b4817\");\n params.put(\"page\", page);\n\n // If top stories, different parameters\n if(topStories) {\n url = \"https://api.nytimes.com/svc/topstories/v2/home.json\";\n } else {\n url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n params.put(\"q\",filter.getQuery());\n if(filter.getSort() != null) {\n params.put(\"sort\",filter.getSort());\n }\n if(filter.getBegin_date() != null) {\n params.put(\"begin_date\",filter.getBegin_date());\n }\n if(filter.getNewsDeskOpts().size() > 0) {\n for(int i=0; i<filter.getNewsDeskOpts().size(); i++) {\n params.put(\"fq\",String.format(\"news_desk:(%s)\",filter.getNewsDeskOpts().get(i)));\n }\n }\n Log.d(\"DEBUG\",params.toString());\n }\n\n client.get(url, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"DEBUG\",response.toString());\n JSONArray articleJsonResults = null;\n try {\n if(!topStories) {\n articleJsonResults = response.getJSONObject(\"response\").getJSONArray(\"docs\");\n } else {\n articleJsonResults = response.getJSONArray(\"results\");\n }\n\n // Every time data is changed, notify adapter; can also do by article.addAll and use adapter.notifyDataSetChanged\n articles.addAll(Article.fromJsonArray(articleJsonResults, topStories));\n adapter.notifyDataSetChanged();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\",\"JSON response failed\");\n super.onFailure(statusCode, headers, throwable, errorResponse);\n }\n });\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n if(next_url != null) {\n curent_page = page;\n loadMore(page);\n }\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount) {\n if(next_url != null) {\n curent_page = page;\n loadMore(page);\n }\n // or customLoadMoreDataFromApi(totalItemsCount);\n }", "@Override\n\t\tpublic void onLoadMore() {\n\t\t\tdaoIndex++;\n\t\t\tgetData();\n\t\t\tadapter.notifyDataSetChanged();\n\t\t\tonLoad();\n\t\t}", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadMoreRecyclerViewData(hal[0]);\n hal[0]++;\n }", "public void refreshDatas(GsonNews requestNews){\n if (newsItems != null){\n Log.e(\"xx\", \"suaxinshuju\");\n// newsItems.setAdapter(newsAdapter);\n newsAdapter.setItems(requestNews.getData());\n// newsAdapter.notifyDataSetChanged();\n }\n }", "@Transactional(propagation = Propagation.REQUIRED)\n public List<Item> getPagedItems(ItemPagedQueryResponse itemPagedQueryResponse) {\n return itemDao.getPagedItems(itemPagedQueryResponse);\n }", "private void populateTimeline(int page) {\n\n Log.d(\"DEBUG\", \"Page: \" + page);\n client.getHomeTimeline(new JsonHttpResponseHandler() {\n\n //Success\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONArray json) {\n super.onSuccess(statusCode, headers, json);\n //Deserialize Json, Create models and load model data into listview\n\n recycleAdapter.clear();\n ArrayList<Tweet> arrayList = Tweet.fromJsonArray(json);\n addAll(arrayList);\n swipeContainer.setRefreshing(false);\n\n //add tweets to db\n for (int i=0; i< arrayList.size(); i++)\n {\n dbHelper.addTweetToDB(arrayList.get(i));\n }\n }\n\n //Failure\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n super.onFailure(statusCode, headers, throwable, errorResponse);\n\n Log.d(\"DEBUG\", errorResponse.toString());\n }\n }, page);\n }", "private void refreshListView() {\n\t\t\tisEnd=false;\n\t\t\tlistView.setMode(Mode.PULL_FROM_START);\n\t\t\tjsonArray=new JSONArray();\n\t\t\tcurrentPage=0;\n\t\t\tgetSharePage(++currentPage);\n\t\t\t\n\t\t}", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n pageNumberBeingQueried = page;\n\n /*\n * Loader call - case 2 of 3\n * We call loader methods in case our recycler view is running out of items for display\n * */\n manageLoaders();\n }", "private void myjob_LoadMore_converted_PostRequest(Context mContext, String url) {\n\n loadmore.setVisibility(View.VISIBLE);\n\n HashMap<String, String> jsonParams = new HashMap<String, String>();\n jsonParams.put(\"provider_id\", provider_id);\n jsonParams.put(\"type\", \"closed\");\n jsonParams.put(\"page\", Str_Pagination);\n jsonParams.put(\"perPage\", Str_PageDateCount);\n\n System.out.println(\"--------------loadmore page-------------------\" + Str_Nextpage);\n\n System.out.println(\"--------------loadmore perpage--------------------\" + Str_PageDateCount);\n\n ServiceRequest mservicerequest = new ServiceRequest(mContext);\n\n mservicerequest.makeServiceRequest(url, Request.Method.POST, jsonParams, new ServiceRequest.ServiceListener() {\n\n @Override\n public void onCompleteListener(String response) {\n\n System.out.println(\"--------------reponse-------------------\" + response);\n Log.e(\"converted\", response);\n String Str_status = \"\", Str_totaljobs = \"\", Str_Response = \"\";\n\n try {\n loadingMore = true;\n\n JSONObject jobject = new JSONObject(response);\n Str_status = jobject.getString(\"status\");\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n JSONObject object = jobject.getJSONObject(\"response\");\n Str_Pagination = object.getString(\"next_page\");\n Str_PageDateCount = object.getString(\"perPage\");\n Str_totaljobs = object.getString(\"total_jobs\");\n\n Object check_list_object = object.get(\"jobs\");\n if (check_list_object instanceof JSONArray) {\n\n JSONArray jarry = object.getJSONArray(\"jobs\");\n if (jarry.length() > 0) {\n\n for (int i = 0; i < jarry.length(); i++) {\n JSONObject object2 = jarry.getJSONObject(i);\n MyjobConverted_Pojo pojo = new MyjobConverted_Pojo();\n pojo.setConverted_address(object2.getString(\"location\"));\n pojo.setConverted_category(object2.getString(\"category_name\"));\n pojo.setConverted_date(object2.getString(\"booking_time\"));\n pojo.setConverted_user_name(object2.getString(\"user_name\"));\n pojo.setConverted_user_image(object2.getString(\"user_image\"));\n pojo.setOrder_id(object2.getString(\"job_id\"));\n pojo.setConvertedjob_status(object2.getString(\"job_status\"));\n String address= getCompleteAddressString(Double.parseDouble(object2.getString(\"location_lat\")),Double.parseDouble(object2.getString(\"location_lng\")));\n pojo.setAddress(address);\n convertedlist.add(pojo);\n isConvertedJobAvailable = true;\n\n }\n show_progress_status = true;\n } else {\n show_progress_status = false;\n isConvertedJobAvailable = false;\n }\n } else {\n isConvertedJobAvailable = false;\n }\n\n } else {\n Str_Response = jobject.getString(\"response\");\n }\n\n if (Str_status.equalsIgnoreCase(\"1\")) {\n loadingMore = false;\n loadmore.setVisibility(View.GONE);\n\n if (show_progress_status) {\n adapter.notifyDataSetChanged();\n }\n\n } else {\n Alert(getResources().getString(R.string.server_lable_header), Str_Response);\n\n }\n if (swipeRefreshLayout.isRefreshing()) {\n swipeRefreshLayout.setRefreshing(false);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n\n }\n\n @Override\n public void onErrorListener() {\n dialog.dismiss();\n }\n });\n\n }", "@Override\n public void onLoadMoreBrief() {\n photoList.add(null);\n imageAdapter.notifyItemInserted(photoList.size() - 1);\n\n Map<String, String> options = setSearchOptions(query, Constants.NOT_NEW_SEARCH);\n Call<SearchResponse> call = service.searchPhoto(options);\n call.enqueue(new Callback<SearchResponse>() {\n @Override\n public void onResponse(Response<SearchResponse> response, Retrofit retrofit) {\n SearchResponse result = response.body();\n if (result.getStat().equals(\"ok\")) {\n // Remove progress bar and add more photos to list\n photoList.remove(photoList.size() - 1);\n imageAdapter.notifyItemRemoved(photoList.size());\n if (result.getPhotos().getPhoto().size() != 0) {\n int size = imageAdapter.getItemCount();\n photoList.addAll(result.getPhotos().getPhoto());\n imageAdapter.notifyItemRangeInserted(size, photoList.size() - 1);\n imageAdapter.setLoaded();\n pageCount++;\n }\n } else {\n // Remove progress bar and display message if something wrong\n photoList.remove(photoList.size() - 1);\n imageAdapter.notifyItemRemoved(photoList.size());\n Toast.makeText(context, result.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n\n @Override\n public void onFailure(Throwable t) {\n // Log error here since request failed\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }", "protected abstract void onRequestPage(boolean isRequestNext,int fromIndex,int toIndex,float x,float y);", "@Override\n\t\t\tpublic void onLoadMore(int page, int totalItemsCount) {\n\t\t\t\tpopulateTimeline();\n\t\t\t}", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n loadNextPosts(page);\n hideProgressBar();\n }", "@GET(\"deliveries\")\n Call<List<Delivery>> getDeliveries(@Query(\"limit\") int limit, @Query(\"offset\") int offset);", "private void loadItems() {\n CheckItemsActivity context = this;\n makeRestGetRequest(String.format(Locale.getDefault(),\n RestClient.ITEMS_URL, checkId), (success, response) -> {\n if (!success) {\n Log.d(DEBUG_TAG, \"Load items fail\");\n Toast.makeText(context, LOAD_ITEMS_FAIL, Toast.LENGTH_SHORT).show();\n } else {\n try {\n items = ModelsBuilder.buildItemsFromJSON(response);\n // pass loaded items and categories to adapter and set adapter to Recycler View\n itemsListAdapter = new ItemsListAdapter(items, categories, context);\n recyclerView.setAdapter(itemsListAdapter);\n } catch (JSONException e) {\n Log.d(DEBUG_TAG, \"Load items parsing fail\");\n }\n }\n // set loading progress bar to invisible when loading is finished\n progressBar.setVisibility(View.INVISIBLE);\n });\n }", "void getData() {\n api = retrofitClient.getClient().create(API.class);\n //Defining the method\n api.getBuys().enqueue(new Callback<Data>() {\n @Override\n public void onResponse(Call<Data> call, Response<Data> response) {\n if (response.isSuccessful()) {\n Data data = response.body();\n buyList = data.getData();\n adapterView = new Adapter_sp(getActivity(), buyList);\n rv.setAdapter(adapterView);\n }\n }\n\n @Override\n public void onFailure(Call<Data> call, Throwable t) {\n Log.d(\"loi\",t.toString());\n\n }\n });\n\n\n }", "@Override\n\t\tpublic void onLoadMore(int page, int totalItemsCount) {\n\t\t\tpresenter.loadRecordsPage(page);\n\t\t}", "@Override\n public void onLoadMoreRecycleViewDataListner(int page, int totalItemsCount, RecyclerView view)\n {\n\n mRecyclerViewScrollToEndObserver.setLoadingData(true);\n if(!mIsLastPageLoaded)\n {\n mRecyclerView.post(new Runnable()\n {\n @Override\n public void run()\n {\n mTopStoryItems.add(mTopStoryLoadingMoreItem);\n mTopStoriesAdapter.updateData(mTopStoryItems);\n mTopStoriesRecyclerViewModelCallbackHandler.notifyLoadMoreTopStories();\n }\n });\n }\n }", "@Override\n public void run() {\n Collection<Model> temp = generate(currentPage, 10);\n\n //Remove progress model_item\n mModel.remove(mModel.size() - 1);\n adapter.notifyItemRemoved(mModel.size() - 1);\n\n //Update model and view\n mModel.addAll(temp);\n adapter.setLoaded();\n //Not effective but suitable for demonstration\n adapter.notifyDataSetChanged();\n }", "private void fetchMovies() {\n\n offSet = adapter.getCount();\n offSet = offSet+1;\n\n String url=\"\";\n Log.i(TAG,\" Off set after Refresh: \"+offSet);\n swipeRefreshLayout.setRefreshing(true);\n\n // appending offset to url\n if(type == 1) {\n url = getResources().getString(R.string.get_gk_news_url) + offSet;\n txtAppTitle.setText(getResources().getString(R.string.gk_news));\n }else if(type == 2){\n url = getResources().getString(R.string.get_famous_place_url) + offSet;\n txtAppTitle.setText(getResources().getString(R.string.famous_place));\n }else if(type == 3){\n url = getResources().getString(R.string.get_famous_person_url) + offSet;\n txtAppTitle.setText(getResources().getString(R.string.famous_person));\n }\n\n\n Log.i(TAG, \"New URL: \" + url);\n\n // Volley's json array request object\n JsonArrayRequest req = new JsonArrayRequest(url,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Log.d(TAG, response.toString());\n\n if (response.length() > 0) {\n\n // looping through json and adding to movies list\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject movieObj = response.getJSONObject(i);\n int rank = movieObj.getInt(\"newsid\");\n Log.i(TAG,\"New ID: \"+rank);\n String title = movieObj.getString(\"title\");\n String desc = movieObj.getString(\"desc\");\n String imgUrl = movieObj.getString(\"imagepath\");\n String postBy = movieObj.getString(\"uname\");\n String imagePostDate = movieObj.getString(\"date\");\n String imageCredit = movieObj.getString(\"imgcredit\");\n String lat = movieObj.getString(\"latitude\");\n String log = movieObj.getString(\"longitude\");\n\n GKInfo m = new GKInfo(rank, title,desc,imagePostDate,postBy,lat,log,imageCredit,imgUrl);\n dataArrayList.add(m);\n\n } catch (JSONException e) {\n Log.e(TAG, \"JSON Parsing error: \" + e.getMessage());\n }\n }\n adapter.notifyDataSetChanged();\n }else {\n Toast.makeText(getActivity().getApplicationContext(), \"There are no any data\",\n Toast.LENGTH_SHORT).show();\n }\n if(adapter!=null) {\n adapter.notifyDataSetChanged();\n }\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n listView.setOnItemClickListener(listClickListener);\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Server Error: \" + error.getMessage());\n\n\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n listView.setOnItemClickListener(listClickListener);\n }\n });\n\n // Adding request to request queue\n MainApplication.getInstance().addToRequestQueue(req);\n }", "private void loadContent()\n {\n // locking the function to prevent the adapter\n // from calling multiples async requests with\n // the same definitions which produces duplicate\n // data.\n locker.lock();\n\n // this function contruct a GraphRequest to the next paging-cursor from previous GraphResponse.\n GraphRequest nextGraphRequest = lastGraphResponse.getRequestForPagedResults(GraphResponse.PagingDirection.NEXT);\n\n // if we reached the end of our pages, the above method 'getRequestForPagedResults'\n // return 'null' object\n if(nextGraphRequest != null)\n {\n // for clarificating and formatting purposes\n // I declared the callback besides the members\n // variables.\n nextGraphRequest.setCallback(callback);\n nextGraphRequest.executeAsync();\n }\n }", "private void parseJSONwithJSONObject(JSONObject jsonObject) {\n //Dealing with the logic when adapter is set.\n try {\n SimpleDateFormat format, formatData;\n if (jsonObject.get(\"status\").equals(\"OK\")) {\n\n Log.d(PAR, String.valueOf(jsonObject.get(\"status\")));\n\n JSONArray jsonArray = jsonObject.getJSONArray(\"data\");\n\n total_page = (int) jsonObject.get(\"total_pages\");\n Log.d(\"total page\", String.valueOf(total_page));\n\n int length = jsonArray.length();\n for (int i = 0; i < length; i++) {\n //j using to store the next item in the list\n int j = i + 1;\n String time = jsonArray.getJSONObject(i).getString(\"timestamp\");\n format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n //date stores the date of an item\n Date date = format.parse(time);\n calendar = Calendar.getInstance();\n calendar.setTime(date);\n\n String dateTime = null;\n //in case list out of index\n if (j < length) {\n String time_after = jsonArray.getJSONObject(j).getString(\"timestamp\");\n formatData = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n //date_after store the next item datetime\n Date date_after = formatData.parse(time_after);\n bef_calendar = Calendar.getInstance();\n bef_calendar.setTime(date_after);\n //if the two items' date is different, show datetime of that day\n if (getDaysBetween(bef_calendar, calendar) != 0) {\n formatData = new SimpleDateFormat(\"yyyy-MM-dd\");\n dateTime = formatData.format(date);\n }\n } else if (mPageNum == total_page) {\n //show the earliest item's date\n formatData = new SimpleDateFormat(\"yyyy-MM-dd\");\n dateTime = formatData.format(date);\n }\n if (dateTime != null) {\n Log.d(\"dateTime\", dateTime);\n }\n //time stores the hour and minute\n format = new SimpleDateFormat(\"HH:mm\");\n time = format.format(date);\n\n String msg = jsonArray.getJSONObject(i).getString(\"message\");\n String name = jsonArray.getJSONObject(i).getString(\"name\");\n\n //In case there are null msg stored in the server.\n if (msg.equals(\"\")) {\n continue;\n } else {\n if (name.equals(\"Anson\") || name.equals(\"leoymr\")) {\n send_info.add(0, new Send_INFO(null, msg, name, time, dateTime));\n } else {\n send_info.add(0, new Send_INFO(msg, null, name, time, dateTime));\n }\n }\n }\n\n } else {\n Log.d(PAR, \"Parsing error\");\n Log.d(PAR, String.valueOf(jsonObject.get(\"status\")));\n }\n\n } catch (JSONException e1) {\n e1.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic List<Item> loadItems(int start, int count) {\n\t\treturn null;\n\t}", "private void loadaspirasirt(){\n String m_idwarga = getSp().getString(\"id_warga\",null);\n Call<ResponModel>viewmypost = getApi().rtaspirasi();\n viewmypost.enqueue(new Callback<ResponModel>() {\n @Override\n public void onResponse(Call<ResponModel> call, Response<ResponModel> response) {\n refresh.setRefreshing(false);\n Log.d(\"RESPON\",\"Hasil\"+response.body());\n mItem= response.body().getResult();\n mAdapter = new AdapterRT(mItem,AspirasiRTActivity.this);\n mylistpost.setAdapter(mAdapter);\n mAdapter.notifyDataSetChanged();\n\n }\n\n @Override\n public void onFailure(Call<ResponModel> call, Throwable t) {\n refresh.setRefreshing(false);\n Log.d(\"RESPON\",\"GAGAL\");\n }\n });\n }", "@Override\n public void onLoadMore() {\n MyApplacation.getmHandler().postDelayed(new Runnable() {\n @Override\n public void run() {\n pageNo++;\n getDataForService();\n }\n }, 1000);\n\n }", "public void loadData(){\n JsonArrayRequest request = new JsonArrayRequest(\"http://www.efstratiou.info/projects/newsfeed/getList.php\", netListener, errorListener);\n\n //submit request\n ArticlesApp.getInstance().getRequestQueue().add(request);\n\n }", "private void callVolley(){\n itemList.clear();\n adapter.notifyDataSetChanged();\n swipe.setRefreshing(true);\n\n // membuat request JSON\n JsonArrayRequest jArr = new JsonArrayRequest(url_select, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n Log.d(TAG, response.toString());\n\n // Parsing json\n for (int i = 0; i < response.length(); i++) {\n try {\n JSONObject obj = response.getJSONObject(i);\n\n dkoridor item = new dkoridor();\n\n item.setId(obj.getString(TAG_ID_rute));\n item.setNama(obj.getString(TAG_NAMA_koridor));\n item.setTujuan(obj.getString(TAG_Tujuan));\n\n // menambah item ke array\n itemList.add(item);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n // notifikasi adanya perubahan data pada adapter\n adapter.notifyDataSetChanged();\n\n swipe.setRefreshing(false);\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n swipe.setRefreshing(false);\n }\n });\n\n // menambah request ke request queue\n AppController.getInstance().addToRequestQueue(jArr);\n }", "@Override\r\n\tpublic EasyUIDataGridResult itemList(int pageNum, int pageSize) {\n\t\tPageHelper.startPage(pageNum, pageSize);\r\n\t List<TbItem>list=tbItemMapper.selectByExample(new TbItemExample());\r\n\t PageInfo<TbItem> info=new PageInfo<TbItem>(list);\r\n\t EasyUIDataGridResult dataGridResult=new EasyUIDataGridResult();\r\n\t dataGridResult.setRows(list);\r\n\t dataGridResult.setTotal((int)info.getTotal());\r\n\t\treturn dataGridResult;\r\n\t}", "@Override\n\tpublic void refreshData(){\n\t\tpageNum = 1;\n\t\tlist.clear();\n\t\tloadData();\n\t}", "private void loadNextPageOfTopRatedMovies() {\n\t\ttry {\n\t\t\tMovieApiClient movieApiClient = MovieDbApi.getRetrofitClient().create(MovieApiClient.class);\n\t\t\tCall<TopRatedMovies> call = movieApiClient.getTopRatedMovies(getString(R.string.api_key), \"en_US\", currentPage);\n\t\t\tcall.enqueue(new Callback<TopRatedMovies>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onResponse(Call<TopRatedMovies> call, Response<TopRatedMovies> response) {\n\t\t\t\t\tif (response.isSuccessful()) {\n\t\t\t\t\t\tadapter.removeLoadingFooter();\n\t\t\t\t\t\tisLoading = false;\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tTopRatedMovies topRatedMovies = response.body();\n\t\t\t\t\t\tList<TopRatedMovieResults> topRatedMovieResults = topRatedMovies.getResults();\n\t\t\t\t\t\tadapter.addAll(topRatedMovieResults);\n\n\t\t\t\t\t\tif (currentPage != TotalPages)\n\t\t\t\t\t\t\tadapter.addLoadingFooter();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tisLastPage = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Call<TopRatedMovies> call, Throwable t) {\n\t\t\t\t\tif (t instanceof SocketTimeoutException || t instanceof IOException) {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.no_netowrk), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.no_netowrk), t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress.setVisibility(View.GONE);\n\t\t\t\t\t\tLog.e(\"ERROR\", getString(R.string.error), t);\n\t\t\t\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tprogress.setVisibility(View.GONE);\n\t\t\tToast.makeText(getApplicationContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();\n\t\t}\n\t}", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "@Override\n public void onSuccess(List<SocialMsgBean> objects) {\n adapter.addNews(objects);\n offset += objects.size();\n adapter.notifyDataSetChanged();\n msgList.onRefreshComplete();\n if (objects.size() > 0) {\n offset += objects.size();\n } else if(offset != 0){\n UIShowUtil.toastMessage(getActivity(), \"没有最新数据\");\n }\n }", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "@Override\n public void onSuccess(List<SocialMsgBean> objects) {\n adapter.addNews(objects);\n offset += objects.size();\n adapter.notifyDataSetChanged();\n msgList.onRefreshComplete();\n\n if (objects.size() > 0) {\n offset += objects.size();\n } else if(offset != 0){\n UIShowUtil.toastMessage(getActivity(), \"没有数据啦\");\n }\n }", "public void sendCloth() {\n if (page >= totalpage) return;\n page++;\n\n FormBody.Builder builder = new FormBody.Builder();\n builder.add(\"page\", String.valueOf(page));\n builder.add(\"conditions\", tv_search_str.getText().toString());\n RequestBody formBody = builder.build();\n\n Request request = new Request.Builder()\n .url(url + \"/game_shop/jsontypography\")\n .post(formBody)\n .build();\n\n\n mClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, final Response response) throws IOException {\n // ... check for failure using `isSuccessful` before proceeding\n if (!response.isSuccessful()) {\n throw new IOException(\"Unexpected code \" + response);\n }\n\n\n final Gson gson = new Gson();\n final String responseData = response.body().string();\n\n Type type = new TypeToken<ArrayList<Game>>() {\n }.getType();\n final List<Game> gameList = gson.fromJson(responseData, type);\n// Log.i(\"mains\", \"2sendCloth\" + gameList.size() + \"\");\n\n MainActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n try {\n int pos = mGameList.size();\n mGameList.addAll(pos, gameList);\n adapter.notifyItemRangeInserted(pos, gameList.size());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }\n });\n }", "public abstract RecyclerViewPaginationAdapter<TItem, ?> getNewInstanceOfListAdapter(List<TItem> initialItems);", "private void getCharacterAt(int page){\n GetDataService service = RetrofitRickMorty.getRetrofitInstance().create(GetDataService.class);\n Call<ApiResponseCharacters> call = service.getAllCharacters(page);\n call.enqueue(new Callback<ApiResponseCharacters>() {\n @Override\n public void onResponse(Call<ApiResponseCharacters> call, Response<ApiResponseCharacters> response) {\n progressDialog.dismiss();\n reloadPreferences(response.body());\n\n AddCharactersTask task = new AddCharactersTask();\n task.execute(callback, response.body(), rickMortyDao);\n\n if (current_page == 1){\n putCharacterData(response.body());\n }\n else {\n charAdapter.addAll(response.body());\n }\n try {\n ApiResponseCharacters tmp = response.body();\n if (tmp.getInfo().getNext() != null) {\n current_page++;\n }\n else {\n endPage = true;\n }\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(Call<ApiResponseCharacters> call, Throwable t) {\n Log.e(\"ApiRequest\", t.getMessage());\n progressDialog.dismiss();\n\n GetCharactersTask task = new GetCharactersTask();\n task.execute(callback, rickMortyDao);\n\n Toast.makeText(MainActivity.this, \"Something went wrong...Please try later!\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "protected void loadNextPage(){\n\n if(!isShowingSearchedVotes) {\n setLoadingMoreItems(true);\n RikdagskollenApp.getInstance().getRiksdagenAPIManager().getVotes(new VoteCallback() {\n\n @Override\n public void onVotesFetched(List<Vote> votes) {\n setShowLoadingView(false);\n voteList.addAll(votes);\n getAdapter().notifyDataSetChanged();\n setLoadingMoreItems(false);\n }\n\n @Override\n public void onFail(VolleyError error) {\n setLoadingMoreItems(false);\n decrementPage();\n }\n }, getPageToLoad());\n\n incrementPage();\n }\n }", "private void setup() {\n adapter = new HomeAdapter(this);\n\n linearLayoutManager = new LinearLayoutManager\n (this, LinearLayoutManager.VERTICAL, false);\n rv.setLayoutManager(linearLayoutManager);\n rv.setItemAnimator(new DefaultItemAnimator());\n\n rv.setAdapter(adapter);\n showWait();\n if (NetworkUtils.isNetworkConnected(this)) {\n\n presenter.loadPage(currentPage);\n } else {\n onFailure(NetworkError.NETWORK_ERROR_MESSAGE);\n }\n rv.addOnScrollListener(new PaginationScrollListener(linearLayoutManager) {\n @Override\n protected void loadMoreItems() {\n AppLogger.d(TAG,\"currentPage:\"+currentPage);\n isLoading = true;\n currentPage += 1;\n presenter.loadPage(currentPage);\n\n\n }\n\n @Override\n public int getTotalPageCount() {\n AppLogger.d(TAG,\"TOTAL_PAGES:\"+TOTAL_PAGES);\n return TOTAL_PAGES;\n }\n\n @Override\n public boolean isLastPage() {\n return isLastPage;\n }\n\n @Override\n public boolean isLoading() {\n return isLoading;\n }\n });\n\n\n }", "private void getBlockListNetworkCall(final Context context, int offset, int limit) {\n\n HashMap<String, Object> serviceParams = new HashMap<String, Object>();\n HashMap<String, Object> tokenServiceHeaderParams = new HashMap<String, Object>();\n\n tokenServiceHeaderParams.put(Keys.TOKEN, UserSharedPreference.readUserToken());\n serviceParams.put(Keys.LIST_OFFSET, offset);\n serviceParams.put(Keys.LIST_LIMIT, limit);\n\n new WebServicesVolleyTask(context, false, \"\",\n EnumUtils.ServiceName.get_blocked_user,\n EnumUtils.RequestMethod.GET, serviceParams, tokenServiceHeaderParams, new AsyncResponseCallBack() {\n\n @Override\n public void onTaskComplete(TaskItem taskItem) {\n\n if (taskItem != null) {\n\n if (taskItem.isError()) {\n if (getUserVisibleHint())\n showNoResult(true);\n } else {\n try {\n\n if (taskItem.getResponse() != null) {\n\n JSONObject jsonObject = new JSONObject(taskItem.getResponse());\n\n // todo parse actual model\n JSONArray favoritesJsonArray = jsonObject.getJSONArray(\"users\");\n\n Gson gson = new Gson();\n Type listType = new TypeToken<List<BlockUserBO>>() {\n }.getType();\n List<BlockUserBO> newStreams = (List<BlockUserBO>) gson.fromJson(favoritesJsonArray.toString(),\n listType);\n\n totalRecords = jsonObject.getInt(\"total_records\");\n if (totalRecords == 0) {\n showNoResult(true);\n } else {\n if (blockListAdapter != null) {\n if (startIndex != 0) {\n //for the case of load more...\n blockListAdapter.removeLoadingItem();\n } else {\n //for the case of pulltoRefresh...\n blockListAdapter.clearItems();\n }\n }\n\n showNoResult(false);\n setUpBlockListRecycler(newStreams);\n }\n }\n } catch (Exception ex) {\n showNoResult(true);\n ex.printStackTrace();\n }\n }\n }\n }\n });\n }", "@Override\n public void onLoadMore(int page, int totalItemsCount, RecyclerView view) {\n System.out.println(\"load more\" + totalItemsCount);\n loadMore(totalItemsCount);\n }", "private void performNewQuery(){\n\n // update the label of the Activity\n setLabelForActivity();\n // reset the page number that is being used in queries\n pageNumberBeingQueried = 1;\n // clear the ArrayList of Movie objects\n cachedMovieData.clear();\n // notify our MovieAdapter about this\n movieAdapter.notifyDataSetChanged();\n // reset endless scroll listener when performing a new search\n recyclerViewScrollListener.resetState();\n\n /*\n * Loader call - case 3 of 3\n * We call loader methods as we have just performed reset of the data set\n * */\n // initiate a new query\n manageLoaders();\n\n }", "@Override\n public void onResponse(Call<ArtikelResponse> call, Response<ArtikelResponse> response) {\n artikelList.addAll(response.body().getArticles());\n adapter.notifyDataSetChanged();\n }", "@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount,\n int totalItemCount) {\n boolean loadMore;\n\n int ultimRegistreVist= firstVisibleItem + visibleItemCount;\n boolean loadMoreTmp = firstVisibleItem + visibleItemCount >= totalItemCount;\n\n if ((this.articles.size() == 100) && (loadMoreTmp)){\n //if ((this.articles.size() == 100) && (ultimRegistreVist >= totalItemCount)){\n loadMore = true;\n }\n else{\n loadMore = false;\n }\n\n if(loadMore && this.processes==0) {\n this.processes = 1;\n activity.obtainArticlesAsync(this.urlFinal + \"/\" +\n String.valueOf(this.articles.size() + 1),this.dialog, this.articles,\n this.listArticles,(ultimRegistreVist - visibleItemCount));\n\n }\n }", "private void getNewsList() {\n // While the app fetched data we are displaying a progress dialog\n\n if (isOnline(mContext)) {\n showProgressDialog();\n\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n dismissProgressDialog();\n\n news.setTitle(response.body().getTitle());\n\n newsList.addAll(response.body().getRows());\n showList();\n ActionBar actionBar = getActionBar();\n actionBar.setDisplayHomeAsUpEnabled(true);\n actionBar.setDisplayShowHomeEnabled(false);\n actionBar.setDisplayShowTitleEnabled(true);\n actionBar.setTitle(news.getTitle());\n actionBar.setDisplayUseLogoEnabled(false);\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n dismissProgressDialog();\n displayMessage(t.getMessage());\n setTextMessage();\n\n }\n });\n } else {\n\n displayMessage(getString(R.string.no_network));\n setTextMessage();\n }\n\n }", "public void refreshItemsFromTable() {\n\n // Get the items that weren't marked as completed and add them in the\n // adapter\n\n AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>(){\n @Override\n protected Void doInBackground(Void... params) {\n try {\n final List<ToDoItem> results = refreshItemsFromMobileServiceTable();\n //Offline Sync\n //final List<ToDoItem> results = refreshItemsFromMobileServiceTableSyncTable();\n getActivity ().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.clear();\n for (ToDoItem item : results) {\n mAdapter.add(item);\n }\n }\n });\n } catch (final Exception e){\n createAndShowDialogFromTask(e, \"Error\");\n }\n\n return null;\n }\n };\n\n runAsyncTask(task);\n }", "private void fetchQuestions() {\n mRelativeLayout.setVisibility(View.VISIBLE);\n DataServiceGenerator dataServiceGenerator = new DataServiceGenerator();\n Service service = dataServiceGenerator.createService(Service.class);\n Call<List<QuestionsModel>> call = service.getQuestions();\n call.enqueue(new Callback<List<QuestionsModel>>() {\n @Override\n public void onResponse(Call<List<QuestionsModel>> call, Response<List<QuestionsModel>> response) {\n if (response.isSuccessful()) {\n if (response != null) {\n List<QuestionsModel> questionsModelList = response.body();\n mQuestionsViewModel.deleteAll();\n for (int i = 0; i < questionsModelList.size(); i++) {\n String question = questionsModelList.get(i).getQuestion();\n String answer = questionsModelList.get(i).getAnswer();\n String ansA = questionsModelList.get(i).getOptA();\n String ansB = questionsModelList.get(i).getOptB();\n String ansC = questionsModelList.get(i).getOptC();\n\n Question questions = new Question(question, ansA, ansB, ansC, answer);\n mQuestionsViewModel.insert(questions);\n }\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n takeAction();\n }\n }, 2000);\n }\n }\n }\n\n @Override\n public void onFailure(Call<List<QuestionsModel>> call, Throwable t) {\n\n }\n });\n\n }", "static void handlePaginated(IPlaceFinder finder, int limit) {\n LocalTime firstReqTime = LocalTime.now();\n findPagedResults(finder, limit, 0);\n int offset = limit;\n while(scanner.hasNextLine()) {\n String input = scanner.nextLine();\n if (ValidInput.MORE.getInput().equals(input)) {\n // checks if the current call is no later than 5 minutes of first request\n if (firstReqTime.plusMinutes(5L).isAfter(LocalTime.now())) {\n findPagedResults(finder, limit, offset);\n offset = offset + limit;\n //makes a new call if the first request is older than 5 mins\n } else {\n MessageOut.gettingNewResults();\n findPagedResults(finder, limit, 0);\n offset = limit;\n }\n } else if (ValidInput.END.getInput().equals(input)) {\n break;\n } else {\n MessageOut.notValidInput();\n }\n }\n }", "private void getUserListData() {\n final ProgressDialog progressDialog = new ProgressDialog(getActivity());\n progressDialog.setCancelable(false); // set cancelable to false\n progressDialog.setMessage(\"Please Wait\"); // set message\n progressDialog.show(); // show progress dialog\n\n // Api is a class in which we define a method getClient() that returns the API Interface class object\n // getUsersList() is a method in API Interface class, in this method we define our API sub url\n Api.getClient().getUsersList(new Callback<List<UserListResponse>>() {\n @Override\n public void success(List<UserListResponse> userListResponses, Response response) {\n // in this method we will get the response from API\n progressDialog.dismiss(); //dismiss progress dialog\n userListResponseData = userListResponses;\n setDataInRecyclerView(); // call this method to set the data in adapter\n }\n @Override\n public void failure(RetrofitError error) {\n // if error occurs in network transaction then we can get the error in this method.\n Toast.makeText(getActivity(), error.toString(), Toast.LENGTH_LONG).show();\n progressDialog.dismiss(); //dismiss progress dialog\n\n }\n });\n }", "public abstract ArrayList<T> findAll(int limit, int offset);", "private void fetchNews() {\n if (isOnline(mContext)) {\n // showing refresh animation before making http call\n swipeRefreshLayout.setRefreshing(true);\n\n // appending offset to url\n // String url = URL_TOP_250 + offSet;\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n\n if (response.body().getRows().size() > 0) {\n\n newsList.addAll(response.body().getRows());\n showList();\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n }\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n displayMessage(t.getMessage());\n setTextMessage();\n // stopping swipe refresh\n swipeRefreshLayout.setRefreshing(false);\n\n }\n });\n } else {\n setTextMessage();\n }\n\n }", "private void loadProducts() {\n Call<List<Product>> productsCall = productRepository.getAllProducts();\n productsCall.enqueue(new Callback<List<Product>>() {\n @Override\n public void onResponse(Call<List<Product>> call, Response<List<Product>> response) {\n if (errMess != null ) {\n errMess.setValue(\"\");\n }\n products.setValue(response.body());\n// System.out.println(\"**************************** here and there \\n \");\n// System.out.println(products.getValue().size());\n// System.out.println(\"end here is the end of the list \");\n// System.out.println(response.body().size());\n }\n\n @Override\n public void onFailure(Call<List<Product>> call, Throwable t) {\n //System.out.println(\"some error occur while loading data\");\n //System.out.println(t);\n errMess = new MutableLiveData<>();\n errMess.setValue(\"error while loading data\");\n }\n });\n }", "@DebugLog\n public void setItems(ArrayList<Update> items) {\n if (items != null) {\n for (Update item : items) {\n mItems.add(new OverviewItem(item));\n }\n }\n notifyDataSetChanged();\n //Remove the isloading\n if (getBasicItemCount() <= 0) return;\n try {\n OverviewItem overviewItem = mItems.get(getBasicItemCount() - items.size() - 1);\n if (overviewItem.isLoadingItem) {\n mItems.remove(getBasicItemCount() - items.size() - 1);\n notifyDataSetChanged();\n }\n }catch(ArrayIndexOutOfBoundsException e)\n {\n //theres no loading overview\n return;\n }\n\n }" ]
[ "0.7743845", "0.7659272", "0.7610936", "0.7462116", "0.6916099", "0.667327", "0.6656219", "0.6655941", "0.64893705", "0.64405465", "0.6359942", "0.6356634", "0.6304199", "0.6304199", "0.6304199", "0.62214047", "0.62214047", "0.61696476", "0.6143117", "0.610857", "0.60638386", "0.60354286", "0.5996615", "0.59463835", "0.58769816", "0.5866983", "0.5846524", "0.5804409", "0.577882", "0.5776606", "0.57704055", "0.5762761", "0.57625234", "0.5734652", "0.568143", "0.5676279", "0.56436974", "0.56242985", "0.55745524", "0.5544753", "0.55311704", "0.5506603", "0.5506603", "0.5485162", "0.54798055", "0.5475188", "0.5475188", "0.54654115", "0.5459293", "0.5455094", "0.54418164", "0.54352516", "0.5433833", "0.54011923", "0.53954154", "0.53612334", "0.5349463", "0.5332445", "0.53082746", "0.53046507", "0.52878034", "0.5281726", "0.5278877", "0.5272506", "0.5264126", "0.5255375", "0.5239097", "0.5236057", "0.52344275", "0.5217274", "0.5205776", "0.51971453", "0.5181196", "0.5178887", "0.5174806", "0.51699096", "0.51671946", "0.51637065", "0.5162334", "0.5155604", "0.51549894", "0.51487094", "0.5146438", "0.5138834", "0.5134803", "0.5128238", "0.5127058", "0.512516", "0.5111537", "0.5101895", "0.5091285", "0.508832", "0.5088254", "0.50868374", "0.5071791", "0.50712633", "0.5060244", "0.5056612", "0.5054007", "0.5047547" ]
0.6118358
19
add this after auto skill chooser
public void move() { this.hero.setPF(1); this.hero.setState(this.hero.getMoved()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void AddNewSkill()\n\t{\n\t\t\n\t}", "public Skills chooseSkill();", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "void skillsComplete( String key ) {\n //do nothing\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void perform() {\n\t\tcontrol.openSkillEditor();\n\t}", "@Override\n\tpublic Skills chooseSkill() {\n\t\t\n\t\treturn null;\n\t}", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "private void addAI(){\n\n }", "public void addSkill(Skill newskill) {\n skills.addElement(newskill);\n }", "@Override\n public void addChoice(){\n System.out.println(\"Chocolate cake size: \");\n //print out choice\n choice.addChoice();\n }", "public Skills getChosenSkill();", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "void updateSkill(Skill skill);", "@Override\n\tpublic void addChoice(String choice) {\n\t}", "protected void addSkill(String name) {\r\n\t\tthis.skills.add(name.toLowerCase());\r\n\t}", "@Override\n\tpublic void makeFeatChoices(PlayerCharacter pc) {\n\n\t}", "private void add() {\n \t\r\n\tArrayAdapter<String> adp=new ArrayAdapter<String>(this,\r\n\t\tandroid.R.layout.simple_dropdown_item_1line,li);\r\n\t \t\r\n\tadp.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\tauto.setThreshold(1);\r\n\tauto.setAdapter(adp);\r\n\tsp.setAdapter(adp);\r\n\t\r\n }", "private void setupChangeVoice() {\n\t\tFestivalVoice[] voices={FestivalVoice.Kiwi, FestivalVoice.British, FestivalVoice.American};\n\t\tfinal JComboBox voice_chooser = new JComboBox(voices);\n\t\tvoice_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tvoice_chooser.setForeground(Color.BLACK);\n\t\tvoice_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current voice\n\t\tvoice_chooser.setSelectedItem(parent_frame.getFestival().getFestivalVoice());\n\t\tvoice_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalVoice)voice_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalVoice((FestivalVoice)voice_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvoice_chooser.setBounds(919, 600, 154, 40);\n\t\tadd(voice_chooser);\n\t}", "public void chooseForMe() {\n }", "private void add(){\r\n ArrayAdapter<String> adp3 = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\r\n adp3.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n txtAuto3.setThreshold(1);\r\n txtAuto3.setAdapter(adp3);\r\n }", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "QuestionPick addPickDetail(Question question);", "public void newQuest() {\n\t\tList <String> quests;\n\t\tif (activeQuest == null) {\n\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t} else {\n\t\t\tquests = activeQuest.getSuccessors();\n\t\t\tif (quests == null) {\n\t\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t\t}\n\t\t}\n\t\tbakeInstance.getLogger().info(\"[BAKE] Choosing new quest. Quests available: \" + quests.toString());\n\t\tint questID = (int) Math.round(Math.random()*(quests.size()-1));\n\t\tactiveQuest = new Quest(QuestCfg, quests.get(questID));\n\t}", "@Override\n public void onSkillClick(int skill_id, int position) {\n\n Intent intent = new Intent(MainActivity.this, SkillActivity.class);\n intent.putExtra(\"REQUESTED_SKILL\", skill_id);\n startActivity(intent);\n }", "private void addSpell(Bundle bundle) {\n Toast.makeText(getContext(), \"Not yet implemented\", Toast.LENGTH_SHORT).show();\n }", "public void addSkills(final Characters player, final Characters enemy)\r\n\t{\r\n\t\tskillOne = new JButton(\"Skill 1\");\r\n\t\tadd(skillOne);\r\n\t\tskillOne.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcombatLog = combatLog + \"\\n\" + player.attack(enemy);\r\n\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\tstate.setWaiting(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillTwo = new JButton(\"Skill 2\");\r\n\t\tadd(skillTwo);\r\n\t\tskillTwo.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(0, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillThree = new JButton(\"Skill 3\");\r\n\t\tadd(skillThree);\r\n\t\tskillThree.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(1, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFour = new JButton(\"Skill 4\");\r\n\t\tadd(skillFour);\r\n\t\tskillFour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(2, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tskillFive = new JButton(\"Skill 5\");\r\n\t\tadd(skillFive);\r\n\t\tskillFive.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tString message = player.useSkill(3, enemy);\r\n\t\t\t\tif (message == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\nNot enough mana. Use another skill.\";\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tcombatLog = combatLog + \"\\n\" + message;\r\n\t\t\t\t\tupdateLog(combatLog);\r\n\t\t\t\t\tstate.setSuccess(true);\r\n\t\t\t\t\tstate.setWaiting(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "public void anotherNew(ActionEvent event) {\n\t\tnewChampBtn.setText(\"Another Pick\");\n\n\t\tif (newRecommendList.size() != 0) {\n\t\t\tString champ = newRecommendList.remove(0);\n\t\t\tint count = 0;\n\t\t\tString[] mostPlayed = new String[2];\n\t\t\tfor (Entry<String, Integer> entry : ChampionFrequency.tagFreq.entrySet()) {\n\t\t\t\tmostPlayed[count++] = entry.getKey();\n\t\t\t\tif (count == 2)\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tnewLable.setText(\"Most play tag: \\n\" + mostPlayed[0] + \"\\n\" + mostPlayed[1]);\n\t\t\tnewChamp.setText(champ);\n\t\t\tnewChamp.setDisable(true);\n\t\t\tString url = \"http://ddragon.leagueoflegends.com/cdn/6.24.1/img/champion/\" + champ + \".png\";\n\t\t\tImage icon = new Image(url);\n\t\t\tnewchampIcon.setImage(icon);\n\t\t\tnewchampIcon.setSmooth(true);\n\t\t\tnewchampIcon.setCache(true);\n\t\t}\n\t}", "@Override\n public void perform() {\n pickList.advanced().getSourceList().getItem(ChoicePickerHelper.byIndex().last()).select();\n pickList.advanced().getAddButtonElement().click();\n pickList.advanced().getRemoveButtonElement().click();\n }", "public Skill() {\n\t\tsuper();\n\t}", "public void rewardSkills(final boolean send) {\n boolean update = false;\n if (AllSettingsConfig.AUTO_LEARN_SKILLS) {\n for (SkillLearn skillLearn : SkillAcquireHolder.getInstance().getNormalSkillsClassId(this).values()) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skillLearn.getId(), skillLearn.getLevel());\n if (sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && skillLearn.isClicked())) {\n continue;\n }\n if (getSkillLevel(sk.getId()) < sk.getLevel())\n addSkill(sk, true);\n }\n update = true;\n/*\n\t\t\tint unLearnable = 0;\n\t\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\twhile(skills.size() > unLearnable) {\n\t\t\t\tunLearnable = 0;\n\t\t\t\tfor(final SkillLearn s : skills) {\n\t\t\t\t\tfinal SkillEntry sk = SkillTable.getInstance().getSkillEntry(s.getId(), s.getLevel());\n\t\t\t\t\tif(sk == null || !sk.getTemplate().getCanLearn(getPlayerClassComponent().getClassId()) || (!AllSettingsConfig.AUTO_LEARN_FORGOTTEN_SKILLS && s.isClicked())) {\n\t\t\t\t\t\tunLearnable++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\taddSkill(sk, true);\n\t\t\t\t}\n\t\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL);\n\t\t\t}\n\t\t\tupdate = true;*/\n } else\n // Скиллы дающиеся бесплатно не требуют изучения\n {\n for (final SkillLearn skill : SkillAcquireHolder.getInstance().getAvailableSkills(this, AcquireType.NORMAL)) {\n if (skill.getCost() == 0 && skill.getItemId() == 0) {\n final SkillEntry sk = SkillTable.getInstance().getSkillEntry(skill.getId(), skill.getLevel());\n addSkill(sk, true);\n if (!getShortCutComponent().getAllShortCuts().isEmpty() && sk.getLevel() > 1) {\n getShortCutComponent().getAllShortCuts().stream().filter(sc -> sc.getId() == sk.getId() && sc.getType() == ShortCut.TYPE_SKILL).forEach(sc -> {\n final ShortCut newsc = new ShortCut(sc.getSlot(), sc.getPage(), sc.getType(), sc.getId(), sk.getLevel(), 1);\n sendPacket(new ShortCutRegister(this, newsc));\n getShortCutComponent().registerShortCut(newsc);\n });\n }\n update = true;\n }\n }\n }\n if (isTransformed()) {\n update = true;\n //Генерируем новые скилы трансформации и выдаем их.\n getTransformation().addGiveAllSkills(getLevel());\n }\n if (send && update) {\n sendPacket(new SkillList(this));\n }\n\n updateStats();\n }", "@Override\n\tpublic void addSkill(Skill theSkill) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//add/update the skill\n\t\tcurrentSession.saveOrUpdate(theSkill);\n\t}", "void AddSuggestion(String babyName) {\n\r\n\tT.insert(babyName);\r\n\t\r\n\r\n }", "public void playerHasUsedSuggestion() {\n suggestionMade = true;\n }", "protected void alusta() {\n \n panelTapahtuma.setFitToHeight(true);\n \n chooserTapahtumat.clear();\n chooserTapahtumat.addSelectionListener(e -> naytaTapahtuma());\n edits = TapahtumaController.luoKentat(gridTapahtuma);\n for (TextField edit: edits) {\n if (edit != null) {\n edit.setEditable(false);\n edit.setOnMouseClicked(e -> { if (e.getClickCount() > 1 ) muokkaa(getFieldId(e.getSource(),0)); } );\n edit.focusedProperty().addListener((a, o, n) -> kentta = getFieldId(edit, kentta));\n }\n }\n }", "public void addSuggestionSelection(String cardName) {\n SuspectCard suspect = findSuspectCard(cardName);\n RoomCard room = findRoomCard(currentPlayersTurn.getPiece().getLocation().getBelongsTo().getName());\n WeaponCard weapon = findWeaponCard(cardName);\n\n this.suggestionChoices.setRoom(room);\n if (findRoomCard(cardName) != null) {\n logMessage(\"The room for a suggestion can only be the room you are currently in.\");\n return;\n }\n if (suspect != null) {\n this.suggestionChoices.setSuspect(suspect);\n logMessage(currentPlayersTurn.getPiece().getName() + \" selected \"\n + cardName + \" as part of their suggestion.\");\n return;\n }\n if (weapon != null) {\n this.suggestionChoices.setWeapon(weapon);\n logMessage(currentPlayersTurn.getPiece().getName() + \" selected \"\n + cardName + \" as part of their suggestion.\");\n return;\n }\n }", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "public com.transerainc.aha.gen.agent.SkillDocument.Skill addNewSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n return target;\n }\n }", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.MEGAHORN);\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.TAIL_WHIP);\n beginnerSkills.add(SkillFactory.WATER_GUN);\n beginnerSkills.add(SkillFactory.WATER_SPORT);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAIL_WHIP)));\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_GUN)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_SPORT)));\n levelUpSkills.put(13, new ArrayList<Integer>(Arrays.asList(SkillFactory.FOCUS_ENERGY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RAZOR_SHELL)));\n levelUpSkills.put(21, new ArrayList<Integer>(Arrays.asList(SkillFactory.FURY_CUTTER)));\n levelUpSkills.put(26, new ArrayList<Integer>(Arrays.asList(SkillFactory.WATER_PULSE)));\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.REVENGE)));\n levelUpSkills.put(34, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_JET)));\n //39 ENCORE\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.AQUA_TAIL)));\n //51 RETALIATE\n levelUpSkills.put(58, new ArrayList<Integer>(Arrays.asList(SkillFactory.SWORDS_DANCE)));\n levelUpSkills.put(63, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYDRO_PUMP)));\n initEvolutionSkills();\n }", "private void updateActiveChallenge() {\n categories.get(indexOfActiveCategory).increaseIndexOfActiveChallenge();\n }", "public void initSkills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tskills.setLocation(500,300);\n\t\tskills.setSize(400,300);\n\t\t\t\n\t\tt1 = new JButton(\"Dicker Brecher (benötigt 2 Skillpunkte)\");\n\t\tt1.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tt3 = new JButton(\"Kanten-Paule (benötigt 4 Skillpunkte und Dicker Brecher)\");\n\t\tt3.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){ //bzgl. Starten\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setMaxhealth(player.getMaxhealth() + 50);\n\t\t\t\t\tplayer.setSkillHealth2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tt2 = new JButton(\"Brutaler Prügelknabe (benötigt 2 Skillpunkte)\");\n\t\tt2.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 2){\n\t\t\t\t\tplayer.setXP(player.getXP()-2);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 20);\n\t\t\t\t\tplayer.setSkillStrength1(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tt4 = new JButton(\"Mega-Mörder brutaler Prügelknabe (benötigt 4 Skillpunkte und Brutaler Prügelknabe)\");\n\t\tt4.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){ //bzgl. Schließen\n\t\t\t\tif(player.getXP() >= 4){\n\t\t\t\t\tplayer.setXP(player.getXP()-4);\n\t\t\t\t\tplayer.setDamage(player.getDamage() + 30);\n\t\t\t\t\tplayer.setSkillStrength2(true);\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Du hast nicht genug Erfahrung!\");\n\t\t\t\t}\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tt5 = new JButton(\"Ich will nix - danke\");\n\t\tt5.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg1){\n\t\t\t\tskillmode = false;\n\t\t\t}\n\t\t});\n\t\t\n\t\tskills.setLayout(new GridLayout(3,2));\n\t\tskills.add(t1);\n\t\tskills.add(t2);\n\t\tskills.add(t3);\n\t\tskills.add(t4);\n\t\tskills.add(t5);\n\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\t\n\t\tskills.pack();\n\t\t\n\t}", "@Override\n public void applyDefaults(DynamicSkill skill, String prefix) { }", "@Override // see item.java\n\tpublic void pickUp() {\n\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n //TODO: CONVERSION 2\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.CONVERSION);\n beginnerSkills.add(SkillFactory.SHARPEN);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(7, new ArrayList<Integer>(Arrays.asList(SkillFactory.PSYBEAM)));\n levelUpSkills.put(12, new ArrayList<Integer>(Arrays.asList(SkillFactory.AGILITY)));\n levelUpSkills.put(18, new ArrayList<Integer>(Arrays.asList(SkillFactory.RECOVER)));\n //TODO: MAGNET RISE 23\n levelUpSkills.put(29, new ArrayList<Integer>(Arrays.asList(SkillFactory.SIGNAL_BEAM)));\n //TODO: RECYCLE 34\n levelUpSkills.put(40, new ArrayList<Integer>(Arrays.asList(SkillFactory.DISCHARGE)));\n levelUpSkills.put(45, new ArrayList<Integer>(Arrays.asList(SkillFactory.LOCK_ON)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.TRI_ATTACK)));\n //TODO: MAGIC COAT 56\n levelUpSkills.put(62, new ArrayList<Integer>(Arrays.asList(SkillFactory.ZAP_CANNON)));\n }", "public void skills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tskills.setVisible(true);\n\t\t\n\t}", "@Override\n protected void initLevelUpSkills() {\n List<Integer> beginnerSkills = new ArrayList<Integer>();\n beginnerSkills.add(SkillFactory.TACKLE);\n beginnerSkills.add(SkillFactory.LEER);\n levelUpSkills.put(0, beginnerSkills);\n levelUpSkills.put(5, new ArrayList<Integer>(Arrays.asList(SkillFactory.EMBER)));\n levelUpSkills.put(8, new ArrayList<Integer>(Arrays.asList(SkillFactory.WORK_UP)));\n levelUpSkills.put(11, new ArrayList<Integer>(Arrays.asList(SkillFactory.HEADBUTT)));\n levelUpSkills.put(15, new ArrayList<Integer>(Arrays.asList(SkillFactory.NOBLE_ROAR)));\n levelUpSkills.put(20, new ArrayList<Integer>(Arrays.asList(SkillFactory.TAKE_DOWN)));\n levelUpSkills.put(23, new ArrayList<Integer>(Arrays.asList(SkillFactory.FIRE_FANG)));\n levelUpSkills.put(28, new ArrayList<Integer>(Arrays.asList(SkillFactory.ENDEAVOR)));\n levelUpSkills.put(33, new ArrayList<Integer>(Arrays.asList(SkillFactory.ECHOED_VOICE)));\n levelUpSkills.put(36, new ArrayList<Integer>(Arrays.asList(SkillFactory.FLAMETHROWER)));\n levelUpSkills.put(39, new ArrayList<Integer>(Arrays.asList(SkillFactory.CRUNCH)));\n levelUpSkills.put(43, new ArrayList<Integer>(Arrays.asList(SkillFactory.HYPER_VOICE)));\n levelUpSkills.put(46, new ArrayList<Integer>(Arrays.asList(SkillFactory.INCINERATE)));\n levelUpSkills.put(50, new ArrayList<Integer>(Arrays.asList(SkillFactory.OVERHEAT)));\n }", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddAwards();\n\t\t\t\t\t}", "@Override\n public Skill addSkill(Skill skill) {\n return _skills.put(skill.getId(), skill);\n }", "@Override\n public void useSkill(Creature activeChar, Creature targets) {\n }", "@Override\n public void onClick(View view) {\n mVoteListener.editListener(\"newQuestion\",\n \"newOptionOne\", \"newOptionTwo\");\n }", "@Override\n public void onLongSkillClick(int skill_id, int position) {\n }", "@Override\n\t\t\tpublic void insertFriendPreExecute() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void addExperience(double time) {\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}", "default void interactWith(Lever lever) {\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tPersonAwardsItem item = (PersonAwardsItem)arg0.getTag();\n\t\t\t\t\t\tmCurriculumVitaeInterface.onChange(item);\n\t\t\t\t\t}", "public void question() {\n\t\tlead.answer(this);\n\t}", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\tmCurriculumVitaeInterface.onAddPersonEducation();\n\t\t\t\t\t}", "@Override\r\n public void onNewIntent(Intent intent){\r\n \t\r\n \tthis.activateExamBoard(intent);\r\n }", "private void setupSpellHereField(){\n\t\tinput_from_user = new JTextField();\n\t\tinput_from_user.setFont(new Font(\"Calibri Light\", Font.PLAIN, 45));\n\t\tinput_from_user.setEditable(true);\n\t\tinput_from_user.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tadd(input_from_user);\n\t\tinput_from_user.setBounds(374, 484, 942, 74);\n\t}", "public abstract SkillData skill();", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "public final void start() {\n if (!player.isSkillAction()) {\n player.setSkillAction(true);\n World.submit(new SkillActionTask(this));\n }\n }", "public void btnAddSkill(View v) {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\n // Use custom layout for dialog\n LayoutInflater inflater = getLayoutInflater();\n final View dialogView = inflater.inflate(R.layout.dialog_create_skill, null);\n builder.setView(dialogView);\n\n // Disable canceling on touching outside\n builder.setCancelable(false);\n\n // Make final to use in inner class\n final AlertDialog dialog = builder.create();\n\n // Create button (textview)\n TextView createBtn = dialogView.findViewById(R.id.createBtn);\n createBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Get skill name\n final EditText skillNameField = dialogView.findViewById(R.id.skillNameField);\n // Trim the sring\n String skillName = skillNameField.getText().toString().trim();\n\n // Don't allow empty name\n if (! skillName.equals(\"\") ) {\n // Create skill\n SkillEntity newSkill = new SkillEntity(skillName);\n viewModel.addSkill(newSkill);\n\n dialog.dismiss();\n }\n else {\n\n // Set red border to edittext\n skillNameField.setBackgroundResource(R.drawable.background_new_skill_dialog_input_invalid);\n\n // Change to default after 1s\n new CountDownTimer(1000, 30) {\n\n @Override\n public void onTick(long arg0) {\n // TODO Auto-generated method stub\n }\n\n @Override\n public void onFinish() {\n skillNameField.setBackgroundResource(R.drawable.background_new_skill_dialog_input);\n }\n }.start();\n\n // Set red border to edittext\n skillNameField.setBackgroundResource(R.drawable.background_new_skill_dialog_input_invalid);\n\n vibrator.vibrate(500);\n }\n\n }\n });\n\n // Cancel button (textview)\n TextView cancelBtn = dialogView.findViewById(R.id.cancelBtn);\n cancelBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n\n // Cancel dialog on back key pressed\n dialog.setOnKeyListener(new Dialog.OnKeyListener() {\n @Override\n public boolean onKey(DialogInterface di, int keyCode,\n KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK) {\n // Cancel dialog\n dialog.dismiss();\n }\n return false;\n }\n });\n \n\n // Show dialog\n dialog.show();\n }", "private void use() {\n switch (choices.get(selection)) {\n case INFO : { \n AbstractInMenu newMenu = new ItemInfo(sourceMenu, item);\n this.sourceMenu.setMenu(newMenu);\n newMenu.setVisible(true);\n } break;\n case USE : {\n entity.use(item); \n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case EQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case ACTIVE : {\n entity.setActiveItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNEQUIP : {\n entity.equip(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case UNACTIVE : {\n entity.setActiveItem(null);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break;\n case DROP : {\n entity.drop(item);\n sourceMenu.activate();\n sourceMenu.setState(true);\n } break; \n case PLACE : {\n entity.placeItem(item);\n entity.removeItem(item); \n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n case CLOSE : { \n sourceMenu.activate();\n } break;\n case DESTROY : {\n entity.removeItem(item);\n sourceMenu.activate();\n sourceMenu.setState(true); \n } break;\n }\n }", "public void initGui() {\n/* 27 */ super.initGui();\n/* 28 */ updateActivePotionEffects();\n/* */ }", "@Override\n public void onInteract() {\n }", "private void addCustomWords() {\r\n\r\n }", "@Override\r\n \tpublic void restoreChoice(PlayerCharacter pc, CDOMObject owner, Skill choice)\r\n \t{\r\n \t\tpc.addSkill(choice);\r\n \t\tPCClass pcc = getSourceClass(pc);\r\n \t\tif (pcc == null)\r\n \t\t{\r\n \t\t\tLogging.errorPrint(\"Unable to find the pc's class \" + source\r\n \t\t\t\t+ \" to restore skill choices to.\");\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tpc.addLocalCost(pcc, choice, SkillCost.CLASS, owner);\r\n \t}", "public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}", "void add(String prompt, UIMenuAction action);", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public void addSupport() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canAddSupport()) {\n Logger.info(\"HUD Presenter: addSupport\");\n uiStateManager.setState(GameUIState.SUPPORT);\n }\n }", "@Override\r\n \tpublic List<Skill> getCurrentlySelected(CDOMObject owner, PlayerCharacter pc)\r\n \t{\r\n \t\treturn Collections.emptyList();\r\n \t}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\teditExperience.onCompleted(position, list.get(position));\r\n\r\n\t\t\t\t\t\t}", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "@Override\n\tpublic void action() {\n\t\t_agj.addBehaviour(new RecibirDistritos(_agj));\n\t\t_agj.addBehaviour(new RecibirMonedas(_agj));\n\t}", "@Override\n public void showDifficultySelection() {\n calledMethods.add(\"showDifficultySelection\");\n }", "public ClassSkillChoiceActor(PCClass pcc, Integer autoRank)\r\n \t{\r\n \t\tapplyRank = autoRank;\r\n \t\tsource = pcc;\r\n \t}", "private void presentShowcaseSequence() {\n }", "private final void m7043b() {\n AudienceView audienceView = this.f11482f;\n if (!(audienceView == null || this.f11483g == null)) {\n audienceView.setEnabled(false);\n this.f11483g.setEnabled(false);\n }\n m7042a(true);\n rqa a = rpz.m34221a();\n a.mo25007a(this.f11478b);\n a.mo25013b(this.f11480d.f30287b);\n a.f43513a.putParcelableArrayListExtra(\"INITIAL_ACL\", rqa.m34224a(this.f11480d.f30287b));\n a.mo25019d(\"80\");\n a.mo25011b(getString(C0126R.string.auth_plus_audience_selection_description_acl));\n startActivityForResult(a.f43513a, 1);\n }", "private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }", "public void setSkillPrediction(Skills skill);", "public void toSelectingWeapon() {\n }", "public void onFinish() {\n\t\tthis.notRewarded.putAll(Bake_Auxillary.rewardPlayers(projectReminderList, activeQuest.getLoot(bakeInstance.API_LEVEL), activeQuest.getThreshold(), activeQuest.getName()));\n\t\tnewQuest();\n\t}", "@Override\n public void activate() {\n \n }", "@Override\n public void action() {\n System.out.println(\"Matchmaker Behaviour\");\n addBehaviour(new RequestToMatchMakerBehaviour());\n\n }", "public void survey()\n {\n }", "private void setupSayAgainButton() {\n\t\tImageIcon sayagain_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"sayagain.png\");\n\t\tJButton sayagain_button = new JButton(\"\", sayagain_button_image);\n\t\tsayagain_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\t\n\t\t\t\t//says the word slowly\n\t\t\t\tparent_frame.getFestival().speak(words_to_spell.get(current_word_number),true);\n\n\t\t\t\t//says the sample sentence at user's preferred speed there is one @author Abby S\n\t\t\t\tif(parent_frame.getDataHandler().hasSampleSentences()){\n\t\t\t\t\tint index=parent_frame.getDataHandler().getWordlistWords().get(parent_frame.getDataHandler().getCurrentLevel()).indexOf(words_to_spell.get(current_word_number));\n\t\t\t\t\tString sentence=parent_frame.getDataHandler().getSampleSentences().get(parent_frame.getDataHandler().getCurrentLevel()).get(index);\n\t\t\t\t\tif (!sentence.trim().isEmpty()){\n\t\t\t\t\t\tparent_frame.getFestival().speak(sentence,false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tsayagain_button.addMouseListener(new VoxMouseAdapter(sayagain_button,null));\n\t\tadd(sayagain_button);\n\t\tsayagain_button.setBounds(667, 598, 177, 100);\n\t}", "FrameIntroGUI_botonSalir_actionAdapter(FrameIntroGUI adaptee) {\n\t\tthis.adaptee = adaptee;\n\t}", "void pharmacyListener(){\n \n }", "@Override\r\n\tpublic void introduceSelf() {\n\t\tSystem.out.println(\"Hi, I'm \" + name);\r\n\t\tSystem.out.println(\"I'm attending \" + this.school);\r\n\t}", "private void displayNewChallenge() {\n mTextView.setText(getChallenge());\n }", "@Override\n\tpublic void start() {\n\t\tsendOptionsDialogue(\"Achievement cape stand\", \"List requirements\",\n\t\t\t\t\"Max cape\", \"Completionist cape\", \"Trimmed completionist\");\n\t}", "@Override\n public void onClick(View view) {\n AddWordFromDaum();\n }" ]
[ "0.65066403", "0.6383031", "0.6168633", "0.6141129", "0.6112178", "0.60954046", "0.6081749", "0.5995694", "0.59898126", "0.59837544", "0.5961549", "0.5945116", "0.58764064", "0.58514565", "0.5851289", "0.58343464", "0.5817582", "0.5793228", "0.577374", "0.5738511", "0.56475604", "0.5631723", "0.56127226", "0.5539755", "0.5527679", "0.55193084", "0.5517446", "0.5510931", "0.5488551", "0.5487226", "0.54747844", "0.5443922", "0.5443485", "0.5435579", "0.54339033", "0.5424812", "0.5410553", "0.5407337", "0.54041755", "0.5400239", "0.539965", "0.5387969", "0.5378606", "0.53775066", "0.53772134", "0.53742826", "0.53699726", "0.5355399", "0.53527457", "0.5350061", "0.5350061", "0.53378445", "0.53313416", "0.5324614", "0.5316876", "0.53022283", "0.52999353", "0.52849823", "0.5268263", "0.52656925", "0.5261323", "0.52555805", "0.5247632", "0.5247632", "0.523961", "0.5236968", "0.52296513", "0.52275634", "0.52251434", "0.52214074", "0.5213804", "0.52122736", "0.5211186", "0.5206992", "0.5204459", "0.51988703", "0.5196691", "0.5196168", "0.5192053", "0.5190458", "0.51876944", "0.51851815", "0.5183391", "0.5177539", "0.5175034", "0.516031", "0.51585716", "0.51572603", "0.5154968", "0.51526606", "0.51511157", "0.5150762", "0.5149991", "0.5149301", "0.5147178", "0.5146896", "0.5145011", "0.5139581", "0.5134425", "0.5133361", "0.51299226" ]
0.0
-1